/* READBALL portrait shell and broadcast HUD, adapted to the PK controls. */
.readball-ui{--header-height:60px;--lime:#d5f479;--coral:#ffad91;background:radial-gradient(ellipse at 50% 45%,#234d3e 0,#102c25 48%,#071c18 100%);height:100dvh;overflow:hidden;color:#f6f8ec}
.readball-ui .topbar{position:relative;z-index:60;height:var(--header-height);max-width:none;padding:0 22px;margin:0;background:#f6f8ee;color:#163b2a;border:0;box-shadow:0 1px 0 #dbe1d2}
.readball-ui .brand{font-size:27px;gap:9px;letter-spacing:0;line-height:1;font-weight:900}
.readball-ui .brand-mark{width:34px;height:34px;line-height:34px;font-size:29px;background:#204b36;color:#f6f8ee;border:0;border-radius:50%;font-style:normal;letter-spacing:-1px}
.readball-ui .brand-mark>span{right:2px;bottom:-4px;font-size:29px;color:#d2f35e}
.readball-ui .brand-copy{display:flex;flex-direction:column;gap:5px}
.readball-ui .brand small{font:700 10px 'Noto Sans JP',sans-serif;letter-spacing:0;color:#496248;margin:0;white-space:nowrap}
.readball-ui .header-right{margin-left:auto;gap:14px}.readball-ui .guest{font-size:9px;letter-spacing:0;border:0;padding:0;color:#6c7e62}
.readball-ui .account-link{font-size:10px;color:#294e34;white-space:nowrap}
.readball-ui .shell{position:relative;width:min(440px,max(320px,calc((100dvh - 92px)*.56)));height:min(900px,calc(100dvh - 92px));max-width:100%;margin:16px auto;padding:0;border:1px solid #d0e4bd44;border-radius:28px;background:#eef2e4;box-shadow:0 20px 64px #0006,0 0 0 5px #071e1b55;overflow:hidden;container-type:size}
.readball-ui .section-head,.readball-ui .bottom-strip,.readball-ui footer{display:none}
.readball-ui .mode-dock{position:absolute;inset:0 0 auto;height:96px;background:#eef2e4;color:#173e2c;border:0;border-bottom:1px solid #ccdac1;border-radius:0;padding:0;z-index:32;display:block;box-shadow:0 3px 10px #082a1b22}
.readball-ui .mode-dock .tabs{position:absolute;left:12px;right:12px;top:9px;height:auto;width:auto;display:flex;gap:2px;margin:0;padding:3px;border:1px solid #c8d6bb;background:#dce5cf;border-radius:13px}
.readball-ui .tabs button{flex:1;min-height:34px;border:0;border-radius:10px;background:transparent;color:#49614a;padding:7px 4px;font-size:10px;font-weight:700;white-space:nowrap}
.readball-ui .tabs button.active{background:#214e38;color:#f5f8e7;box-shadow:0 2px 6px #0b302122}
.readball-ui .tiny-dot{width:4px;height:4px;background:#b1ce71;margin-left:4px}
.readball-ui .mode-dock .difficulty{position:absolute;top:57px;left:17px;display:flex;justify-content:flex-start;gap:7px;background:transparent;border:0;margin:0;padding:0;color:#536b4e;font:9px 'Noto Sans JP';letter-spacing:0}
.readball-ui .mode-dock select{color:#284d31;background:#e1e9d6;border:1px solid #c2d1b4;min-height:26px;padding:3px 8px;border-radius:8px;font:10px 'Noto Sans JP'}
.readball-ui:has(.tabs [data-mode="random"].active) .mode-dock,.readball-ui:has(.tabs [data-mode="friend"].active) .mode-dock{height:60px}
.readball-ui:has(.tabs [data-mode="random"].active) .game-layout,.readball-ui:has(.tabs [data-mode="friend"].active) .game-layout{top:60px}
.readball-ui:has(.tabs [data-mode="random"].active) .difficulty,.readball-ui:has(.tabs [data-mode="friend"].active) .difficulty{display:none}
.readball-ui .game-layout{position:absolute;inset:96px 0 0;width:100%;height:auto;display:block;min-height:0;border:0;border-radius:0;background:#183c2c;overflow:hidden}
.readball-ui .stadium{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;border:0;border-radius:0;background:linear-gradient(#497f81,#7eac85 36%,#285b34)}
.readball-ui #scene{position:absolute;inset:0}.readball-ui #scene canvas{width:100%;height:100%;display:block}
.readball-ui .vignette{position:absolute;inset:0;box-shadow:none;background:linear-gradient(180deg,#082d2640,transparent 34%,transparent 58%,#041c184d 100%);pointer-events:none}
.readball-ui .field-top,.readball-ui .field-role,.readball-ui .stadium-bottom>span{display:none!important}
.readball-ui .scoreboard{left:14px;top:14px;transform:none;width:112px;display:block;padding:0;text-align:left;border-radius:14px;background:#082d2699;border:1px solid #d0e6ae33;box-shadow:none;backdrop-filter:none;overflow:hidden;z-index:10}
.readball-ui .score-top{display:flex;justify-content:space-between;font:700 8px 'Barlow Condensed',sans-serif;letter-spacing:.03em;background:#08251f66;padding:6px 8px;color:#e4f1d2;gap:5px;white-space:nowrap}
.readball-ui .score-row{display:grid;grid-template-columns:3px minmax(0,1fr) 18px 24px;gap:5px;align-items:center;padding:4px 8px}
.readball-ui .score-row strong{font:700 11px 'Barlow Condensed';overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.readball-ui .score-row b{font:700 19px 'Barlow Condensed';letter-spacing:0;color:#f5f8e7}
.readball-ui .score-row small{font:500 8px 'Barlow Condensed';color:#d9e7cc;letter-spacing:0}
.readball-ui .team-dot{height:17px;width:3px;border-radius:0;background:#d5f479}.readball-ui .team-dot.coral{background:#ffad91}
.readball-ui .field-toolbar{position:absolute;top:14px;right:14px;display:flex;gap:4px;align-items:center;z-index:20}
.readball-ui .field-icon{width:32px;height:36px;min-width:32px;min-height:36px;padding:3px;border-radius:11px;background:#0a302980;border:1px solid #c5ddb03d;display:flex;align-items:center;justify-content:center;color:#eff6e4;font-size:17px;line-height:1;font-family:'Barlow Condensed',sans-serif;font-weight:700}
.readball-ui #field-history,.readball-ui #stats-open{color:#d2f35e}.readball-ui #sound{font-size:18px;gap:1px;flex-direction:row}.readball-ui #sound small{font-size:7px;font-weight:400}
.readball-ui .stadium-bottom{position:static}.readball-ui #camera{position:absolute;top:62px;right:14px;bottom:auto;min-height:30px;padding:0 9px;font-size:9px;border-radius:9px;background:#0a302980;border:1px solid #c5ddb03d;color:#eff6e4;letter-spacing:0;z-index:20}
.readball-ui .control-panel{position:absolute;inset:0;padding:0;background:transparent;border:0;pointer-events:none;display:block;z-index:15}
.readball-ui .control-panel button,.readball-ui .control-panel input,.readball-ui .control-panel select{pointer-events:auto}
.readball-ui #play-panel{position:absolute;left:12px;right:12px;bottom:12px;top:auto;width:auto;padding:14px 14px 10px;display:grid;grid-template-columns:minmax(0,1fr) 140px;column-gap:10px;row-gap:0;pointer-events:none;background:transparent;border:1px solid transparent;border-radius:23px}
.readball-ui .match-progress{grid-column:1/3;grid-row:1;display:flex;align-items:center;gap:6px;padding:0 0 9px;margin:0 0 10px;border-bottom:1px solid #e2efc933;color:#e3efd4;font-size:9px;line-height:14px;text-shadow:0 1px 3px #001711,0 2px 7px #001711cc}
.readball-ui .match-progress>span{flex:1;white-space:nowrap}.readball-ui .match-progress>b{font-size:9px}.readball-ui .dots{margin:0;display:flex;gap:4px;max-width:100px}.readball-ui .dots i{width:5px;height:5px;border:0;background:#aec19d66;border-radius:50%}.readball-ui .dots i.goal{background:#d5f479}.readball-ui .dots i.save{background:#ffad91}
.readball-ui #play-panel .turn-info{grid-column:1;grid-row:2;align-self:center;padding:0;min-width:0;text-shadow:0 1px 3px #001711,0 2px 7px #001711cc}
.readball-ui .turn-top{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap;gap:4px;height:auto;min-height:12px;font:700 9px 'Noto Sans JP',sans-serif;letter-spacing:0;color:#d2ef9c}
.readball-ui .turn-top #timer{font:700 10px 'Barlow Condensed';padding:2px 5px;border:0;border-radius:5px;background:#d2f35e;color:#183b28;text-shadow:none;width:auto;min-width:19px;text-align:center}.readball-ui .turn-top #timer.urgent{background:#bf512c;color:#fff}
.readball-ui #play-panel h2{font-size:22px;line-height:1.45;margin:8px 0 5px;color:#f5f7e9;letter-spacing:-.04em}
.readball-ui #play-panel .panel-copy{font-size:10px;line-height:1.65;color:#eff5e3;max-width:170px;margin:0}
.readball-ui .goal-label{display:none}
.readball-ui .directions{grid-column:2;grid-row:2;position:relative;display:grid;grid-template-columns:44px 44px 44px;grid-template-rows:40px 40px 40px;gap:4px;margin:0 0 10px;justify-self:end}
.readball-ui .directions:after{content:none}
.readball-ui .directions button{width:44px;height:40px;display:flex;flex-direction:column;gap:0;padding:2px;border:1px solid #e4f5d580;border-bottom-width:3px;border-bottom-color:#0004;border-radius:13px;background:#103e2a66;box-shadow:0 2px 6px #001b1926;text-shadow:0 1px 3px #001b19;transition:background .12s,box-shadow .12s;color:#f6f8e8}
.readball-ui [data-dir="0"]{grid-column:1;grid-row:1}.readball-ui [data-dir="1"]{grid-column:3;grid-row:1}.readball-ui [data-dir="2"]{grid-column:1;grid-row:3}.readball-ui [data-dir="3"]{grid-column:3;grid-row:3}
.readball-ui .directions button b{font:24px/22px Arial;color:inherit}.readball-ui .directions button span{font-size:8px;line-height:10px;color:inherit;font-weight:500}.readball-ui .directions button small{display:none}
.readball-ui .directions button:hover:enabled{background:#28604499;border-color:#e4f5d5b3}.readball-ui .directions button.selected,.readball-ui .directions button.selected:hover:enabled{background:#d5f479b8;border-color:#e8ffac;color:#163722;text-shadow:none;box-shadow:0 0 0 2px #d5f47933}
.readball-ui .directions button.selected b,.readball-ui .directions button.selected span{color:inherit}.readball-ui .directions button:disabled{opacity:1;background:#103e2a38;border-color:#e4f5d53d;color:#e5eed3a6}
.readball-ui #confirm{grid-column:1/3;grid-row:3;width:100%;min-height:47px;padding:10px 12px;margin:0;border-radius:14px;font-size:12px;background:#d5f479c2;border:1px solid #eaffaa;color:#123a27;box-shadow:0 2px 0 #324e2c66;pointer-events:auto;text-shadow:none}
.readball-ui #confirm:disabled{background:#143c2b59;color:#e3eed2c4;border-color:#dcecc84d;text-shadow:0 1px 3px #001b19;opacity:1;box-shadow:none}
.readball-ui .selection-note{grid-column:1/3;grid-row:4;font-size:8px;min-height:12px;line-height:12px;margin:8px 0 0;color:#eff5e3;text-shadow:0 1px 3px #001711,0 2px 7px #001711cc}
.readball-ui .history-header{position:absolute;right:0;bottom:calc(100% + 10px);border:0;margin:0;padding:0}.readball-ui .history-header>span{display:none}.readball-ui #history-open{min-height:29px;padding:5px 10px;border-radius:9px;font-size:9px;background:#0c302980;border:1px solid #c5ddb03d;color:#e3efd4}
.readball-ui .history-row{position:absolute;left:0;bottom:calc(100% + 10px);display:flex;align-items:center;width:auto;margin:0;gap:4px;text-shadow:0 1px 3px #001b19}.readball-ui .history-row:has(#shot-history){bottom:calc(100% + 39px)}
.readball-ui .history-row>span{font:8px 'Barlow Condensed';color:#e5f0d4;width:22px}.readball-ui .history-row>div{display:flex;gap:4px}
.readball-ui .history-row i{display:flex;width:21px;height:24px;font:15px Arial;font-style:normal;border:1px solid #ccdfb34a;border-radius:7px;background:#0c302980;color:#dceac6}
.readball-ui .history-note{display:none}
.readball-ui #home-panel,.readball-ui #online-panel{position:absolute;left:14px;right:14px;top:50%;transform:translateY(-40%);width:auto;max-height:calc(100% - 100px);overflow:auto;padding:22px;border:1px solid #d4e4bc;border-radius:21px;background:#fbfdf1;color:#183b2a;pointer-events:auto;box-shadow:0 12px 45px #001e1c66;display:block}
.readball-ui #home-panel .eyebrow,.readball-ui #online-panel .eyebrow{font:700 9px 'Barlow Condensed';color:#648447;letter-spacing:1.5px}.readball-ui #home-panel h2,.readball-ui #online-panel h2{font-size:23px;line-height:1.6;letter-spacing:-.04em;margin:10px 0 13px}.readball-ui #home-panel .panel-copy,.readball-ui #online-panel .panel-copy{font-size:11px;line-height:1.8;color:#7a8b69;margin:0 0 20px}
.readball-ui .primary{border-radius:13px;background:#d5f479;color:#183b2a;border:1px solid #bad568;font-size:12px;box-shadow:none}.readball-ui .home-rule,.readball-ui .free-note{display:none}
.readball-ui #online-panel .online-note{font-size:9px;color:#7a8b69;line-height:1.8}.readball-ui .or{color:#8c9b7c}.readball-ui .join-row input{background:#eff3e6;color:#294d33;border-color:#c4d3b4}.readball-ui .mini-label{color:#80906f}
.readball-ui #waiting #room-code{color:#355a31;font-size:30px}.readball-ui #wait-text{color:#6b805c}.readball-ui .waiting-ring{border-color:#d2ddc1;border-top-color:#4d753b}.readball-ui #online-panel .text-button{color:#63804c}
.readball-ui .effect{z-index:9}.readball-ui .effect strong{font-size:43px;letter-spacing:-.5px}.readball-ui .effect small{font-size:9px;letter-spacing:2px}.readball-ui .effect>span{font-size:10px}.readball-ui .effect{justify-content:flex-start;padding-top:30%;background:transparent}
.readball-ui .error{position:absolute;left:14px;right:14px;top:110px;margin:0;z-index:35;background:#fff7e9e8;color:#9b4426;border-color:#d1987e;font-size:10px;border-radius:12px;pointer-events:auto}
.readball-ui dialog{width:min(400px,calc(max(320px,(100dvh - 92px)*.56) - 28px));max-height:calc(100dvh - 120px);border:1px solid #d1dcbd;background:#fbfdf1;color:#183b2b;border-radius:23px;padding:26px;box-shadow:0 20px 50px #001e1c66}
.readball-ui dialog::backdrop{background:#031a16b8;backdrop-filter:none}.readball-ui dialog h2{font-size:23px}.readball-ui dialog .close{color:#7c8b70}.readball-ui dialog .eyebrow{color:#789c4d}.readball-ui dialog .dialog-note,.readball-ui dialog .credits,.readball-ui dialog ol p{color:#7a8a69}
.readball-ui .secondary{color:#49643a;border:1px solid #d0dac1;background:transparent;border-radius:10px}.readball-ui .game-menu-actions .secondary{width:100%;margin:6px 0;padding:12px;text-align:left;font-size:12px}.readball-ui .text-button{color:#7a9068}
.readball-ui #verdict{color:#23482d!important;font-size:48px}.readball-ui .final-score{font-size:70px;color:#23482d;letter-spacing:5px}.readball-ui #result-copy{color:#7a8a69}.readball-ui .stats{gap:24px;padding:15px 0}.readball-ui .stats span{color:#82946e}.readball-ui .stats strong{font-size:19px}.readball-ui .reward{background:#eff4e4;border-color:#d6e0c5;color:#71875b;font-size:9px;line-height:1.8}.readball-ui .medal-link{color:#658f3d;font-size:10px}.readball-ui .result-actions{gap:6px}.readball-ui #live-stats{font-size:12px;line-height:2;color:#5a7646}.readball-ui td,.readball-ui th{border-color:#d4dfc5}.readball-ui th,.readball-ui #distribution{color:#7a8d66}.readball-ui td.goal{color:#4e7a31}.readball-ui td.save{color:#b76c4d}
.readball-ui .toast{font-size:11px;max-width:min(400px,calc(100vw - 30px));background:#153b2c;color:#f4f5e4;border:1px solid #a6c56b66;border-radius:6px;z-index:100}
@container(max-height:680px){
 .readball-ui #play-panel{padding:10px 12px 8px;bottom:10px;grid-template-columns:minmax(0,1fr) 128px;column-gap:8px;border-radius:20px}
 .readball-ui .directions{grid-template-columns:40px 40px 40px;grid-template-rows:35px 35px 35px;margin-bottom:8px}.readball-ui .directions button{width:40px;height:35px;border-radius:11px}.readball-ui .directions button b{font-size:22px;line-height:20px}.readball-ui .directions button span{font-size:7px;line-height:8px}
 .readball-ui #play-panel h2{font-size:19px}.readball-ui #play-panel .panel-copy{font-size:9px}.readball-ui .match-progress{padding-bottom:5px;margin-bottom:6px}.readball-ui #confirm{min-height:43px;font-size:11px}.readball-ui .selection-note{margin-top:6px}.readball-ui .effect strong{font-size:37px}
}
@media(max-width:600px){
 .readball-ui{--header-height:calc(54px + env(safe-area-inset-top));background:#102d24}
 .readball-ui .topbar{height:var(--header-height);padding:env(safe-area-inset-top) 16px 0}.readball-ui .brand{font-size:25px;gap:7px}.readball-ui .brand small{font-size:8px}.readball-ui .brand-mark{width:31px;height:31px;line-height:31px;font-size:27px}
 .readball-ui .header-right{min-width:0;margin-left:10px}.readball-ui .account-link{font-size:9px;max-width:165px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readball-ui .guest{display:none}
 .readball-ui .shell{width:100%;height:calc(100dvh - var(--header-height));max-height:none;margin:0;border:0;border-radius:0;box-shadow:none}
 .readball-ui #play-panel{bottom:max(12px,env(safe-area-inset-bottom))}
 .readball-ui dialog{width:min(400px,calc(100vw - 28px));max-height:calc(100dvh - 90px)}
}
@media(max-height:560px){.readball-ui{height:auto;min-height:100dvh;overflow:auto}.readball-ui .shell{height:680px;width:min(390px,100%);margin:14px auto;border-radius:23px}.readball-ui .topbar{height:54px;padding-top:0}}
@media(min-width:601px) and (max-height:680px){.readball-ui{height:auto;overflow:auto}.readball-ui .shell{width:360px;height:644px;margin:14px auto}}

/* READBALL's current title-first UI (rechecked against the live page). */
.readball-ui .shell{background:#102f25;border:1px solid #d0e4bd99;box-shadow:0 20px 64px #0006}
.readball-ui .game-layout,.readball-ui:has(.tabs [data-mode="random"].active) .game-layout,.readball-ui:has(.tabs [data-mode="friend"].active) .game-layout{top:0}
.readball-ui #title-screen{position:absolute;inset:0;z-index:40;padding:36px 24px 22px;background:linear-gradient(180deg,#072e27ed,#123f2ce6 65%,#092e28f5);display:flex;flex-direction:column;overflow:auto;color:#f6f8e8}
.readball-ui[data-screen="match"] #title-screen{display:none}
.readball-ui[data-screen="title"] .control-panel,.readball-ui[data-screen="title"] .scoreboard,.readball-ui[data-screen="title"] .field-toolbar{visibility:hidden}
.readball-ui #title-screen:before{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 36px,#a3c89405 36px 38px),radial-gradient(ellipse at 50% 40%,#accb7a0c,transparent 70%)}
.readball-ui #title-screen>*{position:relative;flex-shrink:0}
.readball-ui .title-eyebrow{font:700 9px 'Barlow Condensed',sans-serif;letter-spacing:1.4px;color:#b9ceb0;margin:0 0 15px}
.readball-ui #title-logo{display:block;margin:0;white-space:nowrap;font:900 clamp(48px,15cqw,66px)/.96 'Barlow Condensed',sans-serif;letter-spacing:-1.5px;color:#f5f6db}
.readball-ui #title-logo>span{color:#d5f479}
.readball-ui .title-kana{font-size:8px;letter-spacing:2px;color:#c9d9bc;margin:12px 0 13px}
.readball-ui .title-copy h2{font-size:18px;line-height:1.5;letter-spacing:-.04em;margin:0 0 11px;font-weight:800}
.readball-ui .title-description{font-size:10px;line-height:1.9;color:#c3d3bb;margin:0 0 17px}
.readball-ui .title-modes{display:flex;flex-direction:column;gap:7px}
.readball-ui .title-mode{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:63px;padding:11px 15px;border:1px solid #d0e4bd44;border-radius:17px;background:#e9f2d70d;text-align:left;color:#f3f7e7;box-shadow:inset 0 1px #e4f5c90a}
.readball-ui .title-mode strong{display:block;font-size:16px;font-weight:800;line-height:1.5;letter-spacing:-.03em}.readball-ui .title-mode small{display:block;font-size:9px;margin-top:2px;color:#c0d1b7}
.readball-ui .title-mode>b{font:400 24px Arial;color:#d9edb7}
.readball-ui .title-mode.primary-mode{background:#d5f479;border-color:#e2f99c;color:#173b27}.readball-ui .title-mode.primary-mode small{color:#4f6b38}.readball-ui .title-mode.primary-mode>b{color:#22482c}
.readball-ui .title-mode:hover{background:#e9f2d71a;border-color:#d6edb37a}.readball-ui .title-mode.primary-mode:hover{background:#e0fa96}
.readball-ui .title-difficulty{display:flex;align-items:center;justify-content:flex-end;gap:10px;font-size:9px;color:#bdd0b2;margin:10px 0 17px}
.readball-ui .title-difficulty select{font-size:10px;background:#173c2d;color:#e3f2d1;border:1px solid #b6d19c55;border-radius:9px;min-height:29px;padding:4px 10px}
.readball-ui .title-links{display:grid;grid-template-columns:1fr 1fr;column-gap:18px;margin-top:auto}
.readball-ui .title-links button{display:flex;align-items:center;justify-content:space-between;padding:11px 0 9px;border:0;border-bottom:1px solid #d7e6c628;background:none;color:#d5e2c8;font-size:10px;text-align:left;font-weight:700}
.readball-ui .title-links button>span{color:#a8ca88;font-size:12px}.readball-ui .title-links button:hover{color:#e8ffc5}
.readball-ui .title-foot{text-align:center;font-size:8px;color:#93ac91;line-height:1.7;margin:17px 0 5px}
.readball-ui #home-panel{display:none!important}
.readball-ui .field-toolbar{right:14px;top:14px}.readball-ui #menu-open{width:40px;height:40px;border-radius:13px;font-size:24px;background:#0b3029bf}
.readball-ui .scoreboard{top:14px;left:14px}
.readball-ui #play-panel .match-progress,.readball-ui #play-panel .history-header,.readball-ui #play-panel .history-row,.readball-ui #play-panel .history-note,.readball-ui #play-panel .panel-copy{display:none}
.readball-ui #play-panel{grid-template-rows:auto auto auto;padding-top:8px}
.readball-ui #play-panel .turn-info{grid-row:1}
.readball-ui #play-panel .directions{grid-row:1}
.readball-ui #play-panel #confirm{grid-row:2;margin-top:5px}
.readball-ui #play-panel .selection-note{grid-row:3}
.readball-ui #play-panel h2{margin-top:12px;font-size:24px}
.readball-ui .sound-toggle-row{display:flex;justify-content:space-between;align-items:center;margin:18px 0 20px;font-size:12px}
.readball-ui .sound-toggle-row #sound{display:flex;align-items:center;justify-content:center;gap:8px;min-width:80px;height:39px;padding:6px 13px;border:1px solid #c8d7b6;border-radius:11px;background:#e6eed8;color:#355532;font-size:23px}
.readball-ui .sound-toggle-row #sound small{font:600 10px 'Barlow Condensed'}
.readball-ui .sound-settings{display:grid;gap:14px;padding:16px;background:#e9f0de;border:1px solid #c7d6b6;border-radius:14px;margin-bottom:22px;color:#506a3b}
.readball-ui .sound-settings label{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:12px;font-size:12px;font-weight:700}
.readball-ui .sound-settings input{width:100%;accent-color:#416638}.readball-ui .sound-settings small{font-size:9px;line-height:1.8;color:#7e906e}
.readball-ui #menu-dialog .game-menu-actions #camera,.readball-ui #menu-dialog .game-menu-actions #history-open{position:static;display:block;width:100%;height:auto;min-height:43px;border:1px solid #d0dac1;border-radius:10px;background:transparent;color:#49643a;padding:12px;margin:6px 0;font-size:12px;text-align:left;pointer-events:auto}
.readball-ui #menu-dialog .dialog-note{font-size:10px;line-height:1.9;margin:15px 0}
@container(max-height:680px){.readball-ui #title-screen{padding-top:36px}.readball-ui .title-copy h2{font-size:17px}.readball-ui .title-links{margin-top:auto}.readball-ui #play-panel h2{font-size:22px}}
@container(max-height:600px){.readball-ui #title-screen{padding:24px 20px 16px}.readball-ui .title-eyebrow{margin-bottom:12px}.readball-ui #title-logo{font-size:50px}.readball-ui .title-kana{margin:9px 0 11px}.readball-ui .title-copy h2{font-size:16px;margin-bottom:8px}.readball-ui .title-description{font-size:9px;margin-bottom:13px}.readball-ui .title-mode{min-height:57px;padding:9px 13px}.readball-ui .title-mode strong{font-size:15px}.readball-ui .title-difficulty{margin:8px 0 12px}.readball-ui .title-foot{margin:12px 0 0}}
@media(max-width:600px){.readball-ui #title-screen{padding-top:40px}.readball-ui .title-eyebrow{font-size:10px}.readball-ui #title-logo{font-size:64px}.readball-ui .title-copy h2{font-size:20px}.readball-ui .title-description{font-size:11px;margin-bottom:22px}.readball-ui .title-mode{min-height:72px}.readball-ui .title-mode strong{font-size:18px}.readball-ui .title-mode small{font-size:10px}.readball-ui .title-difficulty{margin:13px 0 22px}.readball-ui .title-links button{padding:14px 0;font-size:11px}.readball-ui .title-foot{font-size:9px}}
@media(max-width:600px) and (max-height:740px){.readball-ui #title-screen{padding-top:26px}.readball-ui #title-logo{font-size:56px}.readball-ui .title-copy h2{font-size:18px}.readball-ui .title-description{margin-bottom:15px;font-size:10px}.readball-ui .title-mode{min-height:61px}.readball-ui .title-mode strong{font-size:16px}.readball-ui .title-mode small{font-size:9px}.readball-ui .title-difficulty{margin:9px 0 12px}.readball-ui .title-links button{padding:10px 0;font-size:10px}}

.readball-ui .title-links #field-history,.readball-ui .title-links #stats-open{color:#d5e2c8}

/* Nonmodal scout: score at top and live direction controls below stay visible. */
.readball-ui .scout{position:absolute;z-index:21;top:106px;left:14px;right:14px;color:#f4ecd7;background:#102821ed;border:1px solid #d9b86470;border-radius:13px;box-shadow:0 8px 28px #0003;font-size:10px;overflow:hidden;max-height:calc(100% - 340px);display:flex;flex-direction:column;pointer-events:auto}
.readball-ui .scout[hidden],.readball-ui #scout-detail[hidden]{display:none}
.readball-ui #scout-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;background:none;color:inherit;text-align:left;border:0;padding:9px 11px;flex-shrink:0;min-height:48px}
.readball-ui #scout-toggle small{display:block;font:700 8px Arial;letter-spacing:1.4px;color:#e3c574;margin-bottom:4px}
.readball-ui #scout-summary{display:block;font-size:10px;line-height:1.5;font-weight:500}.readball-ui #scout-chevron{color:#e3c574;font-size:20px}
.readball-ui #scout-detail{overflow:auto;overscroll-behavior:contain;padding:0 11px 10px;min-height:0;touch-action:pan-y}
.readball-ui .scout-meta{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #c2ae6d33;padding-top:7px;font-size:9px;gap:5px}.readball-ui #scout-close{background:none;border:0;color:#e3c574;font-size:23px;padding:0 7px}
.readball-ui .scout-tabs{display:flex;gap:5px;margin:5px 0 10px}.readball-ui .scout-tabs button{flex:1;background:#183e30;color:#dad9c5;border:1px solid #7e9165;border-radius:7px;padding:7px 3px;font-size:10px}.readball-ui .scout-tabs button[aria-pressed=true]{color:#1c3024;background:#e3c574;border-color:#e3c574}
.readball-ui .scout-sample{font-size:10px;line-height:1.6;margin:6px 0 9px}.readball-ui .scout-bar{display:grid;grid-template-columns:26px minmax(0,1fr) 77px;align-items:center;gap:7px;margin:8px 0;font-size:10px}.readball-ui .scout-bar>div{height:7px;border-radius:4px;background:#61796444;overflow:hidden}.readball-ui .scout-bar i{display:block;height:100%;background:#879f80;border-radius:4px}.readball-ui .scout-bar.most i{background:#e3c574}.readball-ui .scout-bar b{text-align:right;white-space:nowrap;font-size:10px;font-variant-numeric:tabular-nums}.readball-ui .scout-bar small{font-size:9px;font-weight:400;opacity:.8}
.readball-ui .scout-notes{font-size:10px;line-height:1.8;color:#e3ddc6;margin:10px 0}.readball-ui .scout-notes p{margin:5px 0}.readball-ui .scout-foot,.readball-ui .scout-identity{font-size:8px;line-height:1.8;color:#b4c0a5;margin:8px 0 0}.readball-ui #scout-retry{border:1px solid #e3c574;border-radius:7px;background:none;color:#e3c574;padding:7px 11px}
.readball-ui .match-report{font-size:11px;margin:13px 0;border:1px solid #c9d3b6;border-radius:10px;padding:12px;text-align:left;color:#345036}.readball-ui .match-report summary{cursor:pointer;font-weight:700}.readball-ui .match-report>p{font-size:9px;line-height:1.8}.readball-ui .match-report section{padding:10px 0;border-top:1px solid #c9d3b6}.readball-ui .match-report h3{font-size:14px;margin:7px 0}.readball-ui .match-report h4{font-size:11px;margin:15px 0 6px}.readball-ui .match-report .scout-bar i{background:#4f7652}.readball-ui .match-report .scout-bar.most i{background:#9d813b}.readball-ui .match-report .scout-notes{display:none}
@media(max-width:600px){.readball-ui .scout{max-height:calc(100% - 350px)}}
@container(max-height:600px){.readball-ui .scout{top:100px;max-height:calc(100% - 305px)}.readball-ui #scout-toggle{padding:7px 10px;min-height:43px}}

.readball-ui .view-badge{position:absolute;right:14px;top:64px;z-index:20;padding:6px 8px;border-radius:7px;border:1px solid #d5f47955;background:#082d26d9;color:#e7f0c9;font-size:8px;letter-spacing:.3px;pointer-events:none}.readball-ui .view-badge[hidden]{display:none}
.readball-ui .effect>span{max-width:92%;line-height:1.8}

.readball-ui #menu-dialog .menu-primary-actions{display:grid;grid-template-columns:1fr;gap:10px;margin:18px 0}.readball-ui #menu-dialog .menu-primary-actions>button{display:flex;align-items:center;justify-content:center;width:100%;height:56px;min-height:56px;padding:12px 18px;margin:0;font-size:15px;font-weight:700;line-height:1.4;border-radius:13px;box-sizing:border-box;text-align:center}
