/* Runner del pipeline. Hereda la paleta y la tipografia de style.css. */
.game-main { padding: 34px 6% 90px; max-width: 1280px; margin: 0 auto; }
.game-body .language-switch { display: flex; margin-left: auto; }
.game-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8%; align-items: end; margin: 46px 0 34px; }
.game-head h1 { font-size: clamp(46px, 6.4vw, 96px); letter-spacing: -.06em; line-height: .99; }
.game-head h1 em { color: var(--acid); font-size: 1.08em; letter-spacing: -.045em; }
.game-head p { font-size: 14px; line-height: 1.75; color: #bfc2b5; max-width: 460px; }
.game-head p strong { color: var(--paper); font-weight: 500; }

.runner-shell { border: 1px solid #555b484f; background: #1c1f1b; }
.runner-hud { display: flex; align-items: center; gap: 22px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: #b6bcab; }
.runner-hud b { color: var(--paper); font-weight: 550; margin-left: 6px; font-size: 13px; }
.runner-banner { margin-left: auto; color: var(--acid); min-height: 14px; text-align: right; }
#pause { min-width: 34px; min-height: 34px; border: 1px solid #697353; border-radius: 50%; font-size: 13px; line-height: 1; }
#pause:hover { background: var(--acid); color: var(--ink); }

.runner-stage { position: relative; }
#runner { display: block; width: 100%; height: auto; aspect-ratio: 900 / 260; touch-action: none; cursor: pointer; }
.runner-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; background: #171916d9; }
.runner-overlay[hidden] { display: none; }
.runner-panel { text-align: center; max-width: 430px; width: 100%; }
.runner-panel[hidden] { display: none; }
.runner-panel h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.04em; }
.runner-panel > p { font-size: 13px; line-height: 1.7; color: #bfc2b5; margin-top: 12px; }
.runner-panel .pill { margin-top: 18px; }
.runner-panel kbd { font-family: var(--mono); font-size: 10px; border: 1px solid #697353; border-radius: 4px; padding: 2px 6px; margin: 0 2px; }
.over-score { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin-top: 10px; }
.over-score b { font-size: 46px; font-weight: 550; letter-spacing: -.04em; color: var(--acid); }
.over-score span { color: #b6bcab; }

.score-form { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.score-form label { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: #9aa38d; margin-bottom: 7px; }
.score-form input { width: 100%; padding: 11px 13px; border: 1px solid #5c6455; border-radius: 4px; background: #0f110e; color: var(--paper); font: 400 15px/1.4 var(--sans); }
.score-form input:focus { outline: none; border-color: var(--acid); }
#game-captcha { display: flex; justify-content: center; margin: 14px 0 4px; min-height: 65px; }
.score-form button { display: flex; width: 100%; justify-content: center; gap: 12px; background: var(--acid); color: var(--ink); }
.score-form button[disabled] { opacity: .5; cursor: not-allowed; }
.form-status { min-height: 20px; margin-top: 12px; font-size: 12px; line-height: 1.5; color: #bfc2b5; }
.form-status.success { color: var(--acid); }
.form-status.error { color: var(--orange); }

.touch-controls { display: none; gap: 14px; margin-top: 14px; }
.touch-controls button { flex: 1; border: 1px solid #555b484f; background: #1c1f1b; padding: 20px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.touch-controls button:active { background: var(--acid); color: var(--ink); }
@media (hover: none), (max-width: 900px) { .touch-controls { display: flex; } }

.legend { margin-top: 64px; }
.legend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #555b484f; border: 1px solid #555b484f; margin-top: 26px; }
.legend-grid > div { background: var(--ink); padding: 22px 20px; }
.legend-grid h3 { font-size: 17px; letter-spacing: -.02em; margin-bottom: 9px; }
.legend-grid h3 i { font-style: normal; color: var(--orange); margin-right: 8px; }
.legend-grid .good h3 i { color: var(--acid); }
.legend-grid p { font-size: 12px; line-height: 1.75; color: #9fa496; }

.board { margin-top: 64px; }
.board table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.board th, .board td { text-align: left; padding: 15px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.board thead th { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: #9aa38d; font-weight: 400; }
.board tbody th { font-family: var(--mono); font-size: 11px; color: var(--acid); width: 56px; font-weight: 400; }
.board tbody tr:first-child td { color: var(--paper); }
.board td:nth-child(3) { font-weight: 550; }
.board td:last-child { font-family: var(--mono); font-size: 11px; color: #9aa38d; text-align: right; }
.board-empty { margin-top: 22px; font-size: 13px; color: #9fa496; }
.board-note { margin-top: 18px; font-size: 11px; color: #7f8578; max-width: 620px; line-height: 1.7; }

@media (max-width: 900px) {
  .game-head { grid-template-columns: 1fr; gap: 22px; margin: 32px 0 24px; }
  .runner-hud { gap: 14px; padding: 10px 14px; font-size: 9px; }
  .runner-hud b { font-size: 12px; }
  .legend-grid { grid-template-columns: 1fr; }
  .legend, .board { margin-top: 46px; }
  .board th, .board td { padding: 13px 8px; font-size: 12px; }
}
@media (max-width: 560px) {
  .runner-banner { display: none; }
  .board td:nth-child(2) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.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; }

/* Pista angosta: el panel tiene que caber en un canvas de ~180 px de alto. */
.hint-touch { display: none; }
.over-note { margin-top: 12px; font-size: 12px; line-height: 1.6; color: #9fa496; }
.over-note[hidden] { display: none; }
@media (hover: none), (max-width: 900px) {
  .hint-keys { display: none; }
  .hint-touch { display: inline; }
}
@media (max-width: 640px) {
  .runner-overlay { padding: 12px; }
  .runner-panel h2 { font-size: 22px; }
  .runner-panel > p { font-size: 12px; line-height: 1.5; margin-top: 8px; }
  .runner-panel .pill { margin-top: 12px; padding: 13px 20px; font-size: 12px; gap: 20px; }
  .over-score { gap: 10px; margin-top: 6px; }
  .over-score b { font-size: 32px; }
  .over-score span { font-size: 9px; }
  .score-form { margin-top: 12px; padding-top: 12px; }
  .over-note { font-size: 11px; margin-top: 8px; }
}
