/* ────────────────────────────────────────────────
   withers.css
   everything is grey on purpose. one dead-rose accent, used like salt.
   ──────────────────────────────────────────────── */

:root {
  --ink: #000;
  --soot: #0b0b0a;
  --ash: #141413;
  --term: #0f0f0e;
  --line: #2c2b29;
  --line-hi: #57544e;
  --bone: #c9c5bc;
  --dust: #827e76;
  --dim: #4b4945;
  --rose: #8a5f5f;
  --mono: 'VT323', 'Courier New', monospace;
  --hand: 'IM Fell English', 'Times New Roman', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><circle cx="8" cy="8" r="6" fill="none" stroke="gray" stroke-width="2"/></svg>') 8 8, auto;
}
a, a *, button, summary, .tab, [data-zoom], [data-popup] {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><circle cx="8" cy="8" r="6" fill="none" stroke="silver" stroke-width="2"/><circle cx="8" cy="8" r="2" fill="silver"/></svg>') 8 8, pointer;
}

html { background: #000; scrollbar-width: thin; scrollbar-color: var(--line) #000; }
::selection { background: var(--bone); color: #000; }

body {
  background: var(--ink);
  color: var(--bone);
  font: 18px/1.42 var(--mono);
  overflow-x: hidden;
  min-height: 100vh;
  padding-bottom: 56px;
  position: relative;
}

/* film grain + vignette, sitting above everything, touching nothing */
body::before {
  content: '';
  position: fixed; inset: -80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .075;
  pointer-events: none;
  z-index: 997;
  animation: grain 1.1s steps(5) infinite;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(0,0,0,.72) 100%);
  pointer-events: none;
  z-index: 996;
}
@keyframes grain {
  0% { transform: translate(0,0) } 20% { transform: translate(-31px,17px) }
  40% { transform: translate(23px,-41px) } 60% { transform: translate(-12px,-9px) }
  80% { transform: translate(37px,29px) } 100% { transform: translate(0,0) }
}

body.hic .container { transform: translateX(2px) skewX(-.25deg); filter: contrast(1.25) brightness(1.1); }
body.leaving .container { opacity: 0; transform: scaleY(.985); transition: opacity .16s, transform .16s; }

a { color: var(--bone); text-decoration: none; border-bottom: 1px dotted var(--line-hi); }
a:hover { color: #fff; border-bottom-color: var(--bone); }
p + p { margin-top: .7em; }
em, .hand { font-family: var(--hand); font-style: italic; letter-spacing: .01em; }
.dim { color: var(--dust); }
.rose { color: var(--rose); }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@keyframes flicker { 0%, 100% { opacity: .85 } 47% { opacity: 1 } 50% { opacity: .4 } 53% { opacity: 1 } }

/* ───────────── boot ───────────── */
#boot {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: grid; place-items: center;
  overflow: hidden;
  font-size: 17px;
}
.boot-ghost {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: min(26vw, 340px);
  letter-spacing: .1em;
  color: #fff; opacity: .018;
  white-space: nowrap; pointer-events: none;
  animation: ghost 9s steps(1) infinite;
}
@keyframes ghost {
  0%, 100% { opacity: .018; transform: translate(-50%,-50%) }
  41% { opacity: .05; transform: translate(-50.4%,-50%) }
  42% { opacity: .018 }
  77% { opacity: .035; transform: translate(-49.7%,-50.3%) scaleY(1.02) }
  78% { opacity: .018; transform: translate(-50%,-50%) }
}
.boot-inner {
  position: relative;
  width: min(680px, 90vw);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 26px;
  align-items: end;
}
#boot-log { min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
.bl { white-space: nowrap; overflow: hidden; color: var(--dust); line-height: 1.3; }
.bl .ts { color: var(--dim); }
.bl.err .tx { color: var(--bone); }
.bl.last .tx { color: #e4e0d6; }
.bl.slip { transform: translateX(var(--sx, 4px)); }
.bl.whisper .tx { font-family: var(--hand); font-style: italic; color: #e4e0d6; }
#boot-flower { color: var(--dim); font: 15px/1.02 var(--mono); padding-bottom: 4px; }
.boot-foot { grid-column: 1 / -1; color: var(--dim); margin-top: 14px; white-space: nowrap; overflow: hidden; }
#boot-bar { letter-spacing: 1px; color: var(--dust); }
.boot-tear {
  display: none; position: absolute; left: 0; right: 0;
  background: rgba(255,255,255,.05); mix-blend-mode: difference;
}
.boot-tear.on { display: block; }
.boot-skip { position: absolute; right: 22px; bottom: 16px; font-size: 14px; color: var(--dim); animation: flicker 4s infinite; }

/* the tube switching off */
#boot.off { animation: bootfade .7s forwards; pointer-events: none; }
#boot.off .boot-inner, #boot.off .boot-ghost, #boot.off .boot-skip { animation: squash .26s cubic-bezier(.6,0,.9,.3) forwards; }
#boot.off::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: #e8e4da; box-shadow: 0 0 18px 2px rgba(255,255,255,.35);
  animation: tubeline .62s ease-in forwards;
}
@keyframes bootfade { 0%, 60% { background: #000 } 100% { background: transparent } }
@keyframes squash { to { transform: scaleY(.006); opacity: 0; filter: brightness(4) } }
.boot-ghost { transform-origin: center; }
@keyframes tubeline {
  0% { transform: scaleX(1); opacity: 0 } 30% { transform: scaleX(1); opacity: 1 }
  75% { transform: scaleX(.012); opacity: 1 } 100% { transform: scaleX(0); opacity: 0 }
}

/* ───────────── crt + hud ───────────── */
.crt-overlay {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,.12) 50%);
  background-size: 100% 4px; opacity: .2;
}
.crt-scanline {
  position: fixed; top: 0; left: 0; width: 100%; height: 120px; z-index: 998; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.07) 50%, transparent);
  opacity: .12; animation: scanline 7s linear infinite;
}
@keyframes scanline { from { transform: translateY(-120px) } to { transform: translateY(100vh) } }

.hud-corner { position: fixed; width: 84px; height: 84px; z-index: 900; pointer-events: none; opacity: .55; }
.hud-corner-tl { top: 10px; left: 10px; border-top: 1px solid var(--dust); border-left: 1px solid var(--dust); }
.hud-corner-tr { top: 10px; right: 10px; border-top: 1px solid var(--dust); border-right: 1px solid var(--dust); }
.hud-corner-bl { bottom: 10px; left: 10px; border-bottom: 1px solid var(--dust); border-left: 1px solid var(--dust); }
.hud-corner-br { bottom: 10px; right: 10px; border-bottom: 1px solid var(--dust); border-right: 1px solid var(--dust); }
.hud-read { position: fixed; top: 14px; right: 18px; z-index: 900; pointer-events: none; font-size: 13px; color: var(--dim); letter-spacing: 1px; }
.hud-ticker {
  position: fixed; bottom: 10px; left: 104px; right: 104px; height: 22px; z-index: 900;
  border: 1px solid var(--line-hi); background: rgba(0,0,0,.72);
  overflow: hidden; pointer-events: none;
}
.ticker-content { white-space: nowrap; display: inline-block; padding-left: 100%; animation: ticker 48s linear infinite; font-size: 14px; color: var(--dust); line-height: 20px; }
@keyframes ticker { from { transform: translateX(0) } to { transform: translateX(-100%) } }

/* ───────────── frame ───────────── */
.container {
  max-width: 1180px; margin: 0 auto; padding: 22px 20px;
  display: grid; grid-template-columns: 250px 1fr; gap: 20px;
  position: relative;
  transition: transform .08s, filter .08s;
}
.container.solo { grid-template-columns: 1fr; max-width: 1040px; }

.header {
  grid-column: 1 / -1; position: relative; overflow: hidden;
  border: 1px solid var(--line); background: var(--soot);
  padding: 26px 16px 14px;
}
canvas.veins { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.title { position: relative; text-align: center; font-size: 46px; font-weight: normal; letter-spacing: .42em; text-indent: .42em; line-height: 1; }
.sub { position: relative; text-align: center; color: var(--dust); font: italic 17px var(--hand); margin-top: 6px; }

/* sliced-glitch text. needs data-text matching the content */
.gl { position: relative; display: inline-block; }
.gl::before, .gl::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; opacity: 0; pointer-events: none; }
.gl.glitching::before { opacity: .85; color: var(--dust); transform: translateX(-4px); animation: slice .28s steps(3) infinite; }
.gl.glitching::after { opacity: .85; transform: translateX(4px); animation: slice .28s steps(3) infinite reverse; }
.gl.glitching { color: transparent; text-shadow: 0 0 0 var(--bone); }
@keyframes slice {
  0% { clip-path: inset(8% 0 70% 0) } 33% { clip-path: inset(44% 0 30% 0) }
  66% { clip-path: inset(78% 0 4% 0) } 100% { clip-path: inset(20% 0 55% 0) }
}

.navigation {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px;
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line);
}
.nav-link { position: relative; border: 0; padding: 2px 4px; color: var(--dust); letter-spacing: 1px; transition: color .2s, letter-spacing .3s; }
.nav-link::before { content: './'; color: var(--dim); }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bone), transparent);
  transform: scaleX(0); transition: transform .35s;
}
.nav-link:hover { color: #fff; letter-spacing: 2px; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current] { color: var(--bone); }
.nav-link[aria-current]::before { content: '> '; color: var(--rose); animation: blink 1.2s steps(1) infinite; }

/* ───────────── panels ───────────── */
.panel {
  position: relative; border: 1px solid var(--line); background: var(--soot);
  padding: 22px 16px 16px;
}
.panel::before { /* a little tick in the corner, like a registration mark */
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px;
  border-right: 1px solid var(--line-hi); border-bottom: 1px solid var(--line-hi);
}
.panel.torn { border-style: dashed; background: transparent; }
.panel.bare { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; }
.panel.bare::before { display: none; }
.tag {
  position: absolute; top: -11px; left: 12px; padding: 0 7px;
  background: var(--ink); color: var(--dust); font-size: 15px; letter-spacing: 2px;
}
.tag.r { left: auto; right: 12px; }
.panel h3, .h {
  font-size: 21px; font-weight: normal; letter-spacing: 2px; margin-bottom: 12px;
}
.panel h3::after, .h::after { content: ''; display: block; width: 46px; height: 1px; background: var(--line-hi); margin-top: 4px; }

.reveal { opacity: 0; transform: translateY(9px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.wide { grid-column: 1 / -1; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols.lop { grid-template-columns: 1.4fr 1fr; }

/* ───────────── sidebar ───────────── */
.sidebar { align-self: start; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 22px; }
.profile { text-align: center; }
.profile img {
  width: 100%; max-width: 190px; display: block; margin: 0 auto 10px;
  border: 1px solid var(--line); image-rendering: pixelated;
  filter: grayscale(1) contrast(1.08);
  transition: filter .4s;
}
.profile img:hover { filter: grayscale(1) contrast(1.4) brightness(1.15); animation: jit .25s steps(2) infinite; }
@keyframes jit { 50% { transform: translate(1px,-1px) } }
.profile-name { font-size: 24px; font-weight: normal; letter-spacing: 4px; }
.profile-status { color: var(--dust); font: italic 16px var(--hand); min-height: 2.6em; }

.cyc > * { display: none; }
.cyc > .on { display: inline; animation: fadeIn 1.4s; }

.list { list-style: none; }
.list li { display: flex; gap: 8px; padding: 1px 0; transition: transform .2s, color .2s; color: var(--bone); }
.list li:hover { transform: translateX(5px); color: #fff; }
.list li > i { font-style: normal; width: 12px; color: var(--dust); animation: flicker 3.4s infinite; }
.list li.minus { color: var(--dust); }
.list li.minus > i { color: var(--rose); }

.stat { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 4px 0 6px; border-bottom: 1px dotted var(--line); }
.stat:last-child { border-bottom: 0; }
.stat .k { color: var(--dust); }
.stat .bar { grid-column: 1 / -1; height: 3px; background: var(--ash); overflow: hidden; display: block; }
.stat .bar b { display: block; height: 100%; width: 0; background: var(--dust); transition: width 1.6s cubic-bezier(.16,1,.3,1); }
.stat .bar.inf b { width: 30%; animation: sweep 3.2s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: translateX(-100%) } to { transform: translateX(340%) } }

.wave { display: flex; align-items: flex-end; gap: 2px; height: 30px; margin: 8px 0 4px; }
.wave i { flex: 1; background: var(--line-hi); height: 20%; animation: wv 1.4s ease-in-out infinite alternate; }
.wave i:nth-child(3n) { animation-duration: .9s } .wave i:nth-child(4n+1) { animation-duration: 1.9s; animation-delay: -.6s }
.wave i:nth-child(5n+2) { animation-duration: 1.1s; animation-delay: -1s } .wave i:nth-child(7n) { animation-duration: 2.3s }
@keyframes wv { to { height: 95% } }

.btns { display: flex; flex-wrap: wrap; gap: 6px; }
.btn88 {
  width: 88px; height: 31px; display: grid; place-items: center;
  border: 1px dashed var(--line-hi); color: var(--dim); font-size: 13px; line-height: 1;
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(255,255,255,.03) 5px 6px);
}
a.btn88:hover { color: var(--bone); border-style: solid; }

/* ───────────── main ───────────── */
.main { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; align-content: start; }

#three-container { grid-column: 1 / -1; height: 320px; position: relative; overflow: hidden; border: 1px solid var(--line); background: #000; }
#three-container canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.fig { position: absolute; z-index: 1; font-size: 14px; color: var(--dust); letter-spacing: 1px; pointer-events: none; }
.fig.tl { top: 8px; left: 10px } .fig.br { bottom: 8px; right: 10px } .fig.bl { bottom: 8px; left: 10px }

.ascii { font: 13px/1.15 'Courier New', monospace; white-space: pre; text-align: center; margin: 4px 0 14px; color: var(--dust); overflow: hidden; }

.term {
  background: var(--term); border: 1px solid var(--line);
  padding: 9px 11px; font-size: 16px; line-height: 1.3;
  min-height: 150px; max-height: 240px; overflow-y: auto; margin-top: 14px;
}
.ln { min-height: 1.3em; white-space: pre-wrap; word-break: break-word; }
.ln.me { color: #fff; }
.ln.soft { font-family: var(--hand); font-style: italic; color: var(--dust); }
.cur { animation: blink 1s steps(1) infinite; }

.code {
  background: var(--term); border: 1px solid var(--line); border-left: 2px solid var(--line-hi);
  padding: 10px 12px; font-size: 16px; line-height: 1.3; white-space: pre; overflow-x: auto; margin: 10px 0; color: var(--bone);
}
.code .c { color: var(--dim); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab {
  font: inherit; color: var(--dust); background: var(--ink);
  border: 1px solid var(--line); border-bottom: 0; padding: 3px 14px; position: relative; top: 1px;
}
.tab:hover { color: var(--bone); }
.tab.active { background: var(--soot); color: var(--bone); border-bottom: 1px solid var(--soot); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: tabin .35s steps(4); }
@keyframes tabin { 0% { opacity: 0; transform: translateX(-6px) } 50% { opacity: .6; transform: translateX(3px) } 100% { opacity: 1; transform: none } }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.gallery img, .frag img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 1px solid var(--line);
  filter: grayscale(1) contrast(1.12) brightness(.78);
  transition: filter .5s, transform .35s;
}
.gallery img:hover, .frag:hover img { filter: grayscale(1) contrast(1.2) brightness(1.02); }
.gallery img:hover { transform: scale(1.025); }

/* placeholders. swap the whole <figure class="ph"> for an <img> or <video> when you have the real thing */
.ph {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden;
  border: 1px dashed var(--line-hi); color: var(--dust); font-size: 14px; text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(255,255,255,.022) 9px 10px),
    linear-gradient(to top right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)),
    var(--term);
}
.ph.wide { aspect-ratio: 16 / 9; }
.ph.tall { aspect-ratio: 3 / 4; }
.ph::after { content: attr(data-label); position: relative; z-index: 1; background: var(--term); padding: 0 8px; border: 1px solid var(--line); }
.ph.vid { background: #000; border-style: solid; border-color: var(--line); }
.ph.vid canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: .5; }
.ph.vid::before {
  content: ''; position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-40%, -90%);
  border-left: 22px solid var(--bone); border-top: 14px solid transparent; border-bottom: 14px solid transparent; opacity: .8;
}
.ph.vid::after { margin-top: 58px; background: rgba(0,0,0,.7); }
.ph .tc { position: absolute; z-index: 1; left: 9px; bottom: 5px; color: var(--bone); }
.ph .rec { position: absolute; z-index: 1; right: 9px; top: 5px; color: var(--rose); animation: blink 1.6s steps(1) infinite; }
figcaption, .cap { font-size: 14px; color: var(--dust); margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }

/* transmissions / log entries */
.entry { display: grid; grid-template-columns: 84px 1fr; gap: 4px 14px; padding: 10px 0; border-bottom: 1px dotted var(--line); }
.entry:last-of-type { border-bottom: 0; }
.entry .when { color: var(--dust); letter-spacing: 1px; }
.entry p { font: 19px/1.4 var(--hand); color: var(--bone); }

details { border-bottom: 1px dotted var(--line); padding: 7px 0; }
summary { list-style: none; display: flex; justify-content: space-between; gap: 10px; color: var(--bone); }
summary::-webkit-details-marker { display: none; }
summary::before { content: '+ '; color: var(--dust); }
details[open] summary::before { content: '- '; color: var(--rose); }
summary span { color: var(--dim); margin-left: auto; }
details > div { padding: 8px 0 6px 16px; font: 19px/1.4 var(--hand); animation: fadeIn .6s; }

/* ───────────── memories ───────────── */
.frags { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 16px; grid-auto-flow: dense; }
.frag {
  position: relative; border: 1px solid var(--line); background: var(--ash);
  padding: 7px 7px 5px; transform: rotate(var(--r, 0deg));
  transition: transform .4s cubic-bezier(.2,.8,.2,1), border-color .4s;
}
.frag:nth-child(3n) { --r: -.9deg } .frag:nth-child(4n+1) { --r: .7deg } .frag:nth-child(5n) { --r: 1.2deg } .frag:nth-child(7n) { --r: -1.4deg }
.frag:hover { transform: rotate(0) translateY(-4px); border-color: var(--line-hi); z-index: 2; }
.frag.big { grid-column: span 2; grid-row: span 2; }
.frag { display: flex; flex-direction: column; margin: 0; }
.frag.big img { flex: 1; min-height: 0; aspect-ratio: auto; }
.frag img { border: 0; }
.frag .ph { border-color: var(--line); }
.frag::after { /* tape */
  content: ''; position: absolute; top: -7px; left: 38%; width: 46px; height: 13px;
  background: rgba(200,196,188,.09); border: 1px solid rgba(200,196,188,.08); transform: rotate(-3deg);
}

.timeline { list-style: none; border-left: 1px solid var(--line-hi); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 9px; width: 7px; height: 7px; background: var(--ink); border: 1px solid var(--dust); transform: rotate(45deg); }
.timeline li.gone::before { background: var(--rose); border-color: var(--rose); }
.timeline b { font-weight: normal; color: var(--dust); letter-spacing: 1px; display: block; }

#lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(0,0,0,.9); display: none; place-items: center; padding: 30px; }
#lightbox.on { display: grid; animation: fadeIn .25s; }
#lightbox img { max-width: min(86vw, 900px); max-height: 78vh; border: 1px solid var(--line-hi); filter: grayscale(1) contrast(1.1); }
#lightbox p { text-align: center; color: var(--dust); margin-top: 8px; }

/* ───────────── cache ───────────── */
.fs { width: 100%; border-collapse: collapse; font-size: 17px; }
.fs th { text-align: left; font-weight: normal; color: var(--dim); border-bottom: 1px solid var(--line); padding: 2px 8px 4px 0; }
.fs td { padding: 2px 8px 2px 0; border-bottom: 1px dotted var(--line); white-space: nowrap; }
.fs td:nth-child(n+2) { color: var(--dust); }
.fs tr:hover td { background: var(--ash); color: #fff; }
.fs .bad td:last-child { color: var(--rose); }
.hex { font-size: 15px; line-height: 1.25; color: var(--dust); background: var(--term); border: 1px solid var(--line); padding: 8px 10px; overflow: hidden; white-space: pre; height: 258px; }

/* ───────────── void ───────────── */
canvas.ash { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.void-well { min-height: 46vh; display: grid; place-items: center; text-align: center; position: relative; }
.void-well .cyc { font: italic 30px/1.3 var(--hand); color: var(--bone); max-width: 20em; }
.void-well .cyc > .on { animation: breathe 7s ease-in-out forwards; }
@keyframes breathe { 0% { opacity: 0; filter: blur(6px); letter-spacing: .2em } 25%, 70% { opacity: 1; filter: none; letter-spacing: .01em } 100% { opacity: 0; filter: blur(4px) } }
.fade-on-touch { transition: opacity 2.5s, filter 2.5s; }
.fade-on-touch:hover { opacity: .08; filter: blur(2px); }
#void-form { display: flex; gap: 8px; margin-top: 12px; }
#void-form input, #shell input {
  flex: 1; min-width: 0; font: inherit; color: var(--bone); background: var(--term);
  border: 1px solid var(--line); padding: 5px 10px; outline: none; cursor: text;
}
#void-form input:focus, #shell input:focus { border-color: var(--line-hi); }
button.b {
  font: inherit; color: var(--bone); background: var(--ink); border: 1px solid var(--line-hi); padding: 5px 14px; letter-spacing: 1px;
  transition: background .2s, color .2s;
}
button.b:hover { background: var(--bone); color: #000; }
#void-out { min-height: 3.2em; margin-top: 14px; font: italic 22px var(--hand); overflow: hidden; }
#void-out span { display: inline-block; white-space: pre; animation: dissolve 2.6s ease-in forwards; animation-delay: var(--d, 0s); }
@keyframes dissolve { to { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 30px)) rotate(var(--dr, 20deg)); filter: blur(3px) } }

/* ───────────── wander ───────────── */
#shell { display: block; }
#shell .term { min-height: 330px; max-height: 330px; margin-top: 0; border-bottom: 0; }
#shell .prompt { display: flex; align-items: center; border: 1px solid var(--line); background: var(--term); }
#shell .prompt span { padding: 0 2px 0 11px; color: var(--dust); }
#shell input { border: 0; padding-left: 6px; }
.exits { list-style: none; }
.exits li { padding: 6px 0; border-bottom: 1px dotted var(--line); display: flex; justify-content: space-between; gap: 10px; }
.exits li span { color: var(--dim); }

/* ───────────── popup ───────────── */
.popup { display: none; position: fixed; inset: 0; z-index: 1400; background: rgba(0,0,0,.78); place-items: center; padding: 20px; }
.popup.on { display: grid; }
.popup-content { width: min(430px, 100%); background: var(--soot); border: 1px solid var(--line-hi); padding: 18px; position: relative; animation: tabin .3s steps(4); }
.popup-close { position: absolute; top: 6px; right: 12px; font: inherit; font-size: 24px; background: none; border: 0; color: var(--dust); }
.popup-close:hover { color: #fff; }

.foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; color: var(--dim); font-size: 15px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ───────────── small screens ───────────── */
@media (max-width: 860px) {
  .container { grid-template-columns: 1fr; padding: 14px 10px; }
  .sidebar { position: static; }
  .main, .cols, .cols.lop { grid-template-columns: 1fr; }
  .frags { grid-template-columns: repeat(2, 1fr); }
  .title { font-size: 32px; letter-spacing: .3em; text-indent: .3em; }
  .hud-corner, .hud-read { display: none; }
  .hud-ticker { left: 10px; right: 10px; }
  .boot-inner { grid-template-columns: 1fr; }
  #boot-flower { display: none; }
  .fs { font-size: 15px; }
  .fs td:nth-child(3), .fs th:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker-content { padding-left: 8px; }
}
