/* Game 12 only: a quiet, friendly listening space inside the ETP shell. */
@font-face {
  font-family: 'Pitch Nunito';
  src: url('/fonts/nunito-variable.ttf') format('truetype');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
.pitch-game {
  --pitch-ink: #253467;
  --pitch-muted: #526184;
  --pitch-surface: #ffffff;
  --pitch-border: #dedfe3;
  font-family: 'Pitch Nunito', sans-serif;
  max-width: 880px;
  padding: 20px 24px 48px;
  color: var(--pitch-ink);
  gap: 12px;
}
.pitch-game ::selection { color: var(--pitch-ink); background: #ffe09c; }
.pitch-game :focus-visible { outline: 3px solid #283c8e; outline-offset: 5px; }
.pitch-game button { touch-action: manipulation; }
.pitch-game .game-header { padding: 4px 0 12px; }
.pitch-page-title { flex: 1; font-size: 19px; font-weight: 800; margin: 0; }
.pitch-game .game-info { gap: 8px; }
.pitch-game .game-info .timer { background: none; color: var(--pitch-muted); padding: 0; font-size: 13px; min-width: 56px; text-align: right; }
.pitch-game .game-info .round { font-size: 14px; padding: 8px 12px; }
.pitch-game:not(.pitch-started) .game-info { visibility: hidden; }
.pitch-game .top-card-area { display: none; }
.pitch-game .bottom-cards-area { padding: 0; background: none; border: 0; box-shadow: none; }
.pitch-game:not(.pitch-started) .bottom-cards-area { display: none; }
/* The introduction is part of the page; it does not obscure navigation. */
.pitch-game #instructionsModal {
  position: static;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  z-index: auto;
}
.pitch-game .pitch-intro {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  background: var(--pitch-surface);
  border: 1px solid var(--pitch-border);
  border-radius: 16px;
  box-shadow: none;
  padding: 48px 40px 36px;
  text-align: left;
}
.pitch-intro-bird { grid-column: 2; grid-row: 1; width: 100%; max-width: 320px; align-self: center; }
.pitch-intro-copy { grid-column: 1; grid-row: 1; }
.pitch-game .pitch-intro h2 { font: 900 clamp(32px, 4vw, 42px)/1.12 'Pitch Nunito', sans-serif; letter-spacing: -.025em; margin: 0 0 12px; color: var(--pitch-ink); text-wrap: balance; }
.pitch-game .pitch-intro .pitch-intro-lead { font-size: 18px; line-height: 1.5; color: var(--pitch-muted); margin: 0 0 28px; }
.pitch-steps { display: grid; gap: 14px; list-style: none; counter-reset: listening; padding: 0; margin: 0 0 28px; }
.pitch-steps li { counter-increment: listening; display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 10px; font-size: 16px; line-height: 1.45; }
.pitch-steps li::before { content: counter(listening); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ffe3a0; color: #684809; font-size: 14px; font-weight: 900; }
.pitch-game #startBtn { border-radius: 14px; min-height: 58px; font-size: 20px; gap: 12px; background: #283c8e; box-shadow: 0 5px 12px #283c8e16; }
.pitch-game #startBtn:hover { background: #1e2d6b; }
.pitch-game .pitch-intro .pitch-intro-meta { color: var(--pitch-muted); text-align: center; font-size: 14px; font-weight: 700; margin: 12px 0 0; }
.pitch-game .pitch-trainer-container {
  max-width: none;
  padding: 24px 56px 20px;
  gap: 0;
  background: var(--pitch-surface);
  border: 1px solid var(--pitch-border);
  border-radius: 16px;
}
.pitch-progress { width: 100%; display: flex; gap: 6px; margin-bottom: 24px; }
.pitch-progress-step { height: 8px; flex: 1; background: #e9dfc8; border-radius: 4px; }
.pitch-progress-step.complete { background: #348572; }
.pitch-progress-step.current { background: #a16b0b; }
.pitch-game .pitch-instruction { font-size: 28px; line-height: 1.25; font-weight: 900; margin: 0; color: var(--pitch-ink); min-height: 35px; }
.pitch-game .pitch-visual { width: 100%; border: 0; box-shadow: none; background: none; padding: 8px 0 0; gap: 32px; border-radius: 0; }
.pitch-game .pitch-speaker { width: 180px; height: 180px; flex: 0 0 180px; background: none; border-radius: 0; box-shadow: none; transform: none; }
.pitch-game .pitch-speaker img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 88%; }
.pitch-game .pitch-speaker.playing { box-shadow: none; transform: none; }
.pitch-game .pitch-speaker.playing img { animation: pitch-listening 1.8s ease-in-out infinite; }
.pitch-game .pitch-tone-indicator { gap: 10px; align-items: center; }
.pitch-tone { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: var(--pitch-muted); }
.pitch-game .tone-dot { width: 64px; height: 64px; background: #fffdf7; border: 2px solid #bbc1cf; color: var(--pitch-muted); font-size: 28px; font-weight: 900; transform: none; transition: background .2s, border-color .2s, color .2s; }
.pitch-game .tone-dot.active { background: #283c8e; border-color: #283c8e; color: #fff; transform: none; }
.pitch-game .tone-dot.played { background: #f8e5b6; border-color: #d1b56f; color: #685018; }
.pitch-tone-link { width: 26px; height: 2px; background: #d9cbaa; margin-bottom: 31px; }
.pitch-game .pitch-question { margin: 0 0 12px; min-height: 70px; max-width: 100%; font-size: 22px; line-height: 1.35; font-weight: 800; color: var(--pitch-ink); }
.pitch-game .pitch-question.correct { color: #216849; }
.pitch-game .pitch-question.wrong { color: #8b4726; }
.pitch-game .pitch-buttons { gap: 16px; }
.pitch-game .pitch-btn { min-height: 110px; border: 2px solid transparent; border-radius: 16px; box-shadow: none; flex-direction: row; gap: 18px; font-size: 27px; font-weight: 900; color: var(--pitch-ink); transition: transform .18s cubic-bezier(.16,1,.3,1), background .18s, border-color .18s; }
.pitch-game .pitch-lower, .pitch-game .pitch-higher { background: #f4f5f6; border-color: #d5d8df; color: #374151; }
.pitch-game .pitch-btn-icon { display: grid; place-items: center; width: 42px; height: 42px; }
.pitch-game .pitch-btn svg { width: 36px; height: 36px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.pitch-game .pitch-btn:not(:disabled):hover { background: #eaecf0; border-color: #9ca3af; transform: translateY(-2px); }
.pitch-game .pitch-btn:not(:disabled):active { transform: translateY(1px); }
.pitch-game .pitch-btn:disabled { opacity: 1; cursor: default; }
.pitch-game .pitch-btn:disabled:not(.correct):not(.wrong) { background: #f7f7f8; border-color: #e5e7eb; color: #828792; }
.pitch-game .pitch-btn.correct, .pitch-game .pitch-btn.wrong { background: #e5e7eb; border-color: #6b7280; color: #374151; box-shadow: none; }
.pitch-game .pitch-replay-btn { margin: 18px 0; padding: 10px 20px; min-height: 48px; border: 1px solid #9da7c0; border-radius: 12px; box-shadow: none; background: transparent; font-size: 16px; color: var(--pitch-ink); }
.pitch-game .pitch-replay-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pitch-game .pitch-replay-btn:not(:disabled):hover { background: #eef1fb; border-color: #283c8e; transform: none; }
.pitch-game .pitch-replay-btn:disabled { opacity: 1; color: #827d70; border-color: #d9d1c0; }
.pitch-footer-stats { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid #e5e7eb; }
.pitch-game .pitch-difficulty, .pitch-game .pitch-streak { background: none; border-radius: 0; padding: 0; color: var(--pitch-muted); font-size: 14px; font-weight: 700; }
.pitch-game .pitch-streak.milestone { color: #216849; font-weight: 900; }
.pitch-shortcuts { margin: 14px 0 0; font-size: 12px; color: var(--pitch-muted); text-align: center; }
.pitch-game #resultsModal { background: #17224480; backdrop-filter: none; -webkit-backdrop-filter: none; }
.pitch-game #resultsModal .modal-content { background: var(--pitch-surface); border: 1px solid var(--pitch-border); border-radius: 16px; color: var(--pitch-ink); scrollbar-color: #a7b2cf var(--pitch-surface); }
.pitch-game #resultsModal h2 { font-family: 'Pitch Nunito', sans-serif; font-size: 34px; font-weight: 900; margin: 8px 0; }
.pitch-game #resultsModal .pitch-result-bird { width: 124px; height: 124px; object-fit: contain; margin: 0 auto; }
.pitch-game #resultsModal .results { margin: 24px 0; }
.pitch-game #resultsModal .result-item { background: none; border-radius: 0; border-bottom: 1px solid #e5e7eb; padding: 12px 0; }
.pitch-game #resultsModal .result-item .label { color: var(--pitch-muted); font-size: 14px; text-transform: none; }
.pitch-game #resultsModal .result-item .value { font-variant-numeric: tabular-nums; }
.pitch-game #resultsModal .result-item:nth-child(4) { display: none; }
.pitch-game #resultsModal .value.correct { color: #216849; }
.pitch-game #resultsModal .value.wrong { color: #8b4726; }
.pitch-game #resultsModal .result-actions { gap: 12px; }
.pitch-game #resultsModal .result-actions .btn { min-height: 48px; }
@keyframes pitch-listening { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@media (max-width: 650px) {
  .pitch-game { padding: 12px 16px 32px; }
  .pitch-game .game-header { flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
  .pitch-page-title { font-size: 17px; }
  .pitch-game .game-info { width: 100%; justify-content: space-between; padding-left: 4px; }
  .pitch-game:not(.pitch-started) .game-info { display: none; }
  .pitch-game .game-info .timer { order: 2; }
  .pitch-game .game-info .round { background: none; padding: 0; }
  .pitch-game .pitch-intro { display: flex; flex-direction: column; padding: 24px; gap: 8px; }
  .pitch-intro-bird { width: 150px; height: 150px; }
  .pitch-intro-copy { width: 100%; }
  .pitch-game .pitch-intro h2 { font-size: 32px; text-align: center; margin-bottom: 8px; }
  .pitch-game .pitch-intro .pitch-intro-lead { text-align: center; font-size: 16px; margin-bottom: 22px; }
  .pitch-steps { gap: 12px; margin-bottom: 22px; }
  .pitch-steps li { font-size: 15px; }
  .pitch-game .pitch-trainer-container { padding: 20px 20px 18px; }
  .pitch-progress { gap: 4px; margin-bottom: 20px; }
  .pitch-progress-step { height: 7px; }
  .pitch-game .pitch-instruction { font-size: 24px; min-height: 30px; }
  .pitch-game .pitch-visual { gap: 14px; padding-top: 12px; }
  .pitch-game .pitch-speaker { width: 128px; height: 142px; flex-basis: 128px; }
  .pitch-game .pitch-tone-indicator { gap: 6px; }
  .pitch-game .tone-dot { width: 48px; height: 48px; font-size: 24px; }
  .pitch-tone { gap: 8px; font-size: 12px; }
  .pitch-tone-link { width: 12px; margin-bottom: 27px; }
  .pitch-game .pitch-question { font-size: 20px; min-height: 78px; margin-bottom: 10px; }
  .pitch-game .pitch-buttons { gap: 12px; }
  .pitch-game .pitch-btn { min-height: 100px; flex-direction: column; gap: 4px; font-size: 23px; }
  .pitch-game .pitch-btn-icon { width: 30px; height: 32px; }
  .pitch-game .pitch-btn svg { width: 28px; height: 28px; }
  .pitch-game .pitch-replay-btn { margin: 16px 0; }
  .pitch-footer-stats { gap: 10px; padding-top: 12px; }
  .pitch-game .pitch-difficulty, .pitch-game .pitch-streak { font-size: 13px; }
  .pitch-shortcuts { display: none; }
}
@media (max-width: 360px) {
  .pitch-game { padding-left: 10px; padding-right: 10px; }
  .pitch-game .pitch-intro, .pitch-game .pitch-trainer-container { padding: 18px 16px; }
  .pitch-game .pitch-intro h2 { font-size: 28px; }
  .pitch-game .pitch-visual { gap: 8px; }
  .pitch-game .pitch-speaker { flex-basis: 108px; width: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  .pitch-game .pitch-speaker.playing img { animation: none; transform: none; }
  .pitch-game *, .pitch-game *::before, .pitch-game *::after { transition: none; scroll-behavior: auto; }
}
