@font-face { font-family: 'Share Tech Mono'; src: url(fonts/sharetechmono.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'VT323'; src: url(fonts/vt323.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Rubik Mono One'; src: url(fonts/rubikmonoone.woff2) format('woff2'); font-display: swap; }

:root {
  /* phosphor palette as "r g b" triplets so alpha can be applied anywhere */
  --ph: 255 136 46;
  --hi: 255 208 164;
  --dim: 168 72 20;
  --deep: 62 22 6;
  --ink: #0b0400;

  --mono: 'Share Tech Mono', ui-monospace, Menlo, monospace;
  --term: 'VT323', ui-monospace, Menlo, monospace;
  --logo: 'Rubik Mono One', 'Arial Black', sans-serif;
  --jp: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', 'Meiryo', sans-serif;

  --glow: 0 0 1px rgb(var(--hi) / .85), 0 0 6px rgb(var(--ph) / .55), 0 0 18px rgb(var(--ph) / .22);
  --inset: clamp(6px, 1.6vmin, 22px);
  --rad: clamp(16px, 3vmin, 34px);
}
:root[data-phosphor='green'] { --ph: 70 255 120; --hi: 205 255 214; --dim: 30 130 60; --deep: 8 42 18; --ink: #010a03; }
:root[data-phosphor='ice']   { --ph: 80 186 255; --hi: 210 236 255; --dim: 30 90 150; --deep: 6 26 46; --ink: #01060c; }
:root[data-phosphor='red']   { --ph: 255 64 52; --hi: 255 196 186; --dim: 150 25 20; --deep: 52 6 6; --ink: #0c0101; }
:root[data-phosphor='white'] { --ph: 228 224 212; --hi: 255 255 250; --dim: 120 118 110; --deep: 34 33 30; --ink: #050505; }
:root[data-phosphor='gold']  { --ph: 255 190 60; --hi: 255 238 186; --dim: 150 100 20; --deep: 54 34 4; --ink: #0b0700; }
:root[data-phosphor='void']  { --ph: 168 112 255; --hi: 230 214 255; --dim: 90 50 160; --deep: 30 10 62; --ink: #06010c; }
:root[data-phosphor='sepia'] { --ph: 214 166 108; --hi: 246 226 192; --dim: 120 86 50; --deep: 52 34 18; --ink: #0a0603; }
:root[data-phosphor='ygg']   { --ph: 96 226 128; --hi: 246 226 150; --dim: 40 120 60; --deep: 10 40 18; --ink: #010a03; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #000; }
body {
  color: rgb(var(--hi));
  font: 13px/1.35 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(120% 90% at 50% 40%, #0c0502 0%, #000 72%);
  -webkit-tap-highlight-color: transparent;
}
::selection { background: rgb(var(--ph)); color: var(--ink); text-shadow: none; }
button { font: inherit; color: inherit; background: none; border: 0; letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-shadow: inherit; }
button:focus-visible, input:focus-visible { outline: 1px dashed rgb(var(--ph)); outline-offset: 2px; }
b { font-weight: inherit; color: rgb(var(--hi)); }

/* ───────────────────────── CRT shell ───────────────────────── */
.crt {
  position: fixed;
  inset: var(--inset);
  border-radius: var(--rad);
  border: 2px solid rgb(var(--ph) / .9);
  box-shadow:
    0 0 2px rgb(var(--hi) / .8),
    0 0 14px rgb(var(--ph) / .55),
    0 0 70px rgb(var(--ph) / .16),
    inset 0 0 2px rgb(var(--hi) / .6),
    inset 0 0 26px rgb(var(--ph) / .32),
    inset 0 0 140px rgb(0 0 0 / .9);
  background:
    linear-gradient(to bottom, rgb(var(--deep) / .55), rgb(var(--deep) / .12) 30%, transparent 55%),
    radial-gradient(120% 100% at 50% 50%, rgb(var(--deep) / .3) 0%, #030100 70%);
  overflow: hidden;
  isolation: isolate;
  animation: flicker 5s infinite steps(1);
}
.crt::before { /* inner bezel line */
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: calc(var(--rad) - 5px);
  border: 1px solid rgb(var(--ph) / .22);
  pointer-events: none;
  z-index: 9;
}

.screen {
  position: absolute;
  inset: clamp(10px, 1.5vw, 20px) clamp(12px, 1.9vw, 28px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  text-shadow: var(--glow);
  filter: blur(.25px);
  z-index: 1;
}

/* ───────────────────────── header ───────────────────────── */
.hdr {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2.4vw;
  padding: 2px 4px 0;
}
.hdr-l { min-width: 0; }
.feed {
  font-size: 11px;
  text-transform: none;
  letter-spacing: .04em;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: .72;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bigcode {
  font-size: clamp(15px, 2vw, 30px);
  letter-spacing: .05em;
  white-space: nowrap;
  transform: scaleY(1.2);
  transform-origin: left center;
}
.logo { display: flex; flex-direction: column; align-items: center; padding: 0 4px; }
.logo-mark {
  font-family: var(--logo);
  font-size: clamp(30px, 4.6vw, 70px);
  line-height: .9;
  letter-spacing: -.07em;
  padding-right: .07em;
  white-space: nowrap;
  text-transform: none;
  color: rgb(var(--hi));
  text-shadow: 0 0 2px rgb(var(--hi)), 0 0 16px rgb(var(--ph) / .75), 0 0 46px rgb(var(--ph) / .35);
}
.logo-mark .lc { font-size: .56em; letter-spacing: -.04em; margin: 0 .04em 0 .02em; }
.logo-mark[data-len='3'] { font-size: clamp(36px, 5.4vw, 84px); }
.logo-base {
  display: block;
  width: 108%;
  height: clamp(7px, .9vw, 12px);
  margin-top: 4px;
  fill: rgb(var(--ph));
  filter: drop-shadow(0 0 6px rgb(var(--ph) / .7));
}
.logo:hover .logo-mark { animation: jit .25s steps(2) 2; }
.hdr-r {
  justify-self: end;
  font-size: clamp(11px, 1.15vw, 17px);
  letter-spacing: .12em;
  white-space: nowrap;
  transform: scaleY(1.15);
}

.rules { display: grid; gap: 4px; margin: 10px -6px 9px; }
.rules i { display: block; height: 2px; background: rgb(var(--ph) / .9); box-shadow: 0 0 8px rgb(var(--ph) / .65); transform-origin: left; }
.rules i + i { height: 1px; opacity: .55; }

.sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 2px 12px;
}
.tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 9px;
  font-size: 14px;
  border: 1.5px solid rgb(var(--ph));
  box-shadow: 0 0 8px rgb(var(--ph) / .45), inset 0 0 10px rgb(var(--ph) / .18);
}
.tag span { opacity: .8; }
.tag-ico { width: 34px; height: 16px; fill: rgb(var(--hi)); stroke: rgb(var(--hi)); filter: drop-shadow(0 0 3px rgb(var(--ph))); }
.kanji { display: flex; align-items: baseline; gap: 6px; font-family: var(--jp); font-weight: 700; letter-spacing: 0; }
.kj-big { font-size: 30px; line-height: 1; color: rgb(var(--hi)); text-shadow: 0 0 2px rgb(var(--hi)), 0 0 12px rgb(var(--ph) / .8); }
.kj-sm { font-size: 15px; }
.kj-sm.alarm { animation: blink .6s steps(2) infinite; }
.uc { font-size: 14px; letter-spacing: .1em; }
.modes { margin-left: auto; display: flex; gap: 6px; }
.modes button {
  padding: 3px 10px 3px 4px;
  border: 1px solid rgb(var(--ph) / .38);
  opacity: .72;
  transition: opacity .15s;
}
.modes button span { display: inline-block; padding: 0 5px; margin-right: 7px; background: rgb(var(--ph) / .22); }
.modes button:hover { opacity: 1; }
.modes button.on {
  opacity: 1;
  color: var(--ink);
  text-shadow: none;
  background: rgb(var(--hi));
  border-color: rgb(var(--hi));
  box-shadow: 0 0 14px rgb(var(--ph) / .7);
}
.modes button.on span { background: rgb(var(--ph) / .5); }

/* ───────────────────────── body grid ───────────────────────── */
.body {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) minmax(230px, 310px);
  gap: 14px;
  min-height: 0;
}
.col { display: flex; flex-direction: column; gap: 7px; min-height: 0; overflow: hidden; font-size: 12px; }
.col-h {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgb(var(--ph));
  border-bottom: 1px solid rgb(var(--ph) / .35);
  padding-bottom: 3px;
  margin-top: 4px;
}
.col-h:first-child { margin-top: 0; }
.rec { color: rgb(var(--hi)); }
.ro > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 0; }
.ro dt { opacity: .58; }
.ro dd { display: flex; align-items: center; gap: 8px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { display: block; width: 64px; height: 9px; padding: 1px; border: 1px solid rgb(var(--ph) / .6); }
.bar i {
  display: block;
  height: 100%;
  width: var(--v, 50%);
  background: repeating-linear-gradient(90deg, rgb(var(--hi)) 0 4px, transparent 4px 6px);
  box-shadow: 0 0 6px rgb(var(--ph) / .6);
  transition: width .4s steps(4);
}
.spark { width: 100%; height: 46px; overflow: visible; }
.spark polyline { fill: none; stroke: rgb(var(--hi)); stroke-width: 1.4; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px rgb(var(--ph))); }
.spark-mid { stroke: rgb(var(--ph) / .3); stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.col-foot { margin-top: 10px; font-size: 10px; line-height: 1.5; opacity: .38; }

/* viewport */
.vp {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(var(--ph) / .22);
  background:
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top left / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top left / 2px 16px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top right / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top right / 2px 16px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom left / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom left / 2px 16px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom right / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom right / 2px 16px no-repeat,
    radial-gradient(90% 80% at 50% 50%, rgb(var(--deep) / .28), transparent 75%);
}
.vp > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }
.vp[data-mode='signal'] > canvas { touch-action: none; }
.vp.hot > canvas { cursor: pointer; }
.vp-c { position: absolute; padding: 7px 10px; font-size: 11px; pointer-events: none; opacity: .85; white-space: nowrap; }
.vp-c.tl { top: 0; left: 0; color: rgb(var(--ph)); }
.vp-c.tr { top: 0; right: 0; text-align: right; }
.vp-c.bl { bottom: 0; left: 0; opacity: .6; }
.vp-c.br { bottom: 0; right: 0; opacity: .6; }
.vp[data-mode='timeline'] .vp-c.bl,
.vp[data-mode='timeline'] .vp-c.br { bottom: 26px; }
.vp.flash { animation: flash .3s ease-out; }

.files {
  position: absolute;
  inset: 34px 14px 32px;
  display: grid;
  grid-template-columns: minmax(190px, 38%) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px 18px;
}
.files[hidden] { display: none; }
.files-list { list-style: none; overflow-y: auto; padding-right: 12px; border-right: 1px dashed rgb(var(--ph) / .3); scrollbar-width: none; }
.files-list button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 10px;
  padding: 6px 8px;
  margin-bottom: 4px;
  text-align: left;
  border: 1px solid transparent;
}
.files-list button:hover { border-color: rgb(var(--ph) / .4); }
.files-list button.on { border-color: rgb(var(--ph) / .8); background: rgb(var(--ph) / .1); box-shadow: inset 0 0 12px rgb(var(--ph) / .15); }
.files-list .fid { color: rgb(var(--ph)); }
.files-list .fst { grid-column: 2; font-size: 10px; opacity: .55; }
.files-list .lock { opacity: .55; }
.files-list .lock .fid { letter-spacing: 0; }
.arch-tabs { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid rgb(var(--ph) / .3); }
.arch-tabs button { padding: 2px 9px; font-size: 11px; border: 1px solid rgb(var(--ph) / .3); opacity: .75; }
.arch-tabs button:hover { opacity: 1; }
.arch-tabs button.on { opacity: 1; color: var(--ink); text-shadow: none; background: rgb(var(--hi)); border-color: rgb(var(--hi)); }
.files-read {
  overflow-y: auto;
  scrollbar-width: none;
  font-family: var(--term);
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.22;
  letter-spacing: .05em;
  white-space: pre-wrap;
  padding-right: 6px;
}
.files-read .k { color: rgb(var(--ph)); }
.files-read .h { font-size: 1.25em; }
.red { background: rgb(var(--hi)); color: transparent !important; text-shadow: none; box-shadow: 0 0 6px rgb(var(--ph) / .6); user-select: none; }
.cur::after { content: '▮'; animation: blink 1s steps(2) infinite; font-family: var(--mono); }

.decode {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(580px, 88%);
  transform: translate(-50%, -50%);
  padding: 16px 22px 20px;
  background: rgb(3 1 0 / .9);
  border: 1.5px solid rgb(var(--hi));
  box-shadow: 0 0 26px rgb(var(--ph) / .4), inset 0 0 22px rgb(var(--ph) / .16);
  cursor: pointer;
  animation: vpOn .35s ease-out both;
}
.decode[hidden] { display: none; }
.decode h3 { display: flex; justify-content: space-between; margin-bottom: 12px; font: 12px var(--mono); letter-spacing: .1em; color: rgb(var(--ph)); }
.decode p { font-family: var(--term); font-size: clamp(22px, 2.3vw, 32px); line-height: 1.1; min-height: 2.2em; }

/* log */
.log { list-style: none; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-top: 20px; mask-image: linear-gradient(to bottom, transparent, #000 40px); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40px); }
.log::-webkit-scrollbar, .files-list::-webkit-scrollbar, .files-read::-webkit-scrollbar { display: none; }
.log li { display: grid; grid-template-columns: 10ch minmax(0, 1fr); gap: 8px; padding: 1px 0; overflow-wrap: anywhere; }
.log time { opacity: .42; white-space: nowrap; }
.log .amb { opacity: .58; }
.log .evt > span { color: rgb(var(--hi)); }
.log .usr > span { color: rgb(var(--ph)); }
.log .usr > span::before { content: '> '; }
.log .out > span { color: rgb(var(--hi)); }
.log .warn > span { color: rgb(var(--hi)); background: rgb(var(--ph) / .18); animation: blink .5s steps(2) 6; }
.log .err > span { text-decoration: underline wavy rgb(var(--ph) / .7); text-underline-offset: 3px; }

/* footer / command line */
.ftr {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgb(var(--ph) / .4);
}
.cmd { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--term); font-size: 24px; letter-spacing: .06em; }
.cmd label { color: rgb(var(--ph)); }
.cmd input {
  flex: 1;
  min-width: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: rgb(var(--hi));
  text-shadow: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  caret-color: rgb(var(--hi));
  caret-shape: block;
}
.cmd input::placeholder { color: rgb(var(--ph) / .35); text-shadow: none; }
.ftr-r { display: flex; align-items: center; gap: 16px; font-size: 12px; white-space: nowrap; }
.ftr-r button { padding: 2px 6px; border: 1px solid rgb(var(--ph) / .3); }
.ftr-r button:hover { border-color: rgb(var(--ph)); }
.ftr-r button b { color: rgb(var(--ph)); }
.ftr-r button[aria-pressed='true'] b { color: rgb(var(--hi)); }
.clock { min-width: 11ch; text-align: right; font-variant-numeric: tabular-nums; }

/* ───────────────────────── boot ───────────────────────── */
.boot {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: clamp(22px, 4.5vw, 64px);
  background: #040100;
  font-family: var(--term);
  font-size: clamp(17px, 1.75vw, 25px);
  line-height: 1.22;
  letter-spacing: .05em;
  color: rgb(var(--hi));
  text-shadow: var(--glow);
  overflow: hidden;
  cursor: pointer;
}
.boot pre { font: inherit; white-space: pre-wrap; }
.boot[hidden] { display: none; }
.crt.power .boot { animation: powerOn 1s cubic-bezier(.2, .8, .2, 1) both; }
.boot.out { animation: bootOut .45s steps(5) forwards; }
.crt.off .screen, .crt.off .boot { animation: powerOff .55s cubic-bezier(.6, 0, .9, .3) forwards; }

.booting .screen { visibility: hidden; }
.live .hdr { animation: fadeIn .5s steps(5) both; }
.live .rules i { animation: drawX .8s cubic-bezier(.2, .7, .2, 1) .1s both; }
.live .rules i + i { animation-delay: .25s; }
.live .sub { animation: fadeIn .5s steps(5) .25s both; }
.live .col-l { animation: fadeIn .5s steps(5) .4s both; }
.live .vp { animation: vpOn .6s ease-out .5s both; }
.live .col-r { animation: fadeIn .5s steps(5) .6s both; }
.live .ftr { animation: fadeIn .5s steps(5) .75s both; }

/* ───────────────────────── film / glass FX ───────────────────────── */
.fx { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.fx-scan {
  z-index: 5;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / .3) 2px 3px);
}
.fx-roll {
  z-index: 6;
  top: -24%;
  bottom: auto;
  height: 24%;
  border-radius: 0;
  background: linear-gradient(to bottom, transparent, rgb(var(--ph) / .045) 55%, rgb(var(--hi) / .02) 70%, transparent);
  animation: roll 9s linear infinite;
}
.fx-grain { z-index: 7; width: 100%; height: 100%; opacity: .085; mix-blend-mode: screen; }
.fx-vig {
  z-index: 8;
  background: radial-gradient(ellipse 80% 75% at 50% 48%, transparent 58%, rgb(0 0 0 / .5) 100%);
  box-shadow: inset 0 0 90px rgb(0 0 0 / .75);
}
.fx-track { z-index: 4; border-radius: 0; }
.fx-track i {
  position: absolute;
  top: 26%;
  bottom: 2%;
  width: 1.5px;
  background: linear-gradient(to bottom, transparent, rgb(var(--hi) / .5) 12%, rgb(var(--ph) / .3) 55%, rgb(var(--hi) / .45) 80%, transparent);
  filter: blur(.5px);
  animation: track 1.7s steps(6) infinite;
}
.fx-track i:nth-child(1) { left: 6.2%; opacity: .25; animation-duration: 2.9s; }
.fx-track i:nth-child(2) { left: 84.6%; opacity: .45; animation-duration: 2.3s; }
.fx-track i:nth-child(3) { left: 85.5%; opacity: .3; animation-duration: 1.1s; }

.screen.glitch { animation: glitch .24s steps(3) both; text-shadow: -2px 0 rgb(255 40 70 / .75), 2px 0 rgb(40 220 255 / .6), var(--glow); }
.crt.glitching .fx-roll { animation-duration: .5s; }

/* ───────────────────────── keyframes ───────────────────────── */
@keyframes flicker { 0% { opacity: 1; } 3% { opacity: .95; } 4% { opacity: 1; } 41% { opacity: 1; } 42% { opacity: .92; } 43% { opacity: 1; } 77% { opacity: .97; } 78% { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes roll { to { transform: translateY(520%); } }
@keyframes track { 0% { transform: translateX(0); } 20% { transform: translateX(1px) skewX(.5deg); } 40% { transform: translateX(-1px); } 60% { transform: translateX(2px) skewX(-.7deg); } 80% { transform: translateX(0); } }
@keyframes jit { 0% { transform: translate(-2px, 1px) skewX(-6deg); } 100% { transform: translate(2px, -1px) skewX(4deg); } }
@keyframes glitch {
  0% { transform: translate(-7px, 0) skewX(5deg); filter: brightness(1.9) contrast(1.4) blur(.25px); clip-path: inset(0 0 40% 0); }
  33% { transform: translate(6px, -2px) skewX(-3deg); clip-path: inset(30% 0 0 0); }
  66% { transform: translate(-2px, 1px); filter: brightness(.7) blur(.25px); clip-path: inset(0); }
  100% { transform: none; filter: blur(.25px); }
}
@keyframes flash { 0% { filter: brightness(2.4); } 100% { filter: none; } }
@keyframes powerOn {
  0% { transform: scale(0, .003); filter: brightness(8); }
  28% { transform: scale(1, .003); filter: brightness(6); }
  58% { transform: scale(1, 1); filter: brightness(2.2); }
  100% { transform: none; filter: none; }
}
@keyframes powerOff {
  0% { transform: none; filter: none; }
  55% { transform: scale(1, .004); filter: brightness(5); }
  100% { transform: scale(0, .002); filter: brightness(9); }
}
@keyframes bootOut { to { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes drawX { from { transform: scaleX(0); } }
@keyframes vpOn { 0% { opacity: 0; transform: scaleY(.01); } 45% { opacity: 1; transform: scaleY(.01); } 100% { transform: none; } }
.decode { animation-name: vpOnCentered; }
@keyframes vpOnCentered { 0% { opacity: 0; transform: translate(-50%, -50%) scaleY(.02); } 45% { opacity: 1; transform: translate(-50%, -50%) scaleY(.02); } 100% { transform: translate(-50%, -50%); } }
.blink { animation: blink 1.2s steps(2) infinite; }

.nojs { position: fixed; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; color: rgb(var(--hi)); font: 20px var(--term); }


/* ───────────────────────── lore layer ───────────────────────── */
.log .egg > span { color: var(--ink); background: rgb(var(--hi)); text-shadow: none; padding: 0 4px; }
.log .egg > span::before { content: '◆ '; }
.log .loki > span { color: rgb(110 232 130); text-shadow: 0 0 6px rgb(110 232 130 / .6); }
.ro-egg dt { color: rgb(var(--hi)); opacity: .9 !important; }

/* toast: anomaly logged */
.toast {
  position: absolute; left: 50%; top: 34px; z-index: 6;
  display: flex; align-items: center; gap: 12px;
  padding: 7px 14px; white-space: nowrap;
  font-size: 12px; color: var(--ink); text-shadow: none;
  background: rgb(var(--hi)); box-shadow: 0 0 24px rgb(var(--ph) / .7);
  transform: translate(-50%, -12px) scaleY(.02); opacity: 0; pointer-events: none;
  transition: transform .25s steps(4), opacity .25s steps(4);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast span { font-family: var(--term); font-size: 20px; letter-spacing: .06em; }
.toast b { color: var(--ink); font-weight: 400; }
.toast i { font-style: normal; opacity: .7; }

/* time-door scenes */
.vp.scening .files, .vp.scening .intake, .vp.scening .decode, .vp.scening .vp-c.bl, .vp.scening .vp-c.br { visibility: hidden; }
.vp.scening[data-scene='jetski'] .files, .vp.scening[data-scene='jetski'] .intake,
.vp.scening[data-scene='sylvie'] .files, .vp.scening[data-scene='sylvie'] .intake { visibility: visible; }
.scene-cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 5;
  padding: 10px 14px 8px; cursor: pointer;
  background: linear-gradient(to right, rgb(0 0 0 / .78), rgb(0 0 0 / .35) 70%, transparent);
  border-left: 3px solid rgb(var(--hi));
}
.scene-cap[hidden] { display: none; }
.scene-cap h4 { font: 400 clamp(22px, 2.6vw, 36px)/1 var(--term); letter-spacing: .06em; color: rgb(var(--hi)); }
.scene-cap p { margin-top: 4px; font-size: 12px; color: rgb(var(--ph)); min-height: 1.35em; }
.scene-cap small { display: block; margin-top: 6px; font-size: 9px; opacity: .45; }
.screen.pruning { animation: pruneOut 1.2s steps(8) both; }
@keyframes pruneOut {
  0% { filter: brightness(1); clip-path: inset(0); }
  30% { filter: brightness(3) blur(1px); clip-path: inset(10% 0 22% 0); transform: translateX(-6px); }
  60% { filter: brightness(5) blur(2px); clip-path: inset(46% 0 48% 0); transform: translateX(8px) scaleX(1.05); }
  100% { filter: brightness(1) blur(.25px); clip-path: inset(0); transform: none; }
}

/* intake desk */
.intake { position: absolute; inset: 34px 14px 32px; overflow: hidden; }
.intake[hidden] { display: none; }
.in-wrap { height: 100%; overflow-y: auto; scrollbar-width: none; max-width: 860px; margin: 0 auto; padding: 4px 6px 12px; }
.in-wrap::-webkit-scrollbar { display: none; }
.in-h { font-size: 12px; color: rgb(var(--ph)); border-bottom: 1px solid rgb(var(--ph) / .35); padding-bottom: 4px; margin-bottom: 14px; }
.in-p { font-family: var(--term); font-size: clamp(20px, 1.9vw, 27px); line-height: 1.15; letter-spacing: .05em; margin-bottom: 16px; }
.in-note { margin-top: 18px; font-size: 11px; opacity: .5; }
.in-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.in-btn {
  padding: 8px 16px; font-size: 13px; color: var(--ink); text-shadow: none;
  background: rgb(var(--hi)); border: 1px solid rgb(var(--hi)); box-shadow: 0 0 14px rgb(var(--ph) / .55);
}
.in-btn.ghost { color: rgb(var(--hi)); background: transparent; box-shadow: none; text-shadow: var(--glow); }
.in-btn:disabled { opacity: .35; cursor: not-allowed; }
.in-btn:not(:disabled):hover { filter: brightness(1.15); }
.in-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.in-tog { padding: 10px 12px; text-align: left; border: 1px solid rgb(var(--ph) / .45); }
.in-tog::before { content: '[ ] '; color: rgb(var(--ph)); }
.in-tog.on { background: rgb(var(--ph) / .16); border-color: rgb(var(--hi)); }
.in-tog.on::before { content: '[■] '; color: rgb(var(--hi)); }
.in-reply { margin-top: 12px; min-height: 1.4em; color: rgb(var(--ph)); }
.in-input {
  width: 100%; max-width: 420px; padding: 6px 10px; margin-bottom: 4px;
  font: 400 30px var(--term); letter-spacing: .08em; text-transform: uppercase;
  color: rgb(var(--hi)); text-shadow: inherit; caret-color: rgb(var(--hi));
  background: rgb(0 0 0 / .4); border: 1px solid rgb(var(--ph) / .7); outline: 0;
}
.in-input::placeholder { color: rgb(var(--ph) / .35); }
.in-words { height: 92px; overflow: hidden; position: relative; border: 1px dashed rgb(var(--ph) / .35); padding: 6px 10px; margin-bottom: 10px;
  mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }
.in-words div { font-size: 11px; line-height: 1.5; opacity: .7; animation: words 60s linear infinite; }
@keyframes words { to { transform: translateY(-80%); } }
.in-sig { display: block; width: 100%; height: 130px; border: 1px solid rgb(var(--ph) / .7); background: rgb(0 0 0 / .45)
  linear-gradient(transparent 96px, rgb(var(--ph) / .5) 96px 97px, transparent 97px); cursor: crosshair; touch-action: none; }
.in-verdict { font: 400 clamp(18px, 1.6vw, 23px)/1.2 var(--term); letter-spacing: .05em; white-space: pre-wrap; margin-bottom: 14px; }
.in-out[hidden] { display: none; }
.in-card { display: block; width: 100%; max-width: 760px; border: 1px solid rgb(var(--ph) / .5); box-shadow: 0 0 22px rgb(var(--ph) / .3); }

/* Miss Minutes */
.mm { position: absolute; left: clamp(20px, 2.3vw, 36px); bottom: clamp(70px, 9.5vh, 96px); z-index: 3; }
.booting .mm { display: none; }
.mm-body { display: block; width: clamp(64px, 5.6vw, 84px); padding: 0; animation: mmBob 2.8s ease-in-out infinite; filter: drop-shadow(0 0 8px rgb(var(--ph) / .65)); }
.mm-body svg { display: block; width: 100%; overflow: visible; }
.mm-body:focus-visible { outline-offset: 6px; }
.mm-limbs { fill: none; stroke: rgb(var(--ph)); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mm-hand { fill: rgb(var(--hi)); stroke: none; }
.mm-face { fill: rgb(var(--ph)); stroke: rgb(var(--hi)); stroke-width: 2.5; }
.mm-ticks line { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; opacity: .55; }
.mm-eyes { fill: var(--ink); transform-origin: 50px 50px; animation: mmBlink 4.6s infinite; }
.mm-shine { fill: rgb(var(--hi)); animation: mmBlink 4.6s infinite; transform-origin: 50px 46px; }
.mm-lash { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.mm-cheek { fill: rgb(var(--hi) / .55); }
.mm-mouth { fill: var(--ink); transform-origin: 50px 70px; }
.mm.talk .mm-mouth { animation: mmTalk .18s steps(2) infinite; }
.mm-wave { transform-origin: 16px 60px; }
.mm.on .mm-wave { animation: mmWave .9s ease-in-out 2; }
.mm-bubble {
  position: absolute; left: 0; bottom: calc(100% + 12px); width: min(340px, 36vw);
  padding: 10px 14px 12px; cursor: pointer;
  background: rgb(4 2 0 / .93); border: 1.5px solid rgb(var(--hi));
  box-shadow: 0 0 22px rgb(var(--ph) / .35), inset 0 0 14px rgb(var(--ph) / .12);
  opacity: 0; transform: translateY(8px) scaleY(.04); transform-origin: left bottom; pointer-events: none;
  transition: opacity .2s steps(3), transform .2s steps(3);
}
.mm-bubble::before { content: ''; position: absolute; left: 26px; bottom: -9px; border: 8px solid transparent; border-top-color: rgb(var(--hi)); border-bottom: 0; }
.mm.on .mm-bubble { opacity: 1; transform: none; pointer-events: auto; }
.mm-name { display: block; font-size: 10px; color: rgb(var(--ph)); margin-bottom: 4px; }
.mm-bubble p { font: 400 20px/1.15 var(--term); letter-spacing: .04em; }
@keyframes mmBob { 50% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes mmBlink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes mmTalk { 50% { transform: scaleY(.45); } }
@keyframes mmWave { 50% { transform: rotate(-28deg); } }

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 1180px) {
  .body { grid-template-columns: 196px minmax(0, 1fr) 240px; }
}
@media (max-width: 900px) {
  .screen { grid-template-rows: none; display: block; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
  .screen::-webkit-scrollbar { display: none; }
  .hdr { grid-template-columns: minmax(0, 1fr) auto; }
  .hdr-r { display: none; }
  .modes { margin-left: 0; width: 100%; }
  .modes button { flex: 1; }
  .body { grid-template-columns: 1fr 1fr; grid-template-areas: 'vp vp' 'l r'; }
  .vp { grid-area: vp; height: max(340px, 56svh); }
  .col-l { grid-area: l; }
  .col-r { grid-area: r; height: 330px; }
  .fx-track { display: none; }
  .mm { left: auto; right: 14px; bottom: 14px; z-index: 9; }
  .mm-body { width: 54px; }
  .mm-bubble { left: auto; right: 0; bottom: calc(100% + 10px); width: min(320px, 78vw); transform-origin: right bottom; }
  .mm-bubble::before { left: auto; right: 18px; bottom: -9px; border: 8px solid transparent; border-top-color: rgb(var(--hi)); border-bottom: 0; }
  .vp { height: max(380px, 60svh); }
}
@media (max-width: 600px) {
  body { font-size: 12px; }
  .hdr { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; }
  .hdr-l { order: 2; max-width: 100%; }
  .feed { margin-bottom: 2px; }
  .bigcode { transform-origin: center; font-size: 17px; }
  .sub { justify-content: center; }
  .uc { display: none; }
  .modes button { padding: 6px 4px; font-size: 11px; }
  .modes button span { display: none; }
  .body { grid-template-columns: 1fr; grid-template-areas: 'vp' 'r' 'l'; }
  .col-r { height: 260px; }
  .files { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); inset: 30px 10px 28px; gap: 8px; }
  .intake { inset: 30px 8px 28px; }
  .toast { top: 30px; max-width: 94%; }
  .toast b { display: none; }
  .files-list { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; border-right: 0; border-bottom: 1px dashed rgb(var(--ph) / .3); }
  .files-list li { flex: 0 0 auto; }
  .files-list button { grid-template-columns: auto; width: auto; margin: 0; }
  .files-list .fst, .files-list .ftt { display: none; }
  .ftr { flex-wrap: wrap; gap: 10px; }
  .cmd { font-size: 21px; }
  .ftr-r { width: 100%; justify-content: space-between; }
}

@media (hover: none) {
  .vp-c.br { display: none; }
}
/* short desktop screens: make room for Miss Minutes under the readouts */
@media (max-height: 820px) and (min-width: 901px) {
  .spark, .spark-h { display: none; }
  .mm { bottom: 72px; }
  .mm-body { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .crt, .fx-roll, .fx-track i, .blink, .log .warn > span, .mm-body, .mm-eyes, .mm-shine, .in-words div { animation: none !important; }
  .live .hdr, .live .rules i, .live .sub, .live .col-l, .live .vp, .live .col-r, .live .ftr { animation-duration: .01s !important; }
}
