@font-face {
  font-family: Pixel;
  src: url("assets/pixel.ttf") format("truetype");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  font-variant-ligatures: none;
  font-feature-settings:
    "liga" 0,
    "clig" 0;
}
body {
  margin: 0;
  background: #f7f4ef;
  color: #332936;
  font:
    15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid #d3c9cd;
  background: #fffdf9;
  color: inherit;
  min-height: 44px;
  border-radius: 7px;
  padding: 10px 16px;
  font-weight: 650;
}
button:hover {
  background: #f9e2ed;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible,
input:focus-visible {
  outline: 3px solid #ae286d;
  outline-offset: 3px;
}
button[aria-pressed="true"],
.selected {
  background: #f5c4da;
  border-color: #ad527f;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-family: Pixel, monospace;
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: -1px;
}
h1 span {
  color: #aa336e;
}
.arcade {
  max-width: 1280px;
  margin: auto;
  padding: 28px 32px 22px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}
.quiet-button {
  border: 0;
  background: transparent;
  padding: 9px 12px;
  color: #72526a;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 32px;
  align-items: start;
}
.field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 12px;
}
.field-top > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.field-top h2 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
}
#home-number {
  font:
    11px Pixel,
    monospace;
  color: #8c7583;
  white-space: nowrap;
}
#level-badge {
  font-size: 12px;
  color: #765c6c;
  white-space: nowrap;
}
.field {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #7da651;
  box-shadow: 0 5px 20px #3a342312;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1.13;
  touch-action: none;
  image-rendering: pixelated;
  outline-offset: -4px !important;
}
.start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 6%;
  background: linear-gradient(0deg, #172d23b8, transparent 69%);
  color: #fffdf8;
}
.start-screen h2 {
  font-family: Pixel, monospace;
  font-size: clamp(22px, 3.4vw, 44px);
  line-height: 1.5;
  letter-spacing: -2px;
  text-shadow: 0 3px #34452e;
}
.start-screen h2 span {
  color: #ffb5d8;
}
.start-screen p {
  margin: 14px 0 20px;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #f57db4;
  border-color: #f57db4;
  color: #361e31;
  min-height: 52px;
  padding: 13px 22px;
  font-weight: 750;
  box-shadow: 0 3px 0 #944b70;
}
.primary-button:hover {
  background: #ff9ec9;
}
.loadout {
  padding-top: 4px;
}
.loadout h2,
.loadout label {
  font-size: 15px;
  font-weight: 700;
}
.loadout fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}
.difficulty {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.difficulty button {
  padding: 8px 5px;
  font-size: 13px;
}
.muted {
  font-size: 12px;
  color: #786975;
}
.loadout .muted {
  margin: 9px 0 25px;
  min-height: 36px;
}
label {
  display: block;
  margin-bottom: 9px;
}
select {
  width: 100%;
  min-height: 46px;
  background: #fffdf9;
  border: 1px solid #d3c9cd;
  border-radius: 7px;
  padding: 9px;
  color: inherit;
}
.weapon-preview {
  height: 95px;
  margin: 12px 0 5px;
  background-image: url("assets/rifles.webp");
  background-size: 100% 300%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.weapon-preview.extra {
  background-image: url("assets/extra-rifles.webp");
}
.weapon-spec {
  font-size: 13px;
  line-height: 1.6;
  min-height: 96px;
}
.weapon-spec p:first-child {
  color: #386144;
}
.weapon-spec p:nth-child(2) {
  color: #79626c;
}
.weapon-spec small {
  display: block;
  color: #897681;
  margin-top: 10px;
}
.route {
  border-top: 1px solid #e1d9da;
  margin-top: 22px;
  padding-top: 16px;
}
.route summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  min-height: 35px;
}
.route summary span {
  float: right;
  font-weight: 400;
  color: #786975;
}
.route ol {
  margin: 4px 0 0;
  padding-left: 26px;
  font-size: 13px;
}
.route li {
  padding: 5px 0;
  color: #897984;
}
.route li.current {
  color: #aa336e;
  font-weight: 700;
}
.route li.done {
  color: #426846;
}
.save-note {
  font-size: 11px;
  color: #8d7c88;
  margin-top: 20px;
}
.hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff8ee;
}
.hud > div {
  background: #243e32dd;
  padding: 7px 12px;
  min-width: 83px;
  border-radius: 5px;
}
.hud span {
  display: block;
  font-size: 10px;
  color: #cfddc6;
}
.hud strong {
  font-family: Pixel, monospace;
  font-size: 12px;
  line-height: 1.6;
}
.hud .urgent {
  background: #8a284f;
}
.hud button {
  margin-left: auto;
  background: #243e32dd;
  border: 0;
  color: white;
  width: 44px;
  padding: 5px;
  font-size: 20px;
}
.play-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 8px;
  margin-top: 10px;
}
.play-controls button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 59px;
  gap: 2px;
}
.play-controls small {
  font-size: 11px;
  font-weight: 400;
  color: #79626c;
}
.play-controls .fire-button {
  background: #ef86b4;
  border-color: #ef86b4;
}
.needs-reload {
  border: 2px solid #b9256c;
  background: #fce2ed;
  animation: reload-pulse 1s infinite alternate;
}
@keyframes reload-pulse {
  to {
    box-shadow: 0 0 0 3px #e9609d44;
  }
}
.howto {
  font-size: 12px;
  color: #786975;
  margin-top: 12px;
}
.round-screen {
  position: absolute;
  inset: 0;
  background: #f7f4eff2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 14px;
}
.round-screen h2 {
  font-family: Pixel, monospace;
  font-size: clamp(19px, 2.2vw, 29px);
  line-height: 1.6;
  color: #aa336e;
}
.round-screen > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #79626c;
}
.round-screen > p {
  font-size: 14px;
  max-width: 330px;
}
.round-stats {
  display: flex;
  gap: 25px;
  margin: 4px 0 10px;
}
.round-stats b,
.round-stats span {
  display: block;
}
.round-stats b {
  font-size: 22px;
}
.round-stats span {
  font-size: 10px;
  color: #7c6474;
}
.boss-hud {
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 14px;
  color: white;
  background: #302737e8;
  border-radius: 5px;
  padding: 8px 12px;
  pointer-events: none;
}
.boss-hud > div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.boss-hud progress {
  display: block;
  width: 100%;
  height: 7px;
  accent-color: #f582bc;
  margin-top: 5px;
}
.feedback {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  background: #3e273ded;
  color: white;
  white-space: nowrap;
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}
.feedback.visible {
  opacity: 1;
}
dialog {
  border: 1px solid #e5d7df;
  border-radius: 14px;
  padding: 25px;
  color: #332936;
  background: #fffdf9;
  width: min(420px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 90px #24122440;
}
dialog::backdrop {
  background: #1b252a66;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 23px;
}
dialog label {
  font-size: 13px;
  font-weight: 650;
  margin-top: 18px;
}
dialog output {
  float: right;
  font-weight: 400;
  color: #886578;
}
dialog input[type="range"] {
  width: 100%;
  accent-color: #c54c89;
  min-height: 30px;
}
dialog .muted {
  margin-top: 8px;
}
.preview-button {
  font-size: 13px;
  padding-left: 0;
}
.controls-help {
  margin-top: 22px;
  font-size: 12px;
}
.controls-help summary {
  cursor: pointer;
  min-height: 35px;
  font-weight: 650;
}
.controls-help p {
  margin: 8px 0;
  color: #786975;
}
.about {
  font-size: 11px;
  color: #998793;
  margin-top: 20px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  .arcade {
    padding: 22px 20px;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 22px;
  }
  h1 {
    font-size: 16px;
  }
  .hud > div {
    min-width: 66px;
    padding: 6px 8px;
  }
  .hud strong {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  .arcade {
    padding: 16px 14px 25px;
  }
  header {
    margin-bottom: 20px;
    gap: 8px;
  }
  h1 {
    font-size: 13px;
    letter-spacing: -0.6px;
  }
  header button {
    font-size: 12px;
    padding: 8px;
  }
  .game-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .play-column,
  .loadout {
    width: 100%;
  }
  .field-top h2 {
    font-size: 15px;
  }
  .field-top > div {
    gap: 10px;
  }
  #home-number {
    font-size: 9px;
  }
  canvas {
    aspect-ratio: 0.95;
  }
  .field {
    border-radius: 8px;
  }
  .start-screen h2 {
    font-size: 28px;
  }
  .start-screen p {
    font-size: 13px;
  }
  .loadout .muted {
    min-height: 0;
    margin-bottom: 20px;
  }
  .weapon-preview {
    width: 245px;
    height: 80px;
    float: right;
    margin: -8px 0 0 8px;
  }
  .weapon-spec {
    padding-top: 14px;
    min-height: 106px;
    font-size: 12px;
  }
  .route {
    clear: both;
    margin-top: 12px;
  }
  .playing .loadout {
    display: none;
  }
  .hud {
    left: 8px;
    right: 8px;
    top: 8px;
    gap: 6px;
  }
  .hud > div {
    min-width: 66px;
    padding: 6px 8px;
  }
  .hud strong {
    font-size: 10px;
  }
  .hud button {
    min-height: 40px;
    width: 40px;
  }
  .boss-hud {
    left: 22%;
    right: 22%;
  }
  .howto {
    font-size: 11px;
    line-height: 1.5;
  }
  .round-screen {
    gap: 11px;
    padding: 20px;
  }
  .round-screen > p {
    font-size: 13px;
  }
  .round-stats {
    gap: 22px;
  }
  .round-stats b {
    font-size: 18px;
  }
  .save-note {
    margin-top: 14px;
  }
  .play-controls button {
    min-height: 57px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 701px) {
  canvas {
    height: min(68vh, 740px);
    aspect-ratio: auto;
  }
}
@media (max-width: 700px) {
  .weapon-preview {
    float: none;
    width: 100%;
    max-width: 285px;
    height: 92px;
    margin: 12px auto 4px;
  }
  .weapon-spec {
    min-height: 0;
    padding-top: 0;
  }
}
/* Tactile arcade controls, with the scene kept clear of fingers. */
button {
  border: 2px solid #765264;
  border-radius: 6px;
  box-shadow: 0 3px 0 #765264;
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    background 0.12s;
  min-height: 46px;
}
button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 #765264;
}
button:disabled {
  box-shadow: none;
}
.quiet-button {
  border: 0;
  box-shadow: none;
}
.settings-button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background: #ffeaf4;
  border-color: #87506e;
  color: #59354c;
  box-shadow: 0 3px #87506e;
  padding: 8px 14px;
}
.settings-button span {
  font-size: 19px;
  line-height: 1;
}
.primary-button {
  background: #f36baa;
  border: 2px solid #773553;
  box-shadow: 0 4px #773553;
  color: #341c2b;
}
.difficulty button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #fffcf6;
  border: 2px solid #bc9aac;
  box-shadow: 0 3px #bc9aac;
  min-height: 66px;
  font-size: 14px;
}
.difficulty button.selected {
  background: #f39ac4;
  border-color: #864361;
  box-shadow: 0 3px #864361;
}
.difficulty button.selected::after {
  content: "✓";
  position: absolute;
  right: 5px;
  top: 2px;
  font-size: 11px;
}
.difficulty-bars {
  font-size: 10px;
  letter-spacing: 1px;
  color: #97486f;
  line-height: 1.1;
}
.difficulty-bars i {
  opacity: 0.2;
  font-style: normal;
}
.difficulty button:disabled {
  opacity: 0.65;
}
.difficulty button.selected:disabled {
  opacity: 1;
}
.game-layout {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
}
.loadout .muted {
  min-height: 0;
  margin-bottom: 22px;
}
.weapon-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.weapon-card {
  padding: 7px 7px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fffafc;
  border: 2px solid #d9bdce;
  box-shadow: 0 3px #d9bdce;
  min-width: 0;
  position: relative;
}
.weapon-card.selected {
  background: #ffe1ef;
  border-color: #a9487c;
  box-shadow: 0 3px #a9487c;
}
.weapon-card.selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  color: #913861;
  font-size: 12px;
}
.weapon-card b {
  font-size: 13px;
  white-space: nowrap;
}
.weapon-art {
  display: block;
  width: 100%;
  height: 55px;
  background-image: url("assets/rifles.webp");
  background-size: 100% 300%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.weapon-art.extra {
  background-image: url("assets/extra-rifles.webp");
}
.weapon-spec {
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid #dec7d2;
  font-size: 13px;
  min-height: 122px;
}
.weapon-spec h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.weapon-spec .weapon-numbers {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: #826071;
  font-size: 12px;
}
.weapon-numbers b {
  display: block;
  font-size: 16px;
  color: #573649;
}
.route {
  margin-top: 6px;
}
.play-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, 1fr);
  gap: 12px;
  margin: 12px 0 0;
  user-select: none;
  -webkit-user-select: none;
}
.aim-pad {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  gap: 2px;
  background: #fce7ef;
  border: 3px solid #693450;
  border-radius: 12px;
  box-shadow:
    inset 0 3px #fff9e7,
    0 4px #ba658a;
  touch-action: none;
  cursor: crosshair;
  color: #693450;
}
.aim-pad:focus-visible {
  outline: 3px solid #ae286d;
  outline-offset: 3px;
}
.aim-pad b {
  font-size: 14px;
}
.aim-pad small {
  font-size: 12px;
  pointer-events: none;
}
.pad-mark {
  display: block;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  background: url("assets/aim-pad.png") center / 112% no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
.pad-contact {
  display: none;
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid #74fff0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #91f2df30;
  box-shadow: 0 0 0 2px #632b5c55;
  pointer-events: none;
}
.aim-pad.active .pad-contact {
  display: block;
}
.aim-pad.active {
  box-shadow:
    inset 0 3px #fff9e7,
    0 2px #ba658a;
  border-color: #387f7b;
}
.aim-pad.active > .pad-mark {
  filter: brightness(1.08);
}
.aim-pad[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}
.trigger-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 70px 50px;
  gap: 10px;
}
.trigger-controls button {
  padding: 5px;
  min-height: 0;
  min-width: 0;
  touch-action: none;
}
.trigger-controls b {
  font-size: 13px;
  white-space: nowrap;
}
.trigger-controls small {
  font-size: 11px;
}
.trigger-controls .fire-button {
  grid-column: 1/-1;
  flex-direction: row;
  gap: 10px;
  position: relative;
  border: 2px solid #812b58;
  background: #f56fb1;
  box-shadow: 0 5px #812b58;
  color: #3b1c31;
}
.fire-button > b {
  font:
    15px Pixel,
    monospace;
}
.fire-button > span {
  font-size: 28px;
}
.fire-button > small {
  position: absolute;
  bottom: 6px;
  color: #72304e;
  font-size: 10px;
}
.trigger-controls .fire-button:active,
.trigger-controls .fire-button.firing {
  transform: translateY(4px);
  box-shadow: 0 1px #812b58;
}
.trigger-controls .fire-button:disabled {
  box-shadow: 0 2px #812b58;
}
.left-handed .aim-pad {
  grid-column: 2;
  grid-row: 1;
}
.left-handed .trigger-controls {
  grid-column: 1;
  grid-row: 1;
}
.left-handed .play-controls {
  grid-template-columns: minmax(150px, 1fr) minmax(0, 1.3fr);
}
.playing .loadout {
  display: none;
}
.playing .game-layout {
  display: block;
}
.playing .play-column {
  width: min(100%, calc((100svh - 270px) * 1.35));
  min-width: 310px;
  margin: auto;
}
.playing canvas {
  height: auto;
  aspect-ratio: 1.2;
}
.hud button {
  border: 1px solid #a1b4a580;
  box-shadow: 0 2px #163126;
}
.howto {
  line-height: 1.5;
}
.field-top {
  min-height: 36px;
}
#level-badge {
  background: #f3dde8;
  color: #783658;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }
  .weapon-gallery {
    gap: 8px;
  }
  .weapon-card b {
    font-size: 12px;
  }
  .weapon-art {
    height: 48px;
  }
}
@media (max-width: 700px) {
  .game-layout {
    display: flex;
    gap: 24px;
  }
  .weapon-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .weapon-card {
    padding: 8px 12px 10px;
  }
  .weapon-card b {
    font-size: 14px;
  }
  .weapon-art {
    height: 64px;
  }
  .weapon-spec {
    min-height: 0;
    margin-top: 20px;
    font-size: 14px;
  }
  .loadout h2 {
    font-size: 16px;
  }
  .loadout .muted {
    font-size: 12px;
    margin: 12px 0 22px;
  }
  .playing .play-column {
    width: 100%;
    min-width: 0;
  }
  .playing canvas {
    height: auto;
    aspect-ratio: 0.98;
  }
  .playing .arcade {
    padding: 10px 12px max(14px, env(safe-area-inset-bottom));
  }
  .playing header {
    margin-bottom: 10px;
  }
  .playing .field-top {
    padding-bottom: 8px;
    min-height: 30px;
  }
  .playing .howto {
    font-size: 12px;
    margin-top: 10px;
  }
  .play-controls {
    grid-template-columns: minmax(0, 1.2fr) minmax(150px, 1fr);
    gap: 10px;
  }
  .left-handed .play-controls {
    grid-template-columns: minmax(150px, 1fr) minmax(0, 1.2fr);
  }
  .play-controls button {
    min-height: 0;
  }
  .settings-button {
    font-size: 12px;
    padding: 7px 10px;
    min-height: 40px;
  }
  .settings-button span {
    font-size: 17px;
  }
  .hud strong {
    font-size: 10px;
  }
  .hud > div {
    min-width: 65px;
  }
  .difficulty button {
    min-height: 65px;
  }
  dialog {
    padding: 20px;
  }
  .playing .field {
    scroll-margin-top: 8px;
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  .playing .arcade {
    max-width: 1200px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px
      max(12px, env(safe-area-inset-left));
  }
  .playing header {
    margin-bottom: 3px;
    min-height: 30px;
  }
  .playing h1 {
    font-size: 13px;
  }
  .playing .settings-button {
    min-height: 32px;
    padding: 4px 10px;
  }
  .playing .play-column {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 140px;
    gap: 8px 12px;
    max-width: none;
    width: 100%;
  }
  .playing .field-top {
    grid-column: 2;
    padding: 0;
    min-height: 25px;
  }
  .playing .field-top h2 {
    font-size: 14px;
  }
  .playing .field {
    grid-column: 2;
    grid-row: 2;
  }
  .playing canvas {
    height: calc(100svh - 112px);
    aspect-ratio: auto;
  }
  .playing .play-controls {
    display: contents;
  }
  .playing .aim-pad {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    min-height: 145px;
  }
  .playing .trigger-controls {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    grid-template-rows: 85px 50px;
  }
  .playing.left-handed .aim-pad {
    grid-column: 3;
  }
  .playing.left-handed .trigger-controls {
    grid-column: 1;
  }
  .playing .howto {
    grid-column: 1/-1;
    text-align: center;
    margin: 0;
    font-size: 11px;
  }
  .playing .hud {
    left: 6px;
    right: 6px;
    top: 6px;
    gap: 5px;
  }
  .playing .hud > div {
    min-width: 59px;
    padding: 4px 7px;
  }
  .playing .hud strong {
    font-size: 9px;
  }
  .playing .hud button {
    min-height: 34px;
    width: 34px;
  }
  .playing .round-screen {
    padding: 10px;
    gap: 7px;
  }
  .playing .round-screen h2 {
    font-size: 17px;
  }
  .playing .round-stats {
    margin: 0;
    gap: 15px;
  }
  .playing .round-screen .primary-button {
    min-height: 38px;
    padding: 7px 14px;
  }
}
@media (min-width: 701px) and (min-height: 541px) {
  .playing .play-column {
    width: min(100%, 860px, calc((100svh - 300px) * 1.4));
  }
  .playing canvas {
    aspect-ratio: 1.4;
  }
}
@media (max-width: 700px) and (orientation: portrait) {
  .playing canvas {
    height: min(calc(100svh - 280px), calc((100vw - 24px) / 0.98));
    min-height: 215px;
    aspect-ratio: auto;
  }
}
@media (max-width: 360px) {
  h1 {
    font-size: 11px;
    letter-spacing: -0.5px;
  }
  .settings-button {
    padding: 6px 9px;
  }
  .playing .howto {
    font-size: 11px;
  }
}
/* Results occupy their own surface, with no active game controls behind them. */
.intermission {
  max-width: 1040px;
  margin: 0 auto;
}
.result-intro {
  display: flex;
  gap: 35px;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 30px;
}
.result-eyebrow {
  color: #936075;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.result-intro h2 {
  font:
    clamp(20px, 2.5vw, 30px) / 1.55 Pixel,
    monospace;
  color: #9d2f68;
  max-width: 660px;
  outline: none;
}
#result-copy {
  font-size: 16px;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 530px;
}
.result-stats {
  color: #826378;
  font-size: 14px;
  margin-top: 12px;
}
.creator-credit {
  color: #826378;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 18px;
}
.result-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 200px;
  flex-shrink: 0;
}
.result-actions .primary-button {
  justify-content: center;
}
.secondary-button {
  background: #fbedf3;
  color: #633a54;
  border-color: #b980a0;
  box-shadow: 0 3px #b980a0;
}
.result-actions .quiet-button {
  padding: 4px 8px;
  min-height: 36px;
}
.intermission-loadout {
  padding: 20px 0 24px;
  margin-bottom: 22px;
  border-top: 1px solid #d6b3c5;
  border-bottom: 1px solid #d6b3c5;
}
.intermission-loadout h2 {
  font-size: 18px;
}
.intermission-loadout .weapon-gallery {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.intermission-loadout .weapon-art {
  height: 60px;
}
.intermission-loadout .weapon-spec {
  min-height: 0;
}
.journey {
  margin-top: 10px;
  padding: 24px 0 0;
  border-top: 1px solid #d5c6cd;
}
.journey-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.journey-heading h3 {
  font-size: 17px;
}
.journey-heading span {
  color: #9b4a70;
  font-size: 14px;
}
.journey-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #bc8da5 #f0e3e9;
  padding: 12px 0;
}
.journey-board {
  position: relative;
  min-width: 760px;
  height: 430px;
}
.toad-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rating-toad {
  display: block;
  width: 28px;
  aspect-ratio: 826 / 680;
  background: var(--rating-art) center / contain no-repeat;
  image-rendering: pixelated;
  filter: grayscale(1);
  opacity: 0.2;
}
.rating-toad.earned {
  filter: none;
  opacity: 1;
}
.trail-stop .toad-rating {
  margin-top: 7px;
  gap: 3px;
}
.result-rating {
  margin: 14px 0 10px;
}
.result-rating .toad-rating {
  gap: 12px;
}
.result-rating .rating-toad {
  width: 64px;
}
.journey-road {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 430px;
  fill: none;
  stroke: #d3c3cc;
  stroke-width: 15;
}
.journey-road path {
  stroke-linecap: round;
  stroke-dasharray: 3 9;
}
.home-trail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 190px 190px;
  gap: 30px 0;
  position: relative;
}
.trail-stop {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 8px 6px;
  text-align: center;
  position: relative;
}
.home-postcard {
  width: 126px;
  height: 98px;
  border: 3px solid #d5c4ce;
  box-shadow: 0 4px #d5c4ce;
  border-radius: 7px;
  image-rendering: pixelated;
  position: relative;
  background-repeat: no-repeat;
}
.stop-number {
  position: absolute;
  left: -7px;
  top: -6px;
  display: grid;
  place-items: center;
  background: #f5eaf1;
  color: #775369;
  border: 2px solid #b897aa;
  width: 29px;
  height: 29px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 5px;
}
.trail-stop b {
  font-size: 13px;
  line-height: 1.3;
  margin-top: 10px;
  max-width: 152px;
}
.trail-stop small {
  color: #846978;
  font-size: 11px;
  line-height: 1.3;
  margin-top: 3px;
}
.trail-stop.done .home-postcard {
  border-color: #db82ad;
  box-shadow: 0 4px #ac547e;
}
.trail-stop.done .stop-number {
  background: #ef9bc5;
  border-color: #a9487c;
  color: #593247;
}
.trail-stop.current .home-postcard {
  border-color: #ad386f;
  box-shadow:
    0 4px #8b2c59,
    0 0 0 5px #f6c8de;
}
.trail-stop.current .stop-number {
  background: #ad386f;
  color: #fff1f7;
  border-color: #ad386f;
}
.trail-stop.current small {
  color: #a12c65;
  font-weight: 800;
}
.trail-stop.locked .home-postcard {
  filter: saturate(0.4);
}
.celebration {
  border: 3px solid #994c78;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px #994c78;
  max-width: 900px;
  margin: 0 auto 24px;
}
#celebration-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1671 / 941;
  display: block;
}
/* Approved C artwork: three transparent, equally sized toy-gear cells. */
.combat-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: block;
  pointer-events: none;
  background: url("assets/toy-gear.png") 0 50% / 300% 100% no-repeat;
  image-rendering: pixelated;
}
.icon-scope {
  background-position: 50% 50%;
}
.icon-reload {
  background-position: 100% 50%;
}
.fire-button .combat-icon {
  width: 64px;
  height: 64px;
}
.trigger-controls button {
  padding: 0;
  background-color: #ffe5f0;
}
.trigger-controls .fire-button {
  gap: 0;
  background: #f7bad5;
  box-shadow:
    0 5px #812b58,
    inset 0 2px #ffe7f1;
}
#scope[aria-pressed="true"] {
  background: #b4eee3;
  border-color: #287e7c;
  box-shadow:
    0 3px #287e7c,
    inset 0 0 0 2px #ddfff6;
}
#reload.reloading .combat-icon {
  animation: reload-lift 0.7s ease-in-out infinite alternate;
}
@keyframes reload-lift {
  to {
    transform: translateY(-3px);
    opacity: 0.5;
  }
}
.ammo-meter {
  display: flex;
  gap: 4px;
  height: 7px;
  justify-content: flex-end;
  margin-top: 11px;
}
.ammo-meter i {
  width: 13px;
  height: 7px;
  border: 1px solid #ae7392;
  background: #e67cad;
}
.ammo-meter .empty {
  background: #efdee7;
}
.boss-hud {
  top: 69px;
  bottom: auto;
  left: 12px;
  right: 12px;
  padding: 7px 10px;
  background: #352a41eb;
}
.boss-hud > div {
  font-size: 12px;
}
.boss-hud progress {
  height: 8px;
}
.mission-hud {
  position: absolute;
  z-index: 2;
  top: 69px;
  left: 12px;
  right: auto;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  color: #f5f7e9;
  background: #233e33ed;
  border-left: 3px solid #a9c9a0;
  pointer-events: none;
  font-size: 14px;
  line-height: 1.4;
}
.mission-hud b,
.mission-hud span {
  display: block;
}
.mission-hud span {
  color: #d7e7d2;
  font-size: 13px;
}
@media (max-width: 700px) {
  .mission-hud {
    top: 65px;
    left: 8px;
    right: auto;
    max-width: calc(100% - 16px);
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  .mission-hud {
    top: 60px;
    padding: 4px 8px;
  }
  .mission-hud b {
    display: none;
  }
}
.playing .howto {
  margin-top: 8px;
}
@media (min-width: 701px) and (min-height: 541px) {
  .playing .play-column {
    width: min(100%, 860px, calc((100svh - 340px) * 1.4));
  }
}
@media (max-width: 700px) {
  .result-intro {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 12px 0 25px;
  }
  .result-intro h2 {
    font-size: 21px;
  }
  .result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .result-actions .primary-button {
    grid-column: 1/-1;
  }
  .result-actions > :nth-child(2):last-child {
    grid-column: 1/-1;
  }
  #result-rifle {
    grid-column: 1/-1;
  }
  #result-new {
    grid-column: 1/-1;
  }
  #result-back {
    grid-column: 1/-1;
  }
  .journey {
    margin-top: 0;
    padding-top: 18px;
  }
  .journey-heading h3 {
    font-size: 15px;
  }
  .journey-heading span {
    font-size: 12px;
  }
  .journey-board {
    min-width: 780px;
  }
  .intermission-loadout .weapon-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  #celebration-canvas {
    height: auto;
  }
  .celebration {
    margin-bottom: 22px;
  }
  .boss-hud {
    left: 8px;
    right: 8px;
    top: 65px;
  }
  .playing canvas {
    height: min(calc(100svh - 300px), calc((100vw - 24px) / 0.98));
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  .playing .ammo-meter {
    grid-column: 3;
    grid-row: 3;
    margin: 0;
  }
  .playing.left-handed .ammo-meter {
    grid-column: 1;
  }
  .playing .howto {
    grid-column: 2;
    grid-row: 3;
  }
  .playing canvas {
    height: calc(100svh - 112px);
  }
  .boss-hud {
    top: 60px;
  }
  .result-intro {
    flex-direction: row;
  }
  .result-intro h2 {
    font-size: 19px;
  }
}

/* Tablets and computers use the available viewport, not the phone's yard
   dimensions. CSS grid reserves space for every control before sizing the yard. */
@media (min-width: 701px) and (min-height: 541px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .game-layout #game {
    height: clamp(280px, calc(100svh - 210px), 740px);
    aspect-ratio: auto;
  }
  .playing .arcade {
    height: 100svh;
    max-width: 1600px;
    padding: 14px max(18px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
  }
  .playing header {
    flex: 0 0 auto;
    margin-bottom: 12px;
  }
  .playing .game-layout {
    flex: 1;
    min-height: 0;
    display: block;
  }
  .playing .play-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(240px, 1fr) auto auto auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    gap: 0;
  }
  .playing .field-top {
    grid-column: 1;
    grid-row: 1;
  }
  .playing .field {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
  }
  .playing .game-layout #game {
    height: 100%;
    width: 100%;
    aspect-ratio: auto;
    min-height: 0;
  }
  .playing .play-controls {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: minmax(220px, 300px) minmax(180px, 240px);
    justify-content: space-between;
    gap: 20px;
  }
  .playing.left-handed .play-controls {
    grid-template-columns: minmax(180px, 240px) minmax(220px, 300px);
  }
  .playing .aim-pad {
    min-height: 146px;
  }
  .playing .trigger-controls {
    grid-template-rows: 80px 56px;
  }
  .playing .fire-button .combat-icon {
    width: 72px;
    height: 72px;
  }
  .playing .combat-icon {
    width: 50px;
    height: 50px;
  }
  .playing .ammo-meter {
    grid-column: 1;
    grid-row: 4;
  }
  .playing .howto {
    grid-column: 1;
    grid-row: 5;
    font-size: 13px;
  }
  .playing.left-handed .ammo-meter {
    justify-content: flex-start;
  }
}
/* Portrait iPads get a full-width setup scene and a compact rifle gallery below. */
@media (min-width: 701px) and (orientation: portrait) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .game-layout #game {
    height: auto;
    aspect-ratio: 1.15;
  }
  .loadout .weapon-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  .loadout .weapon-art {
    height: 58px;
  }
  .loadout .weapon-spec {
    min-height: 0;
  }
  .difficulty {
    max-width: 440px;
  }
}
/* Landscape iPads and desktop screens put each hand beside the yard. */
@media (min-width: 900px) and (min-height: 541px) and (orientation: landscape) {
  .playing .play-column {
    grid-template-columns: clamp(130px, 13vw, 180px) minmax(0, 1fr) clamp(
        150px,
        14vw,
        200px
      );
    grid-template-rows: auto minmax(240px, 1fr) auto;
    column-gap: 14px;
    row-gap: 8px;
  }
  .playing .field-top {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 0;
  }
  .playing .field {
    grid-column: 2;
    grid-row: 2;
  }
  .playing .play-controls {
    display: contents;
  }
  .playing .aim-pad {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    min-height: 174px;
  }
  .playing .trigger-controls {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    grid-template-rows: 102px 62px;
  }
  .playing .fire-button .combat-icon {
    width: 90px;
    height: 90px;
  }
  .playing .combat-icon {
    width: 54px;
    height: 54px;
  }
  .playing .ammo-meter {
    grid-column: 3;
    grid-row: 3;
    margin: 4px 0 0;
  }
  .playing .howto {
    grid-column: 2;
    grid-row: 3;
    text-align: center;
    margin: 0;
  }
  .playing.left-handed .aim-pad {
    grid-column: 3;
  }
  .playing.left-handed .trigger-controls,
  .playing.left-handed .ammo-meter {
    grid-column: 1;
  }
}

.home-postcard > img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  border-radius: 4px;
}
.haptics-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.haptics-setting input {
  width: 20px;
  height: 20px;
  accent-color: #ba387b;
  margin: 0;
}
.settings-note {
  font-size: 12px;
  color: #765d70;
  margin: 0 0 12px;
}
.result-intro h2 {
  letter-spacing: 0;
  font-kerning: none;
  overflow-wrap: anywhere;
}
/* The Pixel font's fi ligature hides the dot. Font shorthands above reset
   inherited ligature settings, so apply this directly to rendered text. */
body :is(h1, h2, h3, .feedback, .hud b, .hud strong) {
  font-variant-ligatures: none;
  font-feature-settings:
    "liga" 0,
    "clig" 0;
}
@media (min-width: 701px) and (min-height: 541px) {
  .pad-mark {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }
}

/* A short, game-native field guide, using the same toads and toy controls. */
.guide-open .game-layout,
.guide-open #intermission,
.guide-open #open-settings {
  display: none !important;
}
.onboarding {
  max-width: 850px;
  margin: 10px auto 40px;
}
.guide-steps {
  display: flex;
  gap: 24px;
  padding: 12px 0 22px;
  border-bottom: 1px solid #dccbd4;
  margin-bottom: 30px;
}
.guide-steps button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  box-shadow: none;
  padding: 0 2px;
  color: #816377;
  font-size: 14px;
}
.guide-steps button span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ecdee5;
  font-size: 12px;
}
.guide-steps button[aria-current] {
  color: #902c60;
  font-weight: 800;
}
.guide-steps button[aria-current] span {
  background: #a93670;
  color: #fff4ed;
}
.guide-steps button:hover {
  color: #9d2f68;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.guide-heading {
  max-width: 660px;
}
.guide-eyebrow {
  color: #8e5576;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.075em;
  margin-bottom: 13px;
}
.guide-heading h2 {
  font:
    26px/1.5 Pixel,
    monospace;
  color: #963362;
  margin-bottom: 16px;
  outline: none;
  font-variant-ligatures: none;
  font-feature-settings:
    "liga" 0,
    "clig" 0;
}
.guide-heading > p:last-child {
  font-size: 17px;
  line-height: 1.65;
  color: #58434f;
}
.guide-page {
  animation: guide-reveal 0.2s ease-out;
}
@keyframes guide-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.guide-makeover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px 0;
  margin: 24px 0;
  background: #edf0dc;
  border-radius: 16px;
}
.guide-makeover > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 750;
  color: #5d6045;
}
.guide-makeover > div:last-child {
  color: #9c3568;
}
.guide-toad {
  display: block;
  width: 160px;
  height: 130px;
  background: url("assets/toads.webp") 0 55.556% / 231.019% 115.882% no-repeat;
  image-rendering: pixelated;
}
.guide-toad.after {
  background-size: 241.646% 115.882%;
  background-position: 100% 55.556%;
}
.guide-arrow {
  font-size: 32px;
  color: #959970;
}
.guide-goal-notes {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  font-size: 16px;
  line-height: 1.6;
}
.guide-goal-notes b {
  display: block;
  color: #44313e;
}
.guide-awards > div {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.guide-awards .rating-toad {
  width: 30px;
}
.guide-awards br {
  display: none;
}
.guide-awards p > span {
  font-size: 14px;
}
.guide-controls {
  margin: 20px 0;
}
.guide-controls > div {
  display: grid;
  grid-template-columns: 152px 1fr;
  align-items: center;
  gap: 22px;
  padding: 12px 0;
  border-bottom: 1px solid #e3d7de;
}
.guide-controls dt {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}
.guide-controls dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #58434f;
  max-width: 53ch;
}
.guide-controls .combat-icon {
  width: 58px;
  height: 58px;
}
.guide-pad-art {
  display: block;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  background: url("assets/aim-pad.png") center / 112% no-repeat;
  image-rendering: pixelated;
}
.guide-keyboard {
  font-size: 14px;
  color: #765d70;
  line-height: 1.7;
}
.guide-keyboard kbd {
  font: inherit;
  font-size: 13px;
  color: #5b3550;
  background: #ecdfe7;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}
.guide-preferences {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 30px;
  margin: 30px 0 22px;
}
.guide-pref-row label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 750;
}
.guide-pref-row select {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}
.guide-pref-row p {
  color: #765d70;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 10px;
}
.guide-music-control {
  display: flex;
  gap: 10px;
}
.guide-music-control select {
  flex: 1;
  min-width: 0;
}
.guide-music-control button {
  min-width: 86px;
  font-size: 14px;
}
.guide-settings-note {
  font-size: 15px;
  line-height: 1.6;
  color: #765d70;
}
.guide-settings-note > span {
  color: #9d2f68;
}
.guide-ready-note {
  border-top: 1px solid #dccbd4;
  margin-top: 26px;
  padding-top: 20px;
  font-size: 16px;
  line-height: 1.6;
}
.guide-ready-note b {
  display: block;
}
.guide-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #dccbd4;
  margin-top: 28px;
  padding-top: 22px;
}
.guide-footer .primary-button {
  margin-left: auto;
  font-size: 15px;
  justify-content: center;
}
.guide-footer .quiet-button {
  padding-left: 0;
  font-size: 14px;
}
.guide-progress {
  font-size: 13px;
  color: #816377;
  white-space: nowrap;
}
.settings-guide-link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 8px 0 22px;
}
@media (max-width: 600px) {
  .onboarding {
    margin: 0 auto 20px;
  }
  .guide-steps {
    gap: 20px;
    margin-bottom: 22px;
    padding: 6px 0 12px;
  }
  .guide-steps button {
    font-size: 14px;
    gap: 6px;
  }
  .guide-steps button span {
    width: 22px;
    height: 22px;
  }
  .guide-heading h2 {
    font-size: 21px;
    margin-bottom: 12px;
  }
  .guide-heading > p:last-child {
    font-size: 16px;
    line-height: 1.55;
  }
  .guide-eyebrow {
    font-size: 12px;
    margin-bottom: 9px;
  }
  .guide-makeover {
    margin: 20px 0;
    gap: 15px;
    padding: 16px 8px;
  }
  .guide-toad {
    width: 112px;
    height: 92px;
  }
  .guide-arrow {
    font-size: 26px;
  }
  .guide-goal-notes {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .guide-awards {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .guide-awards > div {
    gap: 0;
    margin: 0;
  }
  .guide-awards .rating-toad {
    width: 22px;
  }
  .guide-controls > div {
    grid-template-columns: 94px 1fr;
    gap: 12px;
    padding: 13px 0;
  }
  .guide-controls dt {
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: 14px;
  }
  .guide-controls dd {
    font-size: 16px;
    line-height: 1.45;
  }
  .guide-controls .combat-icon,
  .guide-pad-art {
    width: 52px;
    height: 52px;
  }
  .guide-preferences {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 24px 0 18px;
  }
  .guide-footer {
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
  }
  .guide-footer .primary-button {
    padding: 12px;
    font-size: 14px;
    min-height: 48px;
  }
  .guide-progress {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .guide-page {
    animation: none;
  }
}
.guide-steps #guide-skip {
  margin-left: auto;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.guide-steps button {
  white-space: nowrap;
}
.guide-phone-break {
  display: none;
}
.guide-keyboard summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 650;
}
.guide-keyboard p {
  padding: 4px 0 12px;
}
@media (max-width: 600px) {
  .guide-steps {
    gap: 12px;
  }
  .guide-steps button {
    gap: 4px;
  }
  .guide-steps #guide-skip {
    font-size: 13px;
  }
  .guide-phone-break {
    display: initial;
  }
  .guide-controls > div {
    padding: 10px 0;
  }
}
@media (max-width: 350px) {
  .guide-steps {
    flex-wrap: wrap;
    gap: 6px 14px;
  }
  .guide-steps #guide-skip {
    margin-left: 0;
  }
  .guide-toad {
    width: 100px;
    height: 82px;
  }
}

/* Focused setup: play first, optional choices on demand. */
.start-screen {
  gap: 24px;
}
.setup-footer {
  padding-top: 16px;
}
.setup-actions {
  display: flex;
  gap: 12px;
  max-width: 440px;
}
.setup-actions button {
  flex: 1;
  font-size: 14px;
}
.setup-footer .creator-credit {
  margin-top: 16px;
  font-size: 12px;
}
.setup-rifles summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 80px;
  cursor: pointer;
  list-style: none;
  background: #fffbf7;
  border: 2px solid #d7becd;
  border-radius: 6px;
}
.setup-rifles summary::-webkit-details-marker {
  display: none;
}
.setup-rifles summary:hover {
  background: #fbedf3;
}
.setup-rifles summary small {
  display: block;
  color: #826378;
  font-size: 11px;
}
.setup-rifles summary b {
  display: block;
  font-size: 14px;
}
.setup-rifles .selected-rifle-art {
  width: 80px;
  height: 42px;
  flex-shrink: 0;
  margin: 0;
}
.rifle-disclosure {
  margin-left: auto;
  font-size: 12px;
  color: #89506f;
  white-space: nowrap;
}
.rifle-disclosure span {
  display: inline-block;
}
.setup-rifles[open] .rifle-disclosure span {
  transform: rotate(45deg);
}
#rifle-panel {
  scroll-margin-top: 16px;
}
.setup-rifles #rifle-panel {
  padding-top: 20px;
}
.setup-rifles #rifle-heading {
  display: none;
}
.showing-briefing .loadout {
  display: none;
}
.showing-briefing .game-layout {
  display: block;
  max-width: 800px;
  margin: auto;
}
.showing-briefing .game-layout #game {
  height: clamp(360px, calc(100svh - 150px), 650px);
  aspect-ratio: auto;
}
.yard-entry {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(24px, 6%, 48px);
  color: #fff9f3;
  background: linear-gradient(0deg, #142c25f2, #142c25c4 38%, #142c2500 85%);
}
.yard-entry h2 {
  font:
    20px/1.6 Pixel,
    monospace;
  max-width: 22ch;
  color: #ffbddb;
}
.yard-entry p {
  max-width: 42ch;
  font-size: 17px;
  line-height: 1.6;
}
.yard-entry .entry-extra {
  font-size: 14px;
  color: #f7d7e7;
}
.entry-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}
.entry-back {
  color: #fff9f3;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.entry-back:hover {
  background: #fff4fa1a;
}
@media (min-width: 701px) and (orientation: landscape) {
  .showing-setup .game-layout #game {
    height: clamp(280px, calc(100svh - 280px), 660px);
  }
  .setup-rifles summary {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }
  .setup-rifles .selected-rifle-art {
    width: 70px;
  }
  .rifle-disclosure {
    width: 100%;
    text-align: right;
  }
}
@media (max-width: 700px) {
  .start-screen h2 {
    font-size: clamp(23px, 6.6vw, 30px);
  }
  .start-screen {
    gap: 20px;
    padding: 7%;
  }
  .setup-footer .creator-credit {
    margin-top: 14px;
  }
  .yard-entry {
    gap: 16px;
  }
  .yard-entry h2 {
    font-size: 18px;
  }
  .yard-entry p {
    font-size: 16px;
  }
}
@media (max-height: 540px) and (orientation: landscape) {
  .showing-briefing .game-layout {
    max-width: 850px;
  }
  .showing-briefing .game-layout #game {
    height: auto;
    min-height: 320px;
    aspect-ratio: 2.2;
  }
  .yard-entry {
    padding: 22px 28px;
    gap: 10px;
  }
  .yard-entry h2 {
    font-size: 18px;
    max-width: none;
  }
  .yard-entry p {
    max-width: 55ch;
    font-size: 15px;
  }
}

/* Collection navigation; the game stays independently styled. */
.hub-back { display:inline-flex;align-items:center;min-height:24px;color:#89506f;font-size:12px;font-weight:650;text-decoration:none; }
.hub-back:hover { text-decoration:underline; }
.hub-back:focus-visible { outline:3px solid #ae286d;outline-offset:3px; }
.game-title h1 { margin:0; }
