/* ============================================================
   RIGELKID BBS — chrome.css
   Vintage desktop shell: wallpaper, windows, taskbar, terminal.
   ============================================================ */

@font-face {
  font-family: "Ark Pixel";
  src: url("../fonts/ark-pixel-12zh.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ark Mono";
  src: url("../fonts/ark-pixel-mono12zh.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gothic";
  src: url("../fonts/unifrakturcook-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --pixel: "Ark Pixel", "Zpix", "SimSun", "MS Gothic", monospace;
  --mono: "Ark Mono", "Cascadia Mono", "Consolas", monospace;
  --gothic: "Gothic", "UnifrakturMaguntia", "Old English Text MT", serif;

  --wall: #1b564c;
  --wall-deep: #0e3a33;
  --wall-light: #2b7061;

  --chrome: #c9c6b9;
  --chrome-hi: #f7f3e4;
  --chrome-lo: #737166;
  --chrome-mid: #a8a599;
  --black: #0b0b09;

  --title-a: #123c34;
  --title-b: #3d7a6a;
  --title-c: #4f8d7b;

  --paper: #f5edd8;
  --paper-2: #eee2c5;
  --paper-3: #e7d9b9;
  --ink: #27251d;
  --ink-soft: #514b3a;
  --muted: #7b7159;
  --line: #c4b48c;

  --teal-950: #071d19;
  --teal-900: #0b2722;
  --teal-800: #11382f;
  --teal-700: #17493e;
  --teal-600: #205c4e;
  --teal-500: #2b6f5f;
  --teal-400: #4a8b78;

  --gold: #c9a86a;
  --gold-hi: #e6d0a0;
  --gold-lo: #8c703f;
  --rose: #a95b68;
  --rose-deep: #863d4b;
  --wine: #8e2f2a;
  --green-ok: #6f8f5b;

  --shadow-hard: 3px 3px 0 rgba(4, 20, 17, .32);
  --shadow-soft: 0 22px 48px rgba(3, 18, 15, .38);

  --bevel-out: inset -1px -1px 0 var(--black), inset 1px 1px 0 var(--chrome-hi),
    inset -2px -2px 0 var(--chrome-lo), inset 2px 2px 0 #e9e5d8;
  --bevel-in: inset -1px -1px 0 var(--chrome-hi), inset 1px 1px 0 var(--black),
    inset -2px -2px 0 #e9e5d8, inset 2px 2px 0 var(--chrome-lo);
  --bevel-thin: inset -1px -1px 0 var(--chrome-lo), inset 1px 1px 0 var(--chrome-hi);
  --bevel-thin-in: inset -1px -1px 0 var(--chrome-hi), inset 1px 1px 0 var(--chrome-lo);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 14px;
  line-height: 1.9;
  background-color: var(--wall);
  background-image:
    linear-gradient(rgba(7, 33, 28, .34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 33, 28, .34) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 26%, var(--wall-light) 0%, var(--wall) 46%, var(--wall-deep) 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../img/noise.png");
  opacity: .55;
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, transparent 35%, rgba(4, 20, 17, .38) 100%);
}

::selection { background: var(--gold); color: var(--teal-950); }

img { max-width: 100%; }
a { color: var(--teal-600); }
button, input, textarea, select { font-family: inherit; }

:focus-visible {
  outline: 2px dotted var(--wine);
  outline-offset: 2px;
}

/* retro scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--chrome) var(--chrome-mid);
}
::-webkit-scrollbar { width: 15px; height: 15px; }
::-webkit-scrollbar-track {
  background: #d6d2c3;
  border-left: 1px solid var(--chrome-lo);
}
::-webkit-scrollbar-thumb {
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow: inset 1px 1px 0 var(--chrome-hi), inset -1px -1px 0 var(--chrome-lo);
}
::-webkit-scrollbar-thumb:hover { background: #dcd8c8; }

/* ------------------------------------------------------------------ layout */
.desktop {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 22px 24px 78px;
}

.layout {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 18px;
  min-width: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--black);
  font-size: 12px;
  text-decoration: none;
  transition: top .12s steps(2);
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ window */
.window {
  position: relative;
  min-width: 0;
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo),
    var(--shadow-hard),
    var(--shadow-soft);
}

.window.is-min { display: none; }

.window.is-max {
  box-shadow:
    0 0 0 1px var(--black),
    0 0 0 3px var(--chrome-hi),
    var(--shadow-soft);
}

body.max-mode .layout {
  display: block;
  max-width: 1480px;
}
body.max-mode .rail { display: none; }
body.max-mode .mobile-hero { display: none; }

.bbs-window.is-refreshing .window__body {
  animation: refresh-flash .22s steps(2, end);
}
@keyframes refresh-flash {
  0% { filter: brightness(1.45) contrast(.86); }
  100% { filter: none; }
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 2px 3px 2px 4px;
  color: #f8f0d8;
  background: linear-gradient(90deg, var(--title-a) 0%, var(--title-b) 62%, var(--title-c) 100%);
  border-top: 1px solid #6fa593;
  border-bottom: 1px solid var(--black);
  user-select: none;
  cursor: default;
}

.titlebar__icon {
  width: 16px;
  height: 16px;
  flex: none;
  image-rendering: pixelated;
}

.titlebar__title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .55);
}
.titlebar__title b { font-weight: 400; color: var(--gold-hi); }

.titlebar__btns {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex: none;
}

.tbtn {
  width: 19px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--black);
  background: var(--chrome);
  border: 0;
  box-shadow: var(--bevel-out);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1;
  cursor: default;
}
.tbtn:hover { background: #ddd8c8; }
.tbtn:active { box-shadow: var(--bevel-in); }
.tbtn--close:hover { background: #b04a43; color: #fff8e7; }
.tbtn span { transform: translateY(-1px); }
.tbtn--close span { font-size: 12px; }

.menubar {
  display: flex;
  align-items: stretch;
  height: 23px;
  padding: 0 2px;
  background: var(--chrome);
  border-bottom: 1px solid #8e8b7e;
  box-shadow: 0 1px 0 var(--chrome-hi);
  font-size: 11px;
}

.menu { position: relative; }

.menu > button {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #1c1b16;
  font: 11px/1 var(--pixel);
  letter-spacing: .02em;
  cursor: default;
}
.menu > button u { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.menu.is-open > button,
.menu > button:hover {
  background: var(--teal-700);
  color: #fbf3dc;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 150;
  min-width: 196px;
  padding: 2px;
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo),
    3px 3px 0 rgba(0, 0, 0, .28);
}
.menu.is-open .dropdown { display: block; }

.dropdown button,
.dropdown a {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 24px;
  padding: 2px 20px 2px 22px;
  border: 0;
  background: transparent;
  color: #1b1a15;
  font: 11px/1.3 var(--pixel);
  text-align: left;
  text-decoration: none;
  cursor: default;
}
.dropdown img { width: 15px; height: 15px; flex: none; opacity: .85; image-rendering: pixelated; }
.dropdown button:hover,
.dropdown a:hover {
  background: var(--teal-700);
  color: #fff9e5;
}
.dropdown button:hover img,
.dropdown a:hover img { filter: brightness(0) invert(1); opacity: 1; }
.dropdown .sep {
  height: 1px;
  margin: 3px 2px;
  background: #8e8b7e;
  border-bottom: 1px solid var(--chrome-hi);
}
.dropdown .hint {
  margin-left: auto;
  padding-left: 18px;
  font-size: 9px;
  color: #6d6859;
}
.dropdown button:hover .hint,
.dropdown a:hover .hint { color: #dfd2ae; }
.dropdown .checked::before {
  content: "✓";
  position: absolute;
  margin-left: -14px;
  color: var(--teal-600);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 35px;
  padding: 3px 5px;
  background: var(--chrome);
  border-bottom: 1px solid #8e8b7e;
  box-shadow: inset 0 1px 0 var(--chrome-hi);
}

.tool {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--chrome);
  border: 0;
  box-shadow: var(--bevel-out);
  cursor: default;
}
.tool img { width: 15px; height: 15px; image-rendering: pixelated; opacity: .82; }
.tool:hover { background: #ded9c9; }
.tool:active { box-shadow: var(--bevel-in); }
.tool:disabled { opacity: .38; }
.tool:disabled img { opacity: .55; }

.toolbar__sep {
  width: 2px;
  height: 24px;
  margin: 0 3px;
  border-left: 1px solid var(--chrome-lo);
  border-right: 1px solid var(--chrome-hi);
}

.addressbar {
  flex: 1;
  min-width: 0;
  height: 23px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  background: #f7f1df;
  border: 1px solid var(--chrome-lo);
  box-shadow:
    inset 1px 1px 0 #5c5a50,
    inset -1px -1px 0 #fffdf3,
    inset 2px 2px 0 #b9b5a7;
  color: #2f2d25;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.addressbar .lock { color: var(--green-ok); font-size: 11px; flex: none; }
.addressbar b { font-weight: 400; color: var(--teal-700); }
.addressbar .path { overflow: hidden; text-overflow: ellipsis; }

.window__body {
  position: relative;
  margin: 3px;
  border-top: 1px solid var(--chrome-lo);
  border-left: 1px solid var(--chrome-lo);
  border-right: 1px solid var(--chrome-hi);
  border-bottom: 1px solid var(--chrome-hi);
  background: var(--paper);
  background-image: url("../img/paper.png");
  background-size: 240px 240px;
}

.statusbar {
  display: flex;
  align-items: stretch;
  gap: 3px;
  padding: 2px 3px 3px;
  font-size: 10px;
  color: #2b2921;
}
.statusbar > span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 19px;
  padding: 1px 7px;
  background: var(--chrome);
  box-shadow: var(--bevel-thin-in);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.statusbar > span.grow { flex: 1; }
.statusbar img { width: 12px; height: 12px; image-rendering: pixelated; opacity: .7; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 12px;
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo),
    2px 2px 0 rgba(4, 20, 17, .2);
  color: #1b1a15;
  font: 11px/1.2 var(--pixel);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
}
.btn img { width: 15px; height: 15px; image-rendering: pixelated; }
.btn:hover { background: #ded9c9; }
.btn:active { box-shadow: inset 1px 1px 0 var(--chrome-lo), inset -1px -1px 0 var(--chrome-hi); transform: translate(1px, 1px); }

.btn--primary {
  background: linear-gradient(#2e6859, #1b4b41);
  color: #fbf2d9;
  border-color: #071f1a;
  box-shadow:
    inset 0 0 0 1px #8ba28a,
    inset 0 0 0 2px #245a4d,
    2px 2px 0 rgba(4, 20, 17, .28);
  text-shadow: 0 1px 0 #000;
}
.btn--primary:hover { background: linear-gradient(#3b7c6a, #20584b); }
.btn--primary img { filter: brightness(0) invert(1); opacity: .9; }
.btn--ghost {
  background: transparent;
  border: 1px dashed var(--gold-lo);
  box-shadow: none;
  color: var(--teal-700);
}
.btn--ghost:hover { background: rgba(201, 168, 106, .14); }
.btn--go {
  min-height: 23px;
  height: 23px;
  padding: 0 9px;
  font-size: 10px;
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo);
}

/* ------------------------------------------------------------------ taskbar */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 4px 6px;
  background: linear-gradient(#d8d5c8 0%, #cbc8bb 48%, #bfbcaf 100%);
  border-top: 1px solid var(--chrome-hi);
  box-shadow: 0 -1px 0 var(--chrome-lo), 0 -2px 0 #a3a094;
  font-size: 11px;
  user-select: none;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px 0 8px;
  flex: none;
  background: var(--chrome);
  border: 0;
  box-shadow: var(--bevel-out);
  color: #1a1914;
  font: 12px/1 var(--pixel);
  letter-spacing: .04em;
  cursor: default;
}
.start-btn img { width: 19px; height: 19px; image-rendering: pixelated; }
.start-btn:hover { background: #ded9c9; }
.start-btn[aria-expanded="true"] { box-shadow: var(--bevel-in); background: #d5d0c0; }

.taskbar__div {
  width: 2px;
  height: 30px;
  margin: 0 2px;
  border-left: 1px solid var(--chrome-lo);
  border-right: 1px solid var(--chrome-hi);
}

.quick {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.quick button,
.quick a {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: default;
}
.quick button:hover,
.quick a:hover { border-color: var(--chrome-hi) var(--chrome-lo) var(--chrome-lo) var(--chrome-hi); }
.quick button:active,
.quick a:active { border-color: var(--chrome-lo) var(--chrome-hi) var(--chrome-hi) var(--chrome-lo); }
.quick img { width: 17px; height: 17px; image-rendering: pixelated; opacity: .82; }

.task-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  min-width: 0;
  max-width: 190px;
  padding: 0 9px;
  flex: 0 1 auto;
  background: var(--chrome);
  border: 0;
  box-shadow: var(--bevel-out);
  color: #1a1914;
  font: 11px/1 var(--pixel);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  cursor: default;
}
.task-btn img { width: 15px; height: 15px; flex: none; image-rendering: pixelated; }
.task-btn:hover { background: #ded9c9; }
.task-btn.is-active {
  background: #cfcabb;
  box-shadow: var(--bevel-in);
  font-weight: 400;
}
.task-btn.is-active::after {
  content: "";
  width: 3px;
  height: 3px;
  margin-left: 3px;
  background: var(--teal-700);
  box-shadow: 0 0 0 1px #efe9d8;
}

.taskbar__spacer { flex: 1 1 auto; min-width: 6px; }

.vdesks {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  padding: 0 4px;
  flex: none;
}
.vdesk {
  width: 30px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow: inset 1px 1px 0 var(--chrome-hi), inset -1px -1px 0 var(--chrome-lo);
  color: #3d392d;
  font: 10px/1 var(--pixel);
  text-decoration: none;
  cursor: default;
}
.vdesk:hover { background: #ded9c9; }
.vdesk.is-active {
  background: var(--teal-700);
  border-color: #06241f;
  box-shadow: inset 1px 1px 0 #0a2620, inset -1px -1px 0 #7c9a83;
  color: var(--gold-hi);
}

.tray {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 2px 8px;
  flex: none;
  background: var(--chrome);
  box-shadow: var(--bevel-thin-in);
}
.tray img { width: 15px; height: 15px; image-rendering: pixelated; opacity: .72; }
.tray .badge {
  padding: 1px 5px;
  background: var(--teal-800);
  color: var(--gold-hi);
  font-size: 8px;
  letter-spacing: .14em;
  box-shadow: inset 0 0 0 1px #496e5d;
}
.clock {
  min-width: 62px;
  padding: 0 2px;
  text-align: center;
  color: #1b1a15;
  font-size: 10px;
  line-height: 1.4;
  cursor: default;
}
.clock b { display: block; font-weight: 400; font-size: 11px; }

/* ------------------------------------------------------------------ start menu */
.startmenu {
  position: fixed;
  left: 5px;
  bottom: 47px;
  z-index: 1001;
  display: none;
  width: 278px;
  max-height: calc(100vh - 54px);
  overflow: auto;
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo),
    3px 3px 0 rgba(0, 0, 0, .32),
    0 18px 40px rgba(0, 0, 0, .35);
}
.startmenu.is-open { display: flex; }

.startmenu__band {
  width: 28px;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 0;
  background: linear-gradient(180deg, #2d6658 0%, #123c34 55%, #0a2621 100%);
  border-right: 1px solid var(--chrome-hi);
  color: #e9d6a8;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  letter-spacing: .28em;
  text-shadow: 0 1px 0 #000;
}
.startmenu__band b { font-weight: 400; color: #fbf1d2; }

.startmenu__list {
  flex: 1;
  min-width: 0;
  padding: 3px;
  display: flex;
  flex-direction: column;
}
.startmenu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 33px;
  padding: 3px 8px;
  border: 0;
  background: transparent;
  color: #1a1914;
  font: 12px/1.2 var(--pixel);
  text-align: left;
  text-decoration: none;
  cursor: default;
}
.startmenu__item img { width: 18px; height: 18px; flex: none; image-rendering: pixelated; opacity: .85; }
.startmenu__item small {
  margin-left: auto;
  font-size: 9px;
  color: #7b7461;
  letter-spacing: .04em;
}
.startmenu__item:hover,
.startmenu__item:focus-visible {
  background: var(--teal-700);
  color: #fff8e4;
  outline: none;
}
.startmenu__item:hover img,
.startmenu__item:focus-visible img { filter: brightness(0) invert(1); }
.startmenu__item:hover small,
.startmenu__item:focus-visible small { color: #d8cba8; }
.startmenu__sep {
  height: 1px;
  margin: 3px 5px;
  background: var(--chrome-lo);
  border-bottom: 1px solid var(--chrome-hi);
}
.startmenu__foot {
  display: flex;
  gap: 2px;
  margin-top: auto;
  padding: 3px;
  border-top: 1px solid var(--chrome-lo);
  box-shadow: inset 0 1px 0 var(--chrome-hi);
}
.startmenu__foot button {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 7px;
  border: 0;
  background: transparent;
  font: 10px/1 var(--pixel);
  color: #2a2821;
  cursor: default;
}
.startmenu__foot button:hover { background: var(--teal-700); color: #fff8e4; }
.startmenu__foot img { width: 14px; height: 14px; image-rendering: pixelated; opacity: .8; }

/* ------------------------------------------------------------------ terminal */
.terminal {
  position: fixed;
  left: 50%;
  top: 13%;
  z-index: 1060;
  display: none;
  flex-direction: column;
  width: min(540px, calc(100vw - 24px));
  height: 330px;
  transform: translateX(-50%);
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo),
    5px 5px 0 rgba(0, 0, 0, .3),
    0 26px 60px rgba(0, 0, 0, .4);
}
.terminal.is-open { display: flex; }

.terminal .titlebar {
  background: linear-gradient(90deg, #6f2c47 0%, #a95177 60%, #bd6a8c 100%);
  border-top-color: #d18aa7;
}

.terminal__screen {
  flex: 1;
  min-height: 0;
  margin: 3px;
  padding: 10px 12px;
  overflow: auto;
  background: #fbf4e0;
  border: 1px solid var(--chrome-lo);
  box-shadow: inset 1px 1px 0 #5c5a50, inset 2px 2px 0 #c9c5b6;
  color: #1e1d18;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.terminal__menubar {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 21px;
  padding: 0 9px;
  background: var(--chrome);
  border-bottom: 1px solid #8e8b7e;
  color: #2a2821;
  font-size: 10px;
}
.terminal__menubar span { opacity: .8; }
.terminal__screen .dim { color: #6d6654; }
.terminal__screen .ok { color: #2b6b57; }
.terminal__screen .warn { color: #963f37; }
.terminal__form { display: flex; align-items: baseline; gap: 0; }
.terminal__prompt { color: var(--teal-700); }
.terminal__input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e1d18;
  font: inherit;
  outline: none;
  caret-color: #1e1d18;
}
.terminal__hint {
  margin-top: 8px;
  color: #7d7460;
  font-size: 10px;
}

/* ------------------------------------------------------------------ modal */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(4, 19, 16, .42);
}
.overlay.is-open { display: grid; }

.dialog {
  width: min(440px, 100%);
  max-height: min(80vh, 620px);
  display: flex;
  flex-direction: column;
  background: var(--chrome);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 var(--chrome-hi),
    inset -1px -1px 0 var(--chrome-lo),
    4px 4px 0 rgba(0, 0, 0, .3),
    0 28px 60px rgba(0, 0, 0, .4);
}
.dialog__body {
  margin: 3px;
  padding: 18px 20px;
  overflow: auto;
  background: var(--paper);
  background-image: url("../img/paper.png");
  background-size: 240px 240px;
  border: 1px solid var(--chrome-lo);
  box-shadow: inset 1px 1px 0 #5c5a50;
}
.dialog__body h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--teal-800);
}
.dialog__body p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.dialog__body a { color: var(--teal-600); }
.dialog__body ul { margin: 0 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.8; }
.dialog__body .fine { font-size: 10px; color: var(--muted); }
.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 3px 5px 5px;
}

/* ------------------------------------------------------------------ helpers */
.toast {
  position: fixed;
  right: 18px;
  bottom: 56px;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 36px));
  padding: 6px 11px;
  background: var(--paper);
  border: 1px solid var(--black);
  box-shadow:
    inset 1px 1px 0 #fffdf2,
    inset -1px -1px 0 #9a917a,
    3px 3px 0 rgba(0, 0, 0, .24);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 11px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity .1s steps(2, end), transform .1s steps(2, end);
}
.toast.is-on { opacity: 1; transform: none; }
.toast::before { content: "▣ "; color: var(--teal-600); }

body.modal-open { overflow: hidden; }

body.crt .desktop::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(6, 20, 17, .16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
[hidden] { display: none !important; }

.y2k { image-rendering: pixelated; }

@media (pointer: fine) {
  body, .btn, .tool, .task-btn, .start-btn, .menu > button, .tbtn { cursor: url("../img/cursors/arrow.png") 1 1, default; }
  a, button, summary, .slot { cursor: url("../img/cursors/hand.png") 8 2, pointer; }
}

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