.yeti-cabinet {
    background:
        radial-gradient(ellipse at 50% 45%, rgba(76,232,255,.1), transparent 58%),
        repeating-linear-gradient(0deg, rgba(120,190,255,.035) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, #192345, #0d1027 72%);
}
.yeti-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yeti-hud strong { color: #a6edff; }
.yeti-hud > div + div { justify-content: flex-end; }
.yeti-hud > .yeti-speed-readout {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 5px 10px;
}
.yeti-speed-readout strong { font-size: 1.3rem; }
.yeti-speed-meter {
    grid-column: 1 / -1;
    height: 8px;
    overflow: hidden;
    border: 1px solid #47668c;
    border-radius: 99px;
    background: #080817;
}
.yeti-speed-meter-fill {
    display: block;
    width: 37.5%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3aaed0, #8cf3ff 65%, #ffe17b);
    box-shadow: 0 0 8px rgba(140,243,255,.7);
    transition: width 120ms linear;
}
.yeti-touch-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-width: 620px;
    margin: 0 auto 12px;
}
.yeti-control {
    min-width: 0;
    min-height: 46px;
    padding: 8px 5px;
    font-size: .9rem;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.yeti-playfield {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
    overflow: hidden;
    border-color: #5a7bae;
    background: #15274a;
}
.yeti-canvas {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
}
.yeti-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(8, 11, 29, .74);
    text-align: center;
}
.yeti-overlay[hidden] { display: none !important; }
.yeti-overlay h3 {
    margin: 0;
    color: #ffe17b;
    font: 400 clamp(.8rem, 3vw, 1rem)/1.7 var(--font-pixel);
    text-shadow: 2px 2px #782742;
}
.yeti-overlay p { max-width: 38ch; margin: 0; color: #e0e9f7; }
.yeti-controls-hint { margin: 9px 0 0; font-size: .9rem; }
.yeti-status {
    min-height: 1.6em;
    margin: 8px 0 0;
    color: #b9efff;
    font-size: .9rem;
    text-align: center;
}
.yeti-result-backdrop {
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(5, 5, 20, .82);
    backdrop-filter: blur(3px);
    touch-action: none;
}
.yeti-result-backdrop[hidden],
.yeti-result[hidden] { display: none !important; }
.yeti-result {
    position: fixed;
    z-index: 10001;
    top: 50%;
    left: 50%;
    width: min(540px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: 0;
    padding: 16px clamp(12px, 3vw, 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate(-50%, -50%);
    text-align: center;
}
.yeti-result form { text-align: left; }
.yeti-result .game-result-score {
    margin: 4px 0 6px;
    font-size: clamp(2.7rem, 9vw, 3.5rem);
}
.yeti-result .game-result-copy {
    margin: 5px auto 9px;
    font-size: .92rem;
}
.yeti-result .game-result-form { margin-top: 10px; }
.yeti-result .game-result-entry { grid-template-columns: minmax(0, 1fr) auto; }
.yeti-result .game-result-help { margin-top: 5px; font-size: .78rem; }
.yeti-result .game-result-actions { gap: 8px; margin-top: 12px; }
.yeti-result .game-result-actions .game-result-action {
    flex: 1 1 155px;
    min-height: 42px;
    padding: 9px 12px;
}
.yeti-scoreboards {
    --scores-mint: #9cecff;
    --scores-mint-dim: #b7a0ef;
    --scores-black: #080817;
    --scores-line: rgba(76,232,255,.36);
    border-color: #4778a4;
    color: #9cecff;
    background:
        repeating-linear-gradient(0deg, rgba(76,232,255,.018) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, rgba(32,40,71,.98), rgba(13,11,31,.98));
}
.yeti-scoreboards .scoreboards-note { color: #d4cde3; }
.yeti-scoreboards .scoreboard-period {
    border-color: #47668c;
    background: #080817;
}
.yeti-hall-link { margin: 18px 0 28px; text-align: center; }
.yeti-hall-link a { color: #9cecff; font-weight: 700; }
.yeti-hall-link a:hover { color: #fff; }
.yeti-cabinet :focus-visible { outline-color: #ffe17b; }
body.yeti-page.yeti-playing,
body.yeti-page.yeti-result-open { overflow: hidden; overscroll-behavior: none; }

@media (max-width: 520px) {
    .yeti-touch-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .yeti-control { min-height: 48px; font-size: 1rem; }
    .yeti-cabinet { padding: 12px; border-width: 4px; }
    .yeti-hud { padding: 8px; }
    .yeti-result {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        padding: 13px 12px;
    }
    .yeti-result .game-result-score { font-size: clamp(2.6rem, 12vw, 3.2rem); }
    .yeti-result .game-result-copy { font-size: .88rem; }
    .yeti-result .game-result-entry { grid-template-columns: minmax(0, 1fr) auto; }
    .yeti-result .game-result-actions .game-result-action { flex-basis: 135px; }
}

@media (prefers-reduced-motion: reduce) {
    .yeti-cabinet *, .yeti-cabinet *::before, .yeti-cabinet *::after { scroll-behavior: auto !important; }
}
