/* ============ 桌面外壳 ============ */
#desktop { position: fixed; inset: 0; z-index: 1; }

/* ---------- App 图标 ---------- */
.app-icon {
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 24%;
  background: linear-gradient(155deg, var(--g1), var(--g2));
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .55),
    inset 0 -3px 8px rgba(0, 0, 0, .16),
    0 4px 14px rgba(0, 0, 0, .22);
  overflow: hidden;
  transition: transform .3s var(--ease-spring);
}
.app-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 50%);
}
.app-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.app-icon .glyph {
  position: relative; z-index: 1;
  width: 54%; height: 54%;
  filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, .28));
}
.app-icon.is-glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .2));
  -webkit-backdrop-filter: blur(12px) saturate(1.6); backdrop-filter: blur(12px) saturate(1.6);
  color: #4a5160;
}
.app-icon.is-glass .glyph { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6)); }
.app-icon.lg { width: 64px; height: 64px; }
.app-icon.placeholder { background: var(--card); color: var(--text-3); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.app-icon.placeholder::before { display: none; }

/* ---------- 菜单栏（macOS：通栏、透明） ---------- */
#menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  height: var(--menubar-h);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 8px;
  font-size: 13px; color: #fff;
  text-shadow: 0 0 8px rgba(0, 0, 0, .22);
  background: linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, 0));
}
[data-wptone="light"] #menubar { color: #1d1d1f; text-shadow: none; background: linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, 0)); }
.mb-side { display: flex; align-items: center; height: 100%; }
.mb-item {
  height: 22px; padding: 0 9px; border-radius: 6px;
  display: flex; align-items: center; gap: 5px;
  font-weight: 400; white-space: nowrap; color: inherit;
  transition: background .1s;
}
button.mb-item:hover { background: rgba(255, 255, 255, .14); }
.mb-item.active { background: rgba(255, 255, 255, .24); }
[data-wptone="light"] button.mb-item:hover { background: rgba(0, 0, 0, .06); }
[data-wptone="light"] .mb-item.active { background: rgba(0, 0, 0, .1); }
.mb-logo { padding: 0 11px; }
.mb-logo .logo { width: 14px; height: 14px; }
.mb-app { font-weight: 700; }
.mb-stat { font-size: 12.5px; font-variant-numeric: tabular-nums; padding: 0 7px; }
.mb-stat .glyph, .mb-icon .glyph { width: 15px; height: 15px; stroke-width: 2; }
.mb-icon { padding: 0 8px; }
.mb-wifi.off { opacity: .35; }
.mb-clock { font-variant-numeric: tabular-nums; gap: 7px; padding: 0 10px; }

.bat { position: relative; width: 23px; height: 11.5px; border-radius: 3.5px; border: 1.2px solid currentColor; padding: 1.2px; opacity: .9; }
.bat::after { content: ""; position: absolute; right: -3.6px; top: 3.2px; width: 2px; height: 3.6px; border-radius: 0 1px 1px 0; background: currentColor; }
.bat i { display: block; height: 100%; border-radius: 1.6px; background: currentColor; }
.bat.charging i { background: #34c759; }

/* ---------- 浮层：菜单 / 面板（macOS） ---------- */
.floating {
  position: fixed; z-index: 2700;
  border-radius: 12px;
  color: var(--text);
  --glass-bg: var(--glass-bg-strong);
  animation: float-in .14s ease-out;
  transform-origin: top left;
}
.floating.closing { animation: float-out .18s ease-in forwards; pointer-events: none; }
@keyframes float-in { from { opacity: 0; } }
@keyframes float-out { to { opacity: 0; } }

.menu { min-width: 230px; padding: 5px; font-size: 13px; border-radius: 12px; }
.menu-item {
  width: 100%; height: 24px; padding: 0 10px 0 2px; border-radius: 7px;
  display: flex; align-items: center; gap: 0; text-align: left;
}
.menu-item:hover:not(:disabled) { background: var(--accent); color: #fff; }
.menu-item:hover:not(:disabled) .mi-key { color: rgba(255, 255, 255, .85); }
.menu-item:disabled { color: var(--text-3); }
.mi-check { width: 20px; display: grid; place-items: center; }
.mi-check .glyph { width: 12px; height: 12px; stroke-width: 2.6; }
.mi-label { flex: 1; white-space: nowrap; }
.mi-key { color: var(--text-3); font-size: 13px; margin-left: 24px; letter-spacing: .06em; }
.menu-sep { height: 1px; background: var(--line-2); margin: 5px 10px; }
.menu-head { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 4px 10px 3px 22px; }

.panel { width: 320px; padding: 10px; border-radius: 22px; }

/* 控制中心（macOS） */
.cc-mac { display: flex; flex-direction: column; gap: 8px; }
.ccm-top { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.ccm-mod { position: relative; border-radius: 16px; padding: 10px; background: var(--card); box-shadow: inset 0 0 0 .5px var(--line), 0 1px 3px rgba(0, 0, 0, .06); text-align: left; }
.ccm-list { display: flex; flex-direction: column; gap: 10px; }
.ccm-row { display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.ccm-row b, .ccm-tile b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.ccm-row small, .ccm-tile small { display: block; font-size: 11px; color: var(--text-2); }
.ccm-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--hover); color: var(--text); transition: background .2s, color .2s; }
.ccm-ico .glyph { width: 15px; height: 15px; }
.ccm-row.on .ccm-ico, .ccm-tile.on .ccm-ico { background: var(--accent); color: #fff; }
.ccm-ico.plain { background: var(--hover); }
.ccm-col { display: grid; gap: 8px; }
.ccm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; cursor: pointer; }
.ccm-tile:disabled { opacity: .5; cursor: default; }
.ccm-label { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.ccm-slider {
  --p: 50%;
  position: relative; height: 24px; border-radius: 999px; overflow: hidden; cursor: pointer; touch-action: none;
  background: var(--hover); box-shadow: inset 0 0 0 .5px var(--line);
}
.ccm-slider i { position: absolute; inset: 0 auto 0 0; width: max(24px, var(--p)); border-radius: 999px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 4px rgba(0, 0, 0, .2); }
[data-theme="dark"] .ccm-slider i { background: #e8e8ed; }
.ccm-slider .glyph { position: absolute; left: 6px; top: 5px; width: 14px; height: 14px; color: #6e6e73; }
.ccm-row-mod { display: flex; align-items: center; justify-content: space-between; }
.ccm-row-mod .ccm-label { margin: 0; }
.ccm-link { font-size: 13px; text-align: center; cursor: pointer; padding: 8px; }
.ccm-link:hover { background: var(--card-hover); }
.cc-walls { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cc-wall { aspect-ratio: 1.3; border-radius: 7px; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); cursor: pointer; transition: transform .2s var(--ease-spring); }
.cc-wall:hover { transform: scale(1.06); }
.cc-wall.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-accents, .accent-row { display: flex; gap: 7px; }
.cc-accent { width: 18px; height: 18px; border-radius: 50%; background: var(--c); cursor: pointer; transition: transform .2s var(--ease-spring); }
.cc-accent:hover { transform: scale(1.15); }
.cc-accent.on { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--c); }

/* 日历 */
.cal { width: 290px; }
.cal-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.cal-head b { font-size: 17px; }
.cal-head span { font-size: 12px; color: var(--text-2); }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; }
.cal-week { color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.cal-days span { height: 32px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-days .today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-year { margin-top: 10px; font-size: 11px; color: var(--text-2); }
.cal-year i, .w-year i { display: block; height: 4px; border-radius: 4px; margin-top: 5px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }

/* ---------- 小组件 ---------- */
#widgets {
  position: absolute; left: 20px; top: 42px; z-index: 1;
  width: 300px; display: flex; flex-direction: column; gap: 14px;
}
.widget { position: relative; border-radius: 26px; padding: 16px; }
.w-clock { display: flex; align-items: center; gap: 16px; }
.w-clock-face { width: 92px; height: 92px; flex: none; }
.w-clock-face .face { fill: var(--card); stroke: var(--line); }
.w-clock-face .ticks line { stroke: var(--text-2); stroke-width: 1.8; stroke-linecap: round; }
.w-clock-face .hand { stroke: var(--text); stroke-linecap: round; }
.w-clock-face .hh { stroke-width: 4; }
.w-clock-face .mh { stroke-width: 2.6; }
.w-clock-face .sh { stroke: var(--accent); stroke-width: 1.3; }
.w-clock-face .pivot { fill: var(--accent); }
.w-clock-text { min-width: 0; flex: 1; }
.w-greet { font-size: 22px; font-weight: 700; line-height: 1.2; }
.w-date { font-size: 12.5px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.w-year { margin-top: 10px; font-size: 11px; color: var(--text-2); }

.w-profile-top { display: flex; align-items: center; gap: 12px; }
.w-name { font-size: 16px; font-weight: 700; }
.w-status { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.w-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 0 rgba(52, 199, 89, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }
.w-motto { margin: 12px 0; font-size: 13px; color: var(--text-2); }
.w-actions { display: flex; gap: 6px; }
.w-actions button {
  flex: 1; font-size: 12px; font-weight: 600; padding: 6px 0; border-radius: 999px;
  background: var(--hover); cursor: pointer; transition: background .15s, color .15s, transform .25s var(--ease-spring);
}
.w-actions button:hover { background: var(--accent); color: #fff; }
.w-actions button:active { transform: scale(.95); }

/* ---------- 桌面图标 ---------- */
#icons { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.d-icon {
  position: absolute; width: 92px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: auto; touch-action: none; border-radius: 12px;
}
.d-icon .app-icon { width: 58px; height: 58px; }
.d-icon::before {
  content: ""; position: absolute; left: 13px; right: 13px; top: 2px; height: 66px;
  border-radius: 16px; background: rgba(0, 0, 0, .16); opacity: 0; transition: opacity .12s;
}
.d-icon.selected::before { opacity: 1; }
.d-label {
  position: relative;
  font-size: 12px; font-weight: 500; line-height: 1.35; text-align: center;
  color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  padding: 1px 7px; border-radius: 6px;
}
.d-icon.selected .d-label { background: var(--accent); text-shadow: none; }
.d-icon.dragging { z-index: 5; opacity: .9; }
.d-icon.dragging .app-icon { transform: scale(1.08); }
#icons.settling .d-icon { transition: left .25s var(--ease-out), top .25s var(--ease-out); }

/* ---------- Dock ---------- */
#dock {
  position: fixed; left: 0; right: 0; bottom: 10px; z-index: 1500;
  display: flex; justify-content: center; pointer-events: none;
}
.dock { position: relative; pointer-events: auto; padding: 7px 8px; }
/* 底板单独一层：放大时只改它的左右边距，图标全部走 transform */
.dock-bg { position: absolute; inset: 0; border-radius: 26px; }
.dock-row { position: relative; display: flex; align-items: flex-end; gap: 6px; height: var(--base); }
.dock-item { position: relative; flex: none; width: var(--base); height: var(--base); }
/* 图标按最大尺寸绘制，平时缩小显示；放大时缩放比例趋近 1，始终清晰 */
.dock-mag {
  position: absolute; left: 50%; bottom: 0;
  width: calc(var(--base) * var(--max)); height: calc(var(--base) * var(--max));
  margin-left: calc(var(--base) * var(--max) / -2);
  transform: scale(calc(1 / var(--max))); transform-origin: 50% 100%;
  will-change: transform; /* 按最大尺寸栅格化一次，之后放大缩小都不用重画 */
}
.dock-mag .app-icon { width: 100%; height: 100%; }
.dock-item:active .app-icon { filter: brightness(.82); }
.dock-item.bounce .app-icon { animation: dock-bounce .62s cubic-bezier(.3, .6, .4, 1); }
@keyframes dock-bounce {
  0%, 100% { transform: translateY(0); }
  28% { transform: translateY(-42px); }
  56% { transform: translateY(0); }
  76% { transform: translateY(-14px); }
}
.dock-dot {
  position: absolute; left: 50%; bottom: -5px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--text); opacity: 0; transition: opacity .2s;
}
.dock-item.running .dock-dot { opacity: .75; }
.dock-tipwrap { position: absolute; left: 50%; bottom: calc(var(--base) + 14px); width: 0; pointer-events: none; }
.dock-tip {
  position: absolute; left: 0; bottom: 0;
  transform: translate(-50%, 4px);
  white-space: nowrap; font-size: 13px; font-weight: 500;
  padding: 3px 10px; border-radius: 7px;
  background: var(--glass-bg-strong); color: var(--text);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2), inset 0 0 0 .5px var(--line-2);
  opacity: 0; transition: opacity .15s, transform .15s;
}
.dock-item:hover .dock-tip { opacity: 1; transform: translate(-50%, 0); }
.dock-sep { width: 1px; align-self: stretch; margin: 6px 3px; background: var(--line-2); }

/* ---------- 入场 ---------- */
#desktop.entering #menubar { animation: drop-in .75s var(--ease-out) both; }
#desktop.entering #dock { animation: rise-in .9s var(--ease-spring) .1s both; }
#desktop.entering .d-icon,
#desktop.entering .widget { animation: pop-in .55s var(--ease-spring) both; animation-delay: calc(.25s + var(--i, 0) * 45ms); }
@keyframes drop-in { from { transform: translateY(-46px); opacity: 0; } }
@keyframes rise-in { from { transform: translateY(110px); } }
@keyframes pop-in { from { transform: scale(.6) translateY(10px); opacity: 0; } }

/* ============ 手机外壳 ============ */
html.mobile { --menubar-h: calc(44px + env(safe-area-inset-top)); }
.shell-mobile #menubar {
  height: var(--menubar-h); z-index: 2600;
  padding: env(safe-area-inset-top) 20px 0 30px;
  color: #fff; display: block;
  transition: color .3s;
}
html.mobile.app-open .shell-mobile #menubar { color: var(--text); }
html.mobile.app-open.app-dark .shell-mobile #menubar { color: #fff; }
.sb { height: 44px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; }
.sb-time { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sb-right { pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 8px 0 8px 14px; color: inherit; }
.sb-right .glyph { width: 17px; height: 17px; stroke-width: 2.2; }
.sb-signal { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.sb-signal i { width: 3px; border-radius: 1px; background: currentColor; }
.sb-signal i:nth-child(1) { height: 4px; } .sb-signal i:nth-child(2) { height: 6px; }
.sb-signal i:nth-child(3) { height: 8.5px; } .sb-signal i:nth-child(4) { height: 11px; }

.shell-mobile #icons {
  position: fixed; left: 0; right: 0;
  top: var(--menubar-h);
  bottom: calc(112px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; pointer-events: auto;
}
.m-pages { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.m-pages::-webkit-scrollbar { display: none; }
.m-page { flex: 0 0 100%; scroll-snap-align: start; padding: 10px 22px; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 22px; column-gap: 8px; }
.m-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 11.5px; font-weight: 500; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.m-icon .app-icon { width: min(62px, 15.5vw); height: min(62px, 15.5vw); }
.m-icon:active .app-icon, .m-icon.pressed .app-icon { transform: scale(.88); filter: brightness(.85); }
.m-widget { position: relative; border-radius: 28px; padding: 16px; }
.m-w-clock .w-clock-face { width: 86px; height: 86px; }
.m-bottom { position: relative; height: 40px; display: grid; place-items: center; }
.m-search {
  position: relative; height: 30px; padding: 0 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #fff;
  --glass-bg: rgba(255, 255, 255, .16); --glass-hi: rgba(255, 255, 255, .5); --glass-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transition: opacity .25s, transform .3s var(--ease-spring);
}
.m-search .glyph { width: 14px; height: 14px; stroke-width: 2.4; }
.m-dots { position: absolute; display: flex; gap: 8px; opacity: 0; transition: opacity .25s; }
.m-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: background .2s; }
.m-dots i.on { background: #fff; }
.m-bottom.paging .m-search { opacity: 0; transform: scale(.9); }
.m-bottom.paging .m-dots { opacity: 1; }
.shell-mobile #dock { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10; display: block; }
.m-dock { position: relative; pointer-events: auto; display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; padding: 14px 12px; border-radius: 34px; }
.m-dock .m-label { display: none; }
.m-w-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.m-w-head .glyph { width: 15px; height: 15px; }
.m-w-covers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-w-cover {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 9px 10px;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, .3), transparent 55%), linear-gradient(140deg, var(--c1), var(--c2));
}
.m-w-cover .glyph { width: 20px; height: 20px; }
.m-w-cover b { font-size: 12px; font-weight: 600; }
.m-w-now ul { margin: 0; padding-left: 1.1em; font-size: 13.5px; line-height: 1.8; }
.m-cc { width: min(340px, calc(100vw - 20px)); }

/* 打开 App 时主屏幕放大淡出，回到主屏幕时收回来（iOS） */
html.mobile #icons, html.mobile #dock { transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s ease, filter .4s; transform-origin: 50% 45%; }
html.mobile.app-active #icons, html.mobile.app-active #dock { transform: scale(1.12); opacity: 0; }
html.mobile.app-active.app-peek #icons, html.mobile.app-active.app-peek #dock { transform: scale(1.04); opacity: .55; transition-duration: .3s; }

/* 图片图标 */
.app-icon.has-img { background: #fff; }
.app-icon.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-icon.has-img::before { z-index: 1; opacity: .55; }
.app-icon.has-img::after { z-index: 1; }

/* 手机状态栏颜色：跟随壁纸明暗，打开 App 后跟随 App */
.shell-mobile #menubar { background: none; text-shadow: none; }
[data-wptone="light"] .shell-mobile #menubar { color: #1d1d1f; }

/* ============ 控制中心（iOS） ============ */
.icc {
  position: fixed; inset: 0; z-index: 3100;
  padding: calc(env(safe-area-inset-top) + 64px) 0 0;
  display: flex; flex-direction: column; align-items: center;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4);
  color: #fff; animation: icc-in .3s ease-out;
}
.icc.closing { animation: icc-out .26s ease-in forwards; }
@keyframes icc-in { from { background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } }
@keyframes icc-out { to { opacity: 0; transform: translateY(-30px); } }
.icc-grid {
  --cell: min(74px, calc((100vw - 32px - 3 * 16px) / 4));
  display: grid; grid-template-columns: repeat(4, var(--cell)); grid-auto-rows: var(--cell); gap: 16px;
}
.icc-mod {
  position: relative; border-radius: 22px;
  --glass-bg: rgba(255, 255, 255, .14); --glass-hi: rgba(255, 255, 255, .45); --glass-shadow: none;
}
.icc-conn { grid-column: span 2; grid-row: span 2; display: grid; grid-template-columns: 1fr 1fr; place-items: center; padding: 10px; border-radius: 28px; }
.icc-round { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #fff; transition: background .2s, transform .25s var(--ease-spring); }
.icc-round:active { transform: scale(.9); }
.icc-round.on { background: var(--accent); }
.icc-round:disabled { opacity: .4; }
.icc-round .glyph { width: 24px; height: 24px; }
.icc-walls { grid-column: span 2; grid-row: span 2; border-radius: 28px; padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: center; }
.icc-walls .cc-wall { aspect-ratio: 1; border-radius: 10px; }
.icc-slider {
  --p: 50%;
  grid-row: span 2; overflow: hidden; border-radius: 26px; cursor: pointer; touch-action: none;
}
.icc-slider i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); background: #fff; }
.icc-slider .glyph { position: absolute; left: 50%; bottom: 14px; width: 24px; height: 24px; transform: translateX(-50%); color: #8e8e93; z-index: 1; }
.icc-accents { grid-row: span 2; display: grid; grid-template-columns: 1fr 1fr; place-items: center; padding: 12px 8px; border-radius: 26px; }
.icc-accents .cc-accent { width: 22px; height: 22px; }
.icc-accents .cc-accent.on { box-shadow: 0 0 0 2px rgba(0, 0, 0, .3), 0 0 0 4px var(--c); }
.icc-btn { border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .25s var(--ease-spring); }
.icc-btn:active { transform: scale(.9); }
.icc-btn .glyph { width: 26px; height: 26px; }
.icc-hint { margin-top: 18px; font-size: 12px; opacity: .6; text-align: center; padding: 0 20px; }

/* ============ 通知 ============ */
.notices {
  position: fixed; z-index: 2800; top: calc(var(--menubar-h) + 8px); right: 12px; width: 344px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
html.mobile .notices { top: calc(env(safe-area-inset-top) + 8px); left: 8px; right: 8px; width: auto; }
.notice {
  position: relative; pointer-events: auto; cursor: pointer;
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 20px;
  color: var(--text); --glass-bg: var(--glass-bg-strong);
}
html.mobile .notice { border-radius: 24px; }
.notice-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #4c7dff, #9a6bff); }
.notice-icon .logo { width: 60%; height: 60%; }
.notice-text { flex: 1; min-width: 0; }
.notice-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.notice-head small { color: var(--text-3); font-size: 12px; }
.notice p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.notice-close {
  position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-solid); color: var(--text-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2), inset 0 0 0 .5px var(--line-2); opacity: 0; transition: opacity .15s;
}
.notice:hover .notice-close { opacity: 1; }
.notice-close .glyph { width: 10px; height: 10px; stroke-width: 3; }
html.mobile .notice-close { display: none; }

/* ============ 聚焦搜索 ============ */
.spot { position: fixed; inset: 0; z-index: 3300; display: flex; justify-content: center; padding-top: 18vh; animation: fade-in .15s; }
.spot.closing { animation: fade-out .18s forwards; }
@keyframes fade-out { to { opacity: 0; } }
.spot-box { width: min(680px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; animation: spot-in .25s var(--ease-spring); }
@keyframes spot-in { from { transform: scale(.96); opacity: 0; } }
.spot-bar {
  position: relative; height: 54px; border-radius: 999px; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  color: var(--text); --glass-bg: var(--glass-bg-strong);
}
.spot-bar > .glyph { width: 22px; height: 22px; color: var(--text-2); }
.spot-bar input { flex: 1; min-width: 0; border: 0; background: none; font-size: 21px; color: var(--text); }
.spot-bar input::placeholder { color: var(--text-3); }
.spot-bar input::-webkit-search-cancel-button { display: none; }
.spot-results {
  max-height: 52vh; overflow: auto; padding: 8px; border-radius: 22px;
  background: var(--glass-bg-strong); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: var(--glass-shadow), inset 0 0 0 .5px var(--line-2); color: var(--text);
}
.spot-results h4 { margin: 8px 10px 4px; font-size: 11px; font-weight: 700; color: var(--text-3); }
.spot-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; text-align: left; cursor: pointer; }
.spot-item .app-icon, .spot-glyph { width: 32px; height: 32px; border-radius: 8px; }
.spot-item .app-icon .glyph { width: 60%; height: 60%; }
.spot-item span:last-child { display: flex; flex-direction: column; min-width: 0; }
.spot-item b { font-size: 14px; font-weight: 500; }
.spot-item small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-item.sel { background: var(--accent); color: #fff; }
.spot-item.sel small { color: rgba(255, 255, 255, .8); }
.spot-glyph { flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--c1, #8e95a5), var(--c2, #4b5263)); }
.spot-glyph.note { background: linear-gradient(140deg, #ffd84d, #f5a524); }
.spot-glyph.video { background: linear-gradient(140deg, #ff4d6d, #c9184a); }
.spot-glyph .glyph { width: 18px; height: 18px; }
.spot-empty { margin: 14px; color: var(--text-3); font-size: 14px; }
.spot.no-anim, .spot.no-anim .spot-box { animation: none; }
.spot.is-mobile { padding: calc(env(safe-area-inset-top) + 12px) 0 0; background: rgba(0, 0, 0, .25); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.spot.is-mobile .spot-box { position: relative; }
.spot.is-mobile .spot-bar { height: 44px; padding: 0 14px; margin-right: 56px; }
.spot.is-mobile .spot-bar input { font-size: 17px; }
.spot-cancel { position: absolute; right: 0; top: 0; height: 44px; font-size: 16px; color: #fff; padding: 0 4px; }
.spot.is-mobile .spot-results { max-height: calc(100dvh - 120px); }

/* ============ 动画辅助 ============ */
.genie-layer { position: fixed; inset: 0; z-index: 1900; pointer-events: none; }
.genie-strip { pointer-events: none; will-change: transform; }
.genie-strip .win-frame { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--surface-solid); box-shadow: none; }
.genie-strip .rz { display: none; }
.icon-ghost { border-radius: 24%; }

/* 系统风格图标（SVG 原创绘制） */
.app-icon.art { background: none; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 3px 10px rgba(0, 0, 0, .22); border-radius: 22.5%; }
.app-icon.art svg.art, .app-icon.no-tile svg.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.app-icon.art::before { opacity: .6; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 42%); }
.app-icon.art::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); z-index: 1; }
.app-icon.no-tile { background: none; box-shadow: none; overflow: visible; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
.app-icon.no-tile::before, .app-icon.no-tile::after { display: none; }

/* 浅色壁纸上，桌面和主屏幕的文字改用深色 */
[data-wptone="light"] .d-label { color: #1d1d1f; text-shadow: 0 0 6px rgba(255, 255, 255, .7); }
[data-wptone="light"] .d-icon.selected .d-label { color: #fff; text-shadow: none; }
[data-wptone="light"] .m-icon { color: #1d1d1f; text-shadow: 0 0 6px rgba(255, 255, 255, .6); }
[data-wptone="light"] .m-search { color: #1d1d1f; }
[data-wptone="light"] .m-dots i { background: rgba(0, 0, 0, .2); }
[data-wptone="light"] .m-dots i.on { background: #1d1d1f; }
