/* ============ 窗口系统 + 窗口内容 + lightbox ============ */

.windows { position: absolute; inset: 0; pointer-events: none; z-index: 95; /* 高于悬浮控件（90），窗口盖住 CRT/编辑按钮 */ }

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  max-width: 92vw;
  max-height: calc(100vh - 60px);
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 18px rgba(0,0,0,.35);
  pointer-events: auto;
  overflow: hidden;
}
.window.dragging { opacity: .96; }

/* 标题栏：复古系统字（这里刻意不用 Poppins，保留 OS 灵魂） */
.title-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 33px;   /* 控制键 22px，上下各留 5px+，别贴边 */
  flex: none;     /* 窗口是 flex column：内容超高时别把标题栏压扁 */
  padding: 0 6px 0 8px;
  background: linear-gradient(to bottom, var(--title-1) 0%, var(--title-2) 100%);
  /* 顶部圆角收进 1px 边框内，避免标题栏底色盖住外描边的圆角 */
  border-radius: 7px 7px 0 0;
  color: #fff;
  cursor: url("../assets/cursors/arrow.png") 0 0, default;
}
.title-bar .ico { width: 18px; height: 18px; flex: none; }
.title-bar .label {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.title-bar .ctrl {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(to bottom, #d96b5a, #c0392b);
  border: 1px solid #fff;
  border-radius: 3px;
}
/* 最小化 / 最大化：XP 蓝键（关闭保持红） */
.title-bar .ctrl.min, .title-bar .ctrl.max {
  font-size: 12px;
  background: linear-gradient(to bottom, #6a9bf0, #3866c8);
  margin-right: 1px;
}
.title-bar .ctrl.min { align-items: end; line-height: 1; padding-bottom: 3px; }
.title-bar .ctrl:hover { filter: brightness(1.1); }

/* 最小化：藏起来，任务栏项恢复 */
.window.win-min { display: none; }
/* 最大化：占满桌面（留出任务栏），直角 */
.window.win-max {
  left: 0 !important; top: 0 !important;
  width: 100% !important; max-width: 100% !important;
  height: calc(100% - 34px) !important; max-height: none !important;
  border-radius: 0;
}
.window.win-max > .title-bar { border-radius: 0; }

/* 非活动窗口：标题栏褪成蓝灰（XP 的活动/非活动语义），控制键同步变淡 */
.windows .window:not(.active) > .title-bar {
  background: linear-gradient(to bottom, #93a5c7 0%, #7e90b4 100%);
}
.windows .window:not(.active) > .title-bar .label { opacity: .85; }
.windows .window:not(.active) > .title-bar .ctrl { filter: saturate(.45) brightness(1.02); }

.window-body {
  flex: 1;
  padding: 18px 20px 22px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  -webkit-user-select: text;
  user-select: text;
}

/* gallery view：左大图、右描述、下缩略图条 */
.gallery { display: flex; gap: 18px; align-items: flex-start; }
.gallery-main {
  position: relative;
  flex: 1.7; min-width: 0;
  height: min(70vh, 720px);   /* 固定高度，切换作品时弹窗不跳 */
  display: flex; align-items: center; justify-content: center;
}
.g-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
/* 图右下角的访问网站按钮 */
.g-open {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  font-size: 13px; font-weight: 500;
  color: #fff; text-decoration: none;
  background: rgba(18, 40, 92, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.g-open:hover { background: var(--xp-blue); }
/* 按图片原比例显示：以最长边为准，铺到上限即可；不裁切、不拉伸、容器自适应 */
.gallery-main .g-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  background: #fff;
  border: 1px solid var(--face-d);
  border-radius: 4px;
}
.gallery-main .g-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border: 0; display: block;
  border-radius: 4px;
}
/* 自动播放片段：和图片一样按最长边自适应、不裁切 */
.gallery-main .g-video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  background: #000;
  border: 1px solid var(--face-d);
  border-radius: 4px;
}
.gallery-main .g-empty {
  height: min(40vh, 360px); display: grid; place-items: center;
  color: #9a958a; font-size: 13px; text-align: center; line-height: 1.6;
}
/* 右侧描述栏：标题 + 说明 + 图说 */
.gallery-desc { flex: 0 0 240px; }
.gallery-desc .g-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.gallery-desc .g-desc { font-size: 13px; line-height: 1.7; }
/* 当前截图名称：做成醒目标签，翻页时一眼能看到这张图是什么 */
.gallery-desc .g-caption {
  font-size: 15px; font-weight: 600; color: #1f1d1a; line-height: 1.5;
  margin-top: 14px; padding: 8px 12px;
  background: #fff7d6; border-left: 4px solid var(--xp-blue); border-radius: 2px;
}
.gallery-desc .g-caption:empty { display: none; }
.gallery-desc .g-actions { margin-top: 10px; }
.gallery-strip { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.g-thumb {
  position: relative; flex: none;
  width: 92px; height: 58px;
  background: #fff; border: 1px solid var(--face-d); border-radius: 3px;
  overflow: hidden; padding: 0;
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb.active { border-color: var(--xp-blue); box-shadow: inset 0 0 0 2px var(--xp-blue); }
.g-thumb .g-num {
  position: absolute; left: 3px; top: 3px;
  min-width: 15px; height: 15px; line-height: 15px; padding: 0 3px;
  font-size: 10px; text-align: center; color: #fff;
  background: rgba(0,0,0,.55); border-radius: 3px;
}
@media (max-width: 640px) {
  .gallery { flex-direction: column; }
  /* 移动端窗口近全屏：不可拖动也能看到全部内容（xp-toast 也挂 .window 类，排除）
     dvh = iOS 动态视口高度：100vh 会把 Safari 工具栏后面的区域也算进来，
     窗口底部（保存/发送按钮）会被压在工具栏后面点不到 */
  .window:not(.win-full):not(.pb-win):not(.xp-toast) {
    left: 2vw !important;
    top: 2vh !important;
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: calc(100vh - 56px) !important;
    max-height: calc(100dvh - 56px) !important;
  }
  .window-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  /* 弹窗群小窗（pb-win 不走近全屏）：别超过屏宽，manifesto 窗 460px 在 375 屏会溢出 */
  .window.pb-win {
    max-width: 94vw !important;
    left: 3vw !important;
    max-height: calc(100dvh - 60px);
    /* 内容超过封顶高度时 body 里滚动，别把结尾裁掉 */
    display: flex; flex-direction: column;
  }
  .window.pb-win .title-bar { flex: none; }
  .window.pb-win .rb-body { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
  .window.pb-win .rb-body, .window.pb-win .mf { overflow-wrap: break-word; }
}

/* 全屏阅读窗口（案例详情） */
.window.win-full {
  /* 按正文宽度收窄（目录 170 + 正文 760），居中，不再铺满整屏留大片空白 */
  width: min(1040px, 94vw); max-width: 94vw;
  left: calc((100vw - min(1040px, 94vw)) / 2); top: 3vh;
  height: calc(100vh - 34px - 6vh); max-height: none;
  height: calc(100dvh - 34px - 6vh);   /* iOS：别把底部压进 Safari 工具栏 */
}
/* 阅读布局：左侧粘性目录 + 主栏 */
.case.reader {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.case-main { min-width: 0; max-width: 760px; margin: 0 auto; width: 100%; }
/* 留足尾部空白：最后几章也能滚到顶部，目录高亮和定位一致 */
.case.reader .case-body { padding-bottom: 55vh; }
.case-toc {
  position: sticky; top: 2px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 0;
}
.ct-head { font-size: 11px; letter-spacing: .14em; color: var(--dim-2); text-transform: uppercase; margin: 0 0 8px 12px; }
.ct-item {
  text-align: left;
  line-height: 1.45; color: var(--ink-2);
  padding: 7px 10px;
  border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ct-item b { display: block; font-size: 13px; font-weight: 500; }
.ct-item small { display: block; font-size: 11px; color: var(--dim-2); margin-top: 1px; }
.ct-item:hover { background: var(--surface-h); }
.ct-item.active { background: var(--surface-h); border-left-color: var(--xp-blue); color: var(--text); font-weight: 500; }
@media (max-width: 900px) {
  .case.reader { display: block; }
  .case-toc { display: none; }
}

/* 详情页（case study）：hero 图与标题分离，正文编辑部式排版 */
.case-hero {
  display: block; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--face-d);
  max-width: 640px; margin: 0 auto;   /* 与下方文字同宽，原始比例 */
}
.case-hero img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: cover; transition: transform .2s ease; }
.case-hero:hover img { transform: scale(1.012); }
.case-head { max-width: 640px; margin: 34px auto 0; }
.case-eyebrow { font-size: 11px; letter-spacing: .26em; color: var(--dim-2); margin-bottom: 10px; }
.case-title { font-family: Georgia, "Times New Roman", serif; font-size: 33px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.case-sub { font-size: 14px; color: var(--dim); line-height: 1.9; margin-top: 12px; }
.case-visit {
  display: inline-block; margin-top: 14px; padding: 7px 16px;
  font-size: 13px; font-weight: 500; color: var(--text);
  border: 1px solid #d8d2c4; border-radius: 16px; background: var(--surface);
  text-decoration: none; transition: background .15s ease;
}
.case-visit:hover { background: var(--surface-h); }
.case-body { max-width: 640px; margin: 44px auto 8px; }
.case-sec { margin-bottom: 58px; }
.case-sec h3 {
  font-size: 20px; font-weight: 600; line-height: 1.45; margin-bottom: 18px;
  padding-top: 30px; border-top: 1px solid #e7e3d8;
}
.case-sec p { font-size: 14px; line-height: 1.9; }
.case-sec p + p, .case-sec .case-ul + p, .case-sec p + .case-ul { margin-top: 13px; }
.case-ul { padding-left: 20px; font-size: 14px; line-height: 1.9; list-style: disc; }
.case-ul li { margin-bottom: 8px; }
.case-ul li::marker { color: var(--marker); }
.case-img { width: 100%; border: 1px solid var(--face-d); border-radius: 4px; margin-top: 14px; }
/* 「反思：」段落 → 引用样式，扫读能直接看到 takeaway */
.case-note {
  border-left: 3px solid #cdbd98; background: #f7f4ec;
  border-radius: 0 6px 6px 0;
  padding: 12px 16px; margin-top: 14px;
  color: var(--ink-2); font-size: 13.5px; line-height: 1.85;
}
.case-note b { font-weight: 600; color: #8a7a52; margin-right: 10px; }
/* hero 下的数据条：去框，细分隔线（编辑部式） */
.case-stats { display: flex; max-width: 640px; margin: 30px auto 0; }
.case-stats .stat { flex: 1; padding: 2px 18px; border-left: 1px solid #e2ddcf; }
.case-stats .stat:first-child { border-left: 0; padding-left: 0; }
.case-stats .stat b { display: block; font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.case-stats .stat span { font-size: 11.5px; color: var(--dim-2); line-height: 1.5; }
/* 案例内清单（如「贯穿始终的主线」） */
.case-list { padding-left: 20px; font-size: 14px; line-height: 1.85; list-style: disc; }
.case-list li { margin-bottom: 8px; }
.case-list li::marker { color: var(--marker); }
/* 篇末「继续阅读」跳转下一篇案例 */
.case-next {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; margin-top: 28px; padding: 16px 18px;
  border: 1px solid var(--face-d); border-radius: 4px; background: var(--surface);
  font-size: 14px; cursor: pointer;
  transition: background .15s ease;
}
.case-next:hover { background: var(--surface-h); }
.case-next .cn-arrow { color: var(--dim); }
/* 案例演示媒体：两列网格，gif / 演示动图并排，full 项独占一行 */
.case-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.case-media .cm { margin: 0; }
.case-media .cm.full { grid-column: 1 / -1; }
.case-media img, .case-media video { display: block; width: 100%; border: 1px solid var(--face-d); border-radius: 4px; background: var(--thumb-bg); }
.case-media figcaption { font-size: 12px; color: var(--dim); margin-top: 6px; }
/* 三列一横排（如移动端 1/2/3 代对比） */
.case-media.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .case-media,
  .case-media.cols-3 { grid-template-columns: 1fr; }
}
/* 多图点击切换 */
.cm.cycle { cursor: pointer; }
.cm-frame { position: relative; display: block; }
.cm-count {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 11px; color: #fff; padding: 2px 7px;
  background: rgba(30,30,30,.72); border-radius: 3px;
}
/* 长图：裁切预览，点击开 lightbox 看全图 */
.cm.tall img { max-height: 380px; object-fit: cover; object-position: top; cursor: zoom-in; }
.pile-count.detail { background: #6b4bd6; }

/* 移动端 case study 优化 */
@media (max-width: 640px) {
  .case-title { font-size: 21px; }
  .case-stats { flex-wrap: wrap; row-gap: 14px; }
  .case-stats .stat { flex: 1 1 calc(50% - 1px); min-width: 0; padding: 2px 14px; }
  .case-stats .stat:nth-child(odd) { border-left: 0; padding-left: 0; }   /* 两列换行后行首不带分隔线 */
  .case-stats .stat b { font-size: 17px; }
  .case-stats .stat span { font-size: 11px; }
  .case-sec h3 { font-size: 17px; }   /* 与 21px 标题、13px 正文保持层级梯度 */
  .case-sec p { font-size: 13px; }
  .case-body { margin: 24px auto 8px; }
  .cm.tall img { max-height: 280px; }
}

/* gallery 里的「打开网站 / YouTube」链接 chip */
.chip-link {
  font-size: 12px; padding: 3px 8px;
  background: #fff; border: 1px solid var(--xp-blue); color: var(--xp-blue);
  border-radius: 3px; text-decoration: none;
}
.chip-link:hover { background: var(--xp-blue); color: #fff; }

/* ---- 联系方式纯文本窗 ---- */
.textpane {
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #1a1a1a;
}
.textpane a { color: var(--xp-blue); text-decoration: underline; }
/* ---- resume / cv ---- */
.cv-head { margin-bottom: 14px; }
.cv-name { font-size: 22px; font-weight: 600; }
.cv-name small { font-size: 15px; color: #666; font-weight: 400; margin-left: 8px; }
.cv-title { font-family: var(--font-mono); color: var(--xp-blue); font-size: 15px; margin-top: 2px; }
.cv-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: #555; margin-top: 6px; }
.cv-contact-item { display: inline-flex; align-items: center; gap: 5px; }
.cv-contact-item svg { width: 14px; height: 14px; flex: none; }
.cv-sec { margin-top: 18px; }
.cv-sec h3 { font-size: 14px; font-weight: 600; color: var(--xp-blue); border-bottom: 1px solid var(--face-d); padding-bottom: 4px; margin-bottom: 8px; }
.cv-sec p { margin-bottom: 8px; }
.cv-sub { font-weight: 600; font-size: 13.5px; margin-top: 12px; }
.cv-meta { font-family: var(--font-mono); font-size: 12px; color: #777; margin-top: 1px; margin-bottom: 4px; }
.cv-label { font-weight: 600; font-size: 12.5px; color: #444; margin-top: 8px; margin-bottom: 3px; }
.cv-ul { margin: 0 0 8px 18px; }
.cv-ul li { margin-bottom: 4px; }
.cv-note { margin-top: 18px; font-size: 12px; color: #888; }

.resume-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.btn-xp {
  padding: 6px 16px; font-size: 13px;
  background: linear-gradient(to bottom, #fff, var(--face));
  border: 1px solid #888; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #fff;
}
.btn-xp:hover { border-color: var(--xp-blue); }
.btn-xp[disabled] { color: #aaa; cursor: not-allowed; }

/* ---- 视频弹窗：Windows Media Player 皮肤 ---- */
.vmodal { position: fixed; inset: 0; z-index: 9900; display: grid; place-items: center; background: rgba(0,0,0,.78); }
.wmp {
  width: min(860px, 92vw);
  background: #d6d3c8; border: 1px solid #0a3a8a; border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 24px rgba(0,0,0,.5); overflow: hidden;
  font-family: "Tahoma", "Segoe UI", sans-serif;
}
.wmp-title {
  display: flex; align-items: center; gap: 8px; height: 33px; padding: 0 6px 0 8px;   /* 与 .title-bar 同高，控制键不贴边 */
  background: linear-gradient(to bottom, #3f7be0 0%, #2b5fc4 48%, #2453b4 52%, #2f63c8 100%); color: #fff;
}
.wmp-logo svg { width: 17px; height: 17px; display: block; }
.wmp-name { flex: 1; font-size: 13px; font-weight: 700; text-shadow: 1px 1px 1px rgba(0,0,0,.4); }
.wmp-tbtns { display: flex; gap: 3px; }
.wmp-tb {
  width: 21px; height: 20px; display: grid; place-items: center; font-size: 12px; color: #fff;
  border: 1px solid rgba(255,255,255,.7); border-radius: 3px;
  background: linear-gradient(to bottom, #6a9bf0, #3866c8);
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.wmp-x { background: linear-gradient(to bottom, #e8776a, #c0392b); }
.wmp-tb:hover { filter: brightness(1.08); }
.wmp-menu { display: flex; gap: 16px; padding: 3px 12px; background: #ece9d8; border-bottom: 1px solid #b7b3a6; font-size: 12px; color: #333; }
.wmp-menu span { cursor: default; }
.wmp-screen { background: #000; }
.vmodal-frame { aspect-ratio: 16 / 9; background: #000; }
.vmodal-frame video, .vmodal-frame iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.wmp-status { display: flex; align-items: center; gap: 12px; height: 22px; padding: 0 12px; background: #000; color: #cfe0ff; font-size: 11px; }
.wmp-status .wmp-track { flex: 1; min-width: 0; color: #8fa8d8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wmp-transport {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: linear-gradient(to bottom, #cdd6e6, #9fb0cc 55%, #8fa2c2); border-top: 1px solid #6f86ad;
}
.wmp-play {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #24468e; background: radial-gradient(circle at 50% 32%, #7fb0f5, #2b62c8 70%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 1px 3px rgba(0,0,0,.35);
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.wmp-play svg { width: 18px; height: 18px; fill: #fff; }
.wmp-btn {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #5a6f92; color: #33456a; background: linear-gradient(to bottom, #eef2f8, #c2cee2);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.7);
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.wmp-btn svg { width: 13px; height: 13px; fill: currentColor; }
.wmp-play:hover, .wmp-btn:hover { filter: brightness(1.06); }
.wmp-mute svg { fill: #33456a; }
.wmp-time { font-size: 11px; color: #24345a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wmp-seek { flex: 1; min-width: 40px; }
.wmp-vol { width: 70px; flex: none; }
.wmp-seek, .wmp-vol { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px; background: #4a5f82; outline: none; cursor: url("../assets/cursors/pointer.png") 10 0, pointer; }
.wmp-seek::-webkit-slider-thumb, .wmp-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 14px; border-radius: 2px; background: linear-gradient(to bottom, #eafff0, #7ed957); border: 1px solid #3f8f2f; }
.wmp-seek::-moz-range-thumb, .wmp-vol::-moz-range-thumb { width: 11px; height: 14px; border-radius: 2px; background: #7ed957; border: 1px solid #3f8f2f; }
.wmp-yt { margin-left: 2px; font-size: 11px; color: #1c46b3; text-decoration: none; white-space: nowrap; }
/* 窄屏：传输条收紧，别溢出 */
@media (max-width: 640px) {
  .wmp-transport { gap: 5px; padding: 8px 10px; }
  #wmp-prev, #wmp-next { display: none; }
  /* 批量播放列表模式：上一个/下一个用来切视频，别藏。 */
  .vmodal.wmp-batch #wmp-prev, .vmodal.wmp-batch #wmp-next { display: grid; }
  .wmp-vol { width: 44px; }
  .wmp-time { font-size: 10px; }
}

/* ---- 关于我铺屏窗口 ---- */
.pb-win {
  position: absolute;
  pointer-events: auto;
  animation: pbPop .2s ease backwards;
}
.pb-win img { display: block; width: 100%; height: auto; }
.pb-win img { background: #fff; }
/* 视频控制条可正常拖动（body 全局 user-select:none 豁免） */
video { user-select: auto; -webkit-user-select: auto; }
.case-media .cm:not(.cycle) img, .case-img { cursor: zoom-in; }
@keyframes pbPop { from { opacity: 0; transform: scale(.9); } }
.pb-actions {
  position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%);
  display: flex; gap: 10px;
  pointer-events: auto; z-index: 5000;
}
.pb-actions .btn-xp { box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* ---- 简历铺屏 ---- */
#resume-bomb { position: absolute; inset: 0; z-index: 96; pointer-events: none; }
.rb-body {
  background: #fff;
  padding: 12px 14px;
  font-size: 12.5px; line-height: 1.58;
}
.rb-body p { margin-bottom: 8px; }
.rb-body ul { padding-left: 16px; list-style: disc; margin-bottom: 8px; }
.rb-body li { margin-bottom: 4px; }
.rb-body li::marker { color: var(--marker); }
.rb-lead { font-size: 15px; font-weight: 600; }
.rb-dim { color: var(--dim); font-size: 12px; }

/* ---- 个人简介弹窗排版特例 ---- */
.mf { padding: 4px 4px 2px; }
.mf .rb-lead { font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--dim-2); margin-bottom: 14px; }
/* 个人简介引言 */
.mf-quote { font-size: 17px; font-weight: 600; line-height: 1.8; margin-bottom: 16px; color: #1f1d1a; }
.mf-quote mark {
  color: inherit; padding: 0 5px;
  background: linear-gradient(transparent 12%, #ffe9a0 12% 86%, transparent 86%);
}
.mf p:not(.mf-quote):not(.rb-lead) {
  font-size: 13.5px; line-height: 1.76; color: #3c3a35;
  margin-bottom: 13px;
}
.mf b { font-weight: 600; color: #1f1d1a; }
.mf .mf-close { margin-bottom: 2px; }
/* 简历弹窗：默认放开裁切（tooltip 不被窗口边缘截断）。
   带正文的文本窗（manifesto / Work 等）改为窗内滚动 + 右下角可拖拽调尺寸：
   英文内容更长，屏幕矮时窗被 max-height 封顶，不滚就读不全 */
.rb-win { overflow: visible; }
.pb-win.rb-win { display: flex; flex-direction: column; max-height: calc(100vh - 90px); }
.rb-win > img { flex: none; }
.rb-win .rb-body { overflow-y: auto; min-height: 0; }
.rb-win:has(> .rb-body) { resize: both; overflow: hidden; min-width: 260px; min-height: 150px; }

/* 照片画布 */
.rb-paint { background: #ece9d8; display: flex; flex-direction: column; padding: 6px; gap: 6px; }
.rp-canvas {
  position: relative;
  min-height: 240px;
  background: #fff; border: 1px solid #999;
  display: grid; place-items: center;
  overflow: hidden;
}
.rp-canvas img { position: relative; width: 100%; height: 100%; object-fit: cover; background: transparent; }
/* 画图窗里：像素火垫在照片后（照片透明 PNG），识别框叠最上 */
.rp-canvas .pixel-fire { position: absolute; left: 50%; bottom: -2px; width: 74%; height: auto; transform: translateX(-50%); }
.rp-ph {
  font-size: 12px; color: var(--dim-2); text-align: center; line-height: 1.8;
  border: 1px dashed #d0cabb; padding: 22px 26px;
}
/* ---- lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 9900;
  display: grid; place-items: center;
  background: rgba(0,0,0,.78);
}
.lightbox img { max-width: 88vw; max-height: 84vh; box-shadow: 0 8px 40px rgba(0,0,0,.6); background:#fff; padding: 8px; }
/* 长图（如白皮书 case study）：按宽度铺开、纵向滚动看全文 */
.lightbox.doc { display: block; overflow-y: auto; overscroll-behavior: contain; padding: 40px 0; }
.lightbox.doc img { display: block; margin: 0 auto; width: min(760px, 92vw); max-width: 92vw; max-height: none; padding: 0; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 40px; height: 40px;
  font-size: 26px; color: #fff;
  background: rgba(255,255,255,.12); border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 34px; line-height: 1; color: #fff;
  background: rgba(255,255,255,.10); border-radius: 50%;
  display: grid; place-items: center;
  transition: background .15s ease;
}
.lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-nav.prev { left: 22px; }
.lightbox-nav.next { right: 22px; }

/* ---- 项目文件夹：缩略图墙 ---- */
.proj-wall { display: flex; flex-direction: column; gap: 26px; padding: 4px 2px; }
.proj-sec-head {
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.proj-sec-head::after { content: ""; flex: 1; height: 1px; background: #e2ded3; }
.proj-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
/* 大卡分区（官网网页 / 案例详情）：每张卡占两个海报的宽度（4 列网格，每卡跨 2 列 → 一行两张），预览按 16:9 */
.proj-sec.big .proj-grid { grid-template-columns: repeat(4, 1fr); }
.proj-sec.big .proj-item { grid-column: span 2; }
.proj-sec.big .pi-thumb { aspect-ratio: 16 / 9; }
/* 纯海报分区：瀑布流，海报按原始比例展示，不裁切 */
.proj-sec.posters .proj-grid {
  display: block;
  column-width: 165px; column-gap: 14px;
}
.proj-sec.posters .proj-item {
  display: inline-block; width: 100%;
  margin: 0 0 14px; break-inside: avoid;
}
.proj-sec.posters .pi-thumb { aspect-ratio: auto; }
.proj-sec.posters .pi-thumb img { height: auto; object-fit: contain; }
/* filmstrip：统一高度限高，宽度随原始比例，一排展示（如百度 4 张） */
.proj-sec.filmstrip .proj-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.proj-sec.filmstrip .proj-item { width: auto; }
.proj-sec.filmstrip .pi-thumb { aspect-ratio: auto; height: 180px; width: auto; }
.proj-sec.filmstrip .pi-thumb img { width: auto; height: 100%; object-fit: contain; }
/* App UI 分区：套模拟手机圆角框展示截图 */
.proj-sec.phones .proj-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.pi-thumb.phone {
  aspect-ratio: 9 / 19;
  background: #14161c;
  border: 0; border-radius: 20px;
  padding: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.28), inset 0 0 0 2px #2a2d36;
  overflow: visible;
}
.pi-thumb.phone .ph-screen {
  display: block; width: 100%; height: 100%;
  border-radius: 14px; overflow: hidden;
  background: #000;
}
.pi-thumb.phone .ph-screen img { width: 100%; height: 100%; object-fit: cover; }
.pi-thumb.phone::before {  /* 顶部听筒 */
  content: ""; position: absolute; left: 50%; top: 9px; transform: translateX(-50%);
  width: 34px; height: 4px; border-radius: 3px; background: #2a2d36; z-index: 1;
}
.proj-item:hover .pi-thumb.phone { transform: translateY(-2px); }
.proj-item {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; text-decoration: none; color: var(--text);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.pi-thumb {
  position: relative; display: block;
  aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--thumb-bg); border: 1px solid #ddd8cc;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.proj-item:hover .pi-thumb { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.14); }
.pi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-item.detail .pi-thumb { aspect-ratio: 16 / 9; }
.pi-cap { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.pi-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 11px; color: #fff; padding: 2px 7px;
  background: rgba(30,30,30,.72); border-radius: 3px;
}
.proj-item.detail .pi-badge { background: var(--xp-blue); }
.pi-play {
  position: absolute; inset: 0; margin: auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 16px; color: #fff;
  background: rgba(0,0,0,.5); border-radius: 50%;
}
.proj-empty { font-size: 12px; color: var(--dim-2); padding: 8px 2px; }

/* ============ 内置浏览器 ============ */
.window[data-key="browser"] > .window-body { padding: 0; overflow: hidden; display: flex; }
/* 浏览器窗口：约 90% 屏幕、居中，内容撑满 */
.window.win-browser {
  left: 5vw; top: 3vh;
  width: 90vw; max-width: 90vw;
  height: calc(100vh - 34px - 5vh); max-height: none;
  height: calc(100dvh - 34px - 5vh);   /* iOS 动态视口 */
}
.ie { display: flex; flex-direction: column; width: 100%; height: min(72vh, 640px); background: #fff; }
.window.win-browser .ie { height: 100%; }

/* 工具栏 */
.ie-toolbar {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 8px;
  background: linear-gradient(to bottom, #f6f5ef, #e4e0d2);
  border-bottom: 1px solid var(--face-d);
}
.ie-nav {
  width: 28px; height: 26px; flex: none;
  display: grid; place-items: center;
  color: #33475f; background: transparent;
  border: 1px solid transparent; border-radius: 4px;
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.ie-nav svg { width: 17px; height: 17px; }
.ie-nav:hover:not(:disabled) { background: #fff; border-color: #b9c6d8; }
.ie-nav:disabled { opacity: .32; cursor: default; }
.ie-open { margin-left: 2px; }

.ie-addr {
  flex: 1; display: flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 8px;
  background: #fff; border: 1px solid #7f9db9; border-radius: 4px;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,.08);
}
.ie-globe { flex: none; display: grid; place-items: center; color: #5a86c5; }
.ie-globe svg { width: 14px; height: 14px; }
.ie-url { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: #1a2b3c; }

/* 书签栏 */
.ie-bookmarks {
  display: flex; gap: 4px; align-items: center;
  padding: 4px 8px; background: #eef0ea;
  border-bottom: 1px solid var(--face-d);
  overflow-x: auto; white-space: nowrap;
}
.ie-bm {
  flex: none; font-size: 12px; color: #33475f;
  padding: 3px 9px; border-radius: 4px;
  border: 1px solid transparent; background: transparent;
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.ie-bm:hover { background: #fff; border-color: #c3cedd; }

/* 载入进度条 */
.ie-load { height: 3px; overflow: hidden; }
.ie-load i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2e64d6, #6ea8ff); }
.ie-load.busy i { width: 88%; transition: width 6s cubic-bezier(.1,.6,.2,1); }
.ie-load.done i { width: 100%; opacity: 0; transition: width .2s ease, opacity .35s ease .15s; }

/* 视口 */
.ie-viewport { flex: 1; position: relative; overflow: auto; background: #fff; }
.ie-frame { width: 100%; height: 100%; border: 0; display: block; }

/* 被屏蔽站：快照兜底 */
.ie-shot { min-height: 100%; }
.ie-shot-note {
  position: sticky; top: 0; z-index: 2;
  font-size: 12.5px; color: #6b5a2e; line-height: 1.5;
  background: #fdf6dd; border-bottom: 1px solid #e8dca0;
  padding: 8px 14px;
}
.ie-shot-note a { color: #1c46b3; text-decoration: none; margin-left: 6px; }
.ie-shot-note a:hover { text-decoration: underline; }
.ie-shot img { display: block; width: 100%; }
.ie-shot-empty { padding: 44px 20px; text-align: center; color: var(--ink-2); }

/* 首页：古早 Google 风 */
.ie-google {
  min-height: 100%; padding: 8vh 24px 40px;
  display: flex; flex-direction: column; align-items: center;
  background: #fff;
}
/* 浏览器主页 logo：老 Google 的衬线体 + 六色字 + 轻浮雕 */
.ie-glogo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 8vw, 64px); font-weight: 700; letter-spacing: -1px;
  line-height: 1; margin-bottom: 26px; user-select: none;
}
.ie-glogo i { font-style: normal; text-shadow: 1px 2px 2px rgba(0, 0, 0, .18); }
/* 老搜索框 + 灰色系统按钮 */
.ie-gform { width: min(460px, 92%); display: flex; flex-direction: column; align-items: center; }
.ie-gq {
  width: 100%; height: 30px; padding: 0 10px;
  font-size: 14px; color: #1a2b3c;
  border: 1px solid #7f9db9; border-radius: 0; background: #fff;
}
.ie-gq:focus { outline: 1px solid #4a7bc8; }
.ie-gbtns { display: flex; gap: 10px; margin-top: 14px; }
.ie-gbtn {
  padding: 5px 16px; font-size: 13px; color: #222;
  background: linear-gradient(to bottom, #fdfdfb, #ece9d8);
  border: 1px solid #9a9784; border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.ie-gbtn:hover { border-color: #5a86c5; }
.ie-gbtn:active { background: #e4e1d0; box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .12); }
/* 猜你喜欢 */
.ie-sg-head { margin: 44px 0 14px; font-size: 13px; color: var(--ink-2); }
.ie-sgs { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.ie-sg {
  width: 180px; display: flex; flex-direction: column; gap: 8px;
  padding: 0; border: 0; background: transparent; text-align: left;
  cursor: url("../assets/cursors/pointer.png") 10 0, pointer;
}
.ie-sg-shot {
  height: 104px; border-radius: 8px;
  border: 1px solid var(--face-d);
  background: #eceae2 center / cover no-repeat;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ie-sg:hover .ie-sg-shot { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.ie-sg-cap { font-size: 13px; color: #1c46b3; text-decoration: underline; text-underline-offset: 2px; }

/* 窄屏：浏览器工具栏收紧，别让最右按钮被挤出去。
   放文件末尾（在 .ie-nav 基样式之后），同权重靠源序生效 */
@media (max-width: 640px) {
  .ie-toolbar { padding: 5px 6px; gap: 2px; }
  .ie-nav { width: 26px; }
  .ie-nav svg { width: 16px; height: 16px; }
}

/* 关于我铺屏：长内容在窗内滚动，避免窗口被整体上推、层层叠住（接近原版布局） */
.rb-win .rb-body { max-height: 46vh; overflow-y: auto; }
.rb-win .rb-body.tall { max-height: 62vh; }
