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

:root {
  --paper: #f3e9d6;
  --paper-deep: #e9dcc3;
  --ink: #1d2438;
  --ink-soft: #4a5068;
  --coral: #f25c4a;
  --teal: #1f8a8c;
  --teal-deep: #14595b;
  --win: #fbf5e9;
  --bevel-light: #fffdf7;
  --bevel-dark: #b9a98a;
  --ff-chrome: "VT323", monospace;
  --ff-body: "Atkinson Hyperlegible", sans-serif;
  --ff-mono: "IBM Plex Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* strong ease-out — UI enters want punch, not mush */
  --ease-strong: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── batman-jazz theme (taskbar toggle / `theme` command) ── */
[data-theme="batman"] {
  --paper: #0b0e16; /* near-black room */
  --paper-deep: #141a28;
  --ink: #e8ecf5; /* light text on dark */
  --ink-soft: #93a0bd; /* steel-blue midtone */
  --coral: #e85a9c; /* neon-pink accent */
  --teal: #6aa2b8; /* steel-blue */
  --teal-deep: #3f7a8c;
  --win: #10141f;
  --bevel-light: #262f44;
  --bevel-dark: #05070c;
}
/* the real wallpaper, behind a scrim tuned to keep windows legible */
[data-theme="batman"] body {
  background:
    linear-gradient(rgba(8, 10, 18, 0.62), rgba(8, 10, 18, 0.8)),
    url("../assets/batman-jazz.jpg") center / cover no-repeat fixed;
}
[data-theme="batman"] #wallpaper {
  display: none; /* photo replaces the halftone canvas in this theme */
}
/* the terminal normally inverts to a dark box; on already-dark themes
   (batman, or any dark swatchbook palette) match the other windows instead */
[data-theme="batman"] .term-body,
[data-variant="dark"] .term-body {
  background: var(--win);
  color: var(--ink);
}
[data-theme="batman"] #term-input,
[data-variant="dark"] #term-input {
  color: var(--ink);
}
/* faint labels use --bevel-dark, which is near-black here — lift them so they
   stay readable without touching the bevel shadows that also use it */
[data-theme="batman"] .section-label,
[data-theme="batman"] .monhead,
[data-theme="batman"] .pkghead,
[data-theme="batman"] .mail-field span,
[data-theme="batman"] .sd-fine,
[data-variant="dark"] .section-label,
[data-variant="dark"] .monhead,
[data-variant="dark"] .pkghead,
[data-variant="dark"] .mail-field span,
[data-variant="dark"] .sd-fine {
  color: var(--ink-soft);
}

html {
  scroll-behavior: auto;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

em {
  font-style: normal;
  color: var(--coral);
}

/* ── wallpaper + CRT ── */
#wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.crt {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(29, 36, 56, 0.04) 0px,
    rgba(29, 36, 56, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}
.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(29, 36, 56, 0.12) 100%
  );
}

/* ── desktop icons ── */
.icons {
  position: fixed;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}
.icon {
  position: absolute;
  will-change: transform;
  pointer-events: all;
  cursor: pointer;
  user-select: none;
}
.icon-float {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.55;
  transition: opacity 0.15s;
  pointer-events: none;
}
.icon:hover .icon-float {
  opacity: 0.9;
}
.icon:hover .icon-label {
  color: var(--coral);
}
.icon-glyph {
  font-size: 2rem;
  line-height: 1;
}
.icon-label {
  font-family: var(--ff-chrome);
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 0 4px;
  transition: color 0.15s;
}

/* ── BOOT ── */
#boot {
  height: 260vh;
  position: relative;
  z-index: 10;
}
.boot-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.boot-screen {
  width: min(680px, 92vw);
  font-family: var(--ff-chrome);
}
.boot-brand {
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 0.9;
  color: var(--ink);
}
.boot-ver {
  font-size: 1.2rem;
  color: var(--coral);
  margin-bottom: 2rem;
}
.boot-log {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink-soft);
  min-height: 14em;
}
.boot-log .ok {
  color: var(--teal-deep);
}
.boot-log .warn {
  color: var(--coral);
}
.boot-log p {
  opacity: 0;
}
.boot-log p.lit {
  opacity: 1;
}
.boot-hint {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--ink-soft);
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.blink {
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ── workspace sections ── */
.ws {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh clamp(1rem, 4vw, 4rem);
}

/* ── window chrome ── */
.window {
  width: min(760px, 100%);
  background: var(--win);
  border: 2px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark),
    8px 8px 0 rgba(29, 36, 56, 0.18);
  will-change: transform;
}
.window.maximized {
  position: fixed;
  inset: 2vh 2vw calc(2vh + 44px);
  width: auto;
  z-index: 80;
  overflow: hidden; /* the body scrolls, not the window frame */
  display: flex;
  flex-direction: column;
}
/* the body grows to fill a maximized window — no cream void below the
   terminal's dark box or any other capped win-body */
.window.maximized .win-body {
  flex: 1;
  max-height: none !important;
  min-height: 0;
  overflow-y: auto;
}
.window.closed {
  display: none;
}
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--teal);
  color: var(--paper);
  padding: 6px 10px;
  border-bottom: 2px solid var(--ink);
}
.tb-title {
  font-family: var(--ff-chrome);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.tb-btns {
  display: flex;
  gap: 6px;
}
.tb-btn {
  font-family: var(--ff-chrome);
  font-size: 1rem;
  width: 26px;
  height: 24px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  line-height: 1;
}
.tb-btn:hover {
  background: var(--coral);
  color: var(--paper);
}
.win-body {
  padding: clamp(1rem, 3vw, 1.8rem);
}

/* ── project gallery ── */
.win-status {
  margin-top: 0.9rem;
  font-family: var(--ff-chrome);
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.section-label {
  font-family: var(--ff-chrome);
  font-size: 1rem;
  color: var(--bevel-dark);
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}
.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}
.poster-card {
  --accent: var(--teal);
  display: flex;
  flex-direction: column;
  min-height: 9.5rem;
  text-align: left;
  background: var(--win);
  border: 1.5px solid var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-light);
  cursor: pointer;
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.poster-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 1px 1px 0 var(--bevel-light), 0 6px 0 -2px var(--accent);
}
.poster-bar {
  display: flex;
  gap: 0.32rem;
  align-items: center;
  padding: 0.42rem 0.55rem;
  background: var(--accent);
}
.poster-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}
.poster-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem 0.75rem;
}
.poster-name {
  font-family: var(--ff-chrome);
  font-size: 1.5rem;
  line-height: 1.05;
  color: var(--ink);
}
.poster-verdict {
  margin-top: auto;
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent);
}
.poster-kind {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ── monitor ── */
.mon-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  max-width: 56ch;
}
.monrow {
  display: grid;
  grid-template-columns: 0.4fr 1.6fr 0.8fr 0.7fr 1.2fr;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  border-bottom: 1px dashed var(--bevel-dark);
  color: var(--ink-soft);
}
.monrow a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.monrow a:hover {
  color: var(--coral);
}
.monhead {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bevel-dark);
}
.mon-loading {
  font-family: var(--ff-chrome);
  font-size: 1.1rem;
  padding: 1rem 0.5rem;
  color: var(--ink-soft);
}
.mon-load {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  font-family: var(--ff-chrome);
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.mon-load em {
  color: var(--teal-deep);
}

/* ── terminal ── */
.term-body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ff-chrome);
  font-size: 1.15rem;
  min-height: 280px;
  max-height: 50vh;
  overflow-y: auto;
  cursor: text;
}
.term-body p {
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body em {
  color: #f8b26a;
}
.term-body a {
  color: #f8b26a;
  text-decoration-color: var(--coral);
}
/* echoed commands read like the live prompt — a coral anchor per block */
.term-echo {
  margin-top: 0.55em;
}
.term-echo .echo-prompt {
  color: var(--coral);
}
.term-echo b {
  font-weight: 400; /* VT323 has no bold — the color split does the work */
}
/* claude mode wears anthropic terracotta */
.term-prompt.claude-prompt,
.claude-echo .echo-prompt {
  color: #da7756;
}
.term-body.claude-on #term-input {
  caret-color: #f0447c; /* the pink block cursor's spiritual heir */
}

/* ── the Claude Code startup TTY, rebuilt ── */
.cc-box {
  position: relative;
  border: 1px solid #c96442;
  border-radius: 6px;
  padding: 0.9em 0.8em 0.7em;
  margin: 0.8em 0 0.4em;
  line-height: 1.35;
}
.cc-box-title {
  position: absolute;
  top: -0.7em;
  left: 12px;
  padding: 0 6px;
  background: var(--ink);
  color: #c96442;
}
[data-theme="batman"] .cc-box-title,
[data-variant="dark"] .cc-box-title {
  background: var(--win);
}
.cc-cols {
  display: flex;
  gap: 0.8em;
}
.cc-left {
  flex: 0 0 38%;
  text-align: center;
  border-right: 1px solid rgba(201, 100, 66, 0.55);
  padding-right: 0.8em;
}
.cc-sprite {
  margin: 0.4em 0;
}
.cc-sprite svg {
  image-rendering: pixelated;
}
.cc-right {
  flex: 1;
  min-width: 0;
}
.cc-h {
  display: block;
  color: #c96442;
}
.cc-rule {
  border-top: 1px solid rgba(201, 100, 66, 0.55);
  margin: 0.45em 0;
}
.cc-dim {
  color: #8b90a0;
}
.cc-warn {
  color: #e5c07b;
  margin: 0.3em 0;
}
.cc-status {
  margin: 0.4em 0 0.6em;
  line-height: 1.4;
}
.cc-row {
  display: flex;
  gap: 0.7em;
}
.cc-k {
  color: #c96442;
  min-width: 4.5em;
}
.cc-rc {
  margin-left: auto;
  color: #98c379;
}
.cc-bar {
  display: inline-block;
  width: 9em;
  height: 0.55em;
  border: 1px solid #c96442;
  vertical-align: middle;
}
.cc-bar-fill {
  display: block;
  height: 100%;
  background: #c96442;
}
.cc-bypass {
  color: #f0447c;
  margin-top: 0.2em;
}
@media (max-width: 720px) {
  .cc-cols {
    flex-direction: column;
  }
  .cc-left {
    border-right: none;
    padding-right: 0;
  }
}
.term-line {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.term-prompt {
  color: var(--coral);
  white-space: nowrap;
}
#term-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--paper);
  font-family: var(--ff-chrome);
  font-size: 1.15rem;
  caret-color: var(--coral);
}

/* ── about ── */
.about-body {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
}
.about-seal {
  width: clamp(110px, 18vw, 170px);
  image-rendering: auto;
  border: 2px solid var(--ink);
  background: var(--paper-deep);
  flex-shrink: 0;
}
.about-name {
  font-family: var(--ff-chrome);
  font-size: 2.6rem;
  line-height: 1;
}
.about-sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.spec-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.spec-table dt {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-deep);
}
.spec-table dd {
  color: var(--ink-soft);
}
.about-copy {
  font-size: 0.95rem;
  max-width: 52ch;
}

/* ── mail ── */
.mail-field {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--bevel-dark);
  font-size: 0.95rem;
}
.mail-field span {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--bevel-dark);
  width: 4.5em;
}
.mail-field a {
  color: var(--teal-deep);
  text-decoration-style: wavy;
  text-decoration-color: var(--coral);
}
.mail-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.mail-draft {
  padding: 1.2rem 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.mail-send {
  display: inline-block;
  font-family: var(--ff-chrome);
  font-size: 1.3rem;
  background: var(--coral);
  color: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(29, 36, 56, 0.25);
  padding: 0.3em 1.2em;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.mail-send:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(29, 36, 56, 0.25);
}

/* ── shutdown ── */
.shutdown-dialog {
  background: var(--win);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(29, 36, 56, 0.18);
  padding: 2.2rem 2.5rem;
  text-align: center;
  max-width: 460px;
}
.sd-title {
  font-family: var(--ff-chrome);
  font-size: 2rem;
  margin-bottom: 0.6rem;
}
.sd-body {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.sd-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.sd-btn {
  font-family: var(--ff-chrome);
  font-size: 1.25rem;
  padding: 0.3em 1.4em;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(29, 36, 56, 0.25);
}
.sd-btn:hover {
  background: var(--coral);
  color: var(--paper);
  transform: translate(-1px, -1px);
}
.sd-fine {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--bevel-dark);
}

/* ── taskbar ── */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 10px;
  background: var(--paper-deep);
  border-top: 2px solid var(--ink);
  font-family: var(--ff-chrome);
}
.tb-start {
  font-family: var(--ff-chrome);
  font-size: 1.15rem;
  background: var(--teal);
  color: var(--paper);
  border: 2px solid var(--ink);
  padding: 1px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(29, 36, 56, 0.3);
}
.tb-start:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}
.tb-progress {
  flex: 1;
  height: 14px;
  border: 2px solid var(--ink);
  background: var(--win);
}
.tb-progress-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    var(--teal) 0 8px,
    var(--teal-deep) 8px 16px
  );
}
.tb-tray {
  display: flex;
  gap: 6px;
}
.tb-app {
  font-family: var(--ff-chrome);
  font-size: 0.95rem;
  background: var(--win);
  border: 2px solid var(--ink);
  padding: 0 8px;
  cursor: pointer;
}
.tb-app:hover {
  background: var(--coral);
  color: var(--paper);
}
.tb-theme {
  font-family: var(--ff-chrome);
  font-size: 0.95rem;
  background: var(--win);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0 8px;
  cursor: pointer;
}
.tb-theme:hover {
  background: var(--coral);
  color: var(--paper);
}
.tb-clock {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ── toast ── */
.os-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 95;
  max-width: 320px;
  background: var(--win);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(29, 36, 56, 0.2);
  padding: 0.7rem 1rem;
  font-family: var(--ff-chrome);
  font-size: 1.05rem;
  color: var(--ink);
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.os-toast.visible {
  opacity: 1;
  transform: none;
}

/* ── overlay ── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(29, 36, 56, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.overlay.open {
  display: flex;
}
.overlay-win {
  width: min(560px, 100%);
}
.ov-name {
  font-family: var(--ff-chrome);
  font-size: 2.2rem;
  line-height: 1;
}
.ov-voice {
  color: var(--coral);
  font-style: italic;
  margin: 0.4rem 0 1rem;
}
.ov-body {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.ov-meta {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* ── BSOD ── */
.bsod {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--teal-deep);
  color: var(--paper);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
}
.bsod.on {
  display: flex;
}
.bsod-inner {
  max-width: 560px;
  font-family: var(--ff-chrome);
  font-size: 1.3rem;
  line-height: 1.6;
}
.bsod-face {
  font-size: 5rem;
  margin-bottom: 1rem;
}
.bsod-code {
  margin-top: 1.5rem;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  opacity: 0.8;
}
.bsod-pct {
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

/* ── seal takeover ── */
.seal-takeover {
  position: fixed;
  bottom: -60vh;
  left: 50%;
  width: min(60vw, 420px);
  transform: translateX(-50%);
  z-index: 150;
  pointer-events: none;
  animation: seal-peek 4s var(--ease) forwards;
}
@keyframes seal-peek {
  0% { bottom: -60vh; transform: translateX(-50%) rotate(-6deg); }
  35% { bottom: -6vh; transform: translateX(-50%) rotate(2deg); }
  65% { bottom: -6vh; transform: translateX(-50%) rotate(-2deg); }
  100% { bottom: -60vh; transform: translateX(-50%) rotate(4deg); }
}

/* ── mafia night phase (type "mafia") — tokens from llm-mafia.vercel.app:
      shell blacks, neon red, gold verdicts, film grain, JetBrains Mono ── */
.mafia-dim {
  position: fixed;
  inset: 0;
  z-index: 92;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E"),
    radial-gradient(
      ellipse at center,
      rgba(5, 6, 9, 0.72) 40%,
      rgba(196, 30, 30, 0.14) 100%
    ),
    rgba(5, 6, 9, 0.72);
  opacity: 1;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.mafia-panel {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 94;
  width: min(600px, 92vw);
  background: #0a0b10;
  border: 1px solid #1b1d26;
  box-shadow:
    0 0 46px rgba(255, 42, 42, 0.18),
    0 18px 60px rgba(0, 0, 0, 0.6);
  transition: opacity 0.45s ease;
}
.mafia-dim.out,
.mafia-panel.out {
  opacity: 0;
}
.mp-dots {
  display: flex;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid #1b1d26;
}
.mp-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2d38;
}
.mp-dots span.on {
  background: #ff2a2a;
  box-shadow: 0 0 8px rgba(255, 42, 42, 0.6);
}
.mp-body {
  padding: 16px 18px 18px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #e7e9ee;
}
.mp-body p {
  margin: 0 0 0.55em;
  opacity: 0;
  animation: mp-in 0.3s ease forwards;
}
@keyframes mp-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.mp-comment {
  color: #8b8f9c;
}
.mp-votes {
  letter-spacing: 0.2em;
  color: #8b8f9c;
}
.mp-bar {
  display: inline-block;
  width: 56px;
  height: 0.6em;
  background: #12141c;
  vertical-align: middle;
  overflow: hidden;
}
.mp-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: #ff2a2a;
  animation: mp-fill 0.8s ease-out 0.2s forwards;
}
.mp-bar-w span {
  background: #e7e9ee;
  animation-name: mp-fill-w;
}
@keyframes mp-fill {
  to {
    width: 80%;
  }
}
@keyframes mp-fill-w {
  to {
    width: 20%;
  }
}
.mp-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 42, 42, 0.65);
}
.mp-verdict {
  color: #e0a000;
  letter-spacing: 0.08em;
}

/* ── clawd takeover (type "claude") — pixel sprites don't rotate,
      they rise, hop twice, and leave ── */
.clawd-takeover {
  position: fixed;
  right: 7vw;
  bottom: -40vh;
  width: min(32vw, 240px);
  z-index: 150;
  pointer-events: none;
  animation: clawd-peek 4.6s var(--ease) forwards;
}
.clawd-takeover canvas {
  width: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
@keyframes clawd-peek {
  0% { bottom: -40vh; }
  26% { bottom: 1vh; }
  38% { transform: translateY(0); }
  44% { transform: translateY(-14px); }
  50% { transform: translateY(0); }
  56% { transform: translateY(-14px); }
  62% { transform: translateY(0); }
  80% { bottom: 1vh; }
  100% { bottom: -40vh; }
}

/* ════════════════════════════════════════════════
   v3 DESKTOP SESSION — real windows on a real stage
   ════════════════════════════════════════════════ */

/* app + doc icons are <button>s — undo the button chrome, keep the icon look */
.app-icon,
.icon.doc {
  background: none;
  border: none;
  font: inherit;
  padding: 0;
  transition: transform 120ms var(--ease-strong);
}
.app-icon .icon-float,
.icon.doc .icon-float {
  opacity: 0.8;
}
.app-icon:hover .icon-float,
.icon.doc:hover .icon-float {
  opacity: 1;
}
.app-icon:active,
.icon.doc:active {
  transform: scale(0.97);
}

/* selection — click an icon, or marquee an empty patch of desk */
.icon.selected .icon-label {
  background: var(--teal);
  color: var(--paper);
}
.icon.selected .icon-float {
  opacity: 1;
}
.icon.dragged .icon-float {
  opacity: 1;
}
.icon.dragged {
  z-index: 15;
}
.marquee {
  position: fixed;
  z-index: 14;
  border: 1.5px dashed var(--teal);
  background: rgba(31, 138, 140, 0.12);
  pointer-events: none;
}
/* while a marquee is live, nothing on the page is text-selectable */
body.marqueeing,
body.marqueeing * {
  user-select: none;
}
.app-icon.trash-hot .icon-glyph {
  display: inline-block;
  transform: scale(1.35);
  transition: transform 120ms var(--ease-strong);
}
.app-icon.trash-hot .icon-label {
  color: var(--coral);
}

/* desktop mode: workspace sections empty out, the stage takes over */
body.desktop .ws,
body.desktop #ws-shutdown {
  display: none;
}
/* once booted, the boot screen stops shining through the stage */
body.booted #boot {
  visibility: hidden;
}
#stage {
  position: fixed;
  inset: 0 0 44px 0;
  z-index: 12;
  display: none;
  pointer-events: none;
}
body.booted #stage.on {
  display: block;
}
body.desktop #stage .window {
  position: absolute;
  pointer-events: auto;
  width: min(720px, 72vw);
}
body.desktop #stage .window .win-body {
  max-height: 58vh;
  overflow-y: auto;
}
body.desktop .titlebar {
  cursor: grab;
  user-select: none;
}
body.desktop .window.dragging {
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark),
    14px 16px 0 rgba(29, 36, 56, 0.24);
}
body.desktop .window.dragging .titlebar {
  cursor: grabbing;
}
/* unfocused windows dim their titlebar — the OS knows where you are */
body.desktop .window.inactive .titlebar {
  background: var(--ink-soft);
}
/* the #stage selector above out-specifies plain .maximized — match it */
body.desktop #stage .window.maximized {
  position: fixed;
  inset: 2vh 2vw calc(2vh + 44px);
  width: auto;
}
body.desktop #stage .window.maximized .win-body {
  max-height: none;
}

/* taskbar app switcher */
.tb-task {
  font-family: var(--ff-chrome);
  font-size: 0.95rem;
  background: var(--win);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0 8px;
  cursor: pointer;
  transition: transform 120ms var(--ease-strong), opacity 150ms ease;
}
.tb-task[data-state="closed"] {
  opacity: 0.5;
}
.tb-task[data-state="min"] {
  border-style: dashed;
}
.tb-task.active {
  background: var(--teal);
  color: var(--paper);
}
.tb-task:hover {
  opacity: 1;
}
.tb-task:active {
  transform: scale(0.96);
}
body.booted .tb-progress-fill {
  width: 100%;
}

/* start menu — anchored to its trigger, grows from the bottom-left */
.start-menu {
  position: fixed;
  left: 8px;
  bottom: 52px;
  z-index: 96;
  min-width: 240px;
  background: var(--win);
  border: 2px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    8px 8px 0 rgba(29, 36, 56, 0.2);
  padding: 0.4rem 0;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transform-origin: 12% 100%;
  pointer-events: none;
  transition:
    opacity 160ms var(--ease-strong),
    transform 160ms var(--ease-strong);
}
.start-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.sm-head {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 0.2rem 0.9rem 0.4rem;
}
.sm-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--ff-chrome);
  font-size: 1.2rem;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0.28rem 0.9rem;
  cursor: pointer;
}
.sm-item:hover {
  background: var(--teal);
  color: var(--paper);
}
.sm-item:active {
  transform: scale(0.98);
}
.sm-danger:hover {
  background: var(--coral);
}
.sm-rule {
  border-top: 1px dashed var(--bevel-dark);
  margin: 0.35rem 0;
}

/* theme picker — same chrome as the start menu, anchored to ◐ theme */
.theme-menu {
  position: fixed;
  right: 56px;
  bottom: 52px;
  z-index: 96;
  min-width: 230px;
  max-height: min(60vh, 480px);
  overflow-y: auto;
  background: var(--win);
  border: 2px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    8px 8px 0 rgba(29, 36, 56, 0.2);
  padding: 0.4rem 0;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transform-origin: 88% 100%;
  pointer-events: none;
  transition:
    opacity 160ms var(--ease-strong),
    transform 160ms var(--ease-strong);
}
.theme-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tm-mark {
  color: var(--coral);
}
.tm-current {
  color: var(--coral);
}
.tm-variant {
  float: right;
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 0.35em;
}
.sm-item:hover .tm-variant {
  color: var(--paper);
}
.tm-loading {
  font-family: var(--ff-chrome);
  font-size: 1rem;
  color: var(--ink-soft);
  padding: 0.3rem 0.9rem;
}

/* shutdown modal shell (desktop) */
.sd-modal {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(29, 36, 56, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.sd-modal.open {
  display: flex;
}

/* breakpkg */
.pkgrow {
  display: grid;
  grid-template-columns: 1fr 0.9fr 0.7fr 0.9fr;
  gap: 0.1rem 0.5rem;
  padding: 0.45rem 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  border-bottom: 1px dashed var(--bevel-dark);
  color: var(--ink-soft);
  text-decoration: none;
}
.pkghead {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bevel-dark);
}
.pkg-name {
  color: var(--ink);
  font-weight: 500;
}
a.pkgrow:hover .pkg-name {
  color: var(--coral);
}
.pkg-chan {
  color: var(--teal-deep);
}
.pkg-desc {
  grid-column: 1 / -1;
  font-size: 0.7rem;
}

/* dragged file ghost */
.file-ghost {
  position: fixed;
  z-index: 170;
  pointer-events: none;
  opacity: 0.92;
  transform: rotate(2deg);
  box-shadow: 10px 12px 0 rgba(29, 36, 56, 0.22);
}

/* f1 start lights (type "f1") — apex's design language, on loan:
   near-black panel, hairline rules, race red, Outfit display type */
.f1-lights {
  position: fixed;
  top: 9vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  pointer-events: none;
}
.f1-lights.on {
  display: flex;
}
.f1-panel {
  background: #070709;
  border: 1px solid rgba(244, 243, 241, 0.08);
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.f1-label {
  font-family: "Outfit", "Helvetica Neue", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 243, 241, 0.55);
}
.f1-row {
  display: flex;
  gap: 12px;
}
.f1-row span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(244, 243, 241, 0.06);
  border: 1px solid rgba(244, 243, 241, 0.1);
  transition: background 60ms linear, box-shadow 140ms var(--ease-strong);
}
.f1-row span.lit {
  background: #d40f0c;
  border-color: #d40f0c;
  box-shadow:
    0 0 22px rgba(212, 15, 12, 0.75),
    inset 0 0 8px rgba(241, 69, 63, 0.8);
}
/* the payoff: an apex hero headline — white on the skewed red bar */
.f1-headline {
  opacity: 0;
}
.f1-headline span {
  display: inline-block;
  font-family: "Outfit", "Helvetica Neue", sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #f4f3f1;
  background: #d40f0c;
  padding: 0.08em 0.35em 0.12em;
  transform: rotate(-1.2deg);
}
.f1-lights.go .f1-headline {
  opacity: 1;
}
.f1-lights.go .f1-headline span {
  animation: f1-sweep 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes f1-sweep {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* press feedback on the pressables that lacked it */
.sd-btn,
.tb-btn,
.poster-card {
  transition-property: transform, box-shadow, background, color;
  transition-duration: 140ms;
  transition-timing-function: var(--ease-strong);
}
.sd-btn:active,
.tb-btn:active {
  transform: scale(0.94);
}
.poster-card:active {
  transform: scale(0.985);
}

/* ── breakOS Mobile ── */
@media (max-width: 720px) {
  .tb-btn[data-act="min"] {
    display: none;
  }
  .icons {
    display: none;
  }
  .ws {
    padding: 8vh 0.8rem;
    min-height: auto;
  }
  .window {
    width: 100%;
  }
  .poster-grid {
    grid-template-columns: 1fr;
  }
  .monrow {
    grid-template-columns: 1.6fr 0.8fr 1.2fr;
  }
  .monrow span:nth-child(1),
  .monrow span:nth-child(4) {
    display: none;
  }
  .about-body {
    flex-direction: column;
  }
  .tb-progress {
    display: none;
  }
  #boot {
    height: 200vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-hint,
  .blink {
    animation: none;
  }
}
