/* THE LAST RECORDING — 1-bit CRT horror */

/* self-hosted fonts (SIL Open Font License, see assets/fonts/) */
@font-face {
  font-family: "VT323"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/vt323-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "VT323"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/vt323-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/silkscreen-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/silkscreen-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0a0706;
  --panel: #110c0a;
  --fg: #e9dcc0;
  --mid: #8c806b;
  --dim: #5d544a;
  --red: #d3172f;
  --red-dim: #5c0b14;
  --ui: "Silkscreen", "Courier New", monospace;
  --body: "VT323", "Courier New", monospace;
}

.theme-red {
  --fg: #e0263c;
  --mid: #9a2232;
  --dim: #5a1620;
  --red: #f1dfbd;
  --red-dim: #4a3a2a;
  --panel: #0d0506;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 22px;
  line-height: 1.15;
  -webkit-font-smoothing: none;
  overflow-x: hidden;
}

.defs { position: absolute; width: 0; height: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dim { color: var(--dim); }
.small { font-size: 18px; }
.inline { display: inline; margin: 0; }

/* svg paints */
.f { fill: var(--fg); }
.r { fill: var(--red); }
.k { fill: var(--bg); }
.m { fill: var(--mid); }
.s { stroke: var(--fg); }
.sred { stroke: var(--red); }
text { font-family: var(--ui); }

/* ───── CRT shell ───── */

.crt {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  gap: 10px;
  animation: flicker 6s infinite steps(1);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .28) 2px 3px);
  z-index: 50;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .75) 100%);
  z-index: 49;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  47% { opacity: .96; }
  48% { opacity: 1; }
  83% { opacity: .93; }
  84% { opacity: 1; }
}

/* ───── top bar ───── */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--fg);
  padding: 4px 8px;
  font-family: var(--ui);
  font-size: 13px;
}

.tb-box { border: 1px solid var(--fg); padding: 0 3px; }
.tb-date { white-space: nowrap; }

.tb-chapters {
  flex: 1;
  display: flex;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.tb-chapters li { flex: 1; height: 10px; border: 1px solid var(--dim); }
.tb-chapters li.done { background: var(--mid); border-color: var(--mid); }
.tb-chapters li.now { background: var(--red); border-color: var(--red); animation: blink 1.2s infinite steps(1); }

@keyframes blink { 50% { opacity: .35; } }

.tb-actions { display: flex; gap: 6px; }
.tb-btn {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg);
  padding: 2px 6px;
  cursor: pointer;
}
.tb-btn:hover, .tb-btn:focus-visible { background: var(--fg); color: var(--bg); outline: none; }

/* ───── layout ───── */

.layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 230px;
  gap: 10px;
  flex: 1;
}

.panel {
  border: 2px solid var(--fg);
  padding: 8px;
  background: var(--panel);
  min-width: 0;
}

.panel-h {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 1px;
  margin: 12px 0 6px;
  padding: 2px 4px;
  background: var(--fg);
  color: var(--bg);
  display: flex;
  justify-content: space-between;
}
.panel-h .dim { color: var(--red-dim); }
.theme-bone .panel-h .dim { color: #6b5f50; }

/* stats */
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 0 6px;
  border: 1px solid var(--fg);
  padding: 4px 6px;
  margin-bottom: 6px;
}
.stat-num { font-family: var(--ui); font-size: 22px; line-height: 1; }
.stat-lbl { font-family: var(--ui); font-size: 10px; text-align: right; color: var(--mid); }
.meter { grid-column: 1 / -1; display: flex; gap: 2px; margin-top: 4px; }
.meter i { flex: 1; height: 8px; border: 1px solid var(--dim); }
.meter i.on { background: var(--fg); border-color: var(--fg); }
.stat-red .meter i.on { background: var(--red); border-color: var(--red); }
.stat-red .stat-num { color: var(--red); }
.stat-hint { font-size: 16px; color: var(--mid); line-height: 1; }
.stat-hint b { color: var(--fg); font-weight: normal; }

/* inventory */
.inventory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.inventory li {
  aspect-ratio: 1;
  border: 1px solid var(--dim);
  display: grid;
  place-items: center;
  outline: none;
}
.inventory li[data-tip] { border-color: var(--fg); cursor: help; }
.inventory li[data-tip]:hover, .inventory li[data-tip]:focus { background: var(--red-dim); }
.icon { width: 70%; height: 70%; image-rendering: pixelated; }
.item-tip { min-height: 3.2em; font-size: 16px; color: var(--mid); margin-top: 6px; line-height: 1; }

/* ───── stage ───── */

.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.art-frame {
  position: relative;
  border: 2px solid var(--fg);
  aspect-ratio: 16 / 10;
  max-height: 48vh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}
.art-frame .scene, .title-art .scene {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.nameplate {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--ui);
  font-size: 12px;
  padding: 3px 8px;
  max-width: calc(100% - 16px);
  border: 2px solid var(--bg);
  outline: 1px solid var(--fg);
}
.nameplate span { color: var(--red); }
.theme-red .nameplate span { color: #5a0b14; }

.scanbar {
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  top: -20%;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .05), transparent);
  animation: scan 7s linear infinite;
  pointer-events: none;
}
@keyframes scan { to { top: 110%; } }

.fx-shake { animation: shake .45s steps(2) 2; }
.fx-glitch .scene { animation: glitch 1.2s steps(1) 2; }
.fx-flicker .scene { animation: flick 1.4s steps(1) 1; }

@keyframes shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(3px, -3px); }
  75% { transform: translate(-2px, -1px); }
  100% { transform: translate(0, 0); }
}
@keyframes glitch {
  0% { transform: none; filter: none; }
  10% { transform: translateX(-6px) skewX(8deg); filter: invert(1); }
  14% { transform: translateX(4px); filter: none; }
  40% { transform: scaleY(1.04); }
  44% { transform: none; filter: invert(1); }
  46% { filter: none; }
  80% { transform: translateX(3px); }
  82% { transform: none; }
}
@keyframes flick {
  0%, 12%, 30% { opacity: 1; }
  10%, 26% { opacity: .1; }
  28% { opacity: .6; }
}

/* text box (red bordered, like a dialog card) */
.textbox {
  border: 2px solid var(--red);
  outline: 1px solid var(--red-dim);
  outline-offset: 3px;
  padding: 12px 16px;
  min-height: 150px;
  cursor: pointer;
  position: relative;
}
.textbox .line { margin: 0 0 3px; }
.textbox .line.flash { color: var(--mid); }
.textbox .line.flash:last-of-type { margin-bottom: 10px; }
.textbox em { font-style: normal; color: var(--red); }
.js .textbox .line { visibility: hidden; }
.js .textbox .line.shown { visibility: visible; animation: type-in .18s steps(3); }
@keyframes type-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.skip-hint {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 6px;
  font-family: var(--ui);
  font-size: 10px;
  color: var(--dim);
  animation: blink 1s infinite steps(1);
}
.js .textbox.typing .skip-hint { display: block; }

.ending-title {
  font-family: var(--ui);
  color: var(--red);
  font-size: 15px;
  border-bottom: 1px solid var(--red);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* choices */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.js .choices.waiting { visibility: hidden; }
.choices form { margin: 0; display: flex; }

.choice {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-family: var(--body);
  font-size: 22px;
  line-height: 1;
  color: var(--fg);
  background: var(--bg);
  border: 2px solid var(--fg);
  box-shadow: 3px 3px 0 var(--dim);
  padding: 8px 10px;
  cursor: pointer;
  text-decoration: none;
}
.choice .key {
  flex: none;
  font-family: var(--ui);
  font-size: 11px;
  border: 1px solid currentColor;
  min-width: 20px;
  text-align: center;
  padding: 2px 3px;
}
.choice:hover, .choice:focus-visible {
  background: var(--fg);
  color: var(--bg);
  outline: none;
}
.choice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--dim); }
.choice.red { border-color: var(--red); color: var(--red); box-shadow: 3px 3px 0 var(--red-dim); }
.choice.red:hover, .choice.red:focus-visible { background: var(--red); color: var(--bg); }
.choice.locked {
  color: var(--dim);
  border-color: var(--dim);
  border-style: dashed;
  box-shadow: none;
  cursor: not-allowed;
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .025) 6px 8px);
}
.choice.locked .lock { font-family: var(--ui); font-size: 12px; letter-spacing: 1px; }
.choice.shaky { animation: jitter .3s infinite steps(2); color: var(--red); border-color: var(--red); }
@keyframes jitter {
  0% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
  100% { transform: translate(-1px, 1px); }
}

/* ───── right column ───── */

.card {
  border: 1px solid var(--fg);
  padding: 6px;
  text-align: center;
}
.portrait { width: 100%; max-width: 160px; display: block; margin: 0 auto 6px; image-rendering: pixelated; border: 1px solid var(--dim); }
.card-name { font-family: var(--ui); font-size: 13px; }
.card-role { font-size: 16px; color: var(--mid); }

.recs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 360px; overflow-y: auto; }
.recs form { margin: 0; }
.rec {
  width: 100%;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 0 6px;
  text-align: left;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--dim);
  padding: 4px 5px;
  cursor: pointer;
}
.rec:hover, .rec:focus-visible { border-color: var(--red); outline: none; background: var(--red-dim); }
.rec-play { grid-row: span 2; color: var(--red); }
.rec-name { font-family: var(--ui); font-size: 11px; }
.rec-date { color: var(--mid); font-size: 15px; }
.rec.heard .rec-play { color: var(--dim); }

/* ───── log ───── */

.log {
  border-top: 2px solid var(--fg);
  padding: 6px 4px 0;
  font-size: 18px;
  line-height: 1.05;
  color: var(--mid);
  text-align: center;
}
.log-line.last { color: var(--fg); }

/* ───── recording modal ───── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .82);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-box {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 2px solid var(--red);
  background: var(--bg);
  padding: 14px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--red-dim);
}
.modal-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--ui); font-size: 13px; margin-bottom: 10px; color: var(--red); }
.wave { display: flex; align-items: center; gap: 2px; height: 40px; margin-bottom: 12px; border-top: 1px solid var(--dim); border-bottom: 1px solid var(--dim); }
.wave i { flex: 1; background: var(--fg); animation: wave 0.9s infinite steps(3) alternate; }
.wave i:nth-child(3n) { animation-delay: -.3s; }
.wave i:nth-child(5n) { animation-delay: -.6s; background: var(--red); }
@keyframes wave { to { transform: scaleY(.3); } }
.transcript p { margin: 0 0 4px; }
.transcript p.note { color: var(--mid); }
.transcript em { color: var(--red); font-style: normal; }
.modal .close { margin-top: 12px; display: inline-flex; flex: none; }

/* ───── reason effects ───── */

.unstable .textbox { animation: drift 4s infinite steps(1); }
.reason-1 .crt, .reason-2 .crt { filter: contrast(1.15); }
@keyframes drift {
  0%, 100% { transform: none; }
  31% { transform: translateX(1px); }
  33% { transform: translateX(-2px); }
  35% { transform: none; }
  71% { transform: skewX(-1deg); }
  72% { transform: none; }
}

/* ───── title screen ───── */

.title-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px 0 24px;
  text-align: center;
}
.title-art { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 52vh; border: 2px solid var(--fg); overflow: hidden; }
.title {
  font-family: var(--ui);
  font-weight: normal;
  font-size: clamp(30px, 7vw, 58px);
  line-height: 1;
  margin: 6px 0 0;
  letter-spacing: 2px;
}
.title-red { color: var(--red); display: inline-block; animation: title-glitch 5s infinite steps(1); }
@keyframes title-glitch {
  0%, 100% { transform: none; text-shadow: none; }
  62% { transform: translateX(3px); text-shadow: -3px 0 var(--fg); }
  63% { transform: none; text-shadow: none; }
  88% { transform: skewX(12deg); }
  89% { transform: none; }
}
.tagline { margin: 0; color: var(--mid); }
.title-form { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(420px, 100%); }
.title-form .ask { font-family: var(--ui); font-size: 13px; }
.title-form .ask em { color: var(--red); font-style: normal; }
.title-form input {
  width: 100%;
  font-family: var(--ui);
  font-size: 20px;
  text-align: center;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--bg);
  border: 2px solid var(--fg);
  padding: 8px;
  caret-color: var(--red);
}
.title-form input:focus { outline: 2px solid var(--red); outline-offset: 2px; }
.title-form p { margin: 0; }
.choice.big { justify-content: center; font-family: var(--ui); font-size: 18px; width: 100%; flex: none; }
.endings { width: min(420px, 100%); }
.endings ul { list-style: none; margin: 0; padding: 0; text-align: left; }
.endings li { color: var(--dim); border-bottom: 1px dashed var(--dim); padding: 2px 4px; }
.endings li.found { color: var(--red); }
.warning { font-size: 17px; color: var(--dim); margin: 0; }

/* ───── responsive ───── */

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr 1fr; }
  .stage { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 600px) {
  body { font-size: 20px; }
  .crt { padding: 8px 16px 12px; }
  .topbar { flex-wrap: wrap; }
  .tb-chapters { order: 3; flex-basis: 100%; }
  .tb-actions { margin-left: auto; }
  .layout { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .choice { font-size: 20px; }
  .textbox { padding: 10px; min-height: 120px; }
  .inventory { grid-template-columns: repeat(9, 1fr); }
  .item-tip { min-height: 0; }
  .card { display: grid; grid-template-columns: 72px 1fr; gap: 0 10px; align-items: center; text-align: left; }
  .portrait { grid-row: span 3; margin: 0; }
  .log { text-align: left; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .js .textbox .line { visibility: visible; }
  .js .choices.waiting { visibility: visible; }
}

/* ───── first-person view ───── */

.view-frame { cursor: crosshair; touch-action: none; }
.view-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  outline: none;
  transition: opacity .35s steps(4);
}
.view-frame.fade canvas { opacity: 0; }
.crosshair {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px; margin: -2px 0 0 -2px;
  background: var(--fg); opacity: .7; pointer-events: none;
}
.prompt {
  position: absolute; left: 50%; top: 58%;
  transform: translateX(-50%);
  font-family: var(--ui); font-size: 13px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--fg); padding: 3px 8px;
  white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis;
  display: none; pointer-events: none;
}
.prompt.on { display: block; animation: blink 1.6s infinite steps(1); }
.prompt.red { color: var(--red); border-color: var(--red); }
.prompt.locked { color: var(--dim); border-color: var(--dim); border-style: dashed; animation: none; }
.subs {
  position: absolute; left: 6%; right: 6%; bottom: 7%;
  text-align: center; font-size: 22px; line-height: 1.1;
  color: var(--fg); text-shadow: 2px 2px 0 var(--bg), -2px -2px 0 var(--bg), 2px -2px 0 var(--bg), -2px 2px 0 var(--bg);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.subs.on { opacity: 1; }
.subs em { color: var(--red); font-style: normal; }
.touch { display: none; }
.objective .obj { color: var(--fg); font-family: var(--ui); font-size: 14px; margin-bottom: 8px; }
.textbox.objective { min-height: 0; cursor: default; }
.controls-hint {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-family: var(--ui); font-size: 11px; color: var(--dim);
}
.controls-hint b { color: var(--mid); font-weight: normal; }

@media (pointer: coarse) {
  .controls-hint { display: none; }
}
.touch-ui .controls-hint { display: none; }
.view-wrap { position: relative; }
.touch-ui .touch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; user-select: none; -webkit-user-select: none;
}
.touch-ui .dpad {
  display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(2, 52px); gap: 4px;
}
.touch-ui .touch button {
  font: inherit; font-size: 20px; color: var(--fg); background: var(--bg);
  border: 2px solid var(--fg); box-shadow: 3px 3px 0 var(--dim); touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.touch-ui .touch button:active { background: var(--fg); color: var(--bg); box-shadow: none; transform: translate(2px, 2px); }
.touch-ui .dpad [data-k="up"] { grid-column: 2; grid-row: 1; }
.touch-ui .dpad [data-k="left"] { grid-column: 1; grid-row: 2; }
.touch-ui .dpad [data-k="down"] { grid-column: 2; grid-row: 2; }
.touch-ui .dpad [data-k="right"] { grid-column: 3; grid-row: 2; }
.touch-ui .touch .use {
  width: 92px; height: 92px; border-radius: 50%;
  font-family: var(--ui); font-size: 15px; color: var(--red); border-color: var(--red); box-shadow: 3px 3px 0 var(--red-dim);
}
.touch-ui .touch .use:active { background: var(--red); color: var(--bg); }
.touch-hint { flex: 1; margin: 0; text-align: center; font-family: var(--ui); font-size: 10px; color: var(--dim); }

/* ───── clickable hotspots in story pictures ───── */

.scene .hot {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1;
  stroke-dasharray: 2 2;
  cursor: pointer;
}
.scene .hot:hover { stroke: var(--red); fill: rgba(211, 23, 47, .08); }
.hot-hint {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  font-family: var(--ui); font-size: 10px; color: var(--mid);
  background: var(--bg); padding: 2px 6px; border: 1px solid var(--dim);
  pointer-events: none;
}
.card-you { font-family: var(--ui); font-size: 10px; color: var(--red); letter-spacing: 2px; }
.choice.walk .key::after { content: "▲"; margin-left: 2px; }

/* ───── title extras, notices ───── */

.notice {
  margin: 0; padding: 6px 10px; width: min(420px, 100%);
  border: 1px dashed var(--red); color: var(--red); font-size: 18px;
}
.credits { margin: 0; font-size: 15px; color: var(--dim); }
.home-link {
  font-family: var(--ui); font-size: 12px; color: var(--mid); text-decoration: none;
  border: 1px solid var(--dim); padding: 4px 10px;
}
.home-link:hover, .home-link:focus-visible { color: var(--bg); background: var(--fg); border-color: var(--fg); outline: none; }
.noscript {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--red); color: var(--bg); text-align: center; padding: 8px; font-family: var(--ui); font-size: 12px;
}
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ───── mobile & touch polish ───── */

.view-frame canvas { object-fit: contain; background: var(--bg); }
button, .choice, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.crt {
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 960px) {
  .inventory { grid-template-columns: repeat(9, minmax(0, 52px)); }
  .portrait { max-width: 120px; }
}

@media (max-width: 600px) {
  .crt { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .topbar { font-size: 11px; gap: 6px 8px; padding: 4px 6px; }
  .tb-btn { padding: 2px 5px; }
  .hot-hint { font-size: 9px; }
  .recs { max-height: none; }
}

/* phones held sideways: give the picture the screen, put the walk pad in the dark side margins */
@media (orientation: landscape) and (max-height: 520px) {
  .crt { gap: 6px; padding-top: 6px; }
  .art-frame { max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); }
  .textbox { min-height: 0; }
  .touch-ui .touch {
    position: absolute; inset: 0; margin: 0; pointer-events: none;
    padding: 0 6px 8px; align-items: flex-end;
  }
  .touch-ui .touch button { pointer-events: auto; background: rgba(0, 0, 0, .55); }
  .touch-ui .dpad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); }
  .touch-ui .touch .use { width: 76px; height: 76px; }
  .touch-hint { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  /* story scenes: picture on the left, words and choices on the right */
  .scene-stage {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 8px;
    align-items: start;
  }
  .scene-stage .art-frame { grid-row: 1 / span 2; max-height: calc(100dvh - 70px); }
  .scene-stage .textbox { font-size: 19px; padding: 8px 10px; max-height: calc(100dvh - 160px); overflow-y: auto; }
  .scene-stage .choices { grid-template-columns: 1fr; gap: 5px; }
  .scene-stage .choice { font-size: 18px; padding: 6px 8px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .title-art { max-height: 38vh; max-height: 38dvh; }
  .title-wrap { gap: 8px; padding-top: 4px; }
  .title { font-size: 30px; }
}

/* ═════════════ PAUSE SCREEN ═════════════ */

.tb-pause { font-weight: bold; letter-spacing: -1px; min-width: 30px; }
body.paused { overflow: hidden; }

.pause {
  position: fixed; inset: 0; z-index: 45; overflow: hidden;
  background: #0a0706; color: #0a0706;
  --pz-red: #c8081f; --pz-ink: #0a0706; --pz-paper: #f4eee2;
}
.pause[hidden] { display: none; }

/* left: the frozen game, smeared into red */
.pz-red {
  position: absolute; left: 0; top: 0; bottom: 0; width: 58%;
  background: var(--pz-red);
  clip-path: polygon(0 0, 100% 0, 76% 100%, 0 100%);
  cursor: pointer; z-index: 1;
}
.pz-snap { position: absolute; inset: -20px; mix-blend-mode: multiply; opacity: .55; }
.pz-snap img, .pz-snap svg {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) blur(5px) contrast(1.3) brightness(2.1);
}
.pz-bokeh i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 150, 150, .75), rgba(255, 60, 60, .25) 60%, transparent 70%);
  mix-blend-mode: screen; filter: blur(1px);
  animation: pzDrift 9s ease-in-out infinite alternate;
}
.pz-bokeh i:nth-child(1) { width: 90px; height: 90px; left: 6%; top: 62%; }
.pz-bokeh i:nth-child(2) { width: 120px; height: 120px; left: 22%; top: 70%; animation-delay: -2s; }
.pz-bokeh i:nth-child(3) { width: 70px; height: 70px; left: 40%; top: 58%; animation-delay: -4s; }
.pz-bokeh i:nth-child(4) { width: 110px; height: 110px; left: 12%; top: 30%; animation-delay: -1s; opacity: .6; }
.pz-bokeh i:nth-child(5) { width: 60px; height: 60px; left: 50%; top: 22%; animation-delay: -6s; }
.pz-bokeh i:nth-child(6) { width: 140px; height: 140px; left: 30%; top: 8%; animation-delay: -3s; opacity: .5; }
.pz-bokeh i:nth-child(7) { width: 80px; height: 80px; left: 58%; top: 78%; animation-delay: -5s; }
.pz-bokeh i:nth-child(8) { width: 50px; height: 50px; left: 2%; top: 10%; animation-delay: -7s; }
.pz-bokeh i:nth-child(9) { width: 100px; height: 100px; left: 44%; top: 40%; animation-delay: -8s; opacity: .45; }
@keyframes pzDrift { to { transform: translate(18px, -26px) scale(1.12); } }

.pz-sparks b {
  position: absolute; color: #ffd0d0; font-size: 34px; line-height: 1; font-weight: normal;
  text-shadow: 0 0 10px #ff5a5a; animation: pzTwinkle 2.4s ease-in-out infinite;
}
.pz-sparks b:nth-child(1) { left: 14%; top: 20%; }
.pz-sparks b:nth-child(2) { left: 46%; top: 12%; animation-delay: -.6s; font-size: 22px; }
.pz-sparks b:nth-child(3) { left: 30%; top: 46%; animation-delay: -1.2s; }
.pz-sparks b:nth-child(4) { left: 8%; top: 76%; animation-delay: -1.8s; font-size: 26px; }
.pz-sparks b:nth-child(5) { left: 52%; top: 64%; animation-delay: -.9s; font-size: 18px; }
@keyframes pzTwinkle { 0%, 100% { transform: scale(.4) rotate(0deg); opacity: .3; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }

.pz-who {
  position: absolute; left: 4%; bottom: 7%; color: #fff; z-index: 2;
  transform: rotate(-4deg); text-shadow: 3px 3px 0 var(--pz-ink);
}
.pz-you { font-family: var(--ui); font-size: 12px; letter-spacing: 4px; color: var(--pz-ink); background: #fff; display: inline-block; padding: 1px 6px; text-shadow: none; }
.pz-name { font-family: var(--ui); font-size: clamp(22px, 3.4vw, 40px); line-height: 1; margin-top: 6px; }
.pz-stats { font-family: var(--body); font-size: 20px; margin-top: 4px; }

/* right: the starburst */
.pz-burst {
  position: absolute; right: 0; top: 0; bottom: 0; width: 62%;
  background: var(--pz-paper); overflow: hidden;
}
.pz-rays {
  position: absolute; left: 50%; top: 55%; width: 190vmax; height: 190vmax;
  transform: translate(-50%, -50%); fill: var(--pz-ink);
  animation: pzSpin 70s linear infinite;
}
@keyframes pzSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.pz-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.pz-stars polygon { stroke-width: 2.2; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; animation: pzStar 3s ease-in-out infinite; }
.pz-stars .st-w { fill: var(--pz-paper); stroke: var(--pz-ink); }
.pz-stars .st-b { fill: var(--pz-ink); stroke: var(--pz-paper); animation-delay: -1.5s; }
@keyframes pzStar { 50% { transform: scale(1.15) rotate(12deg); } }
.pz-num {
  position: absolute; right: 3%; bottom: 2%;
  font-family: Impact, "Arial Black", "Silkscreen", sans-serif; font-size: clamp(90px, 15vw, 220px); line-height: .8;
  color: var(--pz-paper); -webkit-text-stroke: 6px var(--pz-ink); paint-order: stroke fill;
  text-shadow: 10px 10px 0 var(--pz-ink); transform: rotate(-8deg) skewX(-6deg); letter-spacing: -8px;
}

/* the white tear down the middle */
.pz-tear {
  position: absolute; left: 33%; top: -2%; width: 12%; height: 104%; z-index: 2;
  fill: #fff; filter: drop-shadow(-6px 0 0 var(--pz-ink)); transform-origin: top;
}

/* the cut-out boy */
.pz-boy {
  position: absolute; left: 38%; bottom: -3%; height: 96vh; width: auto; z-index: 3;
  overflow: visible; transform-origin: 50% 100%;
}
.pz-boy .rim { fill: none; stroke: #fff; stroke-width: 12; stroke-linejoin: round; }
.pz-boy .ink { fill: var(--pz-ink); }
.pz-boy .hair { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: bevel; opacity: .85; }
.pz-boy .arm { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.pz-boy .hand { fill: var(--pz-ink); stroke: #fff; stroke-width: 1.6; }
.pz-boy .phone { fill: #2a2422; stroke: #fff; stroke-width: 1.2; }
.pz-boy .screen { fill: var(--pz-red); animation: pzGlow 1.8s ease-in-out infinite; }
.pz-boy .glint { fill: var(--pz-red); animation: pzBlink 4.5s steps(1) infinite; }
.pz-boy-body { transform-box: fill-box; transform-origin: 50% 100%; animation: pzBreathe 3.4s ease-in-out infinite; }
@keyframes pzBreathe { 50% { transform: scale(1.012, 1.02); } }
@keyframes pzGlow { 50% { fill: #ff5a6e; } }
@keyframes pzBlink { 0%, 92% { opacity: 1; } 93%, 96% { opacity: 0; } }

/* ransom-note letters */
.ransom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .04em; line-height: 1; white-space: nowrap; }
.rg {
  display: inline-block; font-size: calc(1em * var(--s) / 100); padding: .06em .14em;
  transform: translateY(var(--y)) rotate(var(--r)); text-transform: none;
}
.rg.sp { width: .35em; padding: 0; }
.rg.r0 { background: var(--pz-ink); color: #fff; font-family: Impact, "Arial Black", sans-serif; }
.rg.r1 { background: #fff; color: var(--pz-ink); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: bold; }
.rg.r2 { color: var(--pz-ink); font-family: var(--ui); background: var(--pz-paper); box-shadow: 0 0 0 1px var(--pz-ink); }
.rg.r3 { background: var(--pz-red); color: #fff; font-family: "Arial Black", Impact, sans-serif; }
.rg.r4 { background: #fff; color: var(--pz-ink); font-family: var(--body); outline: 2px solid var(--pz-ink); outline-offset: -2px; font-size: calc(1.25em * var(--s) / 100); }
.rg.r5 { background: var(--pz-ink); color: var(--pz-red); font-family: Georgia, serif; font-weight: bold; }

/* the banners, top right */
.pz-banners {
  position: absolute; right: 3%; top: 5%; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  transform: rotate(-9deg);
}
.pz-banner {
  font-size: clamp(22px, 3vw, 38px); padding: 8px 16px;
  background: #fff; border: 3px solid var(--pz-ink); box-shadow: 7px 7px 0 var(--pz-ink);
}
.pz-banner.b1 { margin-right: 60px; }
.pz-banner.b2 { background: var(--pz-ink); border-color: #fff; box-shadow: 7px 7px 0 var(--pz-red); margin-right: 10px; }
.pz-banner.b3 { margin-right: 40px; display: flex; flex-direction: column; align-items: flex-end; }
.pz-banner small { font-family: var(--ui); font-size: 11px; letter-spacing: 2px; margin-top: 4px; color: var(--pz-ink); }

/* the menu */
.pz-menu {
  position: absolute; right: 5%; top: 43%; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
  transform: rotate(-6deg);
}
.pz-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  font-size: clamp(18px, 2.1vw, 27px); background: none; border: 0; padding: 4px 14px; cursor: pointer;
  color: var(--pz-ink); outline: none; margin-right: calc(var(--i) * 14px);
}
.pz-item::before {
  content: ""; position: absolute; inset: -4px -10px; z-index: -1;
  background: var(--pz-ink); clip-path: polygon(4% 0, 100% 8%, 96% 100%, 0 88%);
  transform: scaleX(0); transform-origin: right; transition: transform .14s ease-out;
}
.pz-item.sel::before { transform: scaleX(1); background: var(--pz-red); }
.pz-item.sel .ransom { animation: pzJitter .5s steps(2) infinite; }
.pz-cursor { color: var(--pz-red); font-size: .9em; opacity: 0; transform: translateX(8px); transition: .12s; }
.pz-item.sel .pz-cursor { opacity: 1; transform: none; color: #fff; }
.pz-state { font-family: var(--ui); font-size: 12px; background: var(--pz-ink); color: #fff; padding: 2px 6px; }
.pz-item:disabled { opacity: .3; cursor: not-allowed; }
.pz-help {
  margin: 8px 0 0; font-family: var(--ui); font-size: 10px; color: var(--pz-ink);
  background: var(--pz-paper); padding: 2px 6px; border: 1px solid var(--pz-ink);
}
@keyframes pzJitter { 50% { transform: translate(1px, -1px) rotate(-.6deg); } }

/* ── entrance ── */
.pause.open .pz-red   { animation: pzWipe .38s cubic-bezier(.2, .9, .2, 1) both; }
.pause.open .pz-burst { animation: pzSlam .42s cubic-bezier(.2, .9, .2, 1) both; }
.pause.open .pz-tear  { animation: pzTear .32s .14s cubic-bezier(.3, 1.4, .5, 1) both; }
.pause.open .pz-boy   { animation: pzBoy .6s .12s cubic-bezier(.2, 1.3, .4, 1) both; }
.pause.open .pz-num   { animation: pzNum .5s .28s cubic-bezier(.2, 1.4, .4, 1) both; }
.pause.open .pz-who   { animation: pzRise .4s .3s ease-out both; }
.pause.open .pz-banner { animation: pzPop .38s calc(.26s + var(--i) * .08s) cubic-bezier(.2, 1.6, .4, 1) both; }
.pause.open .pz-item, .pause.open .pz-help { animation: pzSlide .34s calc(.38s + var(--i, 4) * .06s) cubic-bezier(.2, 1.2, .4, 1) both; }

@keyframes pzWipe { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } }
@keyframes pzSlam { from { transform: translateX(100%) skewX(-12deg); } }
@keyframes pzTear { from { transform: scaleY(0); } }
@keyframes pzBoy  { from { transform: translateX(70vw) rotate(6deg) scale(.9); } }
@keyframes pzNum  { from { transform: rotate(-30deg) scale(3); opacity: 0; } }
@keyframes pzRise { from { transform: translateY(40px) rotate(-4deg); opacity: 0; } }
@keyframes pzPop  { from { transform: scale(0) rotate(-25deg); opacity: 0; } }
@keyframes pzSlide { from { transform: translateX(120%) rotate(8deg); opacity: 0; } }

/* ── exit ── */
.pause.closing { animation: pzOut .3s ease-in both; pointer-events: none; }
.pause.closing .pz-boy { animation: pzBoyOut .3s ease-in both; }
@keyframes pzOut { to { opacity: 0; transform: scale(1.04); } }
@keyframes pzBoyOut { to { transform: translateX(60vw) rotate(8deg); } }
.pause.leaving { animation: pzFlash .35s steps(3) both; }
@keyframes pzFlash { 50% { filter: invert(1); } 100% { filter: invert(1) brightness(3); } }

/* ── phones ── */
@media (max-width: 700px) {
  .pz-red { width: 100%; height: 44%; bottom: auto; clip-path: polygon(0 0, 100% 0, 100% 62%, 0 100%); }
  .pause.open .pz-red { animation: none; }
  .pz-burst { width: 100%; }
  .pz-tear { display: none; }
  .pz-boy { left: auto; right: -10%; height: 62vh; bottom: 22vh; }
  .pz-who { top: 3%; bottom: auto; left: 5%; }
  .pz-name { font-size: 22px; }
  .pz-banners { top: auto; bottom: 45%; right: auto; left: 4%; align-items: flex-start; transform: rotate(-7deg); }
  .pz-banner { font-size: 20px; padding: 5px 10px; box-shadow: 5px 5px 0 var(--pz-ink); }
  .pz-banner.b1, .pz-banner.b2, .pz-banner.b3 { margin: 0; }
  .pz-banner.b3 { align-items: flex-start; }
  .pz-menu { right: 4%; left: 4%; top: auto; bottom: 3%; align-items: stretch; gap: 8px; transform: rotate(-3deg); }
  .pz-item { font-size: 20px; margin-right: 0; justify-content: flex-start; background: rgba(244, 238, 226, .85); }
  .pz-num { font-size: 120px; right: 2%; bottom: auto; top: 46%; }
  .pz-help { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .pz-boy { height: 110vh; }
  .pz-banner { font-size: 18px; padding: 4px 10px; }
  .pz-item { font-size: 17px; padding: 3px 10px; }
  .pz-menu { top: 50%; gap: 6px; }
  .pz-banners { top: 4%; gap: 6px; }
  .pz-name { font-size: 20px; }
  .pz-who { left: 3%; }
  .pz-banner.b3 { display: none; }
  .pz-num { font-size: 90px; }
  .pz-help { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pause *, .pause { animation: none !important; transition: none !important; }
}

/* ═════════════ ENEMY INTRO CARD / BESTIARY ═════════════ */

.encounter {
  position: fixed; inset: 0; z-index: 46; background: #000; overflow: hidden;
  --enc-gold: #d9c48c; --enc-bone: #e9dcc0;
}
.encounter[hidden] { display: none; }
.enc-stage { position: absolute; left: 0; right: 0; top: 9vh; bottom: 9vh; display: grid; place-items: center; }
.enc-canvas {
  width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges;
  display: block;
}
.enc-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.enc-bar { position: absolute; left: 0; right: 0; height: 9vh; background: #000; z-index: 2; }
.enc-bar.top { top: 0; } .enc-bar.bottom { bottom: 0; }
.enc-tag {
  position: absolute; left: 4%; top: calc(9vh + 14px); z-index: 3;
  font-family: var(--ui); font-size: 12px; letter-spacing: 6px; color: var(--enc-bone);
  background: rgba(0, 0, 0, .55); padding: 4px 10px; border-left: 3px solid var(--enc-bone);
}
.encounter.boss .enc-tag { color: #ff4a5c; border-color: #ff4a5c; }
.enc-title {
  position: absolute; left: 0; right: 0; bottom: calc(9vh + 4vh); z-index: 3; text-align: center;
  padding: 18px 6% 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .45) 60%, transparent);
}
.enc-epithet {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: clamp(14px, 2vw, 20px); color: #b9ad94; letter-spacing: 2px; margin-bottom: 6px;
  text-shadow: 0 0 8px #000, 0 1px 0 #000, 0 0 2px #000;
}
.enc-name {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: normal;
  font-size: clamp(28px, 5.6vw, 66px); letter-spacing: .32em; color: var(--enc-bone);
  text-shadow: 0 0 18px rgba(0, 0, 0, .9), 0 2px 0 #000;
  padding-left: .32em; /* balance the trailing letter-spacing */
}
.encounter.boss .enc-name { color: var(--enc-gold); }
.enc-rule {
  height: 2px; width: min(760px, 86%); margin: 10px auto 10px;
  background: linear-gradient(90deg, transparent, var(--enc-bone), transparent);
}
.encounter.boss .enc-rule { background: linear-gradient(90deg, transparent, #ff4a5c 30%, var(--enc-gold) 50%, #ff4a5c 70%, transparent); }
.enc-lore {
  margin: 0 auto; max-width: 640px; font-family: var(--body); font-size: clamp(18px, 2.1vw, 23px); color: #cfc4ab;
}
.enc-nav {
  position: absolute; right: 4%; bottom: calc(9vh + 10px); z-index: 4; transform: translateY(50%);
  display: flex; gap: 8px; align-items: center;
}
.enc-nav button {
  font-family: var(--ui); font-size: 12px; letter-spacing: 2px; color: var(--enc-bone);
  background: rgba(0, 0, 0, .7); border: 1px solid var(--enc-bone); padding: 8px 14px; cursor: pointer;
}
.enc-nav button:hover, .enc-nav button:focus-visible { background: var(--enc-bone); color: #000; outline: none; }
.enc-prev, .enc-next { display: none; }
.encounter.browse .enc-prev, .encounter.browse .enc-next { display: inline-block; }
.encounter.browse .enc-go { font-size: 0; }
.encounter.browse .enc-go::after { content: "CLOSE ✕"; font-size: 12px; }

/* reveal: bars close in, a white flash, the name settles, the rule sweeps out */
.encounter.reveal .enc-bar.top { animation: encBarT .5s cubic-bezier(.2, .9, .2, 1) both; }
.encounter.reveal .enc-bar.bottom { animation: encBarB .5s cubic-bezier(.2, .9, .2, 1) both; }
.encounter.reveal .enc-flash { animation: encFlash .7s ease-out both; }
.encounter.reveal .enc-canvas { animation: encZoom 6s ease-out both; }
.encounter.reveal .enc-tag { animation: encFade .4s .5s both; }
.encounter.reveal .enc-epithet { animation: encFade .6s .9s both; }
.encounter.reveal .enc-name { animation: encName 1.1s .55s cubic-bezier(.2, .8, .2, 1) both; }
.encounter.reveal .enc-rule { animation: encRule .8s .75s cubic-bezier(.2, .8, .2, 1) both; }
.encounter.reveal .enc-lore { animation: encFade .8s 1.3s both; }
.encounter.reveal .enc-nav { animation: encFade .5s 1.6s both; }
.encounter.browse.reveal .enc-name, .encounter.browse.reveal .enc-rule, .encounter.browse.reveal .enc-lore,
.encounter.browse.reveal .enc-epithet, .encounter.browse.reveal .enc-nav, .encounter.browse.reveal .enc-tag { animation-delay: 0s; animation-duration: .35s; }
.encounter.leaving { animation: encOut .28s ease-in both; }

@keyframes encBarT { from { transform: translateY(-100%); } }
@keyframes encBarB { from { transform: translateY(100%); } }
@keyframes encFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes encZoom { from { transform: scale(1.05); filter: brightness(.2); } 30% { filter: brightness(1); } }
@keyframes encFade { from { opacity: 0; } }
@keyframes encName { from { opacity: 0; letter-spacing: .9em; filter: blur(6px); } }
@keyframes encRule { from { transform: scaleX(0); } }
@keyframes encOut { to { opacity: 0; } }

@media (max-width: 700px) {
  .enc-stage { top: 12vh; bottom: 34%; }
  .enc-title { bottom: 9vh; padding-bottom: 64px; }
  .enc-name { letter-spacing: .18em; padding-left: .18em; }
  .enc-nav { left: 4%; right: 4%; bottom: calc(9vh + 12px); transform: none; justify-content: center; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .enc-bar { height: 5vh; }
  .enc-stage { top: 5vh; bottom: 5vh; }
  .enc-title { bottom: 5vh; padding-top: 8px; }
  .enc-lore { display: none; }
  .enc-nav { bottom: calc(5vh + 8px); }
}
