/* Arcade instruments: brass, ink, coral and cyan. Keep the ball's path open. */
[hidden] { display: none !important; }
#game-hud { padding: 24px; }
#game-hud .hud-breathe, #game-hud .hud-breathe *, #game-hud .upgrade-wave { animation: none; }
#game-hud .hud-panel { border-width: 2px; border-radius: 2px; background: linear-gradient(145deg, #171322f0, #090e16e8); box-shadow: 4px 4px 0 #03060980, inset 0 0 0 3px #0005; }
#score-hud-panel { min-width: 240px; max-width: 290px; border-color: #c49b58; padding: 12px; }
#score-hud-panel > div:first-child { font-size: 8px; gap: 12px; }
#score-hud-panel > div:first-child .text-sm { font-size: 16px; }
#score-hud-panel > div:nth-child(2), #score-hud-panel > div:nth-child(2) > div:first-child, #hud-frame-boxes > div { border-color: #85765266; border-width: 1px; }
#score-hud-panel > div:nth-child(2) > div:first-child { background: #35263177; }
#hud-frame-boxes { min-height: 32px; }
#hud-frame-boxes > div { min-height: 32px; height: 32px; font-size: 13px; }
#score-hud-panel[data-mode="tenpin"] #hud-frame-boxes { min-height: 0; overflow: visible; }
#score-hud-panel[data-mode="tenpin"] #hud-frame-boxes > div { height: auto; min-height: 0; padding: 0; }
#score-hud-panel[data-mode="tenpin"]::after { content: 'TAP FOR ALL 10 FRAMES'; color: #d9b676; font-size: 7px; text-align: right; letter-spacing: .08em; }
#tenpin-scoreboard-screen { overflow-y: auto; }
.hud-rack-pill { display: none; }
#game-hud > div:first-child > .hud-panel:last-child { border-color: #b9924f; }
#game-hud #control-hud-row { position: absolute; inset: auto 24px 24px; width: auto; display: flex; flex-direction: row; align-items: flex-end; justify-content: flex-start; gap: 20px; margin: 0; transform: none; pointer-events: none; }
#control-hud-row > .hud-panel:first-child { order: 3; margin-left: auto; max-width: 220px; opacity: .8; }
#game-hud #control-hud-row > .meter-shell { order: 1; width: 184px !important; height: 184px !important; min-height: 0; padding: 4px !important; border-radius: 50% !important; border: 2px solid #c89d52 !important; background: radial-gradient(circle at 40% 28%, #352235f2, #080b13f5 66%) !important; box-shadow: 0 0 0 4px #090c12c0, 0 0 0 6px #805e3c, 0 10px 30px #0009, inset 0 0 20px #0008 !important; backdrop-filter: none; pointer-events: auto; flex-shrink: 0; }
#control-hud-row .meter-shell::before { display: block; inset: -9px; border: 1px dashed #d4a65d77; animation: none; }
#control-hud-row .meter-shell::after { display: block; inset: 6px; box-shadow: inset 0 0 0 1px #e7ba6433; }
#control-hud-row .meter-shell > .absolute { display: flex; padding-top: 57px; }
#gauge-canvas { display: block !important; width: 168px !important; height: 168px !important; outline-offset: 8px; }
#mobile-gauge-control { display: none !important; }
#gauge-stage-label { font-size: 7px; color: #a6a2ac; }
#gauge-sub-label { font-size: 8px; }
#meter-caption { position: absolute; left: 0; bottom: 205px; color: #efc77f; font-size: 8px; letter-spacing: .06em; text-shadow: 0 2px 2px #000; white-space: nowrap; }
#game-hud #control-hud-row > .hud-panel:last-child { order: 2; width: 208px !important; padding: 0 0 6px !important; background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none; pointer-events: none; }
#mobile-steer-label { color: #b7a88d; font-size: 7px; letter-spacing: .12em; }
#game-hud #control-hud-row .control-key { height: 46px; border-radius: 50%; background: radial-gradient(circle at 45% 20%, #363440, #10131d 75%) !important; border: 2px solid #8d7859 !important; box-shadow: 0 3px 0 #07080c, inset 0 0 0 2px #14151e; pointer-events: auto; }
#control-hud-row #btn-roll-action { border-radius: 24px; flex: 2; color: #f1c778; font-size: 7px; }
.control-topline { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
#control-hud-row #btn-camera-view { min-height: 27px; padding: 3px 9px; border: 1px solid #9a7954; border-radius: 16px; background: #161923ee; color: #efd29a; font-family: 'VT323', monospace; font-size: 12px; line-height: 1; white-space: nowrap; pointer-events: auto; cursor: pointer; }
#control-hud-row #btn-camera-view[aria-pressed="true"] { background: #65472d; border-color: #f0c67d; color: #fff1c8; }
#control-hud-row #btn-camera-view:disabled { opacity: .4; cursor: default; }
.aim-controls { display: flex; align-items: center; justify-content: center; gap: 12px; color: #8c969f; font-size: 7px; }
.aim-controls button { width: 52px; height: 32px; border: 1px solid #5c777e; border-radius: 18px; background: #111923e8; color: #8fddda; pointer-events: auto; }
.aim-controls button:disabled { opacity: .3; }
.aim-controls button span { font-size: 15px; }
.meter-key-hint { color: #b3a68d; font-size: 5px; letter-spacing: .04em; white-space: nowrap; }
#control-hud-row[data-stage="rolling"] > .meter-shell, #control-hud-row[data-stage="rolling"] > .hud-panel:last-child { opacity: .65; }
#control-hud-row[data-stage="timing"] #meter-caption { color: #77d4e6; }
#btn-debug-mode { top: auto; bottom: 6px; left: auto; right: 14px; transform: none; border: 0; background: none; color: #b2a28a; font-size: 6px; opacity: .55; }
.practice-menu-button { display: flex; flex-direction: column; gap: 9px; width: 100%; padding: 16px 18px; margin-bottom: 10px; border: 2px solid #e6b767; border-radius: 0; background: linear-gradient(110deg, #573a25, #29202e); color: #ffe3a1; cursor: pointer; text-align: left; box-shadow: inset 0 -4px 0 #0005; }
.practice-menu-button span { font-size: 11px; letter-spacing: .08em; }
.practice-menu-button small { font-size: 7px; color: #c0b6a6; }
.practice-menu-button:hover { background: #57402d; }
#practice-toolbar { position: absolute; z-index: 31; top: 24px; right: 24px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #b9975566; border-bottom: 3px solid #b99755; background: linear-gradient(110deg, #171322ee, #0a1119e8); color: #d2b780; font-size: 7px; }
.practice-label { color: #efc77f; font-size: 7px; letter-spacing: .12em; }
.practice-racks { display: flex; gap: 6px; }
.practice-racks button { width: 34px; height: 34px; border: 1px solid #7a755c; border-radius: 50%; color: #aaa49d; background: #131720; font-family: 'VT323', monospace; font-size: 21px; cursor: pointer; }
.practice-racks button[aria-pressed="true"] { border-color: #edbf6e; background: #63452b; color: #ffe3a1; box-shadow: 0 0 0 2px #aa794a33; }
.practice-chaos { display: flex; gap: 6px; align-items: center; color: #df9078; cursor: pointer; }
.practice-chaos input { accent-color: #d9865e; width: 13px; height: 13px; }
#practice-reset, #practice-exit { background: none; border: 0; border-left: 1px solid #8c795544; padding: 7px 0 7px 10px; color: #bdbaad; font-size: 7px; cursor: pointer; text-transform: uppercase; }
#practice-reset:hover, #practice-exit:hover { color: #ffe3a1; }
#release-feedback { position: absolute; z-index: 25; top: 24%; left: 50%; transform: translateX(-50%) rotate(-3deg); border-block: 2px solid #d8a95a; padding: 14px 24px; background: linear-gradient(90deg, transparent, #160f20ed 15% 85%, transparent); color: #ffdb88; font-size: 16px; letter-spacing: .08em; text-shadow: 3px 3px 0 #2c1a21; white-space: nowrap; }
body[data-playing="false"] #game-hud { visibility: hidden; }
body[data-practice="true"] #game-hud > div:first-child > .hud-panel:last-child, body[data-practice="true"] #control-hud-row > .hud-panel:first-child { display: none; }
@media (max-width: 1050px) {
    #control-hud-row > .hud-panel:first-child { display: none; }
    .practice-label { display: none; }
    #practice-toolbar { gap: 8px; }
}
@media (max-width: 700px) {
    #game-hud { padding: 14px; }
    #score-hud-panel { min-width: 220px; max-width: 240px; }
    #practice-toolbar { top: 14px; right: 14px; flex-wrap: wrap; max-width: 200px; gap: 8px; justify-content: center; padding: 8px; }
    #game-hud #control-hud-row { inset: auto 18px 20px; gap: 14px; opacity: 1; transform: none; }
    #game-hud #control-hud-row.mobile-controls-hidden { opacity: 0; pointer-events: none; }
    #game-hud #control-hud-row > .hud-panel:last-child { width: 175px !important; }
    #release-feedback { font-size: 11px; }
}
@media (max-width: 460px) {
    #score-hud-panel { min-width: 180px; max-width: 180px; padding: 8px; }
    #score-hud-panel[data-mode="tenpin"] #hud-frame-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    #score-hud-panel > div:first-child { font-size: 6px; gap: 6px; }
    #score-hud-panel > div:first-child .text-sm { font-size: 12px; }
    #practice-toolbar { max-width: 166px; padding: 7px; gap: 6px; }
    .practice-racks { gap: 4px; }
    .practice-racks button { width: 30px; height: 30px; font-size: 19px; }
    #game-hud #control-hud-row { left: 12px; right: 12px; gap: 12px; }
    #game-hud #control-hud-row > .hud-panel:last-child { width: 145px !important; }
    #game-hud #control-hud-row > .meter-shell { width: 164px !important; height: 164px !important; }
    #gauge-canvas { width: 150px !important; height: 150px !important; }
    #meter-caption { bottom: 183px; font-size: 7px; }
    #control-hud-row #btn-camera-view { padding-inline: 6px; font-size: 10px; }
    .meter-key-hint { font-size: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    #game-hud * { animation: none !important; transition: none !important; }
}

/* Override the legacy mobile vertical rail while keeping the same shot controls. */
#game-hud #control-hud-row > .hud-panel:last-child > .flex { flex-direction: row; }
#game-hud #control-hud-row .control-key { width: auto; border-radius: 50% !important; }
#game-hud #control-hud-row #btn-roll-action { display: inline-flex; border-radius: 24px !important; }
#game-hud #control-hud-row #mobile-steer-label { display: block; }
#center-message { font-size: clamp(20px, 3vw, 42px); line-height: 1.6; }
@media (max-width: 460px) {
    #game-hud #control-hud-row .control-key { font-size: 10px !important; }
    #game-hud #control-hud-row #btn-roll-action { font-size: 5px !important; }
    #practice-reset, #practice-exit { font-size: 6px; padding-left: 6px; }
}
