/* packages/ui-shell/src/shell.css */
:root {
  --z-modal: 50;
  --z-panel: 40;
  --z-popover: 30;
  --z-toast: 20;
  --z-status-bar: 10;
  --z-board: 0;
}
.panel {
  position: absolute;
  z-index: var(--z-panel);
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  box-sizing: border-box;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.panel-title {
  flex: 1;
}
.panel-hotkey-chip {
  flex: 0 0 auto;
}
.panel-close {
  flex: 0 0 auto;
  cursor: pointer;
}
.panel-body {
  flex: 1 1 auto;
  overflow: auto;
}
.modal {
  position: absolute;
  z-index: var(--z-modal);
}
.popover {
  position: absolute;
  z-index: var(--z-popover);
}
.toast {
  position: absolute;
  z-index: var(--z-toast);
}
.status-bar {
  position: relative;
  z-index: var(--z-status-bar);
}
.board {
  position: relative;
  z-index: var(--z-board);
}
:root {
  --ui-scale: 1;
}
html {
  font-size: calc(100% * var(--ui-scale));
}
[data-reduced-motion=true] *,
[data-reduced-motion=true] *::before,
[data-reduced-motion=true] *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}
[data-high-contrast=true] :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}
[data-high-contrast=true] button,
[data-high-contrast=true] input,
[data-high-contrast=true] select,
[data-high-contrast=true] .panel,
[data-high-contrast=true] .modal {
  border: 2px solid currentColor;
}
[data-high-contrast=true] body {
  filter: contrast(1.2);
}

/* ui/style.css */
:root {
  --bg0: #07050f;
  --bg1: #0d0a1c;
  --bg2: #151031;
  --bg3: #1d1642;
  --line: #33266f;
  --text: #ece6ff;
  --dim: #a094cf;
  --cyan: #19f0ff;
  --mag: #ff2bd6;
  --amber: #ffb62e;
  --lime: #7dff6a;
  --red: #ff3b30;
  --ink: #0d0820;
  --r: 0.7rem;
  --mono:
    ui-monospace,
    "JetBrains Mono",
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  --sans:
    ui-rounded,
    "Nunito",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
}
[data-high-contrast=true] {
  --text: #fff;
  --dim: #e0d8ff;
  --line: #8f7bff;
  --bg1: #000;
  --bg2: #0a0620;
  --bg3: #130a38;
}
* {
  box-sizing: border-box;
}
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-touch-callout: none;
}
body {
  position: fixed;
  inset: 0;
}
button,
a,
input,
[role=button] {
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
h1,
h2,
h3,
p {
  margin: 0;
}
small {
  font-size: 0.72rem;
  color: var(--dim);
}
:focus-visible {
  outline: 0.15rem solid var(--cyan);
  outline-offset: 0.12rem;
}
.muted {
  color: var(--dim);
}
.dim {
  color: var(--dim);
}
#app {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(
      120% 90% at 50% -10%,
      #1e1250 0%,
      var(--bg0) 60%);
}
#stage {
  position: absolute;
  inset: var(--sat) var(--sar) var(--sab) var(--sal);
  will-change: transform;
}
#flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle,
      #ff3b3055,
      #ff3b30cc);
  z-index: 60;
}
#fxlayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}
#modals {
  position: relative;
  z-index: 80;
}
#toasts {
  position: fixed;
  top: calc(var(--sat) + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 85;
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 28rem);
}
#input-kind {
  position: fixed;
  left: calc(var(--sal) + 0.4rem);
  bottom: calc(var(--sab) + 0.25rem);
  z-index: 70;
  font: 700 0.6rem var(--mono);
  color: var(--dim);
  opacity: 0.7;
  pointer-events: none;
}
#build-stamp {
  position: fixed;
  right: calc(var(--sar) + 0.4rem);
  bottom: calc(var(--sab) + 0.2rem);
  z-index: 70;
  font: 0.55rem var(--mono);
  color: var(--dim);
  opacity: 0.55;
  pointer-events: none;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: screen-in 0.25s ease-out;
}
@keyframes screen-in {
  from {
    opacity: 0;
  }
}
.tst {
  background: var(--bg3);
  border: 1px solid var(--cyan);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  box-shadow: 0 0 1rem #19f0ff55;
  animation: toast-in 0.25s;
}
.tst.bad {
  border-color: var(--red);
  box-shadow: 0 0 1rem #ff3b3066;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.6rem);
  }
}
.btn {
  background:
    linear-gradient(
      180deg,
      var(--bg3),
      var(--bg2));
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.5rem 0.9rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    transform 0.08s,
    box-shadow 0.15s,
    border-color 0.15s;
  touch-action: manipulation;
}
.btn:hover:not(:disabled) {
  border-color: var(--cyan);
  box-shadow: 0 0 0.9rem #19f0ff44;
}
.btn:active:not(:disabled) {
  transform: scale(0.96);
}
.btn:disabled {
  opacity: 0.4;
}
.btn.primary {
  background:
    linear-gradient(
      180deg,
      #ff4de0,
      #b3149a);
  border-color: #ff9af0;
  color: #fff;
  box-shadow: 0 0 1rem #ff2bd655;
  text-shadow: 0 1px 0 #0006;
}
.btn.danger {
  background:
    linear-gradient(
      180deg,
      #ff5a48,
      #b3170e);
  border-color: #ffa196;
  color: #fff;
  text-shadow: 0 1px 0 #0006;
}
.btn.ghost {
  background: transparent;
}
.btn.big {
  min-height: 3.4rem;
  font-size: 1.15rem;
  padding: 0.5rem 1.4rem;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}
.btn.big small {
  color: #ffffffb0;
  font-weight: 500;
  font-size: 0.7rem;
}
.icon-btn {
  min-width: 2.75rem;
  padding: 0.3rem 0.5rem;
  font-size: 1.2rem;
}
kbd {
  font: 700 0.65rem var(--mono);
  background: #0006;
  border: 1px solid #fff5;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
}
.pnl {
  background:
    linear-gradient(
      180deg,
      #19123a,
      var(--bg1));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.55rem 0.65rem;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 1.5rem #0006;
}
.pnl > h2 {
  font: 800 0.8rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pnl > h2 small {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--sans);
  font-weight: 500;
}
[data-scroll] {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  flex: 0 0 auto;
}
.topbar-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 900 1.15rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 1;
  text-shadow: 0 0 0.8rem var(--mag);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hint {
  font-size: 0.78rem;
  color: var(--dim);
  max-width: 24rem;
  text-align: right;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: #05030bcc;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: calc(var(--sat) + 0.75rem) calc(var(--sar) + 0.75rem) calc(var(--sab) + 0.75rem) calc(var(--sal) + 0.75rem);
  backdrop-filter: blur(3px);
  animation: fade 0.15s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.dlg {
  background:
    linear-gradient(
      180deg,
      #221a52,
      var(--bg1));
  border: 1px solid var(--cyan);
  border-radius: 0.9rem;
  box-shadow: 0 0 2.4rem #19f0ff44, 0 1.5rem 3rem #000a;
  padding: 1rem 1.1rem;
  width: min(100%, 30rem);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  animation: pop-in 0.2s cubic-bezier(.2, 1.4, .4, 1);
}
.dlg.wide {
  width: min(100%, 46rem);
}
@keyframes pop-in {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}
.modal-title {
  font: 900 1.1rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.modal-body {
  overflow: auto;
  min-height: 0;
  line-height: 1.45;
  display: grid;
  gap: 0.6rem;
}
.modal-body h3 {
  font: 800 0.8rem var(--mono);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.3rem 0 0.2rem;
}
.modal-body ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.25rem;
}
.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.title-bg {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}
.title-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      #07050fee 0%,
      #07050f66 40%,
      #07050fdd 100%),
    radial-gradient(
      60% 50% at 50% 55%,
      #ff2bd633,
      transparent);
}
.racks {
  width: 100%;
  height: 100%;
  display: block;
}
.led {
  animation: blink 1.6s infinite steps(2);
}
.led.l1 {
  animation-delay: .4s;
}
.led.l2 {
  animation-delay: .9s;
  animation-duration: 1.1s;
}
.led.l3 {
  animation-delay: 1.3s;
  animation-duration: 2.3s;
}
@keyframes blink {
  50% {
    opacity: 0.15;
  }
}
.title-inner {
  position: relative;
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 1rem;
  width: min(100%, 30rem);
  max-height: 100%;
}
.logo {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
}
.logo-flame {
  width: 4.2rem;
  height: 5.2rem;
  filter: drop-shadow(0 0 1rem #ff6a2b);
  animation: flicker 1.1s infinite alternate ease-in-out;
  transform-origin: 50% 100%;
}
@keyframes flicker {
  from {
    transform: scale(1, 1);
  }
  to {
    transform: scale(1.06, 1.12) rotate(1.5deg);
  }
}
.logo h1 {
  display: grid;
  text-align: center;
  font: 900 clamp(2rem, 7.5vw, 4rem)/0.95 var(--sans);
  letter-spacing: 0.04em;
  font-style: italic;
}
.logo .l1 {
  background:
    linear-gradient(
      90deg,
      var(--cyan),
      #9a7bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 0.7rem #19f0ff66);
}
.logo .l2 {
  background:
    linear-gradient(
      90deg,
      #ffd23f,
      #ff6a2b,
      var(--mag));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 1rem #ff6a2b88);
  font-size: 1.12em;
}
.tagline {
  color: var(--dim);
  text-align: center;
  font-size: 0.95rem;
  max-width: 24rem;
}
.menu {
  display: grid;
  gap: 0.6rem;
  width: min(100%, 19rem);
}
.menu-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.title-cast {
  position: absolute;
  bottom: 1.2rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
  pointer-events: none;
  opacity: 0.9;
}
@media (max-height: 740px) {
  .title-cast {
    display: none;
  }
}
.cast-face {
  width: min(11vw, 5.5rem);
  filter: drop-shadow(0 0 0.8rem #ff2bd655);
}
.title-foot {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--dim);
}
.title-foot span {
  background: #07050fcc;
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
}
.portrait {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
}
.char .mouth.talk {
  display: none;
}
.talking .char .mouth.idle,
.smug .char .mouth.idle {
  display: none;
}
.talking .char .mouth.talk,
.smug .char .mouth.talk {
  display: inline;
  animation: yap 0.22s infinite alternate;
  transform-origin: 50px 65px;
}
@keyframes yap {
  to {
    transform: scaleY(0.45);
  }
}
.char .eyes {
  animation: blinkeye 5s infinite;
  transform-origin: 50px 47px;
}
@keyframes blinkeye {
  0%, 94%, 100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.1);
  }
}
.tentacle {
  animation: wave 3s infinite alternate ease-in-out;
  transform-origin: 50px 56px;
}
.tentacle.t1 {
  animation-delay: -1s;
}
.tentacle.t2 {
  animation-delay: -2s;
}
@keyframes wave {
  to {
    transform: rotate(8deg);
  }
}
.map {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chapters {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(min-content, 1fr);
  gap: 0.7rem;
  padding: 0.3rem 0.8rem 0.6rem;
}
.chapter {
  position: relative;
  background:
    linear-gradient(
      160deg,
      #221a56,
      var(--bg1));
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.4rem;
  grid-template-rows: auto auto;
  gap: 0.4rem 0.6rem;
  min-width: 0;
}
.chapter.done {
  border-color: var(--lime);
  box-shadow: 0 0 1rem #7dff6a33;
}
.chapter.locked {
  opacity: 0.55;
  filter: saturate(0.5);
}
.chapter-head .day {
  font: 900 0.7rem var(--mono);
  color: var(--amber);
  letter-spacing: 0.14em;
}
.chapter-head h2 {
  font: 900 1.2rem var(--sans);
  line-height: 1.1;
  margin: 0.1rem 0;
}
.chapter-head p {
  color: var(--dim);
  font-size: 0.8rem;
  line-height: 1.3;
}
.chapter-boss {
  grid-row: 1;
  grid-column: 2;
  align-self: start;
}
.steps {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  align-self: end;
}
.step {
  width: 100%;
  justify-content: flex-start;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  min-height: 2.75rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}
.step-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.step small {
  margin-left: auto;
  color: inherit;
  opacity: 0.8;
}
.step.done {
  border-color: var(--lime);
  color: var(--lime);
}
.step-ico {
  font-size: 0.9rem;
}
.map-foot {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.9rem 0.6rem;
  flex: 0 0 auto;
  font: 800 0.85rem var(--mono);
}
.map-foot .lives {
  margin-right: auto;
  margin-left: 0.5rem;
}
.mini-flame {
  width: 1.4rem;
  height: 1.7rem;
}
.inc {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}
.inc::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  box-shadow: inset 0 0 0 transparent;
  transition: box-shadow 0.6s;
}
.inc[data-heat=warm]::after {
  box-shadow: inset 0 0 4rem #ff6a2b33;
}
.inc[data-heat=hot]::after {
  box-shadow: inset 0 0 6rem #ff3b3099;
  animation: throb 0.9s infinite alternate;
}
@keyframes throb {
  to {
    box-shadow: inset 0 0 8rem #ff3b30cc;
  }
}
.inc-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem;
}
.inc-title {
  display: grid;
  line-height: 1.1;
  min-width: 0;
  flex: 0 1 auto;
}
.inc-title b {
  font: 900 1rem var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inc-title small {
  font: 800 0.65rem var(--mono);
  letter-spacing: 0.12em;
  color: var(--amber);
}
.accuse-btn {
  margin-left: auto;
  padding-inline: 1.1rem;
}
.heat {
  --h: 0;
  --hue: 190;
  flex: 1 1 14rem;
  max-width: 26rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  margin-left: auto;
}
.heat-ico {
  width: 1.6rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.heat-flame {
  width: 100%;
  height: 100%;
  transform: scale(calc(0.75 + var(--h) * 0.75));
  transform-origin: 50% 100%;
  filter: hue-rotate(calc((var(--hue) - 20) * -0.0deg)) drop-shadow(0 0 calc(0.1rem + var(--h) * 0.8rem) hsl(var(--hue) 100% 55%));
  animation: flicker calc(1.1s - var(--h) * 0.7s) infinite alternate;
}
.heat-track {
  position: relative;
  flex: 1;
  height: 1.15rem;
  border-radius: 1rem;
  background: #0b0720;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 0 calc(0.2rem + var(--h) * 1.8rem) hsl(var(--hue) 100% 55% / calc(0.2 + var(--h) * 0.6));
  transition: box-shadow 0.3s;
}
.heat-fill {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      #19f0ff,
      #7dff6a 30%,
      #ffb62e 55%,
      #ff6a2b 75%,
      #ff3b30);
  clip-path: inset(0 calc((1 - var(--h)) * 100%) 0 0);
  transition: clip-path 0.35s cubic-bezier(.2, 1.2, .4, 1);
  box-shadow: 0 0 1rem #fff8;
}
.heat-ticks {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 9.6%,
      #0b072088 9.6% 10%);
}
.heat-num {
  font: 900 1.3rem var(--mono);
  min-width: 2.2ch;
  text-align: right;
  color: hsl(var(--hue) 100% 62%);
  text-shadow: 0 0 0.7rem hsl(var(--hue) 100% 55%);
}
.heat.bump .heat-track {
  animation: bump 0.3s;
}
@keyframes bump {
  40% {
    transform: scale(1.04, 1.25);
  }
}
.inc-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: 0.55rem;
  padding: 0 0.55rem 0.55rem;
  min-height: 0;
}
.mid {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.55rem;
  min-height: 0;
  min-width: 0;
}
.tabs {
  display: none;
}
.dash {
  overflow: hidden;
}
.spark-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.4rem;
}
.spark {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #0d0a24;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.3rem 0.5rem;
  text-align: left;
  min-height: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.08s;
}
.spark:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 0.9rem #19f0ff44;
}
.spark:active {
  transform: scale(0.97);
}
.spark-label {
  font: 800 0.66rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spark-svg {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}
.spark-svg .line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px var(--cyan));
}
.spark-svg .area {
  fill: #19f0ff1c;
  stroke: none;
}
.spark-svg .dot {
  fill: #fff;
  vector-effect: non-scaling-stroke;
}
.spark-val {
  font: 900 1.05rem var(--mono);
  white-space: nowrap;
}
.spark-val small {
  margin-left: 0.2rem;
  font-weight: 500;
}
.spark-check {
  position: absolute;
  top: 0.2rem;
  right: 0.4rem;
  color: var(--lime);
  font-weight: 900;
  opacity: 0;
  transform: scale(0.3);
  transition: 0.2s;
}
.spark.observed {
  border-color: var(--lime);
  background:
    linear-gradient(
      180deg,
      #10241f,
      #0d0a24);
}
.spark.observed .spark-check {
  opacity: 1;
  transform: none;
}
.spark.recovering .line {
  stroke: var(--lime);
  filter: drop-shadow(0 0 3px var(--lime));
}
.spark.recovering .area {
  fill: #7dff6a22;
}
.wit-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.3rem;
}
.wit {
  position: relative;
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  background: #0d0a24;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.2rem 0.2rem 0.25rem;
  transition:
    border-color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
  min-width: 0;
}
.wit:hover {
  border-color: var(--mag);
  transform: translateY(-0.12rem);
}
.wit.sel {
  border-color: var(--mag);
  box-shadow: 0 0 1rem #ff2bd666;
}
.wit.asked::after {
  content: "\2713";
  position: absolute;
  top: 0.1rem;
  right: 0.25rem;
  color: var(--lime);
  font-weight: 900;
  font-size: 0.8rem;
  text-shadow: 0 0 0.3rem #000;
}
.wit-name {
  font: 800 0.68rem var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.wit-role {
  font-size: 0.6rem;
  line-height: 1;
  margin-bottom: 0.05rem;
}
.testimony {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.6rem;
  margin-top: 0.45rem;
  align-items: start;
  min-height: 5.2rem;
}
.big-face {
  width: 4.6rem;
}
.bubble {
  position: relative;
  background: #f3edff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  line-height: 1.35;
  min-height: 3rem;
  box-shadow: 0.2rem 0.2rem 0 #0008;
}
.bubble::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 0.8rem;
  border: 0.45rem solid transparent;
  border-right-color: var(--ink);
  border-left: 0;
}
.bubble::after {
  content: "";
  position: absolute;
  left: -0.38rem;
  top: 0.85rem;
  border: 0.38rem solid transparent;
  border-right-color: #f3edff;
  border-left: 0;
}
.bubble.pop {
  animation: bub 0.22s cubic-bezier(.2, 1.5, .4, 1);
}
@keyframes bub {
  from {
    transform: scale(0.85);
    opacity: 0.4;
  }
}
.bubble-who {
  display: block;
  font: 800 0.65rem var(--mono);
  color: #6d2fb5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-height: 0.8rem;
}
.bubble-text {
  overflow-wrap: anywhere;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}
.tool {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.2rem 0.3rem;
  background: #0d0a24;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.08s;
}
.tool:hover {
  border-color: var(--amber);
  box-shadow: 0 0 0.8rem #ffb62e44;
}
.tool:active {
  transform: scale(0.95);
}
.tool-ico {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--amber);
}
.tool-name {
  font: 800 0.68rem var(--mono);
  white-space: nowrap;
}
.tool small {
  display: none;
}
.tool.used {
  border-color: var(--lime);
}
.tool.used .tool-ico {
  color: var(--lime);
}
.tool.used::after {
  content: "\2713";
  position: absolute;
  top: 0.05rem;
  left: 0.3rem;
  color: var(--lime);
  font-weight: 900;
  font-size: 0.75rem;
}
.console {
  background:
    linear-gradient(
      180deg,
      #060412,
      #0a0720);
}
.console-body {
  flex: 1;
  min-height: 2.5rem;
  font: 0.78rem/1.45 var(--mono);
  color: #b9ffcf;
}
.console-body p {
  margin-bottom: 0.25rem;
  overflow-wrap: anywhere;
}
.console-body .prompt {
  color: var(--amber);
  font-weight: 800;
}
.console-body .out {
  color: #c9ffe0;
}
.cork {
  background:
    radial-gradient(
      circle at 20% 20%,
      #c08a4a 0 2px,
      transparent 3px) 0 0 / 14px 14px,
    radial-gradient(
      circle at 70% 60%,
      #8d5d2c 0 2px,
      transparent 3px) 0 0 / 17px 17px,
    linear-gradient(
      160deg,
      #b5813f,
      #8b5e2c);
  border-color: #4a2f12;
  color: var(--ink);
}
.cork > h2 {
  color: #fff3d6;
  text-shadow: 0 1px 0 #000a;
}
.cork > h2 small {
  color: #f5deb0;
}
.notes {
  flex: 1;
  min-height: 3rem;
  display: grid;
  gap: 0.55rem;
  padding: 0.3rem 0.2rem 0.5rem;
  align-content: start;
}
.note {
  position: relative;
  background: #fff8c9;
  border-radius: 0.15rem;
  padding: 0.55rem 0.5rem 0.4rem;
  transform: rotate(var(--rot, 0deg));
  box-shadow: 0.15rem 0.2rem 0.4rem #0007;
  font-size: 0.74rem;
  line-height: 1.3;
}
.note.kind-metric {
  background: #d4f6ff;
}
.note.kind-witness {
  background: #ffd9f2;
}
.note.kind-tool {
  background: #fff3b8;
}
.note b {
  font: 800 0.62rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a2f8c;
  display: block;
  margin-bottom: 0.1rem;
}
.note .pin {
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      #ff9a9a,
      #d01818 60%,
      #6a0c0c);
  box-shadow: 0 0.15rem 0.2rem #0008;
}
.note.fresh {
  animation: slap 0.35s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes slap {
  from {
    transform: rotate(var(--rot)) scale(1.8) translateY(-1rem);
    opacity: 0;
  }
}
.sus-h {
  font: 800 0.72rem var(--mono);
  color: #fff3d6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0.2rem 0 0.3rem;
  text-shadow: 0 1px 0 #000a;
}
.suspects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
@keyframes stamp-in {
  from {
    transform: scale(2.2) rotate(-20deg);
    opacity: 0;
  }
}
.banner {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.4rem;
  background: #07050fcc;
  animation: fade 0.3s;
  pointer-events: none;
}
.banner h2 {
  font: 900 clamp(1.8rem, 6vw, 3.4rem) var(--sans);
  font-style: italic;
  letter-spacing: 0.06em;
  animation: stamp-in 0.5s cubic-bezier(.2, 1.8, .4, 1);
}
.banner.win h2 {
  color: var(--lime);
  text-shadow: 0 0 1.5rem var(--lime);
}
.banner.lose h2 {
  color: var(--red);
  text-shadow: 0 0 1.8rem var(--red);
}
.banner p {
  color: var(--dim);
}
.floater {
  position: fixed;
  left: 0;
  top: 0;
  font: 900 1rem var(--mono);
  color: var(--red);
  text-shadow: 0 0 0.5rem #000, 0 0 0.8rem #ff3b30;
  white-space: nowrap;
  will-change: transform;
}
.floater.good {
  color: var(--lime);
  text-shadow: 0 0 0.5rem #000, 0 0 0.8rem #7dff6a;
  font-size: 1.4rem;
}
i.zap-p {
  position: fixed;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  box-shadow: 0 0 0.4rem currentColor;
}
.boss {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.boss-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0 0.7rem 0.7rem;
}
.boss-panel {
  gap: 0.6rem;
  overflow: hidden;
}
.boss-id {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.7rem;
  align-items: center;
}
.boss-id h2 {
  font: 900 1.1rem var(--sans);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  margin: 0;
}
.boss-face {
  transition: transform 0.2s;
}
.boss-face.smug {
  transform: scale(1.06) rotate(-2deg);
}
.boss-bubble {
  min-height: 4rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.boss-bubble::before,
.boss-bubble::after {
  left: 1.6rem;
  top: -0.55rem;
  border: 0.45rem solid transparent;
  border-bottom-color: var(--ink);
  border-top: 0;
}
.boss-bubble::after {
  left: 1.73rem;
  top: -0.38rem;
  border: 0.38rem solid transparent;
  border-bottom-color: #f3edff;
  border-top: 0;
}
.boss-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.8rem;
  align-items: end;
}
.stat-v {
  font: 900 1.6rem var(--mono);
  color: var(--amber);
  display: block;
  line-height: 1;
}
.goal {
  grid-column: 1 / -1;
  height: 0.7rem;
  border-radius: 1rem;
  background: #0b0720;
  border: 1px solid var(--line);
  overflow: hidden;
}
.goal-fill {
  height: 100%;
  width: 0;
  background:
    linear-gradient(
      90deg,
      var(--mag),
      var(--amber));
  transition: width 0.4s;
  box-shadow: 0 0 0.8rem var(--mag);
}
.board-area {
  container-type: size;
  min-height: 0;
  min-width: 0;
  display: grid;
  place-items: center;
}
.board-frame {
  width: min(100cqw, 100cqh);
  height: min(100cqw, 100cqh);
  padding: 0.4rem;
  background:
    linear-gradient(
      160deg,
      #1d1642,
      #0a0720);
  border: 1px solid var(--cyan);
  border-radius: 0.9rem;
  box-shadow: 0 0 2rem #19f0ff33, inset 0 0 2rem #000a;
}
.b3 {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  background: repeating-conic-gradient(#ffffff08 0 25%, transparent 0 50%) 0 0 / calc(200% / var(--w)) calc(200% / var(--h));
}
.tile {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% / var(--w));
  height: calc(100% / var(--h));
  padding: 4%;
  background: none;
  border: 0;
  transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%));
  transition: transform 0.26s cubic-bezier(.3, 1.35, .5, 1);
  touch-action: none;
  border-radius: 0.5rem;
}
.tile-art,
.junk-art {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 0 4px currentColor);
}
.tile:hover .tile-art {
  filter: brightness(1.3);
}
.tile.sel {
  z-index: 3;
}
.tile.sel .tile-art {
  transform: scale(1.15);
  filter: brightness(1.5) drop-shadow(0 0 8px #fff);
}
.tile.cursor:focus-visible {
  outline: 0.15rem solid #fff;
  outline-offset: -0.1rem;
  border-radius: 0.5rem;
}
.tile.pop {
  animation: tpop 0.23s ease-in forwards;
  z-index: 2;
}
@keyframes tpop {
  40% {
    transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%)) scale(1.3);
    filter: brightness(2);
  }
  to {
    transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%)) scale(0);
    opacity: 0;
  }
}
.tile.dissolve {
  animation: tdis 0.25s steps(5) forwards;
}
@keyframes tdis {
  to {
    opacity: 0;
    transform: translate(calc(var(--c) * 100% + 8%), calc(var(--r) * 100%)) skewX(30deg) scale(1.2);
  }
}
.tile.spawn {
  animation: tspawn 0.3s;
}
@keyframes tspawn {
  0% {
    filter: brightness(3);
  }
}
.tile.nope {
  animation: nope 0.3s;
}
@keyframes nope {
  25% {
    translate: -4% 0;
  }
  75% {
    translate: 4% 0;
  }
}
.tile.glitch-in {
  animation: gin 0.5s steps(6);
}
@keyframes gin {
  from {
    opacity: 0;
    filter: hue-rotate(90deg) brightness(3);
  }
}
.tile.zap .tile-art {
  animation: tspawn 0.2s;
}
.junk .junk-art {
  filter: drop-shadow(0 0 5px var(--mag));
}
.junk .gl.a {
  animation: gl 0.5s infinite steps(2);
}
.junk .gl.b {
  animation: gl 0.7s infinite steps(3) reverse;
}
@keyframes gl {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(-3px);
  }
}
.junk {
  animation: jitter 1.3s infinite steps(1);
}
@keyframes jitter {
  0% {
    translate: 0 0;
  }
  90% {
    translate: 2% 0;
  }
  95% {
    translate: -2% 1%;
  }
}
.results {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.8rem;
  min-height: 0;
  overflow: hidden;
}
.res-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 0 0 auto;
}
.res-head .stamp {
  width: 3.6rem;
  height: 3.6rem;
  flex: 0 0 auto;
  animation: stamp-in 0.5s cubic-bezier(.2, 1.8, .4, 1);
}
.res-head.win {
  color: var(--lime);
}
.res-head.lose {
  color: var(--red);
}
.res-head h1 {
  font: 900 clamp(1.4rem, 4vw, 2.2rem) var(--sans);
  font-style: italic;
  letter-spacing: 0.05em;
  text-shadow: 0 0 1.2rem currentColor;
}
.res-head p {
  color: var(--dim);
}
.res-body {
  flex: 1;
  min-height: 0;
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.7rem;
}
.score,
.lesson {
  overflow: auto;
}
.score-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}
.score-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font: 700 0.85rem var(--mono);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.25rem;
  animation: line-in 0.25s;
}
.score-lines li.neg b {
  color: var(--red);
}
.score-lines li b {
  color: var(--lime);
}
@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-0.6rem);
  }
}
.score-sum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
  padding-top: 0.5rem;
  font: 900 0.9rem var(--mono);
  color: var(--dim);
}
.score-total {
  font: 900 2.2rem var(--mono);
  color: var(--amber);
  text-shadow: 0 0 1rem #ffb62e88;
}
.score-total.done {
  animation: bump 0.4s;
}
.rank {
  color: var(--cyan);
  font: 800 0.85rem var(--mono);
  margin-top: 0.3rem;
}
.lesson {
  background:
    linear-gradient(
      160deg,
      #1f1750,
      var(--bg1));
  border-color: var(--amber);
}
.lesson > h2 {
  color: var(--amber);
}
.culprit-name {
  font: 900 1.4rem var(--sans);
  color: var(--text);
  margin-bottom: 0.3rem;
}
.lesson-txt {
  font-size: 1.02rem;
  line-height: 1.5;
}
.fix {
  margin-top: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: #0e2a22;
  border: 1px solid var(--lime);
  border-radius: 0.6rem;
  font-size: 0.9rem;
}
.stats {
  margin-top: 0.5rem;
  font-size: 0.78rem;
}
.boss-res {
  width: 7rem;
  margin-bottom: 0.5rem;
}
.res-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
  align-items: center;
}
.daily,
.settings {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.daily-body {
  flex: 1;
  min-height: 0;
  align-items: start;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.7rem;
  padding: 0 0.8rem 0.8rem;
}
.daily-card {
  gap: 0.7rem;
  overflow: auto;
}
.daily-card h2 {
  font: 900 1.5rem var(--sans);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
}
.daily-card .date {
  font: 800 0.75rem var(--mono);
  color: var(--amber);
  letter-spacing: 0.12em;
}
.daily-card p {
  color: var(--dim);
  line-height: 1.45;
}
.streak {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.streak-flame {
  width: 2.6rem;
  height: 3.2rem;
  filter: drop-shadow(0 0 0.8rem #ff6a2b);
  animation: flicker 1s infinite alternate;
}
.streak b {
  display: block;
  font: 900 1.6rem var(--mono);
  color: var(--amber);
  line-height: 1;
}
.board-list {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.3rem;
  font: 700 0.9rem var(--mono);
}
.board-list li {
  padding-left: 0.3rem;
}
.board-list li b {
  float: right;
  color: var(--lime);
}
.settings-body {
  margin: 0 0.8rem 0.8rem;
  flex: 1;
  gap: 0.2rem;
  max-width: 46rem;
  width: calc(100% - 1.6rem);
  align-self: center;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.3rem;
  border-bottom: 1px solid var(--line);
}
.set-row > div:first-child {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.set-row b {
  font-size: 1rem;
}
.toggle {
  position: relative;
  width: 3.9rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  display: block;
}
.toggle::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  top: 50%;
  height: 1.9rem;
  transform: translateY(-50%);
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #0b0720;
  transition: background 0.2s, border-color 0.2s;
}
.toggle i {
  position: absolute;
  left: 0.4rem;
  top: 50%;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: -0.7rem;
  border-radius: 50%;
  background: var(--dim);
  transition: transform 0.2s, background 0.2s;
}
.toggle[aria-checked=true]::before {
  background: #17413a;
  border-color: var(--lime);
}
.toggle[aria-checked=true] i {
  transform: translateX(1.5rem);
  background: var(--lime);
  box-shadow: 0 0 0.6rem var(--lime);
}
.range {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(14rem, 45%);
}
.range input {
  flex: 1;
  accent-color: var(--mag);
  min-height: 2.75rem;
  min-width: 0;
}
.range output {
  font: 800 0.85rem var(--mono);
  min-width: 3.2ch;
  text-align: right;
}
.intro .modal-body p {
  font-size: 1.02rem;
}
@media (max-width: 759px), (max-height: 559px) {
  .inc-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .mid {
    display: contents;
  }
  .dash,
  .wits,
  .tools,
  .console,
  .cork {
    display: none;
  }
  .inc[data-tab=dash] .dash,
  .inc[data-tab=people] .wits,
  .inc[data-tab=tools] .tools,
  .inc[data-tab=tools] .console,
  .inc[data-tab=board] .cork {
    display: flex;
  }
  .inc[data-tab=tools] .inc-body {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    padding: 0.3rem 0.5rem 0.4rem;
    background: #0a0720;
    border-top: 1px solid var(--line);
  }
  .tab {
    position: relative;
    min-height: 2.75rem;
    border-radius: 0.6rem;
    background: var(--bg2);
    border: 1px solid var(--line);
    font: 800 0.75rem var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .tab[aria-pressed=true] {
    background: var(--mag);
    border-color: #ff9af0;
    color: #fff;
  }
  .tab-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.3rem;
    font: 800 0.6rem var(--mono);
    background: var(--amber);
    color: var(--ink);
    border-radius: 1rem;
    padding: 0 0.3rem;
    font-style: normal;
  }
  .inc-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "back title accuse" "heat heat heat";
    gap: 0.3rem 0.5rem;
    padding: 0.4rem 0.5rem 0.2rem;
  }
  .inc-top > .back {
    grid-area: back;
  }
  .inc-title {
    grid-area: title;
  }
  .accuse-btn {
    grid-area: accuse;
    margin: 0;
  }
  .heat {
    grid-area: heat;
    max-width: none;
    margin: 0;
  }
  .spark-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wit-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tool small {
    display: none;
  }
  .dash,
  .wits,
  .tools,
  .cork {
    overflow: auto;
  }
  .console {
    min-height: 0;
  }
  .inc-body {
    overflow: auto;
  }
  .boss-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .boss-id {
    grid-template-columns: 4rem 1fr;
  }
  .boss-panel {
    padding: 0.4rem 0.5rem;
    gap: 0.35rem;
  }
  .boss-bubble {
    min-height: 2.6rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }
  .boss-bubble::before,
  .boss-bubble::after {
    display: none;
  }
  .hint {
    display: none;
  }
  .res-body,
  .daily-body {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
  }
  .res-body > .pnl {
    overflow: visible;
    flex: 0 0 auto;
  }
  .chapters {
    grid-template-columns: minmax(0, 1fr);
  }
  .title-cast {
    display: none;
  }
}
@media (min-width: 560px) and (max-width: 759px), (min-width: 560px) and (max-height: 559px) {
  .spark-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .wit-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-height: 559px) {
  .topbar {
    padding: 0.25rem 0.6rem;
  }
  .btn {
    min-height: 2.75rem;
  }
  .logo-flame {
    width: 2.4rem;
    height: 3rem;
  }
  .logo h1 {
    font-size: 1.8rem;
  }
  .tagline {
    display: none;
  }
  .title-inner {
    gap: 0.5rem;
  }
  .menu {
    grid-template-columns: 1fr 1fr;
    width: min(100%, 26rem);
  }
  .menu .btn.big {
    min-height: 2.75rem;
    font-size: 0.95rem;
  }
  .menu-row {
    grid-column: 1 / -1;
  }
  .results {
    gap: 0.4rem;
    padding: 0.5rem;
  }
  .res-head .stamp {
    width: 2.4rem;
    height: 2.4rem;
  }
  .res-head p {
    display: none;
  }
  .boss-id {
    grid-template-columns: 3rem 1fr;
  }
  .boss-stats {
    grid-template-columns: auto auto 1fr;
  }
  .dlg {
    padding: 0.6rem 0.8rem;
  }
  .chapter {
    padding: 0.4rem;
  }
}
@media (min-width: 760px) and (min-height: 560px) and (max-width: 1100px) {
  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-height: 559px) {
  #input-kind,
  #build-stamp {
    opacity: 0;
  }
}
@media (hover: none) {
  .btn:hover:not(:disabled),
  .spark:hover,
  .tool:hover,
  .wit:hover {
    box-shadow: none;
    transform: none;
  }
}
.legend {
  margin-top: auto;
  display: grid;
  gap: 0.6rem;
}
.legend-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.6rem;
  align-items: center;
}
.legend-row span {
  display: grid;
  gap: 0.1rem;
}
.legend-row b {
  font-size: 0.82rem;
}
.case {
  margin-top: 0.8rem;
}
.case h3 {
  font: 800 0.75rem var(--mono);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.case ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
}
.case li {
  border-left: 3px solid var(--line);
  padding-left: 0.5rem;
  color: var(--dim);
}
.case li b {
  color: var(--text);
  font: 800 0.7rem var(--mono);
  text-transform: uppercase;
}
.case li.k-witness {
  border-color: var(--mag);
}
.case li.k-tool {
  border-color: var(--amber);
}
.case li.k-metric {
  border-color: var(--cyan);
}
.daily-cast {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 4.4rem));
  gap: 0.4rem;
}
.board-list.empty {
  list-style: none;
  padding-left: 0;
}
@media (max-height: 559px) {
  .daily-cast,
  .daily-card > p {
    display: none;
  }
}
@media (max-width: 759px), (max-height: 559px) {
  .legend {
    display: none;
  }
  .daily-cast {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.25rem 0.6rem;
  min-height: 2.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dim);
  background: #0d0a24;
}
.step.now {
  border-color: var(--mag);
  color: var(--text);
  box-shadow: 0 0 0.8rem #ff2bd655;
}
.step.done {
  border-color: var(--lime);
  color: var(--lime);
}
.step small {
  margin-left: auto;
  color: inherit;
}
.chapter.current {
  border-color: var(--mag);
  box-shadow: 0 0 1.2rem #ff2bd644;
}
.lives {
  color: var(--red);
  letter-spacing: 0.1em;
}
.map-foot .lives {
  font-size: 1.1rem;
}
.demand {
  display: grid;
  gap: 0.25rem;
  background: #0d0a24;
  border: 1px solid var(--amber);
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
}
.demand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 0.85rem var(--mono);
}
.demand-ico {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}
.demand-ico svg {
  width: 100%;
  height: 100%;
}
.boss-stats {
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
}
.hpfill {
  background:
    linear-gradient(
      90deg,
      var(--red),
      var(--amber));
  box-shadow: 0 0 0.8rem var(--red);
}
.stat-v.hp {
  color: var(--red);
}
.stat-v.junkn {
  color: var(--mag);
}
.lives-line {
  flex: 0 0 auto;
  font: 800 0.9rem var(--mono);
}
.twist {
  margin-top: 0.5rem;
  font-style: italic;
}
@media (max-height: 559px) and (min-width: 560px) {
  .boss-body {
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .boss-panel {
    overflow: auto;
  }
  .boss-id h2 {
    font-size: 0.95rem;
  }
  .boss-id small {
    display: none;
  }
}
.dlg {
  position: relative;
}
.btn-ico {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}
.inc {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.inc-top {
  flex-wrap: nowrap;
}
.hint-btn,
.explain-btn {
  padding-inline: 0.7rem;
}
.hint-btn[disabled] {
  opacity: 0.35;
}
.heat-state {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.05rem;
  font: 800 0.58rem var(--mono);
  letter-spacing: 0.1em;
  color: var(--dim);
  white-space: nowrap;
}
.inc.paused .heat-state {
  color: var(--amber);
}
.inc.paused .heat-track {
  filter: saturate(0.5);
}
.inc.paused .heat-flame {
  animation-play-state: paused;
}
.heat {
  margin-bottom: 0.55rem;
}
.problem {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  text-align: left;
  margin: 0 0.55rem 0.4rem;
  padding: 0.35rem 0.7rem;
  background:
    linear-gradient(
      90deg,
      #3a0f1d,
      #1b0f33);
  border: 1px solid #a02a45;
  border-radius: 0.6rem;
}
.problem b {
  font: 900 0.62rem var(--mono);
  letter-spacing: 0.12em;
  color: #ff8aa0;
  white-space: nowrap;
}
.problem-txt {
  font-size: 0.86rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.problem.open .problem-txt {
  -webkit-line-clamp: unset;
  display: block;
}
.cork {
  flex-direction: column;
}
.cork .notes {
  flex: 1 1 0;
  min-height: 4.5rem;
}
.accuse-zone {
  flex: 0 1 auto;
  max-height: calc(100% - 3.4rem);
  min-height: 0;
  padding-top: 0.2rem;
  border-top: 2px dashed #5b3a15;
}
.sus-h small {
  text-transform: none;
  letter-spacing: 0;
  color: #f5deb0;
  font-family: var(--sans);
  font-weight: 600;
}
.suspects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.4rem;
}
.sus {
  position: relative;
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0.45rem;
  align-items: start;
  text-align: left;
  background: #fffdf0;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0.5rem;
  padding: 0.3rem 0.4rem;
  min-height: 3.6rem;
  overflow: hidden;
  box-shadow: 0.1rem 0.15rem 0 #0006;
  transition: transform 0.1s, box-shadow 0.15s;
}
.sus .portrait {
  grid-row: 1 / span 2;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.35rem;
}
.sus > * {
  min-width: 0;
}
.sus-name {
  font: 900 0.74rem/1.15 var(--sans);
  overflow-wrap: anywhere;
}
.sus-note {
  grid-column: 2;
  font: 600 0.64rem/1.25 var(--sans);
  color: #4a3a6a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sus.open:hover {
  transform: translateY(-0.1rem);
}
.sus.sel {
  border-color: var(--mag);
  box-shadow: 0 0 0 2px var(--mag), 0 0 1rem #ff2bd699;
  background: #fff0fb;
}
.sus.ruled {
  background: #d8d2c0;
  opacity: 0.75;
}
.sus.ruled .sus-name {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #6a1b9a;
}
.sus.ruled .sus-note {
  color: #5a2f8c;
  font-weight: 800;
}
.sus.accused {
  background: #ffd9d4;
  border-color: var(--red);
}
.sus.accused .sus-name {
  text-decoration: line-through;
  text-decoration-color: var(--red);
}
.sus.accused .stamp {
  position: absolute;
  right: -0.2rem;
  bottom: -0.3rem;
  width: 3.2rem;
  height: 3.2rem;
  color: var(--red);
  opacity: 0.85;
  transform: rotate(-14deg);
  animation: stamp-in 0.35s cubic-bezier(.2, 1.8, .4, 1);
}
.sus-wrong {
  position: absolute;
  right: 0.3rem;
  top: 0.2rem;
  font: 900 0.6rem var(--mono);
  font-style: normal;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--red);
  padding: 0.05rem 0.3rem;
  border-radius: 0.2rem;
  transform: rotate(4deg);
}
.sus.lone {
  border-color: var(--lime);
  animation: lone 0.9s infinite alternate ease-in-out;
}
.sus-know {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font: 900 0.62rem var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--lime);
  padding: 0.12rem;
}
.sus.lone {
  padding-bottom: 1.35rem;
}
@keyframes lone {
  from {
    box-shadow: 0 0 0 0 #7dff6a99;
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 1.1rem 0.3rem #7dff6acc;
    transform: scale(1.025);
  }
}
.fixzone {
  margin-top: 0.5rem;
  padding: 0.45rem;
  background: #2a0f3c;
  border: 2px solid var(--mag);
  border-radius: 0.6rem;
  color: var(--text);
  animation: pop-in 0.18s ease-out;
}
.fixzone h3 {
  font: 800 0.72rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.35rem;
}
.fixrow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.35rem;
}
.fixcard {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  background: #0d0a24;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.35rem 0.5rem;
  min-height: 2.75rem;
}
.fixcard b {
  font-size: 0.8rem;
}
.fixcard small {
  font-size: 0.66rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fixcard:hover:not(:disabled) {
  border-color: var(--cyan);
}
.fixcard.sel,
.fixcard[aria-pressed=true] {
  border-color: var(--mag);
  background: #3a1450;
  box-shadow: 0 0 0.9rem #ff2bd655;
}
.fixcard:disabled {
  opacity: 0.4;
  text-decoration: line-through;
}
.confirm {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.4rem;
}
.confirm p {
  font-size: 0.8rem;
  color: var(--dim);
}
.confirm.ready p {
  color: var(--text);
  font-weight: 700;
}
.confirm-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.hinted {
  animation: hinted 0.8s infinite alternate;
  border-color: var(--amber) !important;
}
@keyframes hinted {
  to {
    box-shadow: 0 0 1.2rem 0.2rem #ffb62ecc;
  }
}
.note.kind-hint {
  background: #ffe9b8;
}
.wit.react {
  animation: react 0.5s;
}
@keyframes react {
  30% {
    transform: translateY(-0.3rem) scale(1.08);
    border-color: var(--amber);
  }
}
.kicker {
  font: 900 0.7rem var(--mono);
  letter-spacing: 0.14em;
  color: var(--amber);
}
.dlg.reading {
  width: min(100%, 28rem);
  border-color: var(--amber);
  padding-right: 4.2rem;
}
.dlg.reading.kind-witness {
  border-color: var(--mag);
}
.dlg.reading.kind-metric {
  border-color: var(--cyan);
}
.dlg.reading.kind-hint {
  border-color: var(--lime);
}
.dlg.reading.tappable {
  cursor: pointer;
}
.ring {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
}
.ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 4;
}
.ring-bg {
  stroke: #ffffff22;
}
.ring-fg {
  stroke: var(--amber);
  stroke-linecap: round;
}
.ring-n {
  font: 900 0.95rem var(--mono);
  color: var(--amber);
}
.reading-body {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.reading-face {
  width: 4.4rem;
  flex: 0 0 auto;
}
.reading-text {
  font-size: 1.05rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.quip {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 36;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  max-width: min(27rem, calc(100% - 1.2rem));
  pointer-events: none;
  background: #f3edff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  padding: 0.35rem 0.6rem 0.35rem 0.4rem;
  box-shadow: 0.2rem 0.2rem 0 #000a, 0 0 1.2rem #19f0ff44;
}
.quip[hidden] {
  display: none;
}
.quip.in {
  animation: quip-in 0.28s cubic-bezier(.2, 1.5, .4, 1);
}
@keyframes quip-in {
  from {
    transform: translateY(0.8rem) scale(0.9);
    opacity: 0;
  }
}
.quip-face {
  width: 2.6rem;
  flex: 0 0 auto;
}
.quip-face svg {
  width: 100%;
  display: block;
}
.quip-who {
  display: block;
  font: 800 0.6rem var(--mono);
  color: #6d2fb5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.quip-text {
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 600;
}
[data-reduced-motion=true] .quip.in,
[data-reduced-motion=true] .sus.lone,
[data-reduced-motion=true] .hinted,
[data-reduced-motion=true] .wit.react {
  animation: none;
}
[data-reduced-motion=true] .sus.lone {
  box-shadow: 0 0 0 3px var(--lime);
}
.tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 95;
  max-width: min(19rem, calc(100vw - 1rem));
  padding: 0.5rem 0.7rem;
  background: #fffbe0;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 600;
  box-shadow: 0.15rem 0.2rem 0 #000a;
  pointer-events: none;
}
.tip[hidden] {
  display: none;
}
.inc[data-explain=true] [data-tip]:not(.heat) {
  outline: 2px dashed var(--amber);
  outline-offset: -2px;
}
.explain-btn[aria-pressed=true] {
  background: var(--amber);
  color: var(--ink);
  border-color: #fff3c4;
}
.coach {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}
.coach-ring {
  position: absolute;
  border: 3px solid var(--amber);
  border-radius: 0.8rem;
  box-shadow: 0 0 0 100vmax #05030b88, 0 0 1.4rem var(--amber);
  animation: coach-pulse 1s infinite alternate;
  transition: all 0.25s;
}
@keyframes coach-pulse {
  to {
    border-color: #fff3c4;
  }
}
.coach-arrow {
  position: absolute;
  font-size: 1.4rem;
  color: var(--amber);
  text-shadow: 0 0 0.6rem #000;
  animation: arrow-bob 0.6s infinite alternate;
}
@keyframes arrow-bob {
  to {
    transform: translateY(0.3rem);
  }
}
.coach-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(26rem, calc(100% - 1.2rem));
  pointer-events: auto;
  background:
    linear-gradient(
      180deg,
      #221a52,
      var(--bg1));
  border: 2px solid var(--amber);
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: 0 0 2rem #000c;
}
.coach-card[data-pos=bottom] {
  bottom: 0.6rem;
}
.coach-card[data-pos=top] {
  top: 0.6rem;
}
.coach-text {
  font-size: 0.95rem;
  line-height: 1.4;
}
.coach-count {
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 800;
}
.coach-btns {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
[data-reduced-motion=true] .coach-ring,
[data-reduced-motion=true] .coach-arrow {
  animation: none;
  transition: none;
}
.headline {
  margin: 0 0.8rem 0.6rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--cyan);
  border-radius: 0.7rem;
  background: #0a1c2e;
  display: grid;
  gap: 0.15rem;
}
.headline b {
  font: 900 0.65rem var(--mono);
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.headline .hl-title {
  font-weight: 800;
}
.headline small {
  line-height: 1.3;
}
@media (max-width: 759px), (max-height: 559px) {
  .inc-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "back title hint accuse" "heat heat heat explain";
    gap: 0.3rem 0.45rem;
    padding: 0.35rem 0.5rem 0.1rem;
  }
  .inc-top > .back {
    grid-area: back;
  }
  .inc-title {
    grid-area: title;
  }
  .hint-btn {
    grid-area: hint;
  }
  .accuse-btn {
    grid-area: accuse;
    margin: 0;
  }
  .heat {
    grid-area: heat;
    max-width: none;
    margin: 0 0 0.5rem;
  }
  .explain-btn {
    grid-area: explain;
    align-self: start;
  }
  .hint-btn .lbl,
  .explain-btn .lbl {
    display: none;
  }
  .hint-btn,
  .explain-btn {
    min-width: 2.75rem;
    padding-inline: 0.5rem;
  }
  .accuse-btn kbd {
    display: none;
  }
  .problem {
    margin: 0 0.5rem 0.3rem;
    padding: 0.25rem 0.55rem;
  }
  .problem-txt {
    font-size: 0.8rem;
  }
  .quip {
    bottom: 0.4rem;
  }
  .fixrow {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  }
  .tabs {
    padding-bottom: 0.4rem;
  }
}
@media (max-width: 759px) {
  .quip {
    bottom: 0.5rem;
  }
  .inc .quip {
    bottom: 4.4rem;
  }
}
@media (orientation: landscape) and (max-height: 559px) {
  .inc {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
  }
  .inc-top,
  .problem {
    grid-column: 1 / -1;
  }
  .inc-top {
    grid-template-columns: auto minmax(0, 0.8fr) minmax(0, 1.5fr) auto auto auto;
    grid-template-areas: "back title heat explain hint accuse";
    align-items: center;
    padding: 0.2rem 0.5rem 0.1rem;
  }
  .heat {
    margin-bottom: 0.35rem;
  }
  .inc-title b {
    font-size: 0.9rem;
  }
  .problem {
    min-height: 0;
    padding-block: 0.1rem;
    margin-bottom: 0.25rem;
  }
  .wit-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tabs {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 3.1rem;
    align-content: start;
    gap: 0.3rem;
    padding: 0.1rem 0.3rem 0.3rem 0.5rem;
    border-top: 0;
    background: transparent;
  }
  .tab[data-tab=board] {
    display: none;
  }
  .tab {
    font-size: 0.6rem;
    padding: 0;
  }
  .inc-body {
    grid-column: 2;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    padding-bottom: 0.4rem;
  }
  .inc[data-tab] .cork {
    display: flex;
  }
  .inc[data-tab=board] .dash {
    display: flex;
  }
  .mid {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.4rem;
    min-height: 0;
    min-width: 0;
  }
  .inc[data-tab=dash] .mid,
  .inc[data-tab=board] .mid {
    display: none;
  }
  .inc[data-tab=people] .dash,
  .inc[data-tab=tools] .dash {
    display: none;
  }
  .inc[data-tab=people] .mid {
    grid-template-rows: minmax(0, 1fr);
  }
  .inc[data-tab=people] .wits {
    overflow: auto;
  }
  .spark-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(3.4rem, 1fr);
    overflow: auto;
  }
  .testimony {
    grid-template-columns: 3.4rem minmax(0, 1fr);
    min-height: 0;
  }
  .big-face {
    width: 3.4rem;
  }
  .quip {
    left: auto;
    right: 0.6rem;
    bottom: 0.4rem;
    max-width: 55%;
  }
  .boss-panel .legend {
    display: none;
  }
}
.bad-viewport-hint {
  display: none;
}
@media (min-width: 760px) and (min-height: 560px) {
  .inc .quip {
    left: 34%;
    max-width: 34%;
  }
}
@media (max-width: 759px) {
  #input-kind,
  #build-stamp {
    display: none;
  }
}
.boss .quip {
  top: 3.6rem;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
}
.epilogue {
  margin-top: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-left: 3px solid var(--mag);
  background: #1a0f33;
  font-size: 0.9rem;
  line-height: 1.4;
}
.epilogue[data-rating=legendary] {
  border-color: var(--amber);
}
.epilogue b {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.daily-body {
  overflow: auto;
}
@media (max-height: 559px) {
  .headline small {
    display: none;
  }
  .headline {
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.3rem;
  }
}
@media (max-width: 759px), (max-height: 559px) {
  .daily-body {
    align-content: start;
    grid-auto-rows: max-content;
  }
  .daily-body > .pnl,
  .daily-card {
    overflow: visible;
    min-height: auto;
  }
}
@media (orientation: landscape) and (max-height: 559px) {
  .daily-body {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}
@media (max-height: 740px) and (max-width: 759px) {
  .daily-card > p,
  .daily-cast,
  .headline small {
    display: none;
  }
  .boss-id {
    grid-template-columns: 3rem 1fr;
  }
  .boss-id small {
    display: none;
  }
  .boss-bubble {
    min-height: 0;
    font-size: 0.8rem;
  }
  .demand small {
    display: none;
  }
  .boss-stats .stat-v {
    font-size: 1.15rem;
  }
  .boss-panel {
    gap: 0.25rem;
  }
  .boss-body {
    gap: 0.35rem;
    padding: 0 0.5rem 0.4rem;
  }
}
@media (max-height: 359px) {
  .headline {
    display: none;
  }
}
@media (max-width: 759px), (max-height: 559px) {
  .res-body {
    align-content: start;
    grid-auto-rows: max-content;
  }
}
@media (orientation: landscape) and (max-height: 559px) {
  .res-body {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-auto-rows: auto;
  }
  .res-body > .pnl {
    overflow: auto;
    max-height: 100%;
  }
  .tool-name {
    font-size: 0.58rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
}
.paused-badge {
  font-size: 0.78rem;
  color: var(--dim);
  background: #ffb62e22;
  border: 1px solid var(--amber);
  border-radius: 0.5rem;
  padding: 0.3rem 0.5rem;
  line-height: 1.3;
}
.paused-badge b {
  color: var(--amber);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.heat.resume .heat-track {
  animation: resume-flash 0.7s;
}
@keyframes resume-flash {
  0% {
    box-shadow: 0 0 0 0.25rem var(--lime);
  }
  100% {
    box-shadow: none;
  }
}
[data-reduced-motion=true] .heat.resume .heat-track {
  animation: none;
}
.heat-fill {
  transition: clip-path 0.12s linear;
}
@media (max-width: 759px) and (orientation: portrait) {
  .boss .topbar {
    padding: 0.15rem 0.5rem;
  }
  .boss .topbar-title {
    font-size: 0.8rem;
  }
  .boss .topbar .btn {
    min-height: 2.75rem;
  }
  .boss-body {
    padding: 0 0.3rem 0.3rem;
    gap: 0.3rem;
  }
  .boss-panel {
    padding: 0.3rem 0.45rem;
    gap: 0.2rem;
  }
  .boss-id {
    grid-template-columns: 2.6rem 1fr;
    gap: 0.45rem;
  }
  .boss-id small {
    display: none;
  }
  .boss-id h2 {
    font-size: 0.85rem;
  }
  .boss-bubble {
    font-size: 0.74rem;
    min-height: 0;
    padding: 0.2rem 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .demand {
    padding: 0.15rem 0.4rem;
  }
  .demand small {
    display: none;
  }
  .demand-ico {
    width: 1.4rem;
    height: 1.4rem;
  }
  .demand-row {
    font-size: 0.72rem;
    gap: 0.35rem;
  }
  .boss-stats {
    gap: 0.1rem 0.5rem;
  }
  .boss-stats small {
    font-size: 0.58rem;
  }
  .boss-stats .stat-v {
    font-size: 1rem;
  }
  .goal {
    height: 0.45rem;
  }
  .board-frame {
    padding: 0.2rem;
    border-radius: 0.6rem;
  }
}
.swipe-hint {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3edff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 1rem;
  padding: 0.3rem 0.8rem;
  font: 800 0.8rem var(--sans);
  box-shadow: 0.15rem 0.2rem 0 #000a;
  pointer-events: none;
  animation: swipe-fade 6s forwards;
  white-space: nowrap;
}
.swipe-hint i {
  font-style: normal;
  display: inline-block;
  animation: swipe-go 1s infinite;
}
@keyframes swipe-go {
  0%, 100% {
    transform: translateX(-0.4rem);
  }
  50% {
    transform: translateX(0.5rem);
  }
}
@keyframes swipe-fade {
  0%, 85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
[data-reduced-motion=true] .swipe-hint i {
  animation: none;
}
.board-area {
  position: relative;
}
.headline .hl-play {
  justify-self: start;
  margin-top: 0.3rem;
}
.kicker.headline-kicker {
  color: var(--cyan);
}
@media (max-height: 559px) {
  .headline {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .headline b,
  .headline .hl-title {
    grid-column: 1;
  }
  .headline .hl-play {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
}
.boards {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  min-width: 0;
}
.world-note {
  margin: 0.2rem 0;
}
.world[data-state=offline] .world-note {
  color: var(--dim);
  font-style: italic;
}
.world.compact .world-list {
  font-size: 0.8rem;
  gap: 0.15rem;
}
.world-list:empty {
  display: none;
}
.name-edit {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.name-input,
#name-input {
  min-height: 2.9rem;
  box-sizing: border-box;
  font: 700 1rem var(--mono);
  min-width: 0;
  width: 11rem;
  padding: 0.5rem 0.6rem;
  color: var(--text, #fff);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 6px;
}
#name-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4rem;
}
.world {
  margin-top: 0.6rem;
}
