/* Self-Checkout page chrome. The lane itself is drawn on canvas in game.js.
   Kept separate from styles.css so a game change cannot disturb the site pages. */

.game-page {
  background: #151515;
}

.game-main {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) var(--edge) 48px;
}

.game-title {
  text-align: center;
  margin: 0 0 clamp(12px, 2vw, 20px);
}

.game-title p {
  margin: 0;
  font-family: "Permanent Marker", cursive;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.game-title h1 {
  margin: 6px 0 4px;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(1.9rem, 7.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--paper);
}

.game-title p.game-sub {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: #b9b2a6;
}

.game-stage {
  position: relative;
  width: min(100%, 480px);
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  border: 2px solid #2b2b2b;
  background: #0d0d0d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#lane {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: ew-resize;
}

/* The overlay holds the start, pause, and end panels. It sits above the canvas
   but ignores pointer events until a panel is shown, so dragging on the lane
   works without dismissing anything. */
.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(7, 7, 7, 0.72);
}

.game-overlay[hidden] {
  display: none;
}

.panel {
  width: min(86%, 360px);
  padding: 22px 22px 20px;
  border: 2px solid var(--paper);
  background: #0d0d0d;
  color: var(--paper);
  text-align: center;
  pointer-events: auto;
}

.panel .panel-kicker {
  margin: 0 0 6px;
  font-family: "Permanent Marker", cursive;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.panel h2 {
  margin: 0 0 10px;
  font-family: "Permanent Marker", cursive;
  font-size: 1.16rem;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
}

.panel p {
  margin: 0 0 10px;
  font-family: "Permanent Marker", cursive;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.6;
  color: #ded8cc;
}

/* The marker face has one weight, so the objective line is carried by colour
   and tracking instead of bold. */
.panel p strong {
  color: var(--paper);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.panel .panel-small {
  font-size: 0.7rem;
  line-height: 1.7;
  color: #a9a294;
}

.panel-score {
  margin: 14px 0 6px;
  display: grid;
  gap: 6px;
  font-family: "Permanent Marker", cursive;
  font-size: 0.76rem;
  font-weight: 400;
}

.panel-score div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #2b2b2b;
  padding-bottom: 4px;
}

.panel-score dt {
  color: #a9a294;
}

.panel-score dd {
  margin: 0;
  font-weight: 700;
}

.panel-total {
  border-bottom: 0 !important;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 2px solid var(--red);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.panel-total dt {
  font-family: "Oswald", Impact, sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.panel-total dd {
  font-family: "Oswald", Impact, sans-serif;
  color: var(--gold);
}

.panel-button {
  margin-top: 12px;
  min-height: 44px;
  padding: 0 30px;
  border: 1px solid #d2a700;
  background: var(--gold);
  color: var(--black);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.panel-button:hover,
.panel-button:focus-visible {
  background: #ffe04d;
  color: var(--black);
  border-color: #d2a700;
}

.panel-progress {
  margin: 12px 0 0 !important;
  padding-top: 10px;
  border-top: 1px solid #2b2b2b;
  font-size: 0.78rem !important;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: #d6cfc2 !important;
}

.panel-progress strong {
  color: var(--paper);
}

.panel-best {
  margin: 12px 0 0 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d877b !important;
}

.game-hint {
  margin: 14px auto 0;
  max-width: 480px;
  text-align: center;
  font-family: "Roboto Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8d877b;
}

.hint-button {
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid #3a3a3a;
  background: transparent;
  color: #b9b2a6;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
}

.hint-button:hover,
.hint-button:focus-visible {
  border-color: var(--paper);
  color: var(--paper);
}

.visually-hidden {
  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: 520px) {
  .game-stage {
    width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .game-title h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-button {
    transition: none;
  }
}
