:root {
  color-scheme: dark;
  --black: #050607;
  --charcoal: #11151a;
  --panel: #0b0f12;
  --gold: #d8a234;
  --hot-gold: #ffbf3c;
  --pale: #f7e3a4;
  --danger: #e0443e;
  --river: #17384c;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 191, 60, 0.08), transparent 18%, transparent 82%, rgba(255, 191, 60, 0.08)),
    linear-gradient(160deg, #030405 0%, #101318 48%, #040506 100%);
  color: var(--pale);
  display: flex;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  justify-content: center;
  min-height: 100%;
  overflow: hidden;
}

.shell {
  padding: 18px;
  width: min(100vw, 1180px);
}

.stage-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
  border: 2px solid rgba(216, 162, 52, 0.85);
  border-radius: 8px;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.9),
    0 18px 70px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(216, 162, 52, 0.18);
  max-height: calc(100vh - 36px);
  position: relative;
  width: 100%;
}

canvas {
  display: block;
  height: 100%;
  image-rendering: pixelated;
  width: 100%;
}

.overlay {
  align-items: center;
  background:
    linear-gradient(rgba(3, 4, 5, 0.35), rgba(3, 4, 5, 0.72)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: absolute;
}

.overlay.title-screen {
  background:
    linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08)),
    url("assets/images/about-time-start-screen.png") center / cover no-repeat;
  overflow: hidden;
  padding: 0;
}

.overlay.hidden {
  display: none;
}

.title-card {
  max-width: 760px;
  text-align: center;
  text-shadow: 0 3px 0 #000;
}

.title-screen .title-card {
  height: 100%;
  max-width: none;
  position: relative;
  width: 100%;
}

.title-screen .eyebrow,
.title-screen h1,
.title-screen .tagline {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.label-logo {
  display: none;
}

.title-screen .label-logo {
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.32))
    drop-shadow(0 0 18px rgba(243, 191, 79, 0.18));
  height: auto;
  left: 3.4%;
  opacity: 0.9;
  position: absolute;
  top: 6.2%;
  width: clamp(96px, 15vw, 168px);
  z-index: 3;
}

.eyebrow {
  color: var(--hot-gold);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  color: var(--gold);
  font-size: clamp(4rem, 12vw, 9.5rem);
  line-height: 0.86;
  margin: 0;
  -webkit-text-stroke: 2px #2b1a05;
}

.tagline {
  color: var(--pale);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.7rem);
  margin: 18px auto 20px;
  max-width: 720px;
}

button {
  background: linear-gradient(#ffce62, #b87818);
  border: 2px solid #fff0b8;
  border-radius: 4px;
  color: #080909;
  cursor: pointer;
  font: 900 1.1rem/1 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  min-height: 46px;
  padding: 10px 28px;
  text-transform: uppercase;
}

.title-screen button {
  background:
    linear-gradient(90deg, transparent 0%, rgba(187, 120, 24, 0.96) 11%, #ffd86f 50%, rgba(184, 120, 24, 0.96) 89%, transparent 100%);
  border: 0;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.7),
    0 0 24px rgba(255, 191, 60, 0.22);
  color: #090806;
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  left: 50%;
  min-height: 48px;
  min-width: min(360px, 42vw);
  padding: 9px 42px 11px;
  position: absolute;
  top: 76.7%;
  transform: translateX(-50%);
  -webkit-text-stroke: 1px rgba(255, 224, 127, 0.18);
}

.journey-note,
.stage-select {
  display: block;
}

.journey-note.hidden,
.stage-select.hidden {
  display: none;
}

.title-screen .journey-note {
  background:
    linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.78) 10%, rgba(10, 7, 2, 0.9) 50%, rgba(0, 0, 0, 0.78) 90%, transparent);
  border-top: 1px solid rgba(255, 191, 60, 0.64);
  border-bottom: 1px solid rgba(255, 191, 60, 0.64);
  color: #ffe39a;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1.35rem);
  left: 12%;
  letter-spacing: 0;
  margin: 0;
  padding: 7px 18px 8px;
  position: absolute;
  right: 12%;
  text-shadow:
    0 2px 0 #000,
    0 0 12px rgba(255, 191, 60, 0.56);
  text-transform: uppercase;
  top: 63.8%;
  z-index: 3;
}

.title-screen .stage-select {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 69.8%;
  transform: translateX(-50%);
  width: min(620px, 82vw);
  z-index: 4;
}

.title-screen .stage-select.hidden {
  display: none;
}

.title-screen .stage-select button {
  background:
    linear-gradient(#15110a, #070707),
    linear-gradient(#ffce62, #b87818);
  border: 1px solid rgba(255, 219, 126, 0.8);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.72),
    inset 0 0 14px rgba(255, 191, 60, 0.12);
  color: #ffd46a;
  flex: 1 1 0;
  font-size: clamp(0.82rem, 1.35vw, 1.08rem);
  left: auto;
  min-height: 38px;
  min-width: 0;
  padding: 8px 8px;
  position: static;
  text-shadow:
    0 2px 0 #000,
    0 0 8px #000;
  top: auto;
  transform: none;
  -webkit-text-stroke: 0;
}

.title-screen .stage-select button.active {
  background:
    linear-gradient(90deg, #291900, #ffbf3c 50%, #291900);
  color: #080806;
  text-shadow: 0 1px 0 rgba(255, 235, 174, 0.5);
}

button:hover {
  filter: brightness(1.12);
}

button:focus-visible,
input:focus-visible,
.controller-focused {
  outline: 3px solid var(--hot-gold);
  outline-offset: 4px;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(255, 191, 60, 0.72);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8) brightness(0.58);
}

.promo-panel {
  background: rgba(4, 5, 6, 0.9);
  border: 2px solid rgba(255, 191, 60, 0.82);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.78),
    0 0 26px rgba(255, 191, 60, 0.16);
  margin: 18px auto 0;
  max-width: 760px;
  padding: 16px;
}

.promo-panel.hidden {
  display: none;
}

.promo-stats {
  color: var(--pale);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(0.9rem, 1.55vw, 1.15rem);
  line-height: 1.35;
  margin: 0 0 14px;
}

.promo-tiers {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 12px;
}

.promo-tier {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 191, 60, 0.28);
  border-radius: 6px;
  color: #b9ad86;
  padding: 8px 7px;
  text-align: left;
}

.promo-tier strong,
.promo-tier span,
.promo-tier small {
  display: block;
}

.promo-tier strong {
  color: #ffd46a;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.promo-tier span {
  color: #fff0b8;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 0.82rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.promo-tier small {
  color: #d9cfaa;
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  margin-top: 4px;
}

.promo-tier.unlocked {
  border-color: rgba(255, 191, 60, 0.72);
}

.promo-tier.active {
  background:
    linear-gradient(135deg, rgba(255, 191, 60, 0.28), rgba(0, 0, 0, 0.56));
  box-shadow:
    inset 0 0 18px rgba(255, 191, 60, 0.16),
    0 0 16px rgba(255, 191, 60, 0.18);
}

.promo-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promo-actions button {
  min-height: 52px;
  padding: 8px 12px;
  white-space: normal;
}

.music-gallery-toggle {
  animation: galleryPulse 1.8s ease-in-out infinite;
  background:
    linear-gradient(90deg, #070706, #231604 44%, #ffbf3c 50%, #231604 56%, #070706),
    linear-gradient(#ffce62, #b87818);
  border: 2px solid rgba(255, 238, 170, 0.92);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.72),
    0 0 24px rgba(255, 191, 60, 0.55),
    0 0 54px rgba(255, 191, 60, 0.24);
  color: var(--hot-gold);
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
  min-height: 48px;
  min-width: 176px;
  padding: 10px 20px;
  position: absolute;
  bottom: 16px;
  right: 14px;
  text-shadow:
    0 2px 0 #000,
    0 0 12px rgba(0, 0, 0, 0.94);
  z-index: 5;
}

.music-gallery-toggle.hidden {
  display: none;
}

.overlay.title-screen:not(.hidden) + .music-gallery-toggle {
  bottom: auto;
  top: 18px;
}

.touch-controls {
  display: none;
  inset: 0;
  pointer-events: none;
  position: absolute;
  touch-action: none;
  user-select: none;
  z-index: 6;
}

.touch-controls.visible {
  display: block;
  opacity: 0.88;
}

.touch-stick {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 191, 60, 0.24), rgba(7, 7, 7, 0.72) 58%, rgba(0, 0, 0, 0.82)),
    linear-gradient(145deg, rgba(255, 191, 60, 0.2), rgba(0, 0, 0, 0.38));
  border: 2px solid rgba(255, 218, 130, 0.74);
  border-radius: 50%;
  bottom: 10px;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.55),
    inset 0 0 20px rgba(255, 191, 60, 0.18),
    0 0 28px rgba(255, 191, 60, 0.16);
  height: clamp(82px, 12vw, 108px);
  left: clamp(8px, 2.6vw, 24px);
  pointer-events: auto;
  position: absolute;
  touch-action: none;
  width: clamp(82px, 12vw, 108px);
}

.touch-stick::before,
.touch-stick::after {
  background: rgba(255, 218, 130, 0.28);
  content: "";
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.touch-stick::before {
  height: 2px;
  width: 72%;
}

.touch-stick::after {
  height: 72%;
  width: 2px;
}

.touch-stick__knob {
  background:
    radial-gradient(circle at 38% 34%, #ffe29b, #d8a234 40%, #5f3508 72%, #050607);
  border: 2px solid rgba(255, 241, 184, 0.82);
  border-radius: 50%;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.58),
    0 0 18px rgba(255, 191, 60, 0.32);
  height: 42%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42%;
}

.touch-actions {
  bottom: 8px;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(4, clamp(44px, 6.8vw, 58px));
  grid-template-rows: clamp(38px, 5.8vw, 50px) 1fr clamp(44px, 6.8vw, 58px);
  pointer-events: none;
  position: absolute;
  right: clamp(6px, 2vw, 20px);
  top: clamp(72px, 15dvh, 98px);
  touch-action: none;
}

.touch-btn--hero,
.touch-btn--hit,
.touch-btn--ad {
  grid-row: 1;
}

.touch-btn--hero {
  grid-column: 2;
}

.touch-btn--hit {
  grid-column: 3;
}

.touch-btn--ad {
  grid-column: 4;
}

.touch-btn--weapon,
.touch-btn--special,
.touch-btn--jump,
.touch-btn--fire {
  grid-row: 3;
}

.touch-btn--weapon {
  grid-column: 1;
}

.touch-btn--special {
  grid-column: 2;
}

.touch-btn--jump {
  grid-column: 3;
}

.touch-btn--fire {
  grid-column: 4;
}

.touch-btn {
  align-items: center;
  background:
    linear-gradient(#1a1306, #090909),
    linear-gradient(#ffce62, #b87818);
  border: 2px solid rgba(255, 224, 145, 0.82);
  border-radius: 50%;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.72),
    inset 0 0 16px rgba(255, 191, 60, 0.12),
    0 0 18px rgba(255, 191, 60, 0.2);
  color: #ffd46a;
  display: flex;
  font-size: clamp(0.58rem, 1vw, 0.8rem);
  justify-content: center;
  min-height: clamp(44px, 6.8vw, 58px);
  min-width: 0;
  padding: 0;
  pointer-events: auto;
  text-shadow:
    0 2px 0 #000,
    0 0 8px #000;
  touch-action: none;
  width: clamp(44px, 6.8vw, 58px);
}

.touch-btn--small {
  background:
    linear-gradient(#0b0c0d, #171006),
    linear-gradient(#ffce62, #b87818);
  font-size: clamp(0.5rem, 0.86vw, 0.68rem);
  transform: scale(0.88);
}

.touch-btn.pressed,
.touch-stick.active .touch-stick__knob {
  filter: brightness(1.25);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.82),
    0 0 28px rgba(255, 191, 60, 0.48);
}

@keyframes galleryPulse {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }

  50% {
    filter: brightness(1.16);
    transform: scale(1.035);
  }
}

.music-gallery {
  background:
    linear-gradient(180deg, rgba(10, 12, 14, 0.98), rgba(4, 5, 6, 0.96)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
  border: 2px solid rgba(255, 191, 60, 0.86);
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.74),
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 36px rgba(255, 191, 60, 0.2);
  color: var(--pale);
  left: 50%;
  max-height: min(86vh, 500px);
  overflow: auto;
  padding: 18px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, calc(100% - 34px));
  z-index: 7;
}

.music-gallery.hidden {
  display: none;
}

.music-gallery__header {
  align-items: center;
  border-bottom: 1px solid rgba(255, 191, 60, 0.38);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.music-gallery__eyebrow,
.music-gallery__status,
.music-gallery__ad {
  font-family: "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0;
  margin: 0;
}

.music-gallery__eyebrow {
  color: var(--hot-gold);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.music-gallery h2 {
  color: var(--gold);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1;
  margin: 3px 0 0;
}

.music-gallery__header button {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 7px 14px;
}

.music-gallery__status,
.music-gallery__ad {
  color: #ffd46a;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.music-gallery__list {
  display: grid;
  gap: 8px;
}

.song-row {
  align-items: center;
  background: rgba(255, 191, 60, 0.07);
  border: 1px solid rgba(255, 191, 60, 0.26);
  display: grid;
  gap: 10px;
  grid-template-columns: 42px 1fr auto;
  min-height: 70px;
  padding: 10px;
}

.song-row.locked {
  filter: grayscale(0.28);
  opacity: 0.7;
}

.song-row__slot {
  align-items: center;
  background: #050607;
  border: 1px solid rgba(255, 191, 60, 0.54);
  color: var(--hot-gold);
  display: flex;
  font-size: 1.05rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.song-row__title {
  color: #fff0b8;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.song-row__meta {
  color: #d9cfaa;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0;
}

.song-row__actions {
  display: flex;
  gap: 8px;
}

.song-row__actions button {
  font-size: 0.76rem;
  min-height: 32px;
  padding: 6px 10px;
}

.controls-panel {
  background:
    linear-gradient(150deg, rgba(5, 6, 7, 0.96), rgba(15, 12, 5, 0.95)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
  border: 2px solid rgba(255, 191, 60, 0.84);
  border-radius: 8px;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.76),
    0 18px 70px rgba(0, 0, 0, 0.86),
    0 0 34px rgba(255, 191, 60, 0.2);
  color: var(--pale);
  left: 50%;
  max-height: calc(100% - 44px);
  overflow: auto;
  padding: 18px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 44px));
  z-index: 9;
}

.controls-panel.hidden {
  display: none;
}

.controls-panel__top {
  align-items: center;
  border-bottom: 1px solid rgba(255, 191, 60, 0.42);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.controls-panel__eyebrow {
  color: var(--hot-gold);
  font-family: Arial, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.controls-panel h2,
.controls-panel h3 {
  color: var(--gold);
  letter-spacing: 0;
  margin: 0;
  text-shadow: 0 2px 0 #000;
  text-transform: uppercase;
}

.controls-panel h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 0.95;
}

.controls-panel h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.controls-panel__top button {
  font-size: 0.9rem;
  min-height: 38px;
  padding: 8px 18px;
}

.controls-panel__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 16px;
}

.controls-panel__grid > div {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 191, 60, 0.3);
  border-radius: 6px;
  padding: 14px;
}

.controls-panel p {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  gap: 12px;
  justify-content: space-between;
  margin: 0;
  padding: 8px 0;
}

.controls-panel p:first-of-type {
  border-top: 0;
}

.controls-panel strong {
  color: #fff2bd;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 0.98rem;
  font-weight: 900;
  text-transform: uppercase;
}

.controls-panel span {
  color: #ffd46a;
  text-align: right;
}

.realboard {
  background:
    linear-gradient(180deg, rgba(248, 239, 205, 0.96), rgba(230, 214, 163, 0.94)),
    repeating-linear-gradient(0deg, rgba(8, 8, 8, 0.035) 0 1px, transparent 1px 6px);
  border: 3px solid #050607;
  box-shadow:
    0 0 0 4px rgba(255, 191, 60, 0.82),
    0 24px 70px rgba(0, 0, 0, 0.86);
  color: #090806;
  left: 50%;
  max-height: min(88vh, 520px);
  overflow: auto;
  padding: 18px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(850px, calc(100% - 28px));
  z-index: 8;
}

.realboard.hidden {
  display: none;
}

.realboard__top {
  align-items: center;
  border-bottom: 5px solid #090806;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.realboard__eyebrow,
.realboard__summary {
  font-family: "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.realboard__eyebrow {
  color: #9b1313;
  font-size: 0.9rem;
  font-weight: 900;
}

.realboard h2 {
  color: #050607;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  line-height: 0.92;
  margin: 2px 0 0;
  text-shadow: 2px 2px 0 rgba(255, 191, 60, 0.8);
}

.realboard__top button {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 7px 14px;
}

.realboard__summary {
  color: #2c2412;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.realboard-profile {
  align-items: end;
  background: rgba(5, 6, 7, 0.92);
  border: 2px solid #050607;
  color: #ffbf3c;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.15fr) auto auto;
  margin-bottom: 12px;
  padding: 10px;
}

.realboard-profile label {
  color: #ffbf3c;
  display: grid;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 0.76rem;
  gap: 4px;
  text-transform: uppercase;
}

.realboard-profile input {
  background: #f8ebbd;
  border: 2px solid #050607;
  color: #050607;
  font: 700 0.92rem Arial, sans-serif;
  min-height: 34px;
  padding: 7px 8px;
  width: 100%;
}

.realboard-profile button {
  font-size: 0.72rem;
  min-height: 34px;
  padding: 7px 10px;
}

.realboard-profile__status {
  color: #f7e3a4;
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  grid-column: 1 / -1;
  line-height: 1.3;
  margin: 0;
}

.realboard__labels,
.realboard-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 78px 78px 64px 64px 1fr;
}

.realboard__labels {
  background: #050607;
  color: #ffbf3c;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 0.74rem;
  padding: 8px 10px;
  text-transform: uppercase;
}

.realboard__list {
  border-left: 2px solid #050607;
  border-right: 2px solid #050607;
}

.realboard-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid #050607;
  min-height: 52px;
  padding: 8px 10px;
}

.realboard-row.huggie {
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.96), rgba(37, 24, 6, 0.94));
  color: #fff0b8;
}

.realboard-row__rank {
  font-size: 2rem;
  line-height: 1;
}

.realboard-row__number {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.1rem;
}

.realboard-row__track {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
}

.realboard-row__meta {
  font-family: Arial, sans-serif;
  font-size: 0.74rem;
  line-height: 1.35;
  margin-top: 2px;
}

.title-screen .promo-panel {
  display: none;
}

.overlay.result-screen .controls {
  display: none;
}

.overlay.result-screen .title-card {
  max-width: 820px;
}

.overlay.result-screen h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.92;
}

.overlay.result-screen .tagline {
  margin-bottom: 14px;
}

.overlay.result-screen .promo-panel {
  margin-top: 14px;
}

.controls {
  color: #d9cfaa;
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 18px auto 0;
  max-width: 620px;
}

.move-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  justify-content: center;
}

.move-strip span {
  white-space: nowrap;
}

.move-strip kbd {
  background:
    linear-gradient(#f7e3a4, #d8a234 54%, #8e5615);
  border: 1px solid rgba(255, 241, 184, 0.92);
  border-radius: 999px;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.78),
    inset 0 0 8px rgba(255, 255, 255, 0.18);
  color: #080806;
  display: inline-flex;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 0.72em;
  justify-content: center;
  line-height: 1;
  margin-right: 4px;
  min-width: 1.8em;
  padding: 3px 6px 4px;
  text-shadow: none;
  vertical-align: 0.08em;
}

.title-screen .move-strip .controls-help-button {
  background:
    linear-gradient(#15110a, #070707),
    linear-gradient(#ffce62, #b87818);
  border: 1px solid rgba(255, 219, 126, 0.82);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    inset 0 0 14px rgba(255, 191, 60, 0.16),
    0 0 18px rgba(255, 191, 60, 0.24);
  color: #ffd46a;
  font-size: clamp(0.78rem, 1.35vw, 1.02rem);
  left: auto;
  min-height: 28px;
  min-width: 0;
  padding: 5px 13px 6px;
  position: static;
  text-shadow:
    0 2px 0 #000,
    0 0 8px #000;
  top: auto;
  transform: none;
  -webkit-text-stroke: 0;
}

.title-screen .controls {
  background:
    linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.78) 9%, rgba(8, 6, 2, 0.88) 50%, rgba(0, 0, 0, 0.78) 91%, transparent);
  border-top: 1px solid rgba(255, 191, 60, 0.72);
  border-bottom: 1px solid rgba(255, 191, 60, 0.72);
  color: #ffd46a;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(0.98rem, 1.85vw, 1.42rem);
  line-height: 1.1;
  margin: 0;
  max-width: none;
  padding: 9px 22px 10px;
  position: absolute;
  left: 3.5%;
  right: 3.5%;
  text-shadow:
    0 2px 0 #000,
    0 0 8px #000,
    0 0 15px rgba(255, 191, 60, 0.72);
  text-transform: uppercase;
  top: 85.2%;
  z-index: 2;
}

.title-screen .move-strip span:not(:last-child)::after {
  color: rgba(255, 225, 145, 0.85);
  content: "|";
  margin-left: 18px;
}

@media (max-width: 720px) {
  .shell {
    padding: 8px;
  }

  .stage-wrap {
    max-height: calc(100vh - 16px);
  }

  .controls {
    font-size: 0.78rem;
  }

  .promo-actions {
    grid-template-columns: 1fr;
  }

  .promo-tiers {
    grid-template-columns: 1fr;
  }

  .music-gallery-toggle {
    right: 8px;
    top: 8px;
    min-height: 40px;
    min-width: 138px;
  }

  .music-gallery {
    padding: 12px;
    width: calc(100% - 18px);
  }

  .realboard {
    padding: 12px;
    width: calc(100% - 18px);
  }

  .controls-panel {
    padding: 12px;
    width: calc(100% - 18px);
  }

  .controls-panel__grid {
    grid-template-columns: 1fr;
  }

  .realboard__labels,
  .realboard-row {
    grid-template-columns: 54px 48px 44px 44px 1fr;
  }

  .song-row {
    grid-template-columns: 34px 1fr;
  }

  .song-row__slot {
    height: 34px;
    width: 34px;
  }

  .song-row__actions {
    grid-column: 1 / -1;
  }

  .title-screen button {
    min-height: 38px;
    min-width: min(260px, 48vw);
    padding: 7px 26px 8px;
    top: 76.2%;
  }

  .title-screen .journey-note {
    left: 8%;
    right: 8%;
    top: 60.5%;
  }

  .title-screen .stage-select {
    gap: 5px;
    top: 67.5%;
    width: min(520px, 88vw);
  }

  .title-screen .stage-select button {
    min-height: 32px;
    padding: 6px 4px;
  }

  .title-screen .controls {
    gap: 5px 10px;
    left: 8%;
    right: 8%;
    top: 83%;
  }

  .title-screen .label-logo {
    left: 4%;
    top: 4.5%;
    width: clamp(82px, 18vw, 128px);
  }

  .title-screen .move-strip span:not(:last-child)::after {
    margin-left: 10px;
  }
}

@media (pointer: coarse), (max-width: 900px) {
  html,
  body {
    overflow: hidden;
    overscroll-behavior: none;
    width: 100%;
  }

  body {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .shell {
    padding: 0;
    width: 100vw;
  }

  .stage-wrap {
    border-radius: 0;
    max-height: 100dvh;
  }

  .music-gallery-toggle {
    bottom: 10px;
    right: 10px;
  }

  .title-screen .controls,
  .controls-panel {
    display: none !important;
  }

  .overlay.result-screen {
    align-items: center;
    height: 100dvh;
    inset: 0;
    overflow-y: auto;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    position: fixed;
    width: 100vw;
    z-index: 30;
  }

  .overlay.result-screen .title-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 100%;
    max-width: min(820px, 100%);
    width: 100%;
  }

  .overlay.result-screen h1 {
    font-size: clamp(1.65rem, 7vmin, 3.15rem);
    margin-bottom: 4px;
    -webkit-text-stroke: 1px #2b1a05;
  }

  .overlay.result-screen .tagline {
    display: -webkit-box;
    font-size: clamp(0.7rem, 2.25vmin, 0.95rem);
    line-height: 1.14;
    margin: 4px auto 6px;
    max-width: min(760px, 96vw);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .overlay.result-screen #startButton {
    font-size: clamp(0.78rem, 2.45vmin, 1.02rem);
    min-height: 34px;
    padding: 6px 18px 7px;
  }

  .overlay.result-screen .promo-panel {
    margin-top: 7px;
    max-height: min(62dvh, 330px);
    max-width: min(820px, 96vw);
    overflow-y: auto;
    padding: 8px;
    width: 100%;
  }

  .overlay.result-screen .promo-stats {
    font-size: clamp(0.66rem, 2.05vmin, 0.86rem);
    line-height: 1.18;
    margin-bottom: 6px;
  }

  .overlay.result-screen .promo-tiers {
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 7px;
  }

  .overlay.result-screen .promo-tier {
    border-radius: 4px;
    padding: 5px 5px 6px;
  }

  .overlay.result-screen .promo-tier strong {
    font-size: clamp(0.6rem, 1.9vmin, 0.78rem);
  }

  .overlay.result-screen .promo-tier span {
    font-size: clamp(0.56rem, 1.8vmin, 0.72rem);
    line-height: 1.05;
  }

  .overlay.result-screen .promo-tier small {
    font-size: clamp(0.5rem, 1.65vmin, 0.64rem);
    line-height: 1.12;
    margin-top: 2px;
  }

  .overlay.result-screen .promo-actions {
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overlay.result-screen .promo-actions button {
    font-size: clamp(0.58rem, 1.95vmin, 0.78rem);
    line-height: 1.08;
    min-height: 34px;
    padding: 5px 6px 6px;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  body {
    align-items: flex-start;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .stage-wrap {
    margin-top: 0;
    width: 100vw;
  }

  .touch-stick {
    bottom: max(6px, env(safe-area-inset-bottom));
    left: max(6px, env(safe-area-inset-left));
  }

  .touch-actions {
    bottom: max(6px, env(safe-area-inset-bottom));
    right: max(6px, env(safe-area-inset-right));
  }
}

/* Patreon support replaces the former advertising gates. */
.cutscene-patreon {
  align-items: center;
  background: rgba(3, 4, 5, 0.92);
  border: 2px solid #ffbf3c;
  bottom: 14px;
  box-shadow: 0 0 18px rgba(255, 191, 60, 0.28);
  display: none;
  gap: 8px;
  padding: 6px;
  position: absolute;
  right: 14px;
  width: min(230px, 34vw);
  z-index: 4;
  cursor: pointer;
  text-decoration: none;
}

.result-screen .cutscene-patreon {
  display: flex;
  bottom: 82px;
}

.title-screen .cutscene-patreon {
  bottom: auto;
  display: flex;
  right: 4%;
  top: 24%;
  width: min(190px, 27vw);
}

.cutscene-patreon img {
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  width: clamp(54px, 7vw, 76px);
}

.cutscene-patreon span {
  color: #f7e3a4;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(0.66rem, 1.25vw, 0.86rem);
  letter-spacing: 0.045em;
  line-height: 1.16;
  text-align: left;
  text-transform: uppercase;
}

.patreon-prompt {
  align-items: center;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: absolute;
  z-index: 60;
}

.patreon-prompt.hidden {
  display: none;
}

.patreon-prompt__card {
  align-items: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 191, 60, 0.18), transparent 45%),
    linear-gradient(160deg, #12100a, #050607 72%);
  border: 3px solid #ffbf3c;
  box-shadow: 0 0 0 4px #2b1a05, 0 22px 80px #000;
  color: #f7e3a4;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 20px);
  max-width: 520px;
  overflow-y: auto;
  padding: 24px 30px 28px;
  position: relative;
  text-align: center;
  width: min(94%, 520px);
}

.patreon-prompt__card h2 {
  color: #ffbf3c;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  letter-spacing: 0.04em;
  margin: 2px 0 8px;
  text-transform: uppercase;
}

.patreon-prompt__qr-button {
  display: block;
  width: 100%;
}

.patreon-prompt__qr-button img {
  aspect-ratio: 1;
  border: 5px solid #f7e3a4;
  display: block;
  margin: 14px auto 8px;
  max-width: min(260px, 58vh, 72vw);
  object-fit: cover;
  width: 100%;
}

.intro-patreon-button {
  align-items: center;
  background: rgba(3, 4, 5, 0.92);
  border: 2px solid #ffbf3c;
  color: #f7e3a4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  left: 50%;
  padding: 5px;
  position: absolute;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  top: 4px;
  transform: translateX(-50%);
  width: 98px;
  z-index: 18;
}

.intro-patreon-button.hidden {
  display: none;
}

.intro-patreon-button img {
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  width: 76px;
}

.intro-patreon-button span {
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.05;
}

.patreon-prompt__eyebrow,
.patreon-prompt__scan {
  color: #ffbf3c;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin: 0;
  text-transform: uppercase;
}

.patreon-prompt__scan {
  color: #f7e3a4;
  margin-bottom: 14px;
}

.patreon-prompt__close {
  background: transparent;
  border: 1px solid rgba(255, 191, 60, 0.7);
  color: #f7e3a4;
  cursor: pointer;
  padding: 5px 9px;
  position: absolute;
  right: 10px;
  top: 10px;
}

#patreonDownloadContinue {
  background: linear-gradient(#ffce62, #b87818);
  border: 2px solid #f7e3a4;
  color: #080706;
  cursor: pointer;
  font-weight: 900;
  min-height: 42px;
  padding: 10px 22px;
  text-transform: uppercase;
}

@media (pointer: coarse), (max-width: 900px) {
  .cutscene-patreon {
    bottom: 72px;
    right: 8px;
    width: min(190px, 42vw);
  }

  .title-screen .cutscene-patreon {
    bottom: auto;
    right: 3%;
    top: 22%;
    width: min(170px, 38vw);
  }

  .patreon-prompt {
    position: fixed;
  }

  .patreon-prompt__card {
    padding: 20px 18px 22px;
  }
}
