/* Workshop Run 01 — game panel styles (shared by the website and the starter ZIP). */
.racer { --r-dark: #15171c; --r-plate: #1f2229; --r-edge: #3a3f4a; --r-chalk: #e9e4da; --r-chalk2: #b9b5ad;
  --r-signal: #ff6a1a; --r-amber: #ffc53d; --r-mint: #2fc4a5;
  background: var(--r-dark); color: var(--r-chalk); border-radius: 14px; padding: clamp(.75rem, 2vw, 1.25rem);
  box-shadow: 0 24px 60px rgba(0,0,0,.35); position: relative; border-top: 4px solid var(--r-signal); }
.racer *, .racer *::before, .racer *::after { box-sizing: border-box; }
.racer__title { margin: 0 0 .6rem; font-size: 1.15rem; letter-spacing: .02em; color: var(--r-chalk); }
.racer__sub { display: block; font-weight: 400; font-size: .9rem; color: var(--r-chalk2); }
.racer__hud { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.hud-plate { background: var(--r-plate); border: 1px solid var(--r-edge); border-radius: 6px; padding: .3rem .6rem;
  font: 600 .95rem/1.3 "Bahnschrift", "Segoe UI", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.hud-plate--state { color: var(--r-amber); }
.racer__stage { position: relative; }
.racer__view { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 620px; min-height: 220px;
  background: #8fd0ea; border-radius: 10px; overflow: hidden; outline: none; }
.racer__view:focus-visible { box-shadow: 0 0 0 3px var(--r-dark), 0 0 0 6px var(--r-amber); }
.racer__canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.racer__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.racer__poster[hidden], .racer__canvas[hidden] { display: none; }
.racer__overlay, .racer__fallback { position: absolute; inset: auto 0 0 0; margin: .75rem; padding: .9rem 1rem;
  background: rgba(21,23,28,.92); border: 1px solid var(--r-edge); border-radius: 10px; max-width: 34rem; }
.racer__fallback { inset: 0; margin: auto; height: fit-content; max-height: calc(100% - 1.5rem); overflow: auto; }
.racer__overlay[hidden], .racer__fallback[hidden] { display: none; }
.racer__overlay-title, .racer__fallback-title { margin: 0 0 .3rem; font-weight: 700; font-size: 1.1rem; color: #fff; }
.racer__overlay-text { margin: 0 0 .6rem; color: var(--r-chalk); }
.racer__fallback p { margin: 0 0 .5rem; }
.racer__overlay-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.racer__controls { display: grid; gap: .75rem; margin-top: .75rem; }
.racer__buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.racer .btn { min-height: 44px; min-width: 44px; padding: .5rem 1rem; border-radius: 8px; border: 2px solid var(--r-edge);
  background: var(--r-plate); color: var(--r-chalk); font: 600 1rem/1.2 "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.racer .btn:hover:not(:disabled) { border-color: var(--r-chalk2); }
.racer .btn:disabled { opacity: .55; cursor: not-allowed; }
.racer .btn--signal { background: var(--r-signal); border-color: var(--r-signal); color: #15171c; }
.racer .btn--ghost-dark { background: transparent; }
.racer .btn[aria-pressed="true"] { border-color: var(--r-amber); }
.racer button:focus-visible, .racer select:focus-visible, .racer input:focus-visible, .racer summary:focus-visible {
  outline: 3px solid var(--r-amber); outline-offset: 2px; }
.racer__modes { border: 1px solid var(--r-edge); border-radius: 8px; padding: .4rem .8rem .6rem; margin: 0;
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.racer__modes legend { padding: 0 .3rem; color: var(--r-chalk2); font-size: .9rem; }
.racer__modes label, .racer__options label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; }
.racer__options { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: center; }
.racer select { min-height: 40px; background: var(--r-plate); color: var(--r-chalk); border: 2px solid var(--r-edge);
  border-radius: 6px; padding: .2rem .5rem; font-size: 1rem; }
.racer input[type="checkbox"], .racer input[type="radio"] { width: 1.25rem; height: 1.25rem; accent-color: var(--r-signal); }
.racer__touch { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.touch-pair { display: flex; gap: 1rem; }
.touch-btn { width: 84px; height: 84px; min-width: 72px; min-height: 72px; border-radius: 14px; border: 2px solid var(--r-edge);
  background: var(--r-plate); color: var(--r-chalk); font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.touch-btn span { font-size: .78rem; font-weight: 600; }
.touch-btn--gas { border-color: var(--r-mint); }
.touch-btn--brake { border-color: #c8443a; }
.touch-btn.is-held, .touch-btn[aria-pressed="true"] { background: #2b2f38; border-color: var(--r-amber); }
@media (hover: hover) and (pointer: fine) { .racer__touch { display: none; } .racer.show-touch .racer__touch { display: flex; } }
.racer__legend summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.racer__legend ul { margin: .2rem 0 .5rem; padding-left: 1.2rem; }
.racer__legend li { margin: .25rem 0; }
.racer__legend p { color: var(--r-chalk2); margin: 0; }
.racer kbd { display: inline-block; min-width: 1.6em; padding: .05rem .35rem; border-radius: 4px; background: #2b2f38;
  border: 1px solid #5a606c; color: #fff; font: 600 .85em/1.4 "Cascadia Mono", Consolas, ui-monospace, monospace; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 639px) {
  .racer__view { aspect-ratio: 4 / 3; max-height: 360px; }
  .racer__overlay { margin: .4rem; padding: .6rem .7rem; font-size: .95rem; }
  .racer__overlay-text { display: none; }
  .touch-btn { width: 76px; height: 76px; }
  .touch-pair { gap: .75rem; }
}
@media (forced-colors: active) { .hud-plate, .racer .btn, .touch-btn { border: 2px solid CanvasText; } }
@media print { .racer__controls, .racer__overlay, .racer__canvas { display: none !important; }
  .racer__poster { display: block !important; position: static; } .racer { box-shadow: none; } }
