/* ============================================================
   LinH Pocket · 视觉基底 v0.2
   风格：黑白韩系 ins 风 + iOS 拟态（毛玻璃 + 双阴影拟态）
   原则：无彩色强调，层级全部靠黑白灰 / 透明度 / 阴影
   规范对应：MEMORY.md「六、视觉设计规则」
   v0.2：语义 Tokens 双主题（深色/纯白）+ 启动/锁屏/桌面/面板
   ============================================================ */

/* ========== 一、基础 Tokens（规范常量，禁止散写） ========== */
:root {
  /* 色彩 · 纯黑白灰（无 accent 强调色） */
  --black: #000000;
  --bg-deep-gray: #1c1c1e;
  --text-primary: #ffffff;
  --text-secondary: #8e8e93;

  /* 白色透明度层级 */
  --white-05: rgba(255, 255, 255, 0.05);
  --white-08: rgba(255, 255, 255, 0.08);
  --white-10: rgba(255, 255, 255, 0.10);
  --white-12: rgba(255, 255, 255, 0.12);
  --hairline: rgba(255, 255, 255, 0.08);

  /* 毛玻璃（iOS 配方：blur 20px + 提饱和） */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-filter: blur(20px) saturate(180%);

  /* 双阴影拟态（深色底） */
  --neu-light: rgba(255, 255, 255, 0.05);
  --neu-dark: rgba(0, 0, 0, 0.45);
  --neu-raised: -6px -6px 12px var(--neu-light), 6px 6px 12px var(--neu-dark);
  --neu-pressed: inset -6px -6px 12px rgba(255, 255, 255, 0.03), inset 6px 6px 12px var(--neu-dark);

  /* 间距 · 8px 栅格 */
  --space-1: 4px; --space-2: 8px; --space-3: 16px;
  --space-4: 24px; --space-5: 32px;

  /* 圆角：小 12 / 大容器 24 / 模拟器外屏 40 */
  --radius-control: 12px;
  --radius-container: 24px;
  --radius-device: 40px;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-title: 20px; --font-title-large: 24px;
  --font-body: 15px; --font-caption: 12px;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600;

  /* 动效：200ms 标准 / 400ms 弹跳 */
  --duration-base: 200ms;
  --duration-bounce: 400ms;
  --ease-standard: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 安全区域（viewport-fit=cover 已预置） */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ========== 二、语义 Tokens：壁纸上下文（锁屏/桌面/Dock） ========== */
:root, :root[data-wall="dark"] {
  --on-wall: #ffffff;
  --wall-glass: rgba(255, 255, 255, 0.075);
  --wall-glass-2: rgba(255, 255, 255, 0.13);
  --wall-hairline: rgba(255, 255, 255, 0.14);
  --label-shadow: rgba(0, 0, 0, 0.35);
  --lock-btn-bg: rgba(0, 0, 0, 0.34);
  --lock-btn-fg: #ffffff;
}
:root[data-wall="light"] {
  --on-wall: #161616;
  --wall-glass: rgba(255, 255, 255, 0.5);
  --wall-glass-2: rgba(255, 255, 255, 0.62);
  --wall-hairline: rgba(0, 0, 0, 0.1);
  --label-shadow: rgba(255, 255, 255, 0.45);
  --lock-btn-bg: rgba(255, 255, 255, 0.55);
  --lock-btn-fg: #111111;
}
/* 面板打开时状态栏文字跟随面板（浅主题黑字） */
html[data-theme="light"] #device:has(.panel.open) { --on-wall: #111111; }

/* ========== 三、语义 Tokens：主题上下文（面板/开关） ========== */
:root, [data-theme="dark"] {
  --stage-bg: var(--bg-deep-gray);
  --sb-color: #ffffff;
  --panel-bg: #080808;
  --panel-text: #f5f5f5;
  --panel-text-2: #8e8e93;
  --group-bg: rgba(255, 255, 255, 0.09);
  --row-border: rgba(255, 255, 255, 0.08);
  --search-bg: rgba(255, 255, 255, 0.10);
  --mini-bg: #ffffff; --mini-fg: #111111;
  --toggle-track-off: rgba(255, 255, 255, 0.18);
  --toggle-track-on: #ffffff;
  --toggle-knob-off: #ffffff; --toggle-knob-on: #1c1c1e;
}
[data-theme="light"] {
  --stage-bg: var(--bg-deep-gray);
  --sb-color: #111111;
  --panel-bg: #f2f2f7;
  --panel-text: #111111;
  --panel-text-2: #86868b;
  --group-bg: #ffffff;
  --row-border: rgba(60, 60, 67, 0.12);
  --search-bg: rgba(120, 120, 128, 0.12);
  --mini-bg: #111111; --mini-fg: #ffffff;
  --toggle-track-off: #c7c7cc;
  --toggle-track-on: #111111;
  --toggle-knob-off: #ffffff; --toggle-knob-on: #ffffff;
}

/* ========== 四、重置与基础 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  overflow: hidden;
  background: var(--stage-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-body);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--white-12); }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
.svg-sprite { position: absolute; }

/* ========== 五、舞台与手机本体（9:19.5，外屏圆角 40） ========== */
.stage { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; background: var(--stage-bg); }
.device {
  position: relative;
  width: min(100vw, 430px);
  height: 100vh; height: 100dvh;
  max-height: 932px;
  overflow: hidden;
  isolation: isolate;
  background: var(--black);
}
@media (min-width: 700px) {
  .stage { padding: var(--space-4); }
  .device {
    width: auto;
    height: min(92vh, 932px); height: min(92dvh, 932px);
    aspect-ratio: 9 / 19.5;
    border-radius: var(--radius-device);
    outline: 0.5px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.85);
  }
}

/* ========== 六、壁纸层（黑白丝绸，纯 CSS） ========== */
.wallpaper {
  position: absolute; inset: 0; z-index: 0;
  transition: opacity var(--duration-bounce) var(--ease-standard);
  background:
    radial-gradient(ellipse at 17% 72%, #dcdcdc 0 6%, #6f6f6f 9%, transparent 30%),
    radial-gradient(ellipse at 77% 39%, #efefef 0 6%, #5e5e5e 9%, transparent 31%),
    radial-gradient(ellipse at 47% 15%, #2a2a2a 0 14%, transparent 44%),
    linear-gradient(145deg, #000 0%, #161616 40%, #2a2a2a 48%, #101010 66%, #000 100%);
}
:root[data-wall="light"] .wallpaper {
  background:
    radial-gradient(ellipse at 25% 68%, #111 0 5%, #999 8%, transparent 28%),
    radial-gradient(ellipse at 75% 35%, #222 0 5%, #aaa 8%, transparent 28%),
    linear-gradient(145deg, #fff 0%, #e6e6e6 46%, #9a9a9a 49%, #f2f2f2 78%, #fff 100%);
}
.wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 42%, transparent 30%, rgba(0, 0, 0, 0.28));
}
:root[data-wall="light"] .wallpaper::after { opacity: 0.25; }

/* ========== 七、启动画面 ========== */
.splash {
  position: absolute; inset: 0; z-index: 90;
  background: var(--black);
  overflow: hidden;
  transition: opacity var(--duration-bounce) var(--ease-standard),
             transform var(--duration-bounce) var(--ease-standard);
}
.splash--out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.splash-silk {
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse at 20% 75%, #dcdcdc 0 5%, #555 9%, transparent 30%),
    radial-gradient(ellipse at 80% 30%, #c8c8c8 0 5%, #4a4a4a 9%, transparent 32%),
    linear-gradient(145deg, #000, #141414 55%, #000);
  opacity: 0.22;
  animation: silkDrift 18s ease-in-out infinite alternate;
}
@keyframes silkDrift { from { transform: translate3d(-1.5%, 0, 0) scale(1.02); } to { transform: translate3d(1.5%, -2%, 0) scale(1.06); } }

/* 克制版水印：1 个超大描边字标 + 3 颗淡星 */
.splash-watermark {
  position: absolute; inset: 0;
  animation: wmDrift 12s ease-in-out infinite alternate;
}
.wm-text {
  position: absolute; top: 36%; left: -60%; width: 220%;
  text-align: center; white-space: nowrap;
  font-size: 64px; font-weight: var(--weight-semibold); letter-spacing: 2px;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.10);
  transform: rotate(-14deg);
}
.wm-star { position: absolute; width: 22px; height: 22px; color: #fff; opacity: 0.1; animation: starTwinkle 5s ease-in-out infinite alternate; }
.wm-star use { fill: currentColor; }
.wm-star--1 { width: 16px; height: 16px; top: 20%; left: 18%; }
.wm-star--2 { width: 28px; height: 28px; top: 62%; right: 16%; animation-delay: 1.4s; }
.wm-star--3 { width: 12px; height: 12px; top: 74%; left: 24%; animation-delay: 2.6s; }
@keyframes wmDrift { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@keyframes starTwinkle { from { opacity: 0.05; transform: scale(0.9); } to { opacity: 0.18; transform: scale(1.08); } }

.splash-brand { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.splash-logo { position: relative; width: 92px; height: 92px; opacity: 0; transform: scale(0.82); animation: brandPop var(--duration-bounce) var(--ease-bounce) 0.1s forwards; }
.brand-mark { width: 100%; height: 100%; filter: drop-shadow(0 10px 28px rgba(255, 255, 255, 0.12)); }
.mark-shine { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.mark-star use { fill: #fff; }
.splash-logo::after {
  content: ""; position: absolute; top: -30%; left: -70%; width: 42%; height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(20deg); animation: shineSweep 1.1s var(--ease-standard) 0.3s forwards;
}
@keyframes brandPop { to { opacity: 1; transform: scale(1); } }
@keyframes shineSweep { to { left: 135%; } }
.splash-title {
  font-size: 26px; font-weight: var(--weight-semibold); letter-spacing: -0.3px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp var(--duration-base) var(--ease-standard) 0.38s forwards;
}
.splash-subtitle {
  font-size: 10.5px; letter-spacing: 4px; color: rgba(255, 255, 255, 0.55);
  opacity: 0; animation: subIn 0.5s var(--ease-standard) 0.52s forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes subIn { from { letter-spacing: 5px; } to { opacity: 1; letter-spacing: 2.4px; } }

.splash-foot { position: absolute; left: 0; right: 0; bottom: calc(46px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.splash-loading { position: relative; width: 72px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.splash-loading i { position: absolute; top: 0; left: 0; width: 40%; height: 100%; border-radius: 2px; background: #fff; animation: barSlide 1.1s linear infinite; }
@keyframes barSlide { from { transform: translateX(-120%); } to { transform: translateX(280%); } }
.splash-loading-text { font-size: 11px; color: rgba(255, 255, 255, 0.45); letter-spacing: 1px; }

/* ========== 八、状态栏（左时间 / 右信号 Wi‑Fi 电量，SVG 单色） ========== */
.status-bar {
  position: absolute; z-index: 30; top: 0; left: 0; right: 0;
  height: calc(54px + var(--safe-top));
  padding: var(--safe-top) 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--on-wall);
  transition: color var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
}
.sb-time { font-size: 15px; font-weight: var(--weight-semibold); letter-spacing: -0.2px; }
.sb-icons { display: flex; align-items: center; gap: 6px; }
.sb-svg { display: block; }
.sb-signal { width: 18px; height: 12px; fill: currentColor; }
.sb-wifi { width: 17px; height: 12px; fill: currentColor; }
.sb-battery { width: 27px; height: 13px; }
.bat-tube { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.45; }
.bat-fill, .bat-cap { fill: currentColor; }

/* ========== 九、灵动岛 ========== */
.island {
  position: absolute; z-index: 32;
  top: calc(var(--safe-top) + 11px); left: 50%;
  width: 136px; height: 36px; border-radius: 22px;
  background: var(--black);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.7), inset 0 0 0 1px #171717;
  transform: translateX(-50%);
  display: flex; align-items: center;
  transition: width var(--duration-bounce) var(--ease-bounce);
}
.island.active { width: 178px; }
.island-label {
  position: absolute; left: 19px; font-size: 10px; font-weight: var(--weight-semibold);
  color: #fff; opacity: 0; transform: translateY(10px);
  transition: opacity var(--duration-base), transform var(--duration-base);
  white-space: nowrap;
}
.island.active .island-label { opacity: 1; transform: translateY(0); }
/* v0.2 灵动岛展开时隐藏状态栏内容，避免遮挡 */
.device:has(.island.active) .status-bar { opacity: 0; }
.island-dot {
  position: absolute; right: 16px; top: 50%; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.75); transform: translateY(-50%);
}

/* ========== 十、锁屏 ========== */
.lock-screen, .home-screen {
  position: absolute; inset: 0;
  transition: opacity 0.42s var(--ease-standard), transform 0.42s var(--ease-standard);
}
.lock-screen { z-index: 5; display: flex; flex-direction: column; }
.lock-inner {
  flex: 1; padding: calc(78px + var(--safe-top)) 20px 0;
  display: flex; flex-direction: column; align-items: center;
}
.lock-date { font-size: 17px; font-weight: var(--weight-medium); color: var(--on-wall); }
.lock-time {
  margin-top: 4px; font-size: clamp(64px, 19vw, 82px); line-height: 1.05;
  font-weight: 200; letter-spacing: -5px; color: var(--on-wall);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}
.lock-widgets { margin-top: 26px; display: flex; gap: 10px; align-items: stretch; }
.lw {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 132px; padding: 12px 14px;
  border-radius: 22px; color: var(--on-wall);
}
.lw b { font-size: 22px; font-weight: var(--weight-medium); line-height: 1.1; }
.lw span { font-size: 12px; }
.lw small { font-size: 10.5px; opacity: 0.72; white-space: nowrap; }
.lw-main { display: flex; align-items: center; gap: 8px; }
.lw-cloud { width: 22px; height: 22px; fill: currentColor; opacity: 0.9; }
.lw--round {
  min-width: 0; width: 64px; height: 64px; padding: 0;
  border-radius: 50%; align-items: center; justify-content: center; text-align: center;
}
.lw-bell { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.lock-foot {
  flex: none; padding: 0 27px calc(30px + var(--safe-bottom));
  display: flex; justify-content: space-between; align-items: center;
}
.lock-hint {
  position: absolute; left: 0; right: 0; bottom: calc(34px + var(--safe-bottom));
  text-align: center; font-size: 12px; color: var(--on-wall); opacity: 0.72;
  white-space: nowrap; pointer-events: none;
}
.lock-circle {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lock-btn-bg); color: var(--lock-btn-fg);
  border: 0.5px solid var(--wall-hairline);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base), background var(--duration-base);
}
.lock-circle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lock-circle:active { transform: scale(0.92); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35); }
.lock-circle.is-on { background: #fff; color: #111; }

/* ========== 十一、桌面 ========== */
.home-screen { z-index: 5; opacity: 0; pointer-events: none; }
.device.is-unlocked .lock-screen { opacity: 0; transform: translateY(-24px); pointer-events: none; }
.device.is-unlocked .home-screen { opacity: 1; pointer-events: auto; }

.home-scroll {
  position: absolute;
  top: calc(58px + var(--safe-top)); left: 15px; right: 15px;
  bottom: calc(104px + var(--safe-bottom));
  overflow: hidden;
}
.home-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hw {
  height: 108px; border-radius: 22px; padding: 14px;
  display: flex; flex-direction: column; gap: 3px;
  color: var(--on-wall);
}
.hw small { font-size: 11px; opacity: 0.72; }
.hw b { font-size: 26px; font-weight: 300; letter-spacing: -0.5px; }
.hw span { font-size: 10.5px; opacity: 0.85; margin-top: auto; white-space: nowrap; }

.apps { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.app span {
  font-size: 10px; color: var(--on-wall);
  text-shadow: 0 1px 4px var(--label-shadow);
}
.icon {
  width: 57px; height: 57px; border-radius: 17px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  color: #111; font-size: 23px; font-weight: var(--weight-semibold); font-style: normal;
  background: linear-gradient(145deg, #ffffff, #bcbcbc);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -8px 15px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.3);
}
.icon::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 34%, transparent 68%, rgba(0, 0, 0, 0.07));
}
.icon--dark {
  color: #fff; border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, #262626, #050505);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px rgba(0, 0, 0, 0.55);
}
.dock .icon { width: 54px; height: 54px; }

/* CSS 线描图标（currentColor，黑白体系） */
.glyph { width: 23px; height: 23px; position: relative; display: block; }
.glyph::before, .glyph::after { content: ""; position: absolute; }
.g-camera { border: 2px solid currentColor; border-radius: 6px; }
.g-camera::before { width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 50%; left: 5px; top: 5px; }
.g-camera::after { width: 6px; height: 3px; background: currentColor; border-radius: 2px; left: 4px; top: -5px; }
.g-gear { border: 3px solid currentColor; border-radius: 50%; }
.g-gear::before { inset: 5px; border: 2px solid currentColor; border-radius: 50%; }
.g-gear::after { inset: -5px; border: 1px dashed currentColor; border-radius: 50%; }
.g-note::before { left: 6px; top: 1px; width: 13px; height: 17px; border-right: 3px solid currentColor; border-top: 3px solid currentColor; }
.g-note::after { left: 2px; bottom: 1px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 10px -2px 0 -1px currentColor; }
.g-message::before { inset: 2px 0 5px; border: 2px solid currentColor; border-radius: 7px; }
.g-message::after { left: 4px; bottom: 0; border: 5px solid transparent; border-top-color: currentColor; transform: rotate(20deg); }
.g-phone::before { inset: 2px 5px; border: 3px solid currentColor; border-radius: 5px; }
.g-phone::after { width: 5px; height: 5px; border-radius: 50%; background: currentColor; left: 9px; bottom: 4px; }
.g-photo::before { inset: 1px; border: 2px solid currentColor; border-radius: 4px; }
.g-photo::after { width: 7px; height: 7px; border: 2px solid currentColor; border-radius: 50%; left: 6px; top: 6px; box-shadow: 7px 8px 0 -2px currentColor; }
.g-mail::before { left: 0; top: 3px; width: 21px; height: 15px; border: 2px solid currentColor; border-radius: 3px; }
.g-mail::after { left: 50%; top: 6px; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(-50%) rotate(-45deg); }
.g-compass { border: 2px solid currentColor; border-radius: 50%; }
.g-compass::before { inset: 3px; border: 1.5px solid currentColor; border-radius: 50%; opacity: 0.55; }
.g-compass::after {
  left: 50%; top: 50%; width: 7px; height: 7px; background: currentColor;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: translate(-50%, -50%) rotate(45deg);
}

.page-dots {
  position: absolute; left: 0; right: 0; bottom: calc(90px + var(--safe-bottom));
  display: flex; justify-content: center; gap: 6px;
}
.page-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--on-wall); opacity: 0.35; }
.page-dots i.active { opacity: 0.95; transform: scale(1.15); }

.dock {
  position: absolute; left: 15px; right: 15px; bottom: calc(12px + var(--safe-bottom));
  height: 76px; border-radius: var(--radius-container);
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

/* 桌面编辑态：图标轻微摇摆 */
.device.editing .apps .app { animation: appWiggle 0.5s ease-in-out infinite alternate; }
@keyframes appWiggle { from { transform: rotate(-0.9deg); } to { transform: rotate(0.9deg); } }

/* ========== 十二、设置面板 ========== */
.panel {
  position: absolute; inset: 0; z-index: 25;
  background: var(--panel-bg); color: var(--panel-text);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--duration-bounce) var(--ease-standard);
}
.panel.open { transform: translateX(0); }
.panel-nav {
  flex: none; height: calc(96px + var(--safe-top));
  padding: var(--safe-top) 18px 8px;
  display: flex; align-items: flex-end; gap: 8px;
}
.panel-title { font-size: 28px; font-weight: var(--weight-semibold); letter-spacing: -0.5px; }
.back { font-size: 16px; font-weight: var(--weight-regular); color: var(--panel-text-2); padding: 8px 0; }
.panel-body {
  flex: 1; overflow: auto;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
  padding-bottom: calc(30px + var(--safe-bottom));
}
.search {
  height: 38px; margin: 4px 16px 14px; padding: 0 12px;
  border-radius: var(--radius-control);
  background: var(--search-bg); color: var(--panel-text-2);
  display: flex; align-items: center; gap: 8px; font-size: 15px;
}
.search-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.profile {
  margin: 0 16px 14px; padding: 12px 14px;
  border-radius: 16px; background: var(--group-bg);
  display: flex; align-items: center; gap: 12px;
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ffffff, #777777); color: #111; font-weight: var(--weight-semibold);
}
.profile b { font-size: 17px; }
.profile small { display: block; color: var(--panel-text-2); margin-top: 2px; }
.flex { flex: 1; }
.group { margin: 0 16px 14px; border-radius: 16px; overflow: hidden; background: var(--group-bg); }
.row {
  min-height: 48px; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 0.5px solid var(--row-border);
  font-size: 15px;
}
.row:last-child { border-bottom: 0; }
.row-label { flex: 1; }
.row small { color: var(--panel-text-2); font-size: 12px; }
.chev { color: var(--panel-text-2); font-size: 20px; line-height: 1; }
.mini {
  width: 31px; height: 31px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 13px;
  background: var(--mini-bg); color: var(--mini-fg);
}
.setting-head { font-size: 26px; font-weight: var(--weight-semibold); letter-spacing: -0.5px; margin: 4px 16px 12px; }
.subhead { font-size: 12px; color: var(--panel-text-2); margin: 16px 20px 8px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.theme-card {
  height: 168px; padding: 10px; border-radius: 18px;
  border: 0.5px solid var(--row-border);
  background: transparent; color: var(--panel-text);
  text-align: left; cursor: pointer;
}
.theme-card.selected { outline: 2px solid var(--panel-text); outline-offset: -2px; }
.theme-card b { display: block; margin-top: 7px; font-size: 13px; font-weight: var(--weight-semibold); }
.theme-card small { font-size: 11px; color: var(--panel-text-2); }
.theme-preview { height: 106px; border-radius: 14px; }
.theme-preview--black {
  background: radial-gradient(circle at 65% 35%, #fff 0 4%, #777 9%, transparent 29%),
              linear-gradient(145deg, #000, #3a3a3a 45%, #111 65%, #000);
}
.theme-preview--white {
  background: radial-gradient(circle at 35% 65%, #111 0 4%, #999 9%, transparent 30%),
              linear-gradient(145deg, #fff, #ddd 46%, #111 48%, #fff 78%);
}

/* 开关：on 白轨黑钮 / off 灰轨白钮，无彩色 */
.toggle {
  width: 45px; height: 27px; border-radius: 18px; flex: none;
  position: relative; background: var(--toggle-track-off);
  transition: background var(--duration-base) var(--ease-standard);
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--toggle-knob-off);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  transition: left var(--duration-base) var(--ease-bounce), background var(--duration-base);
}
.toggle.on { background: var(--toggle-track-on); }
.toggle.on::after { left: 20px; background: var(--toggle-knob-on); }

.slider { height: 4px; margin: 18px 24px; border-radius: 4px; background: var(--toggle-track-off); position: relative; }
.slider i {
  position: absolute; left: 63%; top: 50%; width: 21px; height: 21px;
  border-radius: 50%; background: var(--panel-text);
  transform: translate(-50%, -50%);
}

/* 面板内容依次弹入（400ms 回弹） */
.panel.open .profile,
.panel.open .group,
.panel.open .cards,
.panel.open .setting-head { animation: riseIn var(--duration-bounce) var(--ease-bounce) both; }
.panel.open .group:nth-of-type(2) { animation-delay: 0.04s; }
.panel.open .group:nth-of-type(3) { animation-delay: 0.08s; }
.panel.open .group:nth-of-type(4) { animation-delay: 0.12s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ========== 十三、小白条 / Toast ========== */
.home-indicator {
  position: absolute; z-index: 60; left: 50%; bottom: calc(8px + var(--safe-bottom));
  width: 134px; height: 5px; border-radius: 3px;
  background: var(--on-wall); opacity: 0.85;
  transform: translateX(-50%); pointer-events: none;
}
.toast {
  position: absolute; z-index: 80; left: 50%;
  bottom: calc(104px + var(--safe-bottom));
  transform: translate(-50%, 20px);
  padding: 10px 18px; border-radius: 17px;
  background: rgba(20, 20, 20, 0.9);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: #fff; font-size: 13px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 十四、通用交互基类 ========== */
.glass {
  background: var(--wall-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid var(--wall-hairline);
}
.neu { background: var(--bg-deep-gray); border-radius: var(--radius-container); box-shadow: var(--neu-raised); transition: box-shadow var(--duration-base), transform var(--duration-base); }
.neu-inset { background: var(--bg-deep-gray); border-radius: var(--radius-container); box-shadow: var(--neu-pressed); }
.neu:active { box-shadow: var(--neu-pressed); transform: scale(0.98); }
.tap { transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard); }
.tap:active { opacity: 0.7; transform: scale(0.98); }
.tap-bounce { transition: opacity var(--duration-bounce) var(--ease-bounce), transform var(--duration-bounce) var(--ease-bounce); }
.tap-bounce:active { opacity: 0.7; transform: scale(0.96); }
.app, .dock-app, .row, .theme-card, .back { -webkit-user-select: none; user-select: none; }
.scroll-smooth { overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }

/* ========== 十五、prefers-reduced-motion 降级 ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .splash-logo, .splash-title, .splash-subtitle { opacity: 1; transform: none; letter-spacing: 2.4px; }
  .splash-loading i { display: none; }
}