:root {
  color-scheme: dark;
  --orange: #f47d2f;
  --orange-deep: #e56f1f;
  --black: #111111;
  --ink: #f7efe6;
  --muted: #c9b7a6;
  --line: rgba(244, 125, 47, 0.48);
  --panel: rgba(17, 17, 17, 0.88);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 125, 47, 0.16), transparent 38rem),
    linear-gradient(90deg, rgba(244, 125, 47, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(244, 125, 47, 0.08) 1px, transparent 1px),
    #090706;
  background-size: auto, 22px 22px, 22px 22px, auto;
  color: var(--ink);
  font-family: "Press Start 2P", cursive;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 960px) minmax(260px, 360px);
  gap: 24px;
  width: min(1360px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0;
  align-items: start;
}

.game-panel,
.theme-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.game-panel {
  overflow: hidden;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.hud>div {
  min-width: 0;
  padding: 13px 14px 12px;
  background: #15100d;
}

.hud-label {
  display: block;
  color: var(--muted);
  font-size: 0.52rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hud strong {
  display: block;
  margin-top: 6px;
  color: var(--orange);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  background: #050403;
}


canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 28 / 31;
  image-rendering: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9));
}

.overlay.is-hidden {
  display: none;
}

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 0.55rem;
  line-height: 1.4;
  text-transform: uppercase;
}

.overlay .eyebrow {
  font-size: clamp(0.78rem, 2vw, 1.15rem);
}

.overlay .eyebrow,
.overlay h1,
.overlay .subtitle {
  text-shadow: 4px 4px 0 #000000;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 5vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
}

.subtitle {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(0.7rem, 2vw, 1.2rem);
}

.overlay-actions,
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

button {
  min-height: 42px;
  border: 1px solid rgba(244, 125, 47, 0.78);
  border-radius: 6px;
  padding: 0 14px;
  background: #20130c;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  outline: none;
  background: var(--orange);
  color: var(--black);
}

.overlay button {
  background: #000000;
  border: 3px solid var(--orange);
  border-radius: 0;
  box-shadow: 4px 4px 0 #000000;
}

.overlay button:hover,
.overlay button:focus-visible {
  background: #E77500;
  color: white;
  border-color: white;
}




.controls {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #15100d;
}

.theme-panel {
  padding: 22px;
}

.theme-panel .theme-title {
  margin-bottom: 12px;
  color: var(--orange);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1;
  text-transform: uppercase;
}

.theme-panel h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(0.85rem, 1.4vw, 1.2rem);
  line-height: 1.4;
}

.theme-panel p {
  color: var(--muted);
  font-size: 0.55rem;
  line-height: 2;
}



dl {
  display: grid;
  gap: 1px;
  margin: 22px 0 0;
  background: rgba(244, 125, 47, 0.28);
}

dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px;
  background: #15100d;
}

dt {
  color: var(--orange);
  font-size: 0.55rem;
  font-weight: 400;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.55rem;
}

.prize-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.prize-list img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: auto;
}

.recording .shell {
  grid-template-columns: minmax(320px, 960px);
  justify-content: center;
}

.recording .theme-panel,
.recording .controls {
  display: none;
}

.chrome-hidden .hud,
.chrome-hidden .theme-panel,
.chrome-hidden .controls {
  display: none;
}

.chrome-hidden .shell {
  grid-template-columns: minmax(320px, 960px);
  justify-content: center;
}

.touch-pad {
  display: none;
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .hud {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 430px) and (pointer: coarse) {
  .shell {
    width: 100%;
    padding: 0 0 104px;
  }

  .game-panel,
  .theme-panel {
    border-left: 0;
    border-right: 0;
  }

  .touch-pad {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 48px);
    gap: 4px;
    transform: translateX(-50%);
  }

  .touch-pad button {
    min-height: 48px;
    padding: 0;
    background: rgba(32, 19, 12, 0.95);
  }

  .touch-pad [data-dir="up"] {
    grid-column: 2;
  }

  .touch-pad [data-dir="left"] {
    grid-column: 1;
    grid-row: 2;
  }

  .touch-pad [data-dir="down"] {
    grid-column: 2;
    grid-row: 2;
  }

  .touch-pad [data-dir="right"] {
    grid-column: 3;
    grid-row: 2;
  }
}
