/* ================================================================
   HuxOS — Luna-style desktop chrome for isthathux.com (v3)
   Windows, taskbar, Start menu, tray, controls, boot screens,
   colour schemes (blue / olive / silver) and pocket (phone) mode.
   ================================================================ */

:root {
  --ui: Tahoma, "Segoe UI", Verdana, "DejaVu Sans", Geneva, sans-serif;
  --ui-title: "Trebuchet MS", "Segoe UI", "Lucida Grande", Tahoma, sans-serif;
  --font-yi: "Noto Sans Yi", "Microsoft Yi Baiti", "Nuosu SIL", sans-serif;
  --face: #ece9d8;
  --face-2: #f5f4ea;
  --face-dark: #aca899;
  --ink: #000;
  --muted: #5c5c5c;
  --link: #0645ad;
  --sel: #316ac5;
  --sel-ink: #fff;
  --hot: #e5a01a;
  --tb-h: 30px;
  --live: #e2412a;
  --firefly: #ffd36e;
  --bloom: #c9a0ff;
  --tiktok: #ff2a6d; --twitch: #9146ff; --kick: #2fbf0f; --youtube: #ff1a1a; --discord: #5865f2;

  /* Luna blue */
  --frame: #0831d9;
  --frame-in: #7a96df;
  --title: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  --title-in: linear-gradient(180deg, #7697e7 0%, #7e9ee3 3%, #94afe8 6%, #97b4e9 8%, #82a5e4 14%, #7c9fe2 17%, #7996de 25%, #7b99e1 56%, #82a9e9 81%, #80a5e7 89%, #7b96e1 94%, #7a93df 97%, #abbae3 100%);
  --title-ink: #fff;
  --title-shadow: 1px 1px #0f1089;
  --wb: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%);
  --wb-hover: radial-gradient(circle at 90% 90%, #1a6bff 0%, #3d7ff0 55%, #6597ff 70%, #c4d6ff 90%, #fff 100%);
  --wb-ink: #fff;
  --tb: linear-gradient(180deg, #1f2f86 0, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%, #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
  --tray: linear-gradient(180deg, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);
  --tray-edge: #092e8a;
  --task: linear-gradient(180deg, #3c81f3 0%, #3c81f3 10%, #3880f4 20%, #2e73ea 80%, #2a6ae0 100%);
  --task-hover: linear-gradient(180deg, #5e9bff, #4c8cf8 20%, #3f80f2 80%, #3a77ea);
  --task-on: linear-gradient(180deg, #1e52b7 0%, #1948a6 15%, #1c4fb3 90%, #2259c3 100%);
  --task-ink: #fff;
  --start-head: linear-gradient(180deg, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #297ae0 65%, #3482e3 77%, #3786e5 79%, #428ee9 90%, #4791eb 100%);
  --start-foot: linear-gradient(180deg, #4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d6 75%, #1165d5 83%, #0f61cb 88%, #0f5ec8 100%);
  --start-right: #d3e5fa;
  --start-right-edge: #95bdee;
  --start-orange: linear-gradient(90deg, rgba(0, 0, 0, 0), #da884a 50%, rgba(0, 0, 0, 0));
  --panel: linear-gradient(180deg, #7ba2e7, #6375d6);
  --panel-head: linear-gradient(90deg, #fff, #c6d3f7);
  --panel-ink: #215dc6;
  --panel-body: #d6dff7;
  --scroll-thumb: linear-gradient(90deg, #c8d6fb, #bacbf8 50%, #b4c7f7);
  color-scheme: light;
}

html[data-scheme="olive"] {
  --frame: #8ba169; --frame-in: #c6cfa9;
  --title: linear-gradient(180deg, #dce6b5 0%, #a9c46a 8%, #92ad4f 40%, #9cb85a 88%, #a6c166 93%, #8ea64c 96%, #6e8737 100%);
  --title-in: linear-gradient(180deg, #e7ead7, #cad3ad 10%, #c3cd9f 60%, #d0d8b1);
  --title-shadow: 1px 1px #4b5b23;
  --wb: radial-gradient(circle at 90% 90%, #5a7a1d 0%, #79983a 55%, #9bb75a 70%, #d4e3ad 90%, #fff 100%);
  --wb-hover: radial-gradient(circle at 90% 90%, #6d9124 0%, #8fad48 55%, #b0c972 70%, #e3eec4 90%, #fff 100%);
  --tb: linear-gradient(180deg, #8ea56a 0, #b5c88f 6%, #a8bd80 12%, #99b06f 20%, #94ab69 50%, #8ca162 86%, #7d9254 98%);
  --tray: linear-gradient(180deg, #a8bd7d, #c5d4a0 8%, #b9c991 20%, #aebf86 80%, #9eb174);
  --tray-edge: #6f8247;
  --task: linear-gradient(180deg, #c3d29e, #aec081 20%, #a2b673 80%, #95aa66);
  --task-hover: linear-gradient(180deg, #d3e0b2, #bfcf93 20%, #b3c584 80%, #a6ba76);
  --task-on: linear-gradient(180deg, #7f9653, #8aa05d 15%, #8ba15f 90%, #94aa67);
  --start-head: linear-gradient(180deg, #a5bd75, #8fa95a 40%, #839e4e);
  --start-foot: linear-gradient(180deg, #9cb46c, #8aa35a 40%, #7c9549);
  --start-right: #e4ebcf; --start-right-edge: #b8c695;
  --sel: #93a070;
  --panel: linear-gradient(180deg, #ccd4a8, #a9b880);
  --panel-head: linear-gradient(90deg, #fff, #e0e7c8);
  --panel-ink: #56662d;
  --panel-body: #f0f3e1;
  --scroll-thumb: linear-gradient(90deg, #e2e9cd, #d2dcb5);
}
html[data-scheme="silver"] {
  --frame: #a5a5b5; --frame-in: #d4d4dc;
  --title: linear-gradient(180deg, #ffffff 0%, #e9e8f1 8%, #d4d3e0 40%, #d3d3df 88%, #dddde8 93%, #c6c6d2 96%, #a8a8b6 100%);
  --title-in: linear-gradient(180deg, #f8f8fa, #ececf1 30%, #e5e5ec 70%, #efeff4);
  --title-ink: #12133a; --title-shadow: 1px 1px #fff;
  --wb: radial-gradient(circle at 90% 90%, #b9b9c9 0%, #d3d3df 55%, #e5e5ee 70%, #f8f8fb 90%, #fff 100%);
  --wb-hover: radial-gradient(circle at 90% 90%, #c9c9da 0%, #dfdfea 55%, #f0f0f6 70%, #fff 100%);
  --wb-ink: #3e3e55;
  --tb: linear-gradient(180deg, #a8a8b8 0, #f4f4f8 6%, #e3e3ea 12%, #d2d2dc 30%, #cacad5 80%, #b6b6c4 98%);
  --tray: linear-gradient(180deg, #e6e6ee, #ffffff 8%, #ececf3 20%, #dfdfe8 80%, #cfcfdb);
  --tray-edge: #9a9aab;
  --task: linear-gradient(180deg, #fbfbfd, #ececf2 20%, #dedee7 80%, #d2d2dd);
  --task-hover: linear-gradient(180deg, #fff, #f5f5f9 20%, #e9e9f0 80%, #dcdce6);
  --task-on: linear-gradient(180deg, #bcbccc, #c8c8d6 15%, #cfcfdc 90%, #d8d8e3);
  --task-ink: #12133a;
  --start-head: linear-gradient(180deg, #c9c9d6, #a4a4b8 40%, #9393aa);
  --start-foot: linear-gradient(180deg, #b6b6c7, #a1a1b6 40%, #8f8fa6);
  --start-right: #eeeef4; --start-right-edge: #c4c4d2;
  --sel: #8f8fae;
  --panel: linear-gradient(180deg, #d9d9e4, #b9b9cb);
  --panel-head: linear-gradient(90deg, #fff, #e2e2ec);
  --panel-ink: #3e3e6a;
  --panel-body: #f3f3f7;
  --scroll-thumb: linear-gradient(90deg, #f1f1f6, #dcdce6);
}

/* ── base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 12px/1.35 var(--ui); color: var(--ink); background: #3a6ea5;
  overflow: hidden; -webkit-font-smoothing: auto; -webkit-text-size-adjust: 100%;
  overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: default; }
a { color: var(--link); }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.yi { font-family: var(--font-yi); font-weight: 400; letter-spacing: .04em; white-space: nowrap; }
[hidden] { display: none !important; }
.selectable, .win-body input, .win-body textarea, .doc, .win-body p, .mb-text { user-select: text; -webkit-user-select: text; }
.busy, .busy * { cursor: progress !important; }

/* No JS (or before the OS is up): a page's content shows in a plain window frame. */
html:not(.os-ready) body[data-app] > main {
  position: fixed; inset: 0 0 var(--tb-h) 0; overflow: auto; background: #fff;
  border: 3px solid var(--frame); border-top: 0; padding: 40px 18px 24px; user-select: text;
}
html:not(.os-ready) body[data-app] > main::before {
  content: attr(data-title); position: fixed; left: 0; right: 0; top: 0; height: 30px; padding: 6px 10px;
  background: var(--title); color: #fff; font: bold 13px/18px var(--ui-title); text-shadow: var(--title-shadow);
  border-radius: 8px 8px 0 0; z-index: 2;
}
html:not(.os-ready) body[data-app]::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: var(--tb-h); background: var(--tb);
}
html.js:not(.os-ready) body[data-app="desktop"] > main { display: none; }
html.js:not(.os-ready) body { background: #3a6ea5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"); }

/* original glossy tiles for brand icons (TikTok, Kick…) */
.xi { display: inline-block; vertical-align: middle; flex: none; }
.xi-brand { --s: 32px; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 22%; color: var(--fg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 52%), var(--bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 1px 1px 2px rgba(0, 0, 0, .25); }
.xi-brand svg { width: 62%; height: 62%; }

/* ── desktop ────────────────────────────────────────────────────── */
#desktop { position: fixed; inset: 0 0 var(--tb-h) 0; overflow: hidden; }
.wallpaper { position: absolute; inset: 0; overflow: hidden; background: #245edb center / cover no-repeat; container-type: size; }
/* Back to front: the sky (the .wallpaper background), clouds, the hill with its
   see-through sky, then cloud shadows low on the grass. No masks: a mask over a moving
   layer is redone every frame and makes Chrome flash black. --tw is one seamless strip:
   at least the width of the screen, and wide enough that the strip fills the sky. */
.wp-clouds, .wp-hill, .wp-shade { position: absolute; left: 0; right: 0; overflow: hidden; pointer-events: none; --tw: max(100cqw, 190cqh); }
.wp-clouds, .wp-hill { top: 0; bottom: 0; }
.wp-hill { background: center / cover no-repeat; }
.wp-shade { top: 68%; bottom: 0; opacity: .9; }
.wp-drift { position: absolute; top: 0; left: 0; height: calc(var(--tw) * .43); width: calc(var(--tw) * 2); background-repeat: repeat-x; background-size: var(--tw) auto; will-change: transform; animation: wp-drift 420s linear infinite; }
.wp-shade .wp-drift { height: 100%; background-size: var(--tw) 100%; background-image:
  radial-gradient(38% 46% at 16% 40%, rgba(0, 18, 8, .26), rgba(0, 18, 8, 0) 70%),
  radial-gradient(26% 38% at 48% 66%, rgba(0, 18, 8, .22), rgba(0, 18, 8, 0) 70%),
  radial-gradient(34% 42% at 78% 44%, rgba(0, 18, 8, .24), rgba(0, 18, 8, 0) 70%); }
.wallpaper[data-tod="night"] .wp-shade, .wallpaper[data-tod="lyfe"] .wp-shade { opacity: .45; }
.wallpaper.still .wp-drift { animation-play-state: paused; }
@keyframes wp-drift { to { transform: translate3d(calc(var(--tw) * -1), 0, 0); } }
.ff-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }
.ff-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 95000; pointer-events: none; }
.dicons { position: absolute; inset: 0; z-index: 2; }
.dicon {
  position: absolute; width: 78px; padding: 3px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; color: #fff; text-align: center; touch-action: none;
}
.dicon .xi, .dicon .xi-brand { --s: 40px; width: 40px; height: 40px; filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .35)); }
.dicon .dl {
  font-size: 11px; line-height: 1.25; padding: 0 3px 1px; text-shadow: 1px 1px 1px #000, 0 0 2px rgba(0, 0, 0, .8);
  max-width: 76px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.dicon.sel .dl { background: #0b61ff; text-shadow: none; outline: 1px dotted #fff; outline-offset: -1px; }
.dicon.sel .xi, .dicon.sel .xi-brand { filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .35)) sepia(1) hue-rotate(180deg) saturate(3) brightness(.85); }
.dicon:focus-visible { outline: 0; }
.dicon:focus-visible .dl { outline: 1px dotted #fff; }
.dicon.dragging { opacity: .6; z-index: 5; }
.rubber { position: absolute; z-index: 4; border: 1px solid #3168d5; background: rgba(49, 104, 213, .25); pointer-events: none; }

/* ── windows ────────────────────────────────────────────────────── */
#windows { position: fixed; inset: 0 0 var(--tb-h) 0; z-index: 10; pointer-events: none; }
.win {
  position: absolute; display: flex; flex-direction: column; pointer-events: auto;
  background: var(--face); border: 3px solid var(--frame); border-top: 0; border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, .45); min-width: 160px; min-height: 60px;
}
.win:focus { outline: 0; }
.win-title {
  flex: none; height: 30px; margin: 0 -3px; padding: 0 5px 0 6px; display: flex; align-items: center; gap: 5px;
  background: var(--title); border-radius: 7px 7px 0 0; color: var(--title-ink); text-shadow: var(--title-shadow);
  border: 1px solid var(--frame); border-bottom: 0; touch-action: none;
}
.win-ico { flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
.win-ico .xi, .win-ico .xi-brand { width: 16px; height: 16px; --s: 16px; }
.win-name { flex: 1; min-width: 0; font: bold 13px/1 var(--ui-title); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-btns { display: flex; gap: 2px; flex: none; }
.wb {
  position: relative; width: 21px; height: 21px; padding: 0; border: 1px solid #fff; border-radius: 3px;
  background: var(--wb); box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .25);
}
.wb:hover { background: var(--wb-hover); }
.wb:active { filter: brightness(.85); }
.wb::before, .wb::after { content: ""; position: absolute; background: var(--wb-ink); }
.wb-min::before { left: 4px; bottom: 4px; width: 7px; height: 3px; }
.wb-min::after { display: none; }
.wb-max::before { left: 4px; top: 4px; width: 11px; height: 11px; background: none; border: 1px solid var(--wb-ink); border-top-width: 3px; }
.wb-max::after { display: none; }
.wb-max.is-restore::before { left: 7px; top: 3px; width: 8px; height: 8px; border-top-width: 2px; }
.wb-max.is-restore::after { display: block; left: 3px; top: 7px; width: 8px; height: 8px; background: var(--wb); border: 1px solid var(--wb-ink); border-top-width: 2px; }
.wb-help::before { content: "?"; inset: 0; background: none; color: var(--wb-ink); font: bold 13px/19px var(--ui); text-align: center; }
.wb-close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.wb-close:hover { background: radial-gradient(circle at 90% 90%, #e2560f 0%, #f27b3a 55%, #ec9566 70%, #ffdac8 90%, #fff 100%); }
.wb-close::before, .wb-close::after { left: 9px; top: 3px; width: 2px; height: 13px; background: #fff; transform: rotate(45deg); }
.wb-close::after { transform: rotate(-45deg); }
.win.inactive { border-color: var(--frame-in); }
.win.inactive .win-title { background: var(--title-in); border-color: var(--frame-in); color: #d8e4f8; text-shadow: none; }
html[data-scheme="silver"] .win.inactive .win-title { color: #8f8fa8; }
.win.inactive .wb { opacity: .78; }
.win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; border-width: 0; }
.win.max .win-title { border-radius: 0; margin: 0; border: 0; }
.rs { position: absolute; z-index: 3; }
.rs-n { top: -3px; left: 6px; right: 6px; height: 5px; cursor: n-resize; }
.rs-s { bottom: -3px; left: 6px; right: 6px; height: 6px; cursor: s-resize; }
.rs-e { right: -3px; top: 6px; bottom: 6px; width: 6px; cursor: e-resize; }
.rs-w { left: -3px; top: 6px; bottom: 6px; width: 6px; cursor: w-resize; }
.rs-ne { right: -3px; top: -3px; width: 10px; height: 10px; cursor: ne-resize; }
.rs-nw { left: -3px; top: -3px; width: 10px; height: 10px; cursor: nw-resize; }
.rs-se { right: -3px; bottom: -3px; width: 12px; height: 12px; cursor: se-resize; }
.rs-sw { left: -3px; bottom: -3px; width: 10px; height: 10px; cursor: sw-resize; }
.win.max .rs { display: none; }
.wm-dragging iframe, .wm-dragging .win-body { pointer-events: none; }
.wm-dragging { cursor: default; }
.win.shake { animation: win-shake .35s; }
@keyframes win-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* message boxes */
.msgbox .win-body { padding: 14px 14px 12px; display: block; }
.mb-row { display: flex; gap: 14px; align-items: flex-start; }
.mb-ico { flex: none; width: 32px; height: 32px; }
.mb-text { padding-top: 4px; line-height: 1.5; max-width: 420px; }
.mb-btns { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* ── controls ───────────────────────────────────────────────────── */
.xbtn {
  min-width: 75px; min-height: 23px; padding: 3px 12px; border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ecebe6 86%, #d6d0c5); color: #000; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  box-shadow: inset -1px -1px rgba(0, 0, 0, .06);
}
.xbtn:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.xbtn:active, .xbtn[aria-pressed="true"] { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); box-shadow: none; }
.xbtn:focus-visible { box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; outline: 1px dotted #000; outline-offset: -4px; }
.xbtn:disabled { color: #a19f94; border-color: #c9c7ba; background: #f5f4ea; box-shadow: none; }
.xbtn .xi, .xbtn svg { width: 16px; height: 16px; flex: none; }
.xbtn.big { min-height: 30px; padding: 4px 14px; font-weight: bold; }
.xbtn.go { border-color: #2d6e1e; background: linear-gradient(180deg, #e6ffd8, #b9e89d 50%, #8fd06a); font-weight: bold; }
.xbtn.brand { border-color: rgba(0, 0, 0, .55); color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), var(--brand, #316ac5); text-shadow: 0 1px 1px rgba(0, 0, 0, .4); }
.xbtn.brand svg { fill: currentColor; }
.xinput, .xselect, .xtext {
  border: 1px solid #7f9db9; background: #fff; padding: 3px 5px; min-height: 23px; border-radius: 0; color: #000; width: 100%;
  user-select: text; -webkit-user-select: text;
}
.xinput:focus, .xselect:focus, .xtext:focus { outline: 0; border-color: #316ac5; box-shadow: 0 0 0 1px rgba(49, 106, 197, .25); }
.xtext { resize: vertical; min-height: 90px; font-family: var(--ui); }
.field { display: grid; gap: 3px; }
.field > span { color: #000; }
fieldset.group, .group { border: 1px solid #d0d0bf; border-radius: 4px; padding: 8px 10px 10px; margin: 0; min-width: 0; background: transparent; }
.group > legend { color: #0046d5; padding: 0 3px; }
.statusbar { flex: none; display: flex; gap: 2px; padding: 2px 3px; background: var(--face); border-top: 1px solid #d0cfc1; font-size: 11px; color: #000; }
.statusbar > span { flex: 1; padding: 1px 5px; border: 1px solid; border-color: #aca899 #fff #fff #aca899; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar > span.fixed { flex: none; min-width: 120px; }
.toolbar { flex: none; display: flex; align-items: center; gap: 2px; padding: 2px 4px; background: linear-gradient(180deg, #fbfbf8, #ebe8d7); border-bottom: 1px solid #d0cfc1; flex-wrap: wrap; }
.tbtn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid transparent; border-radius: 3px; background: none; white-space: nowrap; }
.tbtn:hover:not(:disabled) { border-color: #cecece; background: linear-gradient(180deg, #fff, #e8e8e2); box-shadow: inset 0 -1px #d6d3c4; }
.tbtn:active:not(:disabled) { background: #e3e2da; }
.tbtn:disabled { opacity: .45; }
.tbtn .xi { width: 22px; height: 22px; }
.tbtn.sm .xi { width: 16px; height: 16px; }
.tsep { width: 1px; align-self: stretch; margin: 2px 3px; background: #c7c4b3; box-shadow: 1px 0 #fff; }
.menubar { flex: none; display: flex; padding: 1px 2px; background: var(--face); border-bottom: 1px solid #d0cfc1; }
.mb-item { padding: 2px 7px; border: 0; background: none; }
.mb-item:hover, .mb-item.open { background: var(--sel); color: #fff; }
.mb-item u { text-decoration: underline; }
.addr { flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 4px; background: var(--face); border-bottom: 1px solid #d0cfc1; }
.addr-label { color: #555; }
.addr-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 2px 4px; background: #fff; border: 1px solid #7f9db9; height: 22px; white-space: nowrap; overflow: hidden; }
.addr-box .xi { width: 16px; height: 16px; flex: none; }
.addr-box input { flex: 1; border: 0; padding: 0; outline: 0; min-width: 0; background: transparent; }
.white { background: #fff; }
.scroll { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.hint { color: var(--muted); font-size: 11px; }
.ok-msg, .form-msg.ok { color: #1a7a1a; }
.err-msg, .form-msg.err, .form-error { color: #c0261b; }
.form-msg:empty, .form-error:empty { display: none; }
.xlink { color: var(--link); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.progress { height: 15px; border: 1px solid #686868; border-radius: 3px; padding: 1px; background: #fff; overflow: hidden; }
.progress > i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #2fc032 0 8px, transparent 8px 10px), linear-gradient(180deg, #acedad, #7be47d 25%, #4cda50 50%, #2ed330 70%); background-blend-mode: multiply; transition: width .4s; }
button, .btn, .xbtn { -webkit-user-select: none; user-select: none; }
.xcheck { display: inline-flex; align-items: center; gap: 6px; }
.xcheck input { width: 13px; height: 13px; accent-color: #21a121; margin: 0; }

/* XP property-sheet tabs */
.tabs { display: flex; gap: 1px; padding: 0 4px; position: relative; z-index: 1; margin-bottom: -1px; }
.tabs [role="tab"] { padding: 3px 8px 2px; border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #fff, #f3f3ef 60%, #ececea); margin-top: 2px; white-space: nowrap; }
.tabs [role="tab"]:hover { border-top: 2px solid #f8b30f; padding-top: 2px; }
.tabs [role="tab"][aria-selected="true"] { margin-top: 0; padding: 4px 8px 4px; border-top: 2px solid #f8b30f; background: #fcfcfe; position: relative; z-index: 2; }
.tabpanel { flex: 1; min-height: 0; border: 1px solid #919b9c; background: #fcfcfe; padding: 12px; box-shadow: inset 1px 1px #fff; overflow: auto; }
.sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 8px 0; }
.sheet-btns { flex: none; display: flex; justify-content: flex-end; gap: 6px; padding: 8px; }

/* menus */
.menu {
  position: fixed; min-width: 160px; padding: 2px; background: #fff; border: 1px solid #aca899;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .35); font-size: 12px;
}
.menu-item { width: 100%; display: flex; align-items: center; gap: 6px; padding: 3px 14px 3px 4px; border: 0; background: none; text-align: left; white-space: nowrap; }
.menu-item:hover, .menu-item:focus { background: var(--sel); color: #fff; outline: 0; }
.menu-item[aria-disabled="true"] { color: #aca899; }
.menu-item[aria-disabled="true"]:hover, .menu-item[aria-disabled="true"]:focus { background: #fff; color: #aca899; }
.menu-item.bold .mi-label { font-weight: bold; }
.mi-ico { width: 16px; height: 16px; flex: none; display: grid; place-items: center; }
.mi-ico .xi { width: 16px; height: 16px; }
.mi-label { flex: 1; }
.mi-hint { color: #8a8a8a; padding-left: 18px; }
.menu-item:hover .mi-hint, .menu-item:focus .mi-hint { color: #dfe8f8; }
.mi-arrow { font-size: 8px; padding-left: 14px; }
.menu-sep { height: 1px; margin: 3px 1px; background: #aca899; }

/* XP-ish scrollbars */
.win ::-webkit-scrollbar { width: 17px; height: 17px; }
.win ::-webkit-scrollbar-track { background: #f4f4f0; border-left: 1px solid #e8e8e0; }
.win ::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 1px solid #b0c2ef; border-radius: 3px; box-shadow: inset 1px 1px #fff; }
.win ::-webkit-scrollbar-thumb:hover { filter: brightness(1.05); }
.win ::-webkit-scrollbar-button:single-button { height: 17px; width: 17px; background: var(--scroll-thumb); border: 1px solid #b0c2ef; border-radius: 3px; }

/* ── taskbar ────────────────────────────────────────────────────── */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tb-h); z-index: 80000; display: flex; align-items: stretch;
  background: var(--tb); color: var(--task-ink);
}
.start-btn {
  flex: none; position: relative; display: flex; align-items: center; gap: 4px; padding: 0 18px 0 8px; margin-right: 8px;
  border: 0; border-radius: 0 10px 10px 0; color: #fff; font: italic bold 19px/1 var(--ui-title); text-shadow: 1px 1px 2px rgba(0, 0, 0, .65);
  background: radial-gradient(circle at 75% 0%, rgba(255, 255, 255, .55), transparent 60%), linear-gradient(180deg, #388a38 0%, #4cb34c 8%, #3ca13c 40%, #379837 88%, #2e852e 100%);
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, .25), 2px 0 4px rgba(0, 0, 0, .25);
}
.start-btn:hover { filter: brightness(1.1); }
.start-btn[aria-expanded="true"] { background: linear-gradient(180deg, #2a6b2a, #2f7f2f 20%, #317f31 80%, #2a6b2a); box-shadow: inset 2px 2px 4px rgba(0, 0, 0, .45); }
.start-logo { width: 34px; height: 20px; object-fit: contain; filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, .55)); }
.start-btn span { letter-spacing: .01em; padding-right: 2px; }
.quick { flex: none; display: flex; align-items: center; gap: 1px; padding: 0 6px 0 2px; border-right: 1px solid rgba(0, 0, 0, .25); box-shadow: 1px 0 rgba(255, 255, 255, .2); margin-right: 4px; }
.quick button { width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: none; display: grid; place-items: center; }
.quick button:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .15); }
.quick .xi, .quick .xi-brand { width: 18px; height: 18px; --s: 18px; }
.tasks { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; padding: 0 4px; overflow: hidden; }
.task {
  flex: 0 1 160px; min-width: 40px; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  border: 1px solid rgba(0, 0, 0, .35); border-radius: 3px; background: var(--task); color: var(--task-ink);
  box-shadow: inset 1px 1px rgba(255, 255, 255, .35), inset -1px -1px rgba(0, 0, 0, .15); text-align: left;
}
.task:hover { background: var(--task-hover); }
.task[aria-pressed="true"] { background: var(--task-on); box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .5); }
.task .xi, .task .xi-brand { width: 16px; height: 16px; --s: 16px; flex: none; }
.task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.task.flash { animation: task-flash .5s 6 alternate; }
@keyframes task-flash { to { background: linear-gradient(180deg, #ffbe6e, #f7951e); color: #000; } }
.tray {
  flex: none; display: flex; align-items: center; gap: 2px; padding: 0 10px 0 8px; background: var(--tray); border-left: 1px solid var(--tray-edge);
  box-shadow: inset 1px 0 1px rgba(255, 255, 255, .35); color: var(--task-ink);
}
.tray-ico { position: relative; width: 22px; height: 22px; padding: 0; border: 0; background: none; display: grid; place-items: center; color: inherit; }
.tray-ico .xi { width: 16px; height: 16px; }
.tray-ico:hover { background: rgba(255, 255, 255, .15); border-radius: 2px; }
.tray-ico .badge { position: absolute; right: -3px; top: -1px; min-width: 13px; height: 13px; padding: 0 3px; border-radius: 7px; background: #e2412a; color: #fff; font: bold 9px/13px var(--ui); text-align: center; box-shadow: 0 0 0 1px #fff; }
.tray-ico.is-live .xi { animation: live-pulse 1.2s infinite alternate; }
@keyframes live-pulse { to { filter: drop-shadow(0 0 4px #ff5a3c) brightness(1.3); } }
.tray-jar { width: auto; padding: 0 3px; gap: 2px; display: inline-flex; font-size: 11px; }
.clock { padding: 0 4px 0 8px; border: 0; background: none; color: inherit; font-size: 11px; white-space: nowrap; }

/* ── Start menu ─────────────────────────────────────────────────── */
.startmenu {
  position: fixed; left: 0; bottom: var(--tb-h); z-index: 85000; width: 380px; max-height: calc(100% - var(--tb-h));
  display: flex; flex-direction: column; background: var(--start-head); border-radius: 8px 8px 0 0;
  box-shadow: 3px -2px 12px rgba(0, 0, 0, .45); border: 1px solid #0d4bb6; border-bottom: 0; overflow: hidden;
}
html[data-scheme="olive"] .startmenu { border-color: #6f8247; }
html[data-scheme="silver"] .startmenu { border-color: #8f8fa6; }
.sm-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 8px; color: #fff; font: bold 15px var(--ui-title); text-shadow: 1px 1px 2px rgba(0, 0, 0, .55); }
.sm-avatar { width: 46px; height: 46px; border-radius: 4px; border: 2px solid #fff; box-shadow: 1px 1px 3px rgba(0, 0, 0, .45); object-fit: cover; background: #fff; }
.sm-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #f4a95b; box-shadow: 0 -1px #ff9a3a; }
.sm-left { background: #fff; padding: 6px 0 4px; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.sm-right { background: var(--start-right); border-left: 1px solid var(--start-right-edge); padding: 6px 0; overflow: auto; }
.sm-item { width: 100%; display: flex; align-items: center; gap: 7px; padding: 3px 8px; border: 0; background: none; text-align: left; color: #000; text-decoration: none; }
.sm-item .xi, .sm-item .xi-brand { width: 32px; height: 32px; --s: 32px; flex: none; }
.sm-item.small .xi, .sm-item.small .xi-brand { width: 24px; height: 24px; --s: 24px; }
.sm-item b { display: block; font-weight: bold; }
.sm-item small { display: block; color: #6c6c6c; font-size: 11px; }
.sm-item:hover, .sm-item:focus { background: var(--sel); color: #fff; outline: 0; }
.sm-item:hover small, .sm-item:focus small { color: #e4ecfa; }
.sm-right .sm-item { color: #0a246a; font-weight: bold; padding: 2px 8px; }
.sm-right .sm-item .xi, .sm-right .sm-item .xi-brand { width: 24px; height: 24px; --s: 24px; }
.sm-right .sm-item:hover, .sm-right .sm-item:focus { color: #fff; }
.sm-sep { height: 1px; margin: 4px 8px; background: var(--start-orange); opacity: .55; }
.sm-left .sm-sep { background: linear-gradient(90deg, transparent, #d7d7d7 30%, #d7d7d7 70%, transparent); opacity: 1; }
.sm-right .sm-sep { background: linear-gradient(90deg, transparent, #9ebfe8 30%, #9ebfe8 70%, transparent); opacity: 1; }
.sm-all { margin-top: auto; justify-content: center; font-weight: bold; gap: 8px; padding: 6px 8px; }
.sm-all .arrow { width: 18px; height: 18px; border-radius: 3px; display: grid; place-items: center; background: linear-gradient(180deg, #6fd35b, #2f9a22); color: #fff; font-size: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.sm-foot { flex: none; display: flex; justify-content: flex-end; gap: 6px; padding: 6px 8px; background: var(--start-foot); }
.sm-foot button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid transparent; border-radius: 3px; background: none; color: #fff; }
.sm-foot button:hover, .sm-foot button:focus { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); outline: 0; }
.sm-foot .xi { width: 22px; height: 22px; }

/* ── balloons (tray notices; util.toast uses these too) ─────────── */
.toasts { position: fixed; right: 8px; bottom: calc(var(--tb-h) + 10px); z-index: 88000; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast, .balloon {
  position: relative; max-width: 330px; padding: 8px 26px 9px 10px; display: flex; gap: 8px; align-items: flex-start;
  background: #ffffe1; color: #000; border: 1px solid #000; border-radius: 8px; box-shadow: 2px 2px 4px rgba(0, 0, 0, .35);
  pointer-events: auto; animation: balloon-in .25s ease-out both; line-height: 1.4;
}
.toast::after, .balloon::after { content: ""; position: absolute; right: 26px; bottom: -11px; border: 10px solid transparent; border-top-color: #000; border-bottom: 0; border-right: 0; }
.toast::before, .balloon::before { content: ""; position: absolute; right: 27px; bottom: -9px; z-index: 1; border: 9px solid transparent; border-top-color: #ffffe1; border-bottom: 0; border-right: 0; }
.toast.out, .balloon.out { animation: balloon-out .3s ease-in forwards; }
.t-ico { flex: none; font-size: 15px; line-height: 1; }
.balloon .b-title { display: flex; gap: 6px; align-items: center; font-weight: bold; margin-bottom: 2px; }
.balloon .b-title .xi { width: 16px; height: 16px; }
.balloon .b-x { position: absolute; right: 5px; top: 5px; width: 15px; height: 15px; padding: 0; border: 1px solid transparent; border-radius: 2px; background: none; font: 11px/12px var(--ui); color: #555; }
.balloon .b-x:hover { border-color: #888; background: #fff; }
.balloon.clickable { cursor: pointer; }
body:has(.msn) .toasts { bottom: calc(var(--tb-h) + 128px); }
@keyframes balloon-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes balloon-out { to { opacity: 0; } }

/* messenger-style slide-up ("Hux is live") */
.msn {
  position: fixed; right: 10px; bottom: calc(var(--tb-h) + 2px); z-index: 87000; width: 220px; border: 1px solid #3c6fb0;
  background: linear-gradient(180deg, #e3efff, #fff 45%); box-shadow: 2px 2px 8px rgba(0, 0, 0, .35); border-radius: 6px 6px 0 0;
  animation: msn-up .5s ease-out both; cursor: pointer;
}
.msn.out { animation: msn-down .4s ease-in forwards; }
.msn-head { display: flex; align-items: center; gap: 5px; padding: 3px 5px; background: linear-gradient(180deg, #7fb4ef, #3f7fd3); color: #fff; font-weight: bold; font-size: 11px; border-radius: 5px 5px 0 0; }
.msn-head .xi { width: 14px; height: 14px; }
.msn-head button { margin-left: auto; width: 15px; height: 15px; padding: 0; border: 0; background: none; color: #fff; font: bold 11px/1 var(--ui); }
.msn-body { display: flex; gap: 8px; padding: 9px; align-items: center; }
.msn-body img { width: 46px; height: 46px; border-radius: 4px; border: 1px solid #9bb7e0; }
.msn-body b { display: block; color: #0a246a; }
@keyframes msn-up { from { transform: translateY(110%); } }
@keyframes msn-down { to { transform: translateY(110%); } }

/* ── boot, welcome, shutdown, BSOD ──────────────────────────────── */
.boot { position: fixed; inset: 0; z-index: 99000; display: none; background: #000; color: #c8c8c8; font: 14px/1.45 "Lucida Console", "Courier New", monospace; }
html.booting .boot { display: block; }
html.booting #desktop, html.booting .taskbar, html.booting #windows { visibility: hidden; }
.boot-post { padding: 18px 22px; white-space: pre-wrap; }
.boot-post b { color: #fff; }
.boot-logo { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 46px; background: #000; }
.boot.logo .boot-logo { display: flex; }
.boot.logo .boot-post { display: none; }
.bl-mark { display: flex; align-items: center; gap: 14px; color: #fff; font: bold 46px/1 var(--ui-title); letter-spacing: -.01em; }
.bl-mark img { width: 120px; filter: drop-shadow(0 0 18px rgba(255, 211, 110, .35)); }
.bl-mark span { font-style: italic; }
.bl-mark small { display: block; font: 15px var(--ui); color: #bbb; font-style: normal; margin-top: 6px; letter-spacing: .02em; }
.bl-bar { width: 132px; height: 16px; border: 2px solid #b2b2b2; border-radius: 4px; padding: 2px; overflow: hidden; position: relative; }
.bl-bar i { position: absolute; top: 2px; width: 9px; height: 8px; background: linear-gradient(180deg, #2838c7, #3c66f0 40%, #a7b8ff 50%, #3c66f0 60%, #2838c7); border-radius: 1px; left: -40px; animation: bl-run 1.9s linear infinite; }
.bl-bar i:nth-child(2) { animation-delay: .12s; }
.bl-bar i:nth-child(3) { animation-delay: .24s; }
@keyframes bl-run { 0% { left: -40px; } 100% { left: 140px; } }
.bl-foot { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 28px; color: #8a8a8a; font: 12px var(--ui); }

.welcome { position: fixed; inset: 0; z-index: 99500; display: grid; grid-template-rows: 78px 1fr 78px; background: #5a7edc; color: #fff; font-family: var(--ui); }
.welcome .w-top { background: #00309c; border-bottom: 2px solid; border-image: linear-gradient(90deg, #00309c, #d8e4fc 50%, #00309c) 1; }
.welcome .w-bot { background: #003399; border-top: 2px solid; border-image: linear-gradient(90deg, #003399, #f99736 50%, #003399) 1; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; font-size: 13px; }
.welcome .w-mid { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; background: radial-gradient(ellipse at 18% 18%, #95b4ef, #5a7edc 55%); }
.w-left { justify-self: end; padding-right: 40px; text-align: right; }
.w-left img { width: 160px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.w-left h1 { font: bold 30px/1.1 var(--ui-title); margin: 10px 0 8px; text-shadow: 1px 2px 3px rgba(0, 0, 0, .3); }
.w-left p { font-size: 15px; opacity: .95; }
.w-line { height: 70%; background: linear-gradient(180deg, transparent, #fff 30%, #fff 70%, transparent); opacity: .6; }
.w-users { padding-left: 40px; display: grid; gap: 14px; justify-items: start; }
.w-user { display: flex; align-items: center; gap: 14px; padding: 8px 18px 8px 8px; border: 0; border-radius: 6px; background: none; color: #fff; text-align: left; font-size: 17px; }
.w-user img, .w-user .w-pic { width: 58px; height: 58px; border-radius: 6px; border: 2px solid #fff; background: #fff; object-fit: cover; flex: none; box-shadow: 1px 2px 4px rgba(0, 0, 0, .3); }
.w-user small { display: block; font-size: 12px; opacity: .85; }
.w-user:hover, .w-user:focus-visible { background: linear-gradient(90deg, #00309c, rgba(0, 48, 156, 0)); outline: 0; }
.w-user:hover img, .w-user:focus-visible img, .w-user:hover .w-pic { border-color: #ffcc4d; }
.welcome.signing .w-users, .welcome.signing .w-left p { opacity: 0; transition: opacity .2s; }
.w-greet { position: absolute; inset: 78px 0; display: none; place-items: center; font: italic bold 46px var(--ui-title); text-shadow: 2px 2px 6px rgba(0, 0, 0, .35); }
.welcome.signing .w-greet { display: grid; }
.welcome.signing .w-mid { opacity: .35; }
.w-power { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border: 0; border-radius: 3px; background: none; color: #fff; }
.w-power:hover { background: rgba(255, 255, 255, .12); }
.w-power .xi { width: 24px; height: 24px; }

.offscreen { position: fixed; inset: 0; z-index: 99600; background: #000; color: #f4a531; display: grid; place-items: center; text-align: center; font: bold 22px var(--ui); }
.offscreen p { margin-bottom: 26px; }
.offscreen button { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 14px; border: 0; background: none; color: #ddd; font: 13px var(--ui); border-radius: 6px; }
.offscreen button:hover { background: rgba(255, 255, 255, .08); }
.offscreen .xi { width: 52px; height: 52px; }
.dim-screen { position: fixed; inset: 0; z-index: 89000; background: rgba(0, 0, 0, .0); animation: grayout 1s forwards; pointer-events: none; }
@keyframes grayout { to { background: rgba(0, 0, 0, .35); backdrop-filter: grayscale(1); } }
.bsod { position: fixed; inset: 0; z-index: 99700; background: #0000aa; color: #fff; font: 15px/1.5 "Lucida Console", "Courier New", monospace; padding: 6vh 7vw; overflow: auto; cursor: none; }
.bsod p { margin-bottom: 1.2em; max-width: 72ch; }
.bsod .bs-title { display: inline-block; background: #aaa; color: #0000aa; padding: 0 8px; font-weight: bold; margin-bottom: 1.6em; }

/* the turn-off dialog */
.turnoff { position: fixed; left: 50%; top: 50%; z-index: 89500; width: 312px; transform: translate(-50%, -50%); border-radius: 6px; overflow: hidden; box-shadow: 3px 3px 12px rgba(0, 0, 0, .5); color: #fff; font-family: var(--ui); }
.to-head { padding: 10px 12px; background: #08248b; display: flex; justify-content: space-between; align-items: center; font: bold 16px var(--ui-title); }
.to-head img { width: 52px; }
.to-mid { padding: 22px 12px 18px; background: linear-gradient(180deg, #7096e5, #5076cf); display: flex; justify-content: space-around; border-top: 2px solid; border-bottom: 2px solid; border-image: linear-gradient(90deg, #08248b, #a5c0ff 50%, #08248b) 1; }
.to-mid button { display: grid; justify-items: center; gap: 6px; border: 0; background: none; color: #fff; font-size: 12px; padding: 4px; border-radius: 4px; }
.to-mid button:hover { background: rgba(255, 255, 255, .12); }
.to-mid .xi { width: 36px; height: 36px; }
.to-foot { padding: 8px 12px; background: #08248b; text-align: right; }

/* ── folder view (Explorer) ─────────────────────────────────────── */
.fv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fv-bar { flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 4px; background: var(--face); border-bottom: 1px solid #d0cfc1; }
.fv-addr-label { color: #555; }
.fv-addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 4px; background: #fff; border: 1px solid #7f9db9; white-space: nowrap; overflow: hidden; }
.fv-addr .xi { width: 16px; height: 16px; }
.fv-go { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 4px; }
.fv-go .xi { width: 16px; height: 16px; }
.fv-main { flex: 1; min-height: 0; display: flex; background: #fff; }
.fv-tasks { flex: none; width: 210px; padding: 12px 10px; background: var(--panel); overflow: auto; display: grid; gap: 12px; align-content: start; }
.tp { border-radius: 4px 4px 0 0; overflow: hidden; }
.tp-head { position: relative; padding: 5px 30px 5px 10px; background: var(--panel-head); color: var(--panel-ink); font: bold 12px var(--ui); cursor: pointer; }
.tp-head::after { content: "︽"; position: absolute; right: 5px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 1px solid #c3d0f3; color: var(--panel-ink); font-size: 9px; line-height: 15px; text-align: center; }
.tp.collapsed .tp-head::after { content: "︾"; }
.tp.collapsed .tp-body { display: none; }
.tp-body { padding: 8px 10px; background: var(--panel-body); display: grid; gap: 5px; border: 1px solid #fff; border-top: 0; }
.tp-link { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #0c32b5; text-align: left; font-size: 11px; }
.tp-link:hover { text-decoration: underline; color: #3b6ae4; }
.tp-link .xi, .tp-link .xi-brand { width: 16px; height: 16px; --s: 16px; flex: none; }
.tp-details { font-size: 11px; color: #000; line-height: 1.5; }
.tp-details b { display: block; }
.fv-items { flex: 1; min-width: 0; overflow: auto; padding: 10px 14px 18px; user-select: none; }
.fv-group { margin: 6px 0 8px; padding-bottom: 3px; color: #0b3c9e; font: bold 12px var(--ui); border-bottom: 1px solid; border-image: linear-gradient(90deg, #7ba2e7, transparent) 1; }
.fv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px 4px; margin-bottom: 12px; }
.fv-grid.tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.fv-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px; border: 1px solid transparent; background: none; text-align: center; }
.fv-ico { display: grid; place-items: center; }
.fv-ico .xi, .fv-ico .xi-brand { width: 32px; height: 32px; --s: 32px; }
.fv-label { font-size: 11px; word-break: break-word; padding: 0 2px; }
.fv-sub { display: block; color: #6c6c6c; font-size: 11px; }
.fv-text { display: grid; gap: 1px; justify-items: center; }
.fv-grid.tiles .fv-item { flex-direction: row; text-align: left; gap: 8px; padding: 4px 6px; }
.fv-grid.tiles .fv-ico .xi, .fv-grid.tiles .fv-ico .xi-brand { width: 48px; height: 48px; --s: 48px; }
.fv-grid.tiles .fv-text { justify-items: start; flex: 1; min-width: 0; }
.fv-grid.tiles .fv-label { font-size: 12px; padding: 0; }
.fv-item.sel .fv-label { background: var(--sel); color: #fff; }
.fv-item.sel .fv-ico { filter: sepia(1) hue-rotate(180deg) saturate(2.5) brightness(.85); }
.fv-item:focus-visible { outline: 1px dotted #000; }
.fv-bar-meter { display: block; width: 100%; height: 11px; margin-top: 3px; border: 1px solid #8e8f8f; background: #fff; padding: 1px; }
.fv-bar-meter i { display: block; height: 100%; background: linear-gradient(180deg, #8fc7ff, #2a73e6); }
.fv-empty { color: #555; padding: 20px 6px; line-height: 1.6; max-width: 460px; }

/* ── effects carried over from v2 ───────────────────────────────── */
.glyph-rain { position: fixed; inset: 0; z-index: 96000; pointer-events: none; overflow: hidden; }
.glyph-rain span { position: absolute; top: -10vh; font-family: var(--font-yi); color: var(--bloom); text-shadow: 0 0 14px rgba(201, 160, 255, .8); animation: glyph-fall linear forwards; }
@keyframes glyph-fall { to { transform: translateY(125vh) rotate(var(--rot, 20deg)); opacity: .2; } }
.shake { animation: shake .6s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 10%, 90% { transform: translate3d(-2px, 1px, 0); } 20%, 80% { transform: translate3d(4px, -2px, 0); } 30%, 50%, 70% { transform: translate3d(-7px, 2px, 0); } 40%, 60% { transform: translate3d(7px, -1px, 0); } }
.leaf-fall { position: fixed; z-index: 96000; top: -40px; pointer-events: none; width: 18px; height: 18px; animation: leaf-fall linear forwards; }
@keyframes leaf-fall { to { transform: translate3d(var(--dx, 40px), 115vh, 0) rotate(var(--rot, 540deg)); } }
.scene { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; --bg: #050e0a; }
.scene .sky { position: absolute; inset: 0; background: var(--sky, linear-gradient(180deg, #050b14 0%, #0b1a1f 45%, #0c1a12 100%)); }
.scene .moon { position: absolute; top: 9%; right: 12%; width: clamp(54px, 8vw, 110px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 38%, #fffbe8, #f3ecd0 55%, #d9cfa6); box-shadow: 0 0 60px 18px rgba(255, 247, 214, .22); opacity: var(--moon-o, 1); }
.scene .stars { position: absolute; inset: 0 0 40% 0; opacity: var(--stars-o, 1); }
.scene .layer { position: absolute; left: -6%; right: -6%; bottom: 0; will-change: transform; transition: transform .6s ease-out; }
.scene .layer svg { width: 100%; height: 100%; }
.scene .mist { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(110, 240, 198, .06) 60%, var(--bg)); }
.scene .campfire { position: absolute; left: 50%; bottom: -8%; width: 70vw; height: 50%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 100%, rgba(255, 159, 67, .4), rgba(255, 120, 40, .12) 40%, transparent 70%); opacity: 0; transition: opacity 1.2s; }
.is-live .scene .campfire { opacity: 1; }

/* screensaver */
.saver { position: fixed; inset: 0; z-index: 98000; background: #000; cursor: none; overflow: hidden; }
.saver canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── pocket mode (phones) ───────────────────────────────────────── */
html.pocket { --tb-h: 44px; }
html.pocket body { font-size: 14px; }
html.pocket .win { border-width: 0; border-radius: 0; box-shadow: none; }
html.pocket .win-title { height: 38px; border-radius: 0; margin: 0; border: 0; }
html.pocket .win-name { font-size: 15px; }
html.pocket .wb { width: 30px; height: 30px; }
html.pocket .wb-min::before { left: 8px; bottom: 7px; width: 12px; }
html.pocket .wb-close::before, html.pocket .wb-close::after { left: 13px; top: 5px; height: 18px; width: 2.5px; }
html.pocket .wb-max { display: none; }
html.pocket .win.win-small { left: 12px !important; right: 12px; width: auto !important; top: 22% !important; border: 3px solid var(--frame); border-top: 0; border-radius: 8px 8px 0 0; box-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
html.pocket .win.win-small .win-title { border-radius: 7px 7px 0 0; }
html.pocket .start-btn { font-size: 21px; padding: 0 16px 0 8px; }
html.pocket .start-logo { width: 38px; height: 24px; }
html.pocket .quick { display: none; }
html.pocket .task { height: 34px; flex-basis: 44px; max-width: 150px; justify-content: center; padding: 0 6px; }
html.pocket .task .xi, html.pocket .task .xi-brand { width: 22px; height: 22px; --s: 22px; }
html.pocket .task span { display: none; }
html.pocket .task[aria-pressed="true"] { flex: 0 1 160px; justify-content: flex-start; }
html.pocket .task[aria-pressed="true"] span { display: inline; }
html.pocket .tray { padding: 0 8px 0 6px; gap: 4px; }
html.pocket .tray-ico { width: 30px; height: 30px; }
html.pocket .tray-ico .xi { width: 20px; height: 20px; }
html.pocket .tray-snd, html.pocket .tray-jar span { display: none; }
html.pocket .clock { font-size: 12px; padding: 0 2px 0 4px; }
html.pocket .startmenu { width: 100%; border-radius: 10px 10px 0 0; max-height: calc(100% - var(--tb-h) - 30px); }
html.pocket .sm-cols { grid-template-columns: 1fr; overflow: auto; }
html.pocket .sm-left, html.pocket .sm-right { overflow: visible; }
html.pocket .sm-item { padding: 6px 12px; }
html.pocket .sm-foot button { padding: 8px 10px; }
html.pocket .dicons { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); grid-auto-rows: 96px; align-content: start; padding: 10px 6px; overflow-y: auto; }
html.pocket .dicon { position: static; width: auto; }
html.pocket .dicon .xi, html.pocket .dicon .xi-brand { width: 48px; height: 48px; --s: 48px; }
html.pocket .dicon .dl { font-size: 12px; }
html.pocket .menu { font-size: 15px; min-width: 200px; }
html.pocket .menu-item { padding: 9px 16px 9px 8px; }
html.pocket .xbtn { min-height: 34px; padding: 6px 14px; }
html.pocket .xinput, html.pocket .xselect, html.pocket .xtext { min-height: 36px; font-size: 16px; }
html.pocket .fv-tasks { display: none; }
html.pocket .fv-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
html.pocket .fv-grid.tiles { grid-template-columns: 1fr; }
html.pocket .fv-label { font-size: 13px; }
html.pocket .statusbar { font-size: 12px; }
html.pocket .toasts { left: 8px; right: 8px; justify-items: stretch; }
html.pocket .toast, html.pocket .balloon { max-width: none; font-size: 14px; }
html.pocket .msn { width: auto; left: 10px; }
html.pocket .welcome { grid-template-rows: 56px 1fr 64px; }
html.pocket .welcome .w-mid { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 22px; }
html.pocket .w-left { justify-self: center; text-align: center; padding: 0 16px; }
html.pocket .w-left img { width: 120px; }
html.pocket .w-line { display: none; }
html.pocket .w-users { padding: 0 16px; justify-items: stretch; }
html.pocket .welcome .w-bot { padding: 0 14px; font-size: 12px; }
html.pocket .bl-mark { font-size: 34px; }
html.pocket .bl-mark img { width: 84px; }
html.pocket .tabs [role="tab"] { padding: 6px 9px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  /* the clouds keep drifting, like the fireflies, just slower */
  .wallpaper .wp-drift { animation-duration: 840s !important; animation-iteration-count: infinite !important; }
}
