:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f5f4e9;
  background: #10232b;
  font-synthesis: none;
  color-scheme: dark;
  --gold: #ddd4ad;
  --red: #df6855;
  --ink: #111d20;
  --line: #ffffff32;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid #f3d18a;
  outline-offset: 5px;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
#game {
  width: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}
#arena {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}
/* One safe-area anchor for every mode; scene overlays never own separate offsets. */
.combat-hud {
  position: absolute;
  z-index: 3;
  top: calc(8px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  right: calc(12px + env(safe-area-inset-right));
  display: grid;
  grid-template-columns: minmax(0, 255px) minmax(0, 350px) 98px;
  justify-content: space-between;
  align-items: start;
  gap: 6px 24px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.7s;
}
.playing .combat-hud {
  visibility: visible;
  opacity: 1;
}
.masthead {
  grid-column: 3;
  grid-row: 1 / 3;
}
.top-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
/* Keep the mode available to assistive technology without repeating the HUD. */
.mode {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mode i {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--gold);
  margin: 0 10px;
  transform: rotate(45deg);
}
.icon-button {
  height: 38px;
  width: 38px;
  border: 1px solid var(--line);
  background: #172b2e70;
  backdrop-filter: blur(12px);
  border-radius: 50%;
  font-size: 20px;
  color: #fff;
}
.icon-button:hover {
  background: #19282bca;
}
.enemy-hud {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  pointer-events: none;
}
.playing .player-abilities,
.playing .controls,
.playing .arena-note {
  opacity: 1;
}
.duel-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-top: 4px;
  text-shadow: 0 1px 5px #081c29;
}
.duel-score > span {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.duel-score strong {
  color: #ffe2a6;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.score-gain {
  min-height: 1.4em;
  margin-top: 3px;
  color: #ffe2a6;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 5px #081c29;
  opacity: 0;
  transition: opacity 0.18s;
}
.score-gain.show {
  opacity: 1;
}
.combo-status {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.3;
  color: #e4d6ac;
}
.super-meter {
  margin-top: 10px;
}
.super-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #ffe2a6;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px #000;
}
.super-track {
  height: 4px;
  margin-top: 6px;
  background: #17252cbd;
}
#super-charge {
  height: 100%;
  width: 0;
  background: #ecc46c;
  transition: width 0.15s;
}
#super-action {
  pointer-events: none;
  min-height: 44px;
  margin-top: 7px;
  padding: 6px 12px;
  border: 1px solid #ecd69770;
  border-radius: 4px;
  background: #162930d9;
  color: #ffe2a6;
  font-size: 14px;
}
.playing #super-action {
  pointer-events: auto;
}
#super-action:disabled,
#touch-super:disabled {
  cursor: default;
  opacity: 0.5;
}
#super-action kbd {
  margin-left: 10px;
  padding: 3px 6px;
}
#super-action.charged,
#touch-super.charged {
  border-color: #ffe1a0;
  background: #6a4d25ee;
}
.super-timing {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 25%;
  transform: translateX(-50%);
  width: min(270px, calc(100vw - 40px));
  padding: 14px 16px;
  border: 1px solid #ecd69780;
  border-radius: 6px;
  background: #10212bf2;
  color: #ead9b7;
  pointer-events: none;
}
.super-timing-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.super-timing-caption strong {
  color: #fff4da;
}
.timing-track {
  height: 10px;
  margin: 12px 0 9px;
  position: relative;
  background: #ffffff20;
  border-radius: 2px;
}
.timing-window {
  position: absolute;
  height: 100%;
  left: var(--window-start);
  width: var(--window-width);
  background: #efc665;
}
#timing-marker {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 18px;
  background: #fff;
  box-shadow: 0 0 6px #fff6;
  transform: translateX(-50%);
}
#super-timing-help {
  display: block;
  font-size: 12px;
  text-align: center;
}
.super-timing.in-window {
  border-color: #ffe2a0;
}
.super-timing.in-window strong {
  color: #ffd879;
}
.touch-enabled #super-action {
  display: none;
}
.touch-enabled .super-timing {
  bottom: calc(182px + env(safe-area-inset-bottom));
}
.enemy-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  min-height: 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px #000;
}
.enemy-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.enemy-title span:last-child {
  flex-shrink: 0;
  letter-spacing: 0;
  font-size: 13px;
}
.health-track {
  height: 5px;
  background: #14242bac;
  border: 1px solid #f3eee533;
  overflow: hidden;
}
.health-track > div {
  height: 100%;
  transition: width 0.16s ease;
  width: 100%;
}
.enemy > div {
  background: linear-gradient(90deg, #b13e35, #f09a76);
}
.enemy-caption {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 10px;
  letter-spacing: 0.04em;
  margin-top: 5px;
  text-shadow: 0 1px 4px #000;
}
.enemy-caption span {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #ecdfc4;
}
.player-hud {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.player-abilities {
  position: absolute;
  bottom: 61px;
  left: 36px;
  width: 255px;
  opacity: 0;
  transition: opacity 0.7s;
  pointer-events: none;
}
.player-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px #000;
}
.player-mark,
.player-title small {
  display: none;
}
.player-title > span:last-child {
  margin-left: auto;
  font-size: 13px;
  letter-spacing: 0;
}
.player > div {
  background: #f4f0d5;
}
.stamina-track {
  height: 3px;
  background: #162222a0;
  margin-top: 7px;
}
.stamina-track > div {
  width: 100%;
  height: 100%;
  background: #d3b368;
  transition: width 0.1s;
}
.vitals-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 6px;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px #000;
}
.controls {
  position: absolute;
  bottom: 41px;
  right: 36px;
  display: flex;
  gap: 20px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.7s;
  color: #eeefe5;
  text-shadow: 0 1px 8px #172021;
  pointer-events: none;
}
.controls span {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
kbd {
  font: 12px Arial;
  letter-spacing: 0.1em;
  background: #0c202565;
  border: 1px solid #ffffff2c;
  padding: 5px 8px;
  border-radius: 3px;
  align-self: flex-start;
}
.arena-note {
  position: absolute;
  left: 36px;
  bottom: 23px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 6px #000;
}
.arena-note i {
  width: 4px;
  height: 4px;
  background: #e6d9ad;
  border-radius: 50%;
}
.arena-note span {
  opacity: 0.6;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-left: 12px;
}
.start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(5.5dvh, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right)) max(7dvh, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  isolation: isolate;
  overflow-y: auto;
}
.start-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      #08192380,
      transparent 30%,
      transparent 63%,
      #08171bd9
    ),
    radial-gradient(ellipse at 50% 44%, transparent 28%, #0a1b2b5e 100%);
  pointer-events: none;
}
.start-screen h1 {
  margin: 0;
  padding-left: 0.17em;
  font:
    400 clamp(2rem, 6.5vw, 5.5rem) / 1.2 Georgia,
    serif;
  letter-spacing: 0.17em;
  color: #fff8e8;
  text-shadow: 0 3px 28px #1028359c;
}
.title-action {
  position: relative;
  z-index: 2;
  width: min(300px, 100%);
  margin-top: 24px;
  text-align: center;
}
.home-streak {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: calc(14px + env(safe-area-inset-left));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #dce7e32e;
  border-radius: 10px;
  background: #10232be8;
  color: #e4eae6;
  font-size: 14px;
  line-height: 1.4;
}
.home-streak strong {
  color: #ffe0a3;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#preview-orbit {
  position: absolute;
  inset: 20% 0 150px;
  z-index: 1;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
#preview-orbit.dragging {
  cursor: grabbing;
}
.preview-controls {
  position: relative;
  height: 44px;
  margin-bottom: 8px;
}
.camera-buttons {
  display: flex;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.preview-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #e0e9e3;
  touch-action: manipulation;
}
.preview-controls button:is(:hover, :focus-visible):not(:disabled) {
  background: #e0e9e314;
  color: #fff5d9;
}
.preview-controls.explored .camera-buttons,
:where(#game[data-tutorial="off"]) .camera-buttons {
  opacity: 0.45;
  pointer-events: auto;
}
.view-hint {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  pointer-events: none;
  color: #d3e0d8;
  font-size: 12px;
  letter-spacing: 0.025em;
  text-shadow: 0 1px 5px #10232b;
  transition: opacity 0.25s;
}
.view-hint svg {
  opacity: 0.7;
}
.preview-controls.explored .view-hint {
  opacity: 0;
}
@media (hover: hover) {
  .preview-controls:hover .camera-buttons {
    opacity: 1;
    pointer-events: auto;
  }
  .preview-controls:hover .view-hint {
    opacity: 0;
  }
}
.preview-controls:focus-within .camera-buttons {
  opacity: 1;
  pointer-events: auto;
}
.preview-controls:focus-within .view-hint {
  opacity: 0;
}
.title-tools {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(70px + env(safe-area-inset-right));
  display: flex;
  flex-wrap: wrap;
  max-width: calc(
    100vw - 84px - env(safe-area-inset-left) - env(safe-area-inset-right)
  );
  gap: 2px;
  padding: 3px;
  border: 1px solid #dce7e32e;
  border-radius: 10px;
  background: #10232bf0;
  box-shadow: 0 4px 16px #04121930;
  z-index: 3;
}
.title-tools details {
  text-align: left;
}
.title-tools summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #e7eeeb;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
}
.settings-button {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dce7e32e;
  border-radius: 10px;
  background: #10232bf0;
  color: #e7eeeb;
  box-shadow: 0 4px 16px #04121930;
  touch-action: manipulation;
}
.settings-button:hover {
  background: #1c3038;
  border-color: #f6ddb066;
  color: #f6ddb0;
}
.settings-button:focus-visible {
  outline-offset: 3px;
}
.title-tools summary::-webkit-details-marker {
  display: none;
}
.title-tools summary::after {
  content: "";
  width: 5px;
  height: 5px;
  margin: -3px 1px 0 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}
.title-tools details[open] summary::after {
  transform: rotate(225deg);
  margin-top: 3px;
}
.title-tools summary:hover,
.title-tools details[open] summary {
  background: #ffffff0d;
  color: #f6ddb0;
}
.title-tools :is(button, summary, input):focus-visible {
  outline-offset: 2px;
}
#clothing-preview {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1px solid #ffffff70;
  border-radius: 50%;
}
.option-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(
    292px,
    calc(100vw - 84px - env(safe-area-inset-left) - env(safe-area-inset-right))
  );
  min-width: 0;
  max-height: calc(
    100dvh - 170px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  margin: 0;
  padding: 12px;
  border: 1px solid #dce7e333;
  border-radius: 10px;
  background: #10232bfa;
  box-shadow: 0 12px 32px #04121966;
}
.option-panel legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 12px;
  color: #ecf1ed;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
#clothing-name {
  color: #b3c4c8;
  font-weight: 400;
}
.clothing-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dce7e31c;
}
.clothing-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 64px;
  padding: 5px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b9cace;
  font-size: 14px;
  line-height: 18px;
}
.palette-color {
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid #ffffff45;
  border-radius: 50%;
}
.clothing-swatch[aria-pressed="true"] {
  color: #f6ddb0;
}
.clothing-swatch[aria-pressed="true"] .palette-color {
  outline: 2px solid #f3d18a;
  outline-offset: 3px;
}
.clothing-swatch:hover:not(:disabled) {
  background: #ffffff09;
  color: #f5f4e9;
}
.clothing-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
}
.clothing-inputs label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  color: #c8d5d7;
  font-size: 14px;
  line-height: 18px;
}
.clothing-inputs input {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 5px;
  border: 1px solid #dce7e32e;
  border-radius: 6px;
  background: #ffffff06;
  cursor: pointer;
}
.clothing-inputs input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.clothing-inputs input::-webkit-color-swatch {
  border: 0;
  border-radius: 3px;
}
.clothing-inputs input::-moz-color-swatch {
  border: 0;
  border-radius: 3px;
}
.panel-reset {
  display: block;
  margin: 6px auto -4px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b3c4c8;
  font-size: 14px;
}
.panel-reset:hover:not(:disabled) {
  color: #f6ddb0;
  background: #ffffff08;
}
.emote-options {
  display: grid;
  gap: 3px;
}
.emote-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #c8d5d7;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}
.emote-option:hover:not(:disabled) {
  background: #ffffff08;
  color: #fff8e8;
}
.emote-option[aria-pressed="true"] {
  border-color: #f3d18a33;
  background: #f3d18a0d;
  color: #f6ddb0;
}
.selection-check {
  width: 6px;
  height: 10px;
  margin: -3px 5px 0 2px;
  flex-shrink: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0;
}
.emote-option[aria-pressed="true"] .selection-check {
  opacity: 1;
}
.panel-replay {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  margin-top: 12px;
  border: 1px solid #dce7e32e;
  border-radius: 6px;
  background: #ffffff06;
  color: #e7eeeb;
  font-size: 14px;
}
.panel-replay span {
  font-size: 20px;
}
.panel-replay:hover:not(:disabled) {
  background: #ffffff0d;
  border-color: #dce7e366;
}
.option-panel :disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 300px) {
  .clothing-inputs {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .start-screen {
    padding-top: max(74px, calc(60px + env(safe-area-inset-top)));
  }
  .title-tools {
    top: calc(
      max(74px, calc(60px + env(safe-area-inset-top))) +
        clamp(2.4rem, 7.8vw, 6.6rem) + 10px
    );
    right: calc(14px + env(safe-area-inset-right));
    max-width: calc(
      100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)
    );
  }
  .option-panel {
    width: min(
      292px,
      calc(
        100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)
      )
    );
  }
}
.start-screen[aria-busy="true"] #start::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border: 1px solid #eee6cd40;
  border-top-color: #eee6cd;
  border-radius: 50%;
  animation: title-loading 1s linear infinite;
}
@keyframes title-loading {
  to {
    transform: rotate(360deg);
  }
}
.eyebrow {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.23em;
  color: #e6d8b6;
  margin: 0 0 21px;
}
.primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 38px;
  min-height: 51px;
  width: 100%;
  background: #f3efda;
  color: #15272c;
  border: 1px solid #ffffe95c;
  border-radius: 3px;
  padding: 15px 20px;
  text-align: left;
  font-size: 14px;
  font-weight: bold;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary:hover {
  background: #fffcee;
  transform: translateY(-1px);
}
.mode-menu {
  display: grid;
  gap: 6px;
}
.mode-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #d8e2db26;
  border-radius: 5px;
  background: #10252b80;
  color: #eee6cd;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.035em;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.mode-button:focus-visible:not(:disabled),
.mode-button:active:not(:disabled) {
  background: #f3efda;
  color: #15272c;
  border-color: #fff5cead;
}
@media (hover: hover) {
  .mode-button:hover:not(:disabled) {
    background: #f3efda;
    color: #15272c;
    border-color: #fff5cead;
  }
}
.mode-button:focus-visible {
  outline-offset: 3px;
}
.mode-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem;
  align-items: center;
}
.mode-launch .mode-button {
  grid-area: 1 / 1 / 2 / -1;
  padding-right: calc(6rem + 8px);
}
.mode-difficulty {
  grid-area: 1 / 2;
  z-index: 1;
  min-width: 0;
  min-height: 32px;
  margin-right: 8px;
  padding: 5px 7px;
  border: 1px solid #d3dddc2e;
  border-radius: 4px;
  background: #132930;
  color: #d0d9d6;
  color-scheme: dark;
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.mode-difficulty:hover {
  border-color: #d3dddc80;
}
.mode-difficulty:focus-visible {
  outline: 2px solid #e5c980;
  outline-offset: 3px;
}
.survival-launch {
  grid-template-columns: minmax(0, 1fr) 3.5rem 6rem;
}
.survival-launch .mode-button {
  padding-right: calc(9.5rem + 8px);
}
.survival-launch .mode-difficulty {
  grid-area: 1 / 3;
}
.mode-coop {
  grid-area: 1 / 2;
  z-index: 1;
  min-height: 32px;
  margin-right: 5px;
  padding: 5px;
  background: #19343a;
  color: #d6e5df;
  border: 1px solid #d3dddc2e;
  border-radius: 4px;
  font: inherit;
  font-size: 0.75rem;
}
.mode-coop:hover:not(:disabled),
.mode-coop:focus-visible {
  background: #f3efda;
  color: #15272c;
}
.online-options {
  display: flex;
  gap: 12px;
  margin: 18px 0 0;
}
.online-options label {
  flex: 1;
}
.online-options select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #d3dddc40;
  border-radius: 5px;
  background: #132930;
  color: #eee8da;
  color-scheme: dark;
  font: inherit;
}
.coop-ally {
  color: #a9e1cd;
}
@media (any-pointer: coarse) {
  .mode-coop {
    min-height: 44px;
  }
  .mode-difficulty {
    min-height: 44px;
  }
  .mode-button {
    min-height: 52px;
  }
}
@media (max-width: 300px) {
  .mode-launch {
    grid-template-columns: 1fr;
  }
  .mode-launch .mode-button {
    padding-right: 14px;
  }
  .mode-difficulty {
    grid-area: 2 / 1;
    justify-self: end;
    margin: 4px 0 0;
    width: 6rem;
  }
  .survival-launch {
    grid-template-columns: 1fr 6rem;
  }
  .survival-launch .mode-button {
    grid-area: 1 / 1 / 2 / -1;
    padding-right: 14px;
  }
  .survival-launch .mode-coop {
    grid-area: 2 / 1;
    justify-self: end;
    margin-top: 4px;
  }
  .survival-launch .mode-difficulty {
    grid-area: 2 / 2;
  }
}
.upgrade-dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 28px;
  color: #eee8da;
  text-align: left;
}
.upgrade-dialog::backdrop {
  background: #051118b8;
}
.upgrade-dialog h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}
.upgrade-dialog #upgrade-title:focus {
  outline: none;
}
.upgrade-dialog .eyebrow {
  margin: 0 0 12px;
}
.upgrade-dialog #upgrade-next {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #b9cdd0;
}
.upgrade-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.upgrade-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px 15px;
  text-align: left;
  border: 1px solid #91abb438;
  border-radius: 8px;
  background: #ffffff04;
  color: #e7ece6;
  transition:
    background 0.12s,
    border-color 0.12s;
}
@media (hover: hover) and (pointer: fine) {
  .upgrade-card:hover {
    background: #23414b;
    border-color: var(--upgrade-color);
  }
}
.upgrade-card:active {
  background: #23414b;
}
.upgrade-card:focus-visible {
  outline: 2px solid var(--upgrade-color);
  outline-offset: 3px;
}
.upgrade-rank {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--upgrade-color);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.upgrade-rank::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.upgrade-card strong {
  font:
    1.25rem Georgia,
    serif;
  line-height: 1.25;
}
.upgrade-card > span:last-child {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #c0ced0;
}
.upgrade-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #91abb425;
}
.upgrade-dialog .upgrade-build {
  margin: 0 0 10px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #a7b9ba;
}
.upgrade-dialog .upgrade-footer .text-button {
  min-height: 44px;
  margin: 0;
  border-bottom-color: transparent;
  color: #a7b9ba;
}
.upgrade-dialog .upgrade-footer .text-button:is(:hover, :focus-visible) {
  color: #ede8d7;
}
@media (max-width: 600px) {
  .upgrade-dialog {
    padding: 20px;
  }
  .upgrade-options {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 14px;
  }
  .upgrade-card {
    padding: 12px 14px;
    gap: 5px;
  }
}
.survival-status {
  grid-column: 1 / 3;
  grid-row: 2;
  justify-self: center;
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  color: #cee0e9;
  text-shadow: 0 1px 6px #050e18;
  font-size: 11px;
  line-height: 1.4;
}
.survival-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
}
.survival-progress small {
  flex-basis: 100%;
}
.survival-status strong {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.survival-status small {
  color: #b9cace;
  font-size: 10px;
  line-height: 1.4;
}
.survival-skills {
  position: relative;
  margin: 0;
  visibility: hidden;
  pointer-events: none;
  text-shadow: none;
}
.playing .survival-skills {
  visibility: visible;
  pointer-events: auto;
}
.survival-skills summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px;
  border: 1px solid #adc9da40;
  border-radius: 20px;
  background: #10202bd9;
  color: #dbe9ee;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}
.survival-skills summary::-webkit-details-marker {
  display: none;
}
.survival-skills summary::after {
  content: "+";
  color: #acc9d7;
}
.survival-skills[open] summary::after {
  content: "−";
}
.survival-skills summary:hover,
.survival-skills[open] summary {
  background: #213a48;
  border-color: #adc9da80;
}
.survival-skills summary:focus-visible,
.skill-panel:focus-visible {
  outline: 2px solid #cee9f5;
  outline-offset: 3px;
}
#skill-count {
  color: #9ed6db;
  font-variant-numeric: tabular-nums;
}
.skill-panel {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  right: 0;
  width: min(
    340px,
    calc(100vw - 92px - env(safe-area-inset-left) - env(safe-area-inset-right))
  );
  max-height: min(380px, 42dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  border: 1px solid #adc9da4d;
  border-radius: 14px;
  background: #101f2af7;
  box-shadow: 0 12px 32px #0005;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}
.skill-panel p {
  margin: 0;
}
#skill-next {
  color: #a8d4dc;
}
#skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#skill-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  padding: 12px 0;
  border-bottom: 1px solid #adc9da24;
}
#skill-list strong {
  font-size: 14px;
  letter-spacing: normal;
  color: var(--skill-color);
}
#skill-list li > span {
  color: #a8c0cb;
  font-size: 12px;
}
#skill-list p {
  grid-column: 1 / -1;
  color: #d0dce3;
}
.skill-panel #skill-empty {
  margin-top: 12px;
}
.skill-panel .skill-note {
  margin-top: 12px;
  color: #9cb0bc;
  font-size: 12px;
}
.survival .arena-note {
  display: none;
}
.survival .enemy-caption {
  display: none;
}
.survival .callout {
  max-width: calc(100% - 32px);
  font-size: clamp(18px, 3vw, 27px);
  white-space: normal;
  text-align: center;
}
.practice-panel {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  padding: 0 10px 8px;
  border: 1px solid #fff1cf30;
  border-radius: 8px;
  background: #10272beb;
  box-shadow: 0 4px 24px #071c2824;
  pointer-events: auto;
}
.practice-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.practice-toolbar label {
  color: #c3cec9;
  font-size: 12px;
  margin-right: 3px;
}
.practice-toolbar select,
.practice-toolbar button {
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #f1e8cf;
  font: inherit;
  font-size: 13px;
  padding: 0 8px;
}
.practice-toolbar select {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.practice-toolbar option {
  background: #152b30;
}
.practice-toolbar button:hover,
.practice-toolbar select:hover {
  background: #ffffff12;
}
.practice-goal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.practice-goal h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.practice-goal strong {
  color: #efda9e;
  white-space: nowrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.practice-panel p {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.4;
}
#practice-instruction {
  color: #d9e3dd;
}
#practice-feedback {
  color: #e9d9af;
}
.practice-panel small {
  display: block;
  color: #afc2bb;
  font-size: 10px;
}
.practice-panel.complete .practice-goal strong,
.practice-panel.complete #practice-feedback {
  color: #bfe9c5;
}
.practice .enemy-hud,
.practice .controls,
.practice .arena-note,
.practice .callout,
.practice .score-gain,
.practice #combo-status {
  display: none;
}
.practice .player-title,
.practice .health-track.player {
  display: none;
}
.primary > span:last-child {
  font-size: 22px;
  font-weight: normal;
}
.callout {
  position: absolute;
  top: max(156px, 29%);
  left: 50%;
  transform: translateX(-50%);
  font-family: Georgia, serif;
  font-size: 29px;
  letter-spacing: 0.15em;
  color: #fff0ca;
  text-shadow: 0 3px 18px #050b12;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s;
  white-space: nowrap;
}
.callout.show {
  opacity: 1;
}
.enemy-label {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -100%);
  text-shadow: 0 2px 8px #000;
}
.enemy-label span {
  color: #f5c381;
  font-size: 12px;
}
.enemy-label b {
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 0.16em;
}
.survival .enemy-label b {
  color: var(--enemy-accent, #c2cfce);
}
.enemy-label.warning span {
  color: #ffad76;
  filter: drop-shadow(0 0 8px #ff874e);
  font-size: 20px;
}
.enemy-label.warning b {
  color: #ffd8b1;
}
.result,
dialog {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(370px, 90vw);
  background: #112027ef;
  border: 1px solid #e7e6d535;
  padding: 34px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 20px 90px #0616218c;
}
.result h2,
dialog h2 {
  font:
    50px Georgia,
    serif;
  margin: 10px 0 16px;
}
.result p:not(.eyebrow),
dialog p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.7;
  color: #d0d9da;
  margin: 0 0 25px;
}
.result .eyebrow,
dialog .eyebrow {
  font-size: 12px;
}
.result #blade-reward {
  color: #f4d397;
  font-size: 13px;
  margin: -12px 0 16px;
  letter-spacing: 0.03em;
}
.result[hidden] {
  display: none;
}
.result.victory {
  top: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(
    460px,
    calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right))
  );
  padding: 16px;
  overflow: visible;
}
.result.victory .eyebrow {
  display: none;
}
.result.victory h2 {
  font-size: 28px;
  margin: 0 0 6px;
}
.result.victory p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 12px;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.score-breakdown {
  margin-bottom: 12px;
  border-top: 1px solid #e7e6d526;
  border-bottom: 1px solid #e7e6d526;
  text-align: left;
}
.score-breakdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  color: #d0d9da;
  font-size: 11px;
}
.score-breakdown summary::-webkit-details-marker {
  display: none;
}
.result-score-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
#result-score {
  font-size: 22px;
  font-weight: 500;
  color: #ffe2a6;
  font-variant-numeric: tabular-nums;
}
.score-breakdown-content {
  max-height: min(180px, 25dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#score-breakdown-rows {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.6;
  color: #d0d9da;
}
#score-breakdown-rows > div,
.score-guide li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 3px 0;
}
#score-breakdown-rows dd {
  margin: 0;
  color: #ffe2a6;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.score-guide {
  margin: 12px 0;
  padding: 10px 0;
  list-style: none;
  border-block: 1px solid #e7e6d526;
  font-size: 0.8rem;
}
.score-guide b {
  color: #ffe2a6;
  font-weight: 500;
}
.result-actions .primary {
  flex: 1 0 120px;
  gap: 12px;
  padding: 10px 14px;
  min-width: 0;
  min-height: 44px;
}
.result-actions .home-button,
.result-actions .emote-button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #dce7e359;
  border-radius: 3px;
  background: transparent;
  color: #e7eeeb;
  font-size: 14px;
}
.result-actions .home-button:hover,
.result-actions .emote-button:not(:disabled):hover {
  background: #ffffff0d;
  color: #f6ddb0;
}
.emote-button:disabled {
  opacity: 0.45;
  cursor: default;
}
.emote-button kbd,
.panel-replay kbd {
  margin-left: 6px;
  padding: 1px 4px;
  border: 1px solid #dce7e359;
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
  color: #f6ddb0;
}
.finished #pause {
  display: none;
}
dialog {
  position: fixed;
  margin: 0;
}
dialog::backdrop {
  background: #061b2859;
  backdrop-filter: blur(4px);
}
#game[data-tutorial="off"] [data-tutorial] {
  display: none;
}
#pause-dialog,
.settings-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.settings-dialog {
  width: min(380px, calc(100vw - 32px));
  padding: 24px;
  text-align: left;
}
.settings-dialog h2 {
  font-size: 32px;
  margin: 0 0 24px;
}
.online-dialog {
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px;
  text-align: left;
}
.online-dialog h2 {
  font-size: 36px;
}
.online-dialog label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}
.online-dialog :is(input, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border: 1px solid #e7e6d54d;
  border-radius: 4px;
  background: #091b23;
  color: #eef4f0;
  font: inherit;
  font-size: 16px;
}
.online-dialog textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.online-dialog :is(input, textarea)::placeholder {
  color: #a3b5bb;
}
.online-dialog :is(input, textarea):focus-visible {
  outline: 2px solid #c3daaf;
  outline-offset: 3px;
}
.online-dialog .primary {
  width: 100%;
  margin: 0;
  min-height: 48px;
}
.online-dialog .text-button {
  min-height: 44px;
}
.online-join-row {
  margin: 22px 0;
  padding-top: 20px;
  border-top: 1px solid #e7e6d529;
}
.online-dialog #online-status {
  min-height: 3.4em;
  margin-bottom: 20px;
}
.online-dialog .online-note {
  color: #a3b5bb;
  font-size: 13px;
  margin: 20px 0 6px;
}
.enemy-caption b {
  font-weight: 400;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.settings-row strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}
#tutorial-description {
  display: block;
  color: #c8d4d5;
  font-size: 14px;
  line-height: 1.5;
}
.settings-row input {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: #ecd697;
  cursor: pointer;
}
.settings-dialog .primary {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}
.how-to-play {
  margin: -8px 0 24px;
  border-bottom: 1px solid var(--line);
}
.how-to-play summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 0 16px;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  color: #ecd697;
}
.how-to-play summary::-webkit-details-marker {
  display: none;
}
.help-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #ecd69770;
  border-radius: 50%;
  font-size: 14px;
}
.how-to-play summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
}
.how-to-play[open] summary::after {
  content: "−";
}
.settings-dialog .guide-controls {
  margin: 0 0 20px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #c8d4d5;
}
.mechanics-guide {
  margin: 0 0 20px;
}
.mechanics-guide dt {
  margin-top: 18px;
  font-size: 1rem;
  color: #f5f4e9;
}
.mechanics-guide dd {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #c8d4d5;
}
.combo-sequence {
  display: block;
  margin-bottom: 8px;
  color: #ecd697;
}
.pause-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.pause-options .text-button {
  margin: 8px 0 0;
  min-height: 44px;
  font-size: 14px;
}
.text-button {
  background: none;
  border: 0;
  border-bottom: 1px solid #ffffff50;
  color: #ede8d7;
  padding: 6px 0;
  margin: 20px auto 0;
  font-size: 13px;
}
#hit-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 170px 45px #b02b1700;
  transition: box-shadow 0.12s;
}
.touch-ui {
  display: none;
}
.text-button[hidden],
#load-error[hidden] {
  display: none;
}
#load-error {
  font-size: 14px;
  color: #ffb0a2;
  line-height: 1.5;
}
.touch-actions button {
  touch-action: none;
}
@media (max-width: 900px) {
  .controls {
    gap: 12px;
    right: 24px;
  }
  .callout {
    top: max(232px, 29%);
  }
  .arena-note {
    left: 24px;
  }
}
@media (max-width: 700px) {
  .combat-hud {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
    column-gap: 12px;
  }
  .top-actions {
    flex-direction: column;
    gap: 4px;
  }
  .enemy-title,
  .player-title {
    font-size: 10px;
    letter-spacing: 0.02em;
  }
  .enemy-caption span {
    display: none;
  }
  .survival-status {
    gap: 8px;
  }
  .survival-skills summary {
    gap: 5px;
    padding: 4px 8px;
    font-size: 12px;
  }
  .practice-panel {
    grid-column: 1 / 3;
    grid-row: 2;
  }
}

/* Thumb controls use separate corners even on a 320px-wide phone. */
.touch-enabled.playing .touch-ui {
  display: block;
}
.touch-enabled .controls,
.touch-enabled .arena-note,
.mobile-help {
  display: none;
}
.touch-enabled .desktop-help {
  display: none;
}
.touch-enabled .mobile-help {
  display: block;
}
.touch-enabled .player-abilities {
  bottom: calc(177px + env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
  width: 190px;
}
.touch-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
#stick {
  position: absolute;
  bottom: calc(32px + env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
  width: 104px;
  height: 104px;
  border: 1px solid #fff5;
  border-radius: 50%;
  background: #17293070;
  pointer-events: auto;
  touch-action: none;
}
#stick-knob {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  left: 31px;
  top: 31px;
  background: #f3f0dc80;
  border: 1px solid #fff7;
  pointer-events: none;
}
.touch-actions {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 64px 72px;
  grid-template-rows: 72px 64px;
  gap: 8px;
  pointer-events: auto;
}
.touch-actions button {
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  border-radius: 50%;
  border: 1px solid #efecd48f;
  background: #142733bd;
  color: #faf1db;
  font-size: 12px;
  font-weight: bold;
  touch-action: none;
}
.touch-actions button small {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.75;
}
.touch-actions #touch-slash {
  grid-column: 2;
  grid-row: 1;
  width: 72px;
  height: 72px;
  background: #e6dfc8ed;
  color: #172933;
}
#touch-block {
  grid-column: 1;
  grid-row: 2;
}
#touch-super {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  border-color: #e7c684;
  color: #ffe2a6;
}
#touch-dash {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
}
.touch-actions button.pressed {
  background: #fff2bf;
  color: #172933;
  transform: scale(0.94);
}
@media (max-width: 550px) {
  .callout {
    font-size: 24px;
    top: max(220px, 30%);
  }
  .arena-note {
    display: none;
  }
  .controls {
    bottom: 18px;
    left: 20px;
    right: 20px;
    justify-content: space-between;
  }
  .controls span {
    font-size: 12px;
  }
  .controls kbd {
    font-size: 12px;
  }
  .icon-button {
    width: 33px;
    height: 33px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Dynamic height follows browser chrome; insets protect controls around notches. */
[hidden] {
  display: none !important;
}
body {
  overscroll-behavior: none;
}
.icon-button {
  min-width: 44px;
  min-height: 44px;
}
.text-button {
  font-size: 14px;
}
.install-help {
  font-size: 14px;
  line-height: 1.5;
  max-width: 310px;
}
#hit-vignette {
  box-shadow: inset 0 0 130px 35px #992416;
  opacity: 0;
  transition: opacity 0.12s;
}
dialog,
.result {
  max-height: calc(
    100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overflow-y: auto;
}
@media (max-width: 370px) {
  .touch-enabled .player-abilities {
    width: 170px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .start-screen {
    padding-top: max(5.5dvh, env(safe-area-inset-top));
  }
  .touch-enabled .super-timing {
    bottom: 20px;
    width: 240px;
  }
  .enemy-caption span {
    display: none;
  }
  .touch-enabled .player-abilities {
    bottom: calc(150px + env(safe-area-inset-bottom));
    width: 170px;
  }
  /* Practice instructions occupy the upper left on short phones. Keep its
     charge meter in the free strip between the two thumb-control corners. */
  .touch-enabled.practice .player-abilities {
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: min(
      170px,
      calc(
        100vw - 340px - env(safe-area-inset-left) - env(safe-area-inset-right)
      )
    );
  }
  .start-screen h1 {
    font-size: clamp(2rem, 9dvh, 3rem);
    align-self: flex-start;
  }
  .home-streak {
    top: calc(
      max(5.5dvh, env(safe-area-inset-top)) + clamp(2.4rem, 10.8dvh, 3.6rem) +
        10px
    );
    left: max(24px, env(safe-area-inset-left));
  }
  .title-tools {
    top: calc(10px + env(safe-area-inset-top));
    right: calc(70px + env(safe-area-inset-right));
    max-width: calc(
      100vw - 84px - env(safe-area-inset-left) - env(safe-area-inset-right)
    );
  }
  .settings-button {
    top: calc(14px + env(safe-area-inset-top));
  }
  .option-panel {
    width: min(
      292px,
      calc(
        100vw - 84px - env(safe-area-inset-left) - env(safe-area-inset-right)
      )
    );
  }
  #preview-orbit {
    inset: 20% 0 100px;
  }
  .preview-controls {
    margin-bottom: 6px;
  }
  .callout {
    top: max(128px, 28%);
    font-size: 22px;
  }
}

.graphics-status {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: max(90px, env(safe-area-inset-top));
  transform: translateX(-50%);
  width: min(360px, 90vw);
  background: #10232bf2;
  border: 1px solid #ffffff40;
  border-radius: 6px;
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}
.graphics-status .text-button {
  margin-top: 0;
}
