/* =========================================================
 * system.css — 锁屏 / 主屏 / 系统覆盖层 / 设置 的样式
 * ========================================================= */

/* =========================================================
 * 锁屏（第 3 章）
 * ======================================================= */
.lock {
  position: absolute;
  inset: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
}
.lock::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 30%, transparent 60%, rgba(0,0,0,.35));
  pointer-events: none;
}
.lock-sb { height: 54px; flex: none; }
.lock-head { text-align: center; margin-top: 76px; z-index: 1; transition: opacity 400ms var(--ease); }
.lock-greet { font-size: 14px; opacity: .75; margin-bottom: 6px; }
.lock-time { font-size: 96px; font-weight: 700; line-height: 1; letter-spacing: -3px; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.lock-date { font-size: 20px; margin-top: 10px; opacity: .9; }

.lock-notes {
  width: 100%;
  margin-top: 34px;
  padding: 0 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}
.lknote {
  position: relative;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 10px 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transition: transform 260ms var(--ease);
}
.lknote.dragging { transition: none; }
.lknote-main { position: relative; z-index: 2; }
.lknote-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.lknote-ico { display: flex; opacity: .9; }
.lknote-app { font-size: 13px; opacity: .95; }
.lknote-time { font-size: 13px; opacity: .65; }
.lknote-title { font-size: 15px; font-weight: 600; }
.lknote-body {
  font-size: 13px; opacity: .85; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lknote-del, .lknote-view {
  position: absolute; top: 0; bottom: 0; width: 66px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; z-index: 1;
}
.lknote-del { right: 0; background: var(--red); }
.lknote-view { right: 66px; background: rgba(90,90,95,.9); }
.lknote-empty { text-align: center; font-size: 13px; opacity: .55; padding: 10px; }
.lknote-more {
  text-align: center; font-size: 13px; opacity: .7;
  background: rgba(255,255,255,.14); border-radius: 20px; padding: 10px;
  backdrop-filter: blur(20px);
}

.lock-bottom {
  position: absolute; left: 0; right: 0; bottom: 96px;
  display: flex; justify-content: space-between; padding: 0 46px;
  z-index: 2;
}
.lk-quick {
  width: 46px; height: 46px; border-radius: 23px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(12px);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: transform 140ms var(--ease), background 160ms linear;
}
.lk-quick:active { transform: scale(.9); background: rgba(255,255,255,.36); }

.lock-hint {
  position: absolute; left: 0; right: 0; bottom: 42px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 2;
}
.lock-bar {
  width: 120px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.75);
  animation: lockBarHint 2.6s var(--ease) infinite;
}
.lock-hint-t { font-size: 12px; opacity: .7; transition: opacity .2s var(--ease); }

@keyframes lockBarHint {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(-7px); opacity: 1; }
}
/* 上滑已达阈值：提示切换为「松手解锁」 */
.lock.ready .lock-bar { animation: none; transform: translateY(-9px); opacity: 1; }
.lock.ready .lock-hint-t { opacity: 1; }

/* ---- 常显（AOD）：不熄屏，仅轻度压暗并隐藏次要控件，锁屏内容保持可见 ---- */
.lock.aod .lock-bottom,
.lock.aod .lock-hint,
.lock.aod .face-scan,
.lock.aod .passcode { display: none; }
.lock.aod::before {
  background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 35%, transparent 65%, rgba(0,0,0,.22));
}
.lock.aod .lock-head { opacity: .86; }
.lock.aod .lock-notes { opacity: .5; }

/* ---- 面容识别（3.7.2） ---- */
.face-scan {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
  z-index: 5;
}
.lock.scanning .face-scan, .lock.face-ok .face-scan, .lock.face-failed .face-scan { display: flex; }
.face-box {
  width: 132px; height: 132px; border-radius: 30px;
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.face-ico { color: #fff; }
.face-scanline {
  position: absolute; left: 8px; right: 8px; height: 3px;
  background: linear-gradient(90deg, transparent, #4CD964, transparent);
  box-shadow: 0 0 12px #4CD964;
  animation: scan 1.2s linear infinite;
}
@keyframes scan { 0% { top: 8px; } 100% { top: 122px; } }
.face-tip { font-size: 15px; }
.face-fail {
  font-size: 12px; color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 4px 10px;
  position: absolute; bottom: 60px;
}
.lock.face-ok .face-box { border-color: #4CD964; box-shadow: 0 0 0 6px rgba(76,217,100,.18); }
.lock.face-ok .face-scanline { display: none; }
.lock.face-ok .face-ico { color: #4CD964; }
.lock.face-failed .face-box { animation: shake 500ms var(--ease); border-color: var(--red); }
.lock.face-failed .face-scanline { display: none; }
.lock.face-failed .face-ico { color: var(--red); }

/* ---- 密码键盘（3.7.3） ---- */
.passcode {
  position: absolute; inset: 0; z-index: 6;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: none; flex-direction: column;
  padding-top: 150px;
}
.lock.show-passcode .passcode { display: flex; }
.pc-top { text-align: center; margin-bottom: 26px; }
.pc-title { font-size: 20px; font-weight: 600; }
.pc-tip { font-size: 13px; opacity: .75; margin-top: 6px; }
.pc-tip.err { color: var(--red); opacity: 1; }
.pc-dots { display: flex; justify-content: center; gap: 16px; margin-top: 20px; }
.pc-dots i {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.4px solid rgba(255,255,255,.85);
  transition: background 120ms linear;
}
.pc-dots i.on { background: #fff; }
.pc-dots.err { animation: shake 420ms var(--ease); }
.pc-dots.err i { border-color: var(--red); background: var(--red); }
.pc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; padding: 0 62px; margin-top: 8px;
}
.pc-key {
  height: 75px; border-radius: 37.5px;
  background: rgba(255,255,255,.22);
  color: #fff; font-size: 30px; font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.pc-key.empty { background: none; pointer-events: none; }
.pc-key:active { background: rgba(255,255,255,.42); }
.pc-bottom { display: flex; justify-content: space-between; padding: 18px 66px 0; }
.pc-emergency, .pc-del { font-size: 15px; color: #fff; opacity: .9; }
.pc-bottom .pc-del { text-align: right; }

/* =========================================================
 * 主屏幕（第 4 章）
 * ======================================================= */
.home {
  position: absolute; inset: 0; overflow: hidden;
  /* ---- 底部区块几何（2026-10-05 用户要求：Dock 与页码圆点互换位置）----
   * 真机 iOS 的次序是「图标栅格 → 圆点 → Dock」，而这里是反的，互换后：
   *   Dock 沉到最底，页码圆点浮在 Dock 之上。
   * --dock-edge：Dock 底边距屏幕底。除了设计值，还必须让开 Home 指示条
   *              （--safe-b，全屏模式会跟随 env(safe-area-inset-bottom)），
   *              所以取 max()，横屏/带刘海机型也不会把 Dock 压到指示条上。
   * --dock-h   ：Dock 高度 = 一行图标 + 上下内边距各 15px（和原来的公式一致）。
   * --dots-gap ：圆点底边与 Dock 顶边的间距。 */
  --dock-edge: max(var(--dock-bottom, 32px), calc(var(--safe-b, 22px) + 8px));
  --dock-h: calc(var(--hi, 60px) + 36px);
  --dots-gap: 14px;
}
.home-bg { position: absolute; inset: 0; z-index: 0; }
.home-pages {
  position: absolute; inset: 0;
  display: flex; width: 200%;
  transition: transform 420ms var(--ease);
}
.home-page { width: 50%; flex: none; position: relative; }
.home-grid {
  position: absolute; left: 0; right: 0; top: var(--home-top, 108px);
  display: flex; flex-wrap: wrap;
  gap: var(--hi-gapy, 20px) var(--hi-gapx, 28px);
  padding: 0 var(--hi-pad, 58px);
  align-content: flex-start;
}
.home-icon {
  width: var(--hi, 60px); text-align: center; position: relative;
  transition: transform 200ms var(--ease);
}
.home-icon.pressed { transform: scale(.92); }
.home-icon.dragging { z-index: 30; opacity: .95; transition: none; }
.home-icon.over { transform: scale(1.08); }
.hi-icon { display: flex; justify-content: center; }
.hi-name {
  font-size: var(--hi-name, 12px); color: #fff; margin-top: max(3px, calc(var(--hi, 60px) * 0.1));
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hi-minus {
  position: absolute; left: calc(var(--hi, 60px) * -.1); top: calc(var(--hi, 60px) * -.1);
  width: calc(var(--hi, 60px) * .3667); height: calc(var(--hi, 60px) * .3667);
  border-radius: 50%;
  background: var(--red); color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.hi-minus svg { width: calc(var(--hi, 60px) * .2333); height: calc(var(--hi, 60px) * .2333); }
.home.editing .hi-minus { display: flex; }
.home.editing .home-icon { animation: jiggle 400ms ease-in-out infinite alternate; }
@keyframes jiggle {
  from { transform: rotate(-0.5deg); }
  to { transform: rotate(0.5deg); }
}
.home.editing .home-icon.dragging { animation: none; }

/* 小组件 */
.home-widget {
  border-radius: 20px;
  background: rgba(255,255,255,.28);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  height: calc(2 * var(--hi, 60px) + var(--wg-extra, 38px));
  overflow: hidden; color: #fff;
  position: relative;
}
/* 宽度严格对齐栅格：n 个图标 + (n-1) 个列间距 */
.home-widget.size-small { width: calc(2 * var(--hi, 60px) + var(--hi-gapx, 28px)); }
.home-widget.size-medium { width: calc(4 * var(--hi, 60px) + 3 * var(--hi-gapx, 28px)); }

/* 全屏模式（不同机型宽度）下的自适应收敛：变量由 main.js 按屏宽实时算出 */
html.fs .home-widget.size-medium { width: min(calc(4 * var(--hi, 60px) + 3 * var(--hi-gapx, 28px)), 100%); }
/* 小组件内部排版：字号与间距同样按 --hi 缩放（基准 60px），小屏才不会被裁字 */
.wg-clock { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--hi, 60px) * .2) calc(var(--hi, 60px) * .2333); }
.wg-clock-t { font-size: max(16px, calc(var(--hi, 60px) * .5667)); font-weight: 700; line-height: 1.15; }
.wg-clock-d { font-size: max(9px, calc(var(--hi, 60px) * .2)); opacity: .85; margin-top: 2px; }
.wg-weather { height: 100%; padding: calc(var(--hi, 60px) * .2) calc(var(--hi, 60px) * .2333); overflow: hidden; }
.wgw-t { font-size: max(10px, calc(var(--hi, 60px) * .2167)); opacity: .9; }
.wgw-icon { position: absolute; right: calc(var(--hi, 60px) * .2); top: calc(var(--hi, 60px) * .167); opacity: .95; }
.wgw-icon svg { width: calc(var(--hi, 60px) * .5); height: calc(var(--hi, 60px) * .5); }
.wgw-temp { font-size: max(18px, calc(var(--hi, 60px) * .6333)); font-weight: 300; margin-top: calc(var(--hi, 60px) * .1); }
.wgw-desc { font-size: max(9px, calc(var(--hi, 60px) * .2)); opacity: .85; margin-top: 2px; }
.wg-notes { padding: calc(var(--hi, 60px) * .2) calc(var(--hi, 60px) * .2333); overflow: hidden; height: 100%; }
.wgn-title { font-size: max(9px, calc(var(--hi, 60px) * .2)); opacity: .8; }
.wgn-t { font-size: max(11px, calc(var(--hi, 60px) * .25)); font-weight: 600; margin-top: 4px; }
.wgn-b { font-size: max(9px, calc(var(--hi, 60px) * .2167)); opacity: .85; margin-top: 3px; }
.wgn-more { position: absolute; bottom: calc(var(--hi, 60px) * .167); font-size: max(9px, calc(var(--hi, 60px) * .1833)); opacity: .7; }
.wg-cal { padding: calc(var(--hi, 60px) * .2) calc(var(--hi, 60px) * .2333); }
.wgc-w { font-size: max(9px, calc(var(--hi, 60px) * .2)); opacity: .85; }
.wgc-d { font-size: max(16px, calc(var(--hi, 60px) * .5667)); font-weight: 700; line-height: 1.1; }
.wgc-m { font-size: max(9px, calc(var(--hi, 60px) * .2)); opacity: .85; }
.wg-music { display: flex; align-items: center; height: 100%; padding: calc(var(--hi, 60px) * .167) calc(var(--hi, 60px) * .2333); gap: calc(var(--hi, 60px) * .167); }
.wg-music .thumb { width: var(--hi, 60px); height: var(--hi, 60px); border-radius: calc(var(--hi, 60px) * .167); flex: none; }
.wgm-info { flex: 1; min-width: 0; }
.wgm-t { font-size: max(11px, calc(var(--hi, 60px) * .25)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wgm-a { font-size: max(9px, calc(var(--hi, 60px) * .2)); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wgm-play { width: calc(var(--hi, 60px) * .7333); height: calc(var(--hi, 60px) * .7333); border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; flex: none; }
.wgm-play svg { width: calc(var(--hi, 60px) * .3667); height: calc(var(--hi, 60px) * .3667); }

/* Dock：宽度 = 4 个图标 + 3 个间距 + 左右内边距，随 --hi 收缩
 * 位置沉到屏幕最底（--dock-edge，见 .home 里的几何说明） */
.home-dock {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: var(--dock-edge);
  width: calc(4 * var(--hi, 60px) + 3 * var(--hi-gapx, 28px) + 2 * var(--dock-pad, 25px));
  max-width: calc(100% - 16px);
  height: var(--dock-h);
  border-radius: calc(var(--hi, 60px) * 0.46);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--dock-pad, 25px); gap: var(--hi-gapx, 28px);
  z-index: 2;
}
.home-dock .home-icon { width: var(--hi, 60px); }
.home-dock .hi-name { display: none; }

/* 页码圆点：浮在 Dock 之上（原先是压在 Dock 底下，已按用户要求互换） */
.home-dots {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--dock-edge) + var(--dock-h) + var(--dots-gap));
  display: flex; justify-content: center; gap: 8px; z-index: 2;
}
.home-dots .dot { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.4); }
.home-dots .dot.on { background: #fff; }

.home-editbar {
  position: absolute; right: 16px; top: 62px; z-index: 5;
  display: none;
}
.home.editing .home-editbar { display: block; }
.home-done {
  background: rgba(255,255,255,.9); color: var(--blue);
  font-size: 16px; font-weight: 600; padding: 6px 14px; border-radius: 14px;
}

/* App 资源库 */
.lib-page { background: rgba(0,0,0,.55); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.lib-head { padding: 6px 16px 12px; }
.lib-title { font-size: 26px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.lib-search {
  height: 34px; border-radius: 10px; background: rgba(255,255,255,.22);
  display: flex; align-items: center; gap: 6px; padding: 0 10px; color: rgba(255,255,255,.8);
}
.lib-input { flex: 1; background: none; border: none; color: #fff; font-size: 16px; }
.lib-input::placeholder { color: rgba(255,255,255,.65); }
.lib-grid-wrap { height: 100%; overflow-y: auto; padding: 0 16px; }
.lib-grid { position: static; gap: var(--hi-gapy, 20px) var(--hi-gapx, 28px); padding: 4px 0 0; }
.home-icon.lib .hi-name { display: block; }
.lib-all { margin-top: 24px; padding-bottom: 20px; }
.lib-all-title { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.7); margin: 10px 0 6px; }
.lib-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 4px;
  border-bottom: .5px solid rgba(255,255,255,.14); color: #fff;
}
.lib-name { font-size: 16px; }
.lib-row .row-arrow { color: rgba(255,255,255,.5); }

/* App 图标通用
 * 底色 / 圆角 / 字形色都走 CSS 变量：两套配色由 js/data/apps.js#appIcon()
 * 一起写进 style，靠 html.skin-candy 切换（见 css/homeskin.css）。
 * 不用内联 background / border-radius 的原因：内联样式无法被皮肤覆盖，
 * 换肤就得重渲染，而主屏在页面栈底部是不会重渲染的。 */
.appicon {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  border-radius: 22.5%;
  color: var(--aink, #fff);
  background-image: linear-gradient(160deg, var(--a1, #8E8E93) 0%, var(--a2, #5A5A5F) 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,.22), inset 0 0 0 .5px rgba(255,255,255,.25);
  overflow: visible;
}
/* 默认（iOS）皮肤取 --ios* 一组 */
.appicon {
  --a1: var(--ios1, #8E8E93);
  --a2: var(--ios2, #5A5A5F);
  --aink: var(--iosink, #fff);
}
.appicon-glyph { display: flex; align-items: center; justify-content: center; }
.appicon-glyph svg { stroke-width: 1.6; }
/* 图片图标（apps.js#iconImg，如「萌萌物语」）：盖在字形之上，
 * 圆角与容器同为 22.5%，这样角标（.appicon-badge）仍可正常溢出显示 */
.appicon-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* 跟随容器：iOS 皮肤 22.5%，糖果皮肤 27%，避免四角露出底色 */
  border-radius: inherit;
  /* 必须高于 .appicon-glyph：糖果皮肤给字形加了 z-index:1，
   * 否则底层字形（笑脸的圆形描边）会浮在图片上面，像个多余的圈 */
  z-index: 2;
  -webkit-user-drag: none; user-select: none;
}
/* 真实图片图标不需要「软糖高光」那两层假反光 */
.appicon:has(.appicon-img)::before,
.appicon:has(.appicon-img)::after {
  display: none;
}
.appicon-badge {
  position: absolute; top: -6px; right: -7px;
  min-width: calc(var(--hi, 60px) * 0.333); height: calc(var(--hi, 60px) * 0.333);
  padding: 0 calc(var(--hi, 60px) * 0.083);
  border-radius: calc(var(--hi, 60px) * 0.167);
  background: var(--red); color: #fff;
  font-size: calc(var(--hi, 60px) * 0.183); font-weight: 600;
  line-height: calc(var(--hi, 60px) * 0.333); text-align: center;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.5);
}

/* HUD */
.hud {
  position: absolute; left: 50%; top: 96px; transform: translateX(-50%) scale(.94);
  background: rgba(28,28,30,.82); backdrop-filter: blur(14px);
  border-radius: 16px; padding: 10px 16px; color: #fff;
  display: flex; align-items: center; gap: 10px; z-index: 95;
  opacity: 0; pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.hud.show { opacity: 1; transform: translateX(-50%) scale(1); }
.hud-ico { display: flex; }
.hud-text { font-size: 13px; }
.hud-bar { width: 70px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.28); }
.hud-bar i { display: block; height: 100%; background: #fff; border-radius: 2px; }

/* =========================================================
 * 系统覆盖层：控制中心 / 通知中心 / 应用切换器
 * ======================================================= */
.sys-cover { position: absolute; inset: 0; z-index: 90; }
.cover-bg { position: absolute; inset: 0; background: rgba(0,0,0,.28); opacity: 0; transition: opacity 300ms var(--ease); }
.sys-cover.in .cover-bg { opacity: 1; }

/* ---- 控制中心（5.1） ---- */
.cc-panel {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 62px 16px 22px;
  background: rgba(60,60,66,.62);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: 0 0 40px 40px;
  color: #fff;
  transform: translateY(-102%);
  transition: transform 460ms var(--ease);
  overflow: hidden;
}
.cc.in .cc-panel { transform: translateY(0); }
.cc-grid { display: flex; flex-direction: column; gap: 12px; }
.cc-row2 { display: flex; gap: 12px; }
.cc-col { display: flex; gap: 12px; }
.cc-toggle {
  width: 74px; height: 74px; border-radius: 22px;
  background: rgba(255,255,255,.2);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background 220ms var(--ease), transform 140ms var(--ease);
}
.cc-toggle:active { transform: scale(.94); }
.cct-ico { display: flex; }
.cc-music {
  margin-top: 4px;
  background: rgba(255,255,255,.18); border-radius: 20px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
}
.ccm-cover { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; }
.ccm-main { flex: 1; min-width: 0; }
.ccm-title { font-size: 14px; font-weight: 600; }
.ccm-artist { font-size: 12px; opacity: .8; }
.ccm-ctrls { display: flex; gap: 6px; }
.ccm-btn {
  width: 34px; height: 34px; border-radius: 17px;
  background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ccm-btn.play { background: rgba(255,255,255,.3); }
.cc-slider-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ccs-ico { display: flex; opacity: .9; }
.cc-slider { flex: 1; height: 44px; display: flex; align-items: center; touch-action: none; }
.ccs-track { flex: 1; height: 44px; border-radius: 22px; background: rgba(255,255,255,.32); position: relative; overflow: hidden; }
.ccs-track i { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; transition: width 80ms linear; }
.cc-moon { margin-left: 6px; color: #fff; opacity: .9; display: flex; }
.cc-bottom { display: flex; justify-content: space-between; margin-top: 16px; padding: 0 6px; }
.ccb-btn {
  width: 46px; height: 46px; border-radius: 23px;
  background: rgba(255,255,255,.2); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ccb-btn:active { background: rgba(255,255,255,.36); }

/* ---- 通知中心（5.2） ---- */
.nc-panel {
  position: absolute; left: 0; right: 0; top: 0;
  background: rgba(24,24,28,.72);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: 0 0 36px 36px;
  color: #fff; padding: 62px 0 26px;
  max-height: 88%; display: flex; flex-direction: column;
  transform: translateY(-102%);
  transition: transform 460ms var(--ease);
}
.nc.in .nc-panel { transform: translateY(0); }
.nc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 8px; font-size: 22px; font-weight: 700;
}
.nc-clear { font-size: 15px; color: var(--blue); background: rgba(255,255,255,.16); padding: 5px 12px; border-radius: 14px; }
.nc-list { overflow-y: auto; padding: 0 14px; }
.nc-list::-webkit-scrollbar { width: 0; }
.nc-group-title { font-size: 13px; opacity: .65; padding: 8px 4px 4px; }
.nc-item {
  position: relative; overflow: hidden;
  background: rgba(255,255,255,.14); border-radius: 18px;
  padding: 12px 14px; margin-bottom: 10px;
  display: flex; gap: 10px;
  transition: transform 260ms var(--ease);
}
.nc-item.dragging { transition: none; }
.nci-ico {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.nci-main { flex: 1; min-width: 0; }
.nci-top { display: flex; align-items: center; gap: 6px; }
.nci-app { font-size: 13px; opacity: .9; }
.nci-time { font-size: 12px; opacity: .6; }
.nci-title { font-size: 15px; font-weight: 600; margin-top: 2px; }
.nci-body { font-size: 13px; opacity: .8; margin-top: 2px; }
.nc-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--blue); flex: none; margin-top: 6px; }
.nci-actions { position: absolute; right: 0; top: 0; bottom: 0; display: flex; z-index: -1; }
.nci-act { width: 60px; color: #fff; font-size: 14px; }
.nci-act.view { background: rgba(90,90,95,.95); }
.nci-act.del { background: var(--red); }
.nc-item .nci-main, .nc-item .nci-ico, .nc-item .nc-dot { position: relative; z-index: 1; }

/* ---- 应用切换器（5.3） ---- */
.as-title { position: absolute; top: 66px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; opacity: .8; }
.as-track {
  position: absolute; top: 108px; bottom: 130px; left: 0; right: 0;
  display: flex; gap: 16px; padding: 0 40px; overflow-x: auto; overflow-y: hidden;
  align-items: center;
}
.as-track::-webkit-scrollbar { height: 0; }
.as-card { flex: none; width: 240px; }
.asc-preview {
  height: 520px; border-radius: 24px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #fff; backdrop-filter: blur(10px);
}
.asc-appico { opacity: .95; }
.asc-name { font-size: 17px; font-weight: 600; }
.asc-head { display: flex; align-items: center; gap: 6px; color: #fff; margin-top: 8px; justify-content: center; font-size: 13px; }
.as-hint { position: absolute; bottom: 60px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.6); font-size: 12px; }

/* =========================================================
 * 聚焦搜索（4.8）
 * ======================================================= */
.spotlight {
  position: absolute; inset: 0;
  background: rgba(20,20,22,.7);
  backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%);
  color: #fff; display: flex; flex-direction: column;
}
.sp-bar { display: flex; align-items: center; gap: 8px; padding: 4px 16px 8px; flex: none; }
.sp-field {
  flex: 1; height: 36px; border-radius: 10px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; gap: 6px; padding: 0 10px; color: rgba(255,255,255,.7);
}
.sp-input { flex: 1; background: none; border: none; color: #fff; font-size: 17px; }
.sp-input::placeholder { color: rgba(255,255,255,.6); }
.sp-input::-webkit-search-cancel-button { display: none; }
.sp-clear { display: flex; color: rgba(255,255,255,.7); }
.sp-cancel { font-size: 16px; color: var(--blue); padding-left: 4px; }
.sp-body { flex: 1; overflow-y: auto; padding: 0 16px 24px; }
.sp-body::-webkit-scrollbar { width: 0; }
.sp-sec-title { font-size: 13px; opacity: .6; padding: 12px 4px 6px; }
.sp-app { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.sp-app-n { flex: 1; font-size: 17px; }
.sp-open { font-size: 14px; color: var(--blue); background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 14px; }
.sp-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; }
.sp-row-n { font-size: 16px; }
.sp-row-s { font-size: 13px; opacity: .65; flex: 1; text-align: right; }
.sp-sico { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; }

/* =========================================================
 * 设置（5.4）
 * ======================================================= */
.settings { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--group); }
.settings.sub { background: var(--group); }
.set-head { padding: 0 16px 4px; }
.set-title { font-size: 34px; font-weight: 700; margin-bottom: 8px; }
.set-search { height: 36px; border-radius: 10px; background: rgba(118,118,128,.12); display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--text2); }
.set-search-input { flex: 1; border: none; background: none; font-size: 17px; color: var(--text); }
.set-profile {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--r-card);
  margin: 14px 16px 20px; padding: 14px;
  box-shadow: var(--shadow-card);
}
.setp-main { flex: 1; min-width: 0; }
.setp-name { font-size: 20px; font-weight: 600; }
.setp-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
.set-foot { text-align: center; font-size: 12px; color: var(--text2); padding: 20px 30px 40px; line-height: 1.6; }
.set-note { font-size: 12px; color: var(--text2); padding: 8px 32px 20px; line-height: 1.5; }

.disp-mode { display: flex; gap: 8px; padding: 12px 16px; }
.disp-mode .seg-item { height: 34px; }
.disp-preview { padding: 16px 20px 4px; background: var(--card); }
.dsp-t { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.dsp-b { font-size: 15px; color: var(--text2); }
.settings .slider, .settings .slider.light { padding: 0 16px; }
.settings .slider-track { background: rgba(120,120,128,.28); }
.settings .slider.light > .slider-track > .slider-fill { background: #000; }

.wp-current {
  height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.4);
  border-radius: var(--r-card); margin: 14px 16px;
}
.wpc-time { font-size: 56px; font-weight: 600; }
.wpc-date { font-size: 14px; opacity: .9; }
.wp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px 16px 20px; }
.wp-item { text-align: center; }
.wp-preview { height: 116px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); position: relative; }
.wp-name { font-size: 12px; color: var(--text2); margin-top: 6px; }

.st-head { font-size: 13px; color: var(--text2); }
.st-total { font-size: 32px; font-weight: 700; margin-top: 4px; }
.st-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
.st-bars { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.st-bar { display: flex; align-items: center; gap: 8px; }
.stb-n { width: 52px; font-size: 13px; color: var(--text2); flex: none; }
.stb-track { flex: 1; height: 8px; border-radius: 4px; background: var(--group); overflow: hidden; }
.stb-track i { display: block; height: 100%; border-radius: 4px; }
.stb-v { width: 44px; text-align: right; font-size: 12px; color: var(--text2); }
.st-bar-track { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 12px 0 10px; background: var(--group); }
.st-bar-track i { display: block; height: 100%; }
.st-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text2); }
.st-legend span { display: flex; align-items: center; gap: 5px; }
.st-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.center-card { text-align: center; padding: 26px 20px; }
.su-ico { color: var(--blue); display: flex; justify-content: center; margin-bottom: 10px; }
.su-title { font-size: 20px; font-weight: 700; }
.su-desc { font-size: 13px; color: var(--text2); margin-top: 8px; line-height: 1.5; }
