/* MirageOS 外壳样式 — 重写版：SVG 图标体系 / 哈希色相图标瓦片 / 玻璃+颗粒质感
   移植自 wibeos (MIT) 的结构契约保留：所有 ID 与 class 与 shell.js 一一对应 */
:root { /* 今日世界主题会覆盖这些变量 */
  --wp: radial-gradient(1100px 760px at 72% 14%, rgba(226,168,92,.5) 0%, transparent 62%),
        radial-gradient(920px 700px at 14% 86%, rgba(122,152,175,.34) 0%, transparent 58%),
        linear-gradient(168deg, #241e18 0%, #352e27 46%, #161c24 100%);
  --accent: #d9984c;
  --mb-bg: rgba(21,21,27,.52); --mb-fg: #f4f2ee;
  --dock-bg: rgba(255,255,255,.14);
  --win-bg: #f4f3f0;
  --tbar-bg: linear-gradient(#edebe7, #e0ddd7); --tbar-fg: #55524c;
  --font: "Space Grotesk", -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --ink: #f2efe9;
  --ink-2: rgba(244,242,238,.66);
  --ink-3: rgba(244,242,238,.42);
  --hairline: rgba(255,255,255,.13);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden;
             font-family: var(--font);
             -webkit-user-select: none; user-select: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button { font-family: inherit; }
body.dragging { cursor: grabbing; }
body.dragging iframe { pointer-events: none; }

/* 细滚动条（列表区域通用） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(128,128,138,.38); border-radius: 4px;
  border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 桌面 ---------- */
#desktop { position: fixed; inset: 0; background: var(--wp); transition: background .6s; }
#desktop::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 42%, transparent 58%, rgba(6,6,12,.3) 100%); }

/* 全局颗粒：打破数码平面感 */
#grain { position: fixed; inset: 0; z-index: 6000; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; }

/* ---------- 桌面图标（今日热点应用） ---------- */
#dicons { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.dskicon { position: absolute; width: 92px; text-align: center; pointer-events: auto; cursor: default; }
.dskicon .em { font-size: 34px; line-height: 1; text-shadow: 0 2px 5px rgba(0,0,0,.3);
  width: 76px; height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  border-radius: 21px; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 44%),
              linear-gradient(160deg, hsl(var(--hue, 210) 50% 58%), hsl(calc(var(--hue, 210) + 38) 46% 30%) 82%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.14),
              0 10px 22px -6px rgba(8,8,14,.5); }
.dskicon .em::after { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 42%;
  border-radius: 20px 20px 40px 40px / 20px 20px 60px 60px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), transparent); pointer-events: none; }
.dskicon:active .em { filter: brightness(.86); }
.dskicon .nm { font-size: 12px; line-height: 1.35; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9);
  word-break: break-word; background: rgba(8,8,12,.32); border-radius: 6px;
  padding: 1px 6px; max-width: 90px; margin: 6px auto 0;
  width: -moz-fit-content; width: -webkit-fit-content; width: fit-content;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dskicon.pop .em { animation: popin .55s cubic-bezier(.2,1.6,.4,1) backwards; }
@keyframes popin { from { transform: scale(.2) translateY(26px); opacity: 0; } }

/* ---------- 菜单栏 ---------- */
#menubar { position: fixed; top: 0; left: 0; right: 0; height: 28px; z-index: 1000;
  display: flex; align-items: center; padding: 0 10px; gap: 1px;
  background: var(--mb-bg); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: inset 0 -.5px 0 rgba(255,255,255,.09);
  color: var(--mb-fg); font-size: 12.5px; letter-spacing: .01em; }
.mitem { padding: 3px 9px; border-radius: 6px; cursor: default; white-space: nowrap;
  display: inline-flex; align-items: center; transition: background .12s; }
#appleBtn { padding: 3px 10px; }
#appleBtn svg { display: block; }
.mitem.bold { font-weight: 600; }
.mitem.open, .mitem:active { background: rgba(255,255,255,.2); }
#mright { margin-left: auto; display: flex; align-items: center; gap: 15px; font-size: 12px; }
#sigchip { display: inline-flex; align-items: center; gap: 5px; opacity: .92;
  padding: 2.5px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  font-variant-numeric: tabular-nums; }
.mico { display: inline-flex; align-items: center; padding: 3px 5px; margin: 0 -3px;
  border-radius: 6px; cursor: pointer; opacity: .88; transition: opacity .12s, background .12s; }
.mico:hover { opacity: 1; background: rgba(255,255,255,.14); }
.mico-static { display: inline-flex; align-items: center; opacity: .88; }
#clock { font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: .01em; }

#dropdown { position: fixed; z-index: 1001; min-width: 208px; padding: 5px;
  background: rgba(27,27,34,.9); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.12),
              0 18px 46px -10px rgba(4,4,10,.6);
  color: #fff; font-size: 12.5px; }
#dropdown[hidden] { display: none; }
.ditem { padding: 5px 10px; border-radius: 6px; display: flex; justify-content: space-between;
  gap: 26px; cursor: default; transition: background .1s; }
.ditem:hover { background: var(--accent); }
.ditem .key { color: rgba(255,255,255,.48); font-family: var(--mono); font-size: 10.5px;
  padding-top: 1px; }
.ditem:hover .key { color: rgba(255,255,255,.8); }
.dsep { height: 1px; margin: 5px 9px; background: rgba(255,255,255,.12); }

/* ---------- 窗口 ---------- */
#windows { position: fixed; inset: 0; z-index: 500; pointer-events: none; }
.win { pointer-events: auto; }
.win { position: absolute; min-width: 260px; min-height: 160px;
  background: var(--win-bg); border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 55px -14px rgba(6,6,12,.48), 0 0 0 .5px rgba(255,255,255,.3),
              0 0 0 1px rgba(0,0,0,.22);
  display: flex; flex-direction: column;
  animation: winIn .18s cubic-bezier(.2,.9,.3,1); }
@keyframes winIn { from { opacity: 0; transform: scale(.985); } }
.win.front { box-shadow: 0 32px 90px -18px rgba(6,6,12,.62), 0 0 0 .5px rgba(255,255,255,.42),
              0 0 0 1px rgba(0,0,0,.24); }
.tbar { height: 34px; flex: 0 0 34px; display: flex; align-items: center;
  background: var(--tbar-bg); border-bottom: 1px solid rgba(0,0,0,.14);
  cursor: default; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.win:not(.front) .tbar { filter: saturate(.5) contrast(.96); }
.lights { display: flex; gap: 8px; padding: 0 12px; }
.lt { width: 12px; height: 12px; border-radius: 50%; border: .5px solid rgba(0,0,0,.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; line-height: 1; color: transparent;
  font-family: var(--font); transition: filter .1s; }
.lt.red { background: #ff5f57; } .lt.yel { background: #febc2e; } .lt.grn { background: #28c840; }
.lights:hover .lt { color: rgba(0,0,0,.52); }
.lt:hover { filter: brightness(.85); }
.win:not(.front) .lt { background: #cfced2; }
.ttitle { position: absolute; left: 0; right: 0; text-align: center; font-size: 13px;
  font-weight: 600; color: var(--tbar-fg); pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbody { flex: 1; position: relative; background: #fff; }
.wbody iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.rsz { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; z-index: 5; }
.win.mini { display: none; }

/* 流式生成：iframe 即画布，边收边渲染，元素逐个弹出 */
.genpill { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(19,19,25,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 11px; font-family: var(--mono); letter-spacing: .02em;
  padding: 6px 13px 6px 26px; border-radius: 999px; z-index: 7; display: none; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  font-variant-numeric: tabular-nums;
  animation: pulse 1.2s ease-in-out infinite; }
.genpill::before { content: ""; position: absolute; left: 11px; top: 50%; translate: 0 -50%;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); }
.win.generating .genpill { display: block; }
.glitch { position: absolute; top: 10px; right: 10px; z-index: 8; display: none;
  align-items: center; gap: 5px;
  background: rgba(168,118,26,.95); color: #fff; font-size: 11px; font-weight: 500;
  padding: 4px 11px; border-radius: 8px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 14px rgba(0,0,0,.28);
  transition: filter .12s; }
.glitch:hover { filter: brightness(1.1); }
.glitch:active { transform: translateY(1px); }
.win.glitched .glitch { display: flex; }

/* 更新指示：旧内容保持可见，只加一条光带 */
.veil { position: absolute; inset: 0; display: none; align-items: flex-start;
  justify-content: center; background: transparent; z-index: 4; }
.veil::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%; animation: sh 1.1s linear infinite; }
.win.updating .veil { display: flex; }
.vsp { margin-top: 12px; background: rgba(19,19,25,.84); color: #fff; font-size: 11px;
  font-family: var(--mono); padding: 6px 14px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes sh { to { background-position: -200% 0; } }

/* 出错（梦被打断） */
.werr { position: absolute; inset: 0; display: none; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; background: #191920; color: #e9e6df;
  z-index: 6; padding: 20px; text-align: center; }
.werr svg { color: #d9a13c; }
.werr .wt { font-size: 14px; font-weight: 600; }
.win.failed .werr { display: flex; }
.werrmsg { color: var(--ink-3); font-size: 11px; font-family: var(--mono);
  max-width: 88%; line-height: 1.6; word-break: break-all; }
.werr button { background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 7px 20px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: filter .15s, transform .08s; }
.werr button:hover { filter: brightness(1.08); }
.werr button:active { transform: scale(.97); }

/* ---------- Dock ---------- */
#dockwrap { position: fixed; bottom: 10px; left: 0; right: 0; display: flex;
  justify-content: center; z-index: 1000; pointer-events: none; }
#dock { display: flex; align-items: flex-end; gap: 6px; padding: 7px 12px;
  background: var(--dock-bg); -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
  border-radius: 22px; pointer-events: auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.17), inset 0 1px 0 rgba(255,255,255,.22),
              0 18px 44px -12px rgba(5,5,10,.55); }
.dicon { position: relative; padding: 0; cursor: default;
  transition: transform .18s cubic-bezier(.2,1.4,.4,1); transform-origin: bottom center; }
.dicon:hover { transform: scale(1.18) translateY(-3px); }
.dicon:active { filter: brightness(.85); }
.dic { width: 44px; height: 44px; border-radius: 12.5px; display: flex;
  align-items: center; justify-content: center; font-size: 23px; line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.28); position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 46%),
              linear-gradient(160deg, hsl(var(--hue, 210) 48% 56%), hsl(calc(var(--hue, 210) + 36) 44% 30%) 84%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), inset 0 0 0 1px rgba(255,255,255,.12),
              0 6px 14px -4px rgba(8,8,14,.45); }
.dic.sys { color: #f4f2ee;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.1); }
.dicon .dot { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.92);
  box-shadow: 0 0 4px rgba(255,255,255,.5); display: none; }
.dicon.running .dot { display: block; }
.dicon .tip { position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%);
  background: rgba(24,24,30,.93); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #fff; font-size: 11.5px; font-weight: 500; padding: 4px 10px;
  border-radius: 7px; white-space: nowrap; display: none; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 8px 20px rgba(0,0,0,.35); }
.dicon:hover .tip { display: block; }
.dsepv { width: 1px; align-self: stretch; background: rgba(255,255,255,.2); margin: 6px 5px; }

/* ---------- 系统对话框 ---------- */
.sysdlg { position: fixed; inset: 0; z-index: 2000; display: flex;
  align-items: center; justify-content: center; background: rgba(8,8,14,.32);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sysdlg[hidden] { display: none; }
.dlgbox { background: rgba(247,246,243,.98); border-radius: 16px; padding: 26px 30px;
  width: 420px; text-align: center; color: #33322f; max-height: 82vh; overflow: auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 34px 90px -22px rgba(8,8,16,.6),
              0 0 0 .5px rgba(0,0,0,.22);
  animation: dlgIn .22s cubic-bezier(.2,.9,.3,1); }
@keyframes dlgIn { from { opacity: 0; transform: scale(.97) translateY(8px); } }
.dlgbox h2 { font-size: 16px; font-weight: 600; margin: 10px 0 4px; letter-spacing: .01em; }
.dlgbox .dlg-mark { display: block; margin: 2px auto 0; }
.dlgbox p { color: #77756f; margin: 4px 0 16px; line-height: 1.65; }
.dlgbox .dlg-sub { font-size: 12.5px; }
.dlgbox button { background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 8px 22px; font-size: 13px; font-weight: 500; cursor: pointer; margin: 0 4px;
  transition: filter .15s, transform .08s; }
.dlgbox button:hover { filter: brightness(1.07); }
.dlgbox button:active { transform: scale(.97); }
.dlgbox button.alt { background: #e7e5e0; color: #33322f; }
.dlgbox button.alt:hover { background: #dcd9d2; }
.dlgbox button.danger { background: #b3271e; }
.dlgbox button.danger:hover { background: #c23328; }
.dlg-foot { margin-top: 18px; }
/* 关于本机：规格表 */
.spec { display: grid; grid-template-columns: auto 1fr; gap: 7px 22px; width: fit-content;
  margin: 14px auto 16px; text-align: left; font-size: 13px; }
.spec dt { color: #8a887f; }
.spec dd { margin: 0; color: #33322f; }
#aboutWorld { border-top: 1px solid #e3e1da; padding-top: 12px; margin-top: 2px; font-size: 12px; }
#settingsDlg .dlgbox { width: 460px; text-align: left; }
.srow { display: flex; align-items: center; justify-content: space-between;
  padding: 11px 2px; border-bottom: 1px solid #e6e4dd; font-size: 13px; gap: 12px; }
.srow:last-of-type { border-bottom: 0; }
.srow .slab b { display: block; font-weight: 600; }
.srow .slab span { color: #8a887f; font-size: 11.5px; }
.srow button { margin: 0; white-space: nowrap; }

#sleepveil { position: fixed; inset: 0; background: #000; z-index: 3000;
  display: flex; align-items: center; justify-content: center; }
#sleepveil[hidden] { display: none; }
#sleepveil::after { content: "点按任意处唤醒"; color: rgba(255,255,255,.26);
  font-size: 11px; letter-spacing: .42em; text-indent: .42em;
  animation: pulse 2.6s ease-in-out infinite; }

/* ---------- 通知 ---------- */
#toasts { position: fixed; top: 36px; right: 12px; z-index: 2500;
  display: flex; flex-direction: column; gap: 8px; width: 324px; pointer-events: none; }
.toast { position: relative; background: rgba(24,24,31,.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border-radius: 13px; padding: 10px 14px 10px 17px; display: flex; gap: 11px; align-items: flex-start;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), 0 14px 36px -10px rgba(4,4,10,.55);
  cursor: pointer; pointer-events: auto; animation: tin .28s cubic-bezier(.2,.9,.3,1); }
.toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
@keyframes tin { from { transform: translateX(36px); opacity: 0; } }
.toast .ti { font-size: 19px; width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.toast b { font-size: 12.5px; font-weight: 600; display: block; color: #f2efe9; }
.toast p { font-size: 12px; color: rgba(244,242,238,.58); margin: 3px 0 0; line-height: 1.5; }

/* ---------- 想象搜索（Spotlight） ---------- */
#spot { position: fixed; inset: 0; z-index: 2600; background: rgba(8,8,14,.26);
  display: flex; justify-content: center; align-items: flex-start; padding-top: 17vh; }
#spot[hidden] { display: none; }
#spotbox { position: relative; width: 620px; background: rgba(28,28,35,.88);
  -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5);
  border-radius: 16px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.13),
              0 36px 100px -20px rgba(3,3,8,.72);
  animation: dlgIn .2s cubic-bezier(.2,.9,.3,1); }
.sp-ico { position: absolute; left: 19px; top: 19px; color: rgba(255,255,255,.42);
  pointer-events: none; }
#spotin { width: 100%; padding: 17px 20px 15px 54px; font-size: 21px; background: transparent;
  border: 0; outline: 0; color: #fff; -webkit-user-select: text; user-select: text;
  font-family: var(--font); font-weight: 500; letter-spacing: .01em; caret-color: var(--accent); }
#spotin::placeholder { color: rgba(244,242,238,.34); font-weight: 400; }
#spotres { max-height: 330px; overflow: auto; padding: 3px 6px 6px;
  border-top: 1px solid rgba(255,255,255,.08); }
.spr { padding: 8px 12px; display: flex; gap: 12px; align-items: center;
  color: #ece9e3; font-size: 13.5px; cursor: default; border-radius: 9px; }
.spr.sel { background: var(--accent); }
.spr .si { font-size: 19px; width: 24px; text-align: center; }
.spr .st { color: rgba(255,255,255,.44); margin-left: auto; font-size: 11px;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spr.sel .st { color: rgba(255,255,255,.8); }

/* ---------- 启动台 ---------- */
#launchpad { position: fixed; inset: 0; z-index: 2550;
  background: rgba(12,12,18,.5);
  -webkit-backdrop-filter: blur(38px) saturate(1.3); backdrop-filter: blur(38px) saturate(1.3);
  display: flex; flex-direction: column; align-items: center;
  padding-top: 9vh; opacity: 1; transition: opacity .18s; }
#launchpad[hidden] { display: none; }
#launchpad.closing { opacity: 0; }
#lpsearch { width: 330px; padding: 9px 18px; border-radius: 999px; font-size: 14px;
  text-align: center; color: #fff; background: rgba(255,255,255,.12);
  border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); outline: 0; margin-bottom: 44px;
  -webkit-user-select: text; user-select: text; font-family: var(--font); }
#lpsearch:focus { box-shadow: inset 0 0 0 1px rgba(255,255,255,.32); }
#lpsearch::placeholder { color: rgba(255,255,255,.44); }
#lpgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 30px 44px;
  width: min(900px, 86vw); justify-items: center; align-content: start;
  overflow: auto; max-height: 70vh; padding: 4px 8px 40px; }
.lpapp { display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; width: 96px; transition: transform .14s;
  animation: popin .4s cubic-bezier(.2,1.3,.4,1) backwards; }
.lpapp:hover { transform: scale(1.08); }
.lpic { width: 66px; height: 66px; border-radius: 18px; font-size: 31px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  text-shadow: 0 2px 5px rgba(0,0,0,.3); position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 46%),
              linear-gradient(160deg, hsl(var(--hue, 210) 50% 56%), hsl(calc(var(--hue, 210) + 38) 46% 30%) 82%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 0 0 1px rgba(255,255,255,.13),
              0 10px 24px -6px rgba(6,6,12,.4); }
.lpapp .lpname { color: #fff; font-size: 12.5px; font-weight: 500; text-align: center; line-height: 1.25;
  text-shadow: 0 1px 5px rgba(0,0,0,.65); max-width: 96px; }
#lpgrid .lpempty { grid-column: 1 / -1; color: rgba(255,255,255,.5); font-size: 14px;
  text-align: center; padding-top: 30px; }

/* ---------- 调度中心（Mission Control） ---------- */
#mctrl { position: fixed; inset: 0; z-index: 4000; display: none;
  background: rgba(8,10,16,.6); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2); opacity: 0; transition: opacity .22s; }
#mctrl.show { display: block; opacity: 1; }
#mcTitle { position: absolute; top: 26px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-indent: .14em; opacity: .75; }
#mcGrid { position: absolute; inset: 78px 56px 56px; display: flex; flex-wrap: wrap;
  gap: 30px; align-content: center; justify-content: center; }
.mcTile { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer;
  box-shadow: 0 16px 44px -8px rgba(4,4,10,.6), 0 0 0 1px rgba(255,255,255,.1);
  border: 2px solid transparent; background: #fff;
  transition: transform .16s ease, border-color .16s ease;
  transform: scale(.96); animation: mcPop .26s ease forwards; }
@keyframes mcPop { from { transform: scale(.86); opacity: 0; } to { transform: scale(.96); opacity: 1; } }
.mcTile:hover { transform: scale(1.02); border-color: var(--accent, #d9984c); }
.mcTile .mcCap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 11px;
  background: linear-gradient(transparent, rgba(0,0,0,.74)); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
#mcEmpty { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,.72); font-size: 14px;
  flex-direction: column; gap: 14px; }
#mcEmpty svg { opacity: .5; }

/* ---------- 梦境回放 ---------- */
#dreamDlg .dlgbox { width: 620px; }
#dreamGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 14px; }
.dream { border-radius: 11px; overflow: hidden; cursor: default; text-align: left;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
  box-shadow: 0 6px 18px -6px rgba(10,10,18,.18);
  transition: transform .14s, box-shadow .14s; }
.dream:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(10,10,18,.26); }
.dream .dw { height: 90px; background: #241e18; background-size: cover; position: relative; }
.dream .dw .dtag { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 9px;
  background: linear-gradient(transparent, rgba(0,0,0,.68)); color: #fff; font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dream .dmeta { padding: 8px 10px 6px; font-size: 11px; color: #8a887f; }
.dream .dmeta b { display: block; color: #33322f; font-size: 11.5px; margin-bottom: 2px;
  font-weight: 600; font-variant-numeric: tabular-nums; }
.dream .dapps { padding: 0 10px 9px; font-size: 15px; letter-spacing: 2px; line-height: 1.3;
  max-height: 40px; overflow: hidden; }
#dreamEmpty { color: #9a9890; text-align: center; padding: 30px 0 20px; font-size: 13px; }

/* ---------- 开机 ---------- */
#boot { position: fixed; inset: 0; background: #0c0c10; z-index: 5000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; transition: opacity .8s; }
#boot.hidden { opacity: 0; pointer-events: none; }
#blogo { display: flex; flex-direction: column; align-items: center; gap: 22px;
  animation: bfade 1.2s ease; }
@keyframes bfade { from { opacity: 0; } }
#blogo .bword { font-size: 13px; font-weight: 600; letter-spacing: .46em; text-indent: .46em;
  color: #e9e6df; }
#blogo .bword b { font-weight: 400; color: rgba(233,230,223,.5); margin-left: .18em; }
#bbar { width: 200px; height: 2px; background: rgba(255,255,255,.15); border-radius: 1px;
  overflow: hidden; }
#bfill { height: 100%; width: 2%; background: #f2efe9; border-radius: 1px;
  transition: width .9s ease; }
#btag { font-size: 12px; color: rgba(255,255,255,.4); min-height: 18px; letter-spacing: .05em; }
#bsigs { max-width: 480px; max-height: 150px; overflow: hidden; font-size: 10.5px;
  font-family: var(--mono); color: rgba(255,255,255,.32); line-height: 2; }
#bsigs div { animation: sigin .4s ease backwards; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
#bsigs div::before { content: "› "; color: rgba(230,163,77,.55); }
@keyframes sigin { from { opacity: 0; transform: translateX(-12px); } }

/* ---------- 门禁 ---------- */
#lock { position: fixed; inset: 0; background: #0c0c10; z-index: 5500; color: #fff;
  display: flex; align-items: center; justify-content: center; transition: opacity .5s; }
#lock.away { opacity: 0; pointer-events: none; }
#lock[hidden] { display: none; }
#lockbox { display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: bfade 1.2s ease; width: min(320px, 84vw); }
#lockbox .lockword { font-size: 13px; font-weight: 600; letter-spacing: .46em; text-indent: .46em;
  color: #e9e6df; }
#lockbox .lockword b { font-weight: 400; color: rgba(233,230,223,.5); margin-left: .18em; }
#lockbox .locksub { font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: .05em;
  margin-bottom: 16px; }
#lockrow { display: flex; gap: 8px; width: 100%; }
#lockIn { flex: 1; min-width: 0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; color: #f2efe9; font: inherit; font-size: 14px; padding: 10px 14px; outline: none;
  text-align: center; letter-spacing: .3em; transition: border-color .2s, background .2s; }
#lockIn:focus { border-color: rgba(230,163,77,.65); background: rgba(255,255,255,.1); }
#lockIn::placeholder { letter-spacing: .05em; color: rgba(255,255,255,.3); }
#lockGo { background: #e6a34d; color: #141414; border: none; border-radius: 8px; width: 44px;
  font-size: 16px; cursor: pointer; transition: background .2s, transform .15s; }
#lockGo:hover { background: #f0b264; }
#lockGo:active { transform: scale(.94); }
#lockErr { min-height: 18px; font-size: 11.5px; color: #e0705f; letter-spacing: .04em; }
#lock.shake #lockrow { animation: lockshake .4s; }
@keyframes lockshake {
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(4px); }
}

/* ---------- 桌面时钟 ---------- */
#dwidget { position: fixed; top: 66px; right: 30px; z-index: 2; text-align: right;
  color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5); pointer-events: none;
  font-variant-numeric: tabular-nums; user-select: none; opacity: 0; transition: opacity .6s; }
#dwidget.show { opacity: .94; }
#dwTime { font-size: 52px; font-weight: 500; letter-spacing: -0.015em; line-height: 1; }
#dwDate { font-size: 15px; font-weight: 500; margin-top: 7px; opacity: .82; letter-spacing: .02em; }

/* ---------- 动效克制 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
}

/* ---------- 应用集市（固定 UI 框架的原生系统应用） ---------- */
.nbody [hidden] { display: none !important; }
.nbody { flex: 1; position: relative; overflow: hidden; background: #f5f5f7; }
.as { display: flex; height: 100%;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1d1d1f; }
.as-side { flex: 0 0 196px; background: #e9e9eb; border-right: 1px solid rgba(0,0,0,.08);
  display: flex; flex-direction: column; padding: 14px 10px 10px; }
.as-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  padding: 2px 8px 12px; }
.as-brand svg { color: var(--accent); }
.as-nav { display: flex; flex-direction: column; gap: 1px; }
.as-ni { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500; color: #424245; cursor: default;
  transition: background .12s; }
.as-ni svg { opacity: .55; }
.as-ni:hover { background: rgba(0,0,0,.06); }
.as-ni.on { background: #fff; color: #1d1d1f; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.as-ni.on svg { opacity: .9; }
.as-nsep { height: 1px; background: rgba(0,0,0,.09); margin: 8px 6px; }
.as-foot { margin-top: auto; font-size: 10.5px; line-height: 1.7; color: #86868b; padding: 10px 8px 4px; }
.as-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.as-top { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px 10px; }
.as-back { font-size: 12.5px; color: var(--accent); cursor: pointer; white-space: nowrap;
  padding: 5px 8px; border-radius: 7px; }
.as-back:hover { background: rgba(0,0,0,.05); }
.as-search { flex: 1; max-width: 340px; height: 30px; border: 0; border-radius: 8px;
  background: rgba(0,0,0,.055); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
  padding: 0 12px; font-size: 12.5px; color: #1d1d1f; outline: 0;
  -webkit-user-select: text; user-select: text; font-family: inherit; }
.as-search:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--accent), 0 1px 4px rgba(0,0,0,.08); }
.as-search::placeholder { color: #98989d; }
.as-shuffle { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px;
  margin-left: auto; border: 0; border-radius: 8px; background: rgba(0,0,0,.055); color: #3a3a3c;
  font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background .12s, transform .08s, opacity .15s; }
.as-shuffle:hover { background: rgba(0,0,0,.1); }
.as-shuffle:active { transform: scale(.97); }
.as-shuffle.dim { opacity: .45; pointer-events: none; }
.as-scroll { flex: 1; overflow-y: auto; padding: 4px 18px 22px; }

/* 今日主打横幅 */
.as-banner { position: relative; border-radius: 14px; overflow: hidden; margin: 6px 0 16px;
  padding: 20px 22px; display: flex; align-items: center; gap: 18px; color: #fff; cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(8,8,14,.4);
  background: linear-gradient(120deg, hsl(var(--hue, 210) 52% 40%), hsl(calc(var(--hue, 210) + 46) 48% 26%) 78%); }
.as-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 160% at 88% -20%, rgba(255,255,255,.28), transparent 55%); }
.as-bic { font-size: 40px; width: 76px; height: 76px; flex: 0 0 76px; display: flex;
  align-items: center; justify-content: center; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.22),
              0 8px 18px -6px rgba(0,0,0,.4); text-shadow: 0 2px 6px rgba(0,0,0,.3);
  position: relative; z-index: 1; }
.as-btx { position: relative; z-index: 1; min-width: 0; }
.as-bkick { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-indent: .18em;
  opacity: .82; margin-bottom: 5px; }
.as-bname { font-size: 21px; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.as-btag { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.as-bbtn { position: relative; z-index: 1; margin-left: auto; border: 0; border-radius: 999px;
  padding: 8px 20px; font-size: 13px; font-weight: 600; color: #1d1d1f;
  background: rgba(255,255,255,.92); cursor: pointer;
  transition: transform .1s, background .15s; box-shadow: 0 4px 12px -3px rgba(0,0,0,.35); }
.as-bbtn:hover { background: #fff; }
.as-bbtn:active { transform: scale(.96); }

/* 商品列表 */
.as-sechead { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 10px; }
.as-title { font-size: 15px; font-weight: 700; }
.as-count { font-size: 11.5px; color: #86868b; }
.as-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px;
  font-family: var(--mono); color: #6e6e73; background: rgba(0,0,0,.05);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
  animation: pulse 1.2s ease-in-out infinite; }
.as-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.as-list { display: flex; flex-direction: column; gap: 8px; }
.as-card { display: flex; align-items: center; gap: 13px; background: #fff; border-radius: 12px;
  padding: 11px 14px 11px 11px; cursor: pointer;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.04);
  transition: transform .14s, box-shadow .14s;
  animation: asPop .4s cubic-bezier(.2,1.3,.4,1) backwards; }
.as-card:hover { transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px rgba(10,10,18,.18), 0 0 0 .5px rgba(0,0,0,.05); }
@keyframes asPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.as-ic { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 13px; font-size: 25px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  text-shadow: 0 2px 5px rgba(0,0,0,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 46%),
              linear-gradient(160deg, hsl(var(--hue, 210) 50% 57%), hsl(calc(var(--hue, 210) + 38) 46% 31%) 84%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 0 0 1px rgba(255,255,255,.13),
              0 6px 14px -5px rgba(8,8,14,.4); }
.as-mid { min-width: 0; flex: 1; }
.as-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.as-tag { font-size: 12px; color: #6e6e73; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-top: 2px; }
.as-meta { font-size: 11px; color: #98989d; margin-top: 3px; font-variant-numeric: tabular-nums; }
.as-get { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 6px 16px; min-width: 60px;
  font-size: 12.5px; font-weight: 600; color: #fff; background: var(--accent); cursor: pointer;
  transition: filter .15s, transform .08s; box-shadow: 0 3px 8px -2px rgba(0,0,0,.25); }
.as-get:hover { filter: brightness(1.08); }
.as-get:active { transform: scale(.95); }
.as-get.open { background: rgba(0,0,0,.06); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent); }
.as-empty { color: #98989d; font-size: 12.5px; text-align: center; padding: 34px 0 26px; }

/* 上架中骨架屏 */
.as-skel .as-srow { display: flex; align-items: center; gap: 13px; background: #fff;
  border-radius: 12px; padding: 11px; margin-bottom: 8px; }
.sk-mid { flex: 1; }
.sk-ic { width: 50px; height: 50px; border-radius: 13px; flex: 0 0 50px; }
.sk-ln { height: 12px; border-radius: 6px; width: 46%; margin-bottom: 8px; }
.sk-ln.s2 { width: 30%; margin-bottom: 0; }
.sk-btn { margin-left: auto; width: 60px; height: 28px; border-radius: 999px; }
.sk-ic, .sk-ln, .sk-btn { background: linear-gradient(100deg, #ececef 40%, #f7f7f9 50%, #ececef 60%);
  background-size: 200% 100%; animation: sksh 1.3s linear infinite; }
@keyframes sksh { to { background-position: -200% 0; } }

/* 上架失败 */
.as-err { text-align: center; padding: 40px 0 30px; color: #6e6e73; display: flex;
  flex-direction: column; gap: 8px; align-items: center; }
.as-err svg { color: #d9a13c; }
.as-ert { font-size: 13.5px; font-weight: 600; color: #1d1d1f; }
.as-ermsg { font-size: 11px; font-family: var(--mono); max-width: 80%; word-break: break-all; }
.as-retry { border: 0; border-radius: 9px; padding: 7px 20px; font-size: 12.5px; font-weight: 600;
  color: #fff; background: var(--accent); cursor: pointer; transition: filter .15s; }
.as-retry:hover { filter: brightness(1.08); }
