/* ============================================================
   Abhi OS 11 — "Aero Dusk"
   An original shell with a Kathmandu-dusk skin.
   One stylesheet, zero external assets.
   ============================================================ */

/* ---------- fonts (self-hosted fallback; Segoe UI when present) ---------- */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Aero Dusk tokens (default) ---------- */
:root {
  --bg: #0B1B2B;
  --surface: #F5F8FC;        /* window body        */
  --surface-2: #E8EEF6;      /* raised controls    */
  --surface-3: #DCE6F1;
  --ink: #18202A;
  --muted: #5B6876;
  --rule: #AEBCCB;
  --rule-soft: #D6DFE9;
  --accent: #2F7FD1;
  --accent-ink: #FFFFFF;
  --error: #C0392B;
  --ok: #2E8B57;

  --frame: #7EA7CF;
  --title-a: #F6FBFF;
  --title-b: #DCEBF9;
  --title-c: #C4DCF2;
  --glass: rgba(255, 255, 255, .38);

  --taskbar-a: rgba(96, 116, 136, .55);
  --taskbar-b: rgba(31, 46, 61, .94);
  --taskbar-c: rgba(15, 26, 38, .97);

  --font-sans: "Segoe UI", "Segoe UI Variable Text", "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "Consolas", "IBM Plex Mono", ui-monospace, monospace;
  --font-ui: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;

  --r-win: 8px;
  --r-ctl: 3px;

  --shadow-win: 0 0 0 1px rgba(255, 255, 255, .55) inset, 0 18px 44px rgba(2, 8, 16, .55), 0 3px 10px rgba(2, 8, 16, .4);
  --shadow-panel: 0 12px 40px rgba(2, 8, 16, .55), 0 2px 8px rgba(2, 8, 16, .4);

  --mb-h: 46px;
  --dock-h: 46px;
  --stagger: 60ms;
}

/* ---------- Aero Basic (light) ---------- */
[data-theme="light"] {
  --bg: #CFE2F3;
  --surface: #FFFFFF;
  --surface-2: #F3F7FB;
  --surface-3: #E7EEF6;
  --ink: #16202B;
  --muted: #5D6B7A;
  --rule: #A9BCCF;
  --rule-soft: #DCE5EE;
  --accent: #1F5FAF;
  --accent-ink: #FFFFFF;
  --error: #B03A2E;
  --frame: #8FB3D6;
  --title-a: #FFFFFF;
  --title-b: #E6F1FB;
  --title-c: #D1E4F6;
  --taskbar-a: rgba(208, 224, 238, .72);
  --taskbar-b: rgba(116, 141, 164, .93);
  --taskbar-c: rgba(74, 100, 124, .96);
  --shadow-win: 0 0 0 1px rgba(255, 255, 255, .8) inset, 0 16px 38px rgba(20, 40, 60, .3), 0 2px 8px rgba(20, 40, 60, .2);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
kbd {
  font-family: var(--font-mono); font-size: .8em; border: 1px solid var(--rule);
  border-bottom-width: 2px; border-radius: 3px; padding: 0 .38em; background: var(--surface-2);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(60rem 30rem at 50% 110%, #12304F 0%, transparent 65%), #05080C;
  display: grid; place-content: center; justify-items: center; gap: .55rem;
  color: #E8F2FB;
}
.boot-logo svg { width: 56px; height: 56px; border-radius: 10px; box-shadow: 0 4px 18px rgba(0, 0, 0, .55); }
.boot-name { font-size: 1.5rem; letter-spacing: .01em; font-weight: 300; }
.boot-sub { color: #9FB4C9; font-size: .9rem; }
.boot-bar { width: 180px; height: 4px; margin-top: .8rem; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.boot-bar-core { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #9FD0FF, transparent); animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }

/* ---------- lock / logon ---------- */
.lock {
  position: fixed; inset: 0; z-index: 90;
  display: grid; grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(60rem 26rem at 50% 112%, rgba(120, 176, 230, .38), transparent 70%),
    radial-gradient(44rem 20rem at 82% -6%, rgba(217, 164, 65, .10), transparent 65%),
    linear-gradient(#0A1725 0%, #0F2437 42%, #173A57 74%, #1E4B6B 100%);
  color: #F2F7FC;
  overflow: hidden;
}
.lock::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 14% 20%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 78% 14%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 58% 28%, rgba(255,255,255,.4) 50%, transparent 51%);
  pointer-events: none;
}
.lock-top { padding: 8vh 6vw 0; }
.lock-clock { font-family: var(--font-ui); font-weight: 300; font-size: clamp(3.6rem, 10vw, 7rem); letter-spacing: -0.02em; line-height: 1; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.lock-clock #lockSs { font-size: .34em; margin-left: .4ch; color: #8FC6F5; }
.lock-date { margin: .4rem 0 0; font-size: 1.1rem; color: #C7DDEE; }
.lock-mid { display: grid; place-items: center; }
.lock-user { display: grid; justify-items: center; gap: .4rem; text-align: center; }
.lock-avatar {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.4rem; font-weight: 300; color: #0B1B2B;
  background: radial-gradient(circle at 34% 28%, #FFFFFF, #BFDDF6 42%, #6FA8D8 100%);
  border: 3px solid rgba(255, 255, 255, .7);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 12px 34px rgba(0, 0, 0, .45);
}
.lock-name { margin: .5rem 0 0; font-size: 1.5rem; font-weight: 400; }
.lock-hello { margin: 0; font-size: 1rem; color: #D7E7F4; }
.lock-hello-en { color: #93B2CB; font-size: .9rem; }
.lock-hint { margin: .4rem 0 0; color: #A9C5DA; font-size: .92rem; }
.lock-hint kbd { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #F2F7FC; }
.lock-foot { display: flex; justify-content: space-between; padding: 0 2rem 1.4rem; color: #8FAEC6; font-size: .82rem; }
.lock-power { font-size: 1.3rem; }

/* ---------- desktop & wallpaper (procedural, no assets) ---------- */
.desktop { position: fixed; inset: 0; }
.desktop[data-wall="dusk"] { background:
  radial-gradient(70rem 34rem at 50% 118%, rgba(96, 168, 230, .55) 0%, rgba(30, 82, 130, .18) 46%, transparent 70%),
  radial-gradient(46rem 22rem at 18% -8%, rgba(217, 164, 65, .14), transparent 62%),
  radial-gradient(40rem 18rem at 86% 8%, rgba(126, 200, 255, .18), transparent 60%),
  radial-gradient(2px 2px at 12% 22%, rgba(255,255,255,.65) 50%, transparent 51%),
  radial-gradient(1.6px 1.6px at 72% 16%, rgba(255,255,255,.5) 50%, transparent 51%),
  radial-gradient(1.6px 1.6px at 46% 10%, rgba(255,255,255,.4) 50%, transparent 51%),
  linear-gradient(#071523 0%, #0C2135 38%, #123552 66%, #1A4A6C 88%, #236083 100%);
}
.desktop[data-wall="dawn"] { background:
  radial-gradient(70rem 30rem at 50% 116%, rgba(255, 196, 120, .55), transparent 68%),
  radial-gradient(44rem 20rem at 16% -6%, rgba(255, 255, 255, .55), transparent 62%),
  linear-gradient(#7FA9C8 0%, #A8C7DD 34%, #E4DCC9 72%, #F3DFBA 100%);
}
.desktop[data-wall="plains"] { background:
  radial-gradient(64rem 26rem at 50% 118%, rgba(150, 210, 160, .35), transparent 70%),
  radial-gradient(40rem 18rem at 20% 4%, rgba(255, 255, 255, .18), transparent 62%),
  linear-gradient(#0C201C 0%, #14342B 44%, #235038 74%, #356B47 100%);
}
.desktop[data-wall="aurora"] { background:
  radial-gradient(44rem 18rem at 24% 16%, rgba(110, 240, 200, .28), transparent 68%),
  radial-gradient(48rem 20rem at 78% 10%, rgba(150, 170, 255, .22), transparent 68%),
  radial-gradient(2px 2px at 18% 26%, rgba(255,255,255,.7) 50%, transparent 51%),
  radial-gradient(2px 2px at 64% 18%, rgba(255,255,255,.5) 50%, transparent 51%),
  linear-gradient(#060F1C 0%, #0D1B2C 48%, #142C41 100%);
}
.desktop[data-wall="monsoon"] { background:
  radial-gradient(60rem 24rem at 50% 112%, rgba(110, 170, 200, .28), transparent 70%),
  radial-gradient(50rem 20rem at 22% -4%, rgba(80, 110, 130, .35), transparent 64%),
  repeating-linear-gradient(104deg, rgba(190, 220, 240, .05) 0 2px, transparent 2px 9px),
  linear-gradient(#101B24 0%, #1B2E3B 42%, #2C4A56 72%, #4C6E72 100%);
}
.desktop[data-wall="himalaya"] { background:
  radial-gradient(64rem 26rem at 50% 116%, rgba(255, 214, 160, .38), transparent 70%),
  radial-gradient(40rem 16rem at 18% 2%, rgba(220, 240, 255, .18), transparent 62%),
  linear-gradient(#0A1626 0%, #18304A 34%, #3F5F7A 64%, #B98F62 88%, #E4C08E 100%);
}
.desktop[data-wall="custom"] { background: linear-gradient(160deg, var(--wall-a, #0B1B2B) 0%, var(--wall-b, #2F7FD1) 100%); }

/* ---------- desktop icons ---------- */
.desktop-icons {
  position: absolute; top: 14px; left: 14px;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, 92px); gap: 4px;
  align-content: start; z-index: 1;
}
.desk-icon {
  width: 84px; height: 88px; display: grid; grid-template-rows: 52px auto; justify-items: center;
  align-content: start; gap: 2px; padding: 4px 2px; border: 1px solid transparent; border-radius: 3px;
  color: #FFFFFF; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .5);
}
.desk-icon:hover { background: rgba(150, 200, 255, .18); border-color: rgba(180, 220, 255, .45); }
.desk-icon:focus-visible { background: rgba(150, 200, 255, .26); border-color: rgba(200, 230, 255, .7); }
.desk-icon svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.desk-icon span { font-size: .78rem; line-height: 1.2; text-align: center; max-width: 78px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- taskbar (Aero glass) ---------- */
.menubar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--mb-h); z-index: 70;
  display: flex; align-items: center; gap: 5px; padding: 0 4px;
  background: linear-gradient(180deg, var(--taskbar-a) 0%, var(--taskbar-b) 14%, var(--taskbar-c) 56%, var(--taskbar-c) 100%);
  border-top: 1px solid rgba(170, 210, 245, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 -3px 14px rgba(0, 0, 0, .45);
  backdrop-filter: blur(12px) saturate(1.25);
}
.tb-start { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; }
.orb {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 26%, #DFF3FF 0%, #8FC5EE 22%, #3E7FB8 52%, #14406B 82%, #0A2A4A 100%);
  border: 1px solid rgba(190, 225, 255, .75);
  box-shadow: 0 0 10px rgba(90, 170, 255, .65), inset 0 1px 2px rgba(255, 255, 255, .9), inset 0 -2px 6px rgba(0, 20, 40, .6);
}
.orb svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.tb-start:hover .orb { box-shadow: 0 0 16px rgba(130, 200, 255, .95), inset 0 1px 2px rgba(255, 255, 255, .95), inset 0 -2px 6px rgba(0, 20, 40, .6); }

.tb-search {
  display: flex; align-items: center; gap: 6px; height: 30px; min-width: 150px; padding: 0 10px;
  border-radius: 15px; color: #DCEAF6; font-size: .82rem;
  background: rgba(10, 22, 34, .55); border: 1px solid rgba(150, 190, 225, .35);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45);
}
.tb-search:hover { background: rgba(24, 46, 68, .75); }
.tb-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.taskbar-apps { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.taskbar-apps::-webkit-scrollbar { display: none; }
.dock-btn {
  position: relative; width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 3px; border: 1px solid transparent; color: #CFE6F8;
}
.dock-btn svg { width: 22px; height: 22px; }
.dock-btn:hover { background: linear-gradient(rgba(255,255,255,.24), rgba(255,255,255,.05)); border-color: rgba(170, 210, 245, .45); box-shadow: inset 0 0 8px rgba(140, 200, 255, .28); }
.dock-btn.running { background: linear-gradient(rgba(255,255,255,.20), rgba(255,255,255,.04)); border-color: rgba(150, 200, 240, .55); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 8px rgba(90, 170, 255, .28); }
.dock-btn.running::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 16px; height: 2px; transform: translateX(-50%); border-radius: 1px; background: #9FD4FF; box-shadow: 0 0 5px #6FB6F5; }
.dock-btn.on-top { background: linear-gradient(rgba(190, 225, 255, .34), rgba(120, 175, 225, .18)); border-color: rgba(190, 225, 255, .7); }

.tb-tray { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; padding-left: 4px; border-left: 1px solid rgba(180, 215, 245, .25); }
.tb-weather { font-size: .72rem; color: #D8E9F7; padding: 0 7px; white-space: nowrap; }
.tb-traybtn { width: 28px; height: 30px; display: grid; place-items: center; border-radius: 3px; color: #D8E9F7; }
.tb-traybtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tb-traybtn:hover { background: rgba(255, 255, 255, .16); }
.mb-clock { display: grid; padding: 0 8px 0 6px; text-align: right; font-size: .74rem; line-height: 1.24; color: #EAF4FC; font-variant-numeric: tabular-nums; }
.mb-date { color: #C3D9EA; font-size: .68rem; }
.show-desktop { width: 6px; height: 32px; margin-left: 2px; border-left: 1px solid rgba(180, 215, 245, .4); border-right: 1px solid rgba(0, 0, 0, .35); }

/* sound + sun icon toggles */
[data-theme="light"] .snd-on, [data-theme="light"] .ic-sun { display: none; }
[data-theme="dark"] .ic-sun { display: none; }
[data-theme="light"] .ic-moon { display: none; }
:root .ic-sun { display: none; }
[data-theme="light"] .ic-sun { display: inline; }

/* ---------- start menu ---------- */
.startmenu {
  position: fixed; left: 6px; bottom: calc(var(--mb-h) + 2px); z-index: 66;
  width: min(452px, calc(100vw - 12px)); max-height: calc(100vh - var(--mb-h) - 18px);
  display: grid; grid-template-columns: 1fr 172px; grid-template-rows: 1fr 42px;
  border: 1px solid #4E6E90; border-radius: 8px 8px 0 0; overflow: hidden;
  box-shadow: var(--shadow-panel);
  background: #FFFFFF;
}
.start-left { grid-column: 1; grid-row: 1; overflow: auto; background: #FFFFFF; padding: 4px; }
.start-list { list-style: none; margin: 0; padding: 0; }
.start-open {
  flex: 1 1 auto; min-width: 0; justify-self: stretch; padding: 0;
  background: transparent; border: 0; color: inherit; font: inherit; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.start-pin {
  flex: 0 0 auto; font-size: .64rem; line-height: 1.1; padding: 3px 7px;
  border: 1px solid #C3D2E1; border-radius: 999px; background: #F7FAFD; color: #28587E;
}
.start-pin:hover { border-color: #2F7FD1; color: #1B4F72; }
.start-pin.on { background: #CFE7FA; border-color: #2F7FD1; color: #1B4F72; }
.start-list li {
  display: flex; align-items: center; gap: 8px; padding: 5px 7px; border: 1px solid transparent;
  border-radius: 3px; font-size: .82rem; color: #1B2B3A; cursor: pointer;
}
.start-list li:hover, .start-list li.active { background: linear-gradient(#EAF4FD, #D3E8FA); border-color: #A7C9E8; }
.start-list li svg { width: 17px; height: 17px; flex: 0 0 auto; color: #3A6E9E; }
.dock-btn.pinned { box-shadow: inset 0 -2px 0 rgba(159, 212, 255, .55); }
.dock-btn.transient { } /* open-but-unpinned: same chrome, leaves on close */
.dock-btn.transient::before {
  content: ""; position: absolute; inset: auto; left: 50%; bottom: 1px; width: 5px; height: 5px;
  transform: translateX(-50%) rotate(45deg); background: #F2C14E; border-radius: 1px;
}
.start-left::-webkit-scrollbar { width: 12px; }
.start-left::-webkit-scrollbar-thumb { background: #C4D6E7; border: 3px solid #fff; border-radius: 8px; }

.start-right {
  grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #2C4A66 0%, #1C3349 55%, #122436 100%);
  color: #DDEBF7; padding: 10px 8px 8px;
}
.start-user { display: flex; align-items: center; gap: .5rem; margin: 0 0 8px; padding: 0 2px 8px; border-bottom: 1px solid rgba(160, 200, 235, .25); font-size: .85rem; }
.start-avatar { width: 30px; height: 30px; border-radius: 3px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #EAF7FF, #8CC4EE 45%, #3E7FB8 100%); color: #0B2235; font-weight: 600; border: 1px solid rgba(255,255,255,.6); }
.start-links { display: grid; gap: 1px; }
.start-links button { text-align: left; padding: 5px 8px; border-radius: 3px; font-size: .8rem; color: #DDEBF7; }
.start-links button::before { content: "›"; color: #7FB2DD; margin-right: 6px; }
.start-links button:hover { background: rgba(150, 200, 240, .18); color: #FFFFFF; }
.start-spacer { flex: 1 1 auto; }
.start-off { text-align: left; padding: 6px 8px; border-radius: 3px; font-size: .8rem; color: #E6F2FC; border-top: 1px solid rgba(160, 200, 235, .22); }
.start-off::before { content: "⏻"; margin-right: 6px; color: #9FD0FF; }
.start-off:hover { background: rgba(200, 80, 70, .35); }
.start-search {
  grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 6px;
  padding: 0 10px; background: #F2F7FC; border-top: 1px solid #CFDEEB;
}
.start-search svg { width: 15px; height: 15px; fill: none; stroke: #5B7A97; stroke-width: 1.8; }
.start-search input { flex: 1; height: 30px; border: 1px solid #B9CDDF; border-radius: 3px; padding: 0 8px; background: #FFFFFF; font-size: .8rem; color: #16202B; }
.start-search input:focus { outline: 2px solid #8CC0EA; outline-offset: -1px; }

/* ---------- panes (Aero) ---------- */
.panes { position: absolute; inset: 0 0 var(--mb-h) 0; z-index: 10; pointer-events: none; }
.window {
  position: absolute; display: flex; flex-direction: column; min-width: 320px; min-height: 200px;
  background: var(--surface); color: var(--ink);
  border: 1px solid rgba(38, 74, 108, .72); border-radius: 8px 8px 4px 4px;
  box-shadow: var(--shadow-win);
  pointer-events: auto; overflow: hidden;
  animation: win-in 120ms ease-out;
}
@keyframes win-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.window.focused { border-color: rgba(30, 66, 100, .9); }
.win-titlebar {
  height: 31px; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 0 3px 0 8px;
  background: linear-gradient(180deg, var(--title-a) 0%, var(--title-b) 20%, var(--title-c) 52%, #D3E6F7 55%, var(--title-b) 100%);
  border-bottom: 1px solid #8FB0CE;
  cursor: default; user-select: none;
}
.window:not(.focused) .win-titlebar { background: linear-gradient(180deg, #F1F4F7 0%, #E0E6EC 50%, #D6DDE5 100%); border-bottom-color: #B4BEC8; }
.win-appicon { width: 16px; height: 16px; flex: 0 0 auto; color: #28587E; }
.win-appicon svg { width: 16px; height: 16px; }
.win-title { flex: 1 1 auto; font-size: .78rem; font-weight: 600; color: #17324A; text-shadow: 0 1px 0 rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window:not(.focused) .win-title { color: #66727E; }
.win-controls { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.win-dot { position: relative; width: 29px; height: 21px; border: 1px solid #7C9CBC; border-radius: 3px; background: linear-gradient(#FDFEFF, #DCE9F6 46%, #C9DCEF 52%, #E4EFFA); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.win-dot:hover { background: linear-gradient(#FFFFFF, #EAF5FF 46%, #D7EAFB 52%, #F1F8FF); border-color: #5D8CB6; }
.win-dot:active { background: linear-gradient(#CFE3F4, #E4F1FC); }
.win-dot.min::before { content: ""; position: absolute; left: 9px; bottom: 6px; width: 9px; height: 2px; background: #1E3A56; }
.win-dot.max::before { content: ""; position: absolute; left: 8px; top: 5px; width: 11px; height: 9px; border: 1px solid #1E3A56; border-top-width: 2px; background: transparent; }
.win-dot.close { width: 45px; background: linear-gradient(#F6C4BE, #DD6A5F 46%, #C5483D 52%, #E8928A); border-color: #9E3B33; }
.win-dot.close:hover { background: linear-gradient(#FFD9D4, #E87D71 46%, #D0554A 52%, #F0A097); border-color: #8E2F28; }
.win-dot.close::before, .win-dot.close::after { content: ""; position: absolute; left: 17px; top: 9px; width: 11px; height: 2px; background: #FFFFFF; box-shadow: 0 1px 0 rgba(90, 15, 10, .5); }
.win-dot.close::before { transform: rotate(45deg); }
.win-dot.close::after { transform: rotate(-45deg); }
.win-body { flex: 1 1 auto; overflow: auto; position: relative; background: var(--surface); }
.win-se { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: se-resize; z-index: 3; }
.win-se::before { content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px;
  background: repeating-linear-gradient(135deg, transparent 0 2px, rgba(70, 100, 130, .5) 2px 3px); }
.window.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.window.genie { transition: transform 240ms ease-in, opacity 240ms ease-in; transform: scale(.2, .3) translateY(30vh); opacity: 0; pointer-events: none; }

/* ---------- toasts, context menu, palette ---------- */
.toasts { position: fixed; right: 12px; bottom: calc(var(--mb-h) + 12px); z-index: 86; display: grid; gap: 8px; }
.toast {
  min-width: 220px; max-width: 340px; padding: 9px 12px; border-radius: 4px; font-size: .82rem;
  color: #EAF4FC; background: linear-gradient(#33506B, #1D3247);
  border: 1px solid #5F86A8; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  animation: toast-in 160ms ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ctxmenu {
  position: fixed; z-index: 78; min-width: 190px; padding: 2px;
  background: #F7FAFD; border: 1px solid #8FA9BF; border-radius: 3px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  color: #1B2A38; font-size: .8rem;
}
.ctx-item { display: block; width: 100%; text-align: left; padding: 6px 22px 6px 10px; border-radius: 2px; }
.ctx-item:hover { background: linear-gradient(#EAF4FD, #CFE7FA); outline: 1px solid #A6C9E8; }
.ctx-sep { height: 1px; margin: 3px 6px; background: #D5E0EA; }

.palette {
  position: fixed; left: 50%; top: 18vh; transform: translateX(-50%); z-index: 84;
  width: min(560px, calc(100vw - 32px)); padding: 10px;
  background: rgba(247, 250, 253, .97); border: 1px solid #6F8FAC; border-radius: 6px;
  box-shadow: var(--shadow-panel);
}
.palette input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #A9C0D4; border-radius: 3px; font-size: .9rem; background: #FFFFFF; }
.palette input:focus { outline: 2px solid #8CC0EA; outline-offset: -1px; }
.palette ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 320px; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 3px; font-size: .84rem; color: #1B2A38; cursor: pointer; }
.palette li svg { width: 16px; height: 16px; color: #3A6E9E; }
.palette li.active, .palette li:hover { background: linear-gradient(#EAF4FD, #CFE7FA); }

/* ============================================================
   Shared app chrome
   ============================================================ */
.app-menu {
  display: flex; align-items: center; gap: 2px; flex: 0 0 auto; position: relative; z-index: 4;
  height: 23px; padding: 0 4px; background: #F0F3F6; border-bottom: 1px solid #CDD8E2;
  font-size: .76rem; color: #22303D;
}
.app-menu .mi {
  padding: 2px 8px; border-radius: 2px; border: 0; background: transparent;
  font: inherit; color: inherit; line-height: 1.2;
}
.app-menu .mi:hover, .app-menu .mi[aria-expanded="true"] { background: #D9EAF9; outline: 1px solid #A9C9E6; }
.menu-wrap { position: relative; }
.menu-pop {
  position: absolute; top: 100%; left: 0; z-index: 30; min-width: 160px; padding: 2px;
  display: grid; background: #F7FAFD; border: 1px solid #7C8FA1;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .28);
}
.menu-pop[hidden] { display: none; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 4px 10px; border: 0; border-radius: 2px; background: transparent;
  font: inherit; color: #22303D; text-align: left;
}
.menu-item:hover { background: #CFE7FA; }
.menu-item kbd { font-family: var(--font-mono); font-size: .66rem; color: #5B6876; }
.app-toolbar {
  display: flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 4px 6px;
  background: linear-gradient(#FAFCFE, #E8F0F8 55%, #DEE9F4);
  border-bottom: 1px solid #C3D2E1; font-size: .76rem;
}
.app-toolbar .grow { flex: 1 1 auto; }
.app-status {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  height: 23px; padding: 0 8px; background: #EFF3F7; border-top: 1px solid #C8D5E1;
  font-size: .7rem; color: #4B5A68;
}
.btn7 {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 27px; padding: 0 9px; border: 1px solid #A9B8C6; border-radius: 3px;
  background: linear-gradient(#FDFEFF, #EFF4F9 46%, #E2EAF3 52%, #EDF3F9);
  color: #22303D; font-size: .76rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.btn7:hover { border-color: #7FB3DE; background: linear-gradient(#FFFFFF, #EAF5FF 46%, #D9ECFC 52%, #EEF8FF); }
.btn7:active { background: linear-gradient(#D8E9F7, #E9F3FB); }
.btn7.primary { border-color: #5A95C8; background: linear-gradient(#EAF6FF, #CBE6FA 46%, #B4DAF7 52%, #D6EDFD); }
.btn7 svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn7[disabled] { opacity: .5; cursor: default; }

.inset { background: #FFFFFF; border: 1px solid #A9B8C6; box-shadow: inset 1px 1px 2px rgba(0,0,0,.12); }
.app-h { margin: 0; font-size: .95rem; font-weight: 600; }
.app-sub { margin: 0; color: #5B6876; font-size: .8rem; }
.split { display: grid; }

/* ============================================================
   Terminal (Command Prompt / PowerShell)
   ============================================================ */
.term-body { display: flex; flex-direction: column; background: #0C0C0C; color: #E8E8E8; font-family: var(--font-mono); font-size: .82rem; }
.term-tabs { display: flex; align-items: stretch; gap: 1px; height: 25px; background: #1A1A1A; border-bottom: 1px solid #333; flex: 0 0 auto; }
.term-tab { display: flex; align-items: center; padding: 0 12px; font-size: .72rem; color: #CFCFCF; background: #0C0C0C; border-right: 1px solid #2E2E2E; }
.term-tab.on { box-shadow: inset 0 2px 0 #4A9EFF; color: #FFFFFF; }
.term-out { flex: 1 1 auto; overflow: auto; padding: 6px 8px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.term-line { padding: 1px 0; }
.term-line.cmd { color: #FFFFFF; }
.term-line.dim { color: #9A9A9A; }
.term-line.err { color: #FF7B72; }
.term-line.ok { color: #7EE787; }
.term-prompt-line { display: flex; align-items: center; flex: 0 0 auto; padding: 4px 8px 8px; }
.term-prompt { color: #7EE787; white-space: nowrap; }
.term-input { flex: 1; min-width: 2ch; background: transparent; border: 0; color: #F0F0F0; font: inherit; caret-color: #FFFFFF; }
.term-input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ============================================================
   System Properties (About)
   ============================================================ */
.about-body { display: grid; gap: 10px; padding: 12px; font-size: .78rem; }
.about-hero { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #D6DFE9; }
.about-logo {
  width: 54px; height: 54px; border-radius: 4px; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 600; color: #FFF;
  background: linear-gradient(#5FA8DD, #21618C 55%, #154360);
  border: 1px solid #7FB6DE; box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.about-hero h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.about-hero p { margin: 1px 0 0; color: #5B6876; }
.about-ver { display: inline-block; margin-top: 3px; font-size: .7rem; color: #28587E; }
.about-grid { display: grid; grid-template-columns: 112px 1fr; gap: 4px 10px; }
.about-grid dt { color: #5B6876; }
.about-grid dd { margin: 0; font-weight: 600; }
.about-live { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.about-stat { padding: 6px 8px; background: #F2F6FA; border: 1px solid #D3DDE7; border-radius: 3px; }
.about-stat span { display: block; font-size: .68rem; color: #5B6876; }
.about-stat b { font-family: var(--font-mono); font-size: .76rem; font-weight: 600; }
.about-foot { color: #5B6876; font-size: .72rem; margin: 0; }

/* ============================================================
   Files
   ============================================================ */
.files-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #FFFFFF; }
.files-nav { display: flex; align-items: center; gap: 3px; padding: 4px 6px; background: linear-gradient(#FAFCFE, #E8F0F8); border-bottom: 1px solid #C3D2E1; }
.files-crumbs { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 1px solid #A9B8C6; background: #FFFFFF; font-size: .76rem; color: #2B3B4A; }
.files-crumbs b { font-weight: 600; }
.files-search { width: 130px; height: 24px; border: 1px solid #A9B8C6; border-radius: 3px; padding: 0 7px; font-size: .74rem; background: #FFF; }
.files-main { display: grid; grid-template-columns: 156px 1fr; min-height: 0; }
.files-side { background: linear-gradient(90deg, #F3F7FB, #E9F1F8); border-right: 1px solid #C9D6E2; padding: 6px 4px; overflow: auto; }
.files-side h4 { margin: 6px 4px 3px; font-size: .68rem; font-weight: 600; color: #53708A; text-transform: uppercase; letter-spacing: .03em; }
.files-side button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 6px; border-radius: 2px; font-size: .76rem; color: #22303D; text-align: left; }
.files-side button:hover { background: #DCEBFA; outline: 1px solid #B7D4EC; }
.files-side svg { width: 15px; height: 15px; color: #4A7EA8; }
.files-listwrap { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.files-colhead { display: grid; grid-template-columns: 1fr 90px 80px; gap: 6px; padding: 4px 10px; background: #F2F6FA; border-bottom: 1px solid #D3DDE7; font-size: .7rem; color: #4B5A68; }
.files-list { padding: 4px; overflow: auto; display: grid; align-content: start; gap: 1px; }
.files-row { display: grid; grid-template-columns: 22px 1fr 90px 80px; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid transparent; border-radius: 2px; text-align: left; font-size: .76rem; color: #22303D; }
.files-row:hover { background: #EAF4FD; border-color: #B9D8F0; }
.files-row[aria-selected="true"] { background: #CFE7FA; border-color: #8FC0E5; }
.files-row svg { width: 16px; height: 16px; color: #4A7EA8; }
.files-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-kind, .files-size { color: #5B6876; font-size: .72rem; }
.files-viewer { border-top: 1px solid #C9D6E2; background: #FBFDFF; padding: 8px 10px; min-height: 96px; max-height: 160px; overflow: auto; }
.files-viewer .files-head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid #DCE5EE; margin-bottom: 6px; font-size: .72rem; color: #4B5A68; }
.files-hint { color: #5B6876; font-size: .78rem; margin: 0; }
.files-pre { margin: 0; white-space: pre-wrap; font-family: var(--font-mono); font-size: .74rem; line-height: 1.55; color: #1B2A38; }
.files-art svg { display: block; width: min(320px, 100%); height: auto; border: 1px solid #C9D6E2; }
.files-cap { margin: 4px 0 0; font-size: .7rem; color: #5B6876; }

/* ============================================================
   Notepad (Notes)
   ============================================================ */
.notes-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #FFFFFF; }
.notes-bar { display: flex; justify-content: space-between; align-items: center; padding: 3px 8px; background: #F0F3F6; border-bottom: 1px solid #D3DDE7; font-size: .7rem; color: #5B6876; }
.notes-area { width: 100%; height: 100%; border: 0; resize: none; padding: 10px 12px; background: #FFFFFF; color: #16202B; font-family: var(--font-mono); font-size: .82rem; line-height: 1.6; }
.notes-area:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ============================================================
   Calculator
   ============================================================ */
.calc-body { display: grid; grid-template-rows: auto auto 1fr; height: 100%; padding: 8px; gap: 6px; background: #F0F3F6; }
.calc-menu { display: flex; gap: 2px; font-size: .72rem; color: #22303D; }
.calc-menu span { padding: 1px 6px; border-radius: 2px; }
.calc-menu span:hover { background: #D9EAF9; }
.calc-display {
  min-height: 58px; display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 6px 10px; background: #FFFFFF; border: 1px solid #8FA6B8;
  font-family: var(--font-ui); font-size: 1.9rem; font-weight: 400; color: #16202B;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,.14); overflow: hidden; word-break: break-all; text-align: right;
}
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; align-content: stretch; }
.calc-key {
  min-height: 36px; border: 1px solid #A9B8C6; border-radius: 3px;
  background: linear-gradient(#FDFEFF, #F0F4F8 46%, #E4EBF2 52%, #EFF4F9);
  color: #22303D; font-size: .9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.calc-key:hover { border-color: #7FB3DE; background: linear-gradient(#FFFFFF, #EAF5FF 46%, #D9ECFC 52%, #EEF8FF); }
.calc-key:active { background: linear-gradient(#D8E9F7, #E9F3FB); }
.calc-key.op { background: linear-gradient(#F2F7FD, #DFEAF6 46%, #D0DFEF 52%, #E5EFF9); }
.calc-key.eq { background: linear-gradient(#EAF6FF, #CBE6FA 46%, #A9D3F4 52%, #CDE9FC); border-color: #5A95C8; font-weight: 600; }
.calc-key.clear { color: #A93226; }
.calc-key.mem { min-height: 26px; font-size: .72rem; color: #5B6876; background: linear-gradient(#F8FAFC, #EDF2F7); }
.calc-memrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }

/* ============================================================
   Control Panel (Settings)
   ============================================================ */
.settings-body { display: grid; grid-template-rows: auto 1fr; height: 100%; background: #F7FAFD; }
.settings-main { display: grid; grid-template-columns: 156px 1fr; min-height: 0; }
.settings-nav { background: #EDF3F9; border-right: 1px solid #C9D6E2; padding: 6px 4px; overflow: auto; }
.settings-nav button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 7px; border-radius: 2px; font-size: .76rem; text-align: left; color: #22303D; }
.settings-nav button:hover { background: #DCEBFA; }
.settings-nav button.on { background: #CFE7FA; outline: 1px solid #9CC6E7; }
.settings-nav svg { width: 15px; height: 15px; color: #4A7EA8; }
.settings-pane { padding: 10px 12px; overflow: auto; display: grid; gap: 10px; align-content: start; }
.set-group { border: 1px solid #C9D6E2; border-radius: 3px; background: #FFFFFF; padding: 8px 10px 10px; margin: 0; }
.set-group legend { padding: 0 4px; font-size: .74rem; font-weight: 600; color: #28587E; }
.set-row { display: flex; flex-wrap: wrap; gap: 5px; }
.set-btn { min-height: 30px; padding: 0 10px; border: 1px solid #A9B8C6; border-radius: 3px; background: linear-gradient(#FDFEFF, #EFF4F9 48%, #E2EAF3); font-size: .76rem; }
.set-btn:hover { border-color: #7FB3DE; }
.set-btn.on { background: linear-gradient(#EAF6FF, #CBE6FA 48%, #A9D3F4); border-color: #5A95C8; font-weight: 600; }
.set-note { margin: 4px 0 0; font-size: .74rem; color: #5B6876; }
.set-group.danger { border-color: #D8A7A1; }
.set-btn.danger { color: #A93226; }
.settings-hero { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: linear-gradient(#EAF4FD, #D8EBFA); border: 1px solid #BBD8EF; border-radius: 3px; }
.settings-hero .avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #EAF7FF, #8CC4EE 45%, #3E7FB8); color: #0B2235; font-weight: 600; border: 1px solid #fff; }

/* ============================================================
   Snake (classic)
   ============================================================ */
.snake-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #E9EEF3; padding: 8px; gap: 6px; }
.snake-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: #F7F9FB; border: 1px solid #A9B8C6; border-radius: 3px; font-size: .76rem; color: #22303D; }
.snake-head b { font-family: var(--font-mono); color: #1B4F72; }
.snake-wrap { position: relative; display: grid; place-items: center; background: #FFFFFF; border: 1px solid #8FA6B8; box-shadow: inset 1px 1px 3px rgba(0,0,0,.12); padding: 4px; }
.snake-canvas { display: block; max-width: 100%; height: auto; background: #FBFDFF; }
.snake-overlay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; background: rgba(240, 245, 250, .9); text-align: center; }
.snake-overlay[hidden] { display: none; }
.snake-start { min-height: 30px; padding: 0 16px; border: 1px solid #5A95C8; border-radius: 3px; background: linear-gradient(#EAF6FF, #CBE6FA 48%, #A9D3F4); font-size: .8rem; font-weight: 600; }
.snake-how, .snake-over { margin: 0; color: #4B5A68; font-size: .76rem; }
.snake-foot { display: flex; gap: 8px; align-items: center; font-size: .7rem; color: #5B6876; }

/* ============================================================
   Browser (Internet Explorer 8)
   ============================================================ */
.browser-body { display: grid; grid-template-rows: auto auto auto 1fr auto; height: 100%; background: #FFFFFF; }
.browser-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 4px 6px 0; background: linear-gradient(#E9F1F8, #D8E6F2); border-bottom: 1px solid #AFC6DA; }
.browser-tab { display: flex; align-items: center; gap: 6px; height: 23px; padding: 0 12px; font-size: .72rem; color: #22303D; background: #E4EEF7; border: 1px solid #AFC6DA; border-bottom: 0; border-radius: 3px 3px 0 0; }
.browser-tab.on { background: #FFFFFF; height: 25px; }
.browser-nav { display: flex; align-items: center; gap: 4px; padding: 5px 7px; background: linear-gradient(#FAFCFE, #E8F0F8); border-bottom: 1px solid #C3D2E1; }
.browser-addr { flex: 1 1 auto; height: 24px; border: 1px solid #8FA6B8; border-radius: 2px; padding: 0 22px 0 8px; font-size: .76rem; background: #FFFFFF; }
.browser-addr:focus { outline: 2px solid #8CC0EA; outline-offset: -1px; }
.browser-links { display: flex; gap: 10px; padding: 3px 10px; background: #F5F9FC; border-bottom: 1px solid #DCE5EE; font-size: .7rem; color: #28587E; }
.browser-links button { color: #28587E; }
.browser-links button:hover { text-decoration: underline; }
.browser-view { overflow: auto; padding: 18px 22px; background: #FFFFFF; color: #16202B; font-size: .82rem; }
.browser-view h1 { font-size: 1.5rem; font-weight: 300; margin: 0 0 4px; color: #1B4F72; }
.browser-view h2 { font-size: 1rem; margin: 14px 0 4px; color: #21618C; }
.browser-view p { margin: 6px 0; }
.browser-view pre { white-space: pre-wrap; font-family: var(--font-mono); font-size: .78rem; line-height: 1.6; }
.browser-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.browser-tile { display: grid; gap: 4px; justify-items: center; padding: 10px 8px; border: 1px solid #C9D6E2; background: #F7FAFD; border-radius: 3px; font-size: .72rem; color: #22303D; }
.browser-tile:hover { background: #EAF4FD; border-color: #9CC6E7; }
.browser-tile svg { width: 22px; height: 22px; color: #2F7FD1; }
.browser-status { display: flex; justify-content: space-between; padding: 3px 8px; background: #EFF3F7; border-top: 1px solid #C8D5E1; font-size: .68rem; color: #4B5A68; }

/* ============================================================
   Paint
   ============================================================ */
.paint-body { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; background: #F0F3F6; }
.paint-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 7px; background: linear-gradient(#FAFCFE, #E8F0F8); border-bottom: 1px solid #C3D2E1; }
.paint-label { font-size: .68rem; color: #53708A; margin-right: 2px; white-space: nowrap; }
.paint-color { width: 20px; height: 20px; border: 1px solid #7C8FA1; border-radius: 2px; padding: 0; }
.paint-color.on { box-shadow: 0 0 0 2px #2F7FD1; }
.paint-sizes { display: flex; gap: 3px; }
.paint-size { width: 24px; height: 22px; display: grid; place-items: center; border: 1px solid #A9B8C6; border-radius: 2px; background: #FFF; }
.paint-size span { display: block; border-radius: 50%; background: #22303D; }
.paint-size.on { border-color: #2F7FD1; box-shadow: 0 0 0 1px #2F7FD1; }
.paint-stage { padding: 8px; overflow: auto; background: #C9D4DF; }
.paint-wrap { position: relative; width: max-content; margin: 0 auto; }
.paint-canvas { display: block; background: #FFFFFF; border: 1px solid #7C8FA1; box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: crosshair; touch-action: none; }
.paint-grid { position: absolute; inset: 1px; pointer-events: none; opacity: 0; background-image:
  linear-gradient(rgba(47, 127, 209, .35) 1px, transparent 1px),
  linear-gradient(90deg, rgba(47, 127, 209, .35) 1px, transparent 1px);
  background-size: 20px 20px; }
.paint-grid.on { opacity: 1; }
.paint-caption { font-size: .7rem; color: #4B5A68; }

/* ============================================================
   Music (Media Player library)
   ============================================================ */
.music-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #F5F8FC; }
.music-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: linear-gradient(#2E5B82, #1C3E5C); color: #EAF4FC; }
.music-head .app-h { color: #EAF4FC; }
.music-head .app-sub { color: #B8D4EA; }
.music-main { display: grid; grid-template-columns: 1fr 168px; min-height: 0; }
.music-list { overflow: auto; padding: 6px; display: grid; align-content: start; gap: 2px; }
.music-track { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid transparent; border-radius: 2px; font-size: .78rem; text-align: left; color: #22303D; }
.music-track:hover { background: #E4F0FB; border-color: #B9D8F0; }
.music-track.on { background: #CFE7FA; border-color: #8FC0E5; }
.music-track svg { width: 16px; height: 16px; color: #2F7FD1; }
.music-track .mt-dur { color: #5B6876; font-family: var(--font-mono); font-size: .7rem; }
.music-now { background: linear-gradient(#EAF3FB, #D5E8F7); border-left: 1px solid #C3D2E1; padding: 10px; display: grid; align-content: start; gap: 8px; }
.music-art { aspect-ratio: 1; border: 1px solid #9CB6CD; background:
  radial-gradient(circle at 30% 26%, rgba(255,255,255,.55), transparent 40%),
  conic-gradient(from 210deg, #2F7FD1, #123C69, #4A9EFF, #2F7FD1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.music-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.music-bars span { flex: 1; height: 20%; background: #2F7FD1; border-radius: 1px; opacity: .55; }
.music-body.playing .music-bars span { animation: bar 900ms ease-in-out infinite alternate; }
.music-bars span:nth-child(2) { animation-delay: 120ms; }
.music-bars span:nth-child(3) { animation-delay: 240ms; }
.music-bars span:nth-child(4) { animation-delay: 360ms; }
.music-bars span:nth-child(5) { animation-delay: 480ms; }
@keyframes bar { from { height: 18%; } to { height: 100%; } }
.music-foot { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EAF1F8; border-top: 1px solid #C3D2E1; }
.music-progress { flex: 1; height: 5px; background: #C9D6E2; border: 1px solid #A9B8C6; border-radius: 3px; overflow: hidden; }
.music-progress span { display: block; width: 0; height: 100%; background: linear-gradient(#7FC0FF, #2F7FD1); transition: width 200ms linear; }

/* ============================================================
   Calendar
   ============================================================ */
.cal-body { display: grid; grid-template-rows: auto 1fr; height: 100%; background: #F7FAFD; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: linear-gradient(#2E5B82, #1C3E5C); color: #EAF4FC; }
.cal-head .app-h { color: #EAF4FC; }
.cal-main { display: grid; grid-template-columns: 1fr 170px; min-height: 0; }
.cal-gridwrap { padding: 8px; overflow: auto; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 2px; }
.cal-week span { text-align: center; font-size: .66rem; color: #53708A; text-transform: uppercase; letter-spacing: .04em; padding: 2px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { position: relative; min-height: 52px; border: 1px solid #DCE5EE; background: #FFFFFF; border-radius: 2px; font-size: .74rem; text-align: left; padding: 3px 4px; color: #22303D; }
.cal-day:hover { border-color: #9CC6E7; background: #F0F8FE; }
.cal-day.out { color: #A9B6C2; background: #F7FAFD; }
.cal-day.today { border-color: #2F7FD1; box-shadow: inset 0 0 0 1px #2F7FD1; background: #EAF4FD; }
.cal-today { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 50%; background: #2F7FD1; color: #FFFFFF; font-weight: 600; font-size: .68rem; }
.cal-event { display: block; margin-top: 3px; padding: 1px 3px; border-radius: 2px; background: #CFE7FA; color: #1B4F72; font-size: .62rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-side { border-left: 1px solid #C3D2E1; background: #EFF5FA; padding: 8px; overflow: auto; }
.cal-side h3 { margin: 0 0 6px; font-size: .76rem; color: #28587E; }
.cal-agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .72rem; }
.cal-agenda li { padding: 5px 6px; background: #FFFFFF; border: 1px solid #D6E2ED; border-left: 3px solid #2F7FD1; border-radius: 2px; }
.cal-agenda b { display: block; font-size: .7rem; color: #1B4F72; }

/* ============================================================
   Task Manager
   ============================================================ */
.taskmgr-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #F0F3F6; }
.tm-apps[hidden], .tm-tablewrap[hidden], .tm-perf[hidden] { display: none; }
.tm-apps { padding-top: 8px; }
.tm-tabs { display: flex; gap: 2px; padding: 5px 6px 0; background: #E8EEF5; border-bottom: 1px solid #B9C8D6; }
.tm-tab { padding: 4px 12px; font-size: .74rem; border: 1px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0; color: #22303D; }
.tm-tab.on { background: #F7FAFD; border-color: #B9C8D6; margin-bottom: -1px; }
.tm-perf { display: grid; grid-template-columns: 1fr 150px; gap: 8px; padding: 8px; border-bottom: 1px solid #C3D2E1; }
.tm-chart { background: #0C1620; border: 1px solid #7C8FA1; }
.tm-chart canvas { display: block; width: 100%; height: auto; }
.tm-legend { display: grid; gap: 5px; align-content: start; font-size: .72rem; color: #22303D; }
.tm-legend .big { font-size: 1.2rem; font-weight: 600; color: #1B4F72; }
.tm-tablewrap { overflow: auto; padding: 0 8px 8px; }
.tm-table { width: 100%; border-collapse: collapse; background: #FFFFFF; font-size: .72rem; }
.tm-table th { position: sticky; top: 0; text-align: left; padding: 4px 6px; background: #E8EEF5; border: 1px solid #C3D2E1; font-weight: 600; color: #22303D; }
.tm-table td { padding: 3px 6px; border: 1px solid #DCE5EE; }
.tm-table tr.on td { background: #CFE7FA; }
.tm-end { font-size: .66rem; padding: 1px 6px; border: 1px solid #A9B8C6; border-radius: 2px; background: #F7FAFD; }
.tm-end:hover { border-color: #C0392B; color: #A93226; }

/* ============================================================
   Minesweeper (classic)
   ============================================================ */
.mine-body { display: grid; align-content: center; justify-items: center; gap: 8px; padding: 8px; background: #D4D0C8; height: 100%; overflow: auto; }
.mine-frame { border: 3px solid; border-color: #FFFFFF #808080 #808080 #FFFFFF; background: #C0C0C0; padding: 6px; }
.mine-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; border: 3px solid; border-color: #808080 #FFFFFF #FFFFFF #808080; margin-bottom: 6px; }
.mine-led { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .08em; color: #FF2B2B; background: #1A0000; padding: 1px 6px; border: 1px solid #6B0000; }
.mine-restart { width: 28px; height: 28px; display: grid; place-items: center; font-size: 1rem; background: #C0C0C0; border: 2px solid; border-color: #FFFFFF #808080 #808080 #FFFFFF; }
.mine-restart:active { border-color: #808080 #FFFFFF #FFFFFF #808080; }
.mine-grid { display: grid; grid-template-columns: repeat(10, 24px); gap: 0; border: 3px solid; border-color: #808080 #FFFFFF #FFFFFF #808080; width: max-content; }
.mine-cell {
  width: 24px; height: 24px; display: grid; place-items: center; font-family: var(--font-ui); font-size: .78rem; font-weight: 700;
  background: #C0C0C0; border: 2px solid; border-color: #FFFFFF #808080 #808080 #FFFFFF; color: #000;
}
.mine-cell:hover { background: #C8C8C8; }
.mine-cell.open { border: 1px solid #9A9A9A; background: #C8C8C8; }
.mine-cell.mine { background: #FF6B6B; }
.mine-cell.flag { color: #B00000; }
.mine-cell.n1 { color: #0000FF; } .mine-cell.n2 { color: #008000; } .mine-cell.n3 { color: #FF0000; }
.mine-cell.n4 { color: #000080; } .mine-cell.n5 { color: #800000; } .mine-cell.n6 { color: #008080; }
.mine-cell.n7 { color: #000000; } .mine-cell.n8 { color: #808080; }
.mine-foot { font-size: .7rem; color: #3A3A3A; text-align: center; }

/* ============================================================
   Weather
   ============================================================ */
.weather-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #EAF3FB; }
.weather-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background:
  radial-gradient(22rem 12rem at 80% 0%, rgba(255,255,255,.4), transparent 70%),
  linear-gradient(135deg, #2F7FD1, #1B4F72 70%, #123C69); color: #F2F9FF; }
.weather-hero h2 { margin: 0; font-size: 1.15rem; font-weight: 400; }
.weather-hero p { margin: 2px 0 0; font-size: .76rem; color: #C7E2F7; }
.weather-temp { font-size: 2.8rem; font-weight: 200; line-height: 1; }
.weather-temp span { font-size: 1rem; vertical-align: top; }
.weather-now { display: grid; gap: 4px; padding: 10px 14px; background: #F7FAFD; border-bottom: 1px solid #C9D6E2; font-size: .72rem; color: #4B5A68; }
.weather-now .row { display: flex; justify-content: space-between; }
.weather-now b { color: #22303D; }
.weather-list { overflow: auto; padding: 6px 10px 10px; display: grid; gap: 2px; align-content: start; }
.weather-day { display: grid; grid-template-columns: 56px 22px 1fr auto; gap: 7px; align-items: center; padding: 4px 8px; border: 1px solid transparent; border-radius: 2px; font-size: .75rem; color: #22303D; }
.weather-day:hover { background: #FFFFFF; border-color: #D6E2ED; }
.weather-day .wd-icon { font-size: 1rem; }
.weather-day .wd-hi { font-weight: 600; }
.weather-day .wd-lo { color: #5B6876; margin-left: 6px; }
.weather-chips { display: flex; gap: 5px; padding: 6px 10px; background: #EFF5FA; border-top: 1px solid #C9D6E2; }
.weather-chip { font-size: .7rem; padding: 2px 9px; border: 1px solid #A9B8C6; border-radius: 9px; background: #FFF; }
.weather-chip.on { background: #CFE7FA; border-color: #5A95C8; }

/* ============================================================
   Mail
   ============================================================ */
.mail-body { display: grid; grid-template-rows: auto 1fr; height: 100%; background: #F7FAFD; }
.mail-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: linear-gradient(#2E5B82, #1C3E5C); color: #EAF4FC; }
.mail-head .app-h { color: #EAF4FC; }
.mail-main { display: grid; grid-template-columns: 118px 190px 1fr; min-height: 0; }
.mail-folders { background: #EFF5FA; border-right: 1px solid #C9D6E2; padding: 6px 4px; }
.mail-folders button { display: block; width: 100%; text-align: left; padding: 4px 7px; border-radius: 2px; font-size: .74rem; color: #22303D; }
.mail-folders button:hover { background: #DCEBFA; }
.mail-folders button.on { background: #CFE7FA; font-weight: 600; }
.mail-list { overflow: auto; border-right: 1px solid #C9D6E2; background: #FFFFFF; }
.mail-msg { display: grid; gap: 1px; width: 100%; text-align: left; padding: 6px 8px; border-bottom: 1px solid #E4EBF2; font-size: .72rem; color: #22303D; }
.mail-msg:hover { background: #EAF4FD; }
.mail-msg.on { background: #CFE7FA; }
.mail-msg b { font-weight: 600; }
.mail-msg span { color: #5B6876; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-read { padding: 10px 12px; overflow: auto; font-size: .78rem; color: #22303D; }
.mail-read h3 { margin: 0 0 2px; font-size: .9rem; color: #1B4F72; }
.mail-read .meta { color: #5B6876; font-size: .7rem; margin: 0 0 8px; }
.mail-read p { margin: 6px 0; }
.mail-compose { display: grid; gap: 4px; padding: 8px; font-size: .74rem; }
.mail-compose input, .mail-compose textarea { border: 1px solid #A9B8C6; border-radius: 2px; padding: 4px 6px; background: #FFF; }
.mail-compose textarea { min-height: 80px; resize: vertical; }

/* ============================================================
   Maps
   ============================================================ */
.maps-body { display: grid; grid-template-columns: 168px 1fr; height: 100%; background: #EAF3FB; }
.maps-side { background: #F7FAFD; border-right: 1px solid #C9D6E2; padding: 8px; display: grid; align-content: start; gap: 6px; }
.maps-side input { height: 26px; border: 1px solid #A9B8C6; border-radius: 2px; padding: 0 7px; font-size: .74rem; }
.maps-place { text-align: left; padding: 5px 6px; border-radius: 2px; font-size: .74rem; border: 1px solid transparent; color: #22303D; }
.maps-place:hover { background: #EAF4FD; border-color: #B9D8F0; }
.maps-place b { display: block; }
.maps-place span { color: #5B6876; font-size: .66rem; }
.maps-view { position: relative; overflow: hidden; background: #DCEBF6; }
.maps-view svg { display: block; width: 100%; height: 100%; }
.maps-info { position: absolute; left: 10px; bottom: 10px; padding: 7px 9px; background: rgba(255,255,255,.95); border: 1px solid #A9B8C6; border-radius: 3px; font-size: .72rem; color: #22303D; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.maps-zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 3px; }
.maps-zoom button { width: 26px; height: 26px; background: #FFFFFF; border: 1px solid #A9B8C6; border-radius: 2px; font-size: .9rem; }

/* ============================================================
   Photos
   ============================================================ */
.photos-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #1C2732; color: #EAF2FA; }
.photos-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: linear-gradient(#33495E, #223444); border-bottom: 1px solid #0E1720; }
.photos-head .app-h { color: #F0F7FD; }
.photos-head .app-sub { color: #A9C2D6; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; padding: 10px; align-content: start; overflow: auto; }
.photo { display: grid; gap: 4px; padding: 4px; background: #26343F; border: 1px solid #3C5265; border-radius: 2px; color: #DCE9F4; text-align: left; }
.photo:hover { border-color: #7FB3DE; background: #2E4050; }
.photo svg { display: block; width: 100%; height: auto; }
.photo span { font-size: .68rem; color: #B7CCDD; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photos-foot { padding: 3px 8px; background: #223444; border-top: 1px solid #0E1720; font-size: .68rem; color: #A9C2D6; }
.photo-view { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; background: #0C141C; z-index: 4; }
.photo-view svg { width: 100%; height: 100%; }
.photo-view .pv-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; font-size: .72rem; color: #DCE9F4; background: #1C2732; }

/* ============================================================
   Store
   ============================================================ */
.store-body { display: grid; grid-template-rows: auto auto 1fr; height: 100%; background: #F7FAFD; }
.store-hero { padding: 14px 16px; background:
  radial-gradient(20rem 10rem at 82% 0%, rgba(255,255,255,.3), transparent 70%),
  linear-gradient(135deg, #2F7FD1, #1B4F72 75%); color: #F2F9FF; }
.store-hero h2 { margin: 0; font-size: 1.15rem; font-weight: 300; }
.store-hero p { margin: 4px 0 0; font-size: .76rem; color: #C7E2F7; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 10px; overflow: auto; align-content: start; }
.store-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 3px; padding: 8px; background: #FFFFFF; border: 1px solid #D3DDE7; border-radius: 3px; }
.store-card:hover { border-color: #9CC6E7; box-shadow: 0 2px 8px rgba(36, 86, 128, .12); }
.store-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 4px; background: linear-gradient(#EAF6FF, #CFE7FA); color: #2F7FD1; border: 1px solid #B9D8F0; }
.store-icon svg { width: 20px; height: 20px; }
.store-card b { font-size: .78rem; color: #22303D; }
.store-card span { font-size: .68rem; color: #5B6876; }
.store-get { justify-self: start; margin-top: 4px; min-height: 24px; padding: 0 10px; font-size: .7rem; border: 1px solid #5A95C8; border-radius: 3px; background: linear-gradient(#EAF6FF, #CBE6FA 48%, #A9D3F4); }
.store-get.installed { border-color: #A9B8C6; background: #EFF3F7; color: #5B6876; }

/* ============================================================
   Media (Films & TV)
   ============================================================ */
.media-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #101820; color: #EAF2FA; }
.media-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: linear-gradient(#223444, #16232E); border-bottom: 1px solid #0A1117; }
.media-head .app-h { color: #F0F7FD; }
.media-head .app-sub { color: #9FB8CC; }
.media-stage {
  position: relative; display: grid; place-items: center; margin: 8px; border: 1px solid #33495E; overflow: hidden;
  background:
    radial-gradient(22rem 12rem at 50% 42%, rgba(90, 165, 230, .45), transparent 65%),
    linear-gradient(#0A1420, #132534);
}
.media-stage::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
.media-poster { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.media-poster b { font-size: 1.1rem; font-weight: 300; letter-spacing: .04em; }
.media-poster span { font-size: .72rem; color: #9FB8CC; }
.media-play { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #123C69; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 0 18px rgba(120,190,255,.5); }
.media-play svg { width: 22px; height: 22px; }
.media-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #16232E; border-top: 1px solid #0A1117; font-size: .7rem; color: #A9C2D6; }
.media-progress { flex: 1; height: 4px; background: #2A3C4E; border-radius: 2px; overflow: hidden; }
.media-progress span { display: block; width: 0; height: 100%; background: #6FB6F5; }
.media-list { display: flex; gap: 6px; padding: 0 8px 8px; overflow-x: auto; }
.media-ep { flex: 0 0 118px; display: grid; gap: 3px; padding: 4px; background: #1A2A38; border: 1px solid #2E4356; border-radius: 2px; text-align: left; color: #DCE9F4; font-size: .66rem; }
.media-ep:hover, .media-ep.on { border-color: #6FB6F5; background: #22384A; }
.media-ep .thumb { height: 54px; background: linear-gradient(135deg, #2F5E86, #152C40); border: 1px solid #33506B; }

/* ============================================================
   Camera
   ============================================================ */
.camera-body { display: grid; grid-template-rows: 1fr auto auto; height: 100%; background: #0C141C; color: #EAF2FA; }
.cam-stage { position: relative; margin: 8px; border: 1px solid #33495E; overflow: hidden; background: #000; }
.cam-view { display: block; width: 100%; height: 100%; }
.cam-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, transparent 33.2%, rgba(255,255,255,.25) 33.3%, transparent 33.4%, transparent 66.5%, rgba(255,255,255,.25) 66.6%, transparent 66.7%),
  linear-gradient(0deg, transparent 33.2%, rgba(255,255,255,.25) 33.3%, transparent 33.4%, transparent 66.5%, rgba(255,255,255,.25) 66.6%, transparent 66.7%); }
.cam-hud { position: absolute; top: 8px; left: 8px; font-size: .68rem; color: #FF6B6B; background: rgba(0,0,0,.45); padding: 2px 6px; border: 1px solid rgba(255,255,255,.2); }
.cam-controls { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px; background: #16232E; border-top: 1px solid #0A1117; }
.cam-shutter { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #EAF2FA; background: radial-gradient(circle at 38% 32%, #FFFFFF, #C9D6E2 55%, #8FA6B8); }
.cam-shutter:active { transform: scale(.94); }
.cam-timer { font-size: .72rem; padding: 5px 10px; border: 1px solid #A9C2D6; border-radius: 3px; color: #DCE9F4; background: #1A2A38; }
.cam-timer.on { border-color: #6FB6F5; color: #6FB6F5; }
.cam-strip { display: flex; gap: 5px; padding: 0 8px 8px; overflow-x: auto; min-height: 54px; }
.cam-shot { flex: 0 0 auto; border: 1px solid #33506B; background: #000; }
.cam-shot canvas { display: block; width: 78px; height: auto; }

/* ============================================================
   Code (editor)
   ============================================================ */
.code-body { display: grid; grid-template-columns: 132px 1fr; height: 100%; background: #1E1E1E; color: #D4D4D4; font-family: var(--font-mono); font-size: .76rem; }
.code-side { background: #252526; border-right: 1px solid #1B1B1B; overflow: auto; padding: 4px 0; }
.code-side h4 { margin: 4px 10px; font-size: .64rem; letter-spacing: .08em; color: #9A9A9A; font-weight: 400; }
.code-file { display: block; width: 100%; text-align: left; padding: 3px 12px; color: #CFCFCF; font-size: .72rem; }
.code-file:hover { background: #2A2D2E; }
.code-file.on { background: #37373D; color: #FFFFFF; }
.code-main { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.code-tabs { display: flex; background: #252526; border-bottom: 1px solid #1B1B1B; }
.code-tab { padding: 4px 12px; font-size: .7rem; color: #A9A9A9; border-right: 1px solid #1B1B1B; background: #2D2D2D; }
.code-tab.on { color: #FFFFFF; background: #1E1E1E; box-shadow: inset 0 2px 0 #4A9EFF; }
.code-editwrap { display: grid; grid-template-columns: 40px 1fr; min-height: 0; }
.code-gutter { background: #1E1E1E; color: #6E7681; text-align: right; padding: 6px 6px 6px 0; overflow: hidden; font-size: .72rem; line-height: 1.5; user-select: none; }
.code-editor { border: 0; resize: none; background: #1E1E1E; color: #D4D4D4; padding: 6px 10px; font-family: var(--font-mono); font-size: .76rem; line-height: 1.5; overflow: auto; }
.code-editor:focus { outline: none; }
.code-status { display: flex; gap: 12px; justify-content: flex-end; padding: 2px 10px; background: #007ACC; color: #FFFFFF; font-size: .66rem; }

/* ============================================================
   Clock
   ============================================================ */
.clock-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #F7FAFD; }
.clock-hero { display: grid; justify-items: center; gap: 2px; padding: 14px; background: linear-gradient(#2E5B82, #1C3E5C); color: #EAF4FC; }
.clock-big { font-size: 2.6rem; font-weight: 200; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-date { font-size: .78rem; color: #B8D4EA; }
.clock-world { padding: 8px 12px; display: grid; gap: 3px; overflow: auto; }
.clock-row { display: flex; justify-content: space-between; padding: 5px 8px; background: #FFFFFF; border: 1px solid #DCE5EE; border-radius: 2px; font-size: .76rem; color: #22303D; }
.clock-row b { font-family: var(--font-mono); font-weight: 600; color: #1B4F72; }
.clock-foot { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EFF5FA; border-top: 1px solid #C9D6E2; font-size: .72rem; color: #4B5A68; }
.clock-timer { font-family: var(--font-mono); font-size: 1rem; color: #1B4F72; }

/* ============================================================
   v3 extras — recycle, sticky notes, store apps
   ============================================================ */
.recycle-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #F7FAFD; }
.recycle-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EDF3F9; border-bottom: 1px solid #C9D6E2; font-size: .74rem; color: #22303D; }
.recycle-bar .grow { flex: 1 1 auto; }
.recycle-head, .recycle-item { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(100px, 1fr) 92px 68px 72px; gap: 8px; align-items: center; }
.recycle-head { padding: 4px 12px; background: #E8EFF6; border-bottom: 1px solid #C9D6E2; font-size: .66rem; color: #5B6876; text-transform: uppercase; letter-spacing: .04em; }
.recycle-list { overflow: auto; }
.recycle-item { padding: 6px 12px; border-bottom: 1px solid #E4ECF3; font-size: .75rem; color: #22303D; }
.recycle-item:hover { background: #F0F7FE; }
.recycle-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.recycle-name svg { width: 20px; height: 20px; flex: 0 0 auto; }
.recycle-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recycle-empty { display: grid; place-items: center; align-content: center; gap: 8px; padding: 36px 20px; color: #5B6876; font-size: .8rem; text-align: center; }
.recycle-empty svg { width: 48px; height: 48px; opacity: .6; }

.sticky-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #FBF0A8; }
.sticky-body[data-tone="pink"] { background: #FAD5DF; }
.sticky-body[data-tone="blue"] { background: #CFE6FA; }
.sticky-bar { display: flex; align-items: center; gap: 5px; padding: 4px 7px; background: rgba(255, 255, 255, .38); border-bottom: 1px solid rgba(120, 100, 20, .16); }
.sticky-bar .grow { flex: 1 1 auto; }
.sticky-tone { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(60, 50, 10, .35); }
.sticky-tone.y { background: #FBF0A8; } .sticky-tone.p { background: #FAD5DF; } .sticky-tone.b { background: #CFE6FA; }
.sticky-tone.on { box-shadow: 0 0 0 2px #2F7FD1; }
.sticky-note {
  width: 100%; height: 100%; resize: none; border: 0; padding: 12px 14px;
  background: transparent; color: #3B3212; line-height: 1.5; font-size: .92rem;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
}
.sticky-note:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(47, 127, 209, .35); }
.sticky-foot { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; font-size: .64rem; color: #6B5B1E; background: rgba(255, 255, 255, .28); }

.pod-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: #F7FAFD; }
.pod-head { padding: 10px 12px; background: linear-gradient(#3B2F5E, #261E44); color: #F3EEFF; }
.pod-head .app-h { color: #F3EEFF; }
.pod-head .app-sub { color: #C4B8E6; }
.pod-main { display: grid; grid-template-columns: 1fr 200px; min-height: 0; }
.pod-list { overflow: auto; padding: 8px; display: grid; gap: 4px; align-content: start; }
.pod-ep { display: grid; gap: 2px; padding: 7px 9px; border: 1px solid #DED8EE; border-radius: 3px; background: #FFFFFF; text-align: left; }
.pod-ep:hover { border-color: #B7A6E0; }
.pod-ep.on { border-color: #8E7CC3; background: #F1ECFF; }
.pod-ep b { font-size: .78rem; color: #2B2340; }
.pod-ep span { font-size: .67rem; color: #5B6876; }
.pod-now { border-left: 1px solid #D5CFE8; padding: 10px; display: grid; align-content: start; gap: 8px; background: linear-gradient(#F4F0FF, #E6DEFF); overflow: auto; }
.pod-art { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; color: #FFFFFF; font-size: 2rem; background: radial-gradient(circle at 32% 26%, #B9A6F0, #5B4A8E 62%, #2B2340); border: 1px solid #9A87C8; }
.pod-desc { font-size: .7rem; color: #4B4562; line-height: 1.5; }
.pod-foot { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EDE9F7; border-top: 1px solid #CFC8E3; }
.pod-progress { flex: 1 1 auto; height: 5px; background: #D8D2E8; border: 1px solid #B7AECF; border-radius: 3px; overflow: hidden; }
.pod-progress span { display: block; width: 0; height: 100%; background: linear-gradient(#B9A6F0, #6B5B9E); transition: width 220ms linear; }

.sol-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: radial-gradient(60rem 30rem at 50% 120%, #2E8055, #18593A 70%, #12422C); }
.sol-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: linear-gradient(#2A8055, #1B5A3B); border-bottom: 1px solid #0F3D2A; color: #EAF7EF; font-size: .72rem; }
.sol-head .grow { flex: 1 1 auto; }
.sol-head b { font-family: var(--font-mono); font-weight: 600; color: #FFFFFF; }
.sol-board { overflow: auto; padding: 12px; display: grid; align-content: start; gap: 14px; }
.sol-row { display: grid; grid-template-columns: repeat(7, 62px); gap: 8px; align-items: start; }
.sol-slot { width: 62px; height: 86px; border: 1px dashed rgba(255, 255, 255, .4); border-radius: 5px; background: rgba(0, 0, 0, .1); display: grid; place-items: center; color: rgba(255,255,255,.55); font-size: 1.2rem; }
.sol-pile { min-height: 86px; display: flex; flex-direction: column; align-items: flex-start; }
.sol-pile .card + .card { margin-top: -58px; }
.card {
  width: 62px; height: 86px; flex: 0 0 auto; border-radius: 5px; border: 1px solid #9AA7B4;
  background: linear-gradient(#FFFFFF, #F2F5F8); color: #1B2430; text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .32), inset 0 1px 0 #FFF; padding: 4px 5px;
  display: grid; grid-template-rows: auto 1fr; font-family: var(--font-mono); font-size: .74rem;
}
.card .rank { font-weight: 700; line-height: 1; }
.card .suit { align-self: end; justify-self: end; font-size: 1.15rem; line-height: 1; }
.card.red { color: #C0392B; }
.card:not(.back):hover { box-shadow: 0 0 0 2px #7EE787, 0 2px 5px rgba(0,0,0,.35); }
.card.sel { box-shadow: 0 0 0 2px #F2C14E, 0 2px 5px rgba(0, 0, 0, .38); transform: translateY(-1px); }
.card.back { background: repeating-linear-gradient(45deg, #1E4C7A 0 4px, #2F6C9E 4px 8px); border-color: #123C69; }
.card.back .rank, .card.back .suit { visibility: hidden; }
.sol-status { padding: 3px 10px; background: rgba(0, 0, 0, .18); border-top: 1px solid rgba(255,255,255,.18); color: #D6F2E1; font-size: .68rem; }

.maj-body { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: radial-gradient(50rem 26rem at 50% 108%, #175843, #0C3528 74%, #082A20); }
.maj-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(#1F6B50, #134B38); border-bottom: 1px solid #082A20; color: #EAF7EF; font-size: .74rem; }
.maj-head .grow { flex: 1 1 auto; }
.maj-head b { font-family: var(--font-mono); color: #FFFFFF; }
.maj-grid { display: grid; grid-template-columns: repeat(4, 62px); grid-auto-rows: 80px; gap: 8px; justify-content: center; align-content: center; padding: 14px; }
.maj-tile { border-radius: 5px; border: 1px solid #9E926F; background: linear-gradient(#FFFDF4, #E9E1C8); color: #1B2430; box-shadow: 0 2px 3px rgba(0,0,0,.35), inset 0 1px 0 #FFF; display: grid; place-items: center; font-size: 1.55rem; line-height: 1; }
.maj-tile .face { display: none; }
.maj-tile.up .face { display: block; }
.maj-tile:not(.up) { background: repeating-linear-gradient(45deg, #14523C 0 5px, #1B664A 5px 10px); border-color: #0B3A2A; }
.maj-tile.up:hover { border-color: #7EE787; }
.maj-tile.up.sel { box-shadow: 0 0 0 2px #F2C14E, 0 2px 4px rgba(0,0,0,.4); }
.maj-tile.matched { opacity: .28; pointer-events: none; }
.maj-foot { padding: 4px 12px; background: rgba(0,0,0,.2); border-top: 1px solid rgba(255,255,255,.14); color: #C9E8D8; font-size: .68rem; }

.wall-body { display: grid; grid-template-rows: auto 1fr; height: 100%; background: #F7FAFD; }
.wall-head { padding: 10px 12px; background: linear-gradient(#2E5B82, #1C3E5C); color: #EAF4FC; }
.wall-head .app-h { color: #EAF4FC; }
.wall-head .app-sub { color: #B8D4EA; }
.wall-main { display: grid; grid-template-columns: 1fr 210px; gap: 12px; padding: 12px; min-height: 0; }
.wall-preview { min-height: 220px; border: 1px solid #7C8FA1; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 4px 12px rgba(0,0,0,.18); }
.wall-controls { display: grid; align-content: start; gap: 10px; }
.wall-controls label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .76rem; color: #22303D; }
.wall-controls input[type="color"] { width: 58px; height: 28px; border: 1px solid #A9B8C6; border-radius: 3px; background: #FFFFFF; padding: 2px; }
.wall-presets { display: flex; flex-wrap: wrap; gap: 5px; }
.wall-preset { width: 32px; height: 24px; border: 1px solid #A9B8C6; border-radius: 3px; }
.wall-note { font-size: .68rem; color: #5B6876; line-height: 1.45; }

@media (max-width: 1280px) {
  .tb-search { min-width: 32px; width: 32px; padding: 0; justify-content: center; }
  .tb-search span { display: none; }
  .tb-weather { display: none; }
  .dock-btn { width: 32px; height: 34px; }
  .dock-btn svg { width: 19px; height: 19px; }
}

/* ============================================================
   Responsive + motion
   ============================================================ */
@media (max-width: 760px) {
  .tb-search span { display: none; }
  .tb-search { min-width: 32px; width: 32px; padding: 0; justify-content: center; }
  .tb-weather { display: none; }
  .mb-date { display: none; }
  .desktop-icons { grid-template-rows: repeat(4, 88px); }
  .startmenu { width: calc(100vw - 12px); }
  .settings-main, .mail-main, .music-main, .cal-main { grid-template-columns: 1fr; }
  .settings-nav, .mail-folders, .mail-list, .cal-side, .music-now { display: none; }
  .files-main { grid-template-columns: 120px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .desktop.unlocked .dock-btn { transform: none; transition-delay: 0ms !important; }
  .boot-bar-core { animation: none; width: 100%; }
}
