:root {
  --paper: #e6e0cc;
  --ink: #1d1a16;
  --accent: #9c2a2a;
  --text: #ddd6c8;
  --panel: rgba(14, 13, 12, 0.94);
  --line: #5a544a;
  --fs: 1;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
}
#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hidden {
  display: none !important;
}
button {
  font: inherit;
}

/* HUD */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  font-size: calc(14px * var(--fs));
}
#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}
#prompt,
#objective,
#say,
#timer {
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  text-shadow:
    1px 1px 0 #000,
    0 0 6px #000;
}
#prompt {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translateX(-50%);
  padding: 3px 12px;
  white-space: nowrap;
}
#say {
  position: absolute;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%);
  width: min(720px, 92vw);
  padding: 10px 16px;
  line-height: 1.8;
  text-align: center;
}
#objective {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 3px 10px;
  max-width: 60vw;
  font-size: 0.92em;
}
#timer {
  position: absolute;
  right: 12px;
  top: 10px;
  padding: 3px 10px;
  font-family: monospace;
  font-size: 1.05em;
}
#prompt:empty,
#objective:empty,
#say:empty {
  display: none;
}
#toasts {
  position: absolute;
  right: 12px;
  top: 44px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.toast {
  background: rgba(30, 26, 20, 0.88);
  border-left: 3px solid #c8b070;
  padding: 6px 12px;
  max-width: min(420px, 80vw);
  font-size: 0.9em;
  line-height: 1.6;
  animation: toastIn 0.4s ease-out;
}
.toast.adopt {
  border-color: var(--accent);
}
.toast.fade {
  opacity: 0;
  transition: opacity 0.8s;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#debug {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font: 11px monospace;
  opacity: 0.6;
  white-space: pre;
}

/* overlays and windows */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ui {
  font-size: calc(15px * var(--fs));
}
.win {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 5;
  padding: 12px;
}
.panel {
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px 22px;
  line-height: 1.75;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}
.panel h2 {
  font-size: 1.15em;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.panel .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #8a8272;
  padding: 6px 14px;
  cursor: pointer;
  text-align: left;
}
.btn:hover:not(:disabled),
.btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn.danger {
  border-color: var(--accent);
}
.dim {
  opacity: 0.65;
}
.hl {
  background: rgba(200, 170, 90, 0.25);
  padding: 0 2px;
}
.warn {
  color: #b03028;
  font-weight: 700;
}
.chip {
  display: inline-block;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 0 100%);
}
.smear {
  filter: blur(1.4px);
}
.stamp {
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 0 6px;
  display: inline-block;
  transform: rotate(-4deg);
}

/* paper document */
.paper {
  width: min(580px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px 34px 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.35), rgba(120, 100, 60, 0.12));
}
.paper .doc-title {
  font-size: 1.25em;
  font-weight: 700;
  border-bottom: 1px solid #7a7364;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.paper .doc-body {
  line-height: 1.95;
  white-space: pre-line;
  min-height: 8em;
}
.paper .doc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 0.85em;
}
.paper .doc-nav button {
  color: var(--ink);
  background: transparent;
  border: 1px solid #7a7364;
  padding: 4px 12px;
  cursor: pointer;
}
.paper .dim {
  opacity: 0.6;
}
.paper .warn {
  color: #8a1e18;
}
.paper canvas.photo {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 0 auto 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.hint {
  font-size: 0.8em;
  opacity: 0.7;
  margin-top: 14px;
  line-height: 1.7;
}
.paper .hint {
  color: var(--ink);
}

/* dialogue */
.dlg {
  position: fixed;
  left: 50%;
  bottom: 3vh;
  transform: translateX(-50%);
  width: min(820px, 96vw);
  max-height: 70vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 20px;
  z-index: 5;
  line-height: 1.8;
}
.dlg.phone {
  border-color: #4a6a7a;
}
.dlg .who {
  font-weight: 700;
  color: #c8b070;
  margin-bottom: 4px;
}
.dlg .who .tag {
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0.7;
  margin-left: 8px;
}
.dlg .line {
  min-height: 2.6em;
  margin-bottom: 10px;
}
.dlg .opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dlg .opt {
  width: 100%;
}
.dlg .opt.case {
  border-color: var(--accent);
}
.dlg .opt .seen {
  opacity: 0.5;
  font-size: 0.8em;
  margin-left: 6px;
}
.dlg .opt .lock {
  display: block;
  font-size: 0.8em;
  color: #d07060;
}
.dlg .opt .badge {
  font-size: 0.75em;
  color: #fff;
  background: var(--accent);
  padding: 0 5px;
  margin-right: 6px;
}
.dlg .skip {
  font-size: 0.75em;
  opacity: 0.6;
  text-align: right;
}

/* notebook / terminal / pc */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tabs .btn.on {
  background: rgba(200, 176, 112, 0.2);
  border-color: #c8b070;
}
.list {
  margin: 0;
  padding-left: 1.2em;
}
.list li {
  margin-bottom: 6px;
}
.rec {
  border: 1px solid var(--line);
  padding: 8px 10px;
  margin-bottom: 8px;
}
.rec .st {
  font-size: 0.85em;
  padding: 0 6px;
  margin-left: 6px;
  border: 1px solid var(--line);
}
.rec .st.adopted {
  color: #ff8a7a;
  border-color: var(--accent);
}
.rec .st.revoked {
  color: #9ab;
  text-decoration: line-through;
}
.rec .note {
  font-size: 0.85em;
  opacity: 0.7;
}
.terminal {
  font-family: 'Zen Old Mincho', monospace;
  background: #0b120d;
  border-color: #2a4a32;
  color: #bfe8c8;
}
.terminal .btn {
  color: #bfe8c8;
  border-color: #3a6a46;
}
.pc {
  background: #0f1a24;
  border-color: #2a4a62;
}
.pc input {
  font: inherit;
  width: 100%;
  padding: 6px 8px;
  background: #e8eef2;
  color: #111;
  border: 0;
}
.compare {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.compare figure {
  margin: 0;
  flex: 1 1 200px;
}
.compare canvas {
  width: 100%;
}
.compare figcaption {
  font-size: 0.85em;
  opacity: 0.8;
}
.settings label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.settings select,
.settings input[type='range'] {
  font: inherit;
  max-width: 50%;
}
body.contrast .panel,
body.contrast .dlg {
  background: #000;
  border-color: #fff;
  color: #fff;
}
body.contrast .paper {
  background: #fff;
  color: #000;
  background-image: none;
}

/* title */
#title {
  background: radial-gradient(ellipse at center, #1a1814 0%, #000 75%);
  z-index: 10;
  overflow-y: auto;
}
.title-box {
  text-align: center;
  padding: 16px;
  max-width: 640px;
}
.title-box h1 {
  font-size: clamp(40px, 9vw, 76px);
  letter-spacing: 0.3em;
  margin: 0 0 0 0.3em;
  font-weight: 700;
}
.title-box .sub {
  opacity: 0.75;
  margin: 10px 0 18px;
}
.title-box .lead {
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.85;
  margin-bottom: 26px;
}
#start,
#continue-btn {
  font: inherit;
  font-size: 18px;
  color: var(--text);
  background: transparent;
  border: 1px solid #8a8272;
  padding: 10px 46px;
  cursor: pointer;
  margin: 4px;
}
#start:hover,
#continue-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
#start:disabled {
  opacity: 0.4;
}

/* touch */
#touch {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#t-look {
  position: absolute;
  right: 0;
  top: 0;
  width: 60%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
}
#t-stick {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: auto;
  touch-action: none;
}
#t-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
#t-buttons {
  position: absolute;
  right: 20px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
  align-items: flex-end;
}
#t-buttons button,
#t-menu {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  touch-action: none;
  font-size: 13px;
}
#t-buttons button.big {
  width: 78px;
  height: 78px;
  font-size: 15px;
}
#t-menu {
  position: absolute;
  right: 14px;
  top: 46px;
  width: 44px;
  height: 44px;
  pointer-events: auto;
  font-size: 20px;
}

/* ---- guidance: aimed crosshair, the guide list, what a document taught you ---- */
#crosshair {
  transition: all 0.12s;
}
#crosshair.on {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  background: transparent;
  border: 2px solid rgba(255, 236, 170, 0.95);
}
#objective ol {
  margin: 4px 0 0;
  padding-left: 1.3em;
}
#objective li {
  margin: 2px 0;
  line-height: 1.5;
}
#objective li.done {
  opacity: 0.5;
  text-decoration: line-through;
}
#objective li.now {
  color: #ffe9a8;
  font-weight: 700;
}
#objective .tut-head {
  font-size: 0.85em;
  letter-spacing: 0.1em;
  color: #c8b070;
}
.toast.step {
  border-color: #ffe9a8;
}
.doc-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  max-height: 92vh;
}
.doc-wrap .paper {
  max-height: 70vh;
}
.gain {
  width: min(580px, 94vw);
  background: rgba(24, 22, 16, 0.95);
  border: 1px solid #c8b070;
  padding: 10px 16px;
  line-height: 1.7;
  font-size: 0.92em;
}
.gain ul {
  margin: 4px 0 0;
  padding-left: 1.2em;
}
.dlg .opt .new {
  font-size: 0.75em;
  color: #1a1408;
  background: #ffe9a8;
  padding: 0 5px;
  margin-left: 6px;
}
#skip-wrap {
  display: block;
  cursor: pointer;
}

/* the case summary */
.brief {
  align-items: flex-start;
  overflow-y: auto;
  padding-block: 4vh;
}
.brief-paper {
  max-height: none;
  width: min(640px, 94vw);
}
.brief-body h3 {
  font-size: 1.05em;
  margin: 16px 0 6px;
  border-left: 4px solid #9c2a2a;
  padding-left: 8px;
}
.brief-body ul {
  margin: 0;
  padding-left: 1.2em;
}
.brief-body li,
.brief-body p {
  line-height: 1.85;
  margin: 4px 0;
}
.brief-case {
  font-family: monospace;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  opacity: 0.8;
}
.brief-body .rule {
  border: 1px solid #7a7364;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.35);
}
.btn-paper {
  font: inherit;
  font-size: 1.05em;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  padding: 8px 40px;
  cursor: pointer;
  margin-top: 12px;
}
.btn-paper:hover,
.btn-paper:focus-visible {
  background: rgba(0, 0, 0, 0.08);
}

/* ---- photos: in documents, in conversations, the opening monologue ---- */
figure.ph {
  margin: 0 0 12px;
}
figure.ph canvas {
  width: 100%;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.dlg-pic canvas {
  width: 100%;
  max-height: 32vh;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}
.dlg .who .face {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
  border: 1px solid #8a8272;
}
.mono {
  background: #000;
  flex-direction: column;
}
.mono-box {
  width: min(900px, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  cursor: pointer;
}
.mono-pic canvas {
  width: 100%;
  max-height: 58vh;
  display: block;
}
.mono-pic {
  width: 100%;
}
.mono-text {
  white-space: pre-line;
  font-size: calc(19px * var(--fs));
  line-height: 2.1;
  text-align: center;
  min-height: 6.5em;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 1.2s,
    transform 1.2s;
}
.mono-text.in {
  opacity: 1;
  transform: none;
}
.mono-next {
  font-size: 12px;
  opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
  .mono-text {
    transition: none;
  }
}
#t-buttons button.on {
  background: rgba(200, 176, 112, 0.45);
}

/* ---- documents: what is on the paper vs. what the protagonist thinks ---- */
.paper .doc-body {
  white-space: normal;
}
.sheet {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid #b8b09a;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.sheet.k-audio {
  background: rgba(230, 236, 240, 0.7);
  border-color: #8a98a4;
}
.sheet.k-photo {
  background: rgba(255, 255, 255, 0.35);
}
.sheet-label,
.thought-label {
  font-size: 0.72em;
  letter-spacing: 0.12em;
  opacity: 0.65;
  margin-bottom: 4px;
}
.sheet-text {
  white-space: pre-line;
  line-height: 1.9;
  font-family: 'Zen Old Mincho', serif;
}
.thought {
  margin-top: 12px;
  padding: 8px 12px 8px 14px;
  border-left: 3px solid #6a5a3a;
  background: rgba(60, 50, 30, 0.08);
  font-family: 'Zen Kurenaido', 'Zen Old Mincho', cursive;
  line-height: 1.85;
  color: #3a3226;
}

/* =====================================================================================================
   The ominous skin (2026-10): dried-blood red accents, grain, scanlines, a red edge glow, stamp
   labels, headings that flicker now and then. Reading stays easy: text contrast is kept high, and
   body.calm (low-stimulus setting) / prefers-reduced-motion stop the flicker.
   ===================================================================================================== */
:root {
  --blood: #8e1b1b;
  --blood-hi: #c8302a;
  --rust: #5a2a1a;
  --ash: #0c0a0a;
  --panel: rgba(14, 10, 10, 0.95);
  --line: #4a2a26;
  --glow: 0 0 0 1px rgba(142, 27, 27, 0.55), 0 0 22px rgba(142, 27, 27, 0.28), 0 18px 50px rgba(0, 0, 0, 0.85);
  --grain: 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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* never scroll sideways: long ids and URLs wrap, pictures shrink to fit */
#ui,
#ui * {
  overflow-wrap: anywhere;
  word-break: normal;
}
.win,
.panel,
.paper,
.dlg,
.chat-log,
.nb-body,
.doc-wrap {
  overflow-x: hidden;
}
#ui img,
#ui canvas {
  max-width: 100%;
}
/* the screen behind a window: darker, with a vignette and grain */
.win {
  background:
    radial-gradient(ellipse at center, rgba(20, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.82) 80%),
    var(--grain);
}
.win::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  z-index: 0;
}
.win > * {
  position: relative;
  z-index: 1;
}
.panel,
.dlg {
  background:
    linear-gradient(180deg, rgba(60, 10, 10, 0.22), rgba(0, 0, 0, 0) 30%),
    var(--grain),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
}
.panel h2 {
  font-size: 1.2em;
  letter-spacing: 0.12em;
  color: #e8dccb;
  border-bottom: 1px solid var(--blood);
  text-shadow: 0 0 8px rgba(200, 48, 42, 0.35);
  animation: flicker 7s infinite;
}
@keyframes flicker {
  0%,
  92%,
  100% {
    opacity: 1;
  }
  93% {
    opacity: 0.55;
  }
  94% {
    opacity: 1;
  }
  96% {
    opacity: 0.75;
    transform: translateX(1px);
  }
  97% {
    transform: none;
  }
}
body.calm .panel h2,
body.calm .mono-k,
body.calm .tut-head {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .panel h2,
  .mono-k,
  .tut-head {
    animation: none !important;
  }
}
.btn {
  border-color: #6a4a44;
  background: rgba(255, 255, 255, 0.03);
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.btn:hover:not(:disabled),
.btn:focus-visible {
  background: rgba(142, 27, 27, 0.22);
  border-color: var(--blood-hi);
  box-shadow: inset 3px 0 0 var(--blood-hi);
  outline: none;
}
.btn.danger {
  border-color: var(--blood-hi);
  color: #ffd8d0;
}
.tabs .btn.on {
  background: rgba(142, 27, 27, 0.35);
  border-color: var(--blood-hi);
  color: #fff;
}
.toast {
  background: rgba(20, 8, 8, 0.92);
  border-left-color: var(--blood-hi);
  box-shadow: 0 0 14px rgba(142, 27, 27, 0.3);
}
/* a rubber-stamp label */
.stamp-l,
.dlg .opt .badge,
.mono-k,
.tip-k,
.todo-next .k {
  display: inline-block;
  color: #ffdcd4;
  background: var(--blood);
  border: 1px solid #e05a4a;
  padding: 0 7px;
  font-size: 0.72em;
  letter-spacing: 0.18em;
  transform: rotate(-2deg);
  box-shadow: 0 0 0 2px rgba(142, 27, 27, 0.35);
}
#title {
  background:
    radial-gradient(ellipse at center, #1e0c0a 0%, #000 72%),
    var(--grain);
}
.title-box h1 {
  color: #efe4d2;
  text-shadow:
    0 0 18px rgba(200, 48, 42, 0.45),
    2px 0 0 rgba(200, 30, 30, 0.35),
    -2px 0 0 rgba(30, 120, 200, 0.15);
}
#start,
#continue-btn {
  border-color: var(--blood);
  box-shadow: 0 0 16px rgba(142, 27, 27, 0.35);
}

/* ---- HUD: the guide / next lead as a card with a progress bar ---- */
#objective {
  background: linear-gradient(90deg, rgba(40, 6, 6, 0.85), rgba(10, 6, 6, 0.6));
  border-left: 3px solid var(--blood-hi);
  padding: 6px 12px 7px;
  max-width: min(420px, 70vw);
  box-shadow: 0 0 16px rgba(142, 27, 27, 0.25);
}
#objective .tut-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e8b0a0;
  font-size: 0.8em;
  letter-spacing: 0.15em;
  animation: flicker 9s infinite;
}
#objective ol {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
#objective li {
  display: flex;
  gap: 6px;
}
#objective li .ck {
  flex: 0 0 1em;
  color: #e05a4a;
}
#objective li.done {
  font-size: 0.85em;
  text-decoration: none;
  opacity: 0.45;
}
#objective li.now,
#objective .obj-now {
  color: #ffe8d8;
  font-weight: 700;
  line-height: 1.55;
}
.pbar {
  display: inline-block;
  flex: 1;
  min-width: 60px;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(200, 48, 42, 0.4);
  vertical-align: middle;
}
.pbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blood), var(--blood-hi));
  box-shadow: 0 0 8px var(--blood-hi);
}

/* ---- documents: the paper, the photos beside it on wide screens, the monologue box ---- */
.docwin {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 10px 10px 0;
}
.docwin .doc-wrap {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.docwin .doc-wrap .paper {
  max-height: 100%;
}
.paper {
  overflow-y: auto;
  box-shadow:
    0 0 0 1px rgba(80, 20, 10, 0.4),
    0 0 30px rgba(142, 27, 27, 0.25),
    0 14px 50px rgba(0, 0, 0, 0.85);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.35), rgba(120, 100, 60, 0.16)),
    radial-gradient(ellipse at 90% 100%, rgba(90, 40, 20, 0.18), rgba(0, 0, 0, 0) 45%);
}
/* the gastric pages: the paper itself looks stained */
.paper.dirty {
  background-color: #d8cba6;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(140, 100, 40, 0.28), rgba(0, 0, 0, 0) 40%),
    radial-gradient(ellipse at 80% 75%, rgba(120, 80, 30, 0.3), rgba(0, 0, 0, 0) 38%),
    radial-gradient(circle at 60% 15%, rgba(0, 0, 0, 0) 9%, rgba(110, 70, 20, 0.3) 10%, rgba(0, 0, 0, 0) 12%),
    var(--grain);
}
.paper.dirty .sheet {
  background: rgba(240, 228, 196, 0.55);
  border-color: #a08a5a;
}
.doc-body.has-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.doc-media figure.ph {
  margin: 0 0 8px;
}
.gain {
  align-self: flex-start;
  width: min(300px, 94vw);
  border-color: var(--blood-hi);
  background: rgba(20, 8, 8, 0.95);
  box-shadow: 0 0 16px rgba(142, 27, 27, 0.3);
}
.monobox {
  width: min(860px, 96vw);
  margin: 0 auto 12px;
  padding: 10px 18px 12px;
  background: linear-gradient(90deg, rgba(30, 6, 6, 0.95), rgba(10, 6, 6, 0.92));
  border: 1px solid var(--line);
  border-left: 4px solid var(--blood-hi);
  box-shadow: 0 0 22px rgba(142, 27, 27, 0.3);
  color: #f2e6d6;
  font-family: 'Zen Kurenaido', 'Zen Old Mincho', cursive;
  font-size: 1.05em;
  line-height: 1.85;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s,
    transform 0.5s;
}
.monobox.in {
  opacity: 1;
  transform: none;
}
.mono-k {
  margin-bottom: 4px;
  font-family: 'Zen Old Mincho', serif;
  animation: flicker 8s infinite;
}
@media (max-width: 900px) {
  .docwin .doc-wrap {
    flex-direction: column;
    align-items: center;
  }
  .gain {
    align-self: center;
    width: min(580px, 94vw);
  }
}
@media (min-width: 1000px) {
  .paper.wide {
    width: min(1080px, 70vw);
  }
  .doc-body.has-media {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }
  .doc-body.has-media .doc-media {
    position: sticky;
    top: 0;
  }
}

/* ---- conversations: a chat ---- */
.chatwin {
  align-items: flex-end;
  padding: 10px;
}
.dlg.chat {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: min(1040px, 98vw);
  height: min(86vh, 760px);
  max-height: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dlg.chat.phone {
  box-shadow:
    0 0 0 1px rgba(60, 100, 120, 0.6),
    0 0 22px rgba(60, 100, 120, 0.3),
    0 18px 50px rgba(0, 0, 0, 0.85);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--blood);
  background: linear-gradient(90deg, rgba(60, 10, 10, 0.55), rgba(0, 0, 0, 0.2));
  flex-wrap: wrap;
}
.chat-who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05em;
  min-width: 0;
}
.chat-who b {
  color: #f0d8c0;
}
.chat-who .tag {
  font-size: 0.75em;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid #6a8a9a;
  color: #a8c8d8;
}
.chat-who .face,
.msg .av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blood);
  box-shadow: 0 0 10px rgba(142, 27, 27, 0.45);
  flex: 0 0 auto;
  filter: contrast(1.05) saturate(0.85);
}
.face.none,
.av.none {
  display: inline-block;
  background: #2a1a1a;
}
.meters {
  display: flex;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.meter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82em;
  min-width: 150px;
}
.meter .mn {
  width: 3em;
  text-align: right;
}
.meter .mb {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #4a3030;
  min-width: 70px;
}
.meter .mb i {
  display: block;
  height: 100%;
  transition: width 0.5s;
}
.meter.a .mb i {
  background: linear-gradient(90deg, #7a2a18, #e0402a);
}
.meter.b .mb i {
  background: linear-gradient(90deg, #2a4a5a, #7ab0c8);
}
.meter.a.hot .mb {
  box-shadow: 0 0 10px #e0402a;
  animation: pulse 0.9s infinite;
}
.meter .mv {
  width: 2em;
  font-family: monospace;
  opacity: 0.8;
}
.mood-note {
  font-size: 0.78em;
  color: #ff9a88;
}
.mood-note.b {
  color: #a8d0e0;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 2px #e0402a;
  }
}
.close-x {
  margin-left: auto;
  padding: 2px 10px;
}
.chat-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.chat-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 12px 8px;
}
.chat-log {
  flex: 1 1 auto;
  min-height: 90px;
  overflow-y: auto;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}
.msg .bub {
  padding: 8px 13px;
  line-height: 1.7;
  max-width: min(78%, 620px);
  border-radius: 14px;
  white-space: pre-line;
}
.msg.them .bub {
  background: #e9e1d2;
  color: #1a1410;
  border-bottom-left-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.msg.me {
  justify-content: flex-end;
}
.msg.me .bub {
  background: linear-gradient(180deg, #7a1c18, #5a1210);
  color: #fff0ea;
  border-bottom-right-radius: 3px;
  box-shadow: 0 0 10px rgba(142, 27, 27, 0.4);
}
.msg.inner {
  justify-content: center;
}
.msg.inner .bub {
  background: transparent;
  border: 1px dashed #6a4a44;
  color: #e8dccb;
  font-family: 'Zen Kurenaido', 'Zen Old Mincho', cursive;
}
.msg.sys {
  justify-content: center;
  font-size: 0.78em;
  color: #e8a090;
  letter-spacing: 0.08em;
}
.msg.sys .bub {
  padding: 1px 10px;
  border: 1px solid #5a2a24;
  border-radius: 10px;
  background: rgba(60, 10, 10, 0.5);
}
.msg.sys.break .bub {
  font-size: 1.15em;
  color: #fff;
  background: var(--blood);
  border-color: #e05a4a;
}
.msg.sep {
  justify-content: center;
  font-size: 0.75em;
  opacity: 0.5;
}
.msg.old {
  opacity: 0.45;
}
.msg.pic .bub {
  padding: 4px;
  background: #111;
  width: min(78%, 480px);
}
.msg.pic canvas {
  width: 100%;
  display: block;
  border-radius: 10px;
}
.chat .opts {
  flex: 0 1 auto;
  max-height: 44%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #3a2420;
}
.chat .opt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
}
.chat .opt .num {
  flex: 0 0 auto;
  width: 1.6em;
  height: 1.6em;
  line-height: 1.6em;
  text-align: center;
  border: 1px solid #6a4a44;
  font-size: 0.8em;
}
.chat .opt .ol {
  flex: 1 1 260px;
  min-width: 0;
}
.chat .opt.case {
  border-color: var(--blood-hi);
  background: rgba(142, 27, 27, 0.14);
}
.chat .opt.moodopt {
  border-style: dashed;
}
.mood-tag {
  font-size: 0.75em;
  margin-left: 6px;
  color: #ffb0a0;
  border: 1px solid #8a3a30;
  padding: 0 5px;
}
.fxs {
  margin-left: 6px;
}
.fx {
  font-size: 0.7em;
  margin-right: 4px;
  padding: 0 4px;
  border-radius: 3px;
}
.fx.a.up {
  color: #ff8a70;
}
.fx.a.down,
.fx.b.up {
  color: #8ac8e0;
}
.fx.b.down {
  color: #d07060;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  padding-left: 2.2em;
}
.chip-ev {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75em;
  padding: 2px 6px 2px 2px;
  border: 1px solid #5a4a3a;
  background: rgba(255, 240, 220, 0.06);
}
.chip-ev img {
  width: 34px;
  height: 26px;
  object-fit: cover;
}
.chip-ev.miss {
  opacity: 0.45;
  filter: grayscale(1);
}
.evi-col {
  display: none;
}
@media (min-width: 1000px) {
  .chat-main {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .evi-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    border-left: 1px solid #3a2420;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
  }
  .chips {
    display: none; /* shown big in the side column instead */
  }
}
.evi-head {
  font-size: 0.8em;
  letter-spacing: 0.15em;
  color: #e8a090;
}
.evi-card {
  margin: 0;
}
.evi-card img {
  width: 100%;
  display: block;
  border: 1px solid #5a3a30;
}
.evi-card figcaption {
  font-size: 0.85em;
  padding: 3px 0;
}
.evi-card .ok,
.evi-card .ng {
  display: block;
  font-size: 0.8em;
}
.evi-card .ok {
  color: #9ad0a0;
}
.evi-card .ng {
  color: #d07060;
}
.evi-card.miss img {
  filter: grayscale(1) brightness(0.5);
}
@media (max-width: 600px) {
  .dlg.chat {
    height: 92vh;
  }
  .meter {
    min-width: 120px;
  }
  .msg .bub {
    max-width: 86%;
  }
}

/* ---- notebook: tabs on the left on wide screens; lists in two columns ---- */
.panel.nb {
  width: min(1080px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.nb-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nb-body {
  min-height: 0;
  overflow-y: auto;
}
@media (min-width: 1000px) {
  .nb-grid {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
  }
  .nb-grid .tabs {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .nb-know .list,
  .nb-memo .list,
  .nb-records .list {
    columns: 2;
    column-gap: 28px;
  }
  .nb-know .list li,
  .nb-memo .list li {
    break-inside: avoid;
  }
}
.prog {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.todo-next {
  margin: 4px 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--blood);
  background: rgba(142, 27, 27, 0.15);
}
.todo-next .k {
  margin-right: 10px;
}
.todo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.todo-room {
  border: 1px solid #3a2a26;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px;
}
.todo-room h4 {
  margin: 0 0 6px;
  font-size: 0.9em;
  color: #e8b0a0;
  letter-spacing: 0.12em;
}
.todo {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 4px 0;
  line-height: 1.5;
}
.todo .ck {
  flex: 0 0 1.2em;
  height: 1.2em;
  border: 1px solid #8a5a50;
  text-align: center;
  line-height: 1.1em;
  color: #fff;
  font-size: 0.9em;
}
.todo.done {
  opacity: 0.55;
}
.todo.done .ck {
  background: var(--blood);
  border-color: var(--blood-hi);
}

/* ---- one-time explanation cards ---- */
.tip-wrap {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 12px;
}
.tip {
  width: min(520px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 22px 16px;
  background:
    linear-gradient(180deg, rgba(70, 12, 12, 0.35), rgba(0, 0, 0, 0) 40%),
    var(--grain),
    #120c0b;
  border: 1px solid var(--blood);
  box-shadow: var(--glow);
  line-height: 1.8;
  animation: tipIn 0.35s ease-out;
}
.tip h3 {
  margin: 6px 0 8px;
  font-size: 1.15em;
  color: #f0e0cc;
}
.tip p {
  margin: 6px 0;
}
.tip .tip-ok {
  margin-top: 10px;
  float: right;
}
@keyframes tipIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}
body.contrast .dlg.chat,
body.contrast .tip,
body.contrast .monobox {
  background: #000;
  border-color: #fff;
}
body.contrast .msg.them .bub {
  background: #fff;
  color: #000;
}
.chat .opts {
  flex-shrink: 0;
}

/* ---- chat v2: the place behind the conversation; questions as tags along the bottom ---- */
.dlg.chat {
  --chat-bg: none;
  background:
    linear-gradient(180deg, rgba(8, 4, 4, 0.72), rgba(8, 4, 4, 0.55) 40%, rgba(8, 4, 4, 0.88)),
    var(--chat-bg) center / cover no-repeat,
    var(--panel);
}
.dlg.chat .chat-head {
  backdrop-filter: blur(3px);
  background: linear-gradient(90deg, rgba(60, 10, 10, 0.75), rgba(0, 0, 0, 0.45));
}
.chat-who small {
  font-weight: 400;
  font-size: 0.75em;
  opacity: 0.75;
  margin-left: 4px;
}
.chat .opts {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  padding: 10px 2px 4px;
  max-height: 40%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 20%);
}
.chat .opt {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  border-radius: 18px;
  padding: 5px 13px 5px 6px;
  background: rgba(20, 12, 12, 0.85);
  backdrop-filter: blur(2px);
  line-height: 1.45;
  text-align: left;
}
.chat .opt .num {
  border-radius: 50%;
  width: 1.55em;
  height: 1.55em;
  line-height: 1.5em;
  flex: 0 0 auto;
}
.chat .opt .ol {
  flex: 0 1 auto;
}
.chat .opt .lock {
  display: inline;
  margin-left: 6px;
}
.chat .opt.case {
  background: rgba(110, 18, 18, 0.8);
}
.chat .opt.meta {
  border-style: dashed;
  border-color: #6a5a54;
  background: rgba(0, 0, 0, 0.6);
  color: #cfc4b6;
  padding-left: 13px;
}
.chat .chips {
  display: inline-flex;
  width: auto;
  padding: 0;
  gap: 3px;
}
.chat .chip-ev {
  padding: 1px;
  font-size: 0;
  border-radius: 4px;
}
.chat .chip-ev img {
  width: 30px;
  height: 22px;
  border-radius: 3px;
}
@media (min-width: 1000px) {
  .chat .chips {
    display: none;
  }
}
.msg.me.silent .bub {
  background: rgba(40, 20, 20, 0.8);
  letter-spacing: 0.4em;
}
.msg.them .bub {
  background: rgba(236, 228, 214, 0.95);
}
.msg.sys .bub {
  backdrop-filter: blur(2px);
}

/* ---- the wristwatch ---- */
.watchwin {
  cursor: pointer;
}
.watch-box {
  text-align: center;
}
.watch-box canvas {
  width: min(360px, 80vw);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(142, 27, 27, 0.45));
}
.watch-info {
  margin-top: 6px;
  font-size: 1.15em;
  line-height: 1.8;
}

/* ---- hint, goal and stages, the timeline of facts, the people ---- */
.hint-panel {
  width: min(620px, 96vw);
}
.goal-line {
  line-height: 1.8;
  margin-bottom: 10px;
}
.goal {
  border: 1px solid var(--blood);
  background: rgba(142, 27, 27, 0.12);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.stages {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stages li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border: 1px solid #4a3430;
  font-size: 0.85em;
  opacity: 0.6;
}
.stages li .ck {
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  text-align: center;
  line-height: 1.4em;
  background: #2a1a18;
  font-size: 0.85em;
}
.stages li.done {
  opacity: 0.55;
  text-decoration: line-through;
}
.stages li.done .ck {
  background: var(--blood);
}
.stages li.now {
  opacity: 1;
  border-color: var(--blood-hi);
  color: #fff;
  box-shadow: 0 0 10px rgba(200, 48, 42, 0.35);
}
.hint-step {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--blood-hi);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.7;
}
.hint-step .lv {
  display: block;
  font-size: 0.75em;
  color: #e8a090;
  letter-spacing: 0.12em;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid #4a2a26;
}
.timeline li {
  display: grid;
  grid-template-columns: 4.6em 4em minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0 6px 10px;
  position: relative;
  line-height: 1.6;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5a4a44;
}
.timeline .tm {
  font-family: monospace;
  opacity: 0.75;
}
.timeline .kd {
  font-size: 0.8em;
  text-align: center;
  border: 1px solid #5a4a44;
  height: fit-content;
}
.timeline .t-adopt::before {
  background: var(--blood-hi);
  box-shadow: 0 0 8px var(--blood-hi);
}
.timeline .t-adopt .kd {
  background: var(--blood);
  border-color: var(--blood-hi);
  color: #fff;
}
.timeline .t-adopt .tx {
  color: #ffc8bc;
  font-weight: 700;
}
.timeline .t-revoke .tx {
  text-decoration: line-through;
  opacity: 0.8;
}
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.person {
  display: flex;
  gap: 12px;
  border: 1px solid #3a2a26;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.person img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blood);
  flex: 0 0 auto;
}
.person h4 {
  margin: 0 0 4px;
}
.person h4 small {
  font-weight: 400;
  opacity: 0.7;
  margin-left: 4px;
}
.person .role {
  display: block;
  font-size: 0.8em;
  color: #e8a090;
  font-weight: 400;
}
.pmeters {
  font-size: 0.8em;
  opacity: 0.75;
  margin-top: 4px;
}
.look {
  font-size: 0.85em;
  color: #e8d8c8;
  font-style: italic;
  max-width: 520px;
  text-align: right;
}
.look .lk {
  font-style: normal;
  font-size: 0.8em;
  margin-right: 8px;
  padding: 0 6px;
  border: 1px solid #8a3a30;
  color: #ffb0a0;
}
.msg.sys.look .bub {
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #e8d0c0;
  font-style: italic;
  font-size: 1.15em;
  letter-spacing: 0.02em;
}

/* ---- chat v3: what you came to ask, the lead question, why evidence matters ---- */
.msg.inner.lead {
  justify-content: flex-start;
}
.msg.inner.lead .bub {
  border: 1px solid var(--blood-hi);
  background: rgba(110, 18, 18, 0.55);
  color: #ffe8dc;
  font-family: 'Zen Old Mincho', serif;
  font-size: 0.9em;
}
.chat .opt.lead {
  border-color: #e0b060;
  box-shadow: 0 0 10px rgba(224, 176, 96, 0.35);
}
.lead-mark {
  color: #f0c060;
  margin-right: 4px;
}
.evi-q {
  font-size: 0.85em;
  color: #f0dccb;
  margin: 0 0 6px;
}
.evi-card .why {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  line-height: 1.6;
  color: #e8d0c0;
  border-left: 2px solid var(--blood-hi);
  padding-left: 6px;
}
.chat .chip-ev .cn {
  display: none;
}
/* ---- notebook: grouped knowledge, people with what is established, one thread per person ---- */
.know-grid,
.log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
}
.know-sec,
.log-sec {
  border: 1px solid #3a2a26;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
}
.know-sec h4,
.log-sec h4 {
  margin: 0 0 6px;
  font-size: 0.9em;
  color: #e8b0a0;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #4a2a26;
  padding-bottom: 4px;
}
.log-sec {
  max-height: 46vh;
  overflow-y: auto;
}
.log-l {
  font-size: 0.9em;
  line-height: 1.6;
  margin: 3px 0;
}
.log-l.me {
  color: #ffc8bc;
}
.established {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #5a3a34;
}
.est-h {
  font-size: 0.8em;
  color: #f0b0a0;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.established li {
  font-size: 0.88em;
}
.established li.rec-ok {
  color: #ffb8a8;
  font-weight: 700;
}
.established li.note {
  opacity: 0.8;
}
.person .list.prof li {
  font-size: 0.88em;
}
@media (max-width: 999px) {
  /* no side column on narrow screens: name the evidence on the tag itself */
  .chat .chip-ev .cn {
    display: inline;
    font-size: 11px;
    padding: 0 4px;
  }
}
.chat-lead {
  padding: 7px 14px;
  background: rgba(110, 18, 18, 0.82);
  border-bottom: 1px solid var(--blood-hi);
  color: #ffe8dc;
  font-size: 0.92em;
  line-height: 1.6;
}
.chat-lead .k {
  display: inline-block;
  margin-right: 10px;
  padding: 0 7px;
  font-size: 0.78em;
  letter-spacing: 0.15em;
  border: 1px solid #f0c060;
  color: #f0c060;
}

/* ---- player review fixes: the moves row, touch evidence, phone layout ---- */
.chat .opts-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 2px 6px;
  flex-shrink: 0;
}
.chat .opts-meta .opt {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 18px;
  padding: 4px 13px 4px 6px;
  border-style: dashed;
  border-color: #6a5a54;
  background: rgba(0, 0, 0, 0.65);
  color: #cfc4b6;
}
.chat .opts-meta .opt .num {
  border-radius: 50%;
  width: 1.55em;
  height: 1.55em;
  line-height: 1.5em;
  text-align: center;
  border: 1px solid #6a4a44;
  font-size: 0.8em;
}
.chat .opts {
  max-height: 34%;
}
.evi-inline {
  flex-shrink: 0;
  max-height: 30%;
  overflow-y: auto;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--blood);
  background: rgba(10, 4, 4, 0.92);
  font-size: 0.85em;
}
.evi-inline .evi-card {
  display: flex;
  gap: 8px;
}
.evi-inline .evi-card img {
  width: 90px;
  flex: 0 0 auto;
}
.evi-inline .tap2 {
  margin: 4px 0 0;
}
.chat .opt.armed {
  border-color: #f0c060;
  box-shadow: 0 0 10px rgba(240, 192, 96, 0.4);
}
#prompt {
  white-space: normal;
  max-width: 92vw;
  text-align: center;
}
@media (pointer: coarse) {
  .keys,
  .paper .hint,
  .tip .tip-ok kbd {
    display: none;
  }
  #say {
    bottom: 150px;
  }
  #toasts {
    top: 100px;
  }
}
@media (max-width: 600px) {
  #t-buttons {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 210px;
  }
  #t-buttons button {
    width: 56px;
    height: 56px;
    font-size: 12px;
  }
  #t-buttons button.big {
    width: 66px;
    height: 66px;
  }
  .dlg.chat {
    height: 100dvh;
    max-height: 100dvh;
  }
  .chatwin {
    padding: 0;
  }
}
