/* =========================================================================
   WINDOWS 98 PORTFOLIO — Lara Castillejo Roig
   Retro-tech design system inspired by Windows 98
   ========================================================================= */

/* Pixel UI font: "MS Sans Serif" FontStruction by "lou" (CC BY-SA 3.0), served by 98.css */
@font-face {
  font-family: "Pixelated MS Sans Serif";
  font-style: normal;
  font-weight: 400;
  src: url("https://unpkg.com/98.css@0.1.21/dist/ms_sans_serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Pixelated MS Sans Serif";
  font-style: normal;
  font-weight: 700;
  src: url("https://unpkg.com/98.css@0.1.21/dist/ms_sans_serif_bold.woff2") format("woff2");
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --face: #c0c0c0;
  --face-2: #dfdfdf;
  --hi: #ffffff;
  --sh: #808080;
  --dk: #0a0a0a;
  --text: #000000;
  --text-dim: #808080;
  --field: #ffffff;
  --field-text: #000000;
  --desk: #008080;
  --title-1: #000080;
  --title-2: #1084d0;
  --title-text: #ffffff;
  --title-off-1: #808080;
  --title-off-2: #b5b5b5;
  --title-off-text: #d4d0c8;
  --sel: #000080;
  --sel-text: #ffffff;
  --tip: #ffffe1;
  --link: #0000ee;
  --hl: #000080;          /* heading colour inside documents */
  --accent: #008080;      /* emphasis inside headings (theme colour) */
  --w98: #ff9a1f;         /* the "98" in logos */
  --w98-cur: #ffff00;     /* current step in the setup wizard */
  --banner: #000000;      /* dark end of banner gradients */
  --sel-hue: 190deg;      /* tint of selected desktop icons */
  --ok: #008000;
  --dither: #808080;

  --font-ui: "Pixelated MS Sans Serif", "MS Sans Serif", Tahoma, Geneva, Verdana, sans-serif;
  --font-px: "VT323", "Lucida Console", "Courier New", monospace;
  --font-splash: "Libre Franklin", "Franklin Gothic Medium", "Arial Black", Arial, sans-serif;
  --font-hand: "Permanent Marker", "Comic Sans MS", cursive;

  --taskbar-h: 30px;

  --bevel-raised: inset -1px -1px var(--dk), inset 1px 1px var(--face-2), inset -2px -2px var(--sh), inset 2px 2px var(--hi);
  --bevel-btn: inset -1px -1px var(--dk), inset 1px 1px var(--hi), inset -2px -2px var(--sh), inset 2px 2px var(--face-2);
  --bevel-pressed: inset -1px -1px var(--hi), inset 1px 1px var(--dk), inset -2px -2px var(--face-2), inset 2px 2px var(--sh);
  --bevel-sunken: inset -1px -1px var(--hi), inset 1px 1px var(--sh), inset -2px -2px var(--face-2), inset 2px 2px var(--dk);
  --bevel-shallow: inset -1px -1px var(--hi), inset 1px 1px var(--sh);
  --bevel-thin-raised: inset -1px -1px var(--sh), inset 1px 1px var(--hi);

  color-scheme: light;
}

/* Themes (Display Properties > Appearance) — also usable on a preview element */
[data-scheme="standard"] {
  --face: #c0c0c0; --face-2: #dfdfdf; --hi: #ffffff; --sh: #808080; --dk: #0a0a0a; --text: #000000; --text-dim: #808080;
  --field: #ffffff; --field-text: #000000; --desk: #008080; --title-1: #000080; --title-2: #1084d0; --title-text: #ffffff;
  --title-off-1: #808080; --title-off-2: #b5b5b5; --title-off-text: #d4d0c8; --sel: #000080; --sel-text: #ffffff;
  --tip: #ffffe1; --link: #0000ee; --hl: #000080; --accent: #008080; --ok: #008000; --dither: #808080;
  color-scheme: light;
}
/* Neo Tokyo — Neo-Tokyo at night (after Akira): near-black blues, red as the accent, neon cyan and hazard yellow */
[data-scheme="neotokyo"] {
  --face: #161a26; --face-2: #222838; --hi: #4a5470; --sh: #090b12; --dk: #000000;
  --text: #e9edf7; --text-dim: #8b95b3; --field: #0a0d16; --field-text: #e4e8f4;
  --desk: #05070e; --title-1: #8f0d14; --title-2: #ff3b30; --title-text: #ffffff;
  --title-off-1: #222838; --title-off-2: #2c3346; --title-off-text: #8b95b3;
  --sel: #e3241b; --sel-text: #ffffff; --tip: #161a26; --link: #3ff0ff; --hl: #ff4436;
  --accent: #3ff0ff; --ok: #3ff0ff; --dither: #090b12;
  --w98: #ffd400; --w98-cur: #ffd400; --banner: #05070e; --sel-hue: -40deg;
  color-scheme: dark;
}
/* Pink — pastel, girly, Y2K: bubblegum + lavender, pixel-art clouds wallpaper */
[data-scheme="pink"] {
  --face: #f6cfe0; --face-2: #fde4ef; --hi: #ffffff; --sh: #c98fab; --dk: #6e2a4b;
  --text: #4a1631; --text-dim: #a0607f; --field: #fff7fb; --field-text: #4a1631;
  --desk: #ffb8d4; --title-1: #ff5fa8; --title-2: #c9a2ff; --title-text: #ffffff;
  --title-off-1: #d9a9c0; --title-off-2: #ecd0dd; --title-off-text: #fff4f9;
  --sel: #ff5fa8; --sel-text: #ffffff; --tip: #fff0f7; --link: #d6247a; --hl: #d6247a;
  --accent: #8f4dff; --ok: #2fbf71; --dither: #c98fab;
  --w98: #fff3a6; --w98-cur: #fff3a6; --banner: #b0306e; --sel-hue: 290deg;
  color-scheme: light;
}
/* Terminal — green phosphor on black, amber highlights, digital rain wallpaper */
[data-scheme="terminal"] {
  --face: #0c1a10; --face-2: #12301b; --hi: #2f8f4e; --sh: #040a06; --dk: #000000;
  --text: #b6ffc8; --text-dim: #4fae6c; --field: #030805; --field-text: #39ff7a;
  --desk: #010402; --title-1: #06391a; --title-2: #18c45a; --title-text: #eafff0;
  --title-off-1: #0c1a10; --title-off-2: #12301b; --title-off-text: #4fae6c;
  --sel: #18c45a; --sel-text: #001a08; --tip: #06180c; --link: #7dffa6; --hl: #39ff7a;
  --accent: #ffb000; --ok: #39ff7a; --dither: #040a06;
  --w98: #ffb000; --w98-cur: #ffb000; --banner: #000000; --sel-hue: 80deg;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 11px;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: var(--link); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--sel); color: var(--sel-text); }
.selectable, .selectable * { user-select: text; -webkit-user-select: text; }

/* Pixel icons (SVG injected by js/icons.js) */
.ico { display: inline-block; width: 16px; height: 16px; flex: none; image-rendering: pixelated; }
.ico svg { width: 100%; height: 100%; display: block; }
.ico-32 { width: 32px; height: 32px; }
.ico-48 { width: 48px; height: 48px; }
.ico-64 { width: 64px; height: 64px; }

/* ---------- Win98 controls ---------- */
.btn {
  min-width: 75px;
  min-height: 23px;
  padding: 0 12px;
  border: none;
  border-radius: 0;
  background: var(--face);
  color: var(--text);
  box-shadow: var(--bevel-btn);
  font-family: var(--font-ui);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active, .btn.is-pressed { box-shadow: var(--bevel-pressed); padding: 2px 11px 0 13px; }
.btn:focus-visible { outline: 1px dotted var(--text); outline-offset: -4px; }
.btn.is-default { box-shadow: inset -2px -2px var(--dk), inset 1px 1px var(--dk), inset 2px 2px var(--hi), inset -3px -3px var(--sh), inset 3px 3px var(--face-2); }
.btn:disabled { color: var(--sh); text-shadow: 1px 1px 0 var(--hi); cursor: default; }
.btn-lg { min-height: 30px; padding: 0 16px; }

.field {
  background: var(--field);
  color: var(--field-text);
  box-shadow: var(--bevel-sunken);
  padding: 3px 4px;
  border: none;
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: 11px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
textarea.field { resize: none; line-height: 1.5; }
.field:focus { box-shadow: var(--bevel-sunken); }

.check, .radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input, .radio input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 13px; height: 13px; flex: none;
  background: var(--field); box-shadow: var(--bevel-sunken); cursor: pointer;
}
.radio input { border-radius: 50%; width: 12px; height: 12px; box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--sh), inset -2px -2px var(--face-2), inset 2px 2px var(--dk); }
.check input:checked { background: var(--field) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='7' shape-rendering='crispEdges'><path d='M6 0h1v1h-1z M5 1h2v1h-2z M0 2h1v1h-1z M4 2h3v1h-3z M0 3h2v1h-2z M3 3h3v1h-3z M0 4h5v1h-5z M1 5h3v1h-3z M2 6h1v1h-1z'/></svg>") center / 7px 7px no-repeat; }
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) .check input:checked { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='7' shape-rendering='crispEdges' fill='white'><path d='M6 0h1v1h-1z M5 1h2v1h-2z M0 2h1v1h-1z M4 2h3v1h-3z M0 3h2v1h-2z M3 3h3v1h-3z M0 4h5v1h-5z M1 5h3v1h-3z M2 6h1v1h-1z'/></svg>"); }
.radio input:checked { background-image: radial-gradient(circle, var(--field-text) 0 2px, transparent 2.5px); }
.check:focus-within span, .radio:focus-within span { outline: 1px dotted var(--text); }

fieldset.group { border: none; margin: 10px 0 0; padding: 14px 10px 10px; box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--sh), inset -2px -2px var(--sh), inset 2px 2px var(--hi); position: relative; }
fieldset.group legend { padding: 0 3px; background: var(--face); position: absolute; top: -6px; left: 8px; }

select.field { appearance: none; -webkit-appearance: none; padding-right: 22px; background: var(--field) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='17'><rect width='16' height='17' fill='%23c0c0c0'/><path d='M0 0h15v1H1v15H0z' fill='%23dfdfdf'/><path d='M1 1h13v1H2v13H1z' fill='%23fff'/><path d='M15 0h1v17H0v-1h15z' fill='%230a0a0a'/><path d='M14 1h1v15H1v-1h13z' fill='%23808080'/><path d='M4 7h7v1H4zM5 8h5v1H5zM6 9h3v1H6zM7 10h1v1H7z'/></svg>") right 2px center / 16px 17px no-repeat; }

/* Segmented progress bar */
.progress { height: 18px; padding: 2px; background: var(--field); box-shadow: var(--bevel-shallow); }
.progress > span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--sel) 0 8px, transparent 8px 10px); transition: width .6s steps(12); }

/* Tabs */
.tabs { display: flex; padding-left: 3px; position: relative; z-index: 1; }
.tab {
  border: none; background: var(--face); cursor: pointer; padding: 3px 8px 4px; margin-bottom: -2px;
  box-shadow: inset -1px 0 var(--dk), inset 1px 1px var(--hi), inset -2px 0 var(--sh), inset 2px 2px var(--face-2);
  border-top-left-radius: 3px; border-top-right-radius: 3px; font-size: 11px; position: relative; top: 2px;
}
.tab[aria-selected="true"] { top: 0; padding-bottom: 6px; z-index: 2; margin: 0 -2px -2px; padding-left: 10px; padding-right: 10px; }
.tab:focus-visible { outline: 1px dotted var(--text); outline-offset: -4px; }
.tab-panel { box-shadow: var(--bevel-raised); padding: 12px; background: var(--face); }

/* Tooltip */
.tooltip { position: fixed; z-index: 100000; background: var(--tip); color: var(--text); border: 1px solid var(--dk); padding: 2px 4px; pointer-events: none; font-size: 11px; white-space: nowrap; }

/* Scrollbars */
.desktop ::-webkit-scrollbar { width: 16px; height: 16px; }
.desktop ::-webkit-scrollbar-track { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'><rect width='2' height='2' fill='%23ffffff'/><rect width='1' height='1' fill='%23c0c0c0'/><rect x='1' y='1' width='1' height='1' fill='%23c0c0c0'/></svg>"); }
.desktop ::-webkit-scrollbar-thumb { background: var(--face); box-shadow: var(--bevel-btn); }
.desktop ::-webkit-scrollbar-corner { background: var(--face); }
.desktop ::-webkit-scrollbar-button:single-button { display: block; width: 16px; height: 16px; background-color: var(--face); box-shadow: var(--bevel-btn); background-repeat: no-repeat; background-position: center; }
.desktop ::-webkit-scrollbar-button:single-button:active { box-shadow: var(--bevel-pressed); }
.desktop ::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'><path d='M3 0h1v1h-1z M2 1h3v1h-3z M1 2h5v1h-5z M0 3h7v1h-7z'/></svg>"); }
.desktop ::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'><path d='M0 0h7v1h-7z M1 1h5v1h-5z M2 2h3v1h-3z M3 3h1v1h-1z'/></svg>"); }
.desktop ::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'><path d='M3 0h1v7h-1z M2 1h1v5h-1z M1 2h1v3h-1z M0 3h1v1h-1z'/></svg>"); }
.desktop ::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'><path d='M0 0h1v7h-1z M1 1h1v5h-1z M2 2h1v3h-1z M3 3h1v1h-1z'/></svg>"); }
:root[data-scheme="terminal"] .desktop ::-webkit-scrollbar-track { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'><rect width='2' height='2' fill='%23040a06'/><rect width='1' height='1' fill='%2312301b'/><rect x='1' y='1' width='1' height='1' fill='%2312301b'/></svg>"); }
:root[data-scheme="neotokyo"] .desktop ::-webkit-scrollbar-track { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'><rect width='2' height='2' fill='%23150c32'/><rect width='1' height='1' fill='%233d2c6e'/><rect x='1' y='1' width='1' height='1' fill='%233d2c6e'/></svg>"); }
:root[data-scheme="pink"] .desktop ::-webkit-scrollbar-track { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'><rect width='2' height='2' fill='%23ffffff'/><rect width='1' height='1' fill='%23f6cfe0'/><rect x='1' y='1' width='1' height='1' fill='%23f6cfe0'/></svg>"); }
/* light arrows on the dark themes */
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) .desktop ::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges' fill='%23e6e0ff'><path d='M3 0h1v1h-1z M2 1h3v1h-3z M1 2h5v1h-5z M0 3h7v1h-7z'/></svg>"); }
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) .desktop ::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges' fill='%23e6e0ff'><path d='M0 0h7v1h-7z M1 1h5v1h-5z M2 2h3v1h-3z M3 3h1v1h-1z'/></svg>"); }
:root[data-scheme="pink"] select.field { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='17'><rect width='16' height='17' fill='%23f6cfe0'/><path d='M0 0h15v1H1v15H0z' fill='%23fde4ef'/><path d='M1 1h13v1H2v13H1z' fill='%23fff'/><path d='M15 0h1v17H0v-1h15z' fill='%236e2a4b'/><path d='M14 1h1v15H1v-1h13z' fill='%23c98fab'/><path d='M4 7h7v1H4zM5 8h5v1H5zM6 9h3v1H6zM7 10h1v1H7z' fill='%234a1631'/></svg>"); }
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) select.field { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='17'><rect width='16' height='17' fill='%23302050'/><path d='M0 0h15v1H1v15H0z' fill='%23584090'/><path d='M15 0h1v17H0v-1h15z' fill='%23000'/><path d='M4 7h7v1H4zM5 8h5v1H5zM6 9h3v1H6zM7 10h1v1H7z' fill='%23e6e0ff'/></svg>"); }

/* =========================================================================
   WINDOWS
   ========================================================================= */
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  min-height: 120px;
  padding: 3px;
  background: var(--face);
  color: var(--text);
  box-shadow: var(--bevel-raised), 2px 4px 0 rgba(0, 0, 0, .18);
  outline: none;
}
.win.is-maximized { box-shadow: var(--bevel-raised); }
.win.is-dialog { min-height: 0; }
.title-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  flex: none;
  padding: 0 2px 0 3px;
  background: linear-gradient(90deg, var(--title-off-1), var(--title-off-2));
  color: var(--title-off-text);
  cursor: default;
  touch-action: none;
}
.win.is-active .title-bar { background: linear-gradient(90deg, var(--title-1), var(--title-2)); color: var(--title-text); }
.title-bar .ico { width: 16px; height: 16px; }
.tb-text { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.tb-ctrls { display: flex; align-items: center; }
.tb-btn {
  width: 16px; height: 14px; padding: 0; border: none; background: var(--face); box-shadow: var(--bevel-btn);
  position: relative; cursor: pointer; flex: none;
}
.tb-btn:active { box-shadow: var(--bevel-pressed); }
.tb-btn::before { content: ""; position: absolute; inset: 0; background: var(--text); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.tb-btn:active::before { transform: translate(1px, 1px); }
.tb-btn[data-act="close"] { margin-left: 2px; }
.tb-btn[data-act="close"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='7' shape-rendering='crispEdges'><path d='M0 0h2v1h-2z M6 0h2v1h-2z M1 1h2v1h-2z M5 1h2v1h-2z M2 2h4v1h-4z M3 3h2v1h-2z M2 4h4v1h-4z M1 5h2v1h-2z M5 5h2v1h-2z M0 6h2v1h-2z M6 6h2v1h-2z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='7' shape-rendering='crispEdges'><path d='M0 0h2v1h-2z M6 0h2v1h-2z M1 1h2v1h-2z M5 1h2v1h-2z M2 2h4v1h-4z M3 3h2v1h-2z M2 4h4v1h-4z M1 5h2v1h-2z M5 5h2v1h-2z M0 6h2v1h-2z M6 6h2v1h-2z'/></svg>"); -webkit-mask-size: 8px 7px; mask-size: 8px 7px; }
.tb-btn[data-act="min"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='2'><rect width='6' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='2'><rect width='6' height='2'/></svg>"); -webkit-mask-size: 6px 2px; mask-size: 6px 2px; -webkit-mask-position: 4px 8px; mask-position: 4px 8px; }
.tb-btn[data-act="max"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'><path d='M0 0h9v2h-9z M0 2h1v7h-1z M8 2h1v7h-1z M0 8h9v1h-9z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'><path d='M0 0h9v2h-9z M0 2h1v7h-1z M8 2h1v7h-1z M0 8h9v1h-9z'/></svg>"); -webkit-mask-size: 9px 9px; mask-size: 9px 9px; }
.win.is-maximized .tb-btn[data-act="max"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='9' shape-rendering='crispEdges'><path d='M2 0h6v2h-6z M2 2h1v1h-1z M7 2h1v4h-1z M6 5h1v1h-1z M0 3h6v2h-6z M0 5h1v4h-1z M5 5h1v4h-1z M0 8h6v1h-6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='9' shape-rendering='crispEdges'><path d='M2 0h6v2h-6z M2 2h1v1h-1z M7 2h1v4h-1z M6 5h1v1h-1z M0 3h6v2h-6z M0 5h1v4h-1z M5 5h1v4h-1z M0 8h6v1h-6z'/></svg>"); -webkit-mask-size: 8px 9px; mask-size: 8px 9px; }
.tb-btn[data-act="help"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='9' shape-rendering='crispEdges'><path d='M1 0h4v1h-4z M0 1h2v2h-2z M4 1h2v2h-2z M3 3h2v1h-2z M2 4h2v2h-2z M2 7h2v2h-2z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='9' shape-rendering='crispEdges'><path d='M1 0h4v1h-4z M0 1h2v2h-2z M4 1h2v2h-2z M3 3h2v1h-2z M2 4h2v2h-2z M2 7h2v2h-2z'/></svg>"); -webkit-mask-size: 6px 9px; mask-size: 6px 9px; }

.menubar { display: flex; flex: none; padding: 2px 0 1px; gap: 0; position: relative; }
.menubar > button { border: none; background: none; padding: 2px 6px; cursor: default; font-size: 11px; }
.menubar > button:hover, .menubar > button.is-open { box-shadow: var(--bevel-thin-raised); }
.menubar > button.is-open { box-shadow: var(--bevel-shallow); }
.menubar u, .menu u { text-decoration: underline; }

.toolbar { display: flex; flex: none; align-items: center; gap: 2px; padding: 3px 2px; margin: 1px 0 2px; box-shadow: inset 0 1px var(--hi), inset 0 -1px var(--sh), 0 -1px var(--sh), 0 1px var(--hi); flex-wrap: wrap; }
.tool {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 44px; padding: 3px 5px; border: none; background: none; cursor: pointer; font-size: 11px; color: var(--text);
  text-decoration: none;
}
.tool:hover { box-shadow: var(--bevel-thin-raised); }
.tool:active { box-shadow: var(--bevel-shallow); }
.tool:disabled { color: var(--sh); cursor: default; box-shadow: none; }
.tool:disabled .ico { filter: grayscale(1) opacity(.45); }
.tool.is-inline { flex-direction: row; min-width: 0; padding: 3px 6px; }
.tool-sep { width: 2px; align-self: stretch; margin: 2px 3px; box-shadow: inset 1px 0 var(--sh), inset -1px 0 var(--hi); }

.addressbar { display: flex; align-items: center; gap: 6px; padding: 2px 2px 4px; flex: none; }
.addressbar label { color: var(--text-dim); padding-left: 2px; }
.addressbar .field { flex: 1; display: flex; align-items: center; gap: 4px; height: 22px; white-space: nowrap; overflow: hidden; }
.addressbar .addr-go { min-width: 0; padding: 0 8px; }

.win-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.win-body.is-doc { background: var(--field); color: var(--field-text); box-shadow: var(--bevel-sunken); padding: 2px; }
.win-body.is-doc > .doc { padding: 22px 26px 28px; }
.win-body.is-pad { padding: 10px 8px; }

.statusbar { display: flex; gap: 2px; margin-top: 2px; flex: none; }
.sb-field { box-shadow: var(--bevel-shallow); padding: 3px 4px; display: flex; align-items: center; gap: 4px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 20px; }
.sb-field.is-fixed { flex: 0 0 auto; min-width: 110px; }

.resize-grip { position: absolute; right: 3px; bottom: 3px; width: 13px; height: 13px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 0 45%, var(--hi) 45% 52%, var(--sh) 52% 60%, transparent 60% 70%, var(--hi) 70% 76%, var(--sh) 76% 84%, transparent 84%); }
.win.is-maximized .resize-grip, .win.is-dialog .resize-grip { display: none; }

.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 6px 6px; flex: none; }

/* Zoom rectangle animation (open/minimize) */
.zoom-rect { position: fixed; z-index: 99990; pointer-events: none; background: linear-gradient(90deg, var(--title-1), var(--title-2)); opacity: .9; }

/* Context / start / pop-up menus */
.menu {
  position: fixed; z-index: 99000; min-width: 160px; padding: 2px; background: var(--face); box-shadow: var(--bevel-raised), 2px 2px 0 rgba(0, 0, 0, .25);
  list-style: none; margin: 0;
}
.menu li { position: relative; }
.menu .mi {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 20px; padding: 2px 18px 2px 6px; border: none; background: none; text-align: left; cursor: default; font-size: 11px; color: var(--text); text-decoration: none; white-space: nowrap;
}
.menu .mi:hover, .menu .mi:focus-visible, .menu li.is-open > .mi { background: var(--sel); color: var(--sel-text); outline: none; }
.menu .mi:disabled { color: var(--sh); text-shadow: 1px 1px 0 var(--hi); }
.menu .mi:disabled:hover { background: none; color: var(--sh); }
.menu .mi .chk { width: 10px; flex: none; text-align: center; }
.menu .has-sub > .mi::after { content: ""; position: absolute; right: 6px; top: 50%; width: 4px; height: 7px; margin-top: -3.5px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'><path d='M0 0h1v7h-1z M1 1h1v5h-1z M2 2h1v3h-1z M3 3h1v1h-1z'/></svg>") no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'><path d='M0 0h1v7h-1z M1 1h1v5h-1z M2 2h1v3h-1z M3 3h1v1h-1z'/></svg>") no-repeat; }
.menu .sep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px var(--sh), inset 0 -1px var(--hi); }
.menu .sub { position: absolute; left: calc(100% - 3px); top: -3px; display: none; }
.menu li.is-open > .sub { display: block; }
.menu.is-drop { position: absolute; }

/* =========================================================================
   DESKTOP
   ========================================================================= */
.desktop {
  position: fixed; inset: 0; overflow: hidden;
  background-color: var(--desk);
  transition: background-color .3s;
  opacity: 0;
}
.desktop.is-on { opacity: 1; transition: opacity .55s ease, background-color .3s; }

/* Theme wallpapers: Teal = plain colour, XP / Neo Tokyo / Pink = pictures, Terminal = canvas (js/wallpapers.js) */
.wp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: none; }
.desktop[data-wallpaper="terminal"] { background-color: #010402; }
.desktop[data-wallpaper="terminal"] .wp-canvas { display: block; opacity: .55; }
.desktop[data-wallpaper="xp"] { background: #3d7bd8 url("../img/wallpapers/xp.jpg") center / cover no-repeat; }
.desktop[data-wallpaper="neotokyo"] { background: #05070e url("../img/wallpapers/neotokyo.png") center / cover no-repeat; image-rendering: pixelated; }
.desktop[data-wallpaper="pink"] { background: #f4c4d8 url("../img/wallpapers/pink.png") center / cover no-repeat; image-rendering: pixelated; }
.desktop:is([data-wallpaper="xp"], [data-wallpaper="neotokyo"]) .desk-icon .lbl,
.desktop:is([data-wallpaper="xp"], [data-wallpaper="neotokyo"]) .desk-watermark { text-shadow: 1px 1px 1px #000, 0 0 5px rgba(0, 0, 0, .6); }
.desktop:is([data-wallpaper="xp"], [data-wallpaper="neotokyo"]) .desk-watermark { color: #fff; }

/* Theme details */
:root[data-scheme="neotokyo"] .win.is-active .title-bar .tb-text { text-shadow: 1px 1px 0 rgba(40, 0, 0, .6); }
:root[data-scheme="neotokyo"] .doc .h1, :root[data-scheme="neotokyo"] .doc .h2, :root[data-scheme="neotokyo"] .webview .wv-title { text-shadow: 0 0 14px rgba(255, 60, 50, .45); }
:root[data-scheme="neotokyo"] .doc em { text-shadow: 0 0 10px rgba(63, 240, 255, .45); }
:root[data-scheme="neotokyo"] .desk-icon .lbl { text-shadow: 1px 1px 0 #000, 0 0 6px rgba(0, 0, 0, .9); }
:root[data-scheme="neotokyo"] .desk-watermark { color: rgba(233, 237, 247, .6); }
:root[data-scheme="neotokyo"] .start-banner { background: linear-gradient(0deg, #e3241b, #3a060a); }
:root[data-scheme="neotokyo"] .start-banner span { color: #ffd400; }

/* Every theme except Teal tints the whole shell: start button, taskbar, active window */
:root:not([data-scheme="standard"]) .start-btn { background: var(--title-1); color: var(--title-text); }
:root[data-scheme="neotokyo"] .taskbar { box-shadow: inset 0 1px var(--face-2), inset 0 2px var(--hi), 0 -1px 0 #ff2a2a, 0 -8px 22px rgba(255, 40, 40, .22); }
:root[data-scheme="neotokyo"] .win.is-active { box-shadow: var(--bevel-raised), 0 0 0 1px rgba(255, 60, 50, .35), 0 0 26px rgba(255, 40, 40, .2); }
:root[data-scheme="pink"] .taskbar { box-shadow: inset 0 1px var(--face-2), inset 0 2px var(--hi), 0 -2px 14px rgba(255, 95, 168, .25); }
:root[data-scheme="pink"] .win.is-active { box-shadow: var(--bevel-raised), 4px 6px 0 rgba(214, 36, 122, .18); }
:root[data-scheme="terminal"] .taskbar { box-shadow: inset 0 1px var(--face-2), inset 0 2px var(--hi), 0 -1px 0 #18c45a, 0 -8px 22px rgba(57, 255, 122, .15); }
:root[data-scheme="terminal"] .win.is-active { box-shadow: var(--bevel-raised), 0 0 0 1px rgba(57, 255, 122, .3), 0 0 26px rgba(57, 255, 122, .14); }
:root[data-scheme="pink"] .desk-icon { color: #4a1631; }
:root[data-scheme="pink"] .desk-icon .lbl { text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
:root[data-scheme="pink"] .desk-watermark { color: rgba(74, 22, 49, .7); }
:root[data-scheme="pink"] .desk-icon .ico { filter: drop-shadow(1px 1px 0 rgba(255, 255, 255, .7)); }
:root[data-scheme="terminal"] .doc, :root[data-scheme="terminal"] .dos { text-shadow: 0 0 4px rgba(57, 255, 122, .35); }
:root[data-scheme="terminal"] .desk-watermark { color: rgba(57, 255, 122, .65); }
:root[data-scheme="terminal"] .desk-icon .lbl { color: #b6ffc8; }

.desk-area { position: absolute; inset: 0 0 var(--taskbar-h) 0; }
.desk-icons {
  position: absolute; top: 8px; left: 6px; bottom: 6px;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 78px); grid-auto-columns: 82px; gap: 2px 4px;
  z-index: 1;
}
.desk-icon {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 82px; padding: 4px 2px; border: none; background: none; cursor: pointer; color: #fff; text-decoration: none;
}
.desk-icon .ico { width: 32px; height: 32px; }
.desk-icon .lbl { padding: 1px 2px; text-align: center; line-height: 13px; font-size: 11px; max-width: 78px; overflow-wrap: anywhere; }
.desk-icon:focus-visible .lbl, .desk-icon.is-selected .lbl { background: var(--sel); color: var(--sel-text); outline: 1px dotted #ff0; }
.desk-icon.is-selected .ico { filter: drop-shadow(0 0 0 var(--sel)) brightness(.6) sepia(1) hue-rotate(var(--sel-hue)) saturate(4); }
.desk-icon:focus-visible { outline: none; }
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) .desk-icon .ico { filter: drop-shadow(0 0 1px rgba(200, 220, 255, .6)); }
.desk-icon .shortcut { position: absolute; }
.desk-icon .ico-wrap { position: relative; }
.desk-icon .ico-wrap::after { content: none; }
.desk-icon.is-link .ico-wrap::after { content: ""; position: absolute; left: 0; bottom: 0; width: 10px; height: 10px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' shape-rendering='crispEdges'><rect width='10' height='10' fill='white'/><rect width='10' height='1' fill='black'/><rect y='9' width='10' height='1' fill='black'/><rect width='1' height='10' fill='black'/><rect x='9' width='1' height='10' fill='black'/><path d='M4 2h4v4h-1v-2h-1v1h-1v1h-1v1h-1v1h-1v-2h1v-1h1v-1h1v-1h-1z'/></svg>"); }

.desk-watermark { position: absolute; right: 10px; bottom: 8px; color: rgba(255, 255, 255, .78); text-align: right; line-height: 15px; font-size: 11px; pointer-events: none; z-index: 0; }
.desk-watermark b { font-weight: 700; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--taskbar-h); z-index: 50000;
  display: flex; align-items: center; gap: 3px; padding: 3px 2px 2px;
  background: var(--face); box-shadow: inset 0 1px var(--face-2), inset 0 2px var(--hi);
}
.start-btn { min-width: 0; height: 23px; padding: 0 6px 0 4px; font-weight: 700; gap: 3px; }
.start-btn .ico { width: 16px; height: 16px; }
.start-btn.is-open { box-shadow: var(--bevel-pressed); padding: 2px 5px 0 5px; outline: 1px dotted var(--text); outline-offset: -4px; }
.tb-sep { width: 2px; height: 22px; box-shadow: inset 1px 0 var(--sh), inset -1px 0 var(--hi); margin: 0 1px; flex: none; }
.tb-grip { width: 3px; height: 20px; box-shadow: inset 1px 1px var(--hi), inset -1px -1px var(--sh); margin: 0 2px; flex: none; }
.quick-launch { display: flex; gap: 0; flex: none; }
.ql-btn { width: 22px; height: 22px; display: grid; place-items: center; border: none; background: none; padding: 0; cursor: pointer; }
.ql-btn:hover { box-shadow: var(--bevel-thin-raised); }
.ql-btn:active { box-shadow: var(--bevel-shallow); }
.task-list { flex: 1; display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.task-btn { flex: 0 1 160px; min-width: 40px; justify-content: flex-start; padding: 0 6px; height: 23px; overflow: hidden; }
.task-btn span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-btn.is-active {
  box-shadow: var(--bevel-pressed); font-weight: 700; padding: 2px 5px 0 7px;
  background-color: var(--hi);
  background-image: linear-gradient(45deg, var(--face) 25%, transparent 25%, transparent 75%, var(--face) 75%), linear-gradient(45deg, var(--face) 25%, transparent 25%, transparent 75%, var(--face) 75%);
  background-size: 2px 2px; background-position: 0 0, 1px 1px;
}
.tray { display: flex; align-items: center; gap: 4px; height: 23px; padding: 0 6px 0 4px; box-shadow: var(--bevel-shallow); flex: none; }
.tray-btn { border: none; background: none; padding: 0 1px; height: 18px; display: grid; place-items: center; cursor: pointer; }
.tray-lang { font-size: 11px; padding: 0 3px; background: var(--sel); color: var(--sel-text); height: 15px; line-height: 15px; }
.tray-clock { min-width: 52px; text-align: center; }

/* ---------- Start menu ---------- */
.start-menu {
  position: absolute; left: 2px; bottom: calc(var(--taskbar-h) - 2px); z-index: 60000;
  display: flex; padding: 3px; background: var(--face); box-shadow: var(--bevel-raised), 2px 2px 0 rgba(0, 0, 0, .25);
}
.start-banner {
  width: 24px; background: linear-gradient(0deg, var(--title-1), var(--title-2)); color: var(--face-2);
  writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; padding: 6px 0;
  font-family: var(--font-splash); font-size: 19px; letter-spacing: .5px; white-space: nowrap;
}
.start-banner b { color: #fff; font-weight: 900; }
.start-banner span { font-weight: 400; }
.start-menu > ul { list-style: none; margin: 0; padding: 0; min-width: 190px; }
.start-menu .mi { min-height: 32px; padding-right: 22px; gap: 10px; }
.start-menu .mi .ico { width: 24px; height: 24px; }
.start-menu .sub .mi { min-height: 22px; gap: 6px; }
.start-menu .sub .mi .ico { width: 16px; height: 16px; }
.start-menu .sub { left: calc(100% - 2px); }

/* =========================================================================
   APP CONTENT
   ========================================================================= */
.doc { font-family: var(--font-px); font-size: 21px; line-height: 1.25; color: var(--field-text); }
.doc p { margin: 0 0 .7em; }
.doc strong { color: var(--hl); font-weight: 400; }
.doc em { font-style: normal; color: var(--accent); }
.doc .eyebrow { font-family: var(--font-ui); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; display: block; }
.doc .h1 { font-family: var(--font-px); font-weight: 400; font-size: clamp(44px, 6vw, 68px); line-height: .9; color: var(--hl); margin: 0 0 12px; letter-spacing: -.5px; }
.doc .h2 { font-family: var(--font-px); font-weight: 400; font-size: clamp(34px, 4.2vw, 48px); line-height: .95; color: var(--hl); margin: 0 0 14px; }
.doc .h3 { font-family: var(--font-px); font-weight: 400; font-size: 30px; line-height: 1; margin: 0 0 4px; color: var(--field-text); }
.doc .rule { height: 2px; margin: 4px 0 16px; background: linear-gradient(90deg, var(--title-1), var(--title-2) 60%, transparent); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; font-family: var(--font-ui); font-size: 11px; line-height: 16px; background: var(--face); color: var(--text); box-shadow: var(--bevel-thin-raised); white-space: nowrap; }
.chip.is-accent { background: var(--sel); color: var(--sel-text); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pixel-frame { padding: 4px; background: var(--face); box-shadow: var(--bevel-raised); }
.pixel-frame .inner { box-shadow: var(--bevel-sunken); padding: 2px; background: #000; overflow: hidden; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Welcome */
.welcome { display: grid; grid-template-columns: 200px 1fr; min-height: 100%; }
.welcome-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 16px 18px 12px; background: linear-gradient(90deg, var(--banner) 0%, var(--banner) 40%, var(--title-1) 100%); color: #fff; }
.welcome-head .ico { width: 48px; height: 48px; }
.welcome-head .w-small { font-family: var(--font-splash); font-size: 13px; letter-spacing: .3px; opacity: .85; }
.welcome-head .w-big { font-family: var(--font-splash); font-weight: 900; font-size: 30px; line-height: 1; }
.welcome-head .w-big span { color: var(--w98); }
.welcome-nav { list-style: none; margin: 0; padding: 12px 8px; background: var(--face); display: flex; flex-direction: column; gap: 2px; }
.welcome-nav button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; border: none; background: none; cursor: pointer; text-align: left; font-size: 11px; color: var(--text); }
.welcome-nav button:hover, .welcome-nav button:focus-visible, .welcome-nav button.is-hover { background: var(--sel); color: var(--sel-text); outline: none; }
.welcome-nav .ico { width: 24px; height: 24px; }
.welcome-main { background: var(--field); color: var(--field-text); padding: 18px 22px; box-shadow: var(--bevel-sunken); min-height: 250px; }
.welcome-main .h2 { margin-bottom: 8px; }
.welcome-main .wm-desc { min-height: 3.8em; }
.welcome-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 2px; gap: 8px; flex-wrap: wrap; }
.social-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 26px; align-items: start; }
.photo-card .inner { aspect-ratio: 1; background: #f7f7fa; padding: 0; }
.photo-card img { width: 100%; height: 100%; object-fit: contain; }
.photo-caption { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: 11px; padding: 4px 2px 0; color: var(--text); }
.facts { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: 19px; }
.facts th { text-align: left; font-weight: 400; color: var(--text-dim); padding: 3px 14px 3px 0; white-space: nowrap; vertical-align: top; font-family: var(--font-ui); font-size: 11px; padding-top: 7px; text-transform: uppercase; }
.facts td { padding: 3px 0; border-bottom: 1px dotted var(--sh); }
.status-dot { display: inline-block; width: 8px; height: 8px; background: var(--ok); margin-right: 6px; box-shadow: 0 0 0 1px var(--dk); animation: blink 1.6s steps(1) infinite; }

.about-more { display: grid; grid-template-columns: 1fr; gap: 26px; margin-top: 26px; padding-top: 18px; border-top: 2px solid transparent; box-shadow: inset 0 1px var(--sh), inset 0 2px var(--hi); }
.about-block .h3 { display: flex; align-items: center; gap: 10px; color: var(--hl); margin-bottom: 10px; }
.about-block .h3 .ico { width: 24px; height: 24px; }
.fun-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fun-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.15; }
.fun-list .ico { width: 24px; height: 24px; margin-top: 1px; }

/* Tech stack */
.stack-group + .stack-group { margin-top: 18px; }
.stack-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-ui); font-size: 11px; font-weight: 700; color: var(--hl); }
.stack-group h3::after { content: ""; flex: 1; height: 2px; box-shadow: inset 0 1px var(--sh), inset 0 -1px var(--hi); }
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.stack-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 6px; border: none; background: none; cursor: pointer; color: var(--field-text); }
.stack-item .logo { width: 44px; height: 44px; display: grid; place-items: center; background: #fff; box-shadow: var(--bevel-raised); padding: 6px; }
.stack-item .logo img { width: 30px; height: 30px; image-rendering: auto; transition: transform .15s steps(3); }
.stack-item .logo .ico { width: 32px; height: 32px; transition: transform .15s steps(3); }
.stack-item:hover .logo .ico { transform: translateY(-2px) scale(1.08); }
.stack-item:hover .logo img { transform: translateY(-2px) scale(1.08); }
.stack-item .lbl { font-family: var(--font-ui); font-size: 11px; padding: 1px 3px; }
.stack-item.is-selected .lbl, .stack-item:focus-visible .lbl { background: var(--sel); color: var(--sel-text); outline: 1px dotted var(--text); outline: none; }
.stack-item:focus-visible { outline: none; }
.stack-layout { display: grid; grid-template-columns: 190px 1fr; min-height: 100%; }
.webview { padding: 18px 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--title-2) 14%, var(--field)) 0%, var(--field) 70%); border-right: 1px solid color-mix(in srgb, var(--sh) 40%, transparent); }
.webview .ico { width: 48px; height: 48px; margin-bottom: 8px; }
.webview .wv-title { font-family: var(--font-px); font-size: 34px; line-height: .95; color: var(--hl); margin: 0 0 6px; }
.webview .wv-desc { font-size: 18px; line-height: 1.2; }
.webview .wv-desc b { font-weight: 400; color: var(--hl); }

/* Experience — setup wizard */
.wizard { display: grid; grid-template-columns: 210px 1fr; height: 100%; }
.wizard-side { background: linear-gradient(180deg, var(--title-1), color-mix(in srgb, var(--title-2) 70%, #000)); color: #fff; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; position: relative; overflow: hidden; }
.wizard-side .ws-logo { font-family: var(--font-splash); font-weight: 900; font-size: 22px; line-height: 1; margin-bottom: 14px; }
.wizard-side .ws-logo span { color: var(--w98); }
.wizard-side ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wizard-side li { display: flex; gap: 8px; align-items: flex-start; line-height: 14px; opacity: .75; }
.wizard-side li .mark { width: 12px; flex: none; text-align: center; }
.wizard-side li.is-done { opacity: 1; }
.wizard-side li.is-current { opacity: 1; font-weight: 700; color: var(--w98-cur); }
.wizard-side .ws-eta { margin-top: auto; padding-top: 14px; line-height: 15px; }
.wizard-side .ws-eta .progress { margin-top: 6px; }
.wizard-side .ws-art { position: absolute; right: -30px; bottom: 70px; opacity: .14; width: 150px; height: 150px; }
.wizard-main { background: var(--field); color: var(--field-text); overflow: auto; }
.timeline { position: relative; margin: 6px 0 0 14px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--face); box-shadow: var(--bevel-shallow); }
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item:last-child { padding-bottom: 6px; }
.tl-node { position: absolute; left: -48px; top: -2px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--face); box-shadow: var(--bevel-raised); }
.tl-node .ico { width: 16px; height: 16px; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.tl-date { font-family: var(--font-px); font-size: 19px; color: var(--text-dim); }
.tl-org { font-family: var(--font-ui); font-size: 11px; display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; color: var(--text-dim); }
.tl-item.is-next .tl-node { background: var(--field); }
.tl-list { margin: 0 0 10px; padding-left: 20px; }
.tl-list li { margin-bottom: 4px; }
.tl-list li::marker { color: var(--accent); }
.tl-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ev-intro { margin-bottom: 4px; }
.tl-item.is-next .h3 { color: var(--text-dim); }

/* Projects */
.projects-layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100%; }
.proj-list { padding: 14px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.proj { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sh) 35%, transparent); }
.proj.is-focus { box-shadow: inset 0 0 0 1px var(--sel), 3px 3px 0 color-mix(in srgb, var(--sel) 25%, transparent); }
.proj .shot { width: max-content; max-width: 100%; align-self: start; }
.proj .shot .inner { padding: 0; line-height: 0; }
.proj .shot img { width: 320px; max-width: 100%; height: auto; aspect-ratio: 16 / 10; image-rendering: pixelated; }
.proj .num { font-family: var(--font-px); font-size: 20px; color: var(--accent); }
.proj .h3 { font-size: 34px; margin: 2px 0 6px; }
.proj p { font-size: 19px; }
.proj .proj-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Contact — mail composer */
.mail-head { padding: 14px 16px 12px; display: flex; gap: 14px; align-items: center; }
.mail-head .ico { width: 48px; height: 48px; }
.mail-head .h2 { color: var(--hl); margin: 0; font-family: var(--font-px); font-weight: 400; font-size: 44px; line-height: .9; }
.mail-head .h2 em { color: var(--accent); font-style: normal; }
.mail-head p { margin: 4px 0 0; font-family: var(--font-px); font-size: 19px; line-height: 1.15; max-width: 520px; }
.mail-fields { display: grid; grid-template-columns: 64px 1fr; gap: 4px 6px; align-items: center; padding: 6px 4px; }
.mail-fields label { text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.mail-fields .field { height: 22px; }
.mail-body { margin: 2px 4px 0; display: flex; flex: 1; min-height: 140px; }
.mail-body textarea { flex: 1; font-family: var(--font-px); font-size: 19px; line-height: 1.2; padding: 8px 10px; }
.mail-wrap { display: flex; flex-direction: column; height: 100%; }
.mail-socials { display: flex; gap: 6px; padding: 8px 4px 2px; flex-wrap: wrap; }

/* My computer — system properties */
.sysprops { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 6px; align-items: start; }
.sysprops .ico { width: 128px; height: 128px; }
.sysprops dl { margin: 0; line-height: 15px; }
.sysprops dt { margin-top: 10px; }
.sysprops dt:first-child { margin-top: 0; }
.sysprops dd { margin: 2px 0 0 18px; }
.tree { background: var(--field); color: var(--field-text); box-shadow: var(--bevel-sunken); padding: 6px; height: 240px; overflow: auto; line-height: 18px; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; }
.tree > ul { padding-left: 0; }
.tree li { position: relative; }
.tree .node { display: inline-flex; align-items: center; gap: 4px; }
.tree details > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tree details > summary::-webkit-details-marker { display: none; }
.tree details > summary::before { content: "+"; display: inline-grid; place-items: center; width: 9px; height: 9px; border: 1px solid var(--sh); font-size: 9px; line-height: 7px; background: var(--field); }
.tree details[open] > summary::before { content: "−"; }

/* List view (recycle bin) */
.listview { width: 100%; border-collapse: collapse; background: var(--field); color: var(--field-text); }
.listview th { position: sticky; top: 0; text-align: left; font-weight: 400; padding: 2px 6px; background: var(--face); color: var(--text); box-shadow: var(--bevel-btn); white-space: nowrap; }
.listview td { padding: 2px 6px; white-space: nowrap; }
.listview td:first-child { display: flex; align-items: center; gap: 4px; }
.listview tr.is-selected td { background: var(--sel); color: var(--sel-text); }
.listview tbody tr { cursor: default; }
.empty-note { padding: 24px; text-align: center; color: var(--text-dim); }

/* MS-DOS prompt */
.dos { background: #000; color: #c0c0c0; font-family: var(--font-px); font-size: 20px; line-height: 1.05; padding: 6px 8px; height: 100%; overflow: auto; cursor: text; user-select: text; -webkit-user-select: text; white-space: pre-wrap; word-break: break-word; }
.dos .dos-line { min-height: 1.05em; }
.dos .dos-input-row { display: flex; }
.dos .dos-input { flex: 1; background: transparent; border: none; outline: none; color: inherit; font: inherit; padding: 0; caret-color: transparent; min-width: 0; }
.dos .dos-caret { display: inline-block; width: .55em; height: 2px; background: currentColor; align-self: flex-end; margin-bottom: 3px; animation: blink 1s steps(1) infinite; }
.dos a { color: #55ffff; }
.dos .c-y { color: #ffff55; }
.dos .c-c { color: #55ffff; }
.dos .c-g { color: #55ff55; }
.dos .c-p { color: #ff55ff; }
.dos .c-w { color: #ffffff; }
.dos .c-r { color: #ff5555; }

/* Minesweeper */
.mines { padding: 6px; display: inline-flex; flex-direction: column; gap: 6px; box-shadow: var(--bevel-raised); background: #c0c0c0; color: #000; }
.mines-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px; box-shadow: inset -2px -2px #fff, inset 2px 2px #808080; }
.lcd { background: #000; color: #ff1a1a; font-family: var(--font-px); font-size: 30px; line-height: 24px; height: 25px; padding: 0 2px; width: 43px; text-align: right; letter-spacing: 1px; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080; text-shadow: 0 0 4px rgba(255, 0, 0, .6); }
.mines-face { width: 26px; height: 26px; border: none; padding: 0; background: #c0c0c0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; display: grid; place-items: center; cursor: pointer; }
.mines-face:active { box-shadow: inset 1px 1px #808080; }
.mines-face .ico { width: 17px; height: 17px; }
.mines-grid { display: grid; box-shadow: inset -3px -3px #fff, inset 3px 3px #808080; padding: 3px; }
.cell { width: 22px; height: 22px; border: none; padding: 0; background: #c0c0c0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; font-family: var(--font-ui); font-weight: 700; font-size: 13px; display: grid; place-items: center; cursor: default; }
.cell.is-open { box-shadow: inset 1px 1px #808080; background: #c0c0c0; }
.cell.is-boom { background: #ff0000; }
.cell .ico { width: 14px; height: 14px; }
.cell[data-n="1"] { color: #0000ff; } .cell[data-n="2"] { color: #008000; } .cell[data-n="3"] { color: #ff0000; } .cell[data-n="4"] { color: #000080; }
.cell[data-n="5"] { color: #800000; } .cell[data-n="6"] { color: #008080; } .cell[data-n="7"] { color: #000; } .cell[data-n="8"] { color: #808080; }

/* Display properties */
.monitor-preview { width: 190px; margin: 4px auto 12px; }
.monitor-preview .mp-bezel { background: #d8d2bf; padding: 10px 10px 18px; border-radius: 6px 6px 3px 3px; box-shadow: inset -2px -2px #8f8873, inset 2px 2px #f6f2e6; position: relative; }
.monitor-preview .mp-bezel::after { content: ""; position: absolute; right: 12px; bottom: 6px; width: 5px; height: 3px; background: #2bd12b; box-shadow: 0 0 4px #2bd12b; }
.monitor-preview .mp-screen { height: 112px; background: var(--desk); box-shadow: inset 1px 1px #555, inset -1px -1px #eee; position: relative; overflow: hidden; }
.monitor-preview .mp-win { position: absolute; left: 30px; top: 18px; width: 100px; height: 58px; background: var(--face); box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hi); }
.monitor-preview .mp-win::before { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 8px; background: linear-gradient(90deg, var(--title-1), var(--title-2)); }
.monitor-preview .mp-win::after { content: ""; position: absolute; left: 4px; right: 4px; top: 14px; bottom: 4px; background: var(--field); box-shadow: inset 1px 1px var(--sh); }
.monitor-preview .mp-task { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--face); box-shadow: inset 0 1px var(--hi); }
.monitor-preview .mp-stand { width: 60px; height: 10px; margin: 0 auto; background: linear-gradient(#cfc8b2, #a8a18b); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.monitor-preview .mp-screen.is-pipes { background: #000; }
.monitor-preview .mp-wp { position: absolute; inset: 0; width: 100%; height: 100%; }
.monitor-preview .mp-win, .monitor-preview .mp-task { z-index: 1; }

/* Desktop Themes */
.themes-app { display: flex; flex-direction: column; gap: 10px; }
.th-intro { margin: 0; line-height: 15px; }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.desktop.is-mobile .theme-cards { grid-template-columns: repeat(2, 1fr); }
.theme-card { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: none; background: var(--face); color: var(--text); box-shadow: var(--bevel-btn); text-align: left; font: inherit; }
.theme-card:active { box-shadow: var(--bevel-pressed); }
.theme-card.is-selected { box-shadow: var(--bevel-pressed); background-color: var(--face-2); }
.theme-card.is-selected .tc-name { background: var(--sel); color: var(--sel-text); }
.theme-card:focus-visible { outline: 1px dotted var(--text); outline-offset: -4px; }
.tc-screen { position: relative; display: block; aspect-ratio: 27 / 16; overflow: hidden; background: var(--desk); box-shadow: var(--bevel-sunken); }
.tc-wp { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.tc-win { position: absolute; left: 24%; top: 14%; width: 50%; height: 58%; padding: 2px; display: flex; flex-direction: column; gap: 2px; background: var(--face); box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hi), 2px 2px 0 rgba(0, 0, 0, .25); }
.tc-title { height: 7px; flex: none; background: linear-gradient(90deg, var(--title-1), var(--title-2)); }
.tc-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 5px; background: var(--field); box-shadow: inset 1px 1px var(--sh); }
.tc-h { width: 62%; height: 5px; background: var(--hl); }
.tc-line { height: 2px; background: var(--field-text); opacity: .35; }
.tc-line.is-short { width: 70%; background: var(--accent); opacity: .8; }
.tc-task { position: absolute; left: 2px; right: 2px; bottom: 2px; height: 9px; background: var(--face); box-shadow: inset 0 1px var(--hi); }
.tc-start { position: absolute; left: 2px; top: 2px; width: 20px; height: 6px; background: var(--face); box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hi); }
.tc-screen:not([data-scheme="standard"]) .tc-start { background: var(--title-1); }
.tc-name { font-weight: 700; padding: 1px 3px; align-self: flex-start; }
.tc-desc { color: var(--text-dim); line-height: 13px; min-height: 26px; padding: 0 3px; }
.disp-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.disp-list { height: 110px; overflow: auto; background: var(--field); color: var(--field-text); box-shadow: var(--bevel-sunken); padding: 2px; }
.disp-list button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 1px 4px; cursor: default; color: inherit; }
.disp-list button[aria-selected="true"] { background: var(--sel); color: var(--sel-text); }

/* Message box */
.msg { display: flex; gap: 14px; padding: 14px 12px 4px; align-items: flex-start; max-width: 400px; line-height: 15px; }
.msg .ico { width: 32px; height: 32px; }

/* Image viewer */
.viewer { background: var(--sh); display: grid; place-items: center; padding: 10px; height: 100%; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 0 0 1px #000; image-rendering: pixelated; }

/* Run dialog */
.run-body { display: flex; gap: 12px; padding: 12px 8px 4px; }
.run-body .ico { width: 32px; height: 32px; }
.run-body p { margin: 0 0 12px; line-height: 15px; }
.run-row { display: flex; align-items: center; gap: 8px; }
.run-row .field { flex: 1; height: 22px; }

/* Shutdown */
.win[data-modal] { z-index: 70001 !important; }
.shade { position: absolute; inset: 0; z-index: 70000; background-image: linear-gradient(45deg, rgba(0,0,0,.55) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.55) 75%), linear-gradient(45deg, rgba(0,0,0,.55) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.55) 75%); background-size: 2px 2px; background-position: 0 0, 1px 1px; }
.shutdown-body { display: flex; gap: 14px; padding: 14px 10px 4px; }
.shutdown-body .ico { width: 48px; height: 48px; }
.shutdown-body p { margin: 0 0 10px; }
.shutdown-body .opts { display: flex; flex-direction: column; gap: 6px; }

/* About OS */
.about-os { padding: 14px 12px 6px; line-height: 15px; max-width: 420px; }
.about-os .logo-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.about-os .logo-row .ico { width: 48px; height: 48px; }
.about-os .w-small { font-family: var(--font-splash); font-weight: 700; font-size: 11px; }
.about-os .w-big { font-family: var(--font-splash); font-weight: 900; font-size: 26px; line-height: 1; }
.about-os .w-big span { color: var(--w98); }
.about-os hr { border: none; height: 2px; box-shadow: inset 0 1px var(--sh), inset 0 -1px var(--hi); margin: 10px 0; }
.about-os .credits { font-size: 11px; color: var(--text-dim); }

/* =========================================================================
   MASCOT — Robocat assistant
   ========================================================================= */
.mascot { position: absolute; right: 22px; bottom: calc(var(--taskbar-h) + 60px); z-index: 45000; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.mascot > * { pointer-events: auto; }
.mascot-bubble {
  position: relative; width: 270px; margin-bottom: 14px; padding: 10px 12px 10px; background: var(--tip); color: #000; border: 1px solid #000; border-radius: 10px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .25); line-height: 15px; transform-origin: 85% 100%; animation: pop .22s steps(4);
}
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) .mascot-bubble { color: var(--text); border-color: var(--sel); }
.mascot-bubble::after { content: ""; position: absolute; right: 46px; bottom: -11px; width: 18px; height: 11px; background: var(--tip); clip-path: polygon(0 0, 100% 0, 85% 100%); border: 0; }
.mascot-bubble::before { content: ""; position: absolute; right: 45px; bottom: -13px; width: 20px; height: 13px; background: #000; clip-path: polygon(0 0, 100% 0, 85% 100%); }
.mascot-bubble p { margin: 0 0 8px; }
.mascot-bubble .mb-actions { display: flex; flex-direction: column; gap: 3px; }
.mascot-bubble .mb-actions button { display: flex; align-items: center; gap: 6px; border: none; background: none; text-align: left; padding: 2px 2px; cursor: pointer; color: #000080; font-size: 11px; }
:root:is([data-scheme="terminal"], [data-scheme="neotokyo"]) .mascot-bubble .mb-actions button { color: var(--link); }
.mascot-bubble .mb-actions button::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9cf, #0055cc); box-shadow: 0 0 0 1px #003; }
.mascot-bubble .mb-actions button:hover { text-decoration: underline; }
.mascot-bubble .mb-close { position: absolute; top: 4px; right: 6px; border: none; background: none; cursor: pointer; font-size: 11px; padding: 0 3px; }
.mascot-bot { width: 96px; height: 96px; border: none; background: none; padding: 0; cursor: pointer; animation: bob 2.4s steps(6) infinite; filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .25)); }
.mascot-bot .ico { width: 96px; height: 96px; }
.mascot.is-hidden { display: none; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================================================
   INTRO (3D)
   ========================================================================= */
.intro { position: fixed; inset: 0; z-index: 10; background: #050807; color: #e8e2d0; overflow: hidden; touch-action: none; }
.intro.is-gone { display: none; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; outline: none; }
#scene.is-ready { opacity: 1; }
#scene.is-hover { cursor: pointer; }
.intro-ui { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s; }
.intro-ui > * { pointer-events: auto; }
.intro.is-entering .intro-ui { opacity: 0; }
.intro-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 28px; }
.intro-brand { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-px); }
.intro-brand .name { font-size: 30px; line-height: .9; color: #fff; letter-spacing: .5px; }
.intro-brand .role { font-size: 18px; color: #9fe8d8; letter-spacing: .5px; }
.intro-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-family: var(--font-px); }
.ix-btn { border: 1px solid rgba(232, 226, 208, .35); background: rgba(5, 8, 7, .35); color: #e8e2d0; padding: 3px 9px 2px; font-family: var(--font-px); font-size: 18px; line-height: 1.1; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ix-btn:hover, .ix-btn:focus-visible { background: #e8e2d0; color: #050807; outline: none; }
.ix-btn[aria-pressed="true"] { background: #e8e2d0; color: #050807; }
.ix-group { display: flex; }
.ix-group .ix-btn + .ix-btn { border-left: none; }
.intro-hero { position: absolute; left: clamp(20px, 4vw, 64px); top: 50%; transform: translateY(-46%); max-width: min(40vw, 560px); font-family: var(--font-px); pointer-events: none; }
.intro-hero .intro-welcome { font-size: 20px; color: #9fe8d8; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 6px; display: block; }
.intro-hero h1 { font-weight: 400; font-size: clamp(38px, 5.4vw, 76px); line-height: .86; margin: 0; color: #fff; text-shadow: 0 0 18px rgba(120, 200, 255, .25); }
.intro-hero h1 em { font-style: normal; color: #4fe3d1; text-shadow: 0 0 18px rgba(79, 227, 209, .35); }
.intro-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; pointer-events: auto; }
.intro-links .ix-btn { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; padding: 4px 11px 3px 9px; }
.intro-links .ico { width: 16px; height: 16px; }
.intro-hint { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; font-family: var(--font-px); font-size: 24px; color: #fff; background: none; border: none; cursor: pointer; padding: 0; pointer-events: auto; opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s; }
.intro-hint.is-on { opacity: 1; transform: none; }
.intro-hint .key { display: inline-block; padding: 6px 16px 5px; border: 2px solid #fff; background: rgba(255, 255, 255, .08); box-shadow: 4px 4px 0 rgba(255, 255, 255, .25), 0 0 22px rgba(79, 227, 209, .25); animation: cta 2.4s ease-in-out infinite; }
.intro-hint .key::after { content: "  ›"; }
.intro-hint:hover .key, .intro-hint:focus-visible .key { background: #fff; color: #050807; animation: none; }
.intro-hint:focus-visible { outline: none; }
@keyframes cta { 50% { box-shadow: 4px 4px 0 rgba(255, 255, 255, .25), 0 0 36px rgba(79, 227, 209, .6); } }
.mouse-ico { width: 18px; height: 28px; border: 2px solid #fff; border-radius: 9px; position: relative; flex: none; }
.pwr-ico { display: none; width: 26px; height: 26px; flex: none; position: relative; border: 3px solid #7dffa6; border-top-color: transparent; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(125, 255, 166, .7)); }
.pwr-ico::after { content: ""; position: absolute; left: 50%; top: -7px; width: 3px; height: 12px; margin-left: -1.5px; background: #7dffa6; }
.intro-hint.is-power .mouse-ico { display: none; }
.intro-hint.is-power .pwr-ico { display: block; animation: pwr 1.8s ease-in-out infinite; }
.intro-hint.is-power .key { border-color: #7dffa6; box-shadow: 3px 3px 0 rgba(125, 255, 166, .25), 0 0 18px rgba(125, 255, 166, .25); }
@keyframes pwr { 50% { opacity: .45; } }
.mouse-ico::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 6px; margin-left: -1px; background: #fff; animation: wheel 1.4s steps(4) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

/* keeps the hero copy readable over the bright room */
.intro::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
  background: linear-gradient(90deg, rgba(14, 11, 8, .72) 0%, rgba(14, 11, 8, .5) 26%, rgba(14, 11, 8, 0) 52%), linear-gradient(0deg, rgba(14, 11, 8, .45), rgba(14, 11, 8, 0) 22%), linear-gradient(180deg, rgba(14, 11, 8, .5), rgba(14, 11, 8, 0) 16%); }
.intro:has(#scene.is-ready)::before { opacity: 1; }
.intro.is-entering::before { opacity: 0; transition-duration: .6s; }
.intro-ui { z-index: 2; }
/* record player: a small "listening to" line at the bottom left; YouTube's player (it must stay visible,
   200×200 at least) sits in the opposite corner, away from the hero copy */
.intro-ui > .np { position: absolute; left: clamp(16px, 4vw, 64px); right: clamp(16px, 4vw, 64px); bottom: 22px; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; font-family: var(--font-px); font-size: 17px; line-height: 1; color: #e8e2d0; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); animation: np-in .5s ease-out; }
.intro-ui > .np[hidden] { display: none; }
.np > * { pointer-events: auto; }
@keyframes np-in { from { opacity: 0; transform: translateY(6px); } }
.np-video { display: none; width: 200px; height: 200px; background: #000; border: 1px solid rgba(232, 226, 208, .35); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.np.has-video .np-video { display: block; }
.np-video iframe { display: block; width: 200px; height: 200px; border: 0; }
.np-line { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin-right: auto; }
.np-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .3px; }
.np-label { color: #9fe8d8; }
.np.is-message .np-label, .np.is-message .np-stop { display: none; }
.np.is-message .np-text { white-space: normal; }
.np-stop { flex: none; border: 1px solid rgba(232, 226, 208, .35); background: rgba(5, 8, 7, .35); color: #e8e2d0; padding: 2px 6px 1px; font: inherit; font-size: 15px; cursor: pointer; text-shadow: none; }
.np-stop:hover, .np-stop:focus-visible { background: #e8e2d0; color: #050807; outline: none; }
.np-disc { width: 14px; height: 14px; border-radius: 50%; flex: none; background: radial-gradient(circle, #e08a2e 0 2.5px, #111 3px 6px, #333 6px 6.5px, #111 7px); box-shadow: 0 0 0 1px rgba(232, 226, 208, .25); animation: spin 1.8s linear infinite; }
.np.is-message .np-disc { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.intro-tip { position: fixed; z-index: 30; pointer-events: none; padding: 2px 5px; background: #ffffe1; color: #000; border: 1px solid #000; font-family: var(--font-ui); font-size: 11px; white-space: nowrap; }
.intro-loader { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; padding: 28px; font-family: var(--font-px); font-size: 22px; color: #c0c0c0; background: #000; z-index: 3; transition: opacity .8s; line-height: 1.1; }
.intro-loader.is-done { opacity: 0; pointer-events: none; }
.intro-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.intro-fallback canvas { width: min(92vw, calc(88vh * 4 / 3)); aspect-ratio: 4 / 3; height: auto; image-rendering: auto; border-radius: 18px / 14px; box-shadow: 0 0 0 14px #d9d3c1, 0 0 0 16px #8f8873, 0 0 80px rgba(80, 140, 255, .35); }

/* Full-screen flash used when passing through the CRT glass */
.crt-flash { position: fixed; inset: 0; z-index: 200; pointer-events: none; background: radial-gradient(ellipse at center, rgba(255,255,255,.85), rgba(160,220,255,.4) 45%, transparent 75%); opacity: 0; }
.crt-flash.is-on { animation: flash .7s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* CRT overlay over the desktop (optional) */
.crt-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 150000; display: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, .28) 100%);
}
:root[data-crt="on"] .crt-overlay.is-active { display: block; }

/* Screensaver + BSOD */
.screensaver { position: fixed; inset: 0; z-index: 200000; background: #000; cursor: none; }
.screensaver canvas { width: 100%; height: 100%; display: block; }
.bsod { position: fixed; inset: 0; z-index: 210000; background: #0000aa; color: #fff; font-family: var(--font-px); font-size: clamp(18px, 2.4vw, 28px); line-height: 1.2; display: grid; place-items: center; padding: 24px; cursor: none; }
.bsod .bsod-in { max-width: 860px; }
.bsod .bsod-title { text-align: center; margin-bottom: 1.2em; }
.bsod .bsod-title span { background: #aaaaaa; color: #0000aa; padding: 0 .4em; }
.bsod p { margin: 0 0 1em; }
.bsod .center { text-align: center; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
.desktop.is-mobile .desk-icons { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, 82px); grid-template-rows: none; grid-auto-rows: 78px; right: 6px; bottom: auto; justify-content: start; }
.desktop.is-mobile .win:not(.is-dialog) { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - var(--taskbar-h)) !important; }
.desktop.is-mobile .win.is-dialog { left: 50% !important; top: 40% !important; transform: translate(-50%, -50%); max-width: calc(100% - 16px); }
.desktop.is-mobile .tb-btn[data-act="max"], .desktop.is-mobile .resize-grip { display: none; }
.desktop.is-mobile .title-bar { height: 24px; }
.desktop.is-mobile .tb-btn { width: 22px; height: 18px; }
.desktop.is-mobile .task-btn { flex-basis: 44px; }
.desktop.is-mobile .task-btn span.t { display: none; }
.desktop.is-mobile .quick-launch, .desktop.is-mobile .tb-grip { display: none; }
.desktop.is-mobile .mascot { right: 8px; }
.desktop.is-mobile .mascot-bubble { width: min(270px, calc(100vw - 30px)); }
.desktop.is-mobile .mascot-bot, .desktop.is-mobile .mascot-bot .ico { width: 52px; height: 52px; }
.desktop.is-mobile .mascot { bottom: calc(var(--taskbar-h) + 6px); right: 4px; }
.desktop.is-mobile .desk-watermark { display: none; }

@media (max-width: 760px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-nav { flex-direction: row; flex-wrap: wrap; }
  .welcome-nav li { flex: 1 1 45%; }
  .about-grid { grid-template-columns: 1fr; }
  .about-more { grid-template-columns: 1fr; }
  .about-grid .photo-card { max-width: 220px; }
  .stack-layout, .projects-layout { grid-template-columns: 1fr; }
  .webview { border-right: none; border-bottom: 1px solid color-mix(in srgb, var(--sh) 40%, transparent); padding: 14px; }
  .wizard { grid-template-columns: 1fr; height: auto; }
  .wizard-side .ws-art { display: none; }
  .proj { grid-template-columns: 1fr; }
  .win-body.is-doc > .doc { padding: 16px 14px 22px; }
  .sysprops { grid-template-columns: 1fr; }
  .sysprops .ico { width: 64px; height: 64px; }
  .toolbar .tool .tl { display: none; }
  .intro-ui { display: flex; flex-direction: column; }
  .intro::before { background: linear-gradient(180deg, rgba(14, 11, 8, .82) 0%, rgba(14, 11, 8, .55) 26%, rgba(14, 11, 8, 0) 46%), linear-gradient(0deg, rgba(14, 11, 8, .5), rgba(14, 11, 8, 0) 20%); }
  .intro-ui > .np { left: 16px; right: 16px; bottom: 16px; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 16px; }
  .np-video { align-self: flex-end; }
  .np-text { white-space: normal; line-height: 1.05; }
  .np-stop { padding: 5px 9px 4px; }
  .intro-top { position: static; flex-direction: column-reverse; gap: 14px; padding: 14px 16px 0; }
  .intro-controls { justify-content: flex-start; }
  .intro-brand .name { font-size: 24px; }
  .intro-brand .role { font-size: 16px; }
  .intro-hero { position: static; transform: none; max-width: none; padding: 14px 16px 0; }
  .intro-hero .intro-welcome { font-size: 16px; }
  .intro-hero h1 { font-size: clamp(32px, 9.5vw, 50px); }
  .intro-hint { margin-top: 18px; font-size: 20px; }
  .ix-btn { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
