/* GRIDIRON's original local arcade: pixel field, clear calls, familiar aqua. */
#modal.retro-dialog{width:min(1500px,98vw);max-width:98vw;height:min(98dvh,1180px);max-height:98dvh;background:#091620;border:1px solid #4b7980;border-radius:20px;overflow:hidden}
#modal.retro-dialog>.modal-head{padding:0;min-height:0;height:0;flex:0 0 0;border:0;position:static;background:transparent}
#modal.retro-dialog>.modal-head>.modal-heading-copy{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#modal.retro-dialog>.modal-head>.close{position:absolute;z-index:30;right:17px;top:16px;width:36px;height:36px;min-width:36px;min-height:36px;background:#19323e;border:1px solid #4f7382}
#modal.retro-dialog>.modal-body{padding:0;overflow:auto}#modal.retro-dialog>.modal-foot{display:none}
.retro-football{--retro-cyan:#62e6e2;--retro-gold:#ffe38c;color:#f0f7f2;background:radial-gradient(ellipse at 15% 0,#1b4440 0,transparent 43%),#0a1722;min-width:0;padding:20px;font-family:var(--sans,Arial,sans-serif);isolation:isolate}
.retro-football *{box-sizing:border-box}.retro-football button{font-family:inherit;cursor:pointer;color:inherit}.retro-football button:focus-visible,.retro-canvas:focus-visible{outline:3px solid #ffe59c;outline-offset:3px}.retro-football button:disabled{cursor:default;opacity:.45}.retro-football [hidden]{display:none!important}
.retro-topline{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 48px 16px 0}.retro-eyebrow{color:#85d3cd;letter-spacing:.13em;font-size:10px;font-weight:800;display:block}.retro-topline h2{margin:5px 0 0;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:clamp(20px,2.8vw,32px);line-height:1.1;letter-spacing:-.04em}.retro-topline h2 span{font-size:11px;color:#a2c4c5;letter-spacing:0;padding:5px 7px;border:1px solid #466268;border-radius:4px;vertical-align:middle;margin-left:8px;white-space:nowrap}.retro-exit{font-size:12px;font-weight:700;background:#132b37;border:1px solid #45636e;border-radius:7px;padding:10px 13px;white-space:nowrap}
.retro-scoreboard{display:grid;grid-template-columns:minmax(0,1fr) 150px minmax(0,1fr);align-items:stretch;border:1px solid #456b73;border-radius:13px 13px 0 0;overflow:hidden;background:#06111a;box-shadow:0 8px 35px #0003}.retro-score-team{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 24px;min-width:0;position:relative}.retro-score-team span{font-size:clamp(13px,1.7vw,20px);font-weight:800;overflow-wrap:anywhere;text-transform:uppercase;letter-spacing:.02em}.retro-score-team strong{font:800 clamp(30px,4vw,48px)/1 ui-monospace,Menlo,monospace;font-variant-numeric:tabular-nums}.retro-score-team.is-home{background:linear-gradient(110deg,#133d42,#102530);color:#83ece4}.retro-score-team.is-away{background:linear-gradient(110deg,#211e38,#32304d);color:#d2c3ff}.retro-scoreboard[data-possession="0"] .is-home::after,.retro-scoreboard[data-possession="1"] .is-away::after{content:'● BALL';position:absolute;bottom:4px;left:24px;font-size:8px;color:#ffe393;letter-spacing:.1em;font-weight:800}.retro-clock{display:grid;place-items:center;padding:9px 5px;border-inline:1px solid #35515d;gap:2px}.retro-clock>b{font-size:10px;letter-spacing:.15em;color:#b5c6cb}.retro-clock>strong{font:800 29px/1 ui-monospace,monospace;color:#ffe58b;letter-spacing:.03em}.retro-clock>span{font-size:8px;letter-spacing:.05em;color:#9eb6bd;text-align:center}
.retro-match-strip{display:flex;gap:18px;align-items:center;padding:10px 14px;background:#132c36;border:1px solid #456b73;border-top:0;color:#bad4d5;font-size:11px;line-height:1.2}.retro-match-strip>strong{font:800 15px ui-monospace,monospace;color:#fcf6d8;white-space:nowrap}.retro-match-strip>span:nth-child(2){font-weight:700}.retro-local-label{margin-right:auto;font-size:9px;letter-spacing:.08em;color:#88aaa9}.retro-match-strip button{background:#0a202c;border:1px solid #35545f;border-radius:5px;padding:7px 9px;color:#c9ddda;font-size:9px;letter-spacing:.03em;font-weight:800;white-space:nowrap}
.retro-stage{position:relative;background:#123d2b;border-inline:1px solid #456b73;overflow:hidden;touch-action:manipulation}.retro-canvas{display:block;width:100%;height:clamp(330px,calc(100dvh - 180px),610px);image-rendering:pixelated;touch-action:none;outline:none;cursor:crosshair}.retro-stage::after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(transparent 0,transparent 3px,#0714180a 3px,#0714180a 4px);box-shadow:inset 0 0 35px #0004;z-index:1}.retro-live-badge{position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:7px 14px;background:#06151ed9;color:#f3e9bc;border:1px solid #91af855e;border-radius:4px;font:800 10px/1.2 ui-monospace,monospace;letter-spacing:.07em;text-align:center;white-space:nowrap;z-index:2;pointer-events:none}.retro-canvas-event{position:absolute;left:50%;top:30%;width:min(88%,600px);transform:translate(-50%,-6px);opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;text-align:center;z-index:3;text-shadow:3px 3px #071a1b,0 3px 18px #001}.retro-canvas-event.is-showing{opacity:1;transform:translate(-50%,0)}.retro-canvas-event>strong{display:block;color:#fff2b4;font:900 clamp(26px,4vw,52px)/1.05 ui-monospace,Menlo,monospace;letter-spacing:-.05em}.retro-canvas-event>span{display:inline-block;padding:7px 10px;margin-top:8px;background:#061720d9;border:1px solid #91b6ad55;border-radius:6px;font-size:12px;color:#d1ece1;line-height:1.4}.retro-football[data-retro-event="touchdown"] .retro-canvas-event>strong{color:#ffe17b}.retro-football[data-retro-event="interception"] .retro-canvas-event>strong{color:#a9f4e5}
.retro-pause-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:10;background:#061523d9;backdrop-filter:blur(3px);padding:25px;text-align:center}.retro-pause-overlay>span{font-size:11px;letter-spacing:.2em;font-weight:800;color:#ffe38c}.retro-pause-overlay h3{font-size:38px;margin:8px 0;color:white}.retro-pause-overlay p{font-size:14px;color:#b0cacf;margin:0 0 20px}.retro-pause-overlay button{border:1px solid #aaffec;border-radius:7px;background:#61e0d6;color:#082733;padding:14px 20px;font-size:14px;font-weight:900}
.retro-play-console{padding:18px;background:#10242e;border:1px solid #456b73;border-top:0;border-radius:0 0 13px 13px}.retro-console-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.retro-console-heading h3{font-size:26px;line-height:1.08;margin:5px 0 6px;color:#f2f8ed}.retro-console-heading p{font-size:13px;line-height:1.5;color:#bad0d3;margin:0;max-width:680px}.retro-primary-actions{display:flex;align-items:center;gap:8px;flex:none}.retro-primary{display:flex;gap:12px;align-items:center;justify-content:center;min-height:48px;padding:12px 24px;border:1px solid #b6fff0;background:linear-gradient(110deg,#88edd1,#38cfdc);color:#072d37!important;font-size:14px;font-weight:900;letter-spacing:.03em;border-radius:8px;box-shadow:0 4px 16px #48d7d51a}.retro-football kbd{display:inline-block;border:1px solid #5a7983;border-bottom-width:2px;border-radius:4px;padding:3px 5px;background:#081c29;font:700 10px ui-monospace,monospace;color:#cce4df;white-space:nowrap}.retro-primary kbd{background:#1f5e64;color:#c6ffed;border-color:#3e9092;font-size:8px}.retro-punt{padding:12px 13px;min-height:46px;border:1px solid #81744d;border-radius:7px;background:#3c3823;color:#f2df9c!important;font-size:11px;font-weight:800}.retro-play-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:17px}.retro-play-options:has(>button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}.retro-play-option{position:relative;display:flex;gap:10px;align-items:center;text-align:left;min-height:85px;padding:12px 24px 12px 10px;background:#0a1c29;border:1px solid #3e5d6d;border-radius:10px;min-width:0}.retro-play-option svg{flex:0 0 78px;width:78px;height:50px;background:#071922;border-radius:6px}.retro-play-option>span{min-width:0;display:grid;gap:5px}.retro-play-option strong{font-size:15px;line-height:1.1;color:#ebf2ee}.retro-play-option small{font-size:10px;line-height:1.35;color:#a2bfc8}.retro-play-option>b{position:absolute;right:8px;top:8px;color:#7aa7a9;font-size:16px}.retro-play-option.is-selected{border-color:#86edda;background:linear-gradient(120deg,#1a4444,#102f3a);box-shadow:inset 0 0 0 1px #6de5d533}.retro-play-option.is-selected>b{color:#8bf3d6}
.retro-controls-help{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:14px;color:#9db8c1;font-size:9px;line-height:1.5}.retro-controls-help>span{display:flex;align-items:center;gap:5px}.retro-controls-help>span>b{font-size:9px;color:#c4dfdf}.retro-controls-help>button{margin-left:auto;padding:7px 9px;border:1px solid #385562;border-radius:5px;background:transparent;font-size:10px;color:#b7cdd0}.retro-save-status{font-size:10px!important;color:#8cabb4!important;line-height:1.4!important;margin:10px 0 0!important;min-height:14px}.retro-final-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.retro-final-stats>div{display:grid;gap:7px;padding:14px;background:#0a1b26;border:1px solid #345866;border-radius:9px}.retro-final-stats strong{font-size:14px;color:#91e9da}.retro-final-stats span{font-size:12px;color:#aecbd0}
.retro-touch-controls{display:none;position:absolute;inset:0;pointer-events:none;z-index:5}.retro-dpad{position:absolute;left:12px;bottom:13px;width:126px;height:126px;pointer-events:auto}.retro-dpad button{position:absolute;width:42px;height:42px;border:1px solid #a3e4d6a6;border-radius:10px;background:#092936b3;color:#c9f8ec;font-size:19px;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:0 2px 7px #0015}.retro-dpad button:active{background:#339489d4}.retro-dpad .up{left:42px;top:0}.retro-dpad .left{left:0;top:42px}.retro-dpad .right{left:84px;top:42px}.retro-dpad .down{left:42px;top:84px}.retro-touch-switch{position:absolute;right:16px;bottom:29px;width:80px;height:80px;border:1px solid #d3b5ff;border-radius:50%;background:#353454c9;font-size:11px;font-weight:800;pointer-events:auto;touch-action:manipulation}.retro-touch-switch small{font-size:8px;color:#c4bce3}
@media(pointer:coarse){.retro-touch-controls.is-live{display:block}.retro-controls-help{font-size:9px}.retro-canvas{height:clamp(430px,60vh,650px)}}
@media(max-width:1050px){.retro-play-option{display:grid;grid-template-columns:65px minmax(0,1fr);gap:8px}.retro-play-option svg{width:65px}.retro-play-option strong{font-size:13px}.retro-play-options{grid-template-columns:repeat(2,minmax(0,1fr))}.retro-play-options:has(>button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}.retro-play-options:has(>button:nth-child(3):last-child) .retro-play-option{grid-template-columns:1fr}.retro-score-team{padding:15px 17px}.retro-score-team span{font-size:15px}}
@media(max-width:700px){#modal.retro-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0;margin:0}#modal.retro-dialog>.modal-head>.close{right:10px;top:13px;width:32px;height:32px;min-height:32px;min-width:32px}.retro-football{padding:13px 10px}.retro-topline{margin-right:36px;margin-bottom:12px;gap:8px;align-items:start}.retro-topline h2{font-size:19px}.retro-topline h2 span{display:block;width:fit-content;margin:5px 0 0;padding:3px 5px;font-size:9px}.retro-eyebrow{font-size:8px}.retro-exit{padding:8px 9px;font-size:10px}.retro-scoreboard{grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);border-radius:9px 9px 0 0}.retro-score-team{padding:10px 10px 14px;gap:6px;flex-direction:column;justify-content:center;text-align:center}.retro-score-team span{font-size:11px;line-height:1.2}.retro-score-team strong{font-size:31px}.retro-clock>strong{font-size:22px}.retro-clock>span{font-size:7px}.retro-clock>b{font-size:9px}.retro-scoreboard[data-possession="0"] .is-home::after,.retro-scoreboard[data-possession="1"] .is-away::after{left:50%;transform:translateX(-50%);font-size:6px;bottom:4px}.retro-match-strip{padding:8px;gap:9px;flex-wrap:wrap;font-size:9px}.retro-match-strip>strong{font-size:12px}.retro-local-label{display:none}.retro-match-strip>span:nth-child(2){margin-right:auto}.retro-match-strip button{padding:6px;font-size:8px}.retro-canvas{height:440px}.retro-touch-controls.is-live{display:block}.retro-live-badge{font-size:8px;top:9px;padding:6px 8px}.retro-console-heading{display:block}.retro-console-heading h3{font-size:24px}.retro-console-heading p{font-size:12px}.retro-play-console{padding:13px 11px}.retro-primary-actions{margin-top:12px}.retro-primary{width:100%;min-height:46px;padding:12px;font-size:13px}.retro-punt{white-space:nowrap;padding:10px;font-size:10px}.retro-play-options{gap:8px;margin-top:12px}.retro-play-option{grid-template-columns:1fr;padding:9px 9px 10px;gap:6px;min-height:126px;align-content:start}.retro-play-option svg{height:42px;width:70px}.retro-play-option strong{font-size:13px}.retro-play-option small{font-size:10px}.retro-play-options:has(>button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.retro-play-options:has(>button:nth-child(3):last-child) .retro-play-option{padding:8px 6px;min-height:155px}.retro-play-options:has(>button:nth-child(3):last-child) .retro-play-option svg{width:100%;max-width:70px}.retro-play-options:has(>button:nth-child(3):last-child) .retro-play-option strong{font-size:12px}.retro-play-options:has(>button:nth-child(3):last-child) .retro-play-option small{font-size:9px}.retro-controls-help{gap:8px}.retro-controls-help>span:nth-child(3){display:none}.retro-controls-help>button{margin-left:0}.retro-canvas-event{top:25%}.retro-canvas-event>strong{font-size:27px}.retro-canvas-event>span{font-size:10px}.retro-final-stats{gap:8px}.retro-final-stats>div{padding:10px}.retro-final-stats strong{font-size:12px}.retro-final-stats span{font-size:10px}}
@media(prefers-reduced-motion:reduce){.retro-canvas-event{transition:none}.retro-stage::after{background:none}}

.retro-scoreboard{position:sticky;top:0;z-index:15}.retro-field-primary{position:absolute;right:16px;bottom:16px;z-index:6;border:1px solid #bbffe7;border-radius:8px;background:#7ce5ca;color:#073342!important;font-size:13px;font-weight:900;padding:13px 18px;box-shadow:0 4px 18px #0018}.retro-field-primary:hover{background:#a0f2d9}@media(max-width:700px){.retro-scoreboard{top:0}.retro-field-primary{font-size:12px;padding:12px 15px;bottom:15px;right:12px}}
/* The camera now looks downfield from behind the end zone. */
.retro-football{background:radial-gradient(ellipse at 50% 0,#3d3520 0,transparent 45%),#0a1722}
.retro-topline h2{color:#fff2bc}.retro-eyebrow{color:#e6cf91}.retro-topline h2 span{border-color:#8b7a49;color:#e5d6aa}
.retro-stage::after{box-shadow:inset 0 0 70px #001a28aa,inset 0 2px 0 #ffe69b44}
.retro-scoreboard{border-color:#89774a}.retro-match-strip{border-color:#89774a}.retro-play-console{border-color:#89774a}
.retro-live-badge{max-width:calc(100% - 24px);white-space:normal}
@media(max-width:700px){.retro-canvas{height:min(60dvh,500px);min-height:360px}.retro-match-strip .retro-local-label{display:none}.retro-stage::after{box-shadow:inset 0 0 34px #001a2866}}

/* Sprint stays beside the field; arrow keys never move the surrounding page. */
#modal.retro-dialog,#modal.retro-dialog>.modal-body,.retro-football{overscroll-behavior:contain}
.retro-stamina{position:absolute;z-index:5;bottom:15px;left:50%;transform:translateX(-50%);width:170px;max-width:44%;padding:7px 9px;border:1px solid #92d9bc80;border-radius:7px;background:#071e29e8;pointer-events:none}
.retro-stamina>div{display:flex;justify-content:space-between;gap:6px;align-items:center;margin-bottom:4px;font:800 9px/1.2 ui-monospace,monospace;color:#c9f3dc}.retro-stamina strong{font-size:15px;color:#fff0a9}.retro-stamina progress{display:block;appearance:none;width:100%;height:6px;border:0;border-radius:5px;overflow:hidden;background:#284251}.retro-stamina progress::-webkit-progress-bar{background:#284251}.retro-stamina progress::-webkit-progress-value{background:#78e8b4}.retro-stamina progress::-moz-progress-bar{background:#78e8b4}.retro-stamina[data-exhausted="true"]{border-color:#e1a65c}.retro-stamina[data-exhausted="true"] span{color:#ffd287}
.retro-touch-sprint{position:absolute;right:19px;bottom:120px;width:72px;height:65px;border:1px solid #e6cf83;border-radius:18px;background:#3b371cdd;color:#fff1ae!important;font-size:9px;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}.retro-touch-sprint strong{font-size:11px}.retro-touch-sprint:active{background:#846f29}.retro-play-options:has(>button:nth-child(6):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){.retro-stamina{width:132px;max-width:36%;bottom:18px;padding:6px}.retro-stamina>div{font-size:7px}.retro-stamina strong{font-size:13px}.retro-play-options:has(>button:nth-child(6):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v34: a fixed, full-viewport field; only the play-call panel scrolls. */
#modal.retro-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border-radius:0;inset:0;overflow:hidden;overscroll-behavior:none}
#modal.retro-dialog>.modal-body{flex:1 1 auto;min-height:0;height:100%;overflow:hidden;overscroll-behavior:none}
#modal.retro-dialog #retro-host,#modal.retro-dialog #match-retro-host,#modal.retro-dialog #live-retro-host,#modal.retro-dialog #local-match-retro-host{height:100%;min-height:0;overflow:hidden}
#modal.retro-dialog .retro-football{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;padding:12px 16px;overscroll-behavior:none}
#modal.retro-dialog .retro-topline{flex:0 0 auto;margin-bottom:8px}
#modal.retro-dialog .retro-topline h2{font-size:clamp(18px,2vw,25px)}
#modal.retro-dialog .retro-scoreboard{position:relative;flex:0 0 auto}
#modal.retro-dialog .retro-score-team{padding:10px 18px 15px}
#modal.retro-dialog .retro-score-team strong{font-size:36px}
#modal.retro-dialog .retro-match-strip{flex:0 0 auto;padding-block:6px}
#modal.retro-dialog .retro-stage{flex:1 1 0;min-height:120px;overflow:hidden;overscroll-behavior:none}
#modal.retro-dialog .retro-canvas{width:100%;height:100%;min-height:0;max-height:none}
#modal.retro-dialog .retro-play-console{flex:0 0 clamp(120px,24dvh,210px);min-height:0!important;max-height:32%;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:10px 12px}
#modal.retro-dialog .retro-console-heading{gap:10px}
#modal.retro-dialog .retro-console-heading h3{font-size:20px;margin:3px 0}
#modal.retro-dialog .retro-console-heading p{font-size:11px;line-height:1.35}
#modal.retro-dialog .retro-primary{min-height:38px;padding:9px 16px;font-size:12px}
#modal.retro-dialog .retro-play-options{margin-top:9px;gap:7px;grid-template-columns:repeat(3,minmax(0,1fr))}
#modal.retro-dialog .retro-play-option{min-height:66px;padding:8px 20px 8px 8px}
#modal.retro-dialog .retro-play-option svg{height:38px;width:60px;flex-basis:60px}
#modal.retro-dialog .retro-controls-help{flex:0 0 auto;margin-top:7px;gap:9px}
#modal.retro-dialog .retro-save-status{flex:0 0 auto;margin-top:4px!important;min-height:12px;max-height:28px;overflow:auto}
@media(max-width:700px){
 #modal.retro-dialog .retro-football{padding:8px}
 #modal.retro-dialog .retro-topline{margin-bottom:6px}
 #modal.retro-dialog .retro-topline h2{font-size:17px}
 #modal.retro-dialog .retro-topline h2 span{display:inline-block;margin:0 0 0 5px;font-size:8px}
 #modal.retro-dialog .retro-score-team{padding:7px 7px 13px}
 #modal.retro-dialog .retro-score-team strong{font-size:27px}
 #modal.retro-dialog .retro-console-heading{display:flex;align-items:center}
 #modal.retro-dialog .retro-console-heading h3{font-size:17px}
 #modal.retro-dialog .retro-console-heading p{font-size:10px}
 #modal.retro-dialog .retro-primary-actions{margin-top:0}
 #modal.retro-dialog .retro-primary{padding:9px;font-size:10px;min-height:36px}
 #modal.retro-dialog .retro-primary kbd{display:none}
 #modal.retro-dialog .retro-play-console{flex-basis:clamp(120px,23dvh,175px);padding:8px}
 #modal.retro-dialog .retro-play-options{grid-template-columns:repeat(3,minmax(0,1fr))}
 #modal.retro-dialog .retro-play-option{display:block;min-height:65px;padding:7px}
 #modal.retro-dialog .retro-play-option svg{display:none}
 #modal.retro-dialog .retro-play-option strong{font-size:11px;padding-right:8px}
 #modal.retro-dialog .retro-play-option small{font-size:9px}
 #modal.retro-dialog .retro-controls-help>span{display:none}
 #modal.retro-dialog .retro-controls-help>button{margin-left:auto;padding:3px 6px}
 #modal.retro-dialog .retro-save-status{font-size:9px!important}
}
@media(max-height:550px){
 #modal.retro-dialog .retro-football{padding:5px 10px}
 #modal.retro-dialog .retro-topline{margin-bottom:3px}
 #modal.retro-dialog .retro-topline .retro-eyebrow,#modal.retro-dialog .retro-topline h2 span{display:none}
 #modal.retro-dialog .retro-score-team{padding:4px 14px 10px;flex-direction:row}
 #modal.retro-dialog .retro-score-team strong{font-size:24px}
 #modal.retro-dialog .retro-clock{padding:3px}
 #modal.retro-dialog .retro-clock>strong{font-size:20px}
 #modal.retro-dialog .retro-clock>span{display:none}
 #modal.retro-dialog .retro-play-console{flex-basis:105px;max-height:29%;padding:6px 10px}
 #modal.retro-dialog .retro-controls-help{display:none}
 #modal.retro-dialog .retro-console-heading h3{font-size:16px}
 #modal.retro-dialog .retro-console-heading p{font-size:10px}
 #modal.retro-dialog .retro-match-strip{padding-block:3px}
}

/* v39: the field gets the viewport; the calls fold away once the ball is live. */
#modal.retro-dialog .retro-football{padding:8px 12px}
#modal.retro-dialog .retro-topline{margin-bottom:5px}
#modal.retro-dialog .retro-score-team{padding:7px 16px 12px}
#modal.retro-dialog .retro-score-team strong{font-size:32px}
#modal.retro-dialog .retro-clock{padding:5px}
#modal.retro-dialog .retro-play-console{flex-basis:clamp(112px,18dvh,168px);max-height:26%;padding:8px 12px}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-play-console{flex:0 0 52px;max-height:52px;overflow:hidden}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-console-heading h3{font-size:17px}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-console-heading p{display:none}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-primary-actions{display:none}
.retro-football button,.retro-lobby button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.retro-football button:active,.retro-lobby button:active{filter:brightness(1.15)}
.retro-coach-tabs{display:flex;gap:8px;margin-top:8px}
.retro-coach-tabs button{flex:1;padding:7px 10px;border:1px solid #426d79;border-radius:6px;background:#102d3a;color:#a8e8ee;font-size:11px;font-weight:800}
.retro-conversion-overlay,.retro-network-overlay{position:absolute;z-index:12;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:22px;background:radial-gradient(ellipse at center,#123c49e8,#07151bed);backdrop-filter:blur(3px);text-align:center}
.retro-conversion-overlay h3,.retro-network-overlay h3{font:800 clamp(23px,3vw,40px)/1.1 ui-monospace,monospace;color:#f3fbfa;margin:12px 0 22px}
.retro-network-overlay p{max-width:480px;font-size:15px;line-height:1.5;color:#b9d5dc}
.retro-conversion-overlay>div{display:flex;gap:18px;width:min(550px,95%)}
.retro-conversion-overlay button{flex:1;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;min-height:130px;border:1px solid #85f9f0;border-radius:14px;background:linear-gradient(140deg,#2a7485,#133844);box-shadow:0 0 25px #35bed522;padding:18px;color:#eaffff}
.retro-conversion-overlay button>strong{font:900 52px/1 ui-monospace,monospace;color:#85f9f0}
.retro-conversion-overlay button>span{font-size:13px;font-weight:700}
.retro-conversion-overlay button:last-child{background:linear-gradient(140deg,#47355f,#201d34);border-color:#b29be0}
.retro-conversion-overlay button:last-child>strong{color:#d8bfff}
.retro-network-overlay .retro-primary{margin-top:18px;min-width:230px}
.retro-lobby{max-width:1000px;margin:0 auto;padding:clamp(16px,3vw,40px);color:#ebf7fa;background:radial-gradient(ellipse at 50% 0,#1d4d5b99,transparent 55%)}
.retro-lobby [hidden]{display:none!important}.retro-lobby button{cursor:pointer;font-family:inherit;color:inherit}.retro-lobby button:disabled{opacity:.55;cursor:default}.retro-lobby button:focus-visible{outline:3px solid #85f9f0;outline-offset:3px}
.retro-lobby-heading{display:flex;align-items:start;justify-content:space-between;gap:15px}.retro-lobby-heading h2{font:900 clamp(28px,5vw,56px)/1 ui-monospace,monospace;letter-spacing:-.045em;margin:10px 0}.retro-lobby-heading p{color:#afd1d9;font-size:15px;margin:8px 0 20px}
.retro-lobby-feature{display:flex;gap:30px;align-items:center;padding:22px 30px;border:1px solid #408f9f80;border-radius:16px;background:linear-gradient(125deg,#153b48,#101d2c);margin:8px 0 24px;overflow:hidden;position:relative}
.retro-lobby-number{font:900 68px/1 ui-monospace,monospace;color:#85f9f0;text-shadow:0 0 30px #35bed566;display:flex;align-items:center;gap:8px}.retro-lobby-number>span{font-size:13px;color:#c9e6eb}
.retro-lobby-feature h3{font-size:27px;margin:6px 0}.retro-lobby-feature p{color:#a9c8d1;font-size:13px;margin:0}
.retro-lobby-modes{display:grid;gap:12px}.retro-lobby-modes>button{display:flex;gap:18px;align-items:center;min-height:90px;padding:18px 24px;text-align:left;border:1px solid #48778b;border-radius:12px;background:linear-gradient(110deg,#193946,#132332);transition:border-color .15s,background .15s}.retro-lobby-modes>button:hover{border-color:#85f9f0;background:#214552}
.retro-lobby-modes>button.retro-lobby-computer{min-height:108px;background:linear-gradient(105deg,#85f9f0,#35bed5);border-color:#b6fffb;color:#082e3a;box-shadow:0 8px 28px #35bed522}.retro-lobby-modes strong{display:block;font-size:22px;letter-spacing:.02em}.retro-lobby-modes small{display:block;font-size:12px;line-height:1.5;margin-top:5px;opacity:.8}.retro-lobby-modes>b,.retro-lobby-modes>button>b{margin-left:auto;font-size:30px}.retro-mode-icon{font-size:34px;min-width:40px;text-align:center}
.retro-lobby-status{min-height:22px;font-size:13px;color:#e7d6a5;margin:14px 0}.retro-lobby-active,.retro-lobby-invitations,.retro-lobby-friends{margin-top:24px}.retro-lobby h3{letter-spacing:.03em}.retro-lobby-active>button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:16px 20px;border:1px solid #63c0c9;border-radius:10px;background:#173847;text-align:left;margin:8px 0}.retro-lobby-active small{display:block;margin-top:5px;color:#acd0d8}.retro-lobby-invitations article{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #8176ad;border-radius:12px;background:#27253d;margin-bottom:10px}.retro-lobby-invitations article>div{margin-right:auto}.retro-lobby-invitations article span{display:block;font-size:12px;color:#bfb8d8;margin-top:5px}.retro-lobby-invitations button{border:1px solid #a8f6ef;border-radius:7px;background:#24616c;padding:11px;font-weight:800}.retro-lobby-invitations button:last-child{background:transparent;border-color:#84799d;font-weight:500}
.retro-lobby-friends{border-top:1px solid #3c5b6d;padding-top:24px}.retro-lobby-friends h3{font-size:22px;margin:7px 0 16px}.retro-friend-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.retro-friend-grid>button{display:flex;gap:12px;align-items:center;padding:13px;border:1px solid #46667b;border-radius:12px;background:#152b38;text-align:left}.retro-friend-grid img,.retro-friend-initial{width:58px;height:58px;flex-shrink:0;border:2px solid #7bdde2;border-radius:50%;object-fit:cover;background:#24485d}.retro-friend-initial{display:grid;place-items:center;font-size:26px;font-weight:800;color:#85f9f0}.retro-friend-grid strong{font-size:15px}.retro-friend-grid small{display:block;margin-top:5px;font-size:11px;color:#aacbd4}.retro-friend-grid b{margin-left:auto;font-size:25px;color:#85f9f0}.retro-friend-grid>p{grid-column:1/-1;color:#a6c6cf;font-size:14px;padding:12px 0}
.is-searching{animation:retro-search-pulse 1.2s ease-in-out infinite alternate}@keyframes retro-search-pulse{to{opacity:.35;transform:scale(.85)}}
@media(max-width:700px){#modal.retro-dialog .retro-football{padding:6px}#modal.retro-dialog .retro-play-console{flex-basis:144px;max-height:28%}#modal.retro-dialog .retro-football[data-phase="live"] .retro-play-console{flex-basis:42px;max-height:42px}#modal.retro-dialog .retro-controls-help{gap:6px;font-size:8px}#modal.retro-dialog .retro-score-team strong{font-size:27px}.retro-lobby-feature{padding:18px;gap:20px}.retro-lobby-number{font-size:43px}.retro-lobby-feature h3{font-size:21px}.retro-lobby-feature p{font-size:11px}.retro-lobby-modes>button{padding:16px;gap:12px}.retro-lobby-modes strong{font-size:18px}.retro-friend-grid{grid-template-columns:1fr}.retro-lobby-invitations article{flex-wrap:wrap}.retro-lobby-invitations article>div{flex:1 0 100%}.retro-conversion-overlay button{min-height:115px;padding:12px}.retro-conversion-overlay button>strong{font-size:43px}}
@media(prefers-reduced-motion:reduce){.is-searching{animation:none}.retro-lobby-modes>button{transition:none}}

#modal.retro-dialog .retro-football[data-retro-mode="local"][data-phase="preplay"] .retro-play-console{flex-basis:195px;max-height:32%}
#modal.retro-dialog .retro-football[data-phase="preplay"][data-kickoff="true"] .retro-play-console{flex-basis:72px;max-height:72px}
@media(max-width:700px){#modal.retro-dialog .retro-football[data-retro-mode="local"][data-phase="preplay"] .retro-play-console{flex-basis:170px;max-height:32%}#modal.retro-dialog .retro-football[data-retro-mode="local"][data-phase="preplay"] .retro-console-heading p{display:none}#modal.retro-dialog .retro-football[data-phase="preplay"][data-kickoff="true"] .retro-play-console{flex-basis:66px;max-height:66px}}

.retro-lobby-active>article{display:flex;gap:10px;margin:8px 0}.retro-lobby-active>article>button{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:1;padding:16px 20px;border:1px solid #63c0c9;border-radius:10px;background:#173847;text-align:left}.retro-lobby-active>article>button:last-child:not(:first-child){flex:0 0 auto;background:transparent;border-color:#576b7c;color:#b9ced8;font-size:12px;padding:12px}

/* v40: center the action and reserve more of the viewport for the field. */
#modal.retro-dialog .retro-football{padding:5px 8px}
#modal.retro-dialog .retro-topline{margin-bottom:4px}
#modal.retro-dialog .retro-topline .retro-eyebrow{display:none}
#modal.retro-dialog .retro-topline h2{margin-top:0;font-size:clamp(17px,1.7vw,23px)}
#modal.retro-dialog .retro-score-team{padding-block:5px 10px}
#modal.retro-dialog .retro-clock{padding-block:3px}
#modal.retro-dialog .retro-match-strip{padding-block:4px}
#modal.retro-dialog .retro-play-console{flex-basis:132px;max-height:23%;padding:7px 12px}
#modal.retro-dialog .retro-console-heading h3{font-size:18px;margin:1px 0}
#modal.retro-dialog .retro-console-heading p{font-size:11px}
#modal.retro-dialog .retro-play-options{margin-top:6px}
#modal.retro-dialog .retro-play-option{min-height:60px;padding-block:6px}
#modal.retro-dialog .retro-football[data-retro-mode="local"][data-phase="preplay"] .retro-play-console{flex-basis:166px;max-height:28%}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-play-console{flex-basis:36px;max-height:36px;padding-block:4px}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-console-heading>div:first-child{display:flex;align-items:center;gap:12px}
#modal.retro-dialog .retro-football[data-phase="live"] .retro-console-heading h3{margin:0;font-size:16px}
#modal.retro-dialog .retro-controls-help{margin-top:4px}
#modal.retro-dialog .retro-save-status:empty{display:none}
.retro-stamina{left:16px;transform:none;max-width:32%}
.retro-stage::after{box-shadow:inset 0 0 38px #001a2855,inset 0 2px 0 #ffe69b33}
@media(max-width:700px){
 #modal.retro-dialog .retro-football{padding:4px}
 #modal.retro-dialog .retro-play-console{flex-basis:130px;max-height:27%;padding:6px}
 #modal.retro-dialog .retro-football[data-retro-mode="local"][data-phase="preplay"] .retro-play-console{flex-basis:157px;max-height:30%}
 #modal.retro-dialog .retro-console-heading h3{font-size:16px}
 #modal.retro-dialog .retro-console-heading p{display:none}
 #modal.retro-dialog .retro-play-option{min-height:58px}
 #modal.retro-dialog .retro-football[data-phase="live"] .retro-play-console{flex-basis:32px;max-height:32px}
 .retro-stamina{left:50%;transform:translateX(-50%);max-width:32%;bottom:12px}
}
@media(max-height:550px){
 #modal.retro-dialog .retro-play-console{flex-basis:105px;max-height:29%}
 #modal.retro-dialog .retro-console-heading p{display:none}
 #modal.retro-dialog .retro-football[data-retro-mode="local"][data-phase="preplay"] .retro-play-console{flex-basis:129px;max-height:34%}
}

/* Every field shares the same viewport, including account-backed CPU games. */
#modal.retro-dialog>.modal-head>.close{top:6px;right:8px;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:9px}
#modal.retro-dialog .retro-topline{min-height:44px;margin-right:52px;align-items:center}
#modal.retro-dialog .retro-exit{min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px}
@media(max-width:700px){
 #modal.retro-dialog>.modal-head>.close{top:4px;right:4px}
 #modal.retro-dialog .retro-topline{margin-right:50px}
 #modal.retro-dialog .retro-exit{padding-inline:10px}
 .retro-match-strip button{min-height:36px}
}
@media(pointer:coarse){
 .retro-touch-controls.is-live{display:block}
 .retro-dpad{width:132px;height:132px}
 .retro-dpad button{width:44px;height:44px}
 .retro-dpad .up{left:44px}.retro-dpad .left{top:44px}.retro-dpad .right{left:88px;top:44px}.retro-dpad .down{left:44px;top:88px}
 .retro-dpad button,.retro-touch-sprint,.retro-touch-switch{touch-action:none;min-width:44px;min-height:44px;user-select:none;-webkit-user-select:none}
}

/* CPU reset stays beside navigation and never overlaps the field or close icon. */
.retro-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.retro-reset{min-height:44px;padding:10px 13px;border:1px solid #75d8df;border-radius:9px;background:#173b49;color:#c2ffff;font-size:12px;font-weight:800;white-space:nowrap;cursor:pointer}
.retro-reset:hover:not(:disabled){background:#245666;border-color:#9af7ec}
.retro-reset:focus-visible{outline:3px solid #83f1e7;outline-offset:2px}
.retro-header-actions button:disabled{opacity:.6;cursor:wait}
@media(max-width:700px){
 .retro-header-actions{gap:5px;flex-wrap:nowrap}
 .retro-reset{padding-inline:8px;font-size:10px}
 #modal.retro-dialog .retro-topline:has(.retro-reset:not([hidden])){flex-wrap:wrap;gap:5px}
 #modal.retro-dialog .retro-topline:has(.retro-reset:not([hidden])) .retro-header-actions{width:100%;justify-content:flex-start}
}
