/* =====================================================================
   FuzzyOS 98 — the stylesheet behind fuzzycast.online
   Handcoded with love. Steal whatever you like <3
   ---------------------------------------------------------------------
   Sections:
     1. tokens + base
     2. wallpaper / CRT overlay
     3. desktop layout
     4. windows (title bar, menu bar, toolbar, status bar)
     5. controls (buttons, fields, tabs, tree, groupbox, progress)
     6. content typography (.paper)
     7. retro flair (wordart, marquee, blink, badges, dividers)
     8. widgets (visor, buttons wall, portals)
     9. taskbar + start menu + context menu + dialogs
    10. shutdown + 404 screens, cursor trail
    11. responsive + reduced motion
   ===================================================================== */

/* ---------- 1. tokens + base ---------- */
:root {
  --face: #c0c0c0;
  --hi: #ffffff;
  --lite: #dfdfdf;
  --shade: #808080;
  --dark: #0a0a0a;

  /* protogen palette, sampled from the pfp */
  --sky: #5bc1ff;
  --visor: #26243c;
  --eye: #3937a5;
  --fur: #53536f;
  --led: #5ce1ff;
  --pink: #ff5ac8;
  --gold: #ffd34e;

  --title-1: #14123a;
  --title-2: #3532a0;
  --title-3: #2fa6ee;
  --title-in-1: #6c6c7c;
  --title-in-2: #b4b4c2;
  --select: #2b2a8a;
  --select-ink: #fff;
  --paper: #ffffff;
  --ink: #141414;
  --link: #0000ee;
  --link-visited: #551a8b;

  --ui-font: Tahoma, Verdana, "Segoe UI", "DejaVu Sans", Geneva, sans-serif;
  --pixel-font: "Pixelify Sans", var(--ui-font);
  --head-font: "Silkscreen", "Pixelify Sans", monospace;
  --arcade-font: "Press Start 2P", "Silkscreen", monospace;
  --term-font: "VT323", "Courier New", monospace;

  --raised: inset -1px -1px var(--dark), inset 1px 1px var(--lite), inset -2px -2px var(--shade), inset 2px 2px var(--hi);
  --button: inset -1px -1px var(--dark), inset 1px 1px var(--hi), inset -2px -2px var(--shade), inset 2px 2px var(--lite);
  --pressed: inset -1px -1px var(--hi), inset 1px 1px var(--dark), inset -2px -2px var(--lite), inset 2px 2px var(--shade);
  --sunken: inset -1px -1px var(--hi), inset 1px 1px var(--shade), inset -2px -2px var(--lite), inset 2px 2px var(--dark);
  --field-thin: inset -1px -1px var(--hi), inset 1px 1px var(--shade);
  --status: inset -1px -1px var(--lite), inset 1px 1px var(--shade);

  --cursor: url("../img/cursor.png") 0 0, default;
  --cursor-hand: url("../img/cursor-hand.png") 5 0, pointer;

  --taskbar-h: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: #0b0a1c; cursor: var(--cursor); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui-font);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  cursor: var(--cursor);
  overflow-x: hidden;
}

a, button, summary, label, select, [role="button"], .icon, input[type="checkbox"], input[type="radio"] { cursor: var(--cursor-hand); }
input[type="text"], textarea { cursor: text; }

img { image-rendering: pixelated; max-width: 100%; }
img.smooth { image-rendering: auto; }

::selection { background: var(--select); color: var(--select-ink); }

:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

/* Win98 scrollbars (Chromium/Safari get the full bevel; Firefox gets colours) */
* { scrollbar-color: #9a9aa6 #dcdcdc; }
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track {
  background-color: #dfdfdf;
  background-image: repeating-conic-gradient(#c0c0c0 0% 25%, #fff 0% 50%);
  background-size: 2px 2px;
}
::-webkit-scrollbar-thumb { background: var(--face); box-shadow: var(--button); }
::-webkit-scrollbar-button:single-button { background: var(--face) no-repeat center; box-shadow: var(--button); display: block; width: 16px; height: 16px; }
::-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' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v1H3zM2 1h3v1H2zM1 2h5v1H1zM0 3h7v1H0z'/%3E%3C/svg%3E"); }
::-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' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7v1H0zM1 1h5v1H1zM2 2h3v1H2zM3 3h1v1H3z'/%3E%3C/svg%3E"); }
::-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' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v7H3zM2 1h1v5H2zM1 2h1v3H1zM0 3h1v1H0z'/%3E%3C/svg%3E"); }
::-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' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h1v7H0zM1 1h1v5H1zM2 2h1v3H2zM3 3h1v1H3z'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-corner { background: var(--face); }

.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;
}

/* ---------- 2. wallpaper / CRT overlay ---------- */
html[data-wallpaper="flowers"] { background: #1d2340 url("../../images/flowersblue.png") repeat; }
html[data-wallpaper="teal"] { background: #008080; }

.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99990;
  display: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .16) 3px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .45) 100%);
  mix-blend-mode: multiply;
}
html.crt .crt-overlay { display: block; }
html.crt body { text-shadow: 0 0 1px rgba(91, 193, 255, .25); }

/* ---------- 3. desktop layout ---------- */
.desktop {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 14px calc(var(--taskbar-h) + 28px);
}

.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 14px;
  align-self: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 80px;
  padding: 4px 2px;
  text-decoration: none;
  color: #fff;
  font-size: 11px;
  text-align: center;
  border: 0;
  background: none;
  font-family: var(--ui-font);
}
.icon img { width: 32px; height: 32px; }
.icon span {
  padding: 0 2px;
  text-shadow: 1px 1px 0 #000, 0 0 3px #000;
  line-height: 1.25;
}
.icon:hover span, .icon:focus-visible span { background: var(--select); text-shadow: none; outline: 1px dotted #fff; }
.icon:hover img, .icon:focus-visible img { filter: drop-shadow(0 0 0 var(--select)) brightness(.75) sepia(1) hue-rotate(190deg) saturate(3); }
.icon:focus-visible { outline: none; }
.icon.is-current span { background: rgba(43, 42, 138, .55); text-shadow: none; }

.workspace {
  display: grid;
  gap: 18px;
  align-items: start;
  min-width: 0;
  width: 100%;
  max-width: 1180px;
  margin: 12px auto 0;
}
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* ---------- 4. windows ---------- */
.window {
  position: relative;
  background: var(--face);
  box-shadow: var(--raised), 3px 4px 0 rgba(0, 0, 0, .35);
  padding: 3px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.window.is-minimized, .window.is-closed { display: none; }
.window.is-maximized {
  position: fixed !important;
  inset: 0 0 var(--taskbar-h) 0;
  translate: none !important;
  z-index: 9000 !important;
  overflow: auto;
}
.window.is-maximized > .window-body { flex: 1; overflow: auto; }
.window.is-dragging { opacity: .92; box-shadow: var(--raised), 8px 10px 0 rgba(0, 0, 0, .3); }
.window.pop-in { animation: popIn .18s steps(4, end); }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.title-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 2px 2px 3px;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  background: linear-gradient(90deg, var(--title-1), var(--title-2) 45%, var(--title-3));
  user-select: none;
  touch-action: none;
}
.window.is-inactive > .title-bar { background: linear-gradient(90deg, var(--title-in-1), var(--title-in-2)); color: #dcdcdc; }
.title-bar > img { width: 16px; height: 16px; flex: none; }
.title-bar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .2px;
}
.title-bar-controls { display: flex; flex: none; }
.title-bar-controls button {
  width: 16px;
  height: 14px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--face) no-repeat center;
  box-shadow: var(--button);
}
.title-bar-controls button:active { box-shadow: var(--pressed); background-position: calc(50% + 1px) calc(50% + 1px); }
.title-bar-controls button + button[aria-label="Close"] { margin-left: 2px; }
.title-bar-controls button[aria-label="Minimize"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='2' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h6v2H0z'/%3E%3C/svg%3E"); background-position: 4px 8px; }
.title-bar-controls button[aria-label="Minimize"]:active { background-position: 5px 9px; }
.title-bar-controls button[aria-label="Maximize"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'%3E%3Cpath fill-rule='evenodd' d='M0 0h9v9H0zM1 2h7v6H1z'/%3E%3C/svg%3E"); }
.window.is-maximized .title-bar-controls button[aria-label="Maximize"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='9' shape-rendering='crispEdges'%3E%3Cpath fill-rule='evenodd' d='M2 0h6v6H6V2H2zM0 3h6v6H0zM1 5h4v3H1z'/%3E%3C/svg%3E"); }
.title-bar-controls button[aria-label="Close"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v1h1v1h2V1h1V0h2v1H7v1H6v1H5v1h1v1h1v1h1v1H6V6H5V5H3v1H2v1H0V6h1V5h1V4h1V3H2V2H1V1H0z'/%3E%3C/svg%3E"); }
.title-bar-controls button[aria-label="Help"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='9' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h4v1H1zM0 1h2v2H0zM4 1h2v2H4zM3 3h2v1H3zM2 4h2v2H2zM2 7h2v2H2z'/%3E%3C/svg%3E"); }

.menu-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 1px 0 2px;
  margin: 0;
  list-style: none;
  font-size: 12px;
}
.menu-bar a, .menu-bar span {
  display: inline-block;
  padding: 2px 7px;
  color: #000;
  text-decoration: none;
}
.menu-bar a:first-letter, .menu-bar span:first-letter { text-decoration: underline; }
.menu-bar a:hover, .menu-bar a:focus-visible { background: var(--select); color: #fff; outline: none; }
.menu-bar a[aria-current="page"] { box-shadow: var(--field-thin); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 3px 2px;
  border-top: 1px solid var(--shade);
  box-shadow: inset 0 1px 0 var(--hi);
}
.toolbar + .toolbar { border-top: 1px solid var(--shade); }
.tool-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 48px;
  padding: 3px 5px 2px;
  border: 0;
  background: transparent;
  color: #000;
  font: 11px var(--ui-font);
  text-decoration: none;
}
.tool-btn img { width: 16px; height: 16px; }
.tool-btn .glyph { font-size: 15px; line-height: 16px; height: 16px; }
.tool-btn:hover { box-shadow: inset -1px -1px var(--shade), inset 1px 1px var(--hi); }
.tool-btn:active { box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shade); }
.tool-btn[disabled] { color: var(--shade); text-shadow: 1px 1px 0 var(--hi); filter: grayscale(1) opacity(.6); pointer-events: none; }
.toolbar .sep { width: 2px; align-self: stretch; margin: 2px 3px; box-shadow: inset 1px 0 var(--shade), inset -1px 0 var(--hi); }

.address-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
}
.address-bar label { color: #000; }
.address-bar .field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  padding: 3px 6px;
  min-height: 21px;
  box-shadow: var(--sunken);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.address-bar .field img { width: 16px; height: 16px; flex: none; }

.links-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 2px 4px 3px; }
.links-bar b { margin-right: 4px; }
.links-bar a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; color: #000; text-decoration: none;
}
.links-bar a img { width: 16px; height: 16px; }
.links-bar a:hover { box-shadow: inset -1px -1px var(--shade), inset 1px 1px var(--hi); }
.links-bar a[aria-current="page"] { box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shade); background: #d5d5d5; }

.window-body { margin: 6px; min-width: 0; }
.window-body.flush { margin: 2px 0 0; }

.status-bar {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  font-size: 11px;
}
.status-bar-field {
  flex: 1;
  padding: 2px 4px;
  box-shadow: var(--status);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-bar-field.grow-0 { flex: 0 0 auto; }

/* ---------- 5. controls ---------- */
.btn, button.btn, a.btn, input[type="submit"], input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 75px;
  min-height: 23px;
  padding: 3px 12px;
  border: 0;
  border-radius: 0;
  background: var(--face);
  box-shadow: var(--button);
  color: #000;
  font: 12px var(--ui-font);
  text-decoration: none;
}
.btn img { width: 16px; height: 16px; }
.btn:active, .btn.is-pressed { box-shadow: var(--pressed); padding: 4px 11px 2px 13px; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn.default { box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--dark), inset -2px -2px var(--dark), inset 2px 2px var(--hi), inset -3px -3px var(--shade), inset 3px 3px var(--lite); }
.btn.small { min-width: 0; min-height: 0; padding: 2px 8px; font-size: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-row.end { justify-content: flex-end; }

.field, input[type="text"], textarea, select {
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 3px 4px;
  box-shadow: var(--sunken);
  font: 12px var(--ui-font);
  color: #000;
}
textarea { resize: vertical; width: 100%; font-family: "Courier New", monospace; font-size: 12px; }
input[type="text"]:focus, textarea:focus { outline: none; }

/* Win98 checkbox & radio */
.check { display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.check input { appearance: none; -webkit-appearance: none; margin: 0; width: 13px; height: 13px; background: #fff; box-shadow: var(--sunken); flex: none; }
.check input[type="checkbox"]:checked { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M6 0h1v3H6zM5 1h1v3H5zM0 2h1v3H0zM4 2h1v3H4zM1 3h1v3H1zM3 3h1v3H3zM2 4h1v3H2z'/%3E%3C/svg%3E") no-repeat 3px 3px; }
.check input[type="radio"] { border-radius: 50%; box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shade), inset -2px -2px var(--lite), inset 2px 2px var(--dark); }
.check input[type="radio"]:checked { background: radial-gradient(circle, #000 0 2px, #fff 2.5px); }

fieldset, .groupbox {
  border: 0;
  margin: 10px 0 0;
  padding: 12px 10px 10px;
  box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shade), inset -2px -2px var(--shade), inset 2px 2px var(--hi);
}
fieldset legend, .groupbox > .legend { padding: 0 4px; background: var(--face); }

/* tabs (pure-CSS radio tabs, works without JS) */
.tabs { display: flex; flex-direction: column; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tab-list { display: flex; flex-wrap: wrap; padding-left: 3px; position: relative; z-index: 1; }
.tab-list label {
  padding: 3px 10px 2px;
  margin-right: -1px;
  margin-top: 2px;
  background: var(--face);
  box-shadow: inset -1px 0 var(--dark), inset 1px 1px var(--hi), inset -2px 0 var(--shade), inset 2px 2px var(--lite);
  border-radius: 3px 3px 0 0;
  position: relative;
}
.tab-panel {
  display: none;
  padding: 14px 12px 12px;
  box-shadow: var(--raised);
  margin-top: -2px;
  min-height: 300px;
}
.tabs > input:nth-of-type(1):checked ~ .tab-list label:nth-of-type(1),
.tabs > input:nth-of-type(2):checked ~ .tab-list label:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ .tab-list label:nth-of-type(3),
.tabs > input:nth-of-type(4):checked ~ .tab-list label:nth-of-type(4),
.tabs > input:nth-of-type(5):checked ~ .tab-list label:nth-of-type(5) {
  margin-top: 0;
  padding-bottom: 5px;
  z-index: 2;
  margin-left: -2px;
  margin-right: -3px;
}
/* panels are div siblings of .tab-list (also a div), hence the +1 */
.tabs > input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(2),
.tabs > input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(3),
.tabs > input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(4),
.tabs > input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(5),
.tabs > input:nth-of-type(5):checked ~ .tab-panel:nth-of-type(6) { display: block; }
.tabs > input:focus-visible + input ~ .tab-list,
.tabs > input:focus-visible ~ .tab-list { outline: none; }
.tabs > input:focus-visible ~ .tab-list label { outline: none; }

/* tree view */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { background: #fff; box-shadow: var(--sunken); padding: 8px 8px 8px 6px; }
.tree ul { padding-left: 18px; margin-left: 7px; border-left: 1px dotted var(--shade); }
.tree li { position: relative; padding: 1px 0 1px 2px; }
.tree ul > li::before { content: ""; position: absolute; left: -18px; top: 10px; width: 14px; border-top: 1px dotted var(--shade); }
.tree .node { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px; }
.tree .node img { width: 16px; height: 16px; }
.tree details > summary { list-style: none; 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; font: 9px/1 monospace; background: #fff; border: 1px solid var(--shade); margin-right: 2px;
}
.tree details[open] > summary::before { content: "-"; }
.tree a { color: inherit; }

/* progress */
.progress { height: 20px; padding: 3px; box-shadow: var(--status); background: var(--face); }
.progress > span {
  display: block; height: 100%; width: var(--p, 40%);
  background: repeating-linear-gradient(90deg, var(--select) 0 10px, transparent 10px 12px);
}

/* sunken list / table */
.sunken { background: #fff; box-shadow: var(--sunken); padding: 3px; }
.sunken-dark { background: #000; box-shadow: var(--sunken); padding: 3px; }
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; background: #fff; }
table.grid th {
  text-align: left; font-weight: normal; padding: 2px 6px;
  background: var(--face); box-shadow: var(--button); white-space: nowrap;
}
table.grid td { padding: 3px 6px; border-bottom: 1px dotted #c8c8c8; vertical-align: top; }
table.grid tr:hover td { background: var(--select); color: #fff; }
table.grid tr:hover td a { color: #fff; }

/* ---------- 6. content typography ---------- */
.paper {
  background: var(--paper);
  box-shadow: var(--sunken);
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.paper.scroll { max-height: 420px; overflow: auto; }
.paper > :first-child { margin-top: 0; }
.paper > :last-child { margin-bottom: 0; }
.paper a, .linkish { color: var(--link); }
.paper a:visited { color: var(--link-visited); }
.paper a:hover { color: #e0006a; background: #fff0fa; }
.paper h1, .paper h2, .paper h3, .paper h4 { font-family: var(--head-font); font-weight: 400; line-height: 1.2; letter-spacing: .5px; }
.paper h2 { font-size: 20px; margin: 22px 0 8px; color: var(--eye); }
.paper h3 { font-size: 16px; margin: 18px 0 6px; color: #222; }
.paper h4 { font-size: 13px; margin: 14px 0 4px; }
.paper ul { padding-left: 20px; }
.paper li::marker { color: var(--eye); }
.paper ul.stars { list-style: none; padding-left: 4px; }
.paper ul.stars li { padding-left: 18px; position: relative; }
.paper ul.stars li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: url("../img/sparkle.png") center/7px 7px; }
.paper code, .paper kbd { font-family: var(--term-font); font-size: 16px; background: #eef; padding: 0 3px; }
.paper blockquote { margin: 12px 0; padding: 8px 12px; background: #f3f3ff; border-left: 4px solid var(--sky); }
.paper .muted, .muted { color: #666; }
.paper img.framed, img.framed { box-shadow: var(--sunken); padding: 3px; background: var(--face); }
.paper .float-right { float: right; margin: 0 0 10px 14px; }
.paper .clear { clear: both; }

.dark-paper {
  background: #07061a;
  color: #cfe9ff;
  box-shadow: var(--sunken);
  padding: 14px 16px;
}
.dark-paper a { color: var(--led); }

.terminal {
  background: #000;
  color: #c0c0c0;
  font: 18px/1.25 var(--term-font);
  padding: 10px 12px;
  box-shadow: var(--sunken);
  overflow: auto;
}
.terminal .prompt { color: #fff; }
.terminal .ok { color: #55ff55; }
.terminal .warn { color: #ffff55; }
.terminal .hi { color: var(--led); }
.terminal .pink { color: var(--pink); }
.terminal .caret { display: inline-block; width: .55em; height: 1em; background: #c0c0c0; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }

.notepad {
  background: #fff;
  box-shadow: var(--sunken);
  padding: 8px 10px;
  font: 13px/1.5 "Courier New", Courier, monospace;
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
}
.notepad .done { color: #777; }
.notepad .new { color: #c00; font-weight: bold; }

/* ---------- 7. retro flair ---------- */
.wordart {
  font-family: "Pixelify Sans", Impact, sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4.6vw, 44px);
  line-height: 1.05;
  margin: 2px 0 14px;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #fff6a8 0%, #ffd34e 22%, #ff7aa8 52%, #b05cff 74%, #3fd6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(2px 2px 0 #1b1840) drop-shadow(1px 1px 0 #1b1840);
  transform: skewX(-6deg);
  transform-origin: left;
}
.wordart.rainbow {
  background-image: linear-gradient(90deg, #ff3b3b, #ffb13b, #fff23b, #4dff6a, #3bd7ff, #8a5cff, #ff3bd4, #ff3b3b);
  background-size: 200% 100%;
  animation: rainbowSlide 4s linear infinite;
}
@keyframes rainbowSlide { to { background-position: 200% 0; } }

.rainbow-text {
  background: linear-gradient(90deg, #ff3b3b, #ffb13b, #e8d500, #2bd94a, #1fb6ff, #8a5cff, #ff3bd4, #ff3b3b);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rainbowSlide 3s linear infinite;
  font-weight: bold;
}

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.badge-new {
  display: inline-block;
  font: 9px/1 var(--arcade-font);
  color: #fff;
  background: #e0006a;
  padding: 3px 4px 2px;
  margin-left: 4px;
  vertical-align: middle;
  animation: newFlash .6s steps(1) infinite;
}
@keyframes newFlash { 50% { background: #ffd34e; color: #000; } }

.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  color: var(--led);
  font: 18px/22px var(--term-font);
  box-shadow: var(--sunken);
  padding: 2px 0;
}
.marquee > span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee var(--speed, 28s) linear infinite;
}
.marquee:hover > span { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

hr.pixel {
  border: 0;
  height: 6px;
  margin: 16px 0;
  background:
    linear-gradient(90deg, var(--sky) 0 6px, transparent 6px 12px) 0 0 / 12px 2px repeat-x,
    linear-gradient(90deg, transparent 0 6px, var(--pink) 6px 12px) 0 4px / 12px 2px repeat-x;
}

.construction {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: 12px 0;
  background: repeating-linear-gradient(-45deg, #ffd800 0 10px, #111 10px 20px);
}
.construction > span {
  background: #ffd800;
  padding: 3px 8px;
  font: 10px/1.4 var(--arcade-font);
  color: #000;
  box-shadow: 2px 2px 0 #000;
}

.pill {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  background: var(--face);
  box-shadow: var(--button);
  margin: 0 2px 4px 0;
  white-space: nowrap;
}

/* ---------- 8. widgets ---------- */

/* visor LED banner */
.visor-wrap {
  position: relative;
  background: radial-gradient(ellipse at 50% 30%, #1b1a3a 0%, #08071a 70%);
  box-shadow: var(--sunken);
  padding: 8px;
}
.visor-wrap::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 30%);
  border-radius: 40% 40% 45% 45% / 30% 30% 70% 70%;
}
#visor { display: block; width: 100%; height: 132px; cursor: var(--cursor-hand); }
.visor-fallback { color: var(--led); font: 32px var(--arcade-font); text-align: center; padding: 40px 0; text-shadow: 0 0 8px var(--led); }

/* 88x31 / blinkie walls */
.button-wall { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.button-wall a, .button-wall > img { display: inline-block; line-height: 0; }
.button-wall img { width: 88px; height: 31px; }
.button-wall a:hover img { filter: brightness(1.2) drop-shadow(0 0 4px var(--led)); transform: translateY(-1px); }
/* blinkies tile in 150px columns (2 across in the side column); an odd one out gets centred */
.blinkie-stack { display: grid; grid-template-columns: repeat(auto-fit, 150px); justify-content: center; gap: 3px; }
.blinkie-stack img { width: 150px; height: 20px; display: block; }
.blinkie-stack img:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; }

/* status/props list */
.props { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
.props dt { color: #444; white-space: nowrap; }
.props dt img { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.props dd { margin: 0; font-weight: bold; min-width: 0; }

/* portal shortcuts on the homepage */
.portals { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.portal {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--face);
  box-shadow: var(--button);
  color: #000;
  text-decoration: none;
}
.paper a.portal { color: #000; }
.paper a.portal:hover { background: var(--face); }
.portal img { grid-row: span 2; width: 32px; height: 32px; justify-self: center; }
.portal b { font: 400 14px var(--head-font); letter-spacing: .5px; }
.portal small { font-size: 11px; color: #333; line-height: 1.35; }
.portal:hover { background: #d4d4dc; }
.portal:hover b { color: var(--eye); }
.portal:hover img { animation: hop .35s steps(3) 1; }
.portal:active { box-shadow: var(--pressed); }
@keyframes hop { 50% { transform: translateY(-4px); } }

/* ---------- 9. taskbar / start menu / context menu / dialogs ---------- */
.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--taskbar-h);
  z-index: 50000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 2px;
  background: var(--face);
  box-shadow: inset 0 1px var(--lite), inset 0 2px var(--hi);
  user-select: none;
}
.start-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 6px 0 4px;
  border: 0;
  background: var(--face);
  box-shadow: var(--button);
  font: bold 12px var(--ui-font);
  color: #000;
  flex: none;
}
.start-btn img { width: 18px; height: 18px; }
.start-btn[aria-expanded="true"] { box-shadow: var(--pressed); }
.start-btn[aria-expanded="true"] span { outline: 1px dotted #000; }
.taskbar .grip { width: 3px; height: 22px; box-shadow: inset 1px 1px var(--hi), inset -1px -1px var(--shade); margin: 0 2px; flex: none; }
.taskbar .sep { width: 2px; height: 22px; box-shadow: inset 1px 0 var(--shade), inset -1px 0 var(--hi); flex: none; }
.quick-launch { display: flex; gap: 0; flex: none; }
.quick-launch a, .quick-launch button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; }
.quick-launch a:hover, .quick-launch button:hover { box-shadow: inset -1px -1px var(--shade), inset 1px 1px var(--hi); }
.quick-launch img { width: 16px; height: 16px; }
.task-buttons { display: flex; gap: 3px; flex: 1; min-width: 0; overflow: hidden; }
.task-btn {
  flex: 0 1 160px;
  min-width: 34px;
  display: flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 6px;
  border: 0;
  background: var(--face);
  box-shadow: var(--button);
  font: 12px var(--ui-font);
  color: #000;
  text-align: left;
}
.task-btn img { width: 16px; height: 16px; flex: none; }
.task-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-btn.is-active {
  box-shadow: var(--pressed);
  font-weight: bold;
  background-color: #e0e0e0;
  background-image: repeating-conic-gradient(#c0c0c0 0% 25%, #fff 0% 50%);
  background-size: 2px 2px;
}
.tray {
  display: flex; align-items: center; gap: 2px;
  height: 24px; padding: 0 6px 0 4px;
  box-shadow: var(--status);
  flex: none;
}
.tray button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; background: none; }
.tray button img { width: 16px; height: 16px; }
.tray button.is-off img { filter: grayscale(1) opacity(.45); }
.tray .clock { padding-left: 6px; font-size: 12px; white-space: nowrap; }

.start-menu {
  position: fixed;
  left: 2px;
  bottom: calc(var(--taskbar-h) - 2px);
  z-index: 50001;
  display: none;
  background: var(--face);
  box-shadow: var(--raised), 3px 3px 0 rgba(0, 0, 0, .3);
  padding: 3px;
  min-width: 220px;
}
.start-menu.is-open { display: flex; animation: slideUp .12s steps(3, end); }
@keyframes slideUp { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.start-menu .brand {
  width: 24px;
  background: linear-gradient(0deg, var(--title-1), var(--title-2) 55%, var(--title-3));
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  font: bold 18px var(--ui-font);
  padding: 8px 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: .5px;
}
.start-menu .brand b { color: #fff; }
.start-menu .brand span { color: #bfe8ff; font-weight: normal; }
.start-menu ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.start-menu li > a, .start-menu li > button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 4px 18px 4px 6px;
  border: 0; background: none;
  font: 12px var(--ui-font);
  color: #000;
  text-decoration: none;
  text-align: left;
  min-height: 38px;
}
.start-menu li > a img, .start-menu li > button img { width: 32px; height: 32px; }
.start-menu li > a:hover, .start-menu li > button:hover,
.start-menu li > a:focus-visible, .start-menu li > button:focus-visible { background: var(--select); color: #fff; outline: none; }
.start-menu li > a u, .start-menu li > button u { text-decoration: underline; }
.start-menu li.small > a, .start-menu li.small > button { min-height: 24px; padding-top: 2px; padding-bottom: 2px; }
.start-menu li.small img { width: 16px; height: 16px; margin: 0 8px 0 8px; }
.start-menu .menu-sep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px var(--shade), inset 0 -1px var(--hi); }

.context-menu {
  position: fixed;
  z-index: 60000;
  background: var(--face);
  box-shadow: var(--raised), 2px 2px 0 rgba(0, 0, 0, .3);
  padding: 2px;
  min-width: 170px;
  list-style: none;
  margin: 0;
}
.context-menu button {
  display: block; width: 100%;
  padding: 3px 20px;
  border: 0; background: none;
  font: 12px var(--ui-font); color: #000; text-align: left;
}
.context-menu button:hover, .context-menu button:focus-visible { background: var(--select); color: #fff; outline: none; }
.context-menu .menu-sep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px var(--shade), inset 0 -1px var(--hi); }

.fz-dialog {
  position: fixed;
  z-index: 70000;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 24px));
}
.fz-dialog .dialog-msg { display: flex; gap: 14px; align-items: flex-start; padding: 10px 8px 14px; font-size: 12px; line-height: 1.5; }
.fz-dialog .dialog-msg img { width: 32px; height: 32px; flex: none; }
.fz-dialog .btn-row { justify-content: center; padding-bottom: 4px; }
.fz-dialog.wide { width: min(500px, calc(100vw - 24px)); }
.dialog-backdrop { position: fixed; inset: 0; z-index: 69999; background: transparent; }

/* Display properties monitor preview */
.monitor-preview { display: grid; place-items: center; padding: 6px 0 14px; }
.monitor-preview .bezel {
  width: 184px; height: 138px; padding: 12px 12px 22px;
  background: #c8c8c8;
  box-shadow: inset -2px -2px #6d6d6d, inset 2px 2px #fff, 2px 2px 0 #000;
  border-radius: 6px 6px 2px 2px;
  position: relative;
}
.monitor-preview .bezel::after { content: ""; position: absolute; right: 14px; bottom: 7px; width: 6px; height: 6px; background: #3f3; box-shadow: 0 0 4px #3f3; }
.monitor-preview .screen { width: 100%; height: 100%; box-shadow: var(--sunken); background: #000 center/cover no-repeat; image-rendering: pixelated; }
.monitor-preview .stand { width: 60px; height: 10px; background: #b0b0b0; box-shadow: inset -2px -2px #6d6d6d, inset 2px 2px #fff; }
.wallpaper-list { height: 92px; overflow: auto; padding: 2px; }
.wallpaper-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 1px 4px; font: 12px var(--ui-font); color: #000; }
.wallpaper-list button[aria-pressed="true"] { background: var(--select); color: #fff; }

/* ---------- 10. shutdown + 404 screens, cursor trail ---------- */
.shutdown-screen, .bsod {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000;
  color: #c0c0c0;
  font: 20px/1.2 var(--term-font);
}
.shutdown-screen { display: grid; place-items: center; text-align: center; color: #ff8a00; font: 400 clamp(22px, 4vw, 40px)/1.3 var(--ui-font); padding: 20px; }
.shutdown-screen small { display: block; color: #555; font-size: 14px; margin-top: 18px; font-family: var(--term-font); }

.bsod { background: #0000aa; color: #fff; display: grid; place-items: center; padding: 20px; font: clamp(18px, 1.9vw, 26px)/1.35 var(--term-font); }
.bsod .bsod-inner { max-width: 820px; }
.bsod .bsod-title { display: table; margin: 0 auto 22px; background: #aaa; color: #0000aa; padding: 0 8px; }
.bsod p { margin: 0 0 18px; }
.bsod a { color: #fff; }
.bsod .blink { display: inline-block; }

.sparkle {
  position: fixed;
  z-index: 99995;
  width: 7px; height: 7px;
  pointer-events: none;
  background: url("../img/sparkle.png") center/7px 7px;
  image-rendering: pixelated;
  animation: sparkleFall .7s steps(7) forwards;
}
.sparkle.big { width: 14px; height: 14px; background-size: 14px 14px; }
@keyframes sparkleFall {
  0% { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(var(--dx, 0), 24px); opacity: 0; }
}

/* ---------- 11. responsive + reduced motion ---------- */
@media (max-width: 900px) {
  .desktop { grid-template-columns: 1fr; padding: 10px 10px calc(var(--taskbar-h) + 18px); gap: 12px; }
  .desktop-icons {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }
  .icon { width: 72px; }
  .workspace { grid-template-columns: 1fr !important; grid-template-areas: none !important; }
  .workspace > * { grid-area: auto !important; }
  .window { translate: none !important; }
  .title-bar { touch-action: auto; }
  .task-buttons { display: none; }
  .quick-launch { display: none; }
  .taskbar .grip, .taskbar .sep { display: none; }
  .tray { margin-left: auto; }
  .paper { padding: 14px; }
  .paper .float-right { float: none; display: block; margin: 0 auto 12px; }
}

@media (max-width: 480px) {
  .icon { width: 64px; font-size: 10px; }
  .toolbar .tool-btn span:not(.glyph) { display: none; }
  .tool-btn { min-width: 30px; }
  #visor { height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .marquee > span { padding-left: 0; }
}

/* ---------- 12. easter-egg modes (see cheats in fuzzy98.js) ---------- */
html.party .title-bar {
  background: linear-gradient(90deg, #ff3b3b, #ffb13b, #e8d500, #2bd94a, #1fb6ff, #8a5cff, #ff3bd4, #ff3b3b) !important;
  background-size: 200% 100% !important;
  animation: rainbowSlide 2s linear infinite;
}

/* ---------- 13. page layouts ---------- */
.workspace.home { grid-template-columns: minmax(0, 1fr) 330px; }
.workspace > .wide { grid-column: 1 / -1; }
.workspace.about { grid-template-columns: minmax(0, 640px) minmax(0, 346px); justify-content: center; }
.workspace.projects { grid-template-columns: minmax(0, 1fr) 280px; }
.workspace.links { grid-template-columns: minmax(0, 1fr) 330px; }

/* intro/hero row on the homepage */
.hello { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: start; }
/* the pfp sits in a little raised Win98 picture frame, caption in a status-bar strip */
.hello figure {
  margin: 0; padding: 5px; width: max-content; justify-self: center;
  background: var(--face); box-shadow: var(--raised), 3px 3px 0 rgba(20, 18, 58, .25);
  font-size: 11px; color: #000; text-align: center;
}
.hello figure img { width: 160px; height: 160px; display: block; image-rendering: auto; }
.hello figure img.framed { padding: 2px; background: var(--sky); }
.hello figure figcaption { margin-top: 5px; padding: 2px 4px; box-shadow: var(--status); }

/* pop-up windows: hidden until opened (see popups() in fuzzy98.js) */
.window.popup {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(780px, calc(100vw - 24px));
  max-height: calc(100vh - var(--taskbar-h) - 40px);
  z-index: 100;
}
.window.popup > .window-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.window.popup.is-maximized { transform: none; width: auto; max-height: none; }
html:not(.js) .window.popup:target { display: flex; }
.window.popup.pop-in { animation: popInCentered .18s steps(4, end); }
@keyframes popInCentered {
  from { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  to { transform: translate(-50%, -50%); opacity: 1; }
}

/* ---------- 14. explorer (folder windows) ---------- */
.explorer {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: #fff;
  box-shadow: var(--sunken);
  min-height: 360px;
}
.webview {
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef0ff 70%, #dfe6ff 100%);
  border-right: 1px solid #d4d4e4;
  font-size: 12px;
  min-width: 0;
}
.webview > img { width: 64px; height: 64px; display: block; }
.webview h2 { font: 400 22px/1.1 var(--head-font); margin: 8px 0 0; color: #000; overflow-wrap: anywhere; }
.webview .rule { height: 3px; margin: 8px 0 12px; background: linear-gradient(90deg, var(--title-1), var(--title-3) 55%, rgba(255, 255, 255, 0)); }
.webview [data-info-title] { font-weight: bold; margin-bottom: 4px; min-height: 1.4em; }
.webview p { margin: 0 0 8px; line-height: 1.5; }
.webview a { color: var(--link); }

.icon-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; padding: 16px; }
.icon-grid .file {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 104px; padding: 6px 2px;
  color: #000; text-decoration: none; text-align: center; font-size: 12px;
  border: 0; background: none; font-family: var(--ui-font);
}
.icon-grid .file img { width: 64px; height: 64px; }
.icon-grid .file.small img { width: 32px; height: 32px; margin: 16px 0; }
.icon-grid .file span { padding: 0 3px; }
.icon-grid .file:hover span, .icon-grid .file:focus-visible span { background: var(--select); color: #fff; }
.icon-grid .file:hover img, .icon-grid .file:focus-visible img { filter: brightness(.8) sepia(.6) hue-rotate(190deg) saturate(2.2); }
.icon-grid .file:focus-visible { outline: none; }
.icon-grid .file.ghost { opacity: .5; }
/* locked shrines: greyed out with a pixel padlock over the corner */
.icon-grid .file.locked { position: relative; }
.icon-grid .file.locked img, .icon-grid .file.locked:hover img, .icon-grid .file.locked:focus-visible img { filter: grayscale(1) contrast(.85) brightness(1.1); opacity: .8; }
.icon-grid .file.locked > span { color: #555; }
.icon-grid .file.locked::after {
  content: ""; position: absolute; top: 44px; left: calc(50% + 10px); width: 32px; height: 32px;
  background: url("../icons/16/lock.png") 0 0 / 32px 32px no-repeat; image-rendering: pixelated; pointer-events: none;
}

/* shrine pages inside the Shrines pop-up */
.shrine-pane { min-width: 0; }
.shrine-entry { margin: 12px; }
.shrine-entry[hidden], .icon-grid[hidden] { display: none; }

/* ---------- 15. projects ---------- */
.filter-bar .btn { min-width: 0; padding: 2px 10px; }
.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
  padding: 12px;
  align-content: start;
}
.game-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  background: var(--face);
  box-shadow: var(--raised);
  font-size: 12px;
}
.game-card[hidden] { display: none; }
.game-card .cover { display: block; padding: 2px; background: #000; box-shadow: var(--sunken); align-self: start; line-height: 0; }
.game-card .cover img { display: block; width: 100%; height: auto; aspect-ratio: 315 / 250; object-fit: cover; image-rendering: auto; }
.game-card .cover:hover img { filter: saturate(1.4) brightness(1.1); }
.game-card h3 { margin: 0 0 3px; font: 400 15px/1.2 var(--head-font); }
.game-card h3 a { color: #000; text-decoration: none; }
.game-card h3 a:hover { color: var(--eye); text-decoration: underline; }
.game-card .tagline { margin: 0 0 6px; font-style: italic; color: #333; }
.game-card .blurb { margin: 0 0 8px; line-height: 1.45; }
.game-card .facts { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 0 0 8px; }
.game-card .facts .pill { font-size: 10px; }
.game-card .role { color: #7a0050; font-weight: bold; }

/* ---------- 16. MS Paint-ish doodle pad (about page) ---------- */
.paint { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px; }
.paint-tools { display: grid; grid-template-columns: repeat(2, 25px); gap: 0; align-content: start; padding: 2px; box-shadow: var(--field-thin); }
.paint-tools button {
  width: 25px; height: 25px; padding: 0; border: 0;
  display: grid; place-items: center;
  background: var(--face); box-shadow: var(--button);
  font: 13px/1 var(--ui-font); color: #000;
}
.paint-tools button img { width: 16px; height: 16px; }
.paint-tools button.is-pressed {
  box-shadow: var(--pressed);
  background-image: repeating-conic-gradient(#c0c0c0 0% 25%, #fff 0% 50%);
  background-size: 2px 2px;
}
.paint-canvas-wrap { background: var(--shade); box-shadow: var(--sunken); padding: 6px; min-width: 0; }
.paint-canvas-wrap canvas {
  display: block; width: 100%; max-width: 256px; aspect-ratio: 64 / 87;
  background: #fff; image-rendering: pixelated; touch-action: none;
  cursor: crosshair;
  box-shadow: 1px 1px 0 #000;
}
.paint-palette { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.paint-palette .current { width: 30px; height: 30px; box-shadow: var(--sunken); padding: 3px; background: var(--face); flex: none; }
.paint-palette .current span { display: block; width: 100%; height: 100%; }
.paint-palette .swatches { display: grid; grid-template-columns: repeat(14, 15px); grid-auto-rows: 15px; gap: 1px; }
.paint-palette .swatches button { width: 15px; height: 15px; padding: 0; border: 0; box-shadow: var(--sunken); }

/* ---------- 17. links ---------- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; padding: 14px; }
.site-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; color: #000; text-decoration: none; font-size: 11px; text-align: center;
}
.site-grid a img { width: 88px; height: 31px; }
.site-grid a:hover span, .site-grid a:focus-visible span { background: var(--select); color: #fff; }
.site-grid a:hover img { filter: drop-shadow(0 0 4px var(--led)); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 2px 8px; padding: 6px 4px; border-bottom: 1px dotted #c8c8c8; }
.link-list li:last-child { border-bottom: 0; }
.link-list img { width: 16px; height: 16px; margin-top: 1px; }
.link-list a { font-weight: bold; color: var(--link); }
.link-list small { grid-column: 2; color: #444; font-size: 11px; }

@media (max-width: 900px) {
  .window.popup { top: 10px; transform: translateX(-50%); max-height: calc(100vh - var(--taskbar-h) - 20px); }
  .window.popup.pop-in { animation: none; }
  .hello { grid-template-columns: 1fr; }
  .hello figure { order: -1; }
  .explorer { grid-template-columns: 1fr; }
  .webview { border-right: 0; border-bottom: 1px solid #d4d4e4; }
  .webview { padding: 10px 14px; }
  .webview > img { width: 32px; height: 32px; }
  .webview .optional { display: none; }
  .game-list { grid-template-columns: 1fr; padding: 8px; }
}
@media (max-width: 480px) {
  .game-card { grid-template-columns: 1fr; }
  .icon-grid .file { width: 88px; }
  .paint-palette .swatches { grid-template-columns: repeat(7, 15px); }
}
