/* ═══════════════ Base ═══════════════ */
/* Typo Round (StudioTypo, free demo, assets/fonts): the bubbly lettering for the now-playing song. */
@font-face { font-family: "Typo Round"; src: url("assets/fonts/typo-round-regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Typo Round"; src: url("assets/fonts/typo-round-bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
:root {
  --glass: 110, 170, 230;          /* window color, changed in Personalize */
  --tb-h: 40px;                    /* Vista's 30px taskbar, scaled up ~35% (phones: 44px, below) */
  --ui: "Segoe UI", "Segoe UI Variable", Tahoma, system-ui, sans-serif;
  /* Windows 7 / Vista cursor set (assets/cursors, public domain). PNGs decoded from the pack's
     .cur/.ani files; the numbers are each file's own hotspot. Keywords are the fallback. */
  --cur-arrow: url("assets/cursors/arrow.png") 0 0, default;
  --cur-link: url("assets/cursors/link.png") 5 0, pointer;
  --cur-text: url("assets/cursors/text.png") 15 16, text;
  --cur-move: url("assets/cursors/move.png") 15 15, move;
  --cur-busy: url("assets/cursors/busy.png") 16 16, wait;   /* first frame of busy.ani */
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: #031a3a;
  font-family: var(--ui);
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: #0b5cd5; }
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; flex: none; }

/* Cursor roles. :where() keeps these at zero specificity, so component rules still decide. */
html { cursor: var(--cur-arrow); }
:where(a[href]) { cursor: var(--cur-link); }
:where(button, select, summary, label, input) { cursor: var(--cur-arrow); }
:where(textarea, [contenteditable]:not([contenteditable="false"]),
  input:is(:not([type]), [type="text"], [type="search"], [type="email"], [type="url"], [type="tel"], [type="password"], [type="number"])) { cursor: var(--cur-text); }
:where(:disabled) { cursor: var(--cur-arrow); }
/* Selectable window text gets the I-beam the browser would show natively. */
:where(.window-body) :where(p, li, h1, h2, h3, h4, h5, h6, pre, blockquote, dd, dt, figcaption) { cursor: var(--cur-text); }

.avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initials {
  display: grid; place-items: center;
  color: #fff; font-weight: 600; letter-spacing: .02em;
  background: radial-gradient(circle at 50% 25%, #bdf3ff, #2aa9e8 55%, #0b5aa8);
  text-shadow: 0 2px 4px rgba(0,40,100,.5);
}

/* Glossy aero button */
.aero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  border: 1px solid #3c7fb1;
  border-radius: 3px;
  background: linear-gradient(180deg, #f2f9fe 0%, #d6edfb 45%, #bde2f8 50%, #a7d8f6 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
  color: #0b2c4f; font-size: 13px;
  text-decoration: none; cursor: var(--cur-link);
  transition: box-shadow .15s, filter .15s;
}
.aero-btn:hover { box-shadow: inset 0 0 0 1px #fff, 0 0 6px rgba(80,180,255,.7); filter: saturate(1.3); }
.aero-btn.green {
  border-color: #3c8f22;
  background: linear-gradient(180deg, #f1ffe5 0%, #cdf4a8 45%, #a5e46e 50%, #c9f6a0 100%);
  color: #18440a;
}
.pill {
  display: inline-block; padding: 2px 10px; margin: 0 5px 5px 0;
  border-radius: 999px; font-size: 12px; color: #0b3e6b;
  background: linear-gradient(180deg, #fff, #dcefff);
  border: 1px solid #a3cbec;
}

/* Spinner (Vista busy ring) */
.spinner {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: conic-gradient(rgba(120,210,255,0) 0deg, rgba(120,210,255,.5) 200deg, #dff6ff 330deg, rgba(120,210,255,0) 360deg);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 55%);
          mask: radial-gradient(circle, transparent 52%, #000 55%);
  filter: drop-shadow(0 0 4px rgba(120,210,255,.9));
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadein { from { opacity: 0; } }

/* ═══════════════ Boot screen ═══════════════
   Pure black → glass orb → light leaks out of the flag's four panes (thin tapered spikes in pairs plus a
   pane-coloured wash across the glass) and swells for ~1.8 s → the whole thing fades linearly to black in
   ~0.55 s, keyed to the tail of assets/audio/startup.mp3. script.js drives --orb / --scale / --ray / --ray-len /
   --fade each frame from the audio clock, so the visuals stay locked to the sound. Sizes and timings are
   measured from the reference captures. Orb size comes from the laptop photo's lit display area only (bezel
   and glow excluded): a ~52 px glass disc on a ~380 px tall display ≈ 13.7% of the screen height; on
   portrait / narrow screens it is capped at 17% of the width (the old 46%-of-width rule scaled by the same
   factor). --orb-d is the disc diameter; the glow (aura, edge shine) is all proportional to it. */
#bootscreen {
  --orb: 0; --scale: 1; --ray: 0; --ray-len: 1; --fade: 0; --aura-fade: 0;
  --orb-d: min(13.7vh, 17vw);
  position: fixed; inset: 0; z-index: 10002;
  display: grid; place-items: center;
  background: #000; color: #fff;
  transition: opacity .7s ease;
  cursor: none;
}
#bootscreen.leaving { opacity: 0; pointer-events: none; }
.boot-stage {
  position: relative; width: var(--orb-d); aspect-ratio: 1; translate: 0 .5vh;
  display: grid; place-items: center;
}
.boot-orb {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%;
  opacity: var(--orb);
  transform: scale(var(--scale));
  /* the fade-out: straight to black, losing a little of the glass's blue on the way down */
  filter: brightness(calc(1 - var(--fade))) saturate(calc(1 - var(--fade) * .3));
  will-change: opacity, transform, filter;
}
/* boot-orb-256.png is the supplied start orb, tone-matched to the boot capture (deeper navy glass, softer cyan).
   Its glass disc spans ~238.5 of the 256 px, so the image is over-sized to make the disc fill the stage exactly. */
.boot-orb img {
  position: absolute; left: -3.77%; top: -3.77%; width: 107.34%; height: 107.34%; max-width: none;
  display: block; user-select: none; -webkit-user-drag: none;
}
/* pane-coloured light across the glass: warm top-left, green top-right, cool bottom-left, yellow bottom-right,
   with the blue band the horizontal rays cast across the left half and the teal shaft below the flag */
.boot-orb-light {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 43%, rgba(70,130,255,.42) 50%, rgba(40,90,220,.12) 55%, transparent 60%) 0 0 / 56% 100% no-repeat,
    linear-gradient(90deg, transparent 44%, rgba(90,210,180,.34) 51%, rgba(60,170,150,.10) 58%, transparent 63%) 0 100% / 100% 34% no-repeat,
    conic-gradient(from 8deg,
      rgba(110,190,50,.32) 0deg 78deg, rgba(150,120,30,.2) 102deg 168deg,
      rgba(70,90,120,.2) 192deg 258deg, rgba(185,80,70,.38) 282deg 348deg, rgba(110,190,50,.32) 360deg);
  /* edge shine: 1.08% / 9.4% of the disc (was .4vmin / 3.5vmin on the old 37vh disc) */
  box-shadow: inset 0 0 0 calc(var(--orb-d) * .0108) rgba(150,185,215,.22), inset 0 0 calc(var(--orb-d) * .094) rgba(150,185,215,.22);
  mix-blend-mode: screen; opacity: var(--ray);
}
/* the spikes and halo live outside the glass only (the light on the glass is .boot-orb-light) */
.boot-aura {
  position: absolute; left: 50%; top: 50%; width: 350%; height: 350%; translate: -50% -50%;
  overflow: visible; pointer-events: none;
  -webkit-mask: radial-gradient(closest-side, transparent 27.6%, #000 29.2%);
          mask: radial-gradient(closest-side, transparent 27.6%, #000 29.2%);
  mix-blend-mode: screen;
  opacity: calc(var(--ray) * (1 - var(--aura-fade)));
}
.boot-spikes { transform: scale(var(--ray-len)); }
/* Phase 1 — silent loader: thin grey track at lower centre, a cluster of glowing green segments sweeping
   left → right, the caption beneath. Measured from a 640×480 reference: track 122×11px (≈19% of width) centred
   at ≈75% height, six 2px segments with 2px gaps, caption centred at ≈82%. Everything is sized in em off one
   font-size so the group scales as a unit; the caption gap follows vh so it stays near 82% on wide screens.
   Size re-checked against the laptop photo's lit display (bezel and perspective excluded, ~573×372 px): track
   ≈110×10 px → 29.6% of the display height, caption ≈117 px wide. The old 1.875vw rule ran ~14% larger than that
   on 16:9 screens, so the em is now capped by height (2.9vh → track ≈29.5vh) as well as width (1.7vw, ~9% below
   the old rule): a modest, uniform shrink of track, segments and caption together. */
.boot-loader {
  --cw: 1.833em; /* cluster width: 6 × 2px segments + 5 × 2px gaps at 12px */
  position: absolute; left: 50%; top: 74.6%; translate: -50% -.46em;
  display: none; flex-direction: column; align-items: center;
  font-size: clamp(10px, min(1.7vw, 2.9vh), 50px);
}
#bootscreen.loading .boot-loader { display: flex; }
#bootscreen.loading .boot-stage { visibility: hidden; }
.boot-track {
  position: relative; width: 10.17em; height: .9em; box-sizing: border-box;
  border: 1px solid #a7abaf; border-radius: 1px;
  background: linear-gradient(180deg, #1a1c1e, #060707 60%, #0e0f10);
  box-shadow: inset 0 0 0 1px #000;
}
/* the moving cluster: six lit segments with thin dark gaps */
.boot-blocks { position: absolute; inset: 0 1px; overflow: hidden; }
.boot-cluster {
  position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--cw)); width: var(--cw);
  display: flex; gap: .167em;
  filter: drop-shadow(0 0 .15em rgba(190,255,50,.7));
  animation: boot-sweep var(--pass, 1.8s) linear var(--passes, 2) both;
}
.boot-cluster i {
  flex: 1; border-radius: 1px;
  background: linear-gradient(180deg, #e8ff8a, #b6e82a 40%, #6f9e14);
}
#bootscreen:not(.loading) .boot-cluster { animation: none; }
@keyframes boot-sweep { from { left: calc(-1 * var(--cw)); } to { left: 100%; } }
.boot-copy {
  margin: clamp(1.2em, calc(7.6vh - .96em), 2.6em) 0 0; white-space: nowrap;
  color: #fff; font: 400 1em/1 var(--ui);
  text-shadow: 0 0 1px rgba(255,255,255,.4);
}
/* Between the loader and the orb: the mouse pointer appears, briefly gains the blue "working in background"
   ring, then disappears before the orb. On mouse devices this is the REAL cursor, wherever the mouse is: the
   boot surface switches cursor roles (arrow → working → none), so it shows up where the user left it and moves
   normally. working/01–18.png are the 18 frames of the supplied "Vista (Working).ani" (32×32, 32-bit alpha, decoded
   unchanged; 2 jiffies each, no seq chunk → 0.6 s loop; working.png is the same frames as a 576×32 strip), cycled
   with a stepped cursor animation. Hotspots are the files' own (arrow 0,0 · working 0,8: same arrow tip), so the
   pointer doesn't jump when the ring appears. Touch screens have no cursor, so there the same arrow → ring is
   drawn as .boot-pointer near the centre (32 px, hotspot on the centre) to keep the sequence. */
.boot-pointer {
  position: absolute; left: 50%; top: 50%; width: 32px; height: 32px;
  display: none; pointer-events: none;
  background: url("assets/cursors/arrow.png") 0 0 / 32px 32px no-repeat;   /* native size; smooth if the page is zoomed */
}
@media not all and (pointer: fine) {
  #bootscreen[data-pointer="arrow"] .boot-pointer { display: block; }
  #bootscreen[data-pointer="busy"] .boot-pointer {
    display: block; margin-top: -8px;
    background: url("assets/cursors/working.png") 0 0 / 576px 32px no-repeat;
    animation: boot-working .6s steps(18) infinite;
  }
}
@keyframes boot-working { to { background-position-x: -576px; } }
@media (pointer: fine) {
  #bootscreen[data-pointer="arrow"] { cursor: var(--cur-arrow); }
  #bootscreen[data-pointer="busy"] {
    cursor: url("assets/cursors/working/01.png") 0 8, progress;
    animation: boot-working-cursor .6s step-end infinite;
  }
}
@keyframes boot-working-cursor {
  0% { cursor: url("assets/cursors/working/01.png") 0 8, progress; }
  5.556% { cursor: url("assets/cursors/working/02.png") 0 8, progress; }
  11.111% { cursor: url("assets/cursors/working/03.png") 0 8, progress; }
  16.667% { cursor: url("assets/cursors/working/04.png") 0 8, progress; }
  22.222% { cursor: url("assets/cursors/working/05.png") 0 8, progress; }
  27.778% { cursor: url("assets/cursors/working/06.png") 0 8, progress; }
  33.333% { cursor: url("assets/cursors/working/07.png") 0 8, progress; }
  38.889% { cursor: url("assets/cursors/working/08.png") 0 8, progress; }
  44.444% { cursor: url("assets/cursors/working/09.png") 0 8, progress; }
  50% { cursor: url("assets/cursors/working/10.png") 0 8, progress; }
  55.556% { cursor: url("assets/cursors/working/11.png") 0 8, progress; }
  61.111% { cursor: url("assets/cursors/working/12.png") 0 8, progress; }
  66.667% { cursor: url("assets/cursors/working/13.png") 0 8, progress; }
  72.222% { cursor: url("assets/cursors/working/14.png") 0 8, progress; }
  77.778% { cursor: url("assets/cursors/working/15.png") 0 8, progress; }
  83.333% { cursor: url("assets/cursors/working/16.png") 0 8, progress; }
  88.889% { cursor: url("assets/cursors/working/17.png") 0 8, progress; }
  94.444% { cursor: url("assets/cursors/working/18.png") 0 8, progress; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-cluster { animation: none; left: calc(50% - var(--cw) / 2); }
  #bootscreen[data-pointer="busy"] .boot-pointer { animation: none; }
  #bootscreen[data-pointer="busy"] { animation: none; }
}

/* ═══════════════ Logon screen ═══════════════ */
#logon {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column;
  overflow: hidden; color: #fff;
  /* user-supplied Vista lock-screen photo, one pre-composed variant per aspect band (see below);
     `cover` never stretches, and the anchor keeps the ribbon swirl + horizon in frame */
  background: #2162a0 url("assets/backgrounds/logon-1920x1200.jpg") 35% 85% / cover no-repeat;
  transition: opacity .9s ease;
  animation: fadein .6s ease;
}
/* Aspect bands → closest-composed source. Only the matching rule's image is fetched;
   an orientation change swaps (and fetches) the other one on demand. */
@media (max-aspect-ratio: 29/20) { #logon { background-image: url("assets/backgrounds/logon-1600x1200.jpg"); } }  /* 4:3 / 5:4 landscape */
@media (max-aspect-ratio: 11/10) { #logon { background-image: url("assets/backgrounds/logon-1024x1280.jpg"); background-position: 40% 80%; } }  /* near-square, 4:5 */
@media (max-aspect-ratio: 39/50) { #logon { background-image: url("assets/backgrounds/logon-960x1280.jpg"); } }   /* 3:4 tablet portrait */
@media (max-aspect-ratio: 17/25) { #logon { background-image: url("assets/backgrounds/logon-900x1440.jpg"); } }   /* 10:16 tablet portrait */
@media (max-aspect-ratio: 3/5)   { #logon { background-image: url("assets/backgrounds/logon-768x1360.jpg"); } }   /* phones, 9:16 and taller */
#logon.leaving { opacity: 0; pointer-events: none; }
/* "Shutting down…" phase: busy cursor over the whole logon screen. During "Welcome" the ring beside the word is the
   only busy indicator, so the pointer stays the plain arrow (no second, duplicate ring following the mouse). */
#logon[data-state="off"], #logon[data-state="off"] * { cursor: var(--cur-busy); }
#logon[data-state="welcome"], #logon[data-state="welcome"] * { cursor: var(--cur-arrow); }
/* "Welcome": nothing but the animated ring + the word, one row centred over the wallpaper (tile, name, password,
   arrow and footer all hidden; visibility keeps the footer's height so the wallpaper framing doesn't shift). */
#logon[data-state="welcome"] :is(.user-tile, .logon-name) { display: none; }
#logon[data-state="welcome"] .logon-foot { visibility: hidden; }
/* the row sits a little above centre, at ~42% of the viewport height as on the reference capture */
#logon[data-state="welcome"] .logon-center { position: fixed; inset: 0; padding: 0 16px 16.4vh; }
/* Metrics follow a 1024×768 Vista logon: 150px frame (128px window, 126px of picture inside its dark rim), 224×25 field centred under it with the
   30px arrow sphere outside on the right, 38×28 Ease of Access / 58×28 power buttons 34px in from the corners.
   --lu scales the centre block (tile, name, field, arrow) together: 1px up to a 768px-short viewport, rising
   gently to 1.25px by 1440 (≈1.16 at 1920×1080, 1.25 at 2560×1440), so those gaps keep the reference proportions. */
.logon-center {
  --lu: clamp(1px, calc(.6px + .0521vmin), 1.25px);
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: min(17vh, 130px) 16px 0; text-align: center;
}
.user-tile { padding: 0; border: 0; background: none; cursor: var(--cur-link); border-radius: calc(14 * var(--lu)); margin-bottom: calc(23 * var(--lu)); }
.user-tile:focus { outline: none; }
.tile-frame { position: relative; display: block; width: calc(150 * var(--lu)); height: calc(150 * var(--lu)); transition: transform .25s; }
.tile-rim {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(1.5px 2.5px 2.5px rgba(0,22,40,.6)) drop-shadow(0 0 1px rgba(0,30,50,.3));
  transition: filter .25s;
}
.user-tile:hover .tile-rim, .user-tile:focus-visible .tile-rim {
  filter: drop-shadow(1.5px 2.5px 2.5px rgba(0,22,40,.6)) drop-shadow(0 0 9px rgba(170,235,255,.95));
}
.user-tile:active .tile-frame { transform: scale(.98); }
.tile-img, .tile-glass { position: absolute; left: 7.3333%; top: 6.6667%; width: 85.3333%; height: 85.3333%; border-radius: calc(2 * var(--lu)); }
.tile-img { overflow: hidden; font-size: calc(46 * var(--lu)); background: #d9622e; }
/* Glass over the window, separate from the picture so any avatar gets it: a fine dark inner rim, a white sheen that
   fades down the upper half, plus a faint wash cut off along a diagonal (measured against the reference tile). */
.tile-glass {
  pointer-events: none; box-sizing: border-box; border: 1px solid; border-color: #5b6d63 #224a3f #173e47 #27524c;
  background: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.45) 9.5%, rgba(255,255,255,.4) 16.7%, rgba(255,255,255,.32) 23.8%,
    rgba(255,255,255,.26) 31%, rgba(255,255,255,.18) 38%, rgba(255,255,255,.14) 45%, rgba(255,255,255,.02) 52%, transparent 60%) padding-box;
}
.tile-glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(255,255,255,.15);
  -webkit-mask-image: linear-gradient(135deg, #000 51.5%, transparent 53.5%); mask-image: linear-gradient(135deg, #000 51.5%, transparent 53.5%);
}
.logon-name { font: 400 calc(22 * var(--lu))/calc(26 * var(--lu)) var(--ui); text-shadow: 0 1px 6px rgba(0,30,60,.55); }
.logon-pass-row { position: relative; display: flex; align-items: center; margin-top: calc(9 * var(--lu)); }
#logon:not([data-state="pick"]) .logon-pass-row { display: none; }
.logon-pass {
  box-sizing: border-box; width: calc(224 * var(--lu)); height: calc(25 * var(--lu)); margin: 0; padding: 0 calc(5 * var(--lu));
  background: #fff; color: #000; font: 400 calc(12 * var(--lu)) var(--ui); text-align: left;
  border: 1px solid #5a7d98; border-radius: 2px; outline: none; appearance: none;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.14), 0 0 0 1px rgba(205,232,245,.55);
  cursor: var(--cur-text); user-select: text; -webkit-user-select: text;
}
.logon-pass::placeholder { color: #6d6d6d; opacity: 1; }
.logon-pass::-ms-reveal { display: none; }   /* Edge's eye button: nothing to reveal here */
.logon-pass:focus { border-color: #3d7bad; box-shadow: inset 0 1px 1px rgba(0,0,0,.14), 0 0 0 1px rgba(205,232,245,.75), 0 0 4px 1px rgba(150,215,255,.6); }
/* the arrow sphere hangs outside the field so the field itself stays centred under the tile */
.logon-go {
  position: absolute; left: calc(100% + 4 * var(--lu)); top: 50%; translate: 0 -50%;
  width: calc(30 * var(--lu)); height: calc(30 * var(--lu)); padding: 0; border: 0; border-radius: 50%; background: none;
  display: grid; place-items: center; cursor: var(--cur-link);
  transition: filter .15s;
}
.logon-go img {
  width: 100%; height: 100%; display: block;
  /* Trim the ICO's hard pixel fringe to a smooth glass rim at any zoom. */
  clip-path: circle(46% at center);
}
.logon-go:hover, .logon-go:focus-visible { outline: none; filter: brightness(1.15) saturate(1.1) drop-shadow(0 0 5px rgba(140,215,255,.95)); }
.logon-go:active { filter: brightness(.9); }
.logon-status { min-height: 30px; display: flex; align-items: center; justify-content: center; gap: 12px; }
#logon[data-state="pick"] .logon-status { min-height: 0; }
.logon-msg { font: 300 30px var(--ui); text-shadow: 0 2px 10px rgba(0,0,0,.5); }
/* Welcome row, measured on the 800×600 reference capture: the ring is the supplied "Vista (Busy).ani" (busy-strip.png:
   its 18 32×32 frames side by side, 2 jiffies each → 0.6 s loop, stepped exactly frame to frame), its 20px of visible
   ring ending ~11px before the W; "Welcome" is plain white Segoe UI, 96px wide with 17px capitals and a faint soft
   shadow, the ring centred on the capitals. --wu scales the whole row together: 1px up to a 600px-short viewport
   (reference size, and phones), rising to 1.75px by 1440 (≈1.43 at 1920×1080, 1.75 at 2560×1440). The ring's frame
   size is rounded to whole pixels and the strip, its background-size and the step distance all derive from it, so
   every step lands exactly on a frame boundary at any scale. */
#logon[data-state="welcome"] .logon-status { --wu: clamp(1px, calc(.4642px + .0893vmin), 1.75px); gap: calc(4 * var(--wu)); }
.welcome-ring {
  --ring: round(calc(32 * var(--wu)), 1px);
  width: var(--ring); height: var(--ring); flex: none; margin-top: calc(-2 * var(--wu));
  background: url("assets/cursors/busy-strip.png") 0 0 / calc(18 * var(--ring)) var(--ring) no-repeat;
  animation: welcome-ring .6s steps(18) infinite;
}
@keyframes welcome-ring { to { background-position-x: calc(-18 * var(--ring)); } }
.welcome-msg { font: 400 calc(24 * var(--wu))/calc(32 * var(--wu)) var(--ui); color: #fff; text-shadow: 0 1px calc(3 * var(--wu)) rgba(0,30,50,.35); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .welcome-ring { animation: none; } }
/* Footer metrics measured on the 1024×768 reference: 38×28 Ease of Access / 58×28 power buttons 34px in from the sides
   and bottom (tops at y 706), the flag ~43px tall centred at y 718, the wordmark's baseline at y 733 (~15px under the
   flag's centre) with ~21px capitals. --fu scales the whole row together: 1px up to a 768px-short viewport, rising to
   1.5px by 1440 (≈1.23 at 1920×1080, 1.5 at 2560×1440) — a little faster than the centre block's --lu, since native-size
   corner controls read as tiny on large monitors. */
.logon-foot {
  --fu: clamp(1px, calc(.4286px + .0744vmin), 1.5px);
  position: relative; z-index: 1;
  box-sizing: border-box; height: calc(98 * var(--fu)); padding: calc(2 * var(--fu)) calc(34 * var(--fu)) 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.logon-ease {
  justify-self: start; box-sizing: border-box; width: calc(38 * var(--fu)); height: calc(28 * var(--fu)); display: grid; place-items: center;
  border-radius: calc(2 * var(--fu)); border: 1px solid #0b4b6e;
  background: linear-gradient(180deg, rgba(150,195,225,.55) 0%, rgba(95,140,180,.5) 42%, rgba(55,110,150,.55) 50%, rgba(55,130,160,.45) 82%, rgba(110,190,215,.6) 100%);
  box-shadow: inset 0 0 0 1px rgba(140,200,228,.75), 0 1px 2px rgba(0,30,50,.3);
}
/* 22px medallion centred in the 38×28 glass frame, ~3px clear of the rim top and bottom as in the reference */
.logon-ease svg { width: calc(22 * var(--fu)); height: calc(22 * var(--fu)); display: block; filter: drop-shadow(0 .5px .5px rgba(0,20,60,.35)); }
.logon-brand { display: flex; align-items: baseline; gap: calc(5 * var(--fu)); white-space: nowrap; text-shadow: 0 1px 3px rgba(0,40,80,.45); }
.logon-brand img { align-self: center; width: calc(48 * var(--fu)); height: calc(48 * var(--fu)); filter: drop-shadow(0 1px 2px rgba(0,30,60,.35)); }
/* the words sit low beside the flag: baseline ~15px under the flag's centre */
.lb-name, .lb-ed { position: relative; top: calc(8 * var(--fu)); }
.lb-name { font: 400 calc(31 * var(--fu))/1 var(--ui); letter-spacing: -.03em; }
.lb-name b { font-weight: 600; }
.lb-name sup { font-size: .26em; vertical-align: 2.4em; margin-left: 1px; letter-spacing: 0; }
.lb-ed { font: 400 calc(21 * var(--fu))/1 var(--ui); opacity: .95; margin-left: calc(2 * var(--fu)); }
/* split red power control: the 58×28 artwork lifted from the reference close-up (dark rim, pale-pink upper glass,
   deep red lower face, ring-and-stem symbol, options triangle). Each half paints its own 37px / 21px slice of the
   same sprite (scaled with --fu) so hover/focus stay per-button. */
.logon-power-group {
  justify-self: end; display: flex; width: calc(58 * var(--fu)); height: calc(28 * var(--fu));
  --pw: url("assets/icons/logon-power.png") no-repeat;
}
.logon-power, .logon-power-more { background: var(--pw); background-size: calc(58 * var(--fu)) 100%; }
.logon-power {
  width: calc(37 * var(--fu)); height: 100%; padding: 0; border: 0; border-radius: calc(3 * var(--fu)) 0 0 calc(3 * var(--fu));
  background-position: 0 0; cursor: var(--cur-link); transition: filter .15s;
}
.logon-power:hover, .logon-power:focus-visible { outline: none; filter: brightness(1.18) saturate(1.1); }
.logon-power:active { filter: brightness(.88); }
.logon-power-more { width: calc(21 * var(--fu)); height: 100%; background-position: calc(-37 * var(--fu)) 0; }

/* ═══════════════ Desktop + wallpaper ═══════════════ */
#desktop { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; }
/* The animated landscape (index.html), its first frame painted underneath while the video loads. */
.wallpaper {
  position: absolute; inset: 0; overflow: hidden;
  background: #3d9be3 url("assets/backgrounds/desktop-landscape-poster.jpg") center / cover no-repeat;
}
.wp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* Bubbles: clear soap bubbles drifting over the desktop (script.js moves them) — above the shortcuts and the media
   bar, below the windows. A nearly invisible film that thickens toward the rim, a slowly swirling rainbow edge,
   a bright highlight with a soft crescent reflection, and a quick snap with droplets when popped. */
.bubbles { position: absolute; inset: 0 0 var(--tb-h) 0; overflow: hidden; z-index: 3; pointer-events: none; }
.bubble {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  pointer-events: auto; cursor: var(--cur-link); will-change: translate, transform;
  background: radial-gradient(closest-side, rgba(255,255,255,0) 62%, rgba(215,242,255,.08) 76%, rgba(230,248,255,.28) 93%, rgba(255,255,255,.55) 100%);
  box-shadow: 0 0 6px rgba(210,245,255,.16);
  -webkit-tap-highlight-color: transparent;
}
.bubble::before {              /* iridescent rim */
  content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: var(--rim, .85);
  background: conic-gradient(from var(--tilt, 0deg), rgba(110,185,255,.8), rgba(120,255,215,.65), rgba(255,248,165,.55),
    rgba(255,150,215,.65), rgba(150,135,255,.65), rgba(110,185,255,.8));
  -webkit-mask: radial-gradient(closest-side, transparent 79%, rgba(0,0,0,.35) 89%, #000 97%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 79%, rgba(0,0,0,.35) 89%, #000 97%, transparent 100%);
  animation: bubble-swirl var(--spin, 18s) linear infinite;
}
/* Reflections, drawn lit from the upper left and then turned to each bubble's own light direction (--rot). */
.bubble::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  opacity: var(--ref, .9); transform: rotate(var(--rot, 0deg));
}
.bubble.r1::after {            /* a sharp highlight, a faint glint opposite, a crescent of sky */
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.95) 0 3.5%, rgba(255,255,255,.35) 6%, rgba(255,255,255,0) 11%),
    radial-gradient(circle at 72% 77%, rgba(255,255,255,.6) 0 2%, rgba(255,255,255,0) 6%),
    radial-gradient(circle at 63% 67%, rgba(255,255,255,0) 60%, rgba(255,255,255,.3) 65.5%, rgba(255,255,255,0) 70%);
}
.bubble.r2::after {            /* a window reflected in the film: soft panes up top, a small echo below */
  background:
    radial-gradient(ellipse 10% 6% at 35% 24%, rgba(255,255,255,.85), rgba(255,255,255,0)),
    radial-gradient(ellipse 6% 9% at 23% 35%, rgba(255,255,255,.6), rgba(255,255,255,0)),
    radial-gradient(ellipse 5% 3% at 66% 81%, rgba(255,255,255,.5), rgba(255,255,255,0)),
    radial-gradient(circle at 60% 62%, rgba(255,255,255,0) 63%, rgba(255,255,255,.22) 67%, rgba(255,255,255,0) 71%);
}
.bubble.r3::after {            /* a broad soft sheen across the top, a pin-point glint, light pooling at the bottom */
  background:
    radial-gradient(circle at 37% 17%, rgba(255,255,255,.95) 0 2%, rgba(255,255,255,0) 5%),
    radial-gradient(ellipse 30% 15% at 50% 19%, rgba(255,255,255,.42), rgba(255,255,255,0)),
    radial-gradient(ellipse 32% 12% at 50% 89%, rgba(220,250,255,.28), rgba(255,255,255,0));
}
.bubble { z-index: 1; }
.bubble.far { z-index: 0; }   /* the small, distant ones drift behind the near ones (which bounce off each other) */
.bubble.far::before { opacity: calc(var(--rim, .85) * .7); }
.bubble.far::after { opacity: calc(var(--ref, .9) * .85); }
@keyframes bubble-swirl { to { transform: rotate(1turn); } }
.bubble.pop { scale: 1.16; opacity: 0; pointer-events: none; transition: scale .14s ease-out, opacity .14s ease-out; }
.splash {
  position: absolute; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(235,250,255,.8);
  animation: splash .32s ease-out forwards;
}
@keyframes splash { from { scale: 1; opacity: .9; } to { scale: 1.4; opacity: 0; } }
.droplet {
  position: absolute; margin: -2px 0 0 -2px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(200,240,255,.85) 60%, rgba(120,200,255,.45));
}

/* Desktop layer: a centred hub (profile pill over a 2×3 shortcut grid) in the upper middle, the Media Player transport
   pill near the bottom, the Recycle Bin in the top-left corner. Below the windows (z 5), above the wallpaper.
   A flex column, so the three never overlap; if a very short screen can't fit them, the layer scrolls. */
#deskarea {
  position: absolute; inset: 0 0 var(--tb-h) 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: none;
  transition: opacity .1s;
}
#deskarea::-webkit-scrollbar { display: none; }
.hub {
  flex: none; max-width: 100%;
  margin: clamp(16px, 13vh, 150px) 0 20px;
  display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4vh, 22px);
  pointer-events: none;
}

/* Profile pill: the same bubbly Frutiger Aero glass as the media bar (white rim, top sheen, aqua under-glow), tinted a
   little deeper so the white name stays readable. */
.hub-id {
  pointer-events: auto; position: relative;
  display: flex; align-items: center; gap: 24px;
  min-width: 420px; max-width: 100%;
  padding: 11px 24px 11px 16px;           /* right padding = gap, so the name sits centred right of the picture */
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.62);
  background:
    linear-gradient(180deg, rgba(255,255,255,.3) 0%, rgba(255,255,255,.08) 47%, rgba(255,255,255,0) 53%, rgba(255,255,255,.1) 100%),
    radial-gradient(120% 95% at 50% 125%, rgba(110,235,255,.42), rgba(110,235,255,0) 62%),
    linear-gradient(180deg, rgba(120,200,240,.2), rgba(8,70,125,.45));
  -webkit-backdrop-filter: blur(12px) saturate(1.7);
          backdrop-filter: blur(12px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85), inset 0 0 0 1px rgba(255,255,255,.2), inset 0 -8px 14px -6px rgba(150,240,255,.5),
    0 0 0 1px rgba(8,48,88,.38), 0 8px 22px rgba(0,25,50,.35), 0 0 26px rgba(90,200,255,.24);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,30,70,.8), 0 0 8px rgba(0,40,90,.45);
}
.hub-id::before {             /* the top sheen */
  content: ""; position: absolute; left: 30px; right: 30px; top: 2px; height: 42%;
  border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.03));
}
.hub-id > * { position: relative; }
/* Profile pill: the desktop's centrepiece, a size up from the media bar below. */
/* Account picture in the Vista glass frame (the Start menu tile's silver-teal bevel), corners rounded to sit in the pill. */
.hub-pic {
  flex: none; width: 76px; height: 76px; padding: 4px;
  border: 1px solid rgba(0,0,0,.6); border-radius: 16px;
  background: linear-gradient(140deg, #fbfdfd 0%, #dfe7ea 38%, #b5c9cf 62%, #7fb9c8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 0 0 1px rgba(120,220,240,.35), 0 2px 5px rgba(0,0,0,.45);
}
.hub-pic-in { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border: 1px solid rgba(0,0,0,.45); border-radius: 12px; background: #fff; }
.hub-pic-in::after { content: ""; position: absolute; inset: 0 0 52% 0; background: linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,.06)); pointer-events: none; }
/* The name alone, centred in the space right of the picture. */
.hub-names { flex: 1; min-width: 0; display: flex; justify-content: center; text-align: center; }
.hub-names b { font-size: 30px; font-weight: 600; line-height: 38px; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Links: one centred row of glossy orbs (72px, label below, the stock hover/selection glass). */
.hub-grid {
  display: flex; justify-content: center; gap: 16px; width: max-content; max-width: 100%;
  pointer-events: none;
  --orb: 72px;
}
.hub-grid .desk-icon { flex: 0 1 104px; min-width: 0; gap: 4px; padding: 4px 2px 5px; border-radius: 6px; font-size: 14px; line-height: 18px; }
.desk-icon .di-pic.di-orb, .desk-icon .di-orb .ico { width: var(--orb); height: var(--orb); }
/* Top-left, stacked like a classic desktop: Recycle Bin, Notes, Photos (a row on narrow phones, below). */
.desk-corner {
  position: absolute; left: max(6px, env(safe-area-inset-left)); top: max(6px, env(safe-area-inset-top));
  display: flex; flex-direction: column; gap: 4px; pointer-events: none;
}
.desk-icon {
  pointer-events: auto;
  width: 84px; padding: 2px 1px 3px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 1px solid transparent; border-radius: 3px;
  color: #fff; font-size: 12px; line-height: 16px; text-decoration: none;
  text-shadow: 0 0 3px rgba(0,0,0,.75), 1px 1px 1px rgba(0,0,0,.95);
  cursor: var(--cur-arrow);
  -webkit-tap-highlight-color: transparent;
}
.desk-icon .ico { width: 48px; height: 48px; image-rendering: auto; }
.di-pic { position: relative; width: 48px; height: 48px; flex: none; }
.di-pic .lnk { position: absolute; left: 1px; bottom: 1px; width: 14px; height: 14px; filter: drop-shadow(0 0 1px rgba(0,0,0,.35)); }
.di-label {
  padding: 0 2px; max-width: 100%; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.desk-icon.selected .di-label, .desk-icon:focus .di-label { -webkit-line-clamp: 4; }

.desk-icon:hover { background: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.06)); border-color: rgba(255,255,255,.34); }
.desk-icon.selected { background: linear-gradient(rgba(150,200,255,.42), rgba(90,150,230,.32)); border-color: rgba(170,215,255,.8); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.desk-icon:focus-visible { outline: 1px dotted #fff; outline-offset: -3px; }

/* Media Player transport pill: the WMP 11 control bar (Stop · Previous ◖Play◗ Next · Mute) reworked as a clear,
   bubbly Frutiger Aero capsule: aqua-tinted frosted glass the wallpaper glows through, a doubled white rim, a soft
   top sheen and an aqua under-glow. The play orb is WMP 11's: a glossy blue dome in a dark gunmetal bezel,
   protruding past the capsule. */
.wmp-pill {
  pointer-events: auto; flex: none; position: relative;
  margin: 0 0 clamp(36px, 11vh, 120px);
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.62);
  background:
    linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.1) 47%, rgba(255,255,255,.02) 53%, rgba(255,255,255,.12) 100%),
    radial-gradient(120% 95% at 50% 125%, rgba(110,235,255,.42), rgba(110,235,255,0) 62%),
    linear-gradient(180deg, rgba(160,220,250,.16), rgba(18,92,150,.3));
  -webkit-backdrop-filter: blur(12px) saturate(1.7);
          backdrop-filter: blur(12px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85), inset 0 0 0 1px rgba(255,255,255,.2), inset 0 -8px 14px -6px rgba(150,240,255,.5),
    0 0 0 1px rgba(8,48,88,.38), 0 8px 22px rgba(0,25,50,.35), 0 0 26px rgba(90,200,255,.24);
  color: #fff;
}
.wmp-pill::before {           /* the top sheen */
  content: ""; position: absolute; left: 16px; right: 16px; top: 2px; height: 45%;
  border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.04));
}
.wmp-pill > * { position: relative; }
.pc-btn {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid transparent; border-radius: 999px;
  background: none; color: #fff; cursor: var(--cur-arrow);
  transition: background-color .12s, box-shadow .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent;
}
.pc-btn svg { width: 21px; height: 21px; fill: currentColor; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0,30,70,.75)); }
.pc-btn:hover {
  border-color: rgba(255,255,255,.5);
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.42), rgba(170,235,255,.14) 70%);
  box-shadow: 0 0 9px rgba(130,225,255,.65), inset 0 1px 0 rgba(255,255,255,.6);
}
.pc-btn:active { background: radial-gradient(circle at 50% 60%, rgba(0,40,80,.25), rgba(170,235,255,.1) 70%); box-shadow: inset 0 1px 3px rgba(0,30,60,.5); }
.pc-btn:focus-visible, .pc-orb:focus-visible { outline: 2px solid rgba(200,245,255,.95); outline-offset: 1px; }
.pc-stop svg { width: 20px; height: 20px; }
/* Previous / Next sit in one recessed capsule that the play orb breaks through. */
.pc-transport {
  display: flex; align-items: center; gap: 2px;
  height: 42px; padding: 0 4px;
  border-radius: 999px; border: 1px solid rgba(0,40,80,.28);
  background: linear-gradient(180deg, rgba(0,30,60,.26), rgba(255,255,255,.14));
  box-shadow: inset 0 1px 2px rgba(0,20,50,.45), inset 0 -1px 0 rgba(255,255,255,.3), 0 1px 0 rgba(255,255,255,.28);
}
.pc-skip { width: 54px; height: 34px; }
.pc-skip svg { width: 27px; height: 21px; }
.pc-orb {
  --orb-ring: 0 3px 10px rgba(0,30,70,.4);
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 76px; height: 76px; margin: -17px 5px; padding: 0;
  border: 0; border-radius: 50%;
  background:
    radial-gradient(70% 52% at 50% 100%, rgba(140,235,255,.95), rgba(80,190,255,0) 100%),
    radial-gradient(circle at 50% 70%, #3c9cff 0%, #1a6ae6 42%, #0b45b8 72%, #06307f 100%);
  box-shadow: var(--orb-ring), 0 0 16px rgba(60,170,255,.5);
  color: #fff; cursor: var(--cur-arrow);
  transition: filter .12s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.pc-orb::after {              /* glossy specular dome over the upper half */
  content: ""; position: absolute; left: 11px; right: 11px; top: 3px; height: 46%;
  border-radius: 50% 50% 46% 46% / 70% 70% 30% 30%; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.2) 75%, rgba(255,255,255,.06));
}
.pc-orb svg { position: relative; width: 37px; height: 37px; fill: currentColor; filter: drop-shadow(0 1px 2px rgba(0,25,90,.8)); }
.pc-orb:hover { filter: brightness(1.12) saturate(1.1); box-shadow: var(--orb-ring), 0 0 24px rgba(90,200,255,.85); }
.pc-orb:active { filter: brightness(.9); }
.pc-pause, .wmp-pill[data-state="playing"] .pc-play { display: none; }
.wmp-pill[data-state="playing"] .pc-pause { display: block; }
.wmp-pill[data-state="playing"] .pc-orb { animation: pc-glow 2.4s ease-in-out infinite alternate; }
@keyframes pc-glow {
  to { box-shadow: var(--orb-ring), 0 0 28px rgba(110,215,255,.95), 0 0 8px rgba(190,245,255,.8); }
}
.pc-mute { width: 46px; }
.pc-mute svg { width: 27px; height: 21px; }
.pc-mute .pc-x, .pc-mute.is-muted .pc-waves { display: none; }
.pc-mute.is-muted .pc-x { display: inline; }
/* Now playing: the song in bubbly Typo Round above the bar — title and artist the same size and glossy white-to-aqua,
   split by a little glass bubble — glowing softly against the wallpaper. It fades in on every track change, and a
   song too long for the space glides side to side between soft-faded edges (.np-view.scroll, set by script.js). */
.np-label {
  flex: none; margin: auto 0 16px; max-width: min(100%, 640px);
  font-family: "Typo Round", var(--ui); color: #fff; white-space: nowrap;
  pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(0,40,80,.7)) drop-shadow(0 0 10px rgba(110,215,255,.55));
  transition: opacity .3s;
}
.np-view { display: block; overflow: hidden; }
.np-track { display: flex; align-items: baseline; gap: 12px; width: max-content; }
.np-view.scroll {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.np-view.scroll .np-track { padding: 0 14px; animation: np-scroll var(--np-dur, 8s) ease-in-out infinite alternate; }
@keyframes np-scroll {
  0%, 15% { transform: translateX(0); }
  85%, 100% { transform: translateX(var(--np-shift, 0px)); }
}
.np-track b, .np-track > span {
  flex: none;
  font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: .01em;
  background: linear-gradient(180deg, #fff 0%, #fff 48%, #d9f7ff 56%, #9fe4ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.np-track > span { position: relative; padding-left: 23px; }
.np-track > span::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 11px; height: 11px; margin-top: -5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, rgba(190,240,255,.9) 40%, rgba(60,170,230,.75) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.np-label:empty { visibility: hidden; }
.np-label[data-state="paused"], .np-label[data-state="stopped"] { opacity: .72; }
.np-label.swap { animation: np-in .55s ease-out; }
@keyframes np-in { from { opacity: 0; transform: translateY(6px); } }
.pc-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Transparency off (Personalize): the same shapes, opaque. */
.no-glass .hub-id { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, #7fbfe0 0%, #3f8fbf 47%, #23709f 53%, #3a8cbc 100%); }
.no-glass .wmp-pill { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, #a9dcf2 0%, #6fb8dc 47%, #3f93c4 53%, #5fb6dd 100%); }
/* Launching a stock entry: Vista's "working in background" pointer for a moment (frames from styles above). */
@media (pointer: fine) {
  #desktop[data-busy] { animation: boot-working-cursor .6s step-end infinite; }
  #desktop[data-busy] * { cursor: inherit !important; }
}

/* ═══════════════ Windows (Vista Aero glass) ═══════════════ */
#windows { position: absolute; inset: 0 0 var(--tb-h) 0; z-index: 5; pointer-events: none; }
.window {
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 280px; min-height: 170px;
  padding: 0 7px 7px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.6);
  background-color: rgba(var(--glass), .5);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.5) 0, rgba(255,255,255,.12) 14px, rgba(255,255,255,0) 30px),
    linear-gradient(115deg, transparent 0 18%, rgba(255,255,255,.14) 18% 22%, transparent 22% 30%, rgba(255,255,255,.1) 30% 31%, transparent 31% 62%, rgba(255,255,255,.12) 62% 66%, transparent 66%);
  -webkit-backdrop-filter: blur(10px) saturate(1.8);
          backdrop-filter: blur(10px) saturate(1.8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 12px 40px rgba(0,0,0,.5);
  pointer-events: auto;
  resize: both; overflow: hidden;
  font-size: 13px;
  animation: winOpen .22s cubic-bezier(.2,.8,.3,1);
  transition: opacity .2s, scale .2s, translate .2s;
}
@keyframes winOpen { from { scale: .9; opacity: 0; } }
.window.inactive { background-color: rgba(var(--glass), .28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 6px 22px rgba(0,0,0,.32); }
.window.minimized { opacity: 0; scale: .5; translate: 0 45vh; pointer-events: none; }
.window.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; resize: none; }
.no-glass .window { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: rgb(var(--glass)); }
.no-glass .window.inactive { background-color: color-mix(in srgb, rgb(var(--glass)) 55%, #e8eef4); }

.titlebar {
  position: relative; flex: none;
  height: 30px; display: flex; align-items: center; gap: 6px; padding-left: 1px;
  color: #000; cursor: var(--cur-arrow); touch-action: none;
}
/* while a title bar is held (makeDraggable captures the pointer), show the move cursor */
.window:not(.maximized) .titlebar:active:not(:has(button:active)) { cursor: var(--cur-move); }
.titlebar > .ico { width: 16px; height: 16px; }
.tb-title {
  flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-shadow: 0 0 10px #fff, 0 0 6px #fff, 0 0 14px rgba(255,255,255,.9);
}
.window.inactive .tb-title { color: #3d3d3d; }
.caption {
  align-self: flex-start; margin: -1px -2px 0 0;
  display: flex; overflow: hidden;
  border: 1px solid rgba(0,0,0,.6); border-top: 0;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 1px 0 rgba(255,255,255,.45);
}
.cap {
  position: relative; width: 27px; height: 19px; padding: 0; border: 0; cursor: var(--cur-link);
  border-right: 1px solid rgba(0,0,0,.45);
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.22) 45%, rgba(0,0,0,.06) 50%, rgba(255,255,255,.3));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  transition: box-shadow .15s, background-color .15s;
}
.cap:hover { background-color: rgba(90,180,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), inset 0 -4px 10px rgba(100,220,255,.9); }
.cap.close {
  width: 45px; border-right: 0;
  background: linear-gradient(180deg, #eab3a2 0%, #d9806a 45%, #c2402c 50%, #d97561 100%);
}
.cap.close:hover { background: linear-gradient(180deg, #ffc4ae 0%, #f08b6c 45%, #e14a28 50%, #ff8f63 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), inset 0 -4px 10px rgba(255,200,90,.9), 0 0 10px rgba(255,90,40,.8); }
.window.inactive .cap.close:not(:hover) { background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.22) 45%, rgba(0,0,0,.06) 50%, rgba(255,255,255,.3)); }
.cap::before, .cap::after { content: ""; position: absolute; left: 50%; top: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
.cap.min::before { width: 9px; height: 3px; translate: -50% 2px; }
.cap.max::before { width: 10px; height: 8px; translate: -50% -50%; background: none; border: 1.5px solid #fff; border-top-width: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.45); }
.cap.min::after, .cap.max::after { display: none; }
.cap.close::before, .cap.close::after { width: 12px; height: 2.6px; border-radius: 1px; translate: -50% -50%; rotate: 45deg; }
.cap.close::after { rotate: -45deg; }

.window-body {
  flex: 1; min-height: 0; overflow: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.5);
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
  container-type: inline-size;
  user-select: text; -webkit-user-select: text;
}
.window-body.dark { background: #0c0c0c; }
.window-body.glass-top { background: transparent; border-color: transparent; box-shadow: none; overflow: hidden; }

/* ═══════════════ Taskbar ═══════════════ */
/* Black glass, measured on the 2× reference (and scaled ~35% from Vista's 30px): a lighter, greyer upper half that
   darkens toward the middle, a step to a ~65% black lower half, and a dark bottom line. The wallpaper shows through,
   softly blurred. Stops are in % so the same look holds at the phone height. */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 9001;
  height: var(--tb-h); display: flex; align-items: center;
  background: linear-gradient(180deg,
    rgba(120,126,130,.78) 0, rgba(120,126,130,.78) 1px,
    rgba(158,163,167,.74) 1px, rgba(140,146,150,.7) 17%, rgba(98,104,108,.62) 40%, rgba(80,86,90,.6) 47%,
    rgba(0,0,0,.62) 50%, rgba(0,0,0,.66) calc(100% - 1px), rgba(0,0,0,.86) calc(100% - 1px));
  -webkit-backdrop-filter: blur(4px) saturate(1.1);
          backdrop-filter: blur(4px) saturate(1.1);
  font-size: 16px; color: #fff;
}
/* the orb: glass sitting proud of the bar's top edge, its foot running off the bottom of the screen */
.start-orb {
  position: absolute; left: 8px; top: -8px; z-index: 2;
  width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; cursor: var(--cur-link);
  background: none; display: block;
}
.start-orb img { width: 62px; height: 62px; display: block; transition: filter .25s; }
.start-orb:hover img, .start-orb[aria-expanded="true"] img { filter: brightness(1.16) saturate(1.1) drop-shadow(0 0 4px rgba(150,220,255,.85)); }
.start-orb:active img { filter: brightness(.92); }
.start-orb:focus-visible { outline: 1px dotted #fff; outline-offset: -2px; }
/* Quick Launch: four buttons right of the orb (show desktop, switch windows, IE, Media Player), locked (no grip) */
.quicklaunch {
  display: flex; align-items: center; gap: 0; height: 100%;
  margin-left: 81px; padding: 0 8px 0 0;
  position: relative;
}
.ql-btn {
  width: 31px; height: 32px; padding: 0; display: grid; place-items: center; cursor: var(--cur-arrow);
  border: 1px solid transparent; border-radius: 2px; background: none;
}
.ql-btn img { width: 24px; height: 24px; display: block; }
.ql-btn:hover, .ql-btn:focus-visible { outline: none; border-color: rgba(255,255,255,.32); background: linear-gradient(rgba(255,255,255,.26), rgba(255,255,255,.08) 50%, rgba(255,255,255,.02) 51%, rgba(255,255,255,.12)); }
.ql-btn:active { background: rgba(0,0,0,.3); }
.tasks { flex: 1; min-width: 0; display: flex; gap: 3px; padding: 0 5px 0 8px; height: 100%; align-items: center; }
.task-btn {
  display: flex; align-items: center; gap: 7px;
  height: 35px; width: 205px; min-width: 44px; flex: 0 1 205px;
  padding: 0 11px 0 9px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,.6);
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.1) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,.06));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
  color: #fff; text-align: left; cursor: var(--cur-arrow); font-size: 16px;
}
.task-btn span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task-btn .ico { width: 22px; height: 22px; flex: none; }
.task-btn:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.32), inset 0 -6px 10px rgba(150,210,255,.32); }
.task-btn.active {
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.14) 49%, rgba(0,0,0,.18) 50%, rgba(255,255,255,.1));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), inset 0 1px 3px rgba(0,0,0,.4);
}
/* Notification area: network + volume, then the time, set apart by a faint etched edge */
.tray {
  display: flex; align-items: center; gap: 3px; height: 100%;
  padding: 0 10px 0 8px;
  box-shadow: inset 1px 0 0 rgba(0,0,0,.35), inset 2px 0 0 rgba(255,255,255,.14);
  white-space: nowrap;
}
.tray-net { display: grid; place-items: center; width: 27px; height: 27px; }
.tray-net img { width: 22px; height: 22px; display: block; }
.tray-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 2px; background: none; cursor: var(--cur-arrow); }
.tray-btn:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.1); }
/* the tray speaker frames are 32px with the art centred — crop to it at 1:1 */
.tray-ico { width: 22px; height: 22px; display: block; }
.tray-ico img { width: 22px; height: 22px; display: block; }
#clock { padding: 0 0 0 11px; font-size: 16px; line-height: 1; color: #fff; }

/* Volume popover */
.volume-pop {
  position: absolute; right: 60px; bottom: calc(var(--tb-h) + 6px); z-index: 9002;
  width: 86px; padding: 10px 0 12px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-radius: 6px; border: 1px solid rgba(0,0,0,.6);
  background: linear-gradient(180deg, rgba(60,75,95,.8), rgba(15,20,30,.88));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 8px 24px rgba(0,0,0,.5);
  color: #fff; font-size: 12px;
  animation: popIn .15s ease-out;
}
@keyframes popIn { from { opacity: 0; translate: 0 8px; } }
.volume-pop input { writing-mode: vertical-lr; direction: rtl; height: 120px; width: 22px; accent-color: #4cc2ff; }
.vol-mute {
  width: 32px; height: 32px; border-radius: 4px; cursor: var(--cur-link); padding: 0;
  border: 1px solid rgba(255,255,255,.3); background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.04));
  display: grid; place-items: center;
}

/* ═══════════════ Start menu ═══════════════ */
/* Stock Vista metrics, measured on the 2× reference (96 dpi): a 408×508 glass frame on the taskbar; the white program
   pane is 252 wide at 8,8 above a 22px search box; the places column starts at x=260 with 35px rows; the 56px
   account frame overhangs the top edge by 24px; the 127×22 power cluster lines up with the search box. Everything is
   anchored to the frame's top or bottom so a short screen only shortens the lists (which then scroll). */
#startmenu {
  --sm-w: min(408px, 100vw);
  position: absolute; left: 0; bottom: var(--tb-h); z-index: 9000;
  width: var(--sm-w); height: min(508px, calc(100% - var(--tb-h) - 30px));
  border-radius: 6px 6px 0 0;
  border: 1px solid rgba(0,0,0,.7); border-bottom: 0;
  background: linear-gradient(180deg, rgba(74,77,82,.82) 0%, rgba(52,55,60,.8) 45%, rgba(22,23,25,.78) 100%);
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
          backdrop-filter: blur(6px) saturate(1.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.26), inset 0 1px 0 1px rgba(255,255,255,.08), 2px -1px 10px rgba(0,0,0,.4);
  font-size: 12px; line-height: 16px;
  animation: smIn .12s ease-out;
}
@keyframes smIn { from { opacity: 0; } }
.sm-tile {
  position: absolute; top: -25px; left: calc(var(--sm-w) - 104px); z-index: 1;
  width: 56px; height: 56px; padding: 3px;
  border: 1px solid rgba(0,0,0,.6); border-radius: 4px;
  background: linear-gradient(140deg, #fbfdfd 0%, #dfe7ea 38%, #b5c9cf 62%, #7fb9c8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 0 0 1px rgba(120,220,240,.35), 0 2px 5px rgba(0,0,0,.45);
  pointer-events: none;
}
.sm-pic { width: 48px; height: 48px; overflow: hidden; border: 1px solid rgba(0,0,0,.45); background: #fff; display: grid; place-items: center; }
.sm-pic .avatar { width: 46px; height: 46px; }
.sm-pic:has(.ico) { background: none; border-color: transparent; }   /* a hovered place's icon floats in the frame */
.sm-pic .ico { width: 46px; height: 46px; }
.sm-left {
  position: absolute; left: 7px; top: 7px; bottom: 8px; width: calc(var(--sm-w) - 156px);
  display: flex; flex-direction: column; gap: 8px;
}
.sm-pane {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #8f9398; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22);
  color: #000;
}
.sm-list { flex: 1; min-height: 0; overflow: auto; padding: 1px 2px 0 0; overscroll-behavior: contain; }
.sm-item {
  width: 100%; height: 38px; display: flex; align-items: center; gap: 5px;
  padding: 0 4px 0 2px; border: 1px solid transparent; border-radius: 3px;
  background: none; text-align: left; color: #000; cursor: var(--cur-arrow); white-space: nowrap;
}
.sm-item .ico { width: 32px; height: 32px; flex: none; }
.sm-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sm-item b, .sm-item small { display: block; overflow: hidden; text-overflow: ellipsis; }
.sm-item b { font-weight: 700; }
.sm-item small { font-size: 12px; color: #6d6d6d; }
.sm-item.small { height: 22px; gap: 6px; padding-left: 6px; }
.sm-item.small .ico { width: 16px; height: 16px; }
.sm-item:hover, .sm-item:focus-visible {
  outline: none; border-color: #8fb8e2;
  background: linear-gradient(180deg, #eef6fd 0%, #dcecfb 48%, #c9e2f8 52%, #d6eafb 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.sm-item.sub-item { padding-left: 22px; }
.sm-item.folder { cursor: var(--cur-arrow); }
.sm-all-list { padding-top: 2px; }
.sm-sep { height: 8px; margin: 0 9px 0 10px; background: linear-gradient(90deg, rgba(214,220,227,0), #d6dce3 12%, #d6dce3 88%, rgba(214,220,227,0)) center / 100% 1px no-repeat; }
.sm-head { padding: 6px 8px 3px; font-weight: 700; color: #1e3287; border-bottom: 1px solid #e3e8ee; margin: 0 4px 3px; }
.sm-empty { padding: 10px 12px; color: #6d6d6d; }
.sm-foot { flex: none; padding: 0 2px 0 0; }
.sm-all {
  width: 100%; height: 26px; display: flex; align-items: center; gap: 0;
  padding: 0 0 0 11px; border: 1px solid transparent; border-radius: 3px;
  background: none; color: #000; font-weight: 700; text-align: left; cursor: var(--cur-arrow);
}
.sm-all span { margin-left: 24px; }
.sm-arrow { width: 0; height: 0; border: 4px solid transparent; border-left: 5px solid #000; border-right: 0; }
.sm-arrow.back { border-left: 0; border-right: 5px solid #000; }
.sm-all:hover, .sm-all:focus-visible { outline: none; border-color: #8fb8e2; background: linear-gradient(180deg, #eef6fd 0%, #dcecfb 48%, #c9e2f8 52%, #d6eafb 100%); }
.sm-search {
  flex: none; position: relative; display: flex; align-items: center;
  height: 22px; padding: 0 3px 0 5px; border-radius: 2px;
  background: #fff; border: 1px solid #a3a6a9;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.08), 0 0 0 1px rgba(255,255,255,.18);
  cursor: var(--cur-text);
}
.sm-search .ico { width: 16px; height: 16px; flex: none; }
.sm-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: #000; font-size: 12px; }
.sm-search input::placeholder { color: #6d6d6d; font-style: italic; opacity: 1; }
.sm-right { position: absolute; left: calc(var(--sm-w) - 148px); right: 3px; top: 0; bottom: 0; }
.sm-places {
  position: absolute; left: 0; right: 0; top: 44px; bottom: 37px;
  display: flex; flex-direction: column; overflow: hidden auto; scrollbar-width: none; overscroll-behavior: contain;
  isolation: isolate;
}
/* Short screens: the rows first squeeze from 35px to 30px; past that the column scrolls, and fades at whichever
   edge has more (with a small arrow) so it is clear there is more to reach. */
.sm-places.more-down { -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent); }
.sm-places.more-up { -webkit-mask-image: linear-gradient(transparent, #000 26px); mask-image: linear-gradient(transparent, #000 26px); }
.sm-places.more-up.more-down { -webkit-mask-image: linear-gradient(transparent, #000 26px, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(transparent, #000 26px, #000 calc(100% - 26px), transparent); }
.sm-more { position: absolute; right: 8px; z-index: 1; width: 0; height: 0; border: 5px solid transparent; pointer-events: none; opacity: 0; transition: opacity .15s; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.sm-more.up { top: 46px; border-top: 0; border-bottom: 5px solid #fff; }
.sm-more.down { bottom: 40px; border-bottom: 0; border-top: 5px solid #fff; }
.sm-right:has(.more-up) .sm-more.up, .sm-right:has(.more-down) .sm-more.down { opacity: .85; }
/* 35px rows with the 31px highlight drawn 2px in, so there is no dead gap between rows */
.sm-r {
  position: relative; flex: none;
  display: block; width: 100%; flex: 0 1 35px; min-height: 30px; padding: 0 16px 0 14px;
  border: 0; background: none; color: #fff; text-align: left; cursor: var(--cur-arrow);
  text-shadow: 0 0 6px rgba(0,0,0,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sm-r::before { content: ""; position: absolute; inset: 2px 0; z-index: -1; border: 1px solid transparent; border-radius: 3px; }
.sm-r:hover::before, .sm-r:focus-visible::before, .sm-r.open::before {
  border-color: rgba(0,0,0,.55);
  background: linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.16) 48%, rgba(255,255,255,.04) 52%, rgba(255,255,255,.14) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
}
.sm-r:focus-visible { outline: none; }
.sm-r.has-sub::after { content: ""; position: absolute; right: 9px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 4px solid #fff; border-right: 0; }
.sm-rsep { flex: none; height: 3px; margin: 0 4px 0 10px; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)) 0 0 / 100% 1px no-repeat, linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.16)) 0 1px / 100% 1px no-repeat; }
/* power cluster: amber sleep-style power button, grey lock, and the options arrow, as one glass strip */
.sm-power {
  position: absolute; left: 7px; bottom: 8px; display: flex;
  height: 22px; border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.75);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18);
}
.sm-pwr {
  position: relative; height: 100%; padding: 0; border: 0; cursor: var(--cur-arrow);
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.12);
}
.sm-pwr + .sm-pwr { border-left: 1px solid rgba(0,0,0,.7); }
.sm-pwr svg { width: 14px; height: 14px; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
.sm-pwr.power { width: 51px; color: #f2eee0; background: linear-gradient(180deg, #6e6852 0%, #4a4532 47%, #2d2a16 50%, #6b5714 72%, #b48c1e 100%); }
.sm-pwr.lock { width: 53px; background: linear-gradient(180deg, #a3a5a0 0%, #7c7e77 47%, #3d3f37 50%, #555750 80%, #6c6e66 100%); }
.sm-pwr.lock svg { width: 13px; height: 13px; }
.sm-pwr.more { width: 21px; background: linear-gradient(180deg, #8e9089 0%, #5d5f57 47%, #24251f 50%, #33352f 100%); }
.sm-pwr.more svg { width: 8px; height: 14px; }
.sm-pwr:hover, .sm-pwr.open { filter: brightness(1.25) saturate(1.1); }
.sm-pwr.power:hover { background: linear-gradient(180deg, #8c8058 0%, #6a5c32 47%, #4a3c0c 50%, #a07a10 72%, #f0b830 100%); filter: none; }
.sm-pwr:active { filter: brightness(.9); }
/* submenus (Recent Items, power options): Vista's light menu */
.sm-flyout {
  position: absolute; z-index: 2; min-width: 120px; padding: 2px;
  background: #f5f5f5; border: 1px solid #979797; box-shadow: 3px 3px 6px rgba(0,0,0,.35);
  color: #000; font-size: 12px;
}
.fly-item {
  display: block; width: 100%; height: 22px; padding: 0 20px 0 26px; border: 1px solid transparent; border-radius: 3px;
  background: none; text-align: left; white-space: nowrap; cursor: var(--cur-arrow);
}
.fly-item:disabled { color: #8d8d8d; }
.fly-item:not(:disabled):hover, .fly-item:focus-visible { outline: none; border-color: #a8d8f7; background: linear-gradient(#f1f8fd, #d5ebfb); }
.fly-sep { height: 1px; margin: 3px 2px 3px 26px; background: #e0e0e0; border-bottom: 1px solid #fff; }

/* Context menu */
.ctxmenu {
  position: absolute; z-index: 9500; min-width: 210px; padding: 2px;
  background: #f5f5f5; border: 1px solid #979797;
  box-shadow: 3px 3px 6px rgba(0,0,0,.35);
  font-size: 12px; color: #000;
}
.ctxmenu::before { content: ""; position: absolute; left: 29px; top: 2px; bottom: 2px; border-left: 1px solid #e2e3e3; border-right: 1px solid #fff; }
.ctx-item {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  height: 24px; padding: 0 20px 0 4px; border: 1px solid transparent; border-radius: 3px;
  background: none; text-align: left; cursor: var(--cur-arrow);
}
.ctx-item .ico { width: 16px; height: 16px; margin-right: 8px; }
.ctx-item .ctx-blank { width: 16px; margin-right: 8px; }
.ctx-item:hover, .ctx-item:focus-visible { outline: none; border-color: #a8d8f7; background: linear-gradient(#f1f8fd, #d5ebfb); }
.ctx-sep { height: 1px; margin: 3px 2px 3px 32px; background: #e0e0e0; border-bottom: 1px solid #fff; }
.ctx-item:disabled { color: #8d8d8d; }
.ctx-item:disabled:hover { border-color: transparent; background: none; }
.ctx-item.sub::after { content: ""; position: absolute; right: 8px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 4px solid #000; border-right: 0; }

/* ═══════════════ Apps ═══════════════ */
.muted { color: #666; }

/* Explorer (the user folder) */
.vx { display: flex; flex-direction: column; height: 100%; }
.vx-nav { display: flex; align-items: center; gap: 8px; padding: 1px 0 6px; }
.vx-arrows { display: flex; flex: none; }
.vx-arrow {
  width: 27px; height: 27px; padding: 0; border-radius: 50%; cursor: var(--cur-link);
  border: 1px solid rgba(0,0,0,.55);
  background: radial-gradient(circle at 50% 25%, #d7f1ff, #3d9be0 50%, #0b4f9a 85%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
  display: grid; place-items: center;
}
.vx-arrow + .vx-arrow { margin-left: -2px; }
.vx-arrow .ico { width: 15px; height: 15px; }
.vx-arrow.fwd .ico { transform: scaleX(-1); }
.vx-arrow:hover:not(:disabled) { box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 0 8px rgba(110,210,255,.9); }
.vx-arrow:disabled { cursor: var(--cur-arrow); background: radial-gradient(circle at 50% 25%, #fff, #c9d3dc 50%, #8d9aa6 85%); opacity: .7; }
.vx-crumbs {
  flex: 1; min-width: 0; height: 25px; display: flex; align-items: center; gap: 1px;
  padding: 0 3px; overflow: hidden;
  background: rgba(255,255,255,.88); border: 1px solid rgba(0,0,0,.5); border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
  font-size: 12px;
}
.vx-crumbs > .ico { width: 16px; height: 16px; margin: 0 3px; }
.crumb { padding: 2px 5px; border: 1px solid transparent; border-radius: 2px; background: none; cursor: var(--cur-link); white-space: nowrap; }
.crumb:hover { border-color: #3c7fb1; background: linear-gradient(#eaf6fd, #bee6fd); }
.crumb-sep { font-size: 8px; opacity: .55; }
.vx-search {
  width: 170px; height: 25px; padding: 0 8px; flex: none;
  border: 1px solid rgba(0,0,0,.5); border-radius: 3px; background: rgba(255,255,255,.88); outline: none;
  font-size: 12px;
}
.vx-search::placeholder { font-style: italic; color: #6d7b89; }
.vx-cmd {
  flex: none; display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 6px;
  border: 1px solid rgba(0,0,0,.55); border-bottom: 0; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #6aa1d1 0%, #3b78af 48%, #235c96 50%, #2f6fa9 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.45);
}
.vx-cmd button, .vx-cmd a {
  padding: 3px 10px; border: 1px solid transparent; border-radius: 3px;
  background: none; color: #fff; font-size: 12px; text-decoration: none; cursor: var(--cur-link);
  text-shadow: 0 1px 1px rgba(0,0,0,.45);
}
.vx-cmd button:hover, .vx-cmd a:hover { border-color: rgba(255,255,255,.55); background: linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.1)); box-shadow: inset 0 0 6px rgba(150,220,255,.7); }
.vx-main { flex: 1; min-height: 0; display: flex; background: #fff; border: 1px solid rgba(0,0,0,.55); border-top-color: #9db5cd; border-bottom: 0; }
.vx-pane { width: 168px; flex: none; padding: 10px 6px; overflow: auto; background: linear-gradient(90deg, #fff 75%, #f0f6fb); border-right: 1px solid #d6e5f2; }
.vx-pane h4 { margin: 0 0 6px 6px; font-size: 12px; font-weight: 600; color: #1e395b; }
.vx-link {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 4px 6px;
  border: 1px solid transparent; border-radius: 3px; background: none;
  color: #1e395b; font-size: 12px; text-decoration: none; text-align: left; cursor: var(--cur-link);
}
.vx-link .ico { width: 16px; height: 16px; }
.vx-link:hover { border-color: #b8d6fb; background: linear-gradient(#fafdff, #e4f1fc); }
.vx-content { flex: 1; min-width: 0; overflow: auto; padding: 10px; }
.vx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.vx-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: 1px solid transparent; border-radius: 3px;
  background: none; font-size: 12px; text-align: center; cursor: var(--cur-arrow); word-break: break-word;
}
.vx-item .ico { width: 64px; height: 64px; }
.vx-item:hover { background: linear-gradient(#fafdff, #ebf5fd); border-color: #b8d6fb; }
.vx-item.sel, .vx-row.sel { background: linear-gradient(#e5f3fb, #c6e4f8); border-color: #7da2ce; }
.vx-empty { padding: 20px; color: #6d7b89; text-align: center; }
a.vx-item, a.vx-row { color: inherit; text-decoration: none; cursor: var(--cur-arrow); }
.vx-item span { max-width: 100%; }
.vx-item:focus-visible, .vx-row:focus-visible { outline: 1px dotted #000; outline-offset: -2px; }
.vx-photo { width: var(--px); height: var(--px); flex: none; display: grid; place-items: center; }
.vx-photo img { max-width: 100%; max-height: 100%; object-fit: contain; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.crumb.static { cursor: var(--cur-arrow); }
.crumb.static:hover { border-color: transparent; background: none; }
.vx-table { font-size: 12px; }
.vx-thead, .vx-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(90px, .8fr) minmax(0, 1.6fr); }
.vx-thead span { padding: 4px 8px; color: #4c607a; border-bottom: 1px solid #e3ecf4; border-right: 1px solid #e3ecf4; background: linear-gradient(#fff, #f2f6fa); }
.vx-row { width: 100%; padding: 0; border: 1px solid transparent; border-radius: 2px; background: none; text-align: left; font-size: 12px; }
.vx-row > span { padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-row:hover { background: #eef6fd; border-color: #d8ecfb; }
.vx-c1 { display: flex; align-items: center; gap: 6px; }
.vx-row .ico, .vx-row .vx-photo { width: 16px; height: 16px; }
.vx-row .vx-photo img { border-width: 1px; }
.vx-details {
  flex: none; display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 8px 14px;
  background: linear-gradient(180deg, #f6fbff 0%, #e3eff9 50%, #d2e4f3 100%);
  border: 1px solid rgba(0,0,0,.55); border-top-color: #a4c0dd; border-radius: 0 0 3px 3px;
  font-size: 12px; color: #1e395b;
}
.vx-details > .ico, .vx-details > .vx-photo { width: 48px; height: 48px; }
.vx-details b { font-size: 14px; font-weight: 600; display: block; }
.vx-details .meta { color: #5c7088; }
.vx-details > div { min-width: 0; }
.vx-details .vx-url { color: #0b5cd5; word-break: break-all; }
.vx-details .desc { margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@container (max-width: 560px) {
  .vx-pane { display: none; }
  .vx-search { width: 100px; }
}

/* Media player */
/* The body is a size container so the player fits the height it actually has (maximized on a short landscape
   screen, or a floating window resized small): the visualizer shrinks first, the playlist keeps a few rows, and
   below the compact threshold everything tightens; if it still does not fit, the whole player scrolls. */
.window-body.wmp-body { container-type: size; overflow: hidden; }
.wmp { display: flex; flex-direction: column; height: 100%; overflow: hidden auto; overscroll-behavior: contain; color: #dfefff; background: linear-gradient(180deg, #27313d, #07090c 40%, #050608); }
.wmp-screen {
  position: relative; margin: 10px 10px 0; flex: 0 1 160px; min-height: 56px;
  border-radius: 6px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 130%, #0f6d8f, #031726 70%);
  border: 1px solid #3a5068;
  box-shadow: inset 0 0 20px rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 0 14px 12px;
}
.wmp-screen::after { content: ""; position: absolute; inset: 0 0 60% 0; background: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,0)); pointer-events: none; }
.viz-bar {
  width: 9px; height: 6%; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #d6fff4, #2fd3ff 40%, #1270ff);
  box-shadow: 0 0 8px rgba(80,220,255,.6);
  transition: height .08s linear;
}
.wmp.fake .viz-bar { animation: eq .9s ease-in-out infinite alternate; }
@keyframes eq { 0% { height: 12%; } 100% { height: var(--peak); } }
.wmp-np { position: absolute; left: 14px; top: 10px; z-index: 1; text-shadow: 0 1px 3px #000; }
.wmp-np b { display: block; font-size: 15px; font-weight: 600; }
.wmp-np small { opacity: .75; }
.wmp-time { position: absolute; right: 14px; top: 12px; z-index: 1; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.wmp-bar {
  flex: none; display: flex; align-items: center; gap: 12px; margin: 10px; padding: 8px 14px;
  border-radius: 30px; border: 1px solid #000;
  background: linear-gradient(180deg, #4a5663, #1d242c 48%, #0b0e12 50%, #1b232c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.wmp-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid #000; cursor: var(--cur-link); padding: 0;
  background: radial-gradient(circle at 50% 25%, #9fb2c4, #34465a 55%, #121a24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  color: #fff; font-size: 12px;
}
.wmp-btn.play {
  width: 46px; height: 46px; font-size: 17px;
  background: radial-gradient(circle at 50% 25%, #c8edff, #1f8fe0 50%, #07427e 90%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 0 14px rgba(60,180,255,.7);
}
.wmp-btn:hover { filter: brightness(1.2); }
.wmp-vol { flex: 1; min-width: 60px; accent-color: #4cc2ff; }
.wmp-list { flex: 1 1 0; min-height: 96px; overflow: auto; overscroll-behavior: contain; padding: 0 10px 10px; }
.wmp-list ol { margin: 0; padding: 0; list-style: none; }
.wmp-head { padding: 4px 10px 3px; font-size: 11px; font-weight: 600; color: #9fd2ff; letter-spacing: .02em; }
.wmp-head small { font-weight: 400; opacity: .7; margin-left: 4px; }
.wmp-list li button {
  width: 100%; display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border: 1px solid transparent; border-radius: 3px; background: none; color: inherit; text-align: left; cursor: var(--cur-link);
}
.wmp-list li button:hover { background: rgba(80,160,255,.15); border-color: rgba(120,190,255,.25); }
.wmp-list li.current button { background: linear-gradient(180deg, rgba(90,180,255,.4), rgba(30,110,220,.3)); border-color: rgba(140,210,255,.5); }
.wmp-list small { opacity: .65; }
.wmp-foot { flex: none; padding: 0 10px 12px; text-align: center; }
.wmp-foot .ico { width: 16px; height: 16px; }
@container (max-height: 340px) {
  .wmp-screen { flex: 1 1 0; margin: 6px 8px 0; min-height: 40px; padding-bottom: 6px; }
  .wmp-np { top: 6px; }
  .wmp-np b { font-size: 13px; }
  .wmp-time { top: 7px; }
  .wmp-bar { margin: 6px 8px; padding: 4px 12px; gap: 10px; }
  .wmp-btn { width: 28px; height: 28px; }
  .wmp-btn.play { width: 36px; height: 36px; font-size: 14px; }
  .wmp-list { flex: 2 1 0; min-height: 84px; padding-bottom: 6px; }
  .wmp-list li button { padding: 5px 10px; }
  .wmp-foot { padding: 0 8px 6px; }
  .wmp-foot .aero-btn { padding-top: 3px; padding-bottom: 3px; }
}
@container (max-height: 260px) { .wmp-np small { display: none; } }

/* Terminal */
.term {
  height: 100%; padding: 8px 10px; overflow: auto;
  color: #cfcfcf; font: 14px/1.4 Consolas, "Lucida Console", monospace;
  white-space: pre-wrap; word-break: break-word; cursor: var(--cur-text);
}
.term-line { display: flex; }
.term-line input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; caret-color: #7CFC00; }
.term .hl { color: #7CFC00; }
.term .err { color: #ff6b6b; }
.term a { color: #5ccfff; }

.term-prompt { white-space: pre; }

/* Notepad — classic layout: menu bar, plain text area, optional status bar */
.window-body.np-body { overflow: hidden; }
.np { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; }
.np-menu { flex: none; display: flex; padding: 1px 2px; background: linear-gradient(#fcfdfe, #e9edf6); border-bottom: 1px solid #ccd3df; font-size: 12px; }
.np-menu button { padding: 2px 7px; border: 1px solid transparent; border-radius: 2px; background: none; }
.np-menu button:hover, .np-menu button[aria-expanded="true"], .np-menu button:focus-visible { outline: none; border-color: #a8d8f7; background: linear-gradient(#f1f8fd, #d5ebfb); }
.np-drop {
  position: absolute; top: 22px; z-index: 3; min-width: 170px; padding: 2px;
  background: #f5f5f5; border: 1px solid #979797; box-shadow: 3px 3px 6px rgba(0,0,0,.35); font-size: 12px;
}
.np-drop button {
  display: flex; align-items: center; width: 100%; height: 22px; padding: 0 20px 0 0;
  border: 1px solid transparent; border-radius: 3px; background: none; text-align: left;
}
.np-chk { width: 26px; flex: none; text-align: center; font-style: normal; }
.np-drop button:hover, .np-drop button:focus-visible { outline: none; border-color: #a8d8f7; background: linear-gradient(#f1f8fd, #d5ebfb); }
.np-sep { height: 1px; margin: 3px 2px 3px 28px; background: #e0e0e0; border-bottom: 1px solid #fff; }
/* The edit box: Lucida Console 10pt, the vertical scroll bar always there (and the horizontal one with Word Wrap off),
   drawn like Vista's: a pale track, small dark arrow glyphs, a grey thumb with a grip that glows blue on hover, and the
   dotted size grip in the corner. (Firefox keeps its own scroll bars.) */
.np-text {
  flex: 1; min-height: 0; width: 100%; margin: 0; padding: 1px 3px; resize: none;
  border: 0; outline: 0; background: #fff; color: #000;
  font: 13.33px/1.15 "Lucida Console", "Lucida Sans Typewriter", Consolas, monospace;
  overflow-y: scroll; overflow-x: hidden;
  user-select: text; -webkit-user-select: text;
}
.np-text.nowrap { white-space: pre; overflow-x: scroll; }
.np-text::-webkit-scrollbar { width: 17px; height: 17px; }
.np-text::-webkit-scrollbar-track { background: #f0f0f0; }
.np-text::-webkit-scrollbar-track:vertical { box-shadow: inset 1px 0 #e3e3e3; }
.np-text::-webkit-scrollbar-track:horizontal { box-shadow: inset 0 1px #e3e3e3; }
.np-text::-webkit-scrollbar-thumb {
  border: 1px solid #979797; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.85);
  background-repeat: no-repeat; background-position: center;
}
.np-text::-webkit-scrollbar-thumb:vertical {
  background-color: #e8e8e8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 .5h8M0 2.5h8M0 4.5h8M0 6.5h8' stroke='%23888' stroke-width='1'/%3E%3Cpath d='M0 1.5h8M0 3.5h8M0 5.5h8M0 7.5h8' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E"),
    linear-gradient(90deg, #f3f3f3, #e9e9e9 50%, #dcdcdc 51%, #d4d4d4);
}
.np-text::-webkit-scrollbar-thumb:horizontal {
  background-color: #e8e8e8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M.5 0v8M2.5 0v8M4.5 0v8M6.5 0v8' stroke='%23888' stroke-width='1'/%3E%3Cpath d='M1.5 0v8M3.5 0v8M5.5 0v8M7.5 0v8' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E"),
    linear-gradient(#f3f3f3, #e9e9e9 50%, #dcdcdc 51%, #d4d4d4);
}
.np-text::-webkit-scrollbar-thumb:vertical:hover { border-color: #3c7fb1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 .5h8M0 2.5h8M0 4.5h8M0 6.5h8' stroke='%23347' stroke-width='1'/%3E%3Cpath d='M0 1.5h8M0 3.5h8M0 5.5h8M0 7.5h8' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E"), linear-gradient(90deg, #e9f6fd, #d9f0fc 50%, #bee6fd 51%, #a7d9f5); }
.np-text::-webkit-scrollbar-thumb:horizontal:hover { border-color: #3c7fb1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M.5 0v8M2.5 0v8M4.5 0v8M6.5 0v8' stroke='%23347' stroke-width='1'/%3E%3Cpath d='M1.5 0v8M3.5 0v8M5.5 0v8M7.5 0v8' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E"), linear-gradient(#e9f6fd, #d9f0fc 50%, #bee6fd 51%, #a7d9f5); }
.np-text::-webkit-scrollbar-button:single-button {
  display: block; width: 17px; height: 17px;
  background: #f0f0f0 no-repeat center; border: 1px solid transparent; border-radius: 2px;
}
.np-text::-webkit-scrollbar-button:single-button:hover { border-color: #3c7fb1; background-color: #dcf0fb; }
.np-text::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 4h7L3.5 0z' fill='%23505050'/%3E%3C/svg%3E"); }
.np-text::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0h7L3.5 4z' fill='%23505050'/%3E%3C/svg%3E"); }
.np-text::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M4 0v7L0 3.5z' fill='%23505050'/%3E%3C/svg%3E"); }
.np-text::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 0v7l4-3.5z' fill='%23505050'/%3E%3C/svg%3E"); }
.np-text::-webkit-scrollbar-corner {   /* the dotted size grip */
  background: #f0f0f0 no-repeat right 2px bottom 2px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11'%3E%3Cg fill='%23fff'%3E%3Crect x='9' y='9' width='2' height='2'/%3E%3Crect x='9' y='5' width='2' height='2'/%3E%3Crect x='5' y='9' width='2' height='2'/%3E%3Crect x='9' y='1' width='2' height='2'/%3E%3Crect x='5' y='5' width='2' height='2'/%3E%3Crect x='1' y='9' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%23a3a3a3'%3E%3Crect x='8' y='8' width='2' height='2'/%3E%3Crect x='8' y='4' width='2' height='2'/%3E%3Crect x='4' y='8' width='2' height='2'/%3E%3Crect x='8' y='0' width='2' height='2'/%3E%3Crect x='4' y='4' width='2' height='2'/%3E%3Crect x='0' y='8' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E");
}
.np-status {
  flex: none; display: flex; justify-content: flex-end; gap: 12px; height: 22px; padding: 0 10px; align-items: center;
  background: linear-gradient(#f5f7fa, #e4e9f0); border-top: 1px solid #c9d2dd; font-size: 11px; color: #33475c;
}
.np-about { display: flex; gap: 16px; padding: 18px 20px; font-size: 12px; }
.np-about .ico { width: 48px; height: 48px; flex: none; }
.np-about-text { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.np-about-text b { font-size: 14px; }
.np-about-text p { margin: 0; color: #333; line-height: 1.45; }
.np-about-ok { align-self: flex-end; margin-top: 8px; padding: 3px 22px; }
.np-status span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np.no-status .np-status { display: none; }

/* Windows Photo Gallery — light thumbnail pane, dark glossy viewer controls */
.window-body.pg-body { overflow: hidden; }
.pg { position: relative; display: flex; flex-direction: column; height: 100%; background: linear-gradient(#fff, #eef4fa); }
.pg-head { flex: none; display: flex; align-items: baseline; gap: 10px; padding: 8px 12px 6px; border-bottom: 1px solid #dbe6f0; color: #1e395b; }
.pg-head b { font-size: 15px; font-weight: 400; }
.pg-head span { font-size: 11px; color: #5c7088; }
.pg-grid { flex: 1; overflow: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; align-content: start; }
.pg-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 1px solid transparent; border-radius: 3px; background: none; font-size: 11px; color: #1e395b; }
.pg-thumb:hover { border-color: #b8d6fb; background: linear-gradient(#fafdff, #ebf5fd); }
.pg-thumb.sel { border-color: #7da2ce; background: linear-gradient(#e5f3fb, #c6e4f8); }
.pg-thumb:focus-visible { outline: 1px dotted #000; outline-offset: -2px; }
.pg-frame { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.pg-frame img { max-width: 100%; max-height: 100%; object-fit: contain; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pg-cap { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-viewer { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; background: linear-gradient(#e9f1f8, #c9d9e8); }
.pg-stage { position: relative; flex: 1; min-height: 0; }
.pg-stage img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,30,70,.35)); }
.pg-title { flex: none; padding: 0 12px 6px; text-align: center; color: #1e395b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-ctl {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 10px;
  background: linear-gradient(#5d7189, #2a3a4e 48%, #132033 50%, #253a54); border-top: 1px solid #0b1522; color: #fff; font-size: 12px;
}
.pg-btn { height: 28px; padding: 0 12px; border: 1px solid rgba(0,0,0,.6); border-radius: 3px; color: #fff; background: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.06) 50%, rgba(0,0,0,.1) 51%, rgba(255,255,255,.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.pg-btn.round { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: radial-gradient(circle at 50% 25%, #c8edff, #1f8fe0 50%, #07427e 90%); font-size: 11px; }
.pg-btn:hover, .pg-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 0 8px rgba(110,200,255,.8); }
.pg-btn[data-v="gallery"] { margin-right: auto; }
.pg-count { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.pg-ctl::after { content: ""; flex: 0 1 auto; width: 0; }
.pg-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 20px; text-align: center; background: linear-gradient(#fff, #eef4fa); color: #4b5d70; }
.pg-empty .ico { width: 48px; height: 48px; margin-bottom: 6px; }
.pg-empty h2 { margin: 0; font: 400 17px var(--ui); color: #1e395b; }
.pg-empty p { margin: 0; font-size: 12px; }

/* Personalize */
.pz { padding: 18px 20px; min-height: 100%; background: linear-gradient(180deg, #fff, #f0f7fd); }
.pz h2 { margin: 0 0 4px; font: 400 22px var(--ui); color: #1e395b; }
.pz h3 { margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: #1e5aa8; }
.pz-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.pz-color {
  width: 36px; height: 36px; border-radius: 6px; padding: 0; cursor: var(--cur-link);
  border: 1px solid rgba(0,0,0,.5);
  background: linear-gradient(rgba(255,255,255,.65), rgba(255,255,255,.1) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,.25)), rgb(var(--c));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.pz-color.sel { outline: 2px solid #3c7fb1; outline-offset: 2px; }
.pz-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }

/* Recycle bin */
.bin { display: grid; place-items: center; text-align: center; padding: 24px; min-height: 100%; background: #fff; }
.bin .ico { width: 64px; height: 64px; }

/* ═══════════════ Powered off ═══════════════ */
#off {
  position: fixed; inset: 0; z-index: 10001;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: #000; color: #cfd8e3; font: 300 20px var(--ui);
  animation: fadein .8s ease;
}
#off p { margin: 0 0 10px; }
#off small { font-size: 12px; color: #7f8b98; }
.power-orb {
  width: 60px; height: 60px; border-radius: 50%; padding: 0; cursor: var(--cur-link);
  border: 1px solid #000;
  background: radial-gradient(circle at 50% 70%, #5fe0ff, #1a7fd0 35%, #0b2a55 70%, #050d1c);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 0 20px rgba(60,180,255,.4);
  display: grid; place-items: center;
}
.power-orb:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.4), 0 0 26px rgba(90,210,255,.9); }
.power-orb .ico { width: 26px; height: 26px; }

/* ═══════════════ Mobile ═══════════════ */
@media (max-width: 700px) {
  :root { --tb-h: 44px; }
  /* The row of orbs keeps its four columns; they shrink to fit a narrow phone, with bigger touch targets. */
  #deskarea { padding-top: env(safe-area-inset-top); }
  .hub-id { min-width: min(100%, 300px); gap: 18px; padding: 9px 18px 9px 12px; }
  .hub-pic { width: 64px; height: 64px; padding: 3px; border-radius: 14px; }
  .hub-pic-in { border-radius: 10px; }
  .hub-names b { font-size: 24px; line-height: 30px; }
  .hub-grid { gap: 8px; --orb: 60px; }
  .hub-grid .desk-icon { flex-basis: 80px; padding: 4px 2px; font-size: 13px; line-height: 17px; }
  .quicklaunch { display: none; }
  .tasks { padding-left: 56px; }
  .tray { gap: 4px; padding: 0 8px; }
  .tray-net { display: none; }
  .task-btn { flex-basis: 44px; width: 44px; justify-content: center; }
  .task-btn span { display: none; }
  .start-orb, .start-orb img { width: 46px; height: 46px; }
  .start-orb { left: 6px; top: -1px; }
  #clock { font-size: 14px; }
  .logon-foot { --fu: 1px; padding: 0 14px; height: 70px; }
  .logon-brand { gap: 4px; }
  .logon-brand img { width: 34px; height: 34px; }
  .lb-name, .lb-ed { top: 6px; }
  .lb-name { font-size: 22px; }
  .lb-ed { font-size: 15px; }
  .logon-pass { width: min(224px, 62vw); }
}
/* Touch: ≥16px text stops iOS zooming on focus; a slightly taller field is easier to tap. */
@media (pointer: coarse) {
  .logon-pass { height: 30px; font-size: 16px; }
  .vx-search, #sm-search, .np-text, .term-line input { font-size: 16px; }
  .term { font-size: 15px; }
}
/* Short screens: slim Explorer details pane so the file list keeps most of the height. */
@media (max-height: 460px) {
  .vx-details { min-height: 0; padding: 4px 12px; gap: 10px; }
  .vx-details > .ico, .vx-details > .vx-photo { width: 32px; height: 32px; }
  .vx-details .desc { display: none; }
}
/* Short viewports (landscape phones, or an on-screen keyboard shrinking the page): tighten the column so the
   field and arrow stay on screen. */
@media (max-height: 560px) {
  .logon-center { --lu: 1px; padding-top: 4vh; }
  .tile-frame { width: 96px; height: 96px; }
  .user-tile { margin-bottom: 12px; }
  .logon-name { font-size: 18px; line-height: 22px; }
}

/* Desktop hub on narrow screens: the corner icons line up in a row along the top, and the hub starts below them so the
   two never meet. */
@media (max-width: 600px) {
  .desk-corner { flex-direction: row; gap: 0; }
  .hub { margin-top: max(clamp(16px, 13vh, 150px), 92px); }
}
@media (max-width: 560px) {
  .np-track b, .np-track > span { font-size: 22px; line-height: 30px; }
  .np-track > span { padding-left: 20px; }
}
/* Narrow phones and very short screens (landscape phones): a smaller capsule, so it fits a 320px-wide screen and the
   whole hub fits a 360px-tall one without scrolling. */
@media (max-width: 400px), (max-height: 420px) {
  .wmp-pill { height: 48px; gap: 8px; padding: 0 9px; }
  .pc-btn { width: 34px; height: 34px; }
  .pc-transport { height: 34px; }
  .pc-skip { width: 40px; height: 28px; }
  .pc-orb { width: 58px; height: 58px; margin: -10px 3px; }
  .pc-btn svg { width: 19px; height: 19px; }
  .pc-stop svg { width: 18px; height: 18px; }
  .pc-skip svg, .pc-mute svg { width: 24px; height: 19px; }
  .pc-orb svg { width: 27px; height: 27px; }
  .pc-mute { width: 36px; }
}
@media (max-width: 400px) {
  .hub-pic { width: 56px; height: 56px; }
  .hub-names b { font-size: 22px; line-height: 28px; }
  .hub-grid { --orb: 54px; }
  .hub-grid .desk-icon { font-size: 12px; line-height: 16px; }
  .np-track b, .np-track > span { font-size: 19px; line-height: 26px; }
  .np-track > span { padding-left: 18px; }
  .np-track > span::before { width: 9px; height: 9px; margin-top: -4px; }
}
/* Short screens (landscape phones, small laptop windows): a tighter hub so the pill, both rows and the media
   controls still fit without scrolling. */
@media (max-height: 520px) {
  .hub { margin: clamp(8px, 3vh, 16px) 0 10px; gap: 8px; }
  .hub-id { padding: 6px 16px 6px 10px; gap: 16px; min-width: 300px; }
  .hub-pic { width: 52px; height: 52px; padding: 3px; border-radius: 12px; }
  .hub-pic-in { border-radius: 9px; }
  .hub-names b { font-size: 21px; line-height: 26px; }
  .hub-grid { --orb: 50px; }
  .hub-grid .desk-icon { font-size: 12px; line-height: 16px; gap: 2px; }
  .np-label { margin-bottom: 10px; }
  .np-track b, .np-track > span { font-size: 21px; line-height: 28px; }
  .hub-grid { row-gap: 0; }
  .hub-grid .desk-icon { padding-top: 1px; padding-bottom: 1px; }
  .hub-grid .di-label { -webkit-line-clamp: 1; }
  .wmp-pill { margin-bottom: 20px; }
}
@media (max-width: 600px) and (max-height: 520px) { .hub { margin-top: 92px; } }
@media (max-height: 420px) {
  .np-label { margin-bottom: 7px; }
  .np-track b, .np-track > span { font-size: 17px; line-height: 20px; }
  .np-track > span { padding-left: 18px; }
  .np-track > span::before { width: 9px; height: 9px; margin-top: -4px; }
  .wmp-pill { margin-bottom: 14px; }
}

/* Narrow phones: shrink the wordmark (corner buttons keep their 38×28 / 58×28 targets) so ≥14px stays clear each side. */
@media (max-width: 440px) {
  .logon-brand { gap: 3px; }
  .logon-brand img { width: 30px; height: 30px; }
  .lb-name, .lb-ed { top: 5px; }
  .lb-name { font-size: 19px; }
  .lb-ed { font-size: 13px; margin-left: 1px; }
}
@media (max-width: 374px) {
  .lb-ed { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .pc-orb, .np-label, .np-track { animation: none !important; }
  .bubble { display: none; }
}
