:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --ink: #22241f;
  --line: #c9c6b9;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --serif: 'Songti SC', 'Noto Serif CJK SC', 'Times New Roman', serif;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #d45d33;
  outline-offset: 3px;
}
header,
main {
  width: min(1440px, 94%);
  margin: auto;
}
header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.brand,
.brand span {
  display: flex;
  align-items: center;
}
.brand {
  gap: 10px;
  font-weight: 850;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.brand span {
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.brand small {
  font: 9px var(--mono);
  letter-spacing: 0.23em;
  margin-top: 5px;
}
.monogram {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font: italic bold 35px Georgia;
  width: 43px;
  height: 43px;
  border-radius: 50% 50% 3px 3px;
}
nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  font-weight: 650;
}
nav a:hover,
.game-title a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.featured {
  position: relative;
  isolation: isolate;
  min-height: 430px;
  height: min(54vw, 560px);
  overflow: hidden;
  background: #182320;
  color: #fff8e4;
}
.cover {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}
.featured:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #151d19f0 0%, #17221cba 27%, #141e1720 61%, transparent 86%),
    linear-gradient(0deg, #111a1666, transparent 42%);
}
.feature-copy {
  height: 100%;
  max-width: 560px;
  padding: clamp(32px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.overline {
  font: 600 11px/1.5 var(--mono);
  letter-spacing: 0.15em;
}
.wordmark {
  font:
    italic clamp(14px, 1.6vw, 24px) Georgia,
    serif;
  letter-spacing: 0.075em;
  margin-top: 38px;
  color: var(--accent);
}
.feature-copy h1,
.game-title h1,
.sectionhead h2,
.result h2,
.research h1 {
  font-family: var(--serif);
  font-weight: 900;
}
.feature-copy h1 {
  font-size: clamp(44px, 5.5vw, 80px);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 8px 0 17px;
}
.feature-copy p {
  max-width: 28em;
  font-size: 15px;
  line-height: 1.85;
  text-shadow: 0 1px 4px #111;
}
.primary {
  background: var(--accent, #e6b66d);
  border: 0;
  color: #1a211d;
  padding: 14px 21px;
  font-size: 14px;
  font-weight: 750;
  display: inline-block;
}
.feature-copy .primary {
  margin-top: 32px;
}
.primary:hover {
  filter: brightness(1.08);
}
.switcher {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: center;
  background: #17201ccc;
  color: #fff;
  padding: 3px 5px;
  gap: 8px;
}
.switcher span {
  font: 12px var(--mono);
}
.switcher button {
  border: 0;
  background: none;
  color: inherit;
  width: 42px;
  height: 40px;
  font-size: 19px;
}
.collection {
  padding: 46px 0 70px;
  scroll-margin-top: 12px;
}
.sectionhead,
.card-name,
.game-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.sectionhead {
  margin-bottom: 22px;
  align-items: flex-end;
}
.sectionhead .overline,
.research .overline {
  color: #626b5d;
}
.sectionhead h2 {
  font-size: 38px;
  margin-top: 4px;
}
.filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.filters button,
.toolbar button {
  background: none;
  border: 1px solid var(--line);
  padding: 9px 15px;
  font-size: 13px;
}
.filters .selected {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 18px;
}
.card {
  display: block;
}
.poster {
  position: relative;
  aspect-ratio: 1.55;
  overflow: hidden;
  background: #273831;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.card:hover img {
  transform: scale(1.04);
}
.poster span {
  position: absolute;
  bottom: 9px;
  left: 10px;
  color: #fff;
  background: #20241deb;
  font-size: 11px;
  padding: 4px 7px;
}
.card-name {
  margin: 10px 0 2px;
}
.card-name h3 {
  font: 750 23px var(--serif);
}
.card small,
.level-name small,
.scene-top,
.stats small {
  font: 10px var(--mono);
  letter-spacing: 0.1em;
}
.card small {
  color: #60655d;
}
.gold {
  color: #845c16;
}
.game {
  padding: 0 0 45px;
}
.game-title {
  margin-bottom: 16px;
}
.game-title a {
  font-size: 13px;
  color: #596154;
}
.game-title h1 {
  font-size: 40px;
  line-height: 1.18;
  margin-top: 7px;
}
.level-name {
  text-align: right;
  font-weight: 650;
}
.level-name small {
  display: block;
  margin-bottom: 5px;
  color: #62695e;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
}
.scene {
  position: relative;
  isolation: isolate;
  background: #152022 var(--scene) center/cover;
  color: #fff;
  min-height: 410px;
  height: min(61vh, 660px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 45px 18px 55px;
  overflow: hidden;
}
.scene:before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, #0c171ae8, transparent 26%, #111a2120 70%, #101a20aa);
}
.scene-top {
  position: absolute;
  inset: 13px 16px auto;
  display: flex;
  justify-content: space-between;
  color: #fff;
  letter-spacing: 0.14em;
  text-shadow: 0 1px 2px #111;
}
.caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-size: 13px;
  color: #fff;
  background: #11201ce0;
  padding: 7px;
}
.playfield {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  width: min(90%, 500px);
  gap: 4px;
}
.cell {
  padding: 3px;
  min-width: 0;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  font-family: var(--mono);
  color: #f7f2de;
  background: #132321e8;
  border: 1px solid #daeae159;
}
.cell .sprite {
  width: clamp(24px, 3.2vw, 46px);
  aspect-ratio: 1;
  display: block;
  border-radius: 3px;
  background-size: 200% 200%;
  background-repeat: no-repeat;
}
.i0 {
  background-position: 0 0;
}
.i1 {
  background-position: 100% 0;
}
.i2 {
  background-position: 0 100%;
}
.i3 {
  background-position: 100% 100%;
}
.cell.active,
button.cell:hover {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: #192720;
}
.cell.danger {
  background: #682f34e8;
  border-color: #e99c81;
}
.cell.safe {
  background: #2b524ce8;
}
.cell.wall {
  background: #16201bc9;
  color: #8e978c;
  border-color: transparent;
}
.grid {
  max-width: 385px;
  gap: 3px;
}
.grid .cell {
  height: clamp(48px, 7vh, 76px);
}
button.cell {
  border-bottom: 3px solid var(--accent);
}
.duel,
.goal,
.road {
  margin-top: auto;
}
.duel .cell {
  flex-direction: row;
  padding: 9px;
  font: 600 14px sans-serif;
}
.duel .cell .sprite,
.goal .cell .sprite,
.farm .cell .sprite {
  width: clamp(40px, 5vw, 72px);
}
.scope {
  gap: 8px;
  max-width: 340px;
}
.scope .cell {
  height: 70px;
  color: #f1d6aa;
  background: #09272b6e;
  border: 1px dashed #d8f4dc80;
}
.scope .active {
  border: 2px solid var(--accent);
  background: #15303cee;
}
.scope .cell.active .sprite {
  width: 40px;
}
.farm {
  width: min(75%, 370px);
  transform: rotate(-2deg);
}
.farm .cell {
  padding: 11px;
  background: #21332ded;
  border: 2px solid #9eae87;
}
.road {
  width: 100%;
  gap: 3px;
}
.road .cell {
  min-height: 56px;
}
.spent {
  opacity: 0.63;
}
.cliff {
  align-self: flex-end;
  max-width: 240px;
  gap: 2px;
}
.cliff .cell {
  flex-direction: row;
  min-height: 27px;
  font-size: 10px;
  padding: 1px;
}
.cliff .cell .sprite {
  width: 24px;
}
.cliff .wall {
  visibility: hidden;
}
.ports {
  gap: 7px;
}
.ports .cell {
  min-height: 70px;
}
.stats {
  display: flex;
  background: #222a24;
  color: #f7f3e7;
  justify-content: space-evenly;
}
.stats div {
  padding: 15px 8px;
  text-align: center;
}
.stats small,
.stats strong {
  display: block;
}
.stats small {
  color: #c2c6bb;
}
.stats strong {
  font-size: 16px;
  margin-top: 5px;
}
.toolbar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.toolbar button {
  flex: 1;
  padding: 10px 5px;
  min-height: 41px;
}
.objective,
.guide,
.feedback,
.result p {
  font-size: 14px;
  line-height: 1.8;
}
.objective {
  margin: 15px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.feedback {
  border-left: 3px solid #85775c;
  padding: 6px 12px;
  background: #eae6d8;
  margin: 12px 0;
}
.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.action {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 11px 9px;
  min-height: 52px;
  border: 1px solid #a9ab9c;
  background: #fffcf3;
  font-size: 14px;
  font-weight: 620;
}
.action small {
  font: 10px var(--mono);
  color: #757765;
}
.action b {
  margin-left: auto;
}
.action em {
  display: block;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  color: #65685a;
  margin-top: 2px;
}
.action:hover,
.hinted {
  background: #e3e6d8;
  border-color: #475143;
}
.hintline,
.guide p {
  font-size: 13px;
  line-height: 1.6;
  margin: 10px 0;
}
.guide,
.result {
  padding: 18px;
  background: #e8e7db;
}
.result h2 {
  font-size: 31px;
  margin: 5px 0;
}
.result strong {
  font-size: 27px;
  color: #8a6427;
}
.result a {
  margin: 12px;
  display: inline-block;
  font-size: 14px;
}
.medals {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.medals span {
  padding: 4px 7px;
  border: 1px solid #aaa895;
  font-size: 11px;
}
.medals .acquired {
  background: #e8d39d;
}
.research {
  max-width: 850px;
  margin: 40px auto 80px;
}
.research h1 {
  font-size: 44px;
  margin: 10px 0;
}
.research p {
  line-height: 1.8;
  margin: 14px 0;
}
.research table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.research th,
.research td {
  text-align: left;
  padding: 9px;
  border-bottom: 1px solid var(--line);
}
.research a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 950px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .game-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(270px, 1fr);
    gap: 12px;
  }
  .scene {
    padding-inline: 9px;
  }
  .action {
    font-size: 13px;
  }
}
@media (max-width: 700px) {
  header,
  main {
    width: 94%;
  }
  header {
    height: 61px;
    margin-bottom: 10px;
  }
  nav {
    font-size: 12px;
    gap: 14px;
  }
  .brand {
    font-size: 15px;
  }
  .monogram {
    width: 34px;
    height: 34px;
    font-size: 29px;
  }
  .featured {
    min-height: 420px;
    height: 59vh;
  }
  .cover {
    object-position: 55% center;
  }
  .featured:after {
    background: linear-gradient(0deg, #101b17fa 0%, #17221ca8 40%, transparent 86%);
  }
  .feature-copy {
    padding: 23px;
    justify-content: flex-end;
  }
  .feature-copy .overline {
    font-size: 10px;
  }
  .wordmark {
    margin-top: 14px;
  }
  .feature-copy h1 {
    margin: 4px 0 9px;
  }
  .feature-copy p {
    font-size: 13px;
    max-width: 28em;
  }
  .feature-copy .primary {
    margin-top: 15px;
  }
  .switcher {
    right: 12px;
    bottom: 19px;
  }
  .collection {
    padding-top: 26px;
  }
  .sectionhead {
    align-items: center;
    gap: 5px;
  }
  .sectionhead h2 {
    font-size: 27px;
  }
  .overline {
    font-size: 9px;
  }
  .filters {
    gap: 2px;
  }
  .filters button {
    padding: 9px 6px;
    font-size: 12px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 10px;
  }
  .card-name h3 {
    font-size: 19px;
  }
  .game-title h1 {
    font-size: 28px;
  }
  .game-title {
    margin-bottom: 9px;
  }
  .level-name {
    font-size: 12px;
  }
  .game-layout {
    display: block;
  }
  .scene {
    height: clamp(235px, 38vh, 340px);
    min-height: 0;
    padding: 29px 8px 42px;
  }
  .caption {
    font-size: 11px;
    bottom: 6px;
    left: 6px;
    right: 6px;
  }
  .grid .cell {
    height: clamp(35px, 5vh, 52px);
    min-height: 0;
    flex-direction: row;
    font-size: 10px;
  }
  .cliff {
    max-width: 165px;
  }
  .cliff .cell {
    min-height: 18px;
    height: clamp(19px, 3vh, 29px);
  }
  .cliff .cell .sprite {
    width: 17px;
  }
  .stats div {
    padding: 7px;
  }
  .stats strong {
    font-size: 13px;
    margin-top: 2px;
  }
  .game aside {
    margin-top: 9px;
  }
  .objective {
    font-size: 12px;
    margin: 8px 0;
    padding-bottom: 8px;
  }
  .feedback {
    font-size: 12px;
    margin: 6px 0;
  }
  .action {
    min-height: 46px;
  }
  .toolbar button {
    min-height: 37px;
    padding: 6px;
  }
  .scope .cell {
    height: clamp(40px, 5.4vh, 60px);
  }
  .scope .cell.active .sprite {
    width: 22px;
  }
  .scope {
    max-width: 230px;
  }
  .farm .cell {
    padding: 4px;
  }
  .farm .cell .sprite {
    width: 30px;
  }
  .scene-top {
    inset: 8px 8px auto;
  }
  .road .cell {
    min-height: 41px;
  }
  .research th,
  .research td {
    font-size: 12px;
    padding: 7px 3px;
  }
  .research h1 {
    font-size: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.stage-layer {
  display: contents;
}
.world {
  position: absolute;
  inset: 32px 9px 40px;
}
.token {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  background: #162327ee;
  color: #f3efdb;
  border: 1px solid #e6e3d37a;
  box-shadow: 0 5px 12px #07110e55;
  padding: 5px 7px;
  min-width: 30px;
  border-radius: 3px;
}
.token span:last-child {
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.3;
}
.token .sprite {
  display: block;
  width: clamp(33px, 4vw, 62px);
  aspect-ratio: 1;
  background-size: 200% 200%;
  border-radius: 2px;
}
.token:is(button) {
  border: 2px solid var(--accent);
}
.token:is(button):hover {
  filter: brightness(1.18);
  z-index: 2;
}
.token.waypoint,
.token.anchor {
  padding: 4px 6px;
  background: #182823e8;
}
.token.ball,
.token.target {
  border-radius: 50%;
  padding: 9px;
}
.ball .sprite,
.target .sprite {
  border-radius: 50%;
}
.target {
  animation: drift 2.8s ease-in-out infinite alternate;
}
.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.wires line {
  stroke: #f6edc5;
  stroke-width: 0.6;
  stroke-dasharray: 1.5 0.8;
  filter: drop-shadow(0 1px 1px #222);
}
.wires line.travelled {
  stroke: #ffdb7d;
  stroke-width: 1;
  stroke-dasharray: none;
}
.wires line.rope {
  stroke: #ffd16b;
  stroke-width: 1.05;
  stroke-dasharray: none;
}
.frequency,
.speedo,
.resonance,
.readout {
  position: absolute;
  background: #102021e8;
  border-left: 3px solid var(--accent);
  color: #f5edce;
  padding: 6px 9px;
  font: 12px var(--mono);
}
.frequency,
.speedo,
.resonance {
  bottom: 2%;
  left: 2%;
}
.speedo strong {
  font-size: 22px;
}
.readout {
  top: 50%;
  left: 35%;
}
.healthbars {
  display: flex;
  justify-content: space-between;
  gap: 20%;
  margin: 10px 3%;
}
.healthbars label {
  background: #121d1de8;
  padding: 6px 9px;
  width: 40%;
  font-size: 12px;
}
.healthbars b {
  float: right;
}
.healthbars meter {
  display: block;
  width: 100%;
  height: 9px;
  accent-color: var(--accent);
  margin-top: 4px;
}
.fighter {
  border: 2px solid #e7daa0;
}
.fighter .sprite {
  width: clamp(57px, 6vw, 103px);
}
.fighter.boss .sprite {
  width: clamp(70px, 7.6vw, 125px);
}
.climber {
  flex-direction: row;
}
.climber .sprite {
  width: 30px;
}
.climber.chosen {
  outline: 2px solid #ffd16b;
}
.anchor:is(button):after {
  content: '+';
  padding-left: 2px;
  color: var(--accent);
  font-weight: bold;
}
.dock.danger {
  background: #6b3035;
}
.anchor {
  min-height: 20px;
}
.dock.safe {
  background: #23494a;
}
.surge .keeper {
  min-width: 20%;
  min-height: 48px;
}
.surge .keeper.player {
  background: #695529;
}
.world .car {
  z-index: 1;
}
.world .estate {
  border-radius: 16px 16px 3px 3px;
}
.world .target {
  cursor: crosshair;
}
.scene.reacting:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 50px var(--accent);
  animation: impact 0.32s ease-out forwards;
}
.grid .cell:has(.sprite) {
  position: relative;
}
.grid .cell:has(.i0) {
  outline: 2px solid #e5dc9b;
  outline-offset: -2px;
}
@keyframes impact {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 0;
  }
}
@keyframes drift {
  from {
    transform: translate(-57%, -60%);
  }
  to {
    transform: translate(-39%, -42%);
  }
}
@media (max-width: 700px) {
  .world {
    inset: 24px 1px 34px;
  }
  .token {
    padding: 2px 4px;
  }
  .token .sprite {
    width: 27px;
  }
  .fighter .sprite,
  .fighter.boss .sprite {
    width: 44px;
  }
  .climber .sprite {
    width: 16px;
  }
  .token span:last-child {
    font-size: 10px;
  }
  .token.climber {
    padding: 1px 3px;
  }
  .healthbars {
    margin: 3px 3%;
  }
  .healthbars label {
    padding: 3px 6px;
  }
  .speedo,
  .resonance,
  .frequency {
    font-size: 10px;
  }
  .token.anchor {
    min-height: 17px;
    padding: 1px 5px;
  }
}
.level-name .live-link {
  display: inline-block;
  margin-left: 10px;
  background: #253a30;
  color: #fff8e6;
  padding: 9px 12px;
}
.live-arena {
  isolation: isolate;
  position: relative;
  aspect-ratio: 1.55;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
}
.actor-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.live-actor {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  will-change: transform;
}
.live-actor > span {
  display: block;
  aspect-ratio: 1;
  background-size: 200% 200%;
}
.live-actor small:not(:empty) {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #152126;
  color: white;
  padding: 2px 4px;
  white-space: nowrap;
}
.live-call,
.live-flash {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  color: #fff;
  background: #16201de6;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}
.live-call {
  top: 9px;
}
.live-flash {
  bottom: 8px;
}
.live-flash:empty {
  display: none;
}
.live-curtain {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #17201988;
}
.live-curtain[hidden] {
  display: none;
}
.live-curtain > div {
  background: #f6f1dfed;
  padding: 18px 22px;
  max-width: min(83%, 400px);
  text-align: center;
  box-shadow: 0 5px 15px #0003;
}
.live-curtain small {
  font: 10px var(--mono);
  letter-spacing: 0.18em;
}
.live-curtain h2 {
  font: 750 29px var(--serif);
  margin: 3px 0;
}
.live-curtain p {
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0 13px;
}
.live-curtain strong {
  color: #906715;
  font-size: 24px;
}
.live-curtain button {
  margin: 3px;
}
.live-buttons {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.live-buttons button {
  flex: 1;
  justify-content: center;
  text-align: center;
  min-height: 48px;
}
.live-record {
  font-size: 13px;
  margin-top: 13px;
  color: #606554;
}
@media (max-width: 700px) {
  .level-name .live-link {
    display: block;
    margin: 4px 0 0;
    padding: 4px 7px;
    font-size: 11px;
  }
  .live-curtain > div {
    padding: 8px 12px;
  }
  .live-curtain h2 {
    font-size: 22px;
  }
  .live-curtain p {
    font-size: 11px;
    margin: 3px 0;
  }
  .live-curtain .primary {
    padding: 8px 16px;
  }
  .live-arena {
    aspect-ratio: 1.32;
  }
  .live-call,
  .live-flash {
    font-size: 11px;
  }
  .live-buttons {
    margin: 8px 0;
  }
}
.grid .cell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: white;
  text-shadow:
    0 1px 3px #111,
    0 1px 4px #111;
}
.grid .ground {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--tiles);
  background-size: 200% 200%;
  opacity: 0.66;
}
.grid .cell.danger {
  box-shadow: inset 0 0 0 2px #ff9e7c;
}
.grid .danger .ground {
  opacity: 0.36;
}
.grid .cell:not(.wall) > span:last-child {
  background: #102322b0;
  border-radius: 2px;
  padding: 1px 3px;
}
.grid .wall {
  color: #dfd5c2;
}
.combatant {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32%;
  border: 0 !important;
  text-align: center;
  pointer-events: none;
}
.combatant.boss {
  width: 44%;
}
.combatant .sprite,
.combatant.boss .sprite {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  background-size: 200% 200%;
  filter: drop-shadow(0px 8px 4px #17202266);
}
.combatant strong {
  display: inline-block;
  background: #11251bdb;
  color: #fffaeb;
  font-size: 12px;
  padding: 2px 6px;
}
body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
@media (min-width: 701px) and (max-height: 520px) {
  header {
    height: 42px;
    margin-bottom: 7px;
  }
  .monogram {
    width: 29px;
    height: 29px;
    font-size: 24px;
  }
  .brand {
    font-size: 13px;
  }
  .game-title {
    margin-bottom: 6px;
  }
  .game-title h1 {
    font-size: 25px;
    margin-top: 2px;
  }
  .scene {
    height: 57vh;
    min-height: 215px;
    padding: 24px 8px 34px;
  }
  .grid .cell {
    height: 35px;
    min-height: 30px;
    flex-direction: row;
    font-size: 10px;
  }
  .grid .cell .sprite {
    width: 19px;
  }
  .stats div {
    padding: 5px;
  }
  .stats strong {
    font-size: 12px;
  }
  .world {
    inset: 22px 4px 30px;
  }
  .token .sprite {
    width: 25px;
  }
  .climber .sprite {
    width: 15px;
  }
  .token.anchor {
    padding: 0 3px;
    min-height: 15px;
  }
  .caption {
    font-size: 10px;
    bottom: 3px;
    padding: 4px;
  }
  .game aside .objective {
    font-size: 12px;
  }
  .live-arena {
    aspect-ratio: 1.85;
  }
}
.scenery-layer,
.scenery-layer .shape {
  position: absolute;
  pointer-events: none;
}
.scenery-layer {
  inset: 0;
  overflow: hidden;
}
.shape {
  display: block;
  transform-origin: left center;
}
.shape.roof {
  background: repeating-linear-gradient(170deg, #324447 0 5px, #273a3e 6px 12px);
  border-top: 4px solid #e4ab72;
  box-shadow: 0 5px 0 #784d36 inset;
}
.shape.ice {
  border-top: 3px solid #dbf8ff;
  background: #438196;
}
.shape.rope {
  background: #ffe193;
  box-shadow: 0 1px 1px #674616;
}
.shape.hotel-wall {
  background: repeating-linear-gradient(90deg, #192620 0 13px, #2f362a 14px 16px);
  border: 2px solid #59604b;
}
.shape.track-dot,
.shape.target-point {
  background: #f7daa4;
  border-radius: 50%;
}
.shape.beam,
.shape.dock-ring {
  border-radius: 50%;
  border: 2px dashed #f7e3ad;
  background: #e8bb5c22;
}
.shape.beam {
  background: #efa86f40;
  border-color: #f8ab77;
}
.shape.strike {
  background: #ff9d70;
  box-shadow: 0 0 18px #ff633e;
}
.live-arena {
  touch-action: none;
}
.live-hush .live-call,
.live-wake .live-call {
  font-size: 11px;
}
.live-twin .live-actor small,
.live-veil .live-actor small {
  font-weight: bold;
}
.live-arena:has(.shape.hotel-wall) {
  background-size: cover;
}
.live .live-buttons {
  flex-wrap: wrap;
}
.live-buttons .action {
  min-width: 65px;
}
.live .chapter-list {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}
.chapter-list a {
  font: 600 11px/1.4 sans-serif;
  color: #394338;
  padding: 5px 7px;
  border: 1px solid #8d9789;
}
.chapter-list .current {
  background: #24382e;
  color: #fff7dd;
}
.live-curtain .primary {
  margin: 3px;
}
.live.focus-play {
  max-width: 1100px;
  margin: auto;
}
.focus-play .game-layout {
  display: block;
}
.focus-play .live-arena {
  max-height: 71vh;
}
.focus-play aside {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.focus-play .objective,
.focus-play .live-record {
  display: none;
}
.focus-play .live-buttons {
  flex: 1;
}
.live .live-call {
  max-width: 96%;
  white-space: normal;
  text-align: center;
  border-radius: 3px;
}
.live-actor small {
  font-weight: 650;
}
.live-veil .shape.roof {
  background-image: var(--roof-tiles);
  background-size: 90px 90px;
}
.live-hush .shape.hotel-wall {
  background-image: var(--wall-tiles);
  background-size: 125px 125px;
  background-position: 100% 0;
}
.live .live-tools button {
  min-width: 48px;
}
.live .scenery-layer {
  z-index: 0;
}
.live .actor-layer {
  z-index: 1;
}
.live-call,
.live-flash {
  z-index: 2;
}
.live-curtain {
  z-index: 3;
}
.live .live-arena {
  border-bottom: 2px solid #465342;
}
@media (max-width: 700px) {
  .live .chapter-list {
    gap: 2px;
    margin-top: 5px;
  }
  .live .chapter-list a {
    font-size: 10px;
    padding: 3px 4px;
  }
  .live .live-curtain > div {
    max-width: 92%;
    max-height: 98%;
    overflow: auto;
  }
  .live[data-mode='play'] .objective {
    display: none;
  }
  .live[data-mode='play'] .live-buttons {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .live .live-buttons .action {
    min-height: 49px;
  }
  .live .live-tools {
    flex-wrap: wrap;
  }
  .live .live-tools button {
    min-height: 40px;
  }
  .focus-play .live-arena {
    aspect-ratio: 1.08;
  }
}
body:has(.live) {
  background: #151c20;
  color: #f1eee2;
}
body:has(.live) > header {
  height: 54px;
  border-bottom-color: #374348;
  margin-bottom: 12px;
}
body:has(.live) .monogram {
  background: #f3eccf;
  color: #1e2927;
}
body:has(.live) .brand,
body:has(.live) > header nav a {
  color: #eceada;
}
.live.game {
  --line: #495450;
  --ink: #ebecdf;
  --paper: #242e30;
}
.live .game-title h1 {
  font-size: clamp(24px, 3vw, 44px);
}
.live .game-title a,
.live .level-name small {
  color: #aebfb9;
}
.live .level-name {
  color: var(--accent);
}
.live .game-layout {
  grid-template-columns: minmax(0, 3.25fr) minmax(205px, 1fr);
  gap: 16px;
}
.live .live-arena {
  border: 1px solid #505b56;
  aspect-ratio: 1.72;
  max-height: 69vh;
}
.live aside {
  background: #20292c;
  border-top: 3px solid var(--accent);
  padding: 12px;
}
.live .objective {
  color: #d2d9d2;
  font-size: 13px;
  margin: 2px 0 12px;
}
.live .live-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.live .live-buttons .action {
  background: #36413e;
  color: #f8f5e9;
  border: 1px solid #5f6a61;
  font-size: 13px;
  padding: 9px 5px;
}
.live .live-buttons .action:active {
  background: var(--accent);
  color: #152020;
}
.live .live-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.live .live-tools button {
  color: #d5ddd6;
  border-color: #53605b;
}
.live .live-record {
  color: #bdc8bb;
}
.live .live-curtain {
  background: linear-gradient(90deg, #102021c9, #14231c55);
}
.live .live-curtain > div {
  border-top: 4px solid var(--accent);
  background: #162120ef;
  color: #f6f0dc;
  max-width: min(80%, 470px);
  padding: 20px;
}
.live-curtain strong {
  color: var(--accent);
}
.live .chapter-list a {
  color: #ccd4c9;
  border-color: #506159;
}
.live .chapter-list .current {
  background: var(--accent);
  color: #18221e;
}
.live .stats {
  background: #202c2c;
}
.arena-light {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
}
.mission-progress {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    to right,
    var(--accent) var(--progress, 0%),
    #38443d var(--progress, 0%)
  );
}
.award-details {
  font: 12px/1.6 sans-serif;
  color: #c3cdbd;
  margin: 4px 0 9px;
}
.award-details summary {
  cursor: pointer;
}
.live.focus-play .game-layout {
  display: block;
}
.live .live-flash {
  border-left: 3px solid var(--accent);
}
.live-pulse [data-arena] {
  cursor: crosshair;
}
.live-wake [data-arena],
.live-surge [data-arena],
.live-slip [data-arena] {
  cursor: grab;
}
.live [data-arena]:active {
  cursor: grabbing;
}
@media (max-width: 700px) {
  body:has(.live) > header {
    height: 46px;
  }
  .live .game-layout {
    display: block;
  }
  .live .game-title h1 {
    font-size: 26px;
  }
  .live .live-arena {
    aspect-ratio: 1.32;
  }
  .live aside {
    padding: 7px;
    border-top: 0;
  }
  .live .live-buttons {
    grid-template-columns: repeat(auto-fit, minmax(63px, 1fr));
    margin: 4px 0 8px;
  }
  .live .live-tools {
    grid-template-columns: repeat(3, 1fr);
  }
  .live .live-curtain > div {
    padding: 7px 10px;
    max-width: 95%;
  }
  .live .award-details {
    margin: 2px 0 4px;
  }
  .live .live-call {
    font-size: 10px;
    top: 4px;
  }
  .live .live-record {
    margin: 5px 0;
  }
  .live .objective {
    font-size: 11px;
    margin: 0 0 5px;
  }
}
.shape.garden-route {
  background: repeating-linear-gradient(90deg, #fff7bc 0 4px, transparent 4px 8px);
  opacity: 0.65;
}
.live .live-curtain {
  background-size: cover;
  background-position: center;
}
.live-curtain > div > small {
  display: block;
}
.shape.sight {
  border: 2px solid white;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #183e49,
    0 0 7px #20d5db;
}
.shape.road-dash {
  background: #ffe6a9;
  border-radius: 1px;
}
.live-veil .shape.roof {
  border: 0;
  border-top: 3px solid #c9ac7e;
  border-radius: 5px 5px 0 0;
  background: var(--eaves) center top/105px 90px repeat;
  box-shadow: inset 0 12px 9px #201e1aa8;
}
.live-veil .shape.roof:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(28%, 25px);
  background: var(--roof-tiles) center bottom/64px 52px repeat-x;
  border-bottom: 4px solid #404744;
  box-shadow: 0 4px 5px #171b17;
}
.live-hush .shape.hotel-wall {
  background: var(--wall-tiles) center/100% 100%;
  border: 2px solid #372f25;
  box-shadow:
    inset 0 3px 0 #756b52,
    2px 3px 4px #0f100dcc;
}
.shape.wind-streak {
  height: 2px !important;
  background: linear-gradient(to right, transparent, #fff6d3bb, transparent);
  border-radius: 50%;
}
.shape.falling-tile {
  background: var(--roof-tiles) center/cover;
  border: 1px solid #be9976;
}
.shape.moth-sight {
  background: linear-gradient(to right, #f5a35fbb, #ffc38322);
  box-shadow: 0 0 8px 3px #e9945266;
}
.shape.road-edge {
  background: repeating-linear-gradient(90deg, #f5dfbfaa 0 12px, #98583cbb 12px 24px);
  opacity: 0.85;
}
.shape.wake-trail {
  background: #d9ffeda1;
  box-shadow: 0 0 5px #e2fff48a;
}
.shape.ball-shadow {
  border-radius: 50%;
  background: #113b3fe8;
  box-shadow: 0 0 0 1px #d0f8ef88;
}
.shape.irrigation {
  background: linear-gradient(#dffaff, #66c7de);
  box-shadow: 0 0 4px #1c7566;
}
.shape.pulse-trace {
  background: linear-gradient(to right, #90fbff33, #c3ffff);
  box-shadow: 0 0 6px #5ff3ef;
}
.shape.pierce-trace {
  background: #fff4ad;
  box-shadow: 0 0 6px 2px #f6a45a;
}
.live-curtain .primary,
.live-curtain button {
  min-width: 64px;
  min-height: 44px;
  align-content: center;
}
.live .live-buttons .action {
  min-height: 44px;
}
.live .chapter-list a {
  min-height: 27px;
  align-content: center;
}
.live .live-buttons {
  display: block;
  position: static;
}
.deck-group {
  margin: 8px 0;
}
.deck-group > small,
.instrument small {
  display: block;
  color: #afc1b9;
  font: 600 11px/1.5 system-ui;
  letter-spacing: 0.09em;
  margin-bottom: 3px;
}
.deck-keys {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex-wrap: wrap;
}
.live .deck-keys .action {
  flex: 1 1 50px;
  min-width: 47px;
  font-size: 12px;
  line-height: 1.35;
  border-radius: 4px;
}
.live-kiln .deck-keys .action,
.live-bell .deck-keys .action {
  border-radius: 14px 14px 9px 9px;
  box-shadow: inset 0 -3px #1323268a;
}
.live-root .deck-keys .action {
  border-bottom: 3px solid #9d8a52;
}
.live-veil .deck-keys .action {
  min-height: 58px;
  border-radius: 3px;
  border-left: 4px solid #a8583c;
}
.live-surge [data-input='dive'] {
  flex-grow: 1.6 !important;
  background: #375b50 !important;
}
.live-slip [data-input='brake'] {
  border-left: 4px solid #d87e64 !important;
}
.live-slip [data-input='boost'] {
  border-left: 4px solid #98b277 !important;
}
.instrument {
  position: relative;
  padding: 9px 11px;
  min-height: 53px;
  background: #142024;
  border: 1px solid #4b5a54;
  color: #f4eedc;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.instrument b {
  font:
    700 clamp(18px, 2.1vw, 29px)/1.1 ui-monospace,
    monospace;
  display: block;
}
.instrument-reading {
  min-width: 0;
  flex: 1;
}
.instrument-reading > span:not(.pips) {
  font-size: 12px;
  color: #cad1bb;
  display: block;
  margin-top: 2px;
}
.instrument-sprite {
  flex: none;
  width: 52px;
  aspect-ratio: 1;
  background-size: 200% 200%;
  transform: rotate(var(--turn, 0deg));
}
.instrument-wake .instrument-sprite {
  background-position: 100% 0;
  transform: none;
  position: relative;
}
.instrument-wake .instrument-sprite:after {
  content: '';
  position: absolute;
  inset: 19% 47%;
  background: linear-gradient(#f58058 50%, #e3dcc0 50%);
  transform: rotate(var(--turn));
  border-radius: 80%;
}
.instrument-pulse .instrument-sprite {
  background-position: 0 100%;
}
.instrument-twin .instrument-sprite {
  background-position: 100% 100%;
}
.steering-slider {
  width: 100%;
  height: 24px;
  accent-color: #e7b370;
  cursor: ew-resize;
  touch-action: none;
}
.gauge {
  display: block;
  background: #32413e;
  height: 6px;
  margin: 5px 0;
  border-radius: 4px;
  overflow: hidden;
}
.gauge > i {
  display: block;
  height: 100%;
  background: var(--accent, #91c2ac);
}
.gauge.hot > i {
  background: #d77a5a;
}
.pips {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}
.pips i {
  height: 5px;
  width: 17px;
  background: #384842;
}
.pips .lit {
  background: #ffc275;
}
.duel-meters {
  display: flex;
  gap: 4px;
}
.duel-meters .gauge {
  flex: 1;
}
.duel-meters .gauge:last-child {
  transform: scaleX(-1);
}
.seal-case,
.match-log {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.seal-case i {
  font:
    bold 16px/1.7 'Songti SC',
    serif;
  padding: 0 5px;
  color: #b2a38a;
  border: 1px dashed #8d7b60;
}
.seal-case .stamped {
  background: #9a3a2d;
  color: #ffe4bd;
  border-style: solid;
  transform: rotate(-4deg);
}
.match-log i {
  font:
    600 9px/16px ui-monospace,
    monospace;
  text-align: center;
  min-width: 16px;
  height: 16px;
  color: #c5ccc4;
  border: 1px solid #546258;
  border-radius: 50%;
}
.match-log .save {
  color: #102c20;
  background: #a8d59d;
}
.match-log .goal {
  color: #fff0dc;
  background: #944a39;
}
.live .live-tools {
  border-top: 1px solid #43504d;
  margin-top: 11px;
  padding-top: 6px;
}
@media (max-width: 700px) {
  .instrument {
    padding: 4px 8px;
    min-height: 38px;
    gap: 5px;
  }
  .instrument-reading {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .instrument small,
  .deck-group > small {
    font-size: 10px;
    letter-spacing: 0;
    margin: 0;
  }
  .instrument b {
    font-size: 17px;
  }
  .instrument .gauge {
    min-width: 36px;
    flex: 1;
  }
  .instrument .pips,
  .instrument .gauge {
    margin: 0;
  }
  .instrument-sprite {
    width: 32px;
  }
  .instrument-slip .steering-slider {
    flex: 1;
    min-width: 54px;
  }
  .instrument .duel-meters,
  .instrument .match-log {
    flex: 1;
  }
  .instrument .match-log {
    gap: 2px;
  }
  .match-log i {
    min-width: 13px;
    height: 13px;
    font-size: 8px;
    line-height: 12px;
  }
  .live .live-buttons {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    flex-wrap: wrap;
  }
  .deck-group {
    flex: 1 1 auto;
    margin: 2px 0;
  }
  .deck-keys {
    gap: 3px;
  }
  .live .deck-keys .action {
    font-size: 12px;
    min-height: 44px;
    min-width: 46px;
    flex: 1 1 auto;
    padding: 5px;
  }
  .live .live-tools {
    margin-top: 3px;
  }
  .live .stats {
    margin: 0;
  }
}
.shape.track-dot.attached {
  background: #c0ffd2;
  box-shadow: 0 0 5px #a4efb2;
}
.shape.landing-ring {
  border: 2px solid #baffc4;
  border-radius: 50%;
  box-shadow: 0 0 9px #84f5b3;
}
.ghost-actor {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  opacity: 0.35;
  pointer-events: none;
  text-align: center;
  filter: grayscale(0.85) drop-shadow(0 0 4px white);
}
.ghost-actor i {
  aspect-ratio: 1;
  display: block;
  background-size: 200% 200%;
  transform: rotate(var(--ghost-turn, 0deg));
}
.ghost-actor span {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #102022;
  color: white;
  font-size: 10px;
}
.duo-controls {
  display: none;
}
.duo-active .live-buttons > .deck-group {
  display: none;
}
.duo-active .duo-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.duo-controls section:first-child {
  border-top: 3px solid #70a7d4;
}
.duo-controls section:last-child {
  border-top: 3px solid #cb784e;
}
.shape.ribbon {
  background: linear-gradient(to bottom, #81715724, #65544339);
  border: 0;
}
.shape.ribbon.wet {
  background: linear-gradient(to bottom, #6d8aa82b, #aecbd450);
}
.lesson-note {
  margin: 0;
  padding: 7px 10px;
  background: #e1d9b8;
  color: #263730;
  border-left: 4px solid var(--accent);
  font: 600 13px/1.5 system-ui;
}
.card-progress {
  font-size: 11px;
  color: #566257;
  margin-top: 4px;
}
.shape.moth-cone {
  background: #f6d2842e;
}
.shape.moth-cone.alert {
  background: #ee885a48;
}
.shape.beam-warning {
  background: repeating-linear-gradient(120deg, #ff976334 0 7px, transparent 7px 15px);
  border-inline: 2px dashed #ffba80;
}
.shape.beam-fire {
  background: #fff3a8bb;
  box-shadow: 0 0 15px #ff943e;
}
.shape.shock-front {
  background: linear-gradient(to top, #fff2ab, #f1a16b 57%, #64cccc83);
}
.shape.balcony {
  background: var(--eaves) center/90px 40px repeat-x;
  border-top: 3px solid #ddc59c;
  box-shadow: 0 3px 3px #4c302c;
}
.shape.searchlight {
  background: linear-gradient(130deg, #fffbd64d, #ffc17459);
  filter: drop-shadow(0 0 2px #fff6ab);
}
.live .live-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.live .live-tools > button {
  border: 0;
  min-height: 36px;
  flex: 1;
  font-weight: 500;
  background: transparent;
}
.live .tool-drawer {
  display: flex;
  flex-basis: 100%;
  gap: 4px;
  flex-wrap: wrap;
}
.live .tool-drawer[hidden] {
  display: none;
}
.live .tool-drawer button {
  flex: 1 1 54px;
}
.command-glyph {
  display: inline-block;
  flex: none;
  width: 23px;
  height: 23px;
  background-size: 200% 200%;
  vertical-align: middle;
  margin-right: 3px;
}
.live .deck-keys .action {
  display: flex;
  align-items: center;
  justify-content: center;
}
.instrument-slip .instrument-sprite {
  touch-action: none;
  cursor: ew-resize;
}
.live-kiln [data-input='high'],
.live-kiln [data-input='low'] {
  background: #29465a !important;
}
.live-kiln [data-input='palm'],
.live-kiln [data-input='elbow'],
.live-kiln [data-input='breaker'] {
  background: #603d32 !important;
}
.live-twin [data-input='hook'] {
  border-bottom: 3px solid #d5aa55 !important;
}
.live-twin [data-input='highhook'] {
  border-bottom: 3px solid #cadcde !important;
}
.live-hush .deck-keys .action {
  border-radius: 15px 15px 4px 4px;
  background: #2a3734;
}
.live-bell [data-input='ring'] {
  background: #675337 !important;
}
@media (max-width: 700px) {
  body:has(.live[data-mode='play']) > header {
    display: none;
  }
  .live[data-mode='play'] .game-title {
    padding-top: 7px;
    margin-bottom: 6px;
  }
  .live[data-mode='play'] .game-title h1 {
    font-size: 22px;
  }
  .live[data-mode='play'] .game-title a {
    font-size: 10px;
  }
  .live[data-mode='play'].live-twin .live-arena {
    aspect-ratio: 0.96;
    max-height: 53svh;
  }
  .live[data-mode='play']:is(.live-pulse, .live-root, .live-wake) .live-arena {
    aspect-ratio: 1.12;
    max-height: 50svh;
  }
  .live .command-glyph {
    width: 19px;
    height: 19px;
    margin-right: 1px;
  }
  .live .live-tools > button {
    min-height: 40px;
  }
  .live .tool-drawer button {
    min-height: 40px;
  }
  .live .stats div {
    padding: 7px 3px;
    min-width: 0;
  }
  .live .stats small {
    letter-spacing: 0;
  }
}
.debrief-lines {
  text-align: left;
  line-height: 1.55;
  max-width: 32em;
  margin: 0.35em auto;
}
.debrief-lines .assignment {
  border-top: 1px solid #ffffff3b;
  margin-top: 0.4em;
  padding-top: 0.4em;
}
.live-curtain .score-clue {
  color: #ffdb9a;
  margin: 0.25rem 0;
  font-weight: 600;
}
.review-panel {
  background: #243232;
  color: #f7f1df;
  padding: 12px;
  border-top: 2px solid var(--accent);
}
.review-panel[hidden] {
  display: none;
}
.review-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.review-title output {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.review-time {
  width: 100%;
  height: 38px;
  accent-color: var(--accent);
}
.review-panel button {
  margin: 2px;
  min-height: 44px;
  padding: 4px 10px;
  background: #dfe5d6;
  color: #182324;
}
.live[data-mode='review'] .live-tools,
.live[data-mode='review'] .live-buttons,
.live[data-mode='review'] .objective {
  display: none;
}
.live-buttons button {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.assignment-track {
  margin: 0;
  padding: 0.45em 0.7em;
  color: #edebcf;
  border-left: 3px solid var(--accent);
  background: #263536;
  font-size: 0.84rem;
}
.assignment-track[hidden] {
  display: none;
}
.debrief-lines .assignment button {
  display: block;
  margin: 6px 0;
  min-height: 40px;
}
.shape.ball-trail {
  background: #f8ecc6;
  opacity: 0.8;
  border-radius: 50%;
  box-shadow: 0 0 2px #2d2418;
}
.pace-map {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 6px;
  background: #263233;
  color: #eee9cf;
}
.pace-map > small {
  font-size: 10px;
  letter-spacing: 1px;
}
.pace-map > div {
  height: 22px;
  position: relative;
  flex: 1;
  border-bottom: 2px solid #8d9984;
  background: repeating-linear-gradient(90deg, transparent 0 24%, #ffffff14 24% 25%);
}
.pace-map i {
  position: absolute;
  transform: translateX(-50%);
  font: 700 11px/15px system-ui;
  font-style: normal;
}
.pace-exit {
  color: #ffe7a6;
  top: 0;
}
.pace-middle {
  color: #83edd3;
  top: 0;
}
.pace-car {
  bottom: -2px;
  width: 9px;
  height: 5px;
  border-radius: 2px;
  background: #ff8c64;
}
.shape.core-open,
.shape.core-recharge,
.shape.core-covered {
  border-radius: 50%;
  border: 2px solid;
  box-sizing: border-box;
}
.shape.core-open {
  border-color: #fff4a5;
  box-shadow: 0 0 9px #fff3a7;
}
.shape.core-recharge {
  border-style: dashed;
  border-color: #a9c2cd;
  background: #20303d55;
}
.shape.core-covered {
  border-color: #8598a6;
  background: #25303c77;
}
.shape.kiln-grate,
.shape.kiln-flare {
  border-top: 2px solid #ffb766;
  background: repeating-linear-gradient(
    120deg,
    #8b3917aa 0 8%,
    #eaa6488c 9% 12%,
    transparent 13% 19%
  );
}
.shape.kiln-flare {
  border-color: #fff1b5;
  background: linear-gradient(0deg, #f4a12c, #fc713aba 55%, transparent);
  box-shadow: 0 -4px 12px #ffac4166;
}
.placement-preview {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border: 2px dashed #d7f4a1;
  border-radius: 50%;
  background: #9bbd6736;
  display: grid;
  place-items: center;
}
.placement-preview[hidden] {
  display: none;
}
.placement-preview small {
  color: #fff;
  background: #182c25ed;
  padding: 3px 6px;
  white-space: nowrap;
}
/* Keep the moving field and primary controls in view together on short screens. */
.live[data-mode='play'] .objective {
  display: none;
}
@media (min-width: 701px) {
  .live .deck-keys .action {
    flex: 1 1 78px;
    min-width: 70px;
  }
  .live .game-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 26%);
  }
  .live .live-arena {
    width: 100%;
  }
}
@media (orientation: landscape) and (max-height: 540px) and (max-width: 1100px) {
  body:has(.live) > header {
    display: none;
  }
  body:has(.live) > main {
    width: auto;
    margin: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  }
  .live.game {
    padding: 0 0 4px;
  }
  .live .game-title,
  .live[data-mode='play'] .game-title {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 2px 0;
    height: 34px;
  }
  .live .game-title > div:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .live .game-title a {
    font-size: 10px;
  }
  .live .game-title h1,
  .live[data-mode='play'] .game-title h1 {
    font-size: 18px;
    margin: 0;
  }
  .live .level-name {
    font-size: 12px;
  }
  .live .level-name small {
    display: none;
  }
  .live .game-layout,
  .live.focus-play .game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(216px, 1fr);
    gap: 8px;
    align-items: start;
  }
  .live .live-arena,
  .live[data-mode='play'].live-twin .live-arena,
  .live[data-mode='play']:is(.live-pulse, .live-root, .live-wake) .live-arena,
  .live.focus-play .live-arena {
    width: 100%;
    aspect-ratio: auto;
    height: calc(100svh - 91px);
    min-height: 150px;
    max-height: none;
  }
  .live .stats {
    margin: 0;
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .live .stats div {
    padding: 3px 2px;
  }
  .live .stats strong {
    font-size: 12px;
    margin: 0;
  }
  .live .stats small {
    font-size: 9px;
  }
  .live aside {
    width: 100%;
    margin: 0;
    padding: 4px;
    max-height: calc(100svh - 34px);
    overflow: auto;
  }
  .live .objective {
    font-size: 11px;
    line-height: 1.3;
    margin: 0 0 4px;
  }
  .live[data-mode='play'] .live-record,
  .live[data-mode='play'] .objective {
    display: none;
  }
  .live .instrument {
    min-height: 32px;
    padding: 2px 5px;
    gap: 5px;
    flex-wrap: nowrap;
  }
  .live .instrument-sprite {
    width: 27px;
  }
  .live .instrument-reading {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .live .instrument small {
    font-size: 10px;
    margin: 0;
  }
  .live .instrument b {
    font-size: 15px;
  }
  .live .steering-slider {
    min-width: 45px;
    width: 28%;
    height: 26px;
  }
  .live .instrument .gauge {
    min-width: 22px;
  }
  .live .pace-map {
    padding: 0 4px;
  }
  .live .pace-map > div {
    height: 17px;
  }
  .live .live-buttons,
  .live.focus-play .live-buttons {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(69px, 1fr));
    gap: 3px;
    margin: 4px 0;
  }
  .live .live-buttons > .deck-group,
  .live .live-buttons > .deck-group > .deck-keys {
    display: contents;
  }
  .live .live-buttons > .deck-group > small {
    display: none;
  }
  .live .deck-keys .action {
    min-width: 0;
    min-height: 44px;
    padding: 2px;
    font-size: 11px;
    line-height: 1.15;
  }
  .live .command-glyph {
    width: 16px;
    height: 16px;
    margin: 0;
  }
  .live .live-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 4px 0 0;
    padding: 1px 0;
    gap: 2px;
  }
  .live .live-tools > button {
    min-width: 0;
    min-height: 40px;
    padding: 2px;
    font-size: 11px;
  }
  .live .tool-drawer {
    grid-column: 1/-1;
  }
  .live.duo-active .live-buttons > .deck-group {
    display: none;
  }
  .live.duo-active .duo-controls {
    grid-column: 1/-1;
  }
  .live .live-curtain > div {
    padding: 6px 8px;
    max-width: 96%;
    max-height: 98%;
    overflow: auto;
  }
  .live[data-mode='review'] .live-buttons,
  .live[data-mode='review'] .live-tools {
    display: none;
  }
  .live[data-mode='review'] .live-arena {
    height: calc(100svh - 175px);
  }
}
@media (max-width: 440px) and (max-height: 680px) and (orientation: portrait) {
  .live[data-mode='play'] .game-title {
    padding-top: 2px;
    margin-bottom: 3px;
  }
  .live[data-mode='play'] .live-arena,
  .live[data-mode='play'].live-twin .live-arena,
  .live[data-mode='play']:is(.live-pulse, .live-root, .live-wake) .live-arena {
    width: 100%;
    aspect-ratio: auto;
    height: 37svh;
    max-height: 252px;
  }
  .live[data-mode='play'] aside {
    padding: 4px;
    margin-top: 3px;
  }
  .live[data-mode='play'] .stats div {
    padding: 3px;
  }
  .live[data-mode='play'] .stats strong {
    margin: 0;
  }
  .live[data-mode='play'] .live-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    gap: 3px;
    margin: 3px 0;
  }
  .live[data-mode='play'] .live-buttons > .deck-group,
  .live[data-mode='play'] .live-buttons > .deck-group > .deck-keys {
    display: contents;
  }
  .live[data-mode='play'] .live-buttons > .deck-group > small,
  .live[data-mode='play'] .live-record,
  .live.duo-active[data-mode='play'] .live-buttons > .deck-group {
    display: none;
  }
  .live.duo-active[data-mode='play'] .duo-controls {
    grid-column: 1/-1;
  }
  .live[data-mode='play'] .deck-keys .action {
    padding: 2px;
    line-height: 1.15;
  }
}
