/* ============ 基础 & 变量 ============ */
:root {
  --font-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --accent: #0a84ff;
  --win-bg: rgba(246, 246, 248, 0.86);
  --win-bg-solid: #f6f6f8;
  --win-header: rgba(236, 236, 240, 0.8);
  --win-border: rgba(0, 0, 0, 0.12);
  --text: #1d1d1f;
  --text-sub: #6b6b70;
  --divider: rgba(0, 0, 0, 0.09);
  --shadow-win: 0 26px 70px rgba(0, 0, 0, 0.34), 0 3px 10px rgba(0, 0, 0, 0.22);
  --radius-win: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-sys);
  color: var(--text);
  background: #000;
  user-select: none;
}

.hidden { display: none !important; }

/* ============ 开机启动画面 ============ */
.boot-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 60px;
  transition: opacity 0.6s ease;
}
.boot-logo { animation: bootFade 1s cubic-bezier(0.22, 1, 0.36, 1); }
.boot-logo svg {
  display: block;
  shape-rendering: geometricPrecision;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  transform: translateZ(0);
}
@keyframes bootFade { from { opacity: 0; transform: translateZ(0) scale(0.97); } to { opacity: 1; transform: translateZ(0) scale(1); } }
.boot-progress {
  width: 180px; height: 6px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px; overflow: hidden;
}
.boot-progress-bar {
  width: 0; height: 100%;
  background: #fff; border-radius: 3px;
}

/* ============ 壁纸（真实 Ventura 壁纸，渐变作为兜底） ============ */
.login-screen, .desktop-screen {
  position: fixed; inset: 0;
  background-color: #2b1a6b;
  background-image:
    url('../assets/img/wallpaper.jpg'),
    radial-gradient(120% 120% at 20% 15%, #f7a35c 0%, transparent 42%),
    radial-gradient(120% 120% at 82% 22%, #f26d6d 0%, transparent 46%),
    radial-gradient(140% 130% at 75% 88%, #3c1e8f 0%, transparent 55%),
    linear-gradient(150deg, #2b1a6b 0%, #4a2a94 34%, #8a3d9e 62%, #d15b7d 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============ 登录界面 ============ */
.login-screen {
  z-index: 900;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 90px 0 120px;
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.login-clock { text-align: center; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.login-date { font-size: 22px; font-weight: 500; letter-spacing: 0.5px; opacity: 0.95; }
.login-time { font-size: 96px; font-weight: 600; line-height: 1.05; letter-spacing: -1px; }
.login-user { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.35);
  overflow: hidden;
}
.login-avatar img { width: 100%; height: 100%; object-fit: cover; }
.login-name { color: #fff; font-size: 20px; font-weight: 500; text-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.login-form { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.login-password {
  width: 200px; height: 34px;
  border-radius: 17px; border: none; outline: none;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: #fff; text-align: center; font-size: 15px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.3);
}
.login-password::placeholder { color: rgba(255,255,255,0.75); }
.login-password.shake { animation: shake 0.42s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}
.login-enter {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.9);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.login-enter:hover {
  background: rgba(255,255,255,0.9); color: #333;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
}
.login-enter:active { transform: scale(0.92); }
.login-hint { color: rgba(255,255,255,0.85); font-size: 13px; margin-top: 6px; text-shadow: 0 1px 6px rgba(0,0,0,0.3); }

/* ============ 桌面 ============ */
.desktop-screen { z-index: 10; }

/* 顶部菜单栏 */
.menu-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 26px; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%);
  color: #fff; font-size: 13px;
  text-shadow: 0 0 3px rgba(0,0,0,0.15);
}
.menu-left, .menu-right { display: flex; align-items: center; gap: 5px; height: 100%; }
.menu-item { padding: 2px 8px; border-radius: 5px; cursor: default; line-height: 1; }
.menu-apple svg { display: block; margin-top: -1px; }
.menu-app-name { font-weight: 600; }
.menu-status {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 6px; border-radius: 5px; cursor: default; color: #fff;
}
.menu-ime { font-size: 13px; font-weight: 500; }
.menu-clock { padding: 2px 6px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 桌面图标区 */
.desktop-icons {
  position: absolute; top: 26px; right: 0; bottom: 96px; left: 0;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-end; align-items: center;
  padding: 14px 10px;
  gap: 6px;
}
.desk-icon {
  width: 92px; padding: 8px 6px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border-radius: 8px; cursor: pointer; text-align: center;
}
.desk-icon:hover { background: rgba(255,255,255,0.14); }
.desk-icon.selected { background: rgba(10,132,255,0.35); }
.desk-icon .ic { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.desk-icon .ic img { width: 100%; height: 100%; object-fit: contain; }
.desk-icon .lbl {
  color: #fff; font-size: 12.5px; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  word-break: break-all; max-width: 100%;
  padding: 1px 4px; border-radius: 4px;
}
.desk-icon.selected .lbl { background: var(--accent); }

/* ============ 程序坞 ============ */
.dock-wrap {
  position: fixed; left: 0; right: 0; bottom: 6px; z-index: 480;
  display: flex; justify-content: center; pointer-events: none;
}
.dock {
  pointer-events: auto;
  display: flex; align-items: flex-end; gap: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
}
.dock-item {
  /* --dock-slot 为图标槽位尺寸，各断点只覆盖它，所有图标随之等比统一 */
  --dock-slot: 54px;
  /* 用 aspect-ratio 保证窄屏被 flex 压缩时仍是正方形，不会变成高矮不一的竖长条 */
  position: relative; width: var(--dock-slot); height: auto; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom center;
  will-change: transform;
}
/* 磁性放大跟随期间关闭过渡，让缩放实时跟手；离开后恢复过渡平滑归位 */
.dock.magnifying .dock-item { transition: none; }
/* PNG 图标已归一化为「主体占画布 88% 且居中」，直接铺满槽位即等大等高 */
.dock-item .dock-ic { width: 100%; height: 100%; display: block; }
.dock-item img.dock-ic { object-fit: contain; }
/* 满铺方块图标（拖延症 JPG + MBTI SVG）无透明留白，缩到 88% 与归一化后的 PNG 主体等大 */
.dock-item img.dock-ic[src$=".jpg"],
.dock-item svg.dock-ic {
  width: 88%; height: 88%;
  border-radius: calc(var(--dock-slot) * 0.22);
}
.dock-item .dock-tip {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: rgba(50,50,52,0.55); color: rgba(255,255,255,0.95); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.2px;
  padding: 2.5px 8px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  border: 1px solid rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.dock-item:hover .dock-tip { opacity: 1; }
.dock-item .dock-dot {
  position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.9); opacity: 0;
}
.dock-item.running .dock-dot { opacity: 1; }
.dock-sep { flex: 0 0 auto; width: 1px; height: 44px; background: rgba(255,255,255,0.35); margin: 0 2px; align-self: center; }

/* ============ 窗口系统 ============ */
.window-layer { position: absolute; inset: 0; pointer-events: none; z-index: 100; }
.window {
  position: absolute; pointer-events: auto;
  min-width: 260px; min-height: 160px;
  background: var(--win-bg);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--win-border);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: center;
}
.window.opening { animation: winOpen 0.26s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes winOpen { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.window.closing { animation: winClose 0.2s ease forwards; }
@keyframes winClose { to { opacity: 0; transform: scale(0.9); } }
.window.minimizing {
  animation: genieMin 0.5s cubic-bezier(0.4, 0.05, 0.25, 1) forwards;
  pointer-events: none;
}
@keyframes genieMin {
  0%   { transform: translate(0, 0) scale(1, 1);            opacity: 1; }
  25%  { transform: translate(calc(var(--gx) * 0.18), calc(var(--gy) * 0.10)) scale(0.9, 0.82);  opacity: 1; }
  60%  { transform: translate(calc(var(--gx) * 0.62), calc(var(--gy) * 0.55)) scale(0.45, 0.26); opacity: 0.92; }
  100% { transform: translate(var(--gx), var(--gy)) scale(0.06, 0.015);       opacity: 0; }
}
.window.genie-restore {
  animation: genieRestore 0.46s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes genieRestore {
  0%   { transform: translate(var(--gx), var(--gy)) scale(0.06, 0.015);       opacity: 0; }
  40%  { transform: translate(calc(var(--gx) * 0.62), calc(var(--gy) * 0.55)) scale(0.45, 0.26); opacity: 0.92; }
  75%  { transform: translate(calc(var(--gx) * 0.18), calc(var(--gy) * 0.10)) scale(0.9, 0.82);  opacity: 1; }
  100% { transform: translate(0, 0) scale(1, 1);            opacity: 1; }
}
.window.unfocused { box-shadow: 0 16px 44px rgba(0,0,0,0.24); }
.window.unfocused .win-header { opacity: 0.72; }
/* 关于我：散落窗口的轻微旋转平滑过渡；hover 时回正便于阅读 */
.window.about-win { transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.window.about-win:hover { transform: rotate(0deg) !important; }
/* MBTI：深色背景消除白边，内容容器铺满窗口 body */
.window.mbti-win { background: #0d0221; border-color: rgba(255,0,128,0.15); }
.window.mbti-win .win-body { display: flex; flex-direction: column; overflow: hidden; }
.window.mbti-win .win-body > * { flex: 1 1 auto; min-height: 0; }

.win-header {
  height: 38px; flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0 12px; gap: 8px;
  background: var(--win-header);
  border-bottom: 1px solid var(--divider);
  cursor: grab;
}
.win-header:active { cursor: grabbing; }
.traffic { display: flex; gap: 8px; align-items: center; }
.tl { width: 12px; height: 12px; border-radius: 50%; border: none; cursor: pointer; position: relative; padding: 0; }
.tl svg { position: absolute; inset: 0; margin: auto; opacity: 0; }
.traffic:hover .tl svg { opacity: 1; }
.tl.close { background: #ff5f57; }
.tl.min { background: #febc2e; }
.tl.max { background: #28c840; }
.tl.disabled { background: #c8c8cd; cursor: default; }
.win-title {
  flex: 1; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-right: 52px;
}
.win-body { flex: 1; overflow: auto; position: relative; }

/* 一键关闭所有窗口 */
.close-all-btn {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 104px; z-index: 470;
  padding: 8px 18px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.4);
  background: rgba(40,40,42,0.7); color: #fff; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.close-all-btn:hover { background: rgba(40,40,42,0.9); }

/* ============ 右上角通知 ============ */
.notif-layer {
  position: fixed; top: 34px; right: 14px; z-index: 600;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.notif {
  width: 320px; padding: 12px 14px; border-radius: 16px;
  background: rgba(245,245,247,0.72); color: #1c1c1e;
  border: 0.5px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  display: flex; align-items: flex-start; gap: 11px;
  pointer-events: auto; cursor: grab;
  touch-action: pan-y;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.42s cubic-bezier(0.22,1,0.36,1), opacity 0.42s ease;
}
.notif.dragging { cursor: grabbing; user-select: none; }
.notif.show { transform: translateX(0); opacity: 1; }
.notif.hide { transform: translateX(120%); opacity: 0; }
.notif-icon {
  flex: none; width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  background: linear-gradient(160deg, #4a4a52, #1c1c22);
}
.notif-body { flex: 1; min-width: 0; padding-top: 1px; }
.notif-title { font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.notif-text { font-size: 12.5px; line-height: 1.4; color: #48484a; word-break: break-word; }
.notif-close {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  background: rgba(120,120,128,0.28); color: #1c1c1e;
  font-size: 12px; line-height: 18px; text-align: center;
  opacity: 0; transition: opacity 0.15s;
}
.notif:hover .notif-close { opacity: 1; }
.notif-close:hover { background: rgba(120,120,128,0.5); }

/* ============ 通用窗口内容 ============ */
.pad { padding: 18px 20px; }
.win-text { font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.win-link { color: #ff2d55; text-decoration: none; border-bottom: 1px solid rgba(255,45,85,.4); }
.win-link:hover { border-bottom-color: #ff2d55; }
.win-h { font-size: 17px; font-weight: 700; margin-bottom: 10px; }

/* 个人进程 */
.proc-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.proc-list th { text-align: left; color: var(--text-sub); font-weight: 500; padding: 6px 10px; border-bottom: 1px solid var(--divider); font-size: 12px; }
.proc-list td { padding: 8px 10px; border-bottom: 1px solid var(--divider); }
.proc-list tr { cursor: pointer; }
.proc-list tr.sel { background: rgba(10,132,255,0.16); }
.proc-list .cpu { text-align: right; font-variant-numeric: tabular-nums; }
.proc-list .unresp td:first-child { color: #d9534f; }
.proc-footer { padding: 10px 14px; border-top: 1px solid var(--divider); text-align: right; }
.btn {
  padding: 5px 14px; border-radius: 7px; border: 1px solid var(--win-border);
  background: #fff; font-size: 13px; cursor: pointer; color: var(--text);
}
.btn:hover { background: #f0f0f2; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn-primary:hover { background: #0070e0; }

/* 教育窗口图片 */
.edu-img {
  width: 100%; max-height: 240px; object-fit: cover; border-radius: 8px;
  margin-bottom: 12px; background: #d9d9de; display: block;
}
.img-placeholder {
  width: 100%; height: 180px; border-radius: 8px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #e6e6ea, #e6e6ea 12px, #dcdce2 12px, #dcdce2 24px);
  color: var(--text-sub); font-size: 13px;
}

/* ============ 备忘录 ============ */
.notes-app { display: flex; height: 100%; background: #fff; }
.notes-side {
  width: 210px; flex-shrink: 0; background: #f5f4f2;
  border-right: 1px solid var(--divider); overflow: auto; padding: 8px;
}
.notes-side-title { font-size: 12px; color: var(--text-sub); padding: 6px 10px; font-weight: 600; }
.note-item { padding: 9px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 3px; }
.note-item .n-t { font-size: 14px; font-weight: 600; color: var(--text); }
.note-item .n-p { font-size: 12px; color: var(--text-sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item.active { background: #ffdf7e; }
.note-item.active .n-p { color: #7a6a3a; }
.notes-main { flex: 1; overflow: auto; padding: 26px 34px; }
.notes-main h5 { font-size: 20px; margin-bottom: 12px; }
.notes-main h6 { font-size: 15px; margin: 14px 0 6px; }
.notes-main p { font-size: 14px; line-height: 1.7; margin: 6px 0; }
.note-todo { list-style: none; margin: 6px 0; }
.note-todo li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.note-todo .box { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #c4c4c9; flex-shrink: 0; }
.note-todo .done .box, .note-todo li.done .box { background: #ffb400; border-color: #ffb400; position: relative; }
.note-todo li.done { color: var(--text-sub); }
.note-todo li.done .box::after { content: "✓"; color: #fff; font-size: 12px; position: absolute; inset: 0; text-align: center; line-height: 18px; }

/* ============ 谷歌浏览器（深色新标签页） ============ */
.chrome-app { display: flex; flex-direction: column; height: 100%; background: #202124; }
.chrome-tabbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px 0;
  background: #35363a; height: 40px;
}
.chrome-tab {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: #202124; border-radius: 9px 9px 0 0; font-size: 12.5px;
  max-width: 200px; color: #e8eaed; white-space: nowrap;
}
.chrome-tab .fav { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.chrome-newtab { color: #9aa0a6; font-size: 18px; padding: 0 8px; cursor: default; }
.chrome-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #35363a;
}
.chrome-nav { display: flex; gap: 6px; color: #c8cace; }
.chrome-nav span { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.chrome-omni {
  flex: 1; height: 32px; border-radius: 16px; background: #202124;
  display: flex; align-items: center; padding: 0 14px; font-size: 13px; color: #bdc1c6; gap: 8px;
}
/* 书签栏 */
.chrome-marks {
  display: flex; align-items: center; gap: 4px; padding: 5px 12px;
  background: #35363a; border-bottom: 1px solid #2a2b2e; overflow-x: auto;
}
.chrome-mark {
  display: flex; align-items: center; gap: 7px; padding: 5px 9px;
  border-radius: 7px; font-size: 12.5px; color: #e8eaed; white-space: nowrap; cursor: pointer;
}
.chrome-mark:hover { background: rgba(255,255,255,0.08); }
.chrome-mark .bm-ico {
  width: 16px; height: 14px; flex-shrink: 0; border-radius: 2px 2px 0 0;
  background: #8ab4f8;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
/* 用简单文件夹形状表现书签图标 */
.chrome-mark .bm-ico { position: relative; background: none; }
.chrome-mark .bm-ico::before {
  content: ''; position: absolute; inset: 1px 0 0; border-radius: 2px;
  background: #8ab4f8;
}
.chrome-mark .bm-ico::after {
  content: ''; position: absolute; left: 0; top: 0; width: 7px; height: 3px;
  border-radius: 2px 2px 0 0; background: #8ab4f8;
}
/* 原生 Google 新标签页 */
.chrome-home {
  flex: 1; overflow: auto; background: #202124;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 130px; gap: 30px;
}
.g-logo { font-family: 'Product Sans', Arial, sans-serif; font-size: 88px; font-weight: 500; letter-spacing: -2px; line-height: 1; }
.g-search {
  width: 560px; max-width: 78%; height: 48px; border-radius: 24px;
  background: #303134; border: 1px solid #5f6368;
  display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px;
}
.g-search .g-plus { color: #9aa0a6; font-size: 20px; }
.g-search .g-ph { flex: 1; color: #9aa0a6; font-size: 15px; }
.g-search .g-icons { display: flex; align-items: center; gap: 12px; }
.g-search .g-mic, .g-search .g-lens { font-size: 15px; }
.g-search .g-ai {
  font-size: 13px; color: #e8eaed; background: #3c4043;
  padding: 5px 12px; border-radius: 16px;
}
.g-shortcut { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: default; }
.g-shortcut-add {
  width: 48px; height: 48px; border-radius: 50%; background: #303134;
  display: flex; align-items: center; justify-content: center;
  color: #c8cace; font-size: 24px;
}
.g-shortcut-label { font-size: 12px; color: #e8eaed; }

/* 小红书图窗 */
.xhs-win { width: 100%; height: 100%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.xhs-img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ============ 留言簿 ============ */
.gb-app { display: flex; height: 100%; background: #fff; }
.gb-left {
  width: 42%; flex-shrink: 0;
  background: linear-gradient(160deg, #ffd9a0, #ff9db0 60%, #b98cff);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.gb-left img { width: 100%; height: 100%; object-fit: cover; }
.gb-left .ph { color: #fff; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,0.2); text-align:center; padding: 20px; }
.gb-right { flex: 1; padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.gb-title { font-size: 20px; font-weight: 700; }
.gb-field label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 5px; }
.gb-field textarea, .gb-field input {
  width: 100%; border: 1px solid #d8d8dd; border-radius: 9px; padding: 10px 12px;
  font-size: 14px; font-family: var(--font-sys); outline: none; resize: none; color: var(--text);
}
.gb-field textarea:focus, .gb-field input:focus { border-color: var(--accent); }
.gb-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: auto; }

/* ============ 微信 ============ */
.wechat-app {
  height: 100%; background: #f2f2f2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; padding: 30px;
}
.wechat-logo { display: flex; align-items: center; gap: 8px; color: #07c160; font-weight: 600; font-size: 15px; }
.wechat-qr {
  width: 200px; height: 200px; border-radius: 10px; background: #fff;
  border: 1px solid #e5e5e5; display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.wechat-qr img { width: 100%; height: 100%; object-fit: contain; }
.wechat-qr .ph { color: #999; font-size: 13px; text-align: center; padding: 16px; }
.wechat-tip { color: #07c160; font-size: 15px; font-weight: 500; }
.wechat-sub { color: #b0b0b0; font-size: 12px; }

/* ============ 废纸篓 ============ */
.trash-app { height: 100%; background: #fff; display: flex; flex-direction: column; }
.trash-head { padding: 14px 20px; border-bottom: 1px solid var(--divider); display: flex; align-items: center; justify-content: space-between; }
.trash-head .t { font-size: 16px; font-weight: 700; }
.trash-head .c { font-size: 12px; color: var(--text-sub); }
.trash-list { flex: 1; overflow: auto; padding: 4px 0; }
.trash-list-head {
  display: flex; align-items: center; padding: 5px 16px; gap: 10px;
  font-size: 11.5px; color: var(--text-sub); border-bottom: 1px solid var(--divider);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.trash-list-head .fn { flex: 1; padding-left: 26px; }
.trash-list-head .fd { width: 148px; flex-shrink: 0; }
.trash-list-head .fs { width: 70px; flex-shrink: 0; text-align: right; }
.trash-list-head .fk { width: 140px; flex-shrink: 0; }
.trash-row { display: flex; align-items: center; gap: 10px; padding: 3px 16px; cursor: pointer; font-size: 13px; }
.trash-row:hover { background: #f2f2f5; }
.trash-row.sel { background: rgba(10,132,255,0.14); }
.trash-row .fic { width: 17px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.trash-row .fic svg { width: 17px; height: auto; max-height: 20px; }
.trash-row .fn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-row .fd { width: 148px; flex-shrink: 0; color: var(--text-sub); font-size: 12px; }
.trash-row .fs { width: 70px; flex-shrink: 0; color: var(--text-sub); font-size: 12px; text-align: right; }
.trash-row .fk { width: 140px; flex-shrink: 0; color: var(--text-sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 报错弹窗 ============ */
.alert-mask { position: fixed; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.18); }
.alert-box {
  width: 300px; background: var(--win-bg-solid); border-radius: 14px;
  box-shadow: var(--shadow-win); padding: 22px 20px 16px; text-align: center;
  animation: winOpen 0.2s ease;
}
.alert-icon { font-size: 34px; margin-bottom: 10px; }
.alert-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.alert-msg { font-size: 13px; color: var(--text-sub); line-height: 1.5; margin-bottom: 16px; }
.alert-box .btn-primary { width: 100%; padding: 7px; }

/* ============ 文件夹窗口（列表视图） ============ */
.finder-app { height: 100%; background: #fff; display: flex; flex-direction: column; }
.finder-list { flex: 1; overflow: auto; padding: 4px 0; }
.finder-list-head {
  display: flex; align-items: center; padding: 5px 16px; gap: 10px;
  font-size: 11.5px; color: var(--text-sub); border-bottom: 1px solid var(--divider);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.finder-list-head .fn { flex: 1; padding-left: 26px; }
.finder-list-head .fd { width: 148px; flex-shrink: 0; }
.finder-list-head .fs { width: 70px; flex-shrink: 0; text-align: right; }
.finder-list-head .fk { width: 140px; flex-shrink: 0; }
.finder-row {
  display: flex; align-items: center; gap: 10px; padding: 3px 16px;
  cursor: default; font-size: 13px; color: var(--text);
}
.finder-row:hover { background: #f0f0f3; }
.finder-row.openable { cursor: pointer; }
.finder-row.openable:hover { background: #e6eefb; }
.finder-row .fic { width: 17px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.finder-row .fic svg { width: 17px; height: auto; max-height: 20px; }
.finder-row .fn { flex: 1; word-break: break-all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-row .fd { width: 148px; flex-shrink: 0; color: var(--text-sub); font-size: 12px; }
.finder-row .fs { width: 70px; flex-shrink: 0; color: var(--text-sub); font-size: 12px; text-align: right; }
.finder-row .fk { width: 140px; flex-shrink: 0; color: var(--text-sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 14px; }

/* ============ 访达（带侧边栏） ============ */
.finder-win { height: 100%; display: flex; background: #fff; }
.finder-win.col { flex-direction: column; }
.finder-body { flex: 1; display: flex; min-height: 0; }

/* 访达/文件夹/废纸篓 顶部工具栏 */
.finder-toolbar {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 12px;
  background: rgba(246,246,248,0.92); border-bottom: 1px solid var(--divider);
}
.finder-toolbar .ftb-nav { display: flex; gap: 2px; }
.finder-toolbar .ftb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 26px; padding: 0; border: 0; background: transparent;
  border-radius: 6px; color: #6b6b70; cursor: default;
}
.finder-toolbar .ftb-btn:hover { background: rgba(0,0,0,0.06); }
.finder-toolbar .ftb-btn.sel { background: rgba(0,0,0,0.1); color: #333; }
.finder-toolbar .ftb-loc { font-size: 15px; font-weight: 600; color: var(--text); margin-left: 6px; white-space: nowrap; }
.finder-toolbar .ftb-spring { flex: 1; }
.finder-toolbar .ftb-views { display: flex; gap: 1px; background: rgba(0,0,0,0.05); border-radius: 7px; padding: 1px; }
.finder-toolbar .ftb-views .ftb-btn { width: 30px; height: 24px; border-radius: 6px; }
.finder-toolbar .ftb-group { display: inline-flex; align-items: center; }
.finder-toolbar .ftb-chev { display: inline-flex; align-items: center; color: #a2a2a8; margin-left: -6px; }

/* 访达类窗口：把交通灯与工具栏合并到顶部同一行（贴合真实访达） */
.window.finder-window .win-header {
  position: absolute; top: 0; left: 0; right: 0; height: 40px;
  background: transparent; border-bottom: none; padding: 0 16px; z-index: 6;
}
.window.finder-window .win-title { display: none; }
.window.finder-window .finder-toolbar { padding-left: 84px; }

.finder-side {
  width: 180px; flex-shrink: 0; padding: 10px 8px; overflow: auto;
  background: rgba(245,245,248,0.92); border-right: 1px solid var(--divider);
}
.finder-side-title { font-size: 11px; font-weight: 600; color: var(--text-sub); padding: 10px 10px 6px; }
.finder-side-title:first-child { padding-top: 4px; }
.finder-tab {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 1px 0;
  border-radius: 6px; font-size: 13.5px; color: var(--text); cursor: pointer;
}
.finder-tab:hover { background: rgba(0,0,0,0.05); }
.finder-tab.sel { background: rgba(0,0,0,0.09); }
.finder-tab-ic { display: flex; align-items: center; color: #3b82f6; }
.finder-main { flex: 1; overflow: auto; display: flex; flex-direction: column; min-width: 0; }
.finder-main .finder-list { flex: 1; }
.finder-appgrid {
  flex: 1; display: grid; grid-template-columns: repeat(auto-fill, 92px);
  gap: 14px 10px; padding: 22px; align-content: start; justify-content: start;
}
.finder-appcell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 10px; cursor: pointer;
}
.finder-appcell:hover { background: rgba(0,0,0,0.05); }
.finder-appcell .fac-ic { width: 52px; height: 52px; }
.finder-appcell .fac-ic img,
.finder-appcell .fac-ic svg { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; display: block; }
.finder-appcell .fac-lbl { font-size: 12px; color: var(--text); text-align: center; word-break: break-all; }

/* 访达图片画廊 */
.finder-photos {
  flex: 1; display: grid; grid-template-columns: repeat(auto-fill, 110px);
  gap: 12px; padding: 18px; align-content: start; justify-content: start; overflow: auto;
}
.finder-photo {
  width: 110px; height: 110px; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: #f0f0f0; box-shadow: 0 1px 4px rgba(0,0,0,0.12); transition: transform .15s ease;
}
.finder-photo:hover { transform: scale(1.02); }
.finder-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ 启动台 Launchpad ============ */
.launchpad-mask {
  position: absolute; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 40px;
  background: rgba(30,30,34,0.28);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  opacity: 0; transition: opacity 0.24s ease;
}
.launchpad-mask.show { opacity: 1; }
.launchpad-mask.hide { opacity: 0; }
.launchpad-grid {
  display: grid; grid-template-columns: repeat(auto-fit, 130px);
  gap: 34px 24px; max-width: 900px; justify-content: center;
  transform: scale(0.82); opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), opacity 0.28s ease;
}
.launchpad-mask.show .launchpad-grid { transform: scale(1); opacity: 1; }
.launchpad-mask.hide .launchpad-grid { transform: scale(1.12); opacity: 0; }
.launchpad-item {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  cursor: pointer; user-select: none;
}
.launchpad-item .lp-ic { width: 84px; height: 84px; transition: transform 0.15s ease; }
.launchpad-item .lp-ic img,
.launchpad-item .lp-ic svg { width: 84px; height: 84px; border-radius: 19px; object-fit: contain; display: block; box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.launchpad-item:hover .lp-ic { transform: scale(1.06); }
.launchpad-item .lp-lbl { font-size: 13px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); text-align: center; }

/* markdown 简易渲染 */
.md-view { padding: 24px 30px; font-size: 14px; line-height: 1.75; color: var(--text); }
.md-view h1 { font-size: 22px; margin: 4px 0 14px; }
.md-view h2 { font-size: 17px; margin: 18px 0 8px; }
.md-view h3 { font-size: 15px; margin: 14px 0 6px; color: var(--text-sub); }
.md-view blockquote { border-left: 3px solid #d0d0d5; padding-left: 12px; color: var(--text-sub); margin: 10px 0; }
.md-view ul, .md-view ol { padding-left: 22px; margin: 6px 0; }
.md-view li { margin: 3px 0; }
.md-view p { margin: 8px 0; }
.md-view hr { border: 0; border-top: 1px solid #e6e6ea; margin: 18px 0; }
.md-view table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.md-view th, .md-view td { border: 1px solid #e2e2e7; padding: 6px 10px; text-align: left; vertical-align: top; }
.md-view th { background: #f6f6f8; font-weight: 600; }

/* ============ MBTI 赌局 — 赌场霓虹风格 ============ */
.mbti-game {
  height: 100%; min-height: 300px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  background: linear-gradient(160deg, #0d0221 0%, #1a0533 40%, #0d0221 100%);
  padding: 18px 20px 12px; gap: 10px; overflow: hidden;
  position: relative; box-sizing: border-box;
}
.mbti-game::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,0,128,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.mbti-header {
  width: 100%; display: flex; justify-content: center;
}
.mbti-coins {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.4);
  border-radius: 20px; padding: 6px 18px;
  box-shadow: 0 0 12px rgba(255,215,0,0.2), inset 0 0 8px rgba(255,215,0,0.05);
}
.mbti-coin-icon {
  font-size: 20px; color: #ffd700;
  text-shadow: 0 0 8px #ffd700;
}
.mbti-coin-val {
  font-size: 22px; font-weight: 700; color: #ffd700;
  font-family: 'SF Mono', 'Menlo', monospace;
  text-shadow: 0 0 10px rgba(255,215,0,0.6);
}
.mbti-round-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 3px;
  color: rgba(255,255,255,0.5); margin-top: 8px;
}
.mbti-dim-label {
  font-size: 18px; font-weight: 600; color: #fff;
  text-shadow: 0 0 20px rgba(255,0,128,0.5);
}
.mbti-slots {
  display: flex; gap: 10px; margin: 12px 0;
}
.mbti-slot {
  width: 44px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: rgba(255,255,255,0.3);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  font-family: 'SF Mono', 'Menlo', monospace;
  transition: all 0.3s ease;
}
.mbti-slot.filled {
  color: #00ff88; border-color: rgba(0,255,136,0.4);
  background: rgba(0,255,136,0.06);
  box-shadow: 0 0 10px rgba(0,255,136,0.2);
}
.mbti-slot.active {
  border-color: #ff0080; color: #ff0080;
  box-shadow: 0 0 15px rgba(255,0,128,0.4);
  animation: slotPulse 1.2s ease infinite;
}
@keyframes slotPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255,0,128,0.4); }
  50% { box-shadow: 0 0 25px rgba(255,0,128,0.7); }
}
.mbti-btns {
  display: flex; gap: 16px; margin-top: 12px;
}
.mbti-bet-btn {
  padding: 14px 28px; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #ff0080, #7928ca);
  box-shadow: 0 4px 20px rgba(255,0,128,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-sys);
}
.mbti-bet-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 28px rgba(255,0,128,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.mbti-bet-btn:active { transform: scale(0.96); }

/* 揭晓动画 */
.mbti-reveal {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; height: 100%;
  /* 移动端窗口高度为 auto，height:100% 会退化成内容高度导致提示贴顶；
     用 flex 伸展吃掉剩余空间，保证胜/负提示在窗口内垂直居中 */
  flex: 1 1 auto; align-self: stretch; min-height: 0;
  animation: revealPop 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes revealPop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mbti-reveal-icon { font-size: 56px; }
.mbti-reveal.win .mbti-reveal-icon { color: #00ff88; text-shadow: 0 0 30px rgba(0,255,136,0.6); }
.mbti-reveal.lose .mbti-reveal-icon { color: #ff3b5c; text-shadow: 0 0 30px rgba(255,59,92,0.6); }
.mbti-reveal-text {
  font-size: 28px; font-weight: 700; font-family: 'SF Mono', monospace;
}
.mbti-reveal.win .mbti-reveal-text { color: #00ff88; }
.mbti-reveal.lose .mbti-reveal-text { color: #ff3b5c; }
.mbti-reveal-answer {
  font-size: 14px; color: rgba(255,255,255,0.5);
}

/* 结果页 */
.mbti-result-title {
  font-size: 14px; letter-spacing: 4px; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-top: 4px;
}
.mbti-final-answer {
  font-size: 36px; font-weight: 800; letter-spacing: 8px;
  color: #fff; text-shadow: 0 0 20px rgba(255,0,128,0.5), 0 0 40px rgba(121,40,202,0.3);
  font-family: 'SF Mono', monospace;
}
.mbti-comparison {
  display: flex; gap: 8px; margin: 8px 0;
}
.mbti-cmp-item {
  width: 38px; height: 38px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; font-family: 'SF Mono', monospace;
}
.mbti-cmp-item.correct {
  background: rgba(0,255,136,0.15); color: #00ff88;
  border: 1px solid rgba(0,255,136,0.4);
}
.mbti-cmp-item.wrong {
  background: rgba(255,59,92,0.15); color: #ff3b5c;
  border: 1px solid rgba(255,59,92,0.4);
}
.mbti-msg {
  font-size: 16px; color: rgba(255,255,255,0.8); margin: 8px 0;
  text-align: center;
}
.mbti-restart-btn {
  padding: 10px 24px; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; background: rgba(255,255,255,0.05);
  color: #fff; font-size: 14px; cursor: pointer;
  transition: all 0.2s ease; font-family: var(--font-sys);
}
.mbti-restart-btn:hover {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4);
  box-shadow: 0 0 12px rgba(255,255,255,0.1);
}
.mbti-confetti {
  position: absolute; top: -10px;
  font-size: 20px; color: #ffd700;
  text-shadow: 0 0 8px #ffd700;
  animation: confettiFall linear forwards;
  pointer-events: none;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(350px) rotate(720deg) scale(0.4); }
}

.mobile-note { display: none; }
@media (max-width: 1023px) {
  /* 顶部栏：菜单项全部保留，改为横向可滑动/可拖动，滑到右侧看状态图标与时钟 */
  .menu-bar {
    padding: 0 8px;
    justify-content: flex-start;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
  }
  .menu-bar::-webkit-scrollbar { display: none; }
  .menu-left, .menu-right { gap: 3px; flex: 0 0 auto; }
  .menu-right { margin-left: auto; padding-left: 10px; }
  .menu-item, .menu-status, .menu-clock, .menu-app-name { white-space: nowrap; }
  .menu-bar.dragging { cursor: grabbing; }

  /* 桌面图标：给底部 dock 留足空间，图标缩小防止溢出 */
  .desktop-icons { top: 30px; bottom: 108px; }
  .desk-icon { width: 84px; }
  .desk-icon .ic { width: 46px; height: 46px; }
  /* 名称一行至少容纳 4 个汉字，避免逐字竖排 */
  .desk-icon .lbl { font-size: 12px; min-width: calc(4em + 8px); box-sizing: border-box; }

  /* Dock：整体等比缩小，槽位由 --dock-slot 统一控制，图标随之等大等高 */
  .dock {
    max-width: 96vw; overflow-x: auto; gap: 4px; padding: 5px 7px; border-radius: 17px;
    scrollbar-width: none;
  }
  .dock::-webkit-scrollbar { display: none; }
  .dock-item { --dock-slot: 46px; }
  .dock-sep { height: 38px; }

  /* 窗口：占满可用宽度，内部滚动，绝不溢出屏幕（关于我 / 小红书图窗除外，保持散落堆叠且可拖动） */
  /* top 交由 JS 计算以实现设备屏幕垂直居中 */
  .window:not(.about-win):not(.xhs-window) {
    left: 3vw !important; right: 3vw;
    width: 94vw !important; height: auto !important;
    max-height: calc(100dvh - 130px);
  }
  /* 关于我 / 小红书图窗：保留 JS 计算的散落位置，但兜底一层最大高度，避免超屏 */
  .window.about-win, .window.xhs-window {
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 130px);
  }
  .window.about-win .win-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .win-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .win-header { height: 44px; }

  /* 具体 app 的内部布局改为纵向排布，避免左右挤压 */
  .gb-app { flex-direction: column; }
  /* 留言簿：顶部照片做成整齐的封面横幅，铺满不留白；下方表单占主要空间 */
  .window.gb-window { width: 84vw !important; left: 8vw !important; }
  .gb-left {
    width: 100%; height: 132px; flex: 0 0 132px;
    padding: 0; overflow: hidden;
  }
  .gb-left img {
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; max-height: none !important;
    object-fit: cover !important; object-position: center 30%;
    display: block;
  }
  .gb-right { flex: 1; padding: 18px 20px 20px; gap: 12px; }
  .gb-title { font-size: 17px; }
  .gb-field label { margin-bottom: 3px; }
  .gb-field textarea, .gb-field input { padding: 8px 10px; font-size: 13px; }
  .gb-field textarea { min-height: 72px; }
  .notes-side { width: 130px; }
  /* 备忘录：移动端固定高度约屏幕 1/2 并垂直居中，切换左侧笔记时高度不变 */
  .window.notes-window:not(.about-win) { height: 50dvh !important; max-height: calc(100dvh - 130px); }
  /* 微信：左右收窄，更精致 */
  .window.wechat-window:not(.about-win) { width: 76vw !important; left: 12vw !important; }
  /* MBTI：窗口高度随内容自适应，消除底部留白 */
  .window.mbti-win { height: auto !important; max-height: calc(100dvh - 130px); }
  .window.mbti-win .mbti-game { height: auto; min-height: 0; justify-content: center; }
  /* 文件夹（访达）左侧边栏收窄，给内容让出空间 */
  .finder-side { width: 116px; padding: 8px 5px; }
  .finder-tab { padding: 6px 7px; font-size: 12.5px; gap: 6px; }
  /* 隐藏“修改日期/种类”列——它们的固定宽度会撑出横向滚动，导致右滑露出灰色空白 */
  .finder-list-head .fd, .finder-row .fd,
  .finder-list-head .fk, .finder-row .fk { display: none; }
  .finder-list-head .fs, .finder-row .fs { width: 58px; }
  /* 彻底禁止横向滚动，消除右侧灰边 */
  .finder-main, .finder-list, .finder-win, .finder-body, .finder-app { overflow-x: hidden; }
  .finder-list-head, .finder-row { padding-left: 12px; padding-right: 12px; }

  /* 废纸篓：同访达处理。固定宽度的“修改日期/种类”列会把名称列挤到近 0 宽，导致“名称”逐字竖排 */
  .trash-list-head .fd, .trash-row .fd,
  .trash-list-head .fk, .trash-row .fk { display: none; }
  .trash-list-head .fs, .trash-row .fs { width: 58px; }
  .trash-list-head .fn { white-space: nowrap; }
  .trash-app, .trash-list { overflow-x: hidden; }
  .trash-list-head, .trash-row { padding-left: 12px; padding-right: 12px; }
  .trash-head { padding: 12px 14px; }

  /* 一键关闭所有窗口：移动端下移贴近 dock，减少占用中部空间 */
  .close-all-btn { bottom: 68px; padding: 6px 14px; font-size: 12px; }

  /* 启动台：改用网格（九宫格）铺满屏幕，图标缩小 */
  .launchpad-mask { padding: 40px 16px; }
  .launchpad-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 8px; width: 100%; max-width: 460px; justify-content: stretch;
  }
  .launchpad-item .lp-ic,
  .launchpad-item .lp-ic img,
  .launchpad-item .lp-ic svg { width: 62px; height: 62px; }
  .launchpad-item .lp-lbl { font-size: 12px; }

  /* 通知卡片：靠右紧凑，按内容自适应，避免横撑整屏 */
  .notif-layer { top: 30px; right: 10px; left: auto; align-items: flex-end; }
  .notif {
    width: auto; max-width: min(78vw, 300px);
    padding: 10px 12px; border-radius: 14px; gap: 9px;
  }
  .notif-icon { width: 32px; height: 32px; font-size: 18px; border-radius: 8px; }
  .notif-title { font-size: 13px; }
  .notif-text { font-size: 12px; }
  /* 移动端没有 hover：关闭按钮常显但更克制 */
  .notif-close { opacity: 0.55; }

  /* 谷歌浏览器新标签页：Logo 与搜索框适度缩小，更符合移动端审美 */
  .chrome-home { padding-top: 72px; gap: 22px; }
  .g-logo { font-size: 56px; letter-spacing: -1.5px; }
  .g-search { height: 44px; }

  .login-time { font-size: 68px; }
}

/* 更小的手机屏（竖屏 iPhone 等） */
@media (max-width: 640px) {
  .desktop-icons { top: 28px; bottom: 96px; }
  .desk-icon { width: 76px; }
  .desk-icon .ic { width: 42px; height: 42px; }
  .desk-icon .lbl { font-size: 11.5px; }
  .dock { gap: 3px; padding: 4px 6px; }
  .dock-item { --dock-slot: 42px; }
  .dock-sep { height: 34px; }
  .window:not(.about-win):not(.xhs-window) {
    left: 2vw !important; right: 2vw;
    width: 96vw !important;
    max-height: calc(100dvh - 116px);
  }
  /* 留言簿：小屏也两边收窄，避免被上面 96vw 覆盖 */
  .window.gb-window { width: 86vw !important; left: 7vw !important; }
  /* 微信：小屏也收窄，避免被上面 96vw 覆盖 */
  .window.wechat-window:not(.about-win) { width: 80vw !important; left: 10vw !important; }
  .win-header { height: 40px; }
  .notes-side { width: 108px; }
  .finder-side { width: 96px; padding: 6px 4px; }
  .launchpad-grid { gap: 18px 6px; max-width: 360px; }
  .launchpad-item .lp-ic,
  .launchpad-item .lp-ic img,
  .launchpad-item .lp-ic svg { width: 58px; height: 58px; }
  /* 谷歌浏览器：小屏进一步收敛 Logo 与搜索框 */
  .chrome-home { padding-top: 60px; gap: 18px; }
  .g-logo { font-size: 46px; }
  .g-search { height: 42px; }
  .login-time { font-size: 52px; }
}
