/* v113 Zoom-independent Scorecard chrome + scorecard defense spacing. Approved editor designs remain locked. */
/* v112 Frozen Play Actions + transient overlay zoom lock. Approved v110 editor visual design remains the target. */
/* v111 Editor Interaction Stability: approved v110 editor geometry intentionally unchanged. */

:root{
 --bg:#061827;--panel:#09243b;--panel2:#0b2c48;--line:#43566a;--text:#f5f2ea;--muted:#aeb9c3;
 --accent:#e0bf72;--selected:#1f4770;--radius:13px;
 --custom-bg:#061827;--custom-bg2:#041421;--custom-header:#071b2d;--custom-panel:#09243b;
 --custom-panel2:#0b2c48;--custom-line:#43566a;--custom-drawer:#17344d;--custom-drawer2:#23435e;
 --custom-accent:#e0bf72;--custom-selected:#1f4770;--custom-text:#f5f2ea;
}

/* ==========================================================
   v137 — clean four-section editor hierarchy
   ========================================================== */
#playModal .play-card{--v137-line:#cbd2dc;--v137-soft:#f7f9fc}
#playModal .play-editor-scroll{padding:14px 14px 190px!important;display:flex!important;flex-direction:column;gap:14px!important}
#playModal .v137-editor-section,#playModal #pitchTools{border:1.5px solid var(--v137-line)!important;border-radius:22px!important;background:var(--panel,#fff)!important;padding:16px!important;margin:0!important;box-shadow:none!important;overflow:visible!important}
#playModal .v137-editor-section>header{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:14px}
#playModal .v137-editor-section>header strong{font-size:17px;letter-spacing:.09em;color:var(--ink,#172033)}
#playModal .v137-editor-section>header small{font-size:12px;text-align:right;color:var(--muted,#697386)}
#playModal #batterResultGrid,#playModal #runnerGrid,#playModal #scoringPanel,#playModal #runnerOutFields,#playModal .defense-field-card,#playModal .official-error-card,#playModal .advanced-runner-card{border:0!important;border-radius:0!important;margin:0!important;padding:0!important;background:transparent!important;box-shadow:none!important}
#playModal #batterResultGrid{grid-template-columns:1fr!important}
#playModal #batterResultGrid .v122-notation-field{grid-column:1!important}
#playModal #runnerGrid{margin-top:12px!important;grid-template-columns:1fr 1fr!important}
#playModal #scoringPanel{margin-top:12px!important;border-top:1px solid var(--v137-line)!important;padding-top:12px!important}
#playModal #runnerOutFields{margin-top:12px!important;border-top:1px solid var(--v137-line)!important;padding-top:12px!important}
#playModal #runnerOutFields .form-grid{grid-template-columns:1fr 1fr 1fr!important}
#playModal .v137-shell-only{display:block!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important}
#playModal .v137-shell-only>.advanced-title,#playModal .v137-shell-only>.advanced-layout>.v137-runner-card{display:none!important}
#playModal #v137RunnersSection .v137-runner-card{display:block!important}
#playModal .v137-runner-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--v137-line)}
#playModal .v137-runner-actions>span{grid-column:1/-1;font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--muted,#697386)}
#playModal .v137-runner-actions button{min-height:42px;padding:8px;border:1px solid var(--v137-line);border-radius:12px;background:var(--panel,#fff);font-weight:750;font-size:12px}
#playModal #pitchTools{order:-1;padding:14px!important}
#playModal .pitch-tools-head{display:grid!important;grid-template-columns:minmax(0,1fr) 118px!important;gap:10px!important}
#playModal .pitch-title-copy small{display:none!important}
#playModal .pitch-count-card{padding:9px!important}
#playModal .v122-pitch-entry-grid{display:grid!important;grid-template-columns:154px minmax(0,1fr) 92px!important;gap:10px!important;align-items:start!important}
#playModal .v137-pitch-location{grid-row:1/4;grid-column:1;padding:0}
#playModal .v137-zone-head{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 6px;margin-bottom:7px}
#playModal .v137-zone-head strong{font-size:12px;letter-spacing:.08em}.v137-zone-head small{font-size:10px;color:var(--muted,#697386)}
#playModal .v137-zone-head button{grid-row:1/3;grid-column:2;border:0;background:transparent;color:#1769c2;font-weight:700;padding:4px}
#playModal .v137-zone{position:relative;width:100%;aspect-ratio:1/1.12;border:2px solid #182238;background:linear-gradient(to right,transparent 33%,#cbd2dc 33% 34%,transparent 34% 66%,#cbd2dc 66% 67%,transparent 67%),linear-gradient(to bottom,transparent 33%,#cbd2dc 33% 34%,transparent 34% 66%,#cbd2dc 66% 67%,transparent 67%);touch-action:manipulation}
#playModal .v137-zone:before{content:"";position:absolute;left:20%;right:20%;top:16%;bottom:16%;border:2px solid #1769c2;background:rgba(23,105,194,.05)}
#playModal .v137-zone i,#playModal .v137-mini-zone i{position:absolute;width:16px;height:16px;border-radius:50%;background:#1769c2;border:2px solid white;transform:translate(-50%,-50%);box-shadow:0 1px 4px #0005;display:none}
#playModal .v137-zone i.set{display:block}
#playModal .v122-pitch-entry-grid>label:first-of-type{grid-column:2!important;min-width:0!important}
#playModal .v122-pitch-entry-grid>label:nth-of-type(2){grid-column:3!important;min-width:0!important}
#playModal .v122-pitch-entry-grid select,#playModal .v122-pitch-entry-grid input{width:100%!important;min-width:0!important;padding-left:10px!important;padding-right:28px!important}
#playModal .v122-pitch-quick-actions{grid-column:2/4!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
#playModal .v122-other-pitch-results{grid-column:2/4!important}
#playModal .pitch-sequence-card{margin-top:10px!important;padding:10px!important;overflow:hidden!important}
#playModal .pitch-sequence{display:flex!important;overflow-x:auto!important;gap:8px!important;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
#playModal .pitch-chip{position:relative;flex:0 0 190px!important;scroll-snap-align:start}
#playModal .v137-mini-zone{position:relative;display:block;width:36px;height:42px;border:1px solid #182238;margin-left:auto;background:#fff}
#playModal .v137-mini-zone i{display:block;width:8px;height:8px}
#playModal .pitch-workflow-note{display:none!important}
#playModal .modal-actions{grid-template-columns:1fr 1.25fr 1fr!important;gap:8px!important}
#playModal .modal-actions button{min-width:0!important;font-size:13px!important;padding:10px 6px!important;white-space:nowrap}
#playModal #applyPlayBtn{grid-column:1/-1!important;font-size:16px!important}
#playModal .v137-change-sheet{position:fixed;left:14px;right:14px;bottom:calc(132px + env(safe-area-inset-bottom));z-index:50;background:var(--panel,#fff);border:1px solid var(--v137-line);border-radius:18px;padding:16px;box-shadow:0 12px 40px #0004;display:none}
#playModal .v137-change-sheet.open{display:block}.v137-change-sheet>strong,.v137-change-sheet>small{display:block}.v137-change-sheet>small{color:var(--muted);margin:4px 0 12px}.v137-change-sheet>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.v137-change-sheet button{min-height:44px;border:1px solid var(--v137-line);border-radius:12px;background:var(--panel);font-weight:750}
.play-cell .v137-grid-marker{position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:17px!important;background:#111!important;color:#fff!important;border-radius:0!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:10px!important;font-weight:850!important;letter-spacing:.08em!important}
body.dark #playModal .play-card{--v137-line:#3d4655;--v137-soft:#151a22}
body.dark #playModal .v137-editor-section,body.dark #playModal #pitchTools{background:#11161e!important}
body.dark #playModal .v137-zone{background-color:#0d1118}body.dark #playModal .v137-mini-zone{background:#0d1118}
@media(max-width:430px){#playModal .play-editor-scroll{padding-left:10px!important;padding-right:10px!important}#playModal .v137-editor-section,#playModal #pitchTools{padding:12px!important;border-radius:18px!important}#playModal .v122-pitch-entry-grid{grid-template-columns:142px minmax(0,1fr) 78px!important;gap:7px!important}#playModal #runnerOutFields .form-grid{grid-template-columns:1fr!important}}
*{box-sizing:border-box}
html,body{margin:0;width:100%;max-width:100%;min-height:100%;overflow-x:hidden;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif}
body{min-height:100vh;overscroll-behavior-x:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.app-shell{width:100%;max-width:100%;min-height:100vh;overflow-x:hidden;background:var(--bg)}
main{width:100%;max-width:1120px;margin:0 auto;padding:10px 10px 32px}
.card{border:1px solid var(--line);background:var(--panel);border-radius:var(--radius);overflow:hidden}

/* Header */
.topbar{
 position:relative;z-index:30;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:8px;
 min-height:88px;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;background:#07131e;border-bottom:1px solid rgba(255,255,255,.08)
}
.topbar h1{margin:0;text-align:center;font-family:Georgia,"Times New Roman",serif;font-size:28px;font-weight:800}
.top-actions{display:flex;gap:6px}
.top-icon,.top-action{min-height:44px;border:1px solid rgba(255,255,255,.34);background:rgba(0,0,0,.12);color:inherit;border-radius:11px;font-weight:850}
.top-icon{width:44px;font-size:20px}
.menu-icon{border:0;background:transparent;font-size:28px}
.top-action{padding:0 13px;white-space:nowrap}
.postseason-banner{display:none;grid-column:1/-1;justify-self:center;align-items:center;gap:12px;color:#e2ac50;font-family:Georgia,"Times New Roman",serif;font-size:22px;font-weight:900;letter-spacing:.05em;padding:5px 0}
.post-year{font-size:12px;letter-spacing:.14em}

/* Drawer - clear, compact, theme-aware */
.drawer-shade{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.58)}
.drawer{
 position:fixed;left:0;top:0;bottom:0;z-index:90;width:min(310px,82vw);transform:translateX(-105%);transition:transform .18s ease;
 overflow-y:auto;padding:calc(14px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
 background:#17344d;color:#f5f2ea;border-right:1px solid #43566a;box-shadow:18px 0 46px rgba(0,0,0,.35)
}
.drawer.open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 14px;border-bottom:1px solid rgba(255,255,255,.18);font-size:23px}
.drawer-head button{border:0;background:transparent;color:inherit;font-size:26px}
.drawer-section{padding:14px 0;border-bottom:1px solid rgba(255,255,255,.16)}
.drawer-label{font-size:9px;font-weight:900;letter-spacing:.17em;color:#b6c0c8;margin:0 8px 7px}
.drawer-nav,.theme-choice,.drawer-tools>button,.import-button{
 width:100%;min-height:47px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;
 padding:7px 9px;border:0;border-radius:9px;background:transparent;color:inherit;text-align:left;font-weight:850
}
.menu-glyph{display:grid;place-items:center;width:24px;font-size:18px}
.drawer-nav.active,.theme-choice.active{background:rgba(255,255,255,.12)}
.drawer-nav b{min-width:21px;text-align:center;border-radius:12px;padding:3px 6px;background:rgba(0,0,0,.18)}
.theme-choice{grid-template-columns:40px minmax(0,1fr) 20px}
.theme-choice span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0}
.theme-choice small{font-size:8px;color:#b9c4cd;font-weight:700}
.theme-check{visibility:hidden;color:var(--accent)}
.theme-choice.active .theme-check{visibility:visible}
.theme-swatch{width:34px;height:34px;border-radius:9px;display:block}
.custom-swatch{background:linear-gradient(135deg,#0a2a46,#e0bf72)}
.wrigley-swatch{background:linear-gradient(135deg,#0e3d28 0 65%,#88543e 66%)}
.playoff-swatch{background:linear-gradient(135deg,#04182a 0 65%,#d99e3a)}
.theme-sub{margin:4px 6px 8px 42px;padding:8px;border-left:3px solid var(--accent);border-radius:0 8px 8px 0;background:rgba(0,0,0,.16)}
.theme-sub label{display:flex;flex-direction:column;gap:4px;font-size:8px;font-weight:900;color:#d5dae0;letter-spacing:.08em}
.theme-sub select,.theme-sub input[type=color]{width:100%;min-height:34px;border:1px solid rgba(255,255,255,.22);border-radius:7px;background:#071827;color:#fff}
.color-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:7px}
.drawer-tools{border-bottom:0}
.import-button input{display:none}

/* Game info */
.game-info{display:grid;gap:0;margin-bottom:9px}
.game-info.with-extras{grid-template-columns:repeat(3,minmax(0,1fr))}
.game-info.four-fields{grid-template-columns:repeat(4,minmax(0,1fr))}
.game-field{
 min-width:0;display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:7px;padding:9px 11px;
 border-right:1px solid var(--line);border-bottom:1px solid var(--line)
}
.game-info.with-extras .game-field:nth-child(3n){border-right:0}
.game-info.with-extras .game-field:nth-last-child(-n/**/+3){border-bottom:0}
.game-info.four-fields .game-field:last-child{border-right:0}
.game-info.four-fields .game-field{border-bottom:0}
.game-info-icon{display:grid;place-items:center;width:28px;height:28px;color:var(--accent);font-size:21px}
.game-field-copy{min-width:0}
.game-field label{display:block;margin-bottom:2px;font-size:7px;letter-spacing:.10em;font-weight:900;color:var(--muted)}
.game-field input{
 width:100%;min-width:0;max-width:100%;height:28px;padding:0;border:0;background:transparent;color:var(--text);
 font-weight:850;font-size:12px;outline:none;overflow:hidden;text-overflow:ellipsis
}

/* Matchup */
.matchup-selector{
 display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);align-items:center;gap:6px;padding:7px;margin-bottom:9px
}
.matchup-team{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:1px 6px;min-width:0}
.matchup-label{grid-column:2;color:var(--accent);font-size:7px;font-weight:900;letter-spacing:.12em}
.matchup-team img{grid-row:1/span 2;width:37px;height:37px;object-fit:contain;object-position:center;background:transparent}
.matchup-team select,.team-header-select{
 width:100%;min-width:0;border:0;background:transparent;color:var(--text);font-weight:900;outline:none;text-overflow:ellipsis
}
.matchup-team select{height:31px;font-size:10px;padding:0 22px 0 2px}
.versus-mark{text-align:center;color:var(--accent);font-weight:950;font-size:12px}
select option{color:#111;background:#fff}

/* Shared collapse icon */
.section-collapse{
 margin-left:auto;flex:0 0 30px;width:30px;height:30px;display:grid;place-items:center;padding:0;
 border:1px solid color-mix(in srgb,var(--accent) 70%,transparent);border-radius:999px;background:rgba(0,0,0,.09);color:var(--accent)
}
.chevron-icon{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(225deg);transition:transform .16s ease}
.section-collapse.is-collapsed .chevron-icon{transform:rotate(45deg)}

/* Standings */
.standings-overview{margin-bottom:10px}
.overview-title,.card-title{
 min-height:38px;display:flex;align-items:center;gap:7px;padding:0 7px 0 11px;background:var(--panel2);border-bottom:1px solid var(--line);
 color:var(--accent);font-size:10px;font-weight:900
}
.overview-title strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.title-glyph{font-size:15px}
.standings-overview.collapsed .standings-overview-body{display:none}
.standings-overview-body{display:grid;gap:0;min-width:0}
.standings-overview-body.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.standings-overview-body.one{grid-template-columns:1fr}
.standings-card{min-width:0;border:0!important;border-radius:0!important}
.standings-overview-body.two .standings-card+.standings-card{border-left:1px solid var(--line)!important}
.standings-head{height:29px;display:flex;align-items:center;justify-content:space-between;padding:0 7px;background:color-mix(in srgb,var(--panel2) 88%,#000);color:var(--accent);font-size:7px;font-weight:900;border-bottom:1px solid var(--line)}
.refresh-mini{width:22px;height:22px;border:1px solid var(--accent);border-radius:7px;background:transparent;color:var(--accent);font-size:10px}
.standings-grid{display:grid;grid-template-columns:minmax(0,1.8fr) .42fr .42fr .60fr .50fr;font-size:6.5px}
.standings-grid>div{min-width:0;padding:5px 2px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--panel)}
.standings-grid>div:nth-child(5n){border-right:0}
.standings-grid .head{background:var(--panel2);color:var(--accent);font-size:5.5px;font-weight:900}
.standings-grid .team{display:flex;align-items:center;gap:3px;overflow:hidden;white-space:nowrap}
.standings-grid .team img{width:12px;height:12px;flex:0 0 12px;object-fit:contain}
.standings-selected{background:var(--selected)!important;color:var(--accent)!important;font-weight:900}
.standings-foot{text-align:center;padding:4px;color:var(--muted);font-size:5.5px;background:var(--panel)}
.playoff-overview{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);gap:8px;margin-bottom:10px}
.playoff-overview .standings-overview{margin:0}
.notes-card{margin:0}
.notes-card textarea{display:block;width:100%;height:180px;resize:vertical;border:0;background:transparent;color:var(--text);padding:10px;outline:none}
.notes-card.collapsed textarea{display:none}
.notes-card.collapsed .card-title{border-bottom:0}

/* Team scorebook */
.team-scorebook{margin-bottom:11px}
.team-scorebook-head{
 min-height:44px;display:flex;align-items:center;gap:8px;padding:5px 7px 5px 10px;background:var(--panel2);border-bottom:1px solid var(--line)
}
.team-scorebook-name{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
.team-logo{width:32px;height:32px;flex:0 0 32px;object-fit:contain;object-position:center;background:transparent;overflow:visible}
.team-header-select{height:32px;padding:0 22px 0 0;font-size:11px;text-transform:uppercase;color:var(--accent)}
.team-scorebook.collapsed .team-scorebook-body{display:none}
.team-scorebook-body{min-width:0}
.team-scorebook-scroll{
 width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;
 overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom
}
.team-scorebook-canvas{
 display:grid;
 grid-template-columns:190px 760px;
 grid-template-rows:auto auto;
 grid-template-areas:
   "left scoring"
   "pitch pitch";
 align-items:start;
 min-width:950px;
 width:950px;
 background:var(--panel)
}
.team-left-stack{
 grid-area:left;
 position:sticky;
 left:0;
 z-index:4;
 align-self:start;
 background:var(--panel);
 border-right:1px solid var(--line)
}
.team-left-stack .pitch-pane{display:none!important}
.lineup-pane,.pitch-pane,.scoring-pane{min-width:0;background:var(--panel)}
.lineup-pane{grid-area:left}
.scoring-pane{grid-area:scoring}
.team-scorebook-canvas>.pitch-pane{
 grid-area:pitch;
 display:block!important;
 width:100%;
 border-top:1px solid var(--line)
}
.pane-title{height:26px;display:flex;align-items:center;gap:5px;padding:0 6px;background:var(--panel2);color:var(--accent);font-size:7px;font-weight:900;border-bottom:1px solid var(--line)}
.pitch-scroll{
 width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;
 overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom
}
.lineup-only-table,.scoring-only-table,.pitch-table{border-collapse:collapse;table-layout:fixed}
.lineup-only-table{width:190px}
.lineup-only-table th,.lineup-only-table td,.scoring-only-table th,.scoring-only-table td,.pitch-table th,.pitch-table td{
 border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--panel);color:var(--text)
}
.lineup-only-table th,.scoring-only-table th,.pitch-table th{background:var(--panel2);color:var(--accent);font-size:6px;font-weight:900}
.lineup-only-table th{height:23px}
.lineup-only-table td{height:39px;font-size:6.5px}
.lineup-only-table .ord{width:23px;text-align:center;font-weight:900}
.lineup-only-table .player{width:132px;padding:2px 4px;text-align:left;overflow:hidden}
.lineup-only-table .pos{width:35px;text-align:center;font-weight:900}
.player-main{font-size:6.2px;line-height:1.04;font-weight:900}
.player-subs{font-size:4.8px;line-height:1;color:var(--muted);margin-top:2px}
.scoring-pane{width:760px}
.score-scroll{width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y pinch-zoom}
.scoring-only-table{min-width:760px;width:760px}
.scoring-only-table th{height:23px}
.scoring-only-table td{height:39px;text-align:center;font-size:7px}
.scoring-only-table .inn{width:40px}
.scoring-only-table .stat{width:46px}
.scoring-only-table .play-cell{width:40px;padding:0;position:relative;overflow:hidden}
.totals-row td{height:29px!important;background:var(--panel2)!important;color:var(--accent)!important;font-weight:900!important}
.play-entry{position:absolute;inset:0;display:grid;place-items:center}
.play-entry svg{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px)}
.play-code{position:absolute;right:2px;bottom:2px;font-size:7px;font-weight:950}
.standalone-out{font-size:14px;font-weight:950;color:#e0524d}
.play-entry.out .play-code{color:#e0524d}
.rbi-code{position:absolute;right:2px;top:2px;font-size:4.8px;font-weight:900}
.pa-count{position:absolute;left:2px;top:2px;font-size:4.5px;color:var(--muted);font-weight:900}
.event-marker{position:absolute;left:0;right:0;bottom:0;height:8px;background:#111;color:#fff;font-size:5px;display:grid;place-items:center;font-weight:900}
.play-cell.third-out{box-shadow:inset 0 -3px 0 #df4b46}

/* Pitching deliberately wider than left pane: horizontal scroll inside the pane */
.pitch-table{width:520px;min-width:520px}
.pitch-table .pitcher-name{width:165px}
.pitch-table th{height:22px}
.pitch-table td{height:29px}
.pitch-table th:not(.pitcher-name),.pitch-table td:not(.pitcher-name){width:44px}
.pitch-table input{width:100%;height:27px;padding:2px 3px;border:0;background:transparent;color:var(--text);text-align:center;font-size:5.8px}
.pitch-table .pitcher-name input{text-align:left}

/* Default theme */
body.theme-custom{
 --bg:var(--custom-bg);--panel:var(--custom-panel);--panel2:var(--custom-panel2);--line:var(--custom-line);
 --accent:var(--custom-accent-safe,var(--custom-accent));--selected:var(--custom-selected);--text:var(--custom-text);--muted:var(--custom-muted,#aeb9c3);
 background:var(--custom-bg)
}
body.theme-custom .app-shell{background:linear-gradient(180deg,var(--custom-bg),var(--custom-bg2))}
body.theme-custom .topbar{background:var(--custom-header)}
body.theme-custom .drawer{background:linear-gradient(180deg,var(--custom-drawer),var(--custom-drawer2));border-color:var(--custom-line)}
body.theme-custom .drawer-head,body.theme-custom .drawer-section{border-color:var(--custom-line)}
body.theme-custom .theme-choice.active,body.theme-custom .drawer-nav.active{background:color-mix(in srgb,var(--custom-panel2) 80%,#fff 7%)}

/* Wrigley inspired */








/* Playoff */
body.theme-postseason{
 --bg:#020c16;--panel:#04182a;--panel2:#061f35;--line:#8d672f;--text:#f3f1ec;--muted:#aab6c2;--accent:#dda947;--selected:#503a1f;
 background:#010912
}
body.theme-postseason .app-shell{background:radial-gradient(circle at 50% 0,rgba(36,72,105,.24),transparent 30%),linear-gradient(180deg,#031221,#020b15)}
body.theme-postseason .topbar{background:linear-gradient(180deg,#031426,#020d18);border-color:#49371e}
body.theme-postseason .postseason-banner{display:flex}
body.theme-postseason .drawer{background:linear-gradient(180deg,#061b2f,#041526);border-color:#8d672f}
body.theme-postseason .theme-choice.active,body.theme-postseason .drawer-nav.active{background:#3c2d19}
body.theme-postseason .postseason-footer{margin:4px -10px -32px;padding:10px;text-align:center;border-top:1px solid #9b7436;color:#dda947;font-weight:900;letter-spacing:.06em}
body.theme-postseason.dark-mode{--bg:#01060b;--panel:#020d18;--panel2:#041525;--line:#6f5128;--selected:#392b18}

/* Dark mode preserves selected theme identity */
body.dark-mode .topbar{filter:brightness(.88)}
body.dark-mode .card,body.dark-mode .team-left-stack,body.dark-mode .lineup-pane,body.dark-mode .pitch-pane,body.dark-mode .scoring-pane{filter:brightness(.94)}
body.theme-custom.dark-mode .drawer{filter:brightness(.92)}
body.dark-mode .modal-card{background:#0c1712;color:#f4f4ef;border-color:#4a554d}

/* Focus */
body.focus-mode .game-info,body.focus-mode .matchup-selector,body.focus-mode .standings-overview,body.focus-mode .playoff-overview{display:none!important}

/* Modals / settings / history / summary */
.modal{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:12px;background:rgba(0,0,0,.62)}
.modal-card{width:min(720px,96vw);max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:14px;background:#f8f5e9;color:#202621;padding:11px}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #cbc6b9;padding-bottom:8px}
.modal-head small{display:block;color:#6d716b;margin-top:2px}
.modal-head button{border:0;background:transparent;font-size:23px}
.form-grid{display:grid;gap:8px;margin-top:9px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid.three{grid-template-columns:2fr .7fr 1fr}
.modal label{display:flex;flex-direction:column;gap:4px;font-size:8px;font-weight:900;color:#626760;letter-spacing:.06em}
.modal input,.modal select{min-height:34px;border:1px solid #c7c2b5;border-radius:7px;background:#fff;padding:7px}
.section-row{display:flex;align-items:center;justify-content:space-between;margin:11px 0 7px}
.small-btn,.modal-actions button,.settings-buttons button,.history-actions button{border:1px solid #bcb7ab;border-radius:7px;background:#fff;padding:8px 10px;font-weight:850}
.modal-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:10px}.modal-actions .primary{background:#173f2d;color:#fff;border-color:#173f2d}.danger{color:#a63c36!important}
.sub-row{display:grid;grid-template-columns:70px 1fr 55px 70px 55px 30px;gap:5px;margin-bottom:5px}.sub-row button{border:1px solid #d4aaa6;background:#fff;color:#a33a34;border-radius:6px}
.situation{margin-top:9px;background:#173f2d;color:#fff;border-radius:7px;padding:8px;font-weight:900}.quick-label{font-size:8px;font-weight:900;color:#6b6e68;margin:9px 0 5px}.quick-plays{display:flex;gap:5px;flex-wrap:wrap}.quick-plays button{border:1px solid #c8c3b7;background:#fff;border-radius:6px;padding:7px 10px;font-weight:900}
.settings-section{border-top:1px solid #d6d1c6;padding-top:10px;margin-top:10px}.settings-section h3{margin:0 0 7px}.settings-buttons{display:flex;flex-wrap:wrap;gap:6px}
.page-title{font-size:20px}.history-list,.summary-grid{display:grid;gap:8px}.history-item{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px}.history-score{font-size:22px;font-weight:900;color:var(--accent)}.history-actions{display:flex;gap:5px}.summary-hero{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:12px}.summary-team{display:flex;align-items:center;gap:7px;font-weight:900}.summary-team.right{justify-content:flex-end}.summary-team img{width:40px;height:40px;object-fit:contain}.summary-score{font-size:27px;font-weight:950}.summary-score span{color:var(--accent);margin:0 7px}.summary-table{border-collapse:collapse;min-width:720px}.summary-table th,.summary-table td{border:1px solid var(--line);padding:5px;text-align:center;font-size:8px}
.check-label{flex-direction:row!important;align-items:center!important}
.check-label input{width:17px;min-height:17px}

/* Mobile */
@media(max-width:600px){
 .topbar{grid-template-columns:40px minmax(0,1fr) auto;min-height:78px;padding:calc(8px + env(safe-area-inset-top)) 8px 8px}
 .topbar h1{font-size:22px}.top-icon{width:38px;min-height:39px}.menu-icon{font-size:25px}.top-action{min-height:39px;padding:0 10px;font-size:12px}
 main{padding:6px 6px 26px}
 .drawer{width:min(286px,80vw);padding-left:10px;padding-right:10px}
 .drawer-head{font-size:20px}.drawer-section{padding:11px 0}.drawer-nav,.theme-choice,.drawer-tools>button,.import-button{min-height:43px;padding:6px 8px}
 .game-info.with-extras{grid-template-columns:repeat(3,minmax(0,1fr))}
 .game-info.four-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .game-info.four-fields .game-field{border-bottom:1px solid var(--line)}
 .game-info.four-fields .game-field:nth-child(2n){border-right:0}.game-info.four-fields .game-field:nth-last-child(-n/**/+2){border-bottom:0}
 .game-field{grid-template-columns:25px minmax(0,1fr);gap:5px;padding:7px 6px}.game-info-icon{width:24px;height:24px;font-size:18px}
 .game-field label{font-size:5.6px}.game-field input{height:24px;font-size:8px}
 .matchup-selector{grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);padding:5px;gap:2px}
 .matchup-team{grid-template-columns:29px minmax(0,1fr);gap:1px 3px}.matchup-team img{width:28px;height:28px}.matchup-label{font-size:5px}.matchup-team select{height:26px;font-size:6.8px}.versus-mark{font-size:8px}
 .overview-title{min-height:31px;font-size:7px;padding-left:7px}.section-collapse{width:25px;height:25px;flex-basis:25px}.chevron-icon{width:7px;height:7px}
 .standings-head{height:23px;font-size:5.4px;padding:0 3px}.refresh-mini{width:19px;height:19px}
 .standings-grid{grid-template-columns:minmax(0,1.62fr) .42fr .42fr .61fr .50fr;font-size:4.7px}.standings-grid>div{padding:3px 1px}.standings-grid .head{font-size:4px}.standings-grid .team img{width:9px;height:9px;flex-basis:9px}.standings-foot{font-size:4px;padding:3px}
 .playoff-overview{grid-template-columns:minmax(0,.74fr) minmax(0,1.26fr);gap:5px}.notes-card textarea{height:138px;font-size:8px;padding:7px}.card-title{font-size:7px;min-height:31px}
 .team-scorebook-head{min-height:39px;padding:4px 5px 4px 7px}.team-logo{width:27px;height:27px;flex-basis:27px}.team-header-select{height:28px;font-size:8.5px}
 .team-scorebook-canvas{
  grid-template-columns:176px 720px;
  grid-template-rows:auto auto;
  grid-template-areas:
    "left scoring"
    "pitch pitch";
  min-width:896px;
  width:896px
 }
 .lineup-only-table{width:176px}.lineup-only-table th{height:22px;font-size:5.2px}.lineup-only-table td{height:38px;font-size:6px}.lineup-only-table .ord{width:21px}.lineup-only-table .player{width:124px}.lineup-only-table .pos{width:31px}.player-main{font-size:5.8px}.player-subs{font-size:4.4px}
 .pane-title{height:23px;font-size:6px}
 .scoring-pane{width:720px}.scoring-only-table{width:720px;min-width:720px}.scoring-only-table th{height:22px;font-size:5.3px}.scoring-only-table td{height:38px;font-size:6px}.scoring-only-table .inn{width:38px}.scoring-only-table .stat{width:44px}
 .pitch-table{width:500px;min-width:500px}.pitch-table .pitcher-name{width:155px}.pitch-table th{font-size:5px}.pitch-table input{font-size:5.3px}
 .postseason-banner{font-size:17px}
 .form-grid.two,.form-grid.three{grid-template-columns:1fr 1fr}.sub-row{grid-template-columns:55px 1fr 46px 60px 45px 28px}
}

/* v5 final team-header cleanup: team selection remains in the VS row / Settings,
   leaving one unambiguous far-right collapse control. */
.team-header-name{
 min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 color:var(--accent);font-size:11px;font-weight:950;letter-spacing:.01em
}
@media(max-width:600px){.team-header-name{font-size:8.5px}}

/* v6: full-width pitching section under lineup + scoring */
.team-scorebook-canvas>.pitch-pane .pitch-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
}
.team-scorebook-canvas>.pitch-pane .pitch-table{
  width:950px!important;
  min-width:950px!important;
  table-layout:fixed!important;
}
.team-scorebook-canvas>.pitch-pane .pitch-table .pitcher-name{
  width:320px!important;
}
.team-scorebook-canvas>.pitch-pane .pitch-table th:not(.pitcher-name),
.team-scorebook-canvas>.pitch-pane .pitch-table td:not(.pitcher-name){
  width:auto!important;
}
@media(max-width:600px){
  .team-scorebook-canvas>.pitch-pane .pitch-table{
    width:896px!important;
    min-width:896px!important;
  }
  .team-scorebook-canvas>.pitch-pane .pitch-table .pitcher-name{
    width:285px!important;
  }
}

/* v7 logo-safety pass: larger frames + inner breathing room */
.team-logo{
  width:40px!important;
  height:40px!important;
  flex:0 0 40px!important;
  object-fit:contain!important;
  object-position:center!important;
  padding:3px!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  overflow:visible!important;
  clip-path:none!important;
  mask:none!important;
}
.matchup-team img{
  width:42px!important;
  height:42px!important;
  object-fit:contain!important;
  object-position:center!important;
  padding:3px!important;
  background:transparent!important;
  overflow:visible!important;
  clip-path:none!important;
  mask:none!important;
}
.standings-grid .team img{
  object-fit:contain!important;
  object-position:center!important;
  padding:1px!important;
  background:transparent!important;
  overflow:visible!important;
}
.summary-team img{
  object-fit:contain!important;
  object-position:center!important;
  padding:3px!important;
  background:transparent!important;
  overflow:visible!important;
}
@media(max-width:600px){
  .team-logo{
    width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
    padding:3px!important;
  }
  .matchup-team img{
    width:34px!important;
    height:34px!important;
    padding:3px!important;
  }
}

/* v8 definitive pitching-render fix */
.team-scorebook-canvas{
  grid-template-areas:
    "left scoring"
    "pitch pitch" !important;
}
.team-scorebook-canvas > .pitch-pane{
  grid-area:pitch !important;
  display:block !important;
  visibility:visible !important;
  width:100% !important;
  min-width:100% !important;
  position:relative !important;
  z-index:2 !important;
  border-top:1px solid var(--line) !important;
}
.team-scorebook-canvas > .pitch-pane .pitch-scroll{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  -webkit-overflow-scrolling:touch !important;
}
.team-scorebook-canvas > .pitch-pane .pitch-table{
  display:table !important;
  width:950px !important;
  min-width:950px !important;
}
@media(max-width:600px){
  .team-scorebook-canvas > .pitch-pane .pitch-table{
    width:896px !important;
    min-width:896px !important;
  }
}


/* ===========================================================
   v9 UNIFIED THEMES + SCROLL STABILITY
   Same structural layout for Default / Wrigley / Playoff.
   One horizontal scroller per team card; no nested pan conflict.
   =========================================================== */

/* One intentional horizontal scroller per team card. */
html,body,.app-shell{overflow-x:clip!important;max-width:100%!important}
.team-scorebook{max-width:100%!important;overflow:hidden!important}
.team-scorebook-body{max-width:100%!important;overflow:hidden!important}
.team-scorebook-scroll{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
  touch-action:pan-x pan-y pinch-zoom!important;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--accent) 60%,transparent) transparent;
}
.team-scorebook-scroll::-webkit-scrollbar{height:5px}
.team-scorebook-scroll::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--accent) 62%,transparent);border-radius:4px}
.team-scorebook-canvas{overflow:visible!important}
.score-scroll,.team-scorebook-canvas>.pitch-pane .pitch-scroll{
  overflow:visible!important;
  width:auto!important;
  max-width:none!important;
  touch-action:auto!important;
  -webkit-overflow-scrolling:auto!important;
}
.scoring-pane{overflow:visible!important}
.team-scorebook-canvas>.pitch-pane{overflow:visible!important}

/* Standings is part of the shared structure in every theme. */
body.theme-custom .standings-overview,body.theme-postseason .standings-overview{display:block}
body.theme-postseason .playoff-overview,.postseason-notes{display:none!important}

/* ---------- PLAYOFF ROUNDS: same layout, clearly distinct presentation ---------- */
body.theme-postseason.playoff-wild-card{
 --bg:#06111d;--panel:#0b1f31;--panel2:#112b40;--line:#8295a8;--accent:#dbe3e8;--selected:#263f56;
}
body.theme-postseason.playoff-wild-card .topbar,
body.theme-postseason.playoff-wild-card .app-shell{
 background-image:linear-gradient(135deg,rgba(215,225,232,.05) 25%,transparent 25%,transparent 50%,rgba(215,225,232,.05) 50%,rgba(215,225,232,.05) 75%,transparent 75%),linear-gradient(180deg,#071726,#020b14)!important;
 background-size:18px 18px,auto!important;
}
body.theme-postseason.playoff-wild-card .postseason-banner{color:#e2e8ec;text-shadow:0 0 12px rgba(212,228,238,.22)}
body.theme-postseason.playoff-wild-card .card{border-color:#8295a8!important}

body.theme-postseason.playoff-division-series{
 --bg:#020c16;--panel:#04182a;--panel2:#061f35;--line:#9c7435;--accent:#dda947;--selected:#503a1f;
}
body.theme-postseason.playoff-division-series .app-shell{
 background-image:linear-gradient(90deg,transparent 48%,rgba(218,168,73,.045) 49%,rgba(218,168,73,.045) 51%,transparent 52%),linear-gradient(0deg,transparent 48%,rgba(218,168,73,.035) 49%,rgba(218,168,73,.035) 51%,transparent 52%),linear-gradient(180deg,#031221,#020b15)!important;
 background-size:110px 58px,110px 58px,auto!important;
}

body.theme-postseason.playoff-championship-series{
 --bg:#070d18;--panel:#101b2d;--panel2:#17263b;--line:#a86f45;--accent:#efbd65;--selected:#5b3428;
}
body.theme-postseason.playoff-championship-series .topbar{background:linear-gradient(90deg,#111d32,#4b1f27 50%,#111d32)!important}
body.theme-postseason.playoff-championship-series .team-scorebook-head,
body.theme-postseason.playoff-championship-series .overview-title{background:linear-gradient(90deg,#17263b,#3b2028,#17263b)!important}
body.theme-postseason.playoff-championship-series .card{box-shadow:inset 0 0 0 1px rgba(239,189,101,.08),0 8px 22px rgba(0,0,0,.18)}

body.theme-postseason.playoff-world-series{
 --bg:#01070e;--panel:#031322;--panel2:#071d30;--line:#c49a4e;--accent:#f0c875;--selected:#62451d;
}
body.theme-postseason.playoff-world-series .app-shell{background:radial-gradient(circle at 50% 0,rgba(240,200,117,.16),transparent 27%),linear-gradient(180deg,#031323,#01070e)!important}
body.theme-postseason.playoff-world-series .postseason-banner{font-size:25px;letter-spacing:.09em;text-shadow:0 0 16px rgba(240,200,117,.26)}
body.theme-postseason.playoff-world-series .card{border:1px solid #c49a4e!important;box-shadow:inset 0 0 0 1px rgba(240,200,117,.14),0 0 20px rgba(196,154,78,.08)}
body.theme-postseason.playoff-world-series .team-scorebook-head{border-bottom:2px solid #c49a4e!important}
body.theme-postseason.playoff-world-series .postseason-footer{font-size:13px;letter-spacing:.12em;border-top:2px solid #c49a4e}

/* ---------- WRIGLEY: ivy-framed brick cards, green play grid ---------- */








/* Green content tiles sit over the brick frames. */











/* The actual scoring/play grid stays green — never brick. */





/* Wrigley style suboptions remain visibly different without changing layout. */







/* Keep theme identity when Dark Mode is on; only deepen tones. */

body.theme-postseason.dark-mode .card{filter:brightness(.90)!important}

@media(max-width:600px){
 .team-scorebook-scroll{scroll-snap-type:none!important}
 .team-scorebook-canvas{will-change:transform}
 
 
 
}


/* =========================================================
   v10 — EXACT LINEUP / SCORE GRID ALIGNMENT
   One physical table, sticky lineup columns.
   ========================================================= */

.team-scorebook-body{
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
.team-scorebook-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
  touch-action:pan-x pan-y pinch-zoom!important;
  position:relative!important;
}
.unified-score-table{
  --ord-w:23px;
  --player-w:132px;
  --pos-w:35px;
  --inning-w:40px;
  --stat-w:46px;
  --head1-h:26px;
  --head2-h:23px;
  --row-h:39px;
  --total-h:29px;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
  width:950px!important;
  min-width:950px!important;
  background:var(--panel)!important;
}
.unified-score-table .c-ord{width:var(--ord-w)}
.unified-score-table .c-player{width:var(--player-w)}
.unified-score-table .c-pos{width:var(--pos-w)}
.unified-score-table .c-inning{width:var(--inning-w)}
.unified-score-table .c-stat{width:var(--stat-w)}

.unified-score-table th,
.unified-score-table td{
  box-sizing:border-box!important;
  margin:0!important;
  padding:0!important;
  border-right:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  text-align:center!important;
  vertical-align:middle!important;
}
.unified-score-table thead th{
  background:var(--panel2)!important;
  color:var(--accent)!important;
  font-weight:900!important;
}
.unified-score-table .score-head-primary th{
  height:var(--head1-h)!important;
  min-height:var(--head1-h)!important;
  max-height:var(--head1-h)!important;
  font-size:6px!important;
}
.unified-score-table .score-head-secondary th{
  height:var(--head2-h)!important;
  min-height:var(--head2-h)!important;
  max-height:var(--head2-h)!important;
  font-size:6px!important;
}
.unified-score-table .batter-row > td{
  height:var(--row-h)!important;
  min-height:var(--row-h)!important;
  max-height:var(--row-h)!important;
}
.unified-score-table .unified-totals-row > td{
  height:var(--total-h)!important;
  min-height:var(--total-h)!important;
  max-height:var(--total-h)!important;
  background:var(--panel2)!important;
  color:var(--accent)!important;
  font-weight:900!important;
}

/* Frozen lineup columns are cells in the SAME rows as the scoring cells. */
.unified-score-table .sticky-lineup-banner,
.unified-score-table .sticky-ord,
.unified-score-table .sticky-player,
.unified-score-table .sticky-pos,
.unified-score-table .sticky-totals-label{
  position:sticky!important;
  z-index:6!important;
  background:var(--panel2)!important;
}
.unified-score-table .sticky-lineup-banner,
.unified-score-table .sticky-ord,
.unified-score-table .sticky-totals-label{left:0!important}
.unified-score-table .sticky-player{left:var(--ord-w)!important}
.unified-score-table .sticky-pos{left:calc(var(--ord-w) + var(--player-w))!important}
.unified-score-table tbody .sticky-ord,
.unified-score-table tbody .sticky-player,
.unified-score-table tbody .sticky-pos{
  background:var(--panel)!important;
  z-index:5!important;
}
.unified-score-table .sticky-lineup-banner{
  text-align:left!important;
  padding-left:7px!important;
  font-size:7px!important;
}
.unified-score-table .sticky-totals-label{
  text-align:left!important;
  padding-left:8px!important;
}
.unified-score-table .sticky-player{
  text-align:left!important;
  padding:2px 4px!important;
  overflow:hidden!important;
}
.unified-score-table .sticky-ord,
.unified-score-table .sticky-pos{
  font-weight:900!important;
}
.unified-score-table .player-main{font-size:6.2px!important;line-height:1.04!important}
.unified-score-table .player-subs{font-size:4.8px!important;line-height:1!important}
.unified-score-table .play-cell{
  position:relative!important;
  overflow:hidden!important;
}
.unified-score-table .stat-cell{font-size:7px!important}

/* Pitching is an explicit full-width block under the aligned table. */
.full-width-pitch{
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  border-top:1px solid var(--line)!important;
  background:var(--panel)!important;
}
.full-width-pitch .pitch-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
  touch-action:pan-x pan-y pinch-zoom!important;
}
.full-width-pitch .pitch-table{
  width:max(100%,760px)!important;
  min-width:760px!important;
}

/* Wrigley compatibility with the unified table. */






/* Playoff compatibility. */
body.theme-postseason .unified-score-table th,
body.theme-postseason .unified-score-table td,
body.theme-postseason .full-width-pitch .pitch-table th,
body.theme-postseason .full-width-pitch .pitch-table td{
  border-color:var(--line)!important;
}
body.theme-postseason .unified-score-table thead th,
body.theme-postseason .unified-score-table .sticky-lineup-banner,
body.theme-postseason .unified-score-table .sticky-totals-label,
body.theme-postseason .unified-score-table .unified-totals-row td{
  background:var(--panel2)!important;color:var(--accent)!important;
}

/* The old split-table layout is no longer rendered. */
.lineup-only-table,.scoring-only-table,.team-scorebook-canvas,.team-left-stack,.scoring-pane{}

/* Mobile exact dimensions; every row still shares one <tr>. */
@media(max-width:600px){
  .unified-score-table{
    --ord-w:21px;
    --player-w:124px;
    --pos-w:31px;
    --inning-w:38px;
    --stat-w:44px;
    --head1-h:23px;
    --head2-h:22px;
    --row-h:38px;
    --total-h:29px;
    width:896px!important;
    min-width:896px!important;
  }
  .unified-score-table .score-head-primary th{font-size:5.3px!important}
  .unified-score-table .score-head-secondary th{font-size:5.2px!important}
  .unified-score-table .sticky-lineup-banner{font-size:6px!important;padding-left:5px!important}
  .unified-score-table .player-main{font-size:5.8px!important}
  .unified-score-table .player-subs{font-size:4.4px!important}
  .unified-score-table .stat-cell{font-size:6px!important}
  .full-width-pitch .pitch-table{
    width:896px!important;
    min-width:896px!important;
  }
}


/* ==========================================================
   v11 RESTORED REALISTIC WRIGLEY — approved photo-real ivy + brick
   Core layout is unchanged. Play/scoring grid remains green.
   ========================================================== */






/* Realistic photo-backed brick wrappers around every major section. */


/* Real extracted ivy across the top/bottom edges of each section. */




/* Green inner cards remain readable on top of brick. */










/* IMPORTANT: the active scorebook/play grid itself remains Wrigley green, not brick. */







/* Wrigley typography across the full theme. */




/* Draw realistic brick floor under the scorebook with ivy crest. */



/* Wrigley style suboptions remain distinct while using the same real textures. */







/* Dark mode deepens Wrigley but does not erase the ivy/brick identity. */



/* Mobile: preserve realism without crowding the UI. */
@media(max-width:600px){
  
  
  
  
  
}



/* ==========================================================
   v11 unified-grid compatibility + reference-screen polish
   Keeps the v10 aligned/scrolling structure while restoring
   the approved Wrigley ivy/brick presentation.
   ========================================================= */













/* Dense outer ivy rails like the approved reference screen. */





@media(max-width:600px){
  
  
  
  
}


/* ==========================================================
   v12 RESPONSIVE EXPERIENCE — mobile + tablet + desktop
   No inning navigator and no standings-tab conversion.
   ========================================================== */
:root{--livebar-h:48px}
html{scroll-behavior:smooth}
body{padding-bottom:0}
main{max-width:1480px!important;padding:12px 14px 44px!important}
.save-status{position:absolute;left:50%;bottom:7px;transform:translateX(-50%);font-size:10px;color:var(--muted);font-weight:800;opacity:.82;white-space:nowrap;transition:opacity .2s,color .2s}
.save-status.is-saved{color:var(--accent);opacity:1}
.live-game-bar{position:sticky;top:0;z-index:24;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;min-height:var(--livebar-h);margin:0 0 12px;padding:7px 12px;background:color-mix(in srgb,var(--panel2) 94%,#000)!important;border-color:var(--line)!important;box-shadow:0 6px 16px rgba(0,0,0,.22)}
.live-team{display:flex;align-items:baseline;gap:9px;min-width:0}.live-team.right{justify-content:flex-end;text-align:right}.live-team strong{font-size:16px;color:var(--accent)}.live-team span{font-size:11px;color:var(--muted);white-space:nowrap}.live-team b{color:var(--text);font-size:14px}.live-inning{text-align:center;min-width:92px}.live-inning strong{display:block;font-size:13px;color:var(--accent)}.live-inning small{display:block;margin-top:2px;font-size:9px;color:var(--muted)}
.team-scorebook{overflow:visible!important;scroll-margin-top:calc(var(--livebar-h) + 8px)}
.team-scorebook-head{position:sticky!important;top:var(--livebar-h)!important;z-index:18!important;box-shadow:0 5px 12px rgba(0,0,0,.16)}
.team-scorebook-body{overflow:hidden!important}
.team-scorebook-scroll{scroll-snap-type:x proximity!important;scroll-behavior:smooth!important}
.unified-score-table{
 --ord-w:30px;--player-w:180px;--pos-w:44px;--inning-w:66px;--stat-w:66px;
 --sticky-total:calc(var(--ord-w) + var(--player-w) + var(--pos-w));
 --head1-h:34px;--head2-h:31px;--row-h:58px;--total-h:34px;
 width:1376px!important;min-width:1376px!important
}
.unified-score-table .score-head-primary th{font-size:11px!important}.unified-score-table .score-head-secondary th{font-size:10px!important}
.unified-score-table .sticky-lineup-banner{font-size:11px!important;padding-left:10px!important}
.unified-score-table .sticky-player{padding:4px 7px!important}.unified-score-table .player-main{font-size:12px!important;line-height:1.1!important}.unified-score-table .player-subs{font-size:9px!important;line-height:1.1!important}
.unified-score-table .sticky-ord,.unified-score-table .sticky-pos,.unified-score-table .stat-cell{font-size:11px!important}
.unified-score-table .score-head-inning{scroll-snap-align:start;scroll-margin-left:var(--sticky-total)}
.unified-score-table .play-cell{cursor:pointer;touch-action:manipulation;outline:none}
.unified-score-table .play-cell:focus-visible{box-shadow:inset 0 0 0 3px var(--accent)!important;z-index:3}
.unified-score-table .play-cell.active-inning-col,.unified-score-table .active-inning-col{background:color-mix(in srgb,var(--selected) 42%,var(--panel))!important}
.unified-score-table .score-head-inning.active-inning-col{background:color-mix(in srgb,var(--selected) 70%,var(--panel2))!important;color:#fff!important}
.unified-score-table .current-batter>.sticky-ord,.unified-score-table .current-batter>.sticky-player,.unified-score-table .current-batter>.sticky-pos{box-shadow:inset 0 2px 0 var(--accent),inset 0 -2px 0 var(--accent)!important}
.play-entry svg{inset:5px!important;width:calc(100% - 10px)!important;height:calc(100% - 10px)!important}.play-code{font-size:11px!important;right:4px!important;bottom:3px!important}.standalone-out{font-size:20px!important}.rbi-code{font-size:8px!important;right:3px!important;top:3px!important}.pa-count{font-size:8px!important}.event-marker{height:12px!important;font-size:8px!important}
.full-width-pitch .pitch-table{width:100%!important;min-width:930px!important}.pitch-table .pitcher-name{width:34%!important}.pitch-table th{height:31px!important;font-size:10px!important}.pitch-table td{height:42px!important}.pitch-table input{height:40px!important;font-size:12px!important;padding:4px 6px!important}.pane-title{height:34px!important;font-size:11px!important}
.standings-head{font-size:10px!important;height:34px!important}.standings-grid{font-size:9px!important}.standings-grid .head{font-size:8px!important}.standings-grid .team img{width:16px!important;height:16px!important;flex-basis:16px!important}.standings-grid>div{padding:7px 4px!important}.standings-foot{font-size:8px!important;padding:6px!important}
.team-header-name{font-size:15px!important}.team-logo{width:44px!important;height:44px!important;flex-basis:44px!important}.team-scorebook-head{min-height:54px!important}.section-collapse{width:38px!important;height:38px!important;flex-basis:38px!important}
.full-width-pitch .pitch-scroll{overscroll-behavior-x:contain!important}

/* Desktop mouse/keyboard affordances */
@media (hover:hover) and (pointer:fine){
 .unified-score-table .play-cell:hover{background:color-mix(in srgb,var(--selected) 34%,var(--panel))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 78%,transparent)}
 .player-cell:hover,.pos-cell:hover{background:color-mix(in srgb,var(--selected) 28%,var(--panel))!important;cursor:pointer}
 .team-scorebook-scroll::-webkit-scrollbar,.pitch-scroll::-webkit-scrollbar{height:10px}.team-scorebook-scroll::-webkit-scrollbar-thumb,.pitch-scroll::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--accent) 55%,transparent);border-radius:8px}
}

/* Tablet / compact laptop: 5–8 innings remain comfortably visible. */
@media(min-width:601px) and (max-width:1100px){
 main{max-width:100%!important;padding:10px 10px 40px!important}
 .unified-score-table{--ord-w:28px;--player-w:160px;--pos-w:40px;--inning-w:76px;--stat-w:58px;--head1-h:32px;--head2-h:30px;--row-h:54px;--total-h:33px;width:1430px!important;min-width:1430px!important}
 .unified-score-table .player-main{font-size:11px!important}.unified-score-table .player-subs{font-size:8.5px!important}.unified-score-table .play-code{font-size:10px!important}
 .full-width-pitch .pitch-table{min-width:900px!important}.pitch-table input{font-size:11px!important}
 .live-team span{font-size:10px}
}

/* Mobile: frozen lineup + ~3–4 large innings visible; no tiny text. */
@media(max-width:600px){
 :root{--livebar-h:44px}
 body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
 main{padding:7px 6px 24px!important}
 .topbar{min-height:82px!important}.topbar h1{font-size:24px!important}.save-status{bottom:5px;font-size:9px}
 .top-action{font-size:12px!important}.top-icon,.top-action{min-height:44px!important}
 .game-field{grid-template-columns:32px minmax(0,1fr)!important;padding:9px 7px!important}.game-info-icon{width:30px!important;height:30px!important;font-size:20px!important}.game-field label{font-size:9px!important}.game-field input{height:38px!important;font-size:16px!important;min-width:0!important}
 .matchup-team{grid-template-columns:38px minmax(0,1fr)!important;gap:2px 5px!important}.matchup-team img{width:38px!important;height:38px!important}.matchup-label{font-size:8px!important}.matchup-team select{height:40px!important;font-size:16px!important;min-width:0!important}.versus-mark{font-size:12px!important}
 .overview-title,.card-title{min-height:40px!important;font-size:10px!important}.standings-head{height:30px!important;font-size:8px!important}.refresh-mini{width:28px!important;height:28px!important;font-size:13px!important}.standings-grid{font-size:7.2px!important}.standings-grid .head{font-size:6.5px!important}.standings-grid>div{padding:5px 2px!important}.standings-grid .team img{width:12px!important;height:12px!important;flex-basis:12px!important}.standings-foot{font-size:6.5px!important;padding:5px!important}
 .live-game-bar{grid-template-columns:1fr 82px 1fr;gap:5px;min-height:44px;margin:0 0 8px;padding:5px 7px;border-radius:10px}.live-team{display:grid;gap:0}.live-team.right{justify-items:end}.live-team strong{font-size:12px}.live-team span{font-size:7.5px}.live-team b{font-size:10px}.live-inning{min-width:0}.live-inning strong{font-size:11px}.live-inning small{font-size:7px}
 .team-scorebook{margin-bottom:12px!important;scroll-margin-top:52px}.team-scorebook-head{top:var(--livebar-h)!important;min-height:48px!important;padding:4px 7px!important}.team-logo{width:36px!important;height:36px!important;flex-basis:36px!important}.team-header-name{font-size:12px!important}.section-collapse{width:34px!important;height:34px!important;flex-basis:34px!important}
 .team-scorebook-scroll{scroll-padding-left:172px!important;scroll-snap-type:x proximity!important}
 .unified-score-table{--ord-w:24px;--player-w:112px;--pos-w:36px;--inning-w:54px;--stat-w:52px;--head1-h:31px;--head2-h:29px;--row-h:52px;--total-h:32px;width:1080px!important;min-width:1080px!important}
 .unified-score-table .score-head-primary th{font-size:9px!important}.unified-score-table .score-head-secondary th{font-size:8.5px!important}.unified-score-table .sticky-lineup-banner{font-size:9px!important;padding-left:5px!important}.unified-score-table .sticky-player{padding:3px 4px!important}.unified-score-table .player-main{font-size:10.5px!important;line-height:1.06!important}.unified-score-table .player-subs{font-size:8px!important;line-height:1.05!important}.unified-score-table .sticky-ord,.unified-score-table .sticky-pos,.unified-score-table .stat-cell{font-size:9px!important}
 .play-entry svg{inset:4px!important;width:calc(100% - 8px)!important;height:calc(100% - 8px)!important}.play-code{font-size:9.5px!important;right:3px!important;bottom:2px!important}.standalone-out{font-size:18px!important}.rbi-code{font-size:7px!important}.event-marker{height:11px!important;font-size:7px!important}
 .pane-title{height:34px!important;font-size:10px!important}.full-width-pitch .pitch-table{width:760px!important;min-width:760px!important}.pitch-table .pitcher-name{width:220px!important}.pitch-table th{height:30px!important;font-size:9px!important}.pitch-table td{height:42px!important}.pitch-table input{height:40px!important;font-size:16px!important;padding:3px 5px!important}
 .modal{place-items:end stretch!important;padding:0!important;background:rgba(0,0,0,.66)!important}.modal-card{width:100%!important;max-width:none!important;max-height:88dvh!important;margin:0!important;border-radius:20px 20px 0 0!important;padding:14px 12px calc(16px + env(safe-area-inset-bottom))!important;box-shadow:0 -14px 40px rgba(0,0,0,.38)!important}.modal-head{position:sticky;top:-14px;z-index:3;background:inherit;padding:10px 0}.modal-head button{min-width:44px;min-height:44px;font-size:28px!important}.modal label{font-size:10px!important}.modal input,.modal select{min-height:46px!important;font-size:16px!important}.small-btn,.modal-actions button,.settings-buttons button,.quick-plays button{min-height:44px!important;font-size:14px!important}.modal-actions{position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom));background:inherit;padding:10px 0 calc(12px + env(safe-area-inset-bottom));flex-wrap:wrap}.modal-actions button{flex:1 1 120px}.sub-row{grid-template-columns:60px minmax(100px,1fr) 48px 62px 48px 40px!important;overflow-x:auto}.setting-toggle{margin-top:12px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;font-size:13px!important}.setting-toggle input{min-height:20px!important;width:20px!important}
 .mobile-action-bar{display:grid!important}
 body.focus-mode .topbar{display:none!important}
 body.focus-mode main{padding-top:5px!important}
 body.focus-mode .live-game-bar{top:0!important}
 body.focus-mode .team-scorebook-head{top:var(--livebar-h)!important}
 body.focus-mode .wrigley-footer,body.focus-mode .postseason-footer{display:none!important}
 
 
}
.mobile-action-bar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:110;grid-template-columns:repeat(4,1fr);padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));background:color-mix(in srgb,var(--panel2) 96%,#000);border-top:1px solid var(--line);box-shadow:0 -8px 22px rgba(0,0,0,.28)}
.mobile-action-bar button{min-height:52px;border:0;background:transparent;color:var(--text);display:grid;place-items:center;gap:1px;border-radius:10px}.mobile-action-bar button:active{background:color-mix(in srgb,var(--selected) 55%,transparent)}.mobile-action-bar button:disabled{opacity:.38}.mobile-action-bar span{font-size:20px;line-height:1}.mobile-action-bar small{font-size:9px;font-weight:800;color:var(--muted)}
.inning-transition{position:fixed;left:50%;top:18px;transform:translateX(-50%);z-index:160;display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--accent);border-radius:12px;background:color-mix(in srgb,var(--panel2) 96%,#000);color:var(--text);box-shadow:0 12px 35px rgba(0,0,0,.35)}.inning-transition strong{color:var(--accent)}.inning-transition span{font-size:12px}.inning-transition button{width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:inherit}

/* Wrigley compatibility for active/sticky responsive states. */






/* ==========================================================
   v13 WRIGLEY REFINEMENT — approved ivy-bordered brick sections
   - removes overlapping/printed ivy assets
   - uses ivy-only section borders
   - brick lives in section wrappers only
   - score grids stay clean official-green
   - lighter selected-team highlight in standings
   ========================================================== */























@media (max-width:600px){
  
  
  
  
  
  
  
  
  
  
  .card-title{font-size:9px!important;min-height:36px!important}
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
}

/* ==========================================================
   v15 BUG FIX + WRIGLEY POLISH
   ========================================================== */


/* Pure ivy artwork only — no scorecard/standings remnants in the border. */


/* Restore the team title bar that was being lost in the Wrigley mobile flow. */




/* More reliable long-text fit across all mobile themes. */
@media(max-width:600px){
  .game-field input{
    font-size:12px!important;
    padding-inline:2px!important;
    letter-spacing:-.01em!important;
    text-overflow:clip!important;
  }
  .matchup-team select{
    font-size:10.5px!important;
    padding-left:1px!important;
    padding-right:16px!important;
    letter-spacing:-.015em!important;
  }
  .matchup-label{font-size:6.8px!important}
  
  
  
  
  
  
}

/* Make the scored base path clearly visible again. */
.play-entry svg line{
  vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 0 1px rgba(0,0,0,.35));
}


/* Play Editor follows the currently selected theme instead of opening as a generic light card. */
.play-card{
  background:linear-gradient(180deg,var(--panel2),var(--panel))!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
  box-shadow:0 18px 50px rgba(0,0,0,.38)!important;
}
.play-card .modal-head{border-color:var(--line)!important}
.play-card .modal-head strong{color:var(--accent)!important}
.play-card .modal-head small,
.play-card .quick-label{color:var(--muted)!important}
.play-card .modal-head button{color:var(--text)!important}
.play-card label{color:var(--muted)!important}
.play-card input,
.play-card select{
  background:color-mix(in srgb,var(--panel) 90%,#000)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
.play-card .situation{
  background:color-mix(in srgb,var(--selected) 72%,var(--panel2))!important;
  color:var(--text)!important;
  border:1px solid var(--line)!important;
}
.play-card .quick-plays button,
.play-card .modal-actions button{
  background:color-mix(in srgb,var(--panel2) 82%,#fff 4%)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
.play-card .quick-plays button:active,
.play-card .modal-actions button:active{
  background:var(--selected)!important;
}
.play-card .modal-actions .primary{
  background:var(--accent)!important;
  color:#111!important;
  border-color:var(--accent)!important;
}
.play-card .modal-actions .danger{color:#ff8b83!important}







/* Shorter mobile action bar with a definite safe area above it. */
@media(max-width:600px){
  body{padding-bottom:calc(54px + env(safe-area-inset-bottom))!important}
  .mobile-action-bar{
    padding-top:3px!important;
    padding-bottom:calc(3px + env(safe-area-inset-bottom))!important;
  }
  .mobile-action-bar button{min-height:44px!important}
  .mobile-action-bar span{font-size:18px!important}
  .mobile-action-bar small{font-size:8px!important}
  main{padding-bottom:34px!important}
}


/* ==========================================================
   v15 RESTORED APPROVED PLAY-PATH LOGIC
   ========================================================== */
.team-scorebook-scroll{scroll-snap-type:none!important;scroll-behavior:auto!important;overscroll-behavior-x:contain!important}
.play-entry .diamond{overflow:visible!important}
.play-entry .diamond-fill{stroke:none}
.play-entry .base{stroke:transparent;stroke-width:2.2;vector-effect:non-scaling-stroke}
.play-entry .base.origin,.play-entry .base.advance{stroke:#f1f3ef;stroke-width:4.1;stroke-linecap:round;vector-effect:non-scaling-stroke}
.play-entry .runner-out-path{stroke:#ef554f!important;stroke-width:4.5!important;stroke-linecap:round;vector-effect:non-scaling-stroke;filter:none!important}
.play-entry .runner-out-mark{stroke:#ef554f!important;stroke-width:4.2!important;stroke-linecap:round;vector-effect:non-scaling-stroke;filter:none!important}
.play-entry .runner-out-label{fill:#ef554f;stroke:rgba(5,17,25,.92);stroke-width:2.1px;paint-order:stroke fill;font-size:7px;font-weight:950;text-anchor:middle;dominant-baseline:middle}
.play-entry .advance-reason-label{fill:#f5f2ea;stroke:rgba(4,15,12,.94);stroke-width:2px;paint-order:stroke fill;font-size:7px;font-weight:950;text-anchor:middle;dominant-baseline:middle}
.play-entry.scored .diamond-fill{fill:#4aaa5e!important;fill-opacity:.78!important}

body.theme-custom:not(.dark-mode) .play-entry .base.origin,body.theme-custom:not(.dark-mode) .play-entry .base.advance{stroke:#f5f2ea!important}
body.theme-postseason .play-entry .base.origin,body.theme-postseason .play-entry .base.advance{stroke:#f4efe4!important}
.play-entry.runner-out .play-code{color:var(--text)!important}
.runner-out-fields{margin:10px 0 2px;padding:10px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--panel2) 80%,#000 8%)}
.runner-out-title{margin-bottom:8px;color:#ef746e;font-size:9px;font-weight:950;letter-spacing:.12em}
.runner-out-count{margin:3px 0 0!important}
.play-card .runner-out-fields input,.play-card .runner-out-fields select{min-height:42px}


@media(max-width:600px){
 .play-entry .runner-out-label,.play-entry .advance-reason-label{font-size:6.4px!important;stroke-width:1.8px!important}
 .play-entry .base.origin,.play-entry .base.advance{stroke-width:3.5!important}
 .play-entry .runner-out-path{stroke-width:4!important}.play-entry .runner-out-mark{stroke-width:3.8!important}
 .runner-out-fields{padding:8px;margin-top:8px}
}


/* ==========================================================
   v16 — restore approved scoring marks and freeze score position
   ========================================================== */
main,.team-scorebook,.team-scorebook-body,.team-scorebook-scroll,.unified-score-table{overflow-anchor:none!important}
.team-scorebook-scroll{scroll-snap-type:none!important;scroll-behavior:auto!important}
.unified-score-table .score-head-inning{scroll-snap-align:none!important}
.play-entry .diamond{overflow:visible!important}
.play-entry .diamond-fill{stroke:none!important}
.play-entry .base{stroke:transparent!important;stroke-width:2.15!important;vector-effect:non-scaling-stroke}
.play-entry .base.origin,.play-entry .base.advance{
  stroke:#111!important;stroke-width:4.7!important;stroke-linecap:round!important;vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 0 .7px rgba(245,239,220,.62));
}
.play-entry .advance-reason-label{
  fill:#111!important;stroke:#f8f5e9!important;stroke-width:2.2px!important;paint-order:stroke fill!important;
  font-size:7px!important;font-weight:950!important;text-anchor:middle!important;dominant-baseline:middle!important;
}
.play-entry .runner-out-path{
  stroke:#d83a34!important;stroke-width:5!important;stroke-linecap:round!important;vector-effect:non-scaling-stroke!important;filter:none!important
}
.play-entry .runner-out-mark{
  stroke:#d83a34!important;stroke-width:4.6!important;stroke-linecap:round!important;vector-effect:non-scaling-stroke!important;filter:none!important
}
.play-entry .runner-out-label{
  fill:#d83a34!important;stroke:#fff!important;stroke-width:2.4px!important;paint-order:stroke fill!important;
  font-size:7px!important;font-weight:950!important;text-anchor:middle!important;dominant-baseline:middle!important
}
.play-entry .play-code,.play-entry.runner-out .play-code{
  color:#111!important;text-shadow:0 0 1px rgba(248,245,233,.78)!important
}
.play-entry.out .play-code,.standalone-out{color:#d83a34!important;text-shadow:none!important}
.play-entry.scored .diamond-fill{fill:#43b86a!important;fill-opacity:.82!important}
#advanceReasonField.hidden{display:none!important}
@media(max-width:600px){
 .play-entry .base.origin,.play-entry .base.advance{stroke-width:4.2!important}
 .play-entry .runner-out-path{stroke-width:4.5!important}.play-entry .runner-out-mark{stroke-width:4.2!important}
 .play-entry .advance-reason-label,.play-entry .runner-out-label{font-size:6.5px!important}
}


/* ==========================================================
   v17 VISUAL REFINEMENT ONLY
   - no layout/logic/function changes
   - improves score-grid contrast
   - makes subthemes more visually distinct
   - refines drawer/menu presentation
   - makes dark mode intentionally different
   ========================================================== */

/* ---------- Visual tokens for scorekeeping contrast ---------- */
body{
  --score-grid-bg:var(--panel);
  --score-grid-bg2:var(--panel2);
  --score-grid-head:var(--panel2);
  --score-grid-line:var(--line);
  --score-grid-sticky:var(--panel);
  --score-mark:#f5f2ea;
  --score-mark-outline:rgba(5,13,21,.92);
  --score-mark-text:#f5f2ea;
  --score-note:#f5f2ea;
  --score-out:#d94a43;
  --score-run:#45bb69;
  --score-col-highlight:rgba(255,255,255,.06);
  --score-col-head-highlight:rgba(255,255,255,.10);
}

/* ---------- Drawer / menu refinement ---------- */
.drawer{
  backdrop-filter:blur(14px);
  box-shadow:12px 0 28px rgba(0,0,0,.26);
}
.drawer-head{
  padding:6px 0 14px;
}
.drawer-head strong{
  font-size:22px;
  letter-spacing:.02em;
}
.drawer-head button{
  width:38px;height:38px;border-radius:10px;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);color:inherit;
}
.drawer-label{
  font-size:9px;
  letter-spacing:.16em;
  opacity:.86;
}
.drawer-nav,.theme-choice,.drawer-tools>button,.import-button{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  min-height:54px;
  padding:8px 10px;
  background:rgba(255,255,255,.04);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
.drawer-nav span:nth-child(2),.drawer-tools>button span:nth-child(2),.import-button span:nth-child(2){font-weight:850}
.drawer-nav.active,.theme-choice.active{
  box-shadow:0 10px 18px rgba(0,0,0,.18), inset 0 0 0 1px color-mix(in srgb,var(--accent) 56%, transparent);
}
.theme-choice{grid-template-columns:52px minmax(0,1fr) 22px;gap:10px}
.theme-choice strong{font-size:11px;letter-spacing:.02em}
.theme-choice small{font-size:7.4px;line-height:1.2;color:color-mix(in srgb,var(--text) 65%, #8da0b3 35%)}
.theme-check{font-size:16px;font-weight:950}
.theme-swatch{
  width:46px;height:46px;border-radius:12px;display:block;position:relative;overflow:hidden;
  border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.04), 0 6px 14px rgba(0,0,0,.18);
}
.theme-swatch::after{
  content:"";position:absolute;inset:auto 0 0 0;height:13px;
  background:linear-gradient(90deg,rgba(255,255,255,.14),rgba(255,255,255,0));
}
.custom-swatch{background:linear-gradient(135deg,#0c2944 0 50%,#173a58 50% 72%,#d1b375 72%)}
.wrigley-swatch{background:linear-gradient(135deg,#103825 0 50%,#154730 50% 72%,#8d5840 72%)}
.playoff-swatch{background:linear-gradient(135deg,#041427 0 52%,#091f36 52% 74%,#e0af4f 74%)}
.theme-sub{
  margin:8px 4px 12px 18px;
  padding:10px 10px 10px 12px;
  border-left:none;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background:rgba(0,0,0,.16);
}
.theme-sub label{gap:6px;font-size:8.2px;letter-spacing:.11em}
.theme-sub select,.theme-sub input[type=color]{
  min-height:38px;border:1px solid rgba(255,255,255,.16);border-radius:10px;
  background:rgba(5,17,26,.82);box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.theme-sub select{padding:0 10px}
.color-row{gap:10px;margin-bottom:10px}
.color-row label{gap:6px}
.color-row input[type=color]{padding:3px;background:rgba(5,17,26,.82)}

/* ---------- Score grid readability across all themes ---------- */
.unified-score-table,
.unified-score-table td,
.unified-score-table th,
.full-width-pitch .pitch-table td,
.full-width-pitch .pitch-table th{
  border-color:var(--score-grid-line)!important;
}
.unified-score-table td,
.full-width-pitch .pitch-table td{
  background:var(--score-grid-bg)!important;
}
.unified-score-table thead th,
.unified-score-table .sticky-lineup-banner,
.unified-score-table .sticky-totals-label,
.unified-score-table .unified-totals-row td,
.full-width-pitch .pane-title,
.full-width-pitch .pitch-table th,
.team-scorebook-head,
.overview-title,
.standings-head,
.standings-grid .head,
.live-game-bar{
  background:var(--score-grid-head)!important;
  border-color:var(--score-grid-line)!important;
}
.unified-score-table tbody .sticky-ord,
.unified-score-table tbody .sticky-player,
.unified-score-table tbody .sticky-pos,
.full-width-pitch,
.standings-grid>div,
.standings-foot{
  background:var(--score-grid-sticky)!important;
  border-color:var(--score-grid-line)!important;
}
.unified-score-table .play-cell.active-inning-col,
.unified-score-table .active-inning-col{
  background:color-mix(in srgb,var(--score-grid-bg) 86%, white 14%)!important;
}
.unified-score-table .score-head-inning.active-inning-col{
  background:color-mix(in srgb,var(--score-grid-head) 78%, white 22%)!important;
}
.play-entry .base.origin,.play-entry .base.advance{
  stroke:var(--score-mark)!important;
  filter:drop-shadow(0 0 1px rgba(0,0,0,.28));
}
.play-entry .advance-reason-label{
  fill:var(--score-note)!important;
  stroke:var(--score-mark-outline)!important;
}
.play-entry .play-code,
.play-entry.runner-out .play-code{
  color:var(--score-mark-text)!important;
  text-shadow:0 0 1px rgba(0,0,0,.42)!important;
}
.play-entry .runner-out-path,
.play-entry .runner-out-mark{
  stroke:var(--score-out)!important;
}
.play-entry .runner-out-label,
.play-entry.out .play-code,
.standalone-out{
  fill:var(--score-out)!important;
  color:var(--score-out)!important;
}
.play-entry .runner-out-label{
  stroke:#fff!important;
}
.play-entry.scored .diamond-fill{fill:var(--score-run)!important;fill-opacity:.84!important}
.rbi-code{color:var(--score-run)!important;text-shadow:0 0 1px rgba(0,0,0,.35)!important}
.event-marker{background:color-mix(in srgb,var(--score-mark) 16%, #000)!important;color:var(--score-mark)!important}

/* ---------- Default theme / subthemes ---------- */
body.theme-custom{
  --score-grid-bg:color-mix(in srgb,var(--custom-bg) 78%, #041422 22%);
  --score-grid-sticky:color-mix(in srgb,var(--custom-bg) 84%, #061729 16%);
  --score-grid-head:color-mix(in srgb,var(--custom-panel2) 74%, var(--custom-accent) 8%);
  --score-grid-line:color-mix(in srgb,var(--custom-accent) 54%, #56708a 46%);
  --score-mark:#f7f4eb;
  --score-mark-text:#f7f4eb;
  --score-note:#f7f4eb;
  --score-mark-outline:rgba(7,16,29,.95);
  --score-run:#4fc672;
  --score-out:#f05a4f;
}
body.theme-custom .topbar h1{letter-spacing:.01em}
body.theme-custom.custom-modern{
  --score-grid-head:linear-gradient(180deg,#133056,#10284a);
}
body.theme-custom.custom-modern .topbar{
  background:linear-gradient(180deg,#0d2c49,#0a223a)!important;
}
body.theme-custom.custom-modern .card,
body.theme-custom.custom-modern .drawer-nav,
body.theme-custom.custom-modern .theme-choice{box-shadow:none}
body.theme-custom.custom-modern .team-header-name,
body.theme-custom.custom-modern .overview-title strong,
body.theme-custom.custom-modern .topbar h1{font-family:Inter,system-ui,sans-serif!important}

body.theme-custom.custom-classic{
  --score-grid-bg:#0d2842;
  --score-grid-sticky:#102d49;
  --score-grid-head:linear-gradient(180deg,#183655,#112b44);
  --score-grid-line:#7a8ea0;
  --score-mark:#f3ead8;
  --score-mark-text:#f3ead8;
}
body.theme-custom.custom-classic .app-shell{
  background:linear-gradient(180deg,#0a2237,#081a2e)!important;
}
body.theme-custom.custom-classic .topbar,
body.theme-custom.custom-classic .team-scorebook-head,
body.theme-custom.custom-classic .overview-title{
  background:linear-gradient(180deg,#183656,#112941)!important;
}
body.theme-custom.custom-classic .team-header-name,
body.theme-custom.custom-classic .overview-title strong,
body.theme-custom.custom-classic .topbar h1{
  font-family:Georgia,"Times New Roman",serif!important;
}
body.theme-custom.custom-classic .card{box-shadow:0 8px 20px rgba(0,0,0,.15), inset 0 0 0 1px rgba(243,234,216,.04)}

body.theme-custom.custom-heritage{
  --score-grid-bg:#103142;
  --score-grid-sticky:#123749;
  --score-grid-head:linear-gradient(180deg,#1c3c4e,#173448);
  --score-grid-line:#8f7a55;
  --score-mark:#f1e3c3;
  --score-mark-text:#f1e3c3;
  --score-run:#55c77a;
}
body.theme-custom.custom-heritage .app-shell{
  background:
    linear-gradient(180deg,rgba(199,163,93,.06),rgba(199,163,93,0) 22%),
    linear-gradient(180deg,#0f2a39,#0a1f2f)!important;
}
body.theme-custom.custom-heritage .topbar{
  background:linear-gradient(180deg,#173446,#102839)!important;
}
body.theme-custom.custom-heritage .team-header-name,
body.theme-custom.custom-heritage .overview-title strong,
body.theme-custom.custom-heritage .topbar h1{
  font-family:Georgia,"Times New Roman",serif!important;
  letter-spacing:.02em;
}
body.theme-custom.custom-heritage .card{
  box-shadow:0 8px 22px rgba(0,0,0,.17), inset 0 0 0 1px rgba(241,227,195,.05);
}

/* true dark for default theme */
body.theme-custom.dark-mode{
  --custom-bg:#04101b;--custom-bg2:#020910;--custom-panel:#071627;--custom-panel2:#0b1e34;--custom-line:#39506d;
  --custom-text:#eef2f5;--custom-selected:#172742;
  --score-grid-bg:#041225;
  --score-grid-sticky:#06152b;
  --score-grid-head:linear-gradient(180deg,#0a1f3a,#07182f);
  --score-grid-line:#436084;
  --score-mark:#f8f5ed;
  --score-mark-text:#f8f5ed;
  --score-note:#f8f5ed;
  --score-mark-outline:rgba(4,10,18,.96);
}
body.theme-custom.dark-mode .app-shell{background:linear-gradient(180deg,#031019,#02070d)!important}
body.theme-custom.dark-mode .topbar{background:linear-gradient(180deg,#081a2e,#061220)!important}
body.theme-custom.dark-mode .drawer{background:linear-gradient(180deg,#09162a,#060f1f)!important}
body.theme-custom.dark-mode .modal-card{background:#0a1525!important;border-color:#365173!important}

/* ---------- Wrigley subthemes ---------- */

















/* ---------- Postseason rounds ---------- */
body.theme-postseason{
  --score-grid-bg:#06182c;
  --score-grid-sticky:#06182c;
  --score-grid-head:linear-gradient(180deg,#0b2641,#061b31);
  --score-grid-line:#a17536;
  --score-mark:#f5f0e5;
  --score-mark-text:#f5f0e5;
  --score-note:#f5f0e5;
  --score-mark-outline:rgba(3,8,14,.95);
  --score-run:#56ca79;
  --score-out:#f1584d;
}
body.theme-postseason .topbar h1,
body.theme-postseason .team-header-name,
body.theme-postseason .overview-title strong{letter-spacing:.02em}
body.theme-postseason.playoff-wild-card{
  --score-grid-bg:#0b2033;
  --score-grid-sticky:#0b2033;
  --score-grid-head:linear-gradient(180deg,#173149,#11263c);
  --score-grid-line:#8ea0b5;
  --score-mark:#eef4f8;
  --score-mark-text:#eef4f8;
}
body.theme-postseason.playoff-wild-card .topbar{box-shadow:inset 0 -1px 0 rgba(142,160,181,.24)}

body.theme-postseason.playoff-division-series{
  --score-grid-bg:#07192d;
  --score-grid-sticky:#07192d;
  --score-grid-head:linear-gradient(180deg,#102845,#0a2037);
  --score-grid-line:#b28641;
  --score-mark:#f8f0de;
}
body.theme-postseason.playoff-division-series .topbar{background:linear-gradient(180deg,#07172a,#05111f)!important}

body.theme-postseason.playoff-championship-series{
  --score-grid-bg:#0d1a2f;
  --score-grid-sticky:#0d1a2f;
  --score-grid-head:linear-gradient(90deg,#17263b,#3b2028,#17263b);
  --score-grid-line:#b87e58;
  --score-mark:#f7efe4;
  --score-mark-text:#f7efe4;
}
body.theme-postseason.playoff-championship-series .team-header-name,
body.theme-postseason.playoff-championship-series .overview-title strong,
body.theme-postseason.playoff-championship-series .topbar h1{font-family:Georgia,"Times New Roman",serif!important}

body.theme-postseason.playoff-world-series{
  --score-grid-bg:#071423;
  --score-grid-sticky:#071423;
  --score-grid-head:linear-gradient(180deg,#10243b,#0a1828);
  --score-grid-line:#d0a458;
  --score-mark:#fff7e4;
  --score-mark-text:#fff7e4;
  --score-run:#61d786;
}
body.theme-postseason.playoff-world-series .topbar{background:linear-gradient(180deg,#0a1523,#040a12)!important}
body.theme-postseason.playoff-world-series .team-scorebook-head,
body.theme-postseason.playoff-world-series .overview-title,
body.theme-postseason.playoff-world-series .live-game-bar{box-shadow:inset 0 0 0 1px rgba(255,247,228,.06)}

body.theme-postseason.dark-mode{
  --score-grid-bg:#040f1c;
  --score-grid-sticky:#040f1c;
  --score-grid-head:linear-gradient(180deg,#08182c,#05111f);
  --score-grid-line:#8b6a34;
  --score-mark:#fcf6ea;
  --score-mark-text:#fcf6ea;
  --score-note:#fcf6ea;
}
body.theme-postseason.dark-mode .app-shell{background:radial-gradient(circle at 50% 0,rgba(225,177,88,.10),transparent 24%),linear-gradient(180deg,#020911,#01050a)!important}
body.theme-postseason.dark-mode .drawer{background:linear-gradient(180deg,#081222,#050d19)!important}
body.theme-postseason.dark-mode .modal-card{background:#08111d!important;border-color:#6d5427!important;color:#f7f3ea!important}

/* theme-aware modal/editor refinement */
body.theme-custom .modal-card,
body.theme-custom .situation{box-shadow:0 10px 22px rgba(0,0,0,.18)}


body.theme-postseason .play-card .situation,
body.theme-postseason .settings-card .settings-section h3,
body.theme-postseason .modal-head strong{color:#f2dca8!important}
body.theme-postseason .play-card .situation{background:linear-gradient(180deg,#102846,#0a2037)!important}

/* stronger mobile drawer / menu appearance without changing structure */
@media(max-width:600px){
  .drawer{width:min(304px,84vw)}
  .drawer-head strong{font-size:20px}
  .drawer-nav,.theme-choice,.drawer-tools>button,.import-button{min-height:48px;padding:7px 8px}
  .theme-choice{grid-template-columns:44px minmax(0,1fr) 20px;gap:8px}
  .theme-swatch{width:40px;height:40px;border-radius:10px}
  .theme-sub{margin-left:10px;padding:9px 9px 9px 10px}
  .theme-sub select,.theme-sub input[type=color]{min-height:35px}
}


/* ==========================================================
   v18 POLISH REFINEMENT
   - quick access clear action
   - uppercase visual treatment for all name fields
   ========================================================== */
.name-input,
#starterName,
.pitch-table .pitcher-name input{
  text-transform:uppercase!important;
}
.mobile-action-bar{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  box-shadow:0 -10px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
.mobile-action-bar button{
  position:relative;
}
.mobile-action-bar button span{transition:transform .16s ease}
.mobile-action-bar button:active span{transform:scale(.94)}
.mobile-action-bar .danger-quick small,
.mobile-action-bar .danger-quick span{
  color:#e36d66!important;
}
.mobile-action-bar .danger-quick{
  background:linear-gradient(180deg,rgba(211,75,68,.10),rgba(211,75,68,.02))!important;
  border-left:1px solid rgba(211,75,68,.18);
  border-right:1px solid rgba(211,75,68,.18);
}
.settings-buttons #clearGameBtn{
  color:#b63f39!important;
  border-color:rgba(182,63,57,.35)!important;
  background:linear-gradient(180deg,rgba(182,63,57,.08),rgba(182,63,57,.02))!important;
}

body.theme-postseason .mobile-action-bar .danger-quick{
  background:linear-gradient(180deg,rgba(221,87,73,.11),rgba(221,87,73,.02))!important;
}
@media(max-width:600px){
  .mobile-action-bar small{font-size:7.6px!important}
  .mobile-action-bar span{font-size:17px!important}
  .mobile-action-bar button{min-height:46px!important}
}


/* ==========================================================
   v19 THEME + DARK MODE POLISH ONLY
   No scorecard structure, scoring geometry, scrolling, or game logic changes.
   ========================================================== */

/* ---------- Shared menu polish ---------- */
.drawer-section{position:relative}
.drawer-section+.drawer-section::before{
  content:"";position:absolute;left:4px;right:4px;top:0;height:1px;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 24%,transparent),transparent);
}
.drawer-label{display:flex;align-items:center;gap:7px}
.drawer-label::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 28%,transparent),transparent)}
.theme-choice{position:relative;overflow:hidden}
.theme-choice::before{
  content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;
  background:transparent;transition:background .18s ease,box-shadow .18s ease;
}
.theme-choice.active::before{background:var(--accent);box-shadow:0 0 12px color-mix(in srgb,var(--accent) 52%,transparent)}
.theme-sub select{font-weight:850;color:var(--text)}
.drawer-tools>button,.import-button{transition:transform .14s ease,background .14s ease,border-color .14s ease}
@media(hover:hover) and (pointer:fine){
  .drawer-nav:hover,.theme-choice:hover,.drawer-tools>button:hover,.import-button:hover{transform:translateX(2px);background:rgba(255,255,255,.065)}
}

/* ---------- Dark-mode control should visibly read as active ---------- */
body.dark-mode #darkBtn{
  border-color:color-mix(in srgb,var(--accent) 75%,#fff 25%)!important;
  background:color-mix(in srgb,var(--panel2) 82%,#fff 5%)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent),0 0 18px color-mix(in srgb,var(--accent) 13%,transparent)!important;
}
body.dark-mode .topbar{filter:none!important}
body.dark-mode .card,
body.dark-mode .team-left-stack,
body.dark-mode .lineup-pane,
body.dark-mode .pitch-pane,
body.dark-mode .scoring-pane{filter:none!important}

/* ---------- DEFAULT: stronger subtheme identities ---------- */
body.theme-custom.custom-modern:not(.dark-mode){
  --custom-bg:#e8edf3;--custom-bg2:#dfe6ee;--custom-panel:#f8fafc;--custom-panel2:#e8eef5;--custom-line:#70849a;
  --custom-text:#142538;--custom-selected:#d5e1ed;
  --score-grid-bg:#f8fafc;--score-grid-sticky:#f4f7fa;--score-grid-head:linear-gradient(180deg,#e8eef5,#dde7f0);
  --score-grid-line:#8ea0b2;--score-mark:#17202a;--score-mark-text:#17202a;--score-note:#17202a;--score-mark-outline:#fff;
  --score-out:#c83e38;--score-run:#2c9953;
}
body.theme-custom.custom-modern:not(.dark-mode) .app-shell{background:linear-gradient(180deg,#edf2f7,#e0e7ef)!important}
body.theme-custom.custom-modern:not(.dark-mode) .topbar{background:linear-gradient(180deg,#16334e,#102a43)!important;color:#fff}
body.theme-custom.custom-modern:not(.dark-mode) .team-scorebook,
body.theme-custom.custom-modern:not(.dark-mode) .standings-overview,
body.theme-custom.custom-modern:not(.dark-mode) .game-info,
body.theme-custom.custom-modern:not(.dark-mode) .matchup-selector{box-shadow:0 8px 20px rgba(20,37,56,.08)!important}
body.theme-custom.custom-modern:not(.dark-mode) .play-entry .runner-out-label{stroke:#fff!important}

body.theme-custom.custom-classic:not(.dark-mode){
  --custom-bg:#0c263e;--custom-bg2:#091d31;--custom-panel:#102e49;--custom-panel2:#173b5c;--custom-line:#b49a67;
  --custom-text:#f1eadb;--custom-selected:#263e55;
  --score-grid-bg:#102d47;--score-grid-sticky:#102d47;--score-grid-head:linear-gradient(180deg,#193b5b,#122f49);
  --score-grid-line:#a78e61;--score-mark:#f5ead2;--score-mark-text:#f5ead2;--score-note:#f5ead2;
}
body.theme-custom.custom-classic:not(.dark-mode) .app-shell{background:linear-gradient(180deg,#0f2b44,#091c2f)!important}
body.theme-custom.custom-classic:not(.dark-mode) .topbar{background:linear-gradient(180deg,#173957,#102c46)!important;border-bottom-color:#a78e61!important}
body.theme-custom.custom-classic:not(.dark-mode) .team-scorebook-head,
body.theme-custom.custom-classic:not(.dark-mode) .overview-title{border-bottom-color:#a78e61!important}

body.theme-custom.custom-heritage:not(.dark-mode){
  --custom-bg:#24352f;--custom-bg2:#17251f;--custom-panel:#31483e;--custom-panel2:#3a5347;--custom-line:#b39a68;
  --custom-text:#f0e5cb;--custom-selected:#4b5e4c;
  --score-grid-bg:#31483e;--score-grid-sticky:#31483e;--score-grid-head:linear-gradient(180deg,#405b4d,#354c41);
  --score-grid-line:#ae9463;--score-mark:#f4e7c8;--score-mark-text:#f4e7c8;--score-note:#f4e7c8;--score-run:#63bd78;
}
body.theme-custom.custom-heritage:not(.dark-mode) .app-shell{
  background:
    repeating-linear-gradient(0deg,rgba(239,225,194,.018) 0 1px,transparent 1px 6px),
    linear-gradient(180deg,#2b4036,#18271f)!important;
}
body.theme-custom.custom-heritage:not(.dark-mode) .topbar{background:linear-gradient(180deg,#374e42,#293e34)!important;border-bottom-color:#b39a68!important}
body.theme-custom.custom-heritage:not(.dark-mode) .card{border-color:#a98e5e!important}

/* Default dark mode is a true night palette regardless of subtheme, while preserving identity accents. */
body.theme-custom.dark-mode{
  --custom-bg:#020812;--custom-bg2:#01050b;--custom-panel:#06101e;--custom-panel2:#09182a;--custom-line:#365274;--custom-text:#f0f4f8;
  --score-grid-bg:#040c18;--score-grid-sticky:#040c18;--score-grid-head:linear-gradient(180deg,#0b1b31,#071326);--score-grid-line:#446586;
  --score-mark:#fbf8ef;--score-mark-text:#fbf8ef;--score-note:#fbf8ef;--score-out:#f26359;--score-run:#62d487;
}
body.theme-custom.custom-classic.dark-mode{--score-grid-line:#806f53;--custom-line:#665b48}
body.theme-custom.custom-heritage.dark-mode{--score-grid-line:#7d704e;--custom-line:#5f664d;--custom-panel2:#102019}
body.theme-custom.dark-mode .app-shell{background:radial-gradient(circle at 50% 0,rgba(39,89,135,.10),transparent 30%),linear-gradient(180deg,#030914,#01050a)!important}
body.theme-custom.dark-mode .topbar{background:linear-gradient(180deg,#07172a,#040d19)!important}
body.theme-custom.dark-mode .drawer{background:linear-gradient(180deg,#071426,#030b16)!important}
body.theme-custom.dark-mode .game-info,
body.theme-custom.dark-mode .matchup-selector,
body.theme-custom.dark-mode .standings-overview,
body.theme-custom.dark-mode .team-scorebook{box-shadow:0 12px 26px rgba(0,0,0,.32)!important}

/* ---------- WRIGLEY: three clearly different presentations ---------- */















/* ---------- POSTSEASON: round identity escalation ---------- */
body.theme-postseason.playoff-wild-card:not(.dark-mode){
  --score-grid-bg:#13283b;--score-grid-sticky:#13283b;--score-grid-head:linear-gradient(180deg,#20384f,#172d42);--score-grid-line:#a2b1bf;
  --score-mark:#f5f8fa;--score-mark-text:#f5f8fa;
}
body.theme-postseason.playoff-wild-card:not(.dark-mode) .app-shell{
  background:
    repeating-linear-gradient(135deg,rgba(222,231,238,.035) 0 1px,transparent 1px 11px),
    linear-gradient(180deg,#102336,#071321)!important;
}
body.theme-postseason.playoff-wild-card:not(.dark-mode) .topbar{background:linear-gradient(180deg,#182e44,#102338)!important;border-bottom-color:#91a4b5!important}

body.theme-postseason.playoff-division-series:not(.dark-mode){
  --score-grid-bg:#0b2036;--score-grid-sticky:#0b2036;--score-grid-head:linear-gradient(180deg,#13304e,#0d253e);--score-grid-line:#c0994e;
}
body.theme-postseason.playoff-division-series:not(.dark-mode) .app-shell{
  background:
    linear-gradient(90deg,transparent 49%,rgba(223,174,77,.035) 50%,transparent 51%) 0 0/96px 96px,
    linear-gradient(180deg,#091b31,#04101f)!important;
}
body.theme-postseason.playoff-division-series:not(.dark-mode) .topbar{border-bottom:2px solid #ae8641!important}

body.theme-postseason.playoff-championship-series:not(.dark-mode){
  --score-grid-bg:#121c31;--score-grid-sticky:#121c31;--score-grid-head:linear-gradient(90deg,#172942,#4b252d,#172942);--score-grid-line:#c78660;
}
body.theme-postseason.playoff-championship-series:not(.dark-mode) .app-shell{
  background:radial-gradient(circle at 50% 0,rgba(180,54,58,.10),transparent 30%),linear-gradient(180deg,#10192b,#070d18)!important;
}
body.theme-postseason.playoff-championship-series:not(.dark-mode) .topbar{background:linear-gradient(90deg,#14263e,#56262e 50%,#14263e)!important;border-bottom-color:#bd7a53!important}

body.theme-postseason.playoff-world-series:not(.dark-mode){
  --score-grid-bg:#081726;--score-grid-sticky:#081726;--score-grid-head:linear-gradient(180deg,#132b43,#0b1b2c);--score-grid-line:#d5ae62;
  --score-mark:#fff8e8;--score-mark-text:#fff8e8;
}
body.theme-postseason.playoff-world-series:not(.dark-mode) .app-shell{
  background:
    radial-gradient(circle at 50% 0,rgba(239,199,111,.18),transparent 25%),
    radial-gradient(circle at 15% 15%,rgba(255,255,255,.025),transparent 12%),
    linear-gradient(180deg,#071421,#01070c)!important;
}
body.theme-postseason.playoff-world-series:not(.dark-mode) .topbar{
  background:linear-gradient(180deg,#0b1c2c,#05101a)!important;
  border-bottom:2px solid #d2a858!important;
  box-shadow:0 8px 24px rgba(0,0,0,.28),0 2px 18px rgba(210,168,88,.07)!important;
}
body.theme-postseason.playoff-world-series:not(.dark-mode) .team-scorebook,
body.theme-postseason.playoff-world-series:not(.dark-mode) .standings-overview{box-shadow:0 10px 26px rgba(0,0,0,.24),inset 0 0 0 1px rgba(255,236,191,.05)!important}

body.theme-postseason.dark-mode{
  --score-grid-bg:#020914;--score-grid-sticky:#020914;--score-grid-head:linear-gradient(180deg,#071427,#030d1b);--score-grid-line:#8e6d36;
  --score-mark:#fffaf0;--score-mark-text:#fffaf0;--score-note:#fffaf0;--score-run:#67dd8c;--score-out:#f46358;
}
body.theme-postseason.dark-mode .app-shell{background:radial-gradient(circle at 50% -5%,rgba(224,173,77,.09),transparent 26%),linear-gradient(180deg,#01050a,#000204)!important}
body.theme-postseason.dark-mode .topbar{background:linear-gradient(180deg,#030b15,#01050b)!important}
body.theme-postseason.dark-mode .team-scorebook,
body.theme-postseason.dark-mode .standings-overview,
body.theme-postseason.dark-mode .game-info,
body.theme-postseason.dark-mode .matchup-selector{box-shadow:0 14px 30px rgba(0,0,0,.38)!important}

/* ---------- Theme-aware editor controls: same layout, clearer identity ---------- */
body.theme-custom .play-card .quick-plays button,
body.theme-custom .play-card select,
body.theme-custom .play-card input{border-color:color-mix(in srgb,var(--custom-line) 78%,#fff 22%)}

body.theme-postseason .play-card .quick-plays button,
body.theme-postseason .play-card select,
body.theme-postseason .play-card input{border-color:color-mix(in srgb,var(--accent) 54%,#526476 46%)!important}
body.dark-mode .play-card .quick-plays button,
body.dark-mode .play-card select,
body.dark-mode .play-card input{background:color-mix(in srgb,var(--panel) 90%,#fff 3%)!important;color:var(--text)!important}

/* ---------- Mobile-specific theme polish without changing dimensions ---------- */
@media(max-width:600px){
  body.dark-mode .mobile-action-bar{box-shadow:0 -12px 28px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.035)}
  .theme-choice.active{box-shadow:0 7px 16px rgba(0,0,0,.16),inset 0 0 0 1px color-mix(in srgb,var(--accent) 52%,transparent)}
}


/* ==========================================================
   v20 SCORE-MARK DYNAMIC COLOR TUNING
   - baseline segments / neutral notations now follow theme + dark mode
   - red outs and green run markers stay semantically fixed
   ========================================================== */

/* Let neutral scoring marks follow the active palette instead of older static overrides */
body.theme-custom .play-entry .base.origin,body.theme-custom .play-entry .base.advance,body.theme-postseason .play-entry .base.origin,body.theme-postseason .play-entry .base.advance{
  stroke:var(--score-mark)!important;
}
body.theme-custom .play-entry .advance-reason-label,body.theme-postseason .play-entry .advance-reason-label{
  fill:var(--score-note)!important;
  stroke:var(--score-mark-outline)!important;
}
body.theme-custom .play-entry .play-code,body.theme-postseason .play-entry .play-code,body.theme-custom .event-marker,body.theme-postseason .event-marker{
  color:var(--score-mark-text)!important;
}
body.theme-custom .event-marker,body.theme-postseason .event-marker{
  background:color-mix(in srgb,var(--score-mark) 14%, transparent)!important;
  border:1px solid color-mix(in srgb,var(--score-mark) 18%, transparent)!important;
}

/* Default theme: light modes get dark marks, dark modes get light marks */
body.theme-custom.custom-modern:not(.dark-mode){
  --score-mark:#172738;
  --score-mark-text:#172738;
  --score-note:#172738;
  --score-mark-outline:rgba(255,255,255,.96);
}
body.theme-custom.custom-classic:not(.dark-mode){
  --score-mark:#f3ead4;
  --score-mark-text:#f3ead4;
  --score-note:#f3ead4;
  --score-mark-outline:rgba(7,16,28,.94);
}
body.theme-custom.custom-heritage:not(.dark-mode){
  --score-mark:#f3e5c6;
  --score-mark-text:#f3e5c6;
  --score-note:#f3e5c6;
  --score-mark-outline:rgba(10,18,14,.94);
}
body.theme-custom.dark-mode{
  --score-mark:#fbf8ef;
  --score-mark-text:#fbf8ef;
  --score-note:#fbf8ef;
  --score-mark-outline:rgba(4,10,18,.96);
}



/* ==========================================================
   v21 CUSTOM COLOR LEGIBILITY GUARDS
   - keeps custom theme text readable for a wider range of user color choices
   ========================================================== */
body.theme-custom .theme-choice.active::before{background:var(--custom-accent-safe,var(--accent))!important}
body.theme-custom .theme-choice.active{box-shadow:0 10px 18px rgba(0,0,0,.18), inset 0 0 0 1px color-mix(in srgb,var(--custom-accent-safe,var(--accent)) 54%, transparent)!important}
body.theme-custom .drawer-label::after,
body.theme-custom .drawer-section+.drawer-section::before{background:linear-gradient(90deg,color-mix(in srgb,var(--custom-accent-safe,var(--accent)) 28%,transparent),transparent)!important}
body.theme-custom #darkBtn,
body.theme-custom #focusBtn,
body.theme-custom .top-action,
body.theme-custom .top-icon{color:var(--text)!important;border-color:var(--line)!important}
body.theme-custom .theme-sub select,
body.theme-custom .theme-sub input[type=color],
body.theme-custom .drawer-tools>button,
body.theme-custom .import-button,
body.theme-custom .drawer-nav,
body.theme-custom .theme-choice{color:var(--text)!important}
body.theme-custom .theme-choice small,
body.theme-custom .drawer-nav small,
body.theme-custom .drawer-tools>button small{color:var(--muted)!important}
body.theme-custom .page-title,
body.theme-custom .team-header-name,
body.theme-custom .overview-title strong,
body.theme-custom .matchup-label,
body.theme-custom .game-field label,
body.theme-custom .standings-foot,
body.theme-custom .section-subtext{color:var(--text)!important}
body.theme-custom .game-field input,
body.theme-custom .matchup-team select,
body.theme-custom .pitch-table input,
body.theme-custom .notes-area,
body.theme-custom input,
body.theme-custom select,
body.theme-custom textarea{color:var(--text)!important}
body.theme-custom .theme-sub select,
body.theme-custom .theme-sub input[type=color]{border-color:var(--line)!important;background:color-mix(in srgb,var(--panel) 88%, #fff 4%)!important}
body.theme-custom .color-row label{color:var(--text)!important}
body.theme-custom.custom-modern:not(.dark-mode) .theme-sub select,
body.theme-custom.custom-modern:not(.dark-mode) .theme-sub input[type=color],
body.theme-custom.custom-modern:not(.dark-mode) .drawer-tools>button,
body.theme-custom.custom-modern:not(.dark-mode) .drawer-nav,
body.theme-custom.custom-modern:not(.dark-mode) .theme-choice{
  background:rgba(255,255,255,.28)!important;
}


/* ==========================================================
   v22 MENU READABILITY + LIVE THEME PREVIEW POLISH
   visual-only presentation changes
   ========================================================== */
.drawer{
  padding-bottom:calc(84px + env(safe-area-inset-bottom))!important;
  scrollbar-color:color-mix(in srgb,var(--accent) 48%,transparent) transparent;
}
.drawer::-webkit-scrollbar{width:6px}
.drawer::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--accent) 42%,transparent);border-radius:8px}
.drawer-section{padding:12px 0!important}
.drawer-section:first-of-type{padding-top:8px!important}
.drawer-label{font-size:9.5px!important;line-height:1.1;color:var(--muted)!important}
.drawer-nav,.theme-choice,.drawer-tools>button,.import-button{
  min-height:50px!important;
  padding:8px 10px!important;
}
.drawer-nav+.drawer-nav,.theme-choice+.theme-sub+.theme-choice,.drawer-tools>button+.drawer-tools>button{margin-top:5px}
.drawer-nav span:nth-child(2),.drawer-tools>button span:nth-child(2),.import-button span:nth-child(2){font-size:11px!important}
.theme-choice strong{font-size:11.4px!important;line-height:1.15}
.theme-choice small{font-size:7.8px!important;line-height:1.25;margin-top:2px;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.theme-choice{align-items:center!important}
.theme-swatch{flex:none;transition:background .18s ease,filter .18s ease,box-shadow .18s ease!important}
.theme-choice.active .theme-swatch{box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 0 0 2px color-mix(in srgb,var(--accent) 28%,transparent),0 7px 16px rgba(0,0,0,.20)!important}
.theme-sub{margin-top:6px!important;margin-bottom:10px!important}
.theme-sub label{font-size:8.4px!important}
.theme-sub select{font-size:10px!important;padding-right:28px!important}
.color-row input[type=color]{height:38px!important}
.drawer-tools{padding-bottom:20px!important}
body.dark-mode .theme-swatch{filter:saturate(.92) brightness(.92)}
@media(max-width:600px){
  .drawer{width:min(294px,82vw)!important;padding-left:12px!important;padding-right:12px!important}
  .drawer-head{padding-bottom:10px!important}
  .drawer-head strong{font-size:19px!important}
  .drawer-section{padding:10px 0!important}
  .drawer-nav,.theme-choice,.drawer-tools>button,.import-button{min-height:46px!important;padding:7px 8px!important}
  .theme-choice{grid-template-columns:42px minmax(0,1fr) 18px!important;gap:8px!important}
  .theme-swatch{width:38px!important;height:38px!important}
  .theme-choice strong{font-size:10.5px!important}
  .theme-choice small{font-size:7.3px!important}
  .theme-sub{margin-left:6px!important;padding:8px!important}
  .theme-sub select,.theme-sub input[type=color]{min-height:34px!important}
}


/* v23 preset-based default theme */
.custom-sub{display:grid;gap:10px}.custom-sub .color-row{display:none!important}
.custom-sub select{width:100%}


/* v24 curated Default palette polish */
body.theme-custom .custom-sub label:first-child select{
  font-weight:900;
  letter-spacing:.01em;
}
body.theme-custom .custom-sub label:first-child::after{
  content:"Four balanced presets tuned for readable score marks and cohesive panels.";
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:6.8px;
  font-weight:700;
  letter-spacing:.01em;
  line-height:1.25;
}


/* ==========================================================
   v25 WRIGLEY BASE-SEGMENT VISIBILITY FIX
   The previous self-referential score-mark variables could resolve invalid,
   causing SVG paths to fall back to no stroke. These are explicit on purpose.
   ========================================================== */



@media(max-width:600px){
  
}


/* ==========================================================
   v28 DEFAULT THEME COHESION PASS
   Subthemes may change typography/depth, but the selected palette owns color.
   ========================================================== */
body.theme-custom{
  --bg:var(--custom-bg)!important;
  --panel:var(--custom-panel)!important;
  --panel2:var(--custom-panel2)!important;
  --line:var(--custom-line)!important;
  --accent:var(--custom-accent-safe,var(--custom-accent))!important;
  --selected:var(--custom-selected)!important;
  --text:var(--custom-text)!important;
  --muted:var(--custom-muted)!important;
  --score-grid-bg:var(--custom-grid)!important;
  --score-grid-sticky:var(--custom-grid-sticky)!important;
  --score-grid-head:var(--custom-grid-head)!important;
  --score-grid-line:var(--custom-grid-line)!important;
  --score-mark:var(--custom-score-mark)!important;
  --score-mark-text:var(--custom-score-mark)!important;
  --score-note:var(--custom-score-mark)!important;
  --score-mark-outline:var(--custom-score-outline)!important;
}
body.theme-custom,
body.theme-custom .app-shell{
  background:linear-gradient(180deg,var(--custom-bg),var(--custom-bg2))!important;
  color:var(--custom-text)!important;
}
body.theme-custom .topbar{
  background:linear-gradient(180deg,var(--custom-header),color-mix(in srgb,var(--custom-header) 88%,#000 12%))!important;
  color:var(--custom-text)!important;
  border-bottom-color:var(--custom-line)!important;
}
body.theme-custom .game-info,
body.theme-custom .matchup-selector,
body.theme-custom .standings-overview,
body.theme-custom .team-scorebook,
body.theme-custom .card{
  background:var(--custom-panel)!important;
  border-color:var(--custom-line)!important;
  color:var(--custom-text)!important;
}
body.theme-custom .game-field,
body.theme-custom .matchup-team,
body.theme-custom .matchup-selector .versus-mark,
body.theme-custom .overview-title,
body.theme-custom .standings-card,
body.theme-custom .team-scorebook-head,
body.theme-custom .team-scorebook-body,
body.theme-custom .live-game-bar{
  background:var(--custom-panel2)!important;
  border-color:var(--custom-line)!important;
  color:var(--custom-text)!important;
}
body.theme-custom .live-game-bar{
  background:linear-gradient(180deg,var(--custom-header),var(--custom-panel2))!important;
  box-shadow:0 7px 18px rgba(0,0,0,.20)!important;
}
body.theme-custom .team-scorebook-head,
body.theme-custom .overview-title{
  background:linear-gradient(180deg,var(--custom-panel2),color-mix(in srgb,var(--custom-panel2) 90%,#000 10%))!important;
}
body.theme-custom .unified-score-table td,
body.theme-custom .full-width-pitch .pitch-table td,
body.theme-custom .team-scorebook-canvas,
body.theme-custom .team-left-stack,
body.theme-custom .lineup-pane,
body.theme-custom .pitch-pane,
body.theme-custom .scoring-pane{
  background:var(--custom-grid)!important;
  color:var(--custom-text)!important;
  border-color:var(--custom-grid-line)!important;
}
body.theme-custom .unified-score-table thead th,
body.theme-custom .unified-score-table .sticky-lineup-banner,
body.theme-custom .unified-score-table .sticky-totals-label,
body.theme-custom .unified-score-table .unified-totals-row td,
body.theme-custom .full-width-pitch .pane-title,
body.theme-custom .full-width-pitch .pitch-table th,
body.theme-custom .standings-grid .head,
body.theme-custom .standings-head{
  background:var(--custom-grid-head)!important;
  color:var(--custom-text)!important;
  border-color:var(--custom-grid-line)!important;
}
body.theme-custom .unified-score-table tbody .sticky-ord,
body.theme-custom .unified-score-table tbody .sticky-player,
body.theme-custom .unified-score-table tbody .sticky-pos,
body.theme-custom .standings-grid>div,
body.theme-custom .standings-foot{
  background:var(--custom-grid-sticky)!important;
  color:var(--custom-text)!important;
  border-color:var(--custom-grid-line)!important;
}
body.theme-custom .unified-score-table .play-cell.active-inning-col,
body.theme-custom .unified-score-table .active-inning-col{
  background:color-mix(in srgb,var(--custom-grid) 82%,var(--custom-accent-safe) 18%)!important;
}
body.theme-custom .unified-score-table .score-head-inning.active-inning-col{
  background:var(--custom-accent-safe)!important;
  color:var(--custom-accent-ink)!important;
}
body.theme-custom .play-entry .base.origin,
body.theme-custom .play-entry .base.advance{stroke:var(--custom-score-mark)!important}
body.theme-custom .play-entry .advance-reason-label{fill:var(--custom-score-mark)!important;stroke:var(--custom-score-outline)!important}
body.theme-custom .play-entry .play-code,
body.theme-custom .play-entry.runner-out .play-code{color:var(--custom-score-mark)!important;text-shadow:0 1px 1px rgba(0,0,0,.48)!important}
body.theme-custom .drawer{
  background:linear-gradient(180deg,var(--custom-drawer),var(--custom-drawer2))!important;
  border-color:var(--custom-line)!important;color:var(--custom-text)!important;
}
body.theme-custom .drawer-nav,
body.theme-custom .theme-choice,
body.theme-custom .drawer-tools>button,
body.theme-custom .import-button,
body.theme-custom .theme-sub{
  background:color-mix(in srgb,var(--custom-panel) 88%,var(--custom-accent-safe) 12%)!important;
  border-color:var(--custom-line)!important;color:var(--custom-text)!important;
}
body.theme-custom .theme-choice.active,
body.theme-custom .drawer-nav.active{
  background:color-mix(in srgb,var(--custom-panel) 72%,var(--custom-accent-safe) 28%)!important;
}
body.theme-custom .theme-sub select,
body.theme-custom .theme-sub input{
  background:var(--custom-grid)!important;color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom .mobile-action-bar{
  background:linear-gradient(180deg,var(--custom-header),color-mix(in srgb,var(--custom-header) 84%,#000 16%))!important;
  border-top-color:var(--custom-line)!important;color:var(--custom-text)!important;
}
body.theme-custom .mobile-action-bar button,
body.theme-custom .mobile-action-bar small{color:var(--custom-text)!important}
body.theme-custom .mobile-action-bar .danger-quick span,
body.theme-custom .mobile-action-bar .danger-quick small{color:#ef7169!important}
body.theme-custom .modal-card,
body.theme-custom .play-card,
body.theme-custom .settings-card{
  background:var(--custom-panel)!important;color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom .play-card .situation,
body.theme-custom .play-card .quick-plays button,
body.theme-custom .play-card input,
body.theme-custom .play-card select,
body.theme-custom .modal-actions button{
  background:var(--custom-grid)!important;color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom .play-card .modal-actions .primary{
  background:var(--custom-accent-safe)!important;color:var(--custom-accent-ink)!important;
}
/* Style choices keep character without changing palette hue. */
body.theme-custom.custom-modern .topbar h1,
body.theme-custom.custom-modern .team-header-name,
body.theme-custom.custom-modern .overview-title strong{font-family:Inter,system-ui,sans-serif!important}
body.theme-custom.custom-modern .card,
body.theme-custom.custom-modern .team-scorebook{box-shadow:0 7px 18px rgba(0,0,0,.13)!important}
body.theme-custom.custom-classic .topbar h1,
body.theme-custom.custom-classic .team-header-name,
body.theme-custom.custom-classic .overview-title strong{font-family:Georgia,"Times New Roman",serif!important}
body.theme-custom.custom-classic .card,
body.theme-custom.custom-classic .team-scorebook{box-shadow:0 9px 22px rgba(0,0,0,.20),inset 0 0 0 1px color-mix(in srgb,var(--custom-accent-safe) 10%,transparent)!important}
body.theme-custom.custom-heritage .topbar h1,
body.theme-custom.custom-heritage .team-header-name,
body.theme-custom.custom-heritage .overview-title strong{font-family:Georgia,"Times New Roman",serif!important;letter-spacing:.025em}
body.theme-custom.custom-heritage .card,
body.theme-custom.custom-heritage .team-scorebook{box-shadow:0 8px 22px rgba(0,0,0,.18),inset 0 0 0 1px color-mix(in srgb,var(--custom-accent-safe) 16%,transparent)!important}




/* ==========================================================
   v29 DEFAULT PALETTE OWNERSHIP — verified cascade fix
   The chosen palette owns every Default-theme surface. Generic Style may
   change typography/depth only; it cannot inject blue/green/white colors.
   ========================================================== */
body.theme-custom.custom-modern,
body.theme-custom.custom-classic,
body.theme-custom.custom-heritage{
  --bg:var(--custom-bg)!important;
  --panel:var(--custom-panel)!important;
  --panel2:var(--custom-panel2)!important;
  --line:var(--custom-line)!important;
  --accent:var(--custom-accent-safe)!important;
  --selected:var(--custom-selected)!important;
  --text:var(--custom-text)!important;
  --muted:var(--custom-muted)!important;
  --score-grid-bg:var(--custom-grid)!important;
  --score-grid-sticky:var(--custom-grid-sticky)!important;
  --score-grid-head:var(--custom-grid-head)!important;
  --score-grid-line:var(--custom-grid-line)!important;
  --score-mark:var(--custom-score-mark)!important;
  --score-mark-text:var(--custom-score-mark)!important;
  --score-note:var(--custom-score-mark)!important;
  --score-mark-outline:var(--custom-score-outline)!important;
}
body.theme-custom.custom-modern .app-shell,
body.theme-custom.custom-classic .app-shell,
body.theme-custom.custom-heritage .app-shell{
  background:linear-gradient(180deg,var(--custom-bg),var(--custom-bg2))!important;
  color:var(--custom-text)!important;
}
body.theme-custom.custom-modern .topbar,
body.theme-custom.custom-classic .topbar,
body.theme-custom.custom-heritage .topbar{
  background:linear-gradient(180deg,var(--custom-header),color-mix(in srgb,var(--custom-header) 88%,#000 12%))!important;
  color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern .game-info,
body.theme-custom.custom-modern .matchup-selector,
body.theme-custom.custom-modern .standings-overview,
body.theme-custom.custom-modern .team-scorebook,
body.theme-custom.custom-classic .game-info,
body.theme-custom.custom-classic .matchup-selector,
body.theme-custom.custom-classic .standings-overview,
body.theme-custom.custom-classic .team-scorebook,
body.theme-custom.custom-heritage .game-info,
body.theme-custom.custom-heritage .matchup-selector,
body.theme-custom.custom-heritage .standings-overview,
body.theme-custom.custom-heritage .team-scorebook{
  background:var(--custom-panel)!important;color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern .game-field,
body.theme-custom.custom-modern .matchup-team,
body.theme-custom.custom-modern .matchup-selector .versus-mark,
body.theme-custom.custom-modern .standings-card,
body.theme-custom.custom-modern .team-scorebook-head,
body.theme-custom.custom-modern .team-scorebook-body,
body.theme-custom.custom-modern .overview-title,
body.theme-custom.custom-classic .game-field,
body.theme-custom.custom-classic .matchup-team,
body.theme-custom.custom-classic .matchup-selector .versus-mark,
body.theme-custom.custom-classic .standings-card,
body.theme-custom.custom-classic .team-scorebook-head,
body.theme-custom.custom-classic .team-scorebook-body,
body.theme-custom.custom-classic .overview-title,
body.theme-custom.custom-heritage .game-field,
body.theme-custom.custom-heritage .matchup-team,
body.theme-custom.custom-heritage .matchup-selector .versus-mark,
body.theme-custom.custom-heritage .standings-card,
body.theme-custom.custom-heritage .team-scorebook-head,
body.theme-custom.custom-heritage .team-scorebook-body,
body.theme-custom.custom-heritage .overview-title{
  background:var(--custom-panel2)!important;color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern .live-game-bar,
body.theme-custom.custom-classic .live-game-bar,
body.theme-custom.custom-heritage .live-game-bar{
  background:linear-gradient(180deg,var(--custom-header),var(--custom-panel2))!important;
  color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern .unified-score-table td,
body.theme-custom.custom-modern .full-width-pitch .pitch-table td,
body.theme-custom.custom-modern .team-scorebook-canvas,
body.theme-custom.custom-modern .team-left-stack,
body.theme-custom.custom-modern .lineup-pane,
body.theme-custom.custom-modern .pitch-pane,
body.theme-custom.custom-modern .scoring-pane,
body.theme-custom.custom-classic .unified-score-table td,
body.theme-custom.custom-classic .full-width-pitch .pitch-table td,
body.theme-custom.custom-classic .team-scorebook-canvas,
body.theme-custom.custom-classic .team-left-stack,
body.theme-custom.custom-classic .lineup-pane,
body.theme-custom.custom-classic .pitch-pane,
body.theme-custom.custom-classic .scoring-pane,
body.theme-custom.custom-heritage .unified-score-table td,
body.theme-custom.custom-heritage .full-width-pitch .pitch-table td,
body.theme-custom.custom-heritage .team-scorebook-canvas,
body.theme-custom.custom-heritage .team-left-stack,
body.theme-custom.custom-heritage .lineup-pane,
body.theme-custom.custom-heritage .pitch-pane,
body.theme-custom.custom-heritage .scoring-pane{
  background:var(--custom-grid)!important;color:var(--custom-text)!important;border-color:var(--custom-grid-line)!important;
}
body.theme-custom.custom-modern .unified-score-table thead th,
body.theme-custom.custom-modern .unified-score-table .sticky-lineup-banner,
body.theme-custom.custom-modern .unified-score-table .sticky-totals-label,
body.theme-custom.custom-modern .unified-score-table .unified-totals-row td,
body.theme-custom.custom-modern .full-width-pitch .pane-title,
body.theme-custom.custom-modern .full-width-pitch .pitch-table th,
body.theme-custom.custom-modern .standings-grid .head,
body.theme-custom.custom-modern .standings-head,
body.theme-custom.custom-classic .unified-score-table thead th,
body.theme-custom.custom-classic .unified-score-table .sticky-lineup-banner,
body.theme-custom.custom-classic .unified-score-table .sticky-totals-label,
body.theme-custom.custom-classic .unified-score-table .unified-totals-row td,
body.theme-custom.custom-classic .full-width-pitch .pane-title,
body.theme-custom.custom-classic .full-width-pitch .pitch-table th,
body.theme-custom.custom-classic .standings-grid .head,
body.theme-custom.custom-classic .standings-head,
body.theme-custom.custom-heritage .unified-score-table thead th,
body.theme-custom.custom-heritage .unified-score-table .sticky-lineup-banner,
body.theme-custom.custom-heritage .unified-score-table .sticky-totals-label,
body.theme-custom.custom-heritage .unified-score-table .unified-totals-row td,
body.theme-custom.custom-heritage .full-width-pitch .pane-title,
body.theme-custom.custom-heritage .full-width-pitch .pitch-table th,
body.theme-custom.custom-heritage .standings-grid .head,
body.theme-custom.custom-heritage .standings-head{
  background:var(--custom-grid-head)!important;color:var(--custom-text)!important;border-color:var(--custom-grid-line)!important;
}
body.theme-custom.custom-modern .unified-score-table tbody .sticky-ord,
body.theme-custom.custom-modern .unified-score-table tbody .sticky-player,
body.theme-custom.custom-modern .unified-score-table tbody .sticky-pos,
body.theme-custom.custom-modern .standings-grid>div,
body.theme-custom.custom-modern .standings-foot,
body.theme-custom.custom-classic .unified-score-table tbody .sticky-ord,
body.theme-custom.custom-classic .unified-score-table tbody .sticky-player,
body.theme-custom.custom-classic .unified-score-table tbody .sticky-pos,
body.theme-custom.custom-classic .standings-grid>div,
body.theme-custom.custom-classic .standings-foot,
body.theme-custom.custom-heritage .unified-score-table tbody .sticky-ord,
body.theme-custom.custom-heritage .unified-score-table tbody .sticky-player,
body.theme-custom.custom-heritage .unified-score-table tbody .sticky-pos,
body.theme-custom.custom-heritage .standings-grid>div,
body.theme-custom.custom-heritage .standings-foot{
  background:var(--custom-grid-sticky)!important;color:var(--custom-text)!important;border-color:var(--custom-grid-line)!important;
}
body.theme-custom.custom-modern .drawer,
body.theme-custom.custom-classic .drawer,
body.theme-custom.custom-heritage .drawer{
  background:linear-gradient(180deg,var(--custom-drawer),var(--custom-drawer2))!important;
  color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern .mobile-action-bar,
body.theme-custom.custom-classic .mobile-action-bar,
body.theme-custom.custom-heritage .mobile-action-bar{
  background:linear-gradient(180deg,var(--custom-header),color-mix(in srgb,var(--custom-header) 82%,#000 18%))!important;
  color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern .modal-card,
body.theme-custom.custom-classic .modal-card,
body.theme-custom.custom-heritage .modal-card{
  background:var(--custom-panel)!important;color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
/* Current inning is a palette accent, not a foreign hue. */
body.theme-custom.custom-modern .unified-score-table .play-cell.active-inning-col,
body.theme-custom.custom-classic .unified-score-table .play-cell.active-inning-col,
body.theme-custom.custom-heritage .unified-score-table .play-cell.active-inning-col{
  background:color-mix(in srgb,var(--custom-grid) 80%,var(--custom-accent-safe) 20%)!important;
}
body.theme-custom.custom-modern .unified-score-table .score-head-inning.active-inning-col,
body.theme-custom.custom-classic .unified-score-table .score-head-inning.active-inning-col,
body.theme-custom.custom-heritage .unified-score-table .score-head-inning.active-inning-col{
  background:var(--custom-accent-safe)!important;color:var(--custom-accent-ink)!important;
}
/* Neutral score marks use one color per palette; red/green semantics stay fixed. */
body.theme-custom.custom-modern .play-entry .base.origin,
body.theme-custom.custom-modern .play-entry .base.advance,
body.theme-custom.custom-classic .play-entry .base.origin,
body.theme-custom.custom-classic .play-entry .base.advance,
body.theme-custom.custom-heritage .play-entry .base.origin,
body.theme-custom.custom-heritage .play-entry .base.advance{stroke:var(--custom-score-mark)!important}
body.theme-custom.custom-modern .play-entry .play-code,
body.theme-custom.custom-classic .play-entry .play-code,
body.theme-custom.custom-heritage .play-entry .play-code{color:var(--custom-score-mark)!important}


/* v29 specificity guard against legacy :not(.dark-mode) Default rules. */
body.theme-custom.custom-modern:not(.dark-mode) .app-shell,
body.theme-custom.custom-classic:not(.dark-mode) .app-shell,
body.theme-custom.custom-heritage:not(.dark-mode) .app-shell,
body.theme-custom.custom-modern.dark-mode .app-shell,
body.theme-custom.custom-classic.dark-mode .app-shell,
body.theme-custom.custom-heritage.dark-mode .app-shell{
  background:linear-gradient(180deg,var(--custom-bg),var(--custom-bg2))!important;
  color:var(--custom-text)!important;
}
body.theme-custom.custom-modern:not(.dark-mode) .topbar,
body.theme-custom.custom-classic:not(.dark-mode) .topbar,
body.theme-custom.custom-heritage:not(.dark-mode) .topbar,
body.theme-custom.custom-modern.dark-mode .topbar,
body.theme-custom.custom-classic.dark-mode .topbar,
body.theme-custom.custom-heritage.dark-mode .topbar{
  background:linear-gradient(180deg,var(--custom-header),color-mix(in srgb,var(--custom-header) 88%,#000 12%))!important;
  color:var(--custom-text)!important;border-color:var(--custom-line)!important;
}
body.theme-custom.custom-modern:not(.dark-mode) .drawer,
body.theme-custom.custom-classic:not(.dark-mode) .drawer,
body.theme-custom.custom-heritage:not(.dark-mode) .drawer,
body.theme-custom.custom-modern.dark-mode .drawer,
body.theme-custom.custom-classic.dark-mode .drawer,
body.theme-custom.custom-heritage.dark-mode .drawer{
  background:linear-gradient(180deg,var(--custom-drawer),var(--custom-drawer2))!important;
  color:var(--custom-text)!important;border-color:var(--custom-line)!important;filter:none!important;
}
body.theme-custom.custom-modern:not(.dark-mode) .card,
body.theme-custom.custom-classic:not(.dark-mode) .card,
body.theme-custom.custom-heritage:not(.dark-mode) .card,
body.theme-custom.custom-modern.dark-mode .card,
body.theme-custom.custom-classic.dark-mode .card,
body.theme-custom.custom-heritage.dark-mode .card{
  border-color:var(--custom-line)!important;color:var(--custom-text)!important;
}


/* ==========================================================
   v30 SCORING EDITOR + PITCHING REFINEMENT
   ========================================================== */
.play-card .editor-section-title{
  margin:12px 0 7px;padding-top:10px;border-top:1px solid color-mix(in srgb,var(--line) 72%,transparent);
  font-size:8px;font-weight:950;letter-spacing:.15em;color:var(--muted);
}
.play-card .situation + .editor-section-title{border-top:0;padding-top:0;margin-top:12px}
.play-card .field-help{display:block;margin-top:2px;font-size:6.5px;font-weight:700;letter-spacing:.02em;color:var(--muted);text-transform:none}
.play-card .editor-grid label{min-width:0}
.play-card #outResult,.play-card #advanceReason{font-weight:850;letter-spacing:.02em}
.play-card .modal-actions{margin-top:14px}
.quick-label,.quick-plays{display:none!important}

.full-width-pitch .pane-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
.add-pitcher-btn{
  width:28px;height:28px;min-width:28px;padding:0;border:1px solid currentColor;border-radius:999px;background:transparent;color:inherit;
  font-size:18px;font-weight:850;line-height:1;display:grid;place-items:center;opacity:.9;
}
.add-pitcher-btn:active{transform:scale(.95)}

.play-entry .play-code.notation-compact{font-size:7.4px!important;max-width:40%;line-height:.95;text-align:right}
.play-entry .play-code.notation-tiny{font-size:6.2px!important;max-width:44%;line-height:.92;text-align:right}
.play-entry .rbi-code.notation-compact{font-size:5.8px!important;max-width:42%;line-height:.95;text-align:right}
.play-entry .rbi-code.notation-tiny{font-size:5px!important;max-width:44%;line-height:.92;text-align:right}
.play-entry .standalone-out.notation-compact{font-size:17px!important}
.play-entry .standalone-out.notation-tiny{font-size:14px!important}

@media(max-width:600px){
  .play-card .editor-section-title{font-size:7.5px;margin-top:10px}
  .play-card .field-help{font-size:6px}
  .play-card .editor-grid{gap:8px!important}
  .add-pitcher-btn{width:26px;height:26px;min-width:26px;font-size:16px}
  .play-entry .play-code.notation-compact{font-size:6.8px!important}
  .play-entry .play-code.notation-tiny{font-size:5.7px!important}
  .play-entry .rbi-code{right:2px!important;top:2px!important}
  .play-entry .rbi-code.notation-compact{font-size:5.3px!important}
  .play-entry .rbi-code.notation-tiny{font-size:4.7px!important}
}


/* ==========================================================
   v31 APPLICATION EXPERIENCE REFINEMENT
   Presentation + workflow polish only; scoring geometry retained.
   ========================================================== */
html{background:var(--bg);-webkit-text-size-adjust:100%}
body{min-height:100dvh;-webkit-tap-highlight-color:transparent}
.app-shell{min-height:100dvh}
button,.play-cell,.player-cell,select,input{-webkit-touch-callout:none}

/* Persistent status / final state */
.live-game-bar{position:sticky;top:0;z-index:24;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.live-game-bar.is-final .live-inning strong{letter-spacing:.12em}
.game-complete{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:12px 14px;border-color:color-mix(in srgb,var(--accent) 70%,var(--line));background:color-mix(in srgb,var(--panel2) 88%,var(--accent) 7%)}
.game-complete>div:first-child{display:grid;gap:3px}.game-complete small{font-size:8px;font-weight:950;letter-spacing:.15em;color:var(--muted)}.game-complete strong{font-size:14px}.game-complete-actions{display:flex;gap:7px}.game-complete-actions button{min-height:38px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);font-weight:900}

/* Current scoring state */
.unified-score-table .current-batter .sticky-ord,
.unified-score-table .current-batter .sticky-player,
.unified-score-table .current-batter .sticky-pos{box-shadow:inset 3px 0 0 color-mix(in srgb,var(--accent) 75%,transparent);background:color-mix(in srgb,var(--selected) 22%,var(--score-grid-sticky))!important}
.unified-score-table .score-head-inning.active-inning-col{box-shadow:inset 0 -3px 0 var(--accent)}
.play-cell:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;z-index:4}

/* App-like motion */
.card,.team-scorebook-head,.drawer,.modal-card,.mobile-action-bar button{transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,opacity .16s ease}
.play-cell.flash-update{animation:cellPulse .42s ease}
@keyframes cellPulse{0%{box-shadow:inset 0 0 0 0 color-mix(in srgb,var(--accent) 60%,transparent)}45%{box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--accent) 60%,transparent)}100%{box-shadow:inset 0 0 0 0 transparent}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* Native-style mobile sheets */
.sheet-handle,.modal-card::before{content:"";display:none}
@media(max-width:600px){
  .modal-card{will-change:transform;touch-action:pan-y}
  .modal-card::before{display:block;position:sticky;top:-8px;z-index:5;width:42px;height:5px;margin:-4px auto 7px;border-radius:99px;background:color-mix(in srgb,var(--text) 36%,transparent)}
  .modal-card.sheet-dragging{transition:none!important}
  .modal-head{touch-action:none}
  .play-card{max-height:94dvh!important}
  .confirm-card{max-height:none!important;padding-bottom:calc(18px + env(safe-area-inset-bottom))!important}
  .confirm-card .modal-head small{display:block;max-width:290px;font-size:12px;line-height:1.35;margin-top:5px;color:var(--muted)}
  .shortcut-card{max-height:72dvh!important}
}

/* Mobile action bar */
.mobile-action-bar{min-height:64px;padding-top:4px!important}
.mobile-action-bar button{min-width:0;position:relative;overflow:hidden}
.mobile-action-bar button.is-active{background:color-mix(in srgb,var(--selected) 42%,transparent)!important;box-shadow:inset 0 2px 0 var(--accent)}
.mobile-action-bar button:active{transform:scale(.97)}
.mobile-action-bar .danger-quick::after{content:"";position:absolute;left:8px;right:8px;bottom:2px;height:2px;transform:scaleX(0);transform-origin:left;border-radius:2px;background:#e36d66}
.mobile-action-bar .danger-quick.holding::after{animation:holdClear .65s linear forwards}
@keyframes holdClear{to{transform:scaleX(1)}}

/* Touch forgiveness without visually enlarging cells */
@media(pointer:coarse){
  .play-cell,.player-cell,.section-collapse,.add-pitcher-btn{touch-action:manipulation}
  .play-cell{cursor:pointer}
  .section-collapse,.add-pitcher-btn,.top-icon,.top-action{min-width:44px;min-height:44px}
}

/* More systematic text fitting */
.team-header-name,.matchup-team select,.player-main,.pitcher-name input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.play-entry .play-code,.play-entry .rbi-code,.standalone-out{font-size:clamp(5px,1.7vw,11px)}
.play-entry .play-code.notation-compact{font-size:clamp(5.8px,1.4vw,8px)!important}.play-entry .play-code.notation-tiny{font-size:clamp(5px,1.2vw,6.8px)!important}.play-entry .rbi-code.notation-compact{font-size:clamp(4.8px,1.15vw,6.2px)!important}.play-entry .rbi-code.notation-tiny{font-size:clamp(4.2px,1vw,5.4px)!important}

/* Shortcut / confirmation sheets */
.shortcut-grid{display:grid;grid-template-columns:max-content 1fr;gap:10px 14px;align-items:center;padding:8px 2px}.shortcut-grid kbd{min-width:80px;padding:6px 8px;border:1px solid var(--line);border-bottom-width:3px;border-radius:7px;background:var(--panel2);color:var(--text);font-size:11px;font-weight:900;text-align:center}.shortcut-grid span{font-size:12px;color:var(--muted)}
.confirm-actions .danger{color:#ff837b!important;border-color:rgba(226,83,73,.5)!important}

/* Desktop becomes a true workspace */
@media(min-width:1100px){
  main{max-width:1580px!important;padding-left:20px!important;padding-right:20px!important}
  .unified-score-table{--ord-w:30px;--player-w:180px;--pos-w:44px;--inning-w:82px;--stat-w:62px;width:1510px!important;min-width:1510px!important}
  .team-scorebook-scroll{scrollbar-gutter:stable}
  body.has-play-inspector main{padding-right:470px!important;transition:padding-right .18s ease}
  #playModal:not(.hidden){display:block!important;position:fixed;inset:0 0 0 auto;width:450px;background:transparent!important;pointer-events:none;z-index:120;padding:0!important}
  #playModal .play-card{pointer-events:auto;width:450px!important;max-width:450px!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:18px 0 0 18px!important;overflow-y:auto!important;padding:18px!important;box-shadow:-18px 0 42px rgba(0,0,0,.34)!important}
  #playModal .modal-head{position:sticky;top:-18px;z-index:5;padding:14px 0;background:inherit}
  #playModal .modal-actions{position:sticky;bottom:-18px;background:inherit;padding:12px 0 18px}
  .play-cell[title]{position:relative}
  .play-cell:hover{z-index:3}
  .player-cell:hover{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 62%,transparent)}
}

/* Installed PWA safe areas */
@media(display-mode:standalone),(display-mode:fullscreen){
  .topbar{padding-top:calc(12px + env(safe-area-inset-top))}
  .mobile-action-bar{padding-bottom:calc(5px + env(safe-area-inset-bottom))!important}
  body::after{content:"";position:fixed;left:0;right:0;bottom:0;height:env(safe-area-inset-bottom);pointer-events:none;background:color-mix(in srgb,var(--panel2) 96%,#000);z-index:109}
}


/* ==========================================================
   v32 LAUNCH HOME + MOTION SYSTEM
   ========================================================== */
body.home-page{overflow-x:hidden;background:var(--bg)}
body.home-page .topbar,body.home-page #mobileActionBar{display:none!important}
body.home-page main{max-width:none!important;padding:0!important;margin:0!important}
body.home-page .wrigley-footer{display:none!important}

.launch-home{position:relative;min-height:100dvh;overflow:hidden;background:linear-gradient(160deg,var(--bg),color-mix(in srgb,var(--panel2) 90%,#000));color:var(--text);isolation:isolate}
.launch-home::before{content:"";position:absolute;inset:0;z-index:-3;background:radial-gradient(circle at 50% -10%,color-mix(in srgb,var(--accent) 18%,transparent),transparent 38%),linear-gradient(180deg,transparent 60%,rgba(0,0,0,.22));animation:stadiumGlow 7s ease-in-out infinite alternate}
.launch-home::after{content:"";position:absolute;inset:0;z-index:-2;opacity:.16;background-image:linear-gradient(color-mix(in srgb,var(--line) 25%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--line) 20%,transparent) 1px,transparent 1px);background-size:52px 52px;mask-image:linear-gradient(to bottom,#000,transparent 70%);animation:gridDrift 20s linear infinite}
.launch-bg{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.launch-bg i{position:absolute;width:360px;height:360px;border-radius:50%;filter:blur(80px);opacity:.10;background:var(--accent);animation:orbFloat 14s ease-in-out infinite}
.launch-bg i:nth-child(1){left:-120px;top:8%}.launch-bg i:nth-child(2){right:-140px;top:35%;animation-delay:-5s}.launch-bg i:nth-child(3){left:35%;bottom:-180px;animation-delay:-9s}
.launch-inner{width:min(1120px,calc(100% - 34px));min-height:100dvh;margin:0 auto;padding:clamp(42px,8vh,86px) 0 calc(34px + env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);grid-template-areas:"brand game" "actions game" "footer footer";gap:26px 38px;align-content:center}
.launch-brand{grid-area:brand;max-width:620px;animation:launchReveal .75s cubic-bezier(.2,.8,.2,1) both}.launch-brand small{display:block;margin:12px 0 9px;font-size:11px;font-weight:950;letter-spacing:.22em;color:var(--accent)}.launch-brand h1{margin:0;font-family:"Baskerville Old Face","Palatino Linotype",Georgia,serif;font-size:clamp(52px,7vw,88px);line-height:.95;letter-spacing:-.02em;text-shadow:0 8px 34px rgba(0,0,0,.24)}.launch-brand p{max-width:540px;margin:18px 0 0;font-size:16px;line-height:1.55;color:var(--muted)}
.launch-diamond{width:58px;height:58px;display:grid;place-items:center;transform:rotate(45deg);border:3px solid var(--accent);border-radius:9px;box-shadow:0 0 0 7px color-mix(in srgb,var(--accent) 7%,transparent),0 12px 28px rgba(0,0,0,.22);animation:diamondIntro .9s cubic-bezier(.2,.85,.2,1) both,diamondFloat 4.5s ease-in-out 1.1s infinite}.launch-diamond span{width:17px;height:17px;border-radius:50%;background:var(--accent);box-shadow:0 0 22px color-mix(in srgb,var(--accent) 72%,transparent)}
.launch-game-card{grid-area:game;align-self:center;padding:20px;border:1px solid color-mix(in srgb,var(--line) 82%,var(--accent) 18%);border-radius:26px;background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 92%,#fff 3%),color-mix(in srgb,var(--panel) 96%,#000 4%));box-shadow:0 26px 60px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.04);backdrop-filter:blur(18px);animation:cardRise .8s .12s cubic-bezier(.2,.8,.2,1) both;overflow:hidden;position:relative}.launch-game-card::after{content:"";position:absolute;inset:-30% auto -30% -38%;width:32%;transform:skewX(-18deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.09),transparent);animation:sheen 5.8s 1.8s ease-in-out infinite;pointer-events:none}
.launch-game-top{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-bottom:15px;border-bottom:1px solid var(--line);font-size:10px;font-weight:950;letter-spacing:.14em;color:var(--muted)}.launch-game-top span{color:var(--accent)}
.launch-matchup{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;padding:28px 0}.launch-team{min-width:0;text-align:center}.launch-team img{display:block;width:74px;height:74px;object-fit:contain;margin:0 auto 10px;filter:drop-shadow(0 8px 14px rgba(0,0,0,.22))}.launch-team strong{display:block;font-size:24px}.launch-team small{display:block;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:10px}.launch-score{text-align:center}.launch-score strong{display:flex;align-items:center;gap:10px;font-size:32px}.launch-score strong span{font-size:18px;color:var(--accent)}.launch-score small{display:block;margin-top:5px;max-width:150px;color:var(--muted);font-size:9px;line-height:1.3}
.launch-primary{position:relative;width:100%;min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 19px;border:1px solid color-mix(in srgb,var(--accent) 70%,var(--line));border-radius:16px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 23%,var(--panel2)),color-mix(in srgb,var(--accent) 10%,var(--panel)));color:var(--text);font-size:15px;font-weight:950;overflow:hidden;box-shadow:0 10px 26px rgba(0,0,0,.18);transition:transform .18s ease,box-shadow .18s ease}.launch-primary b{font-size:25px;color:var(--accent);transition:transform .18s ease}.launch-primary:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(0,0,0,.24)}.launch-primary:hover b{transform:translateX(4px)}.launch-primary:active{transform:scale(.985)}
.launch-actions{grid-area:actions;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;animation:cardRise .8s .22s cubic-bezier(.2,.8,.2,1) both}.launch-actions button{min-height:112px;padding:16px;text-align:left;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--panel) 93%,#fff 2%);color:var(--text);box-shadow:0 12px 28px rgba(0,0,0,.13);transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease}.launch-actions button:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--accent) 58%,var(--line));background:color-mix(in srgb,var(--panel2) 90%,var(--accent) 5%);box-shadow:0 18px 34px rgba(0,0,0,.18)}.launch-actions button:active{transform:scale(.985)}.launch-action-icon{display:grid;width:34px;height:34px;place-items:center;margin-bottom:12px;border:1px solid color-mix(in srgb,var(--accent) 50%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--accent);font-size:17px}.launch-actions strong{display:block;font-size:13px}.launch-actions small{display:block;margin-top:4px;font-size:9px;color:var(--muted)}
.launch-footer{grid-area:footer;display:flex;align-items:center;justify-content:space-between;padding-top:4px;color:var(--muted);font-size:10px;animation:launchReveal .7s .35s both}.launch-footer button{border:0;background:transparent;color:var(--muted);font-weight:850;padding:8px 0}.launch-footer button:hover{color:var(--text)}

/* Page transition and richer app motion */
#main.page-enter{animation:pageEnter .48s cubic-bezier(.2,.8,.2,1)}
.drawer.open{animation:drawerSpring .36s cubic-bezier(.2,.8,.2,1)}
.modal:not(.hidden) .modal-card{animation:sheetSpring .32s cubic-bezier(.2,.85,.2,1)}
.team-scorebook-head,.overview-title,.card,.live-game-bar{will-change:transform}
@media(hover:hover) and (pointer:fine){.team-scorebook:hover .team-scorebook-head{box-shadow:inset 0 -1px 0 color-mix(in srgb,var(--accent) 35%,transparent),0 5px 18px rgba(0,0,0,.09)}}

@keyframes launchReveal{from{opacity:0;transform:translateY(16px);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}
@keyframes diamondIntro{0%{opacity:0;transform:rotate(0deg) scale(.5)}65%{opacity:1;transform:rotate(50deg) scale(1.08)}100%{transform:rotate(45deg) scale(1)}}
@keyframes diamondFloat{0%,100%{translate:0 0}50%{translate:0 -7px}}
@keyframes cardRise{from{opacity:0;transform:translateY(26px) scale(.985)}to{opacity:1;transform:none}}
@keyframes stadiumGlow{0%{opacity:.7;transform:scale(1)}100%{opacity:1;transform:scale(1.04)}}
@keyframes gridDrift{to{background-position:52px 52px}}
@keyframes orbFloat{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(38px,-24px,0) scale(1.12)}}
@keyframes sheen{0%,70%{left:-38%}88%,100%{left:120%}}
@keyframes pageEnter{from{opacity:0;transform:translateY(10px);filter:blur(3px)}to{opacity:1;transform:none;filter:none}}
@keyframes drawerSpring{0%{transform:translateX(-102%)}70%{transform:translateX(1.5%)}100%{transform:none}}
@keyframes sheetSpring{0%{opacity:0;transform:translateY(26px) scale(.985)}100%{opacity:1;transform:none}}

@media(max-width:760px){
  .launch-inner{width:min(100% - 24px,620px);min-height:100dvh;padding:calc(34px + env(safe-area-inset-top)) 0 calc(26px + env(safe-area-inset-bottom));grid-template-columns:1fr;grid-template-areas:"brand" "game" "actions" "footer";gap:18px;align-content:start}
  .launch-brand{text-align:center;margin-top:clamp(12px,4vh,32px)}.launch-diamond{width:48px;height:48px;margin:0 auto}.launch-brand small{font-size:8px;margin-top:15px}.launch-brand h1{font-size:48px}.launch-brand p{max-width:430px;margin:12px auto 0;font-size:12px;line-height:1.45}
  .launch-game-card{padding:15px;border-radius:20px}.launch-matchup{padding:20px 0}.launch-team img{width:56px;height:56px}.launch-team strong{font-size:19px}.launch-team small{font-size:7.5px}.launch-score strong{font-size:26px}.launch-score small{max-width:105px;font-size:7px}.launch-primary{min-height:52px;border-radius:14px;font-size:13px}
  .launch-actions{gap:9px}.launch-actions button{min-height:92px;padding:12px;border-radius:15px}.launch-action-icon{width:29px;height:29px;margin-bottom:8px;border-radius:8px;font-size:14px}.launch-actions strong{font-size:11px}.launch-actions small{font-size:7.5px}.launch-footer{font-size:8px}
}
@media(max-width:390px){.launch-brand h1{font-size:42px}.launch-game-card{padding:13px}.launch-team img{width:50px;height:50px}.launch-actions button{min-height:86px}}
@media(prefers-reduced-motion:reduce){.launch-home::before,.launch-home::after,.launch-bg i,.launch-diamond,.launch-game-card::after,.launch-brand,.launch-game-card,.launch-actions,.launch-footer,#main.page-enter,.drawer.open,.modal:not(.hidden) .modal-card{animation:none!important}}


/* ==========================================================
   v33 PREMIUM MOBILE APP EXPERIENCE
   - static launch Home on phone
   - reliable bottom command bar semantics
   - deliberate Score primary action
   ========================================================== */
@media(max-width:760px){
  body.home-page{
    position:fixed!important;
    inset:0!important;
    width:100%!important;
    height:100dvh!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    touch-action:manipulation;
  }
  body.home-page main{
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.home-page .launch-home{
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.home-page .launch-inner{
    box-sizing:border-box!important;
    width:min(calc(100% - 22px),620px)!important;
    height:100dvh!important;
    min-height:0!important;
    padding:calc(max(12px,env(safe-area-inset-top)) + 8px) 0 calc(max(10px,env(safe-area-inset-bottom)) + 8px)!important;
    grid-template-columns:1fr!important;
    grid-template-areas:"brand" "game" "actions" "footer"!important;
    grid-template-rows:auto auto minmax(0,1fr) auto!important;
    gap:clamp(8px,1.4vh,13px)!important;
    align-content:stretch!important;
  }
  body.home-page .launch-brand{
    margin:0!important;
    text-align:center!important;
  }
  body.home-page .launch-diamond{width:36px!important;height:36px!important;border-width:2px!important;margin:0 auto!important;border-radius:7px!important}
  body.home-page .launch-diamond span{width:11px!important;height:11px!important}
  body.home-page .launch-brand small{font-size:7px!important;margin:8px 0 4px!important;letter-spacing:.20em!important}
  body.home-page .launch-brand h1{font-size:clamp(34px,10vw,44px)!important;line-height:.94!important}
  body.home-page .launch-brand p{margin:7px auto 0!important;font-size:10px!important;line-height:1.3!important;max-width:340px!important}
  body.home-page .launch-game-card{
    padding:clamp(10px,1.6vh,14px)!important;
    border-radius:19px!important;
    box-shadow:0 18px 46px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.045)!important;
  }
  body.home-page .launch-game-top{padding-bottom:9px!important;font-size:7.5px!important}
  body.home-page .launch-matchup{padding:clamp(8px,1.7vh,15px) 0!important;gap:8px!important}
  body.home-page .launch-team img{width:clamp(38px,11vw,50px)!important;height:clamp(38px,11vw,50px)!important;margin-bottom:5px!important}
  body.home-page .launch-team strong{font-size:16px!important}.launch-team small{font-size:6.8px!important}
  body.home-page .launch-score strong{font-size:23px!important;gap:7px!important}.launch-score strong span{font-size:13px!important}
  body.home-page .launch-score small{font-size:6.8px!important;margin-top:3px!important}
  body.home-page .launch-primary{min-height:44px!important;border-radius:13px!important;font-size:12px!important;padding:0 15px!important}
  body.home-page .launch-primary b{font-size:20px!important}
  body.home-page .launch-actions{
    min-height:0!important;
    height:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    align-self:stretch!important;
  }
  body.home-page .launch-actions button{
    min-height:0!important;
    height:100%!important;
    padding:10px 11px!important;
    border-radius:15px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
  }
  body.home-page .launch-action-icon{width:27px!important;height:27px!important;margin-bottom:6px!important;font-size:13px!important;border-radius:8px!important}
  body.home-page .launch-actions strong{font-size:10.5px!important}.launch-actions small{font-size:7px!important;margin-top:2px!important}
  body.home-page .launch-footer{padding-top:0!important;font-size:7.5px!important;min-height:24px!important}
  body.home-page .launch-footer button{padding:3px 0!important;font-size:8px!important}

  /* Native-like bottom command bar */
  body:not(.home-page) .mobile-action-bar{
    height:calc(66px + env(safe-area-inset-bottom))!important;
    min-height:0!important;
    padding:5px max(7px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left))!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:2px!important;
    background:color-mix(in srgb,var(--panel2) 88%,#000 12%)!important;
    border-top:1px solid color-mix(in srgb,var(--line) 75%,transparent)!important;
    box-shadow:0 -16px 36px rgba(0,0,0,.30),inset 0 1px rgba(255,255,255,.04)!important;
    backdrop-filter:blur(22px) saturate(135%)!important;
    -webkit-backdrop-filter:blur(22px) saturate(135%)!important;
  }
  body:not(.home-page) .mobile-action-bar button{
    min-height:54px!important;
    height:54px!important;
    border-radius:14px!important;
    gap:3px!important;
    overflow:visible!important;
    transition:transform .15s ease,background .18s ease,color .18s ease,box-shadow .18s ease!important;
  }
  body:not(.home-page) .mobile-action-bar button span{font-size:18px!important;transition:transform .15s ease!important}
  body:not(.home-page) .mobile-action-bar button small{font-size:7.5px!important;font-weight:900!important;letter-spacing:.01em!important}
  body:not(.home-page) .mobile-action-bar button.is-active{
    background:color-mix(in srgb,var(--accent) 13%,var(--panel2))!important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 34%,transparent)!important;
  }
  body:not(.home-page) .mobile-action-bar button.is-active::before{
    content:"";position:absolute;top:4px;left:50%;width:18px;height:3px;transform:translateX(-50%);border-radius:99px;background:var(--accent);box-shadow:0 0 12px color-mix(in srgb,var(--accent) 42%,transparent)
  }
  body:not(.home-page) .mobile-action-bar .score-command{
    transform:translateY(-7px)!important;
    height:61px!important;
    border-radius:18px!important;
    background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 18%,var(--panel2)),color-mix(in srgb,var(--panel2) 94%,#000))!important;
    border:1px solid color-mix(in srgb,var(--accent) 40%,var(--line))!important;
    box-shadow:0 8px 20px rgba(0,0,0,.25)!important;
  }
  body:not(.home-page) .mobile-action-bar .score-command span{font-size:22px!important;color:var(--accent)!important}
  body:not(.home-page) .mobile-action-bar .score-command.is-active{box-shadow:0 10px 24px rgba(0,0,0,.28),0 0 0 1px color-mix(in srgb,var(--accent) 42%,transparent)!important}
  body:not(.home-page) .mobile-action-bar .score-command.is-active::before{display:none!important}
  body:not(.home-page) .mobile-action-bar button.is-mode-on:not(.is-active)::after{
    content:"";position:absolute;top:8px;right:13px;width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 8px color-mix(in srgb,var(--accent) 65%,transparent)
  }
  .score-target-pulse{animation:scoreTargetPulse .52s ease both!important}
}
@keyframes scoreTargetPulse{0%{box-shadow:inset 0 0 0 0 color-mix(in srgb,var(--accent) 0%,transparent)}45%{box-shadow:inset 0 0 0 4px color-mix(in srgb,var(--accent) 72%,transparent),0 0 20px color-mix(in srgb,var(--accent) 24%,transparent)}100%{box-shadow:inset 0 0 0 0 transparent}}
@media(max-width:760px) and (max-height:730px){
  body.home-page .launch-brand p{display:none!important}
  body.home-page .launch-brand h1{font-size:34px!important}
  body.home-page .launch-diamond{width:30px!important;height:30px!important}
  body.home-page .launch-matchup{padding:7px 0!important}
  body.home-page .launch-team img{width:36px!important;height:36px!important}
  body.home-page .launch-actions button{padding:7px 9px!important}
  body.home-page .launch-action-icon{margin-bottom:3px!important}
}
@media(max-width:760px) and (max-height:650px){
  body.home-page .launch-brand small{display:none!important}
  body.home-page .launch-brand h1{font-size:30px!important}
  body.home-page .launch-game-card{padding:9px!important}
  body.home-page .launch-team small{display:none!important}
  body.home-page .launch-primary{min-height:39px!important}
  body.home-page .launch-footer span{display:none!important}
}

/* ==========================================================
   v34 SCORING MODES + ADVANCED FIELD
   Basic keeps the existing editor. Advanced and Pitch modes
   progressively reveal richer controls without changing the
   scorecard's core geometry.
   ========================================================== */
.mode-pill,.live-mode{
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid color-mix(in srgb,var(--accent) 55%,transparent);
  border-radius:999px;padding:3px 8px;font-style:normal;font-size:7px;font-weight:950;
  letter-spacing:.08em;text-transform:uppercase;color:var(--accent);
  background:color-mix(in srgb,var(--panel2) 88%,#000 6%);
}
.launch-game-top{gap:8px}.launch-game-top .mode-pill{margin-left:auto}.launch-game-top>b{margin-left:0}
.live-mode{margin-left:5px;vertical-align:1px;font-size:6px;padding:2px 6px}

.mode-card{max-width:920px!important}
.mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.mode-option{
  min-height:220px;padding:18px;text-align:left;border:1px solid var(--line);border-radius:18px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 92%,#fff 3%),var(--panel));
  color:var(--text);display:flex;flex-direction:column;gap:8px;position:relative;overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.14);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.mode-option::after{content:"";position:absolute;inset:auto -30% -45% 25%;height:130px;transform:rotate(-12deg);background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 16%,transparent),transparent)}
.mode-option:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:0 15px 28px rgba(0,0,0,.22)}
.mode-option.featured{border-color:color-mix(in srgb,var(--accent) 70%,var(--line));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 12%,transparent),0 12px 26px rgba(0,0,0,.19)}
.mode-option .mode-icon{font-size:28px;color:var(--accent);line-height:1}
.mode-option strong{font-size:18px;letter-spacing:.03em;text-transform:uppercase}.mode-option small{font-size:10px;font-weight:900;color:var(--accent)}
.mode-option p{margin:0;color:var(--muted);font-size:10px;line-height:1.5;max-width:28ch}
.mode-note{margin-top:13px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--panel2) 82%,#000 8%);border:1px solid var(--line);font-size:9px;color:var(--muted)}
.settings-hint{display:block;margin-top:6px;color:var(--muted);font-size:8px;line-height:1.35}

.advanced-tools,.pitch-tools{margin-top:16px;padding-top:2px}
.advanced-title{display:flex!important;align-items:center;justify-content:space-between}
.advanced-title b,#pitchCountBadge{font-size:8px;letter-spacing:.1em;padding:4px 8px;border:1px solid var(--accent);border-radius:999px;color:var(--accent)}
.advanced-layout{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(320px,1.1fr);gap:12px}
.defense-field-card,.advanced-runner-card,.pitch-tools{
  border:1px solid var(--line);border-radius:16px;padding:12px;background:color-mix(in srgb,var(--panel) 90%,#000 4%);
}
.field-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.field-card-head strong{display:block;font-size:10px;letter-spacing:.08em}.field-card-head small{display:block;margin-top:3px;font-size:7px;color:var(--muted)}
.field-card-head button{min-height:30px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--text);font-size:8px;font-weight:900}
.baseball-field{position:relative;aspect-ratio:1.25/1;border-radius:16px;overflow:hidden;background:linear-gradient(180deg,#265b3c,#17432f);border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));box-shadow:inset 0 -35px 65px rgba(0,0,0,.18)}
.field-grass{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 108%,rgba(211,184,124,.28) 0 25%,transparent 26%),repeating-linear-gradient(105deg,rgba(255,255,255,.025) 0 14px,rgba(0,0,0,.025) 14px 28px)}
.field-diamond{position:absolute;left:50%;top:61%;width:35%;aspect-ratio:1;transform:translate(-50%,-50%) rotate(45deg);border:2px solid rgba(238,220,176,.82);background:rgba(178,145,85,.15)}
.field-team-label{position:absolute;left:10px;top:8px;font-size:7px;font-weight:950;letter-spacing:.08em;color:rgba(255,255,255,.68)}
.field-pos{position:absolute;transform:translate(-50%,-50%);width:52px;height:52px;border-radius:50%;border:1px solid rgba(238,228,201,.45);background:rgba(6,33,22,.84);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2px;box-shadow:0 5px 12px rgba(0,0,0,.22);transition:transform .15s ease,border-color .15s ease,background .15s ease}
.field-pos:hover,.field-pos.selected{transform:translate(-50%,-50%) scale(1.08);border-color:#f0d99d;background:#245c42;box-shadow:0 0 0 2px rgba(240,217,157,.12),0 7px 15px rgba(0,0,0,.26)}
.field-pos b{font-size:9px;line-height:1}.field-pos small{display:block;max-width:44px;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:5.5px;color:#ddd9cb}
.fielder-selection{margin-top:8px;padding:7px 9px;border-radius:9px;background:var(--panel2);font-size:8px;font-weight:850;color:var(--text);border:1px solid var(--line)}

.advanced-runner-list{display:grid;gap:8px}.runner-empty,.pitch-empty{padding:18px 12px;text-align:center;border:1px dashed var(--line);border-radius:10px;color:var(--muted);font-size:9px}
.advanced-runner-row{display:grid;grid-template-columns:minmax(105px,1.25fr) minmax(92px,.8fr) minmax(108px,1fr) minmax(86px,.75fr);gap:7px;align-items:end;padding:9px;border:1px solid var(--line);border-radius:11px;background:color-mix(in srgb,var(--panel2) 88%,#000 4%)}
.runner-ident b{display:block;font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.runner-ident small{font-size:6.5px;color:var(--muted)}
.advanced-runner-row label{font-size:6.5px;color:var(--muted);font-weight:900;letter-spacing:.04em}.advanced-runner-row select,.advanced-runner-row input{width:100%;height:34px;margin-top:4px;padding:0 7px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);font-size:8px;font-weight:850}

.pitch-tools>.editor-section-title{display:flex!important;justify-content:space-between;align-items:center;margin-top:0}
.pitch-entry-grid{display:grid;grid-template-columns:1fr .75fr 1.25fr auto;gap:8px;align-items:end}.pitch-entry-grid label{font-size:7px;color:var(--muted);font-weight:900}.pitch-entry-grid select,.pitch-entry-grid input{width:100%;height:38px;margin-top:4px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);padding:0 8px}.pitch-entry-grid button{height:38px;padding:0 14px;border:1px solid var(--accent);border-radius:9px;background:var(--panel2);color:var(--text);font-weight:950;font-size:9px}
.pitch-sequence{display:flex;gap:6px;overflow-x:auto;padding:10px 1px 8px;scrollbar-width:thin}.pitch-chip{flex:0 0 auto;display:grid;grid-template-columns:auto auto;gap:2px 6px;align-items:center;padding:7px 9px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);font-size:8px;color:var(--text)}.pitch-chip>b{color:var(--accent)}.pitch-chip small{grid-column:1/-1;font-size:6px;color:var(--muted)}

@media(max-width:900px){.mode-options{grid-template-columns:1fr}.mode-option{min-height:128px}.advanced-layout{grid-template-columns:1fr}.pitch-entry-grid{grid-template-columns:1fr 1fr}.pitch-entry-grid button{grid-column:1/-1}.advanced-runner-row{grid-template-columns:1fr 1fr}.runner-ident{grid-column:1/-1}}
@media(max-width:600px){
 .mode-card{max-height:min(88dvh,760px)!important;overflow:auto!important}.mode-options{gap:8px}.mode-option{min-height:116px;padding:13px;border-radius:15px}.mode-option .mode-icon{font-size:21px}.mode-option strong{font-size:15px}.mode-option p{font-size:8px}.mode-note{font-size:7px}
 .play-card .advanced-tools,.play-card .pitch-tools{margin-left:-2px;margin-right:-2px}.defense-field-card,.advanced-runner-card,.pitch-tools{padding:9px;border-radius:13px}
 .baseball-field{aspect-ratio:1.15/1}.field-pos{width:44px;height:44px}.field-pos b{font-size:8px}.field-pos small{font-size:5px;max-width:38px}
 .advanced-runner-row{grid-template-columns:1fr 1fr;gap:6px}.advanced-runner-row select,.advanced-runner-row input{height:36px;font-size:8px}.runner-ident{grid-column:1/-1}
 .pitch-entry-grid{grid-template-columns:1fr 1fr}.pitch-entry-grid label:nth-child(3){grid-column:1/-1}.pitch-entry-grid button{grid-column:1/-1}
 .mode-pill{font-size:5.8px;padding:2px 5px}.live-mode{display:none}
}

/* ==========================================================
   v35 ADVANCED EDITOR + TEAM DEFENSIVE ALIGNMENT
   - Play Editor uses an even 3x3 fielder picker.
   - Advanced/Pitch scorebooks show a full defensive field
     below each lineup and above the pitching section.
   ========================================================== */
.advanced-layout{
  grid-template-columns:minmax(280px,.82fr) minmax(360px,1.18fr);
  gap:10px;
  align-items:start;
}
.defense-field-card,.advanced-runner-card{
  min-width:0;
  padding:11px;
}
.field-card-head{
  min-height:38px;
  margin-bottom:8px;
}
.field-card-head>div{min-width:0}
.field-card-head strong{font-size:9.5px;line-height:1.1}
.field-card-head small{font-size:6.7px;line-height:1.3}

/* Editor fielder selector: intentionally not a field diagram. The
   permanent lineup field below the scorecard handles that role. */
.fielder-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  padding:7px;
  border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));
  border-radius:13px;
  background:color-mix(in srgb,var(--panel2) 88%,#000 5%);
}
.fielder-grid-team{
  grid-column:1/-1;
  padding:2px 3px 4px;
  font-size:6.5px;
  font-weight:950;
  letter-spacing:.1em;
  color:var(--muted);
}
.fielder-grid-pos{
  min-width:0;
  min-height:62px;
  padding:7px 5px 6px;
  border:1px solid var(--line);
  border-radius:10px;
  background:color-mix(in srgb,var(--panel) 86%,#fff 2%);
  color:var(--text);
  display:grid;
  grid-template-columns:auto 1fr auto;
  grid-template-rows:auto auto;
  align-items:center;
  gap:3px 5px;
  text-align:left;
  transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease;
}
.fielder-grid-pos>span{
  grid-row:1/3;
  width:27px;height:27px;border-radius:8px;
  display:grid;place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));
  color:var(--accent);font-size:8.5px;font-weight:950;
  background:color-mix(in srgb,var(--panel2) 90%,#000 4%);
}
.fielder-grid-pos>strong{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:7px;line-height:1.15;color:var(--text);
}
.fielder-grid-pos>small{
  font-size:6px;font-weight:900;color:var(--muted);
}
.fielder-grid-pos:hover,.fielder-grid-pos.selected{
  transform:translateY(-1px);
  border-color:var(--accent);
  background:color-mix(in srgb,var(--panel2) 82%,var(--accent) 8%);
  box-shadow:0 5px 12px rgba(0,0,0,.16);
}
.fielder-grid-pos.selected>span{
  background:var(--accent);color:var(--bg);
}
.fielder-selection{
  min-height:30px;
  display:flex;align-items:center;
  margin-top:7px;padding:7px 9px;
  font-size:7.5px;
}

/* Team-level defensive field. */
.team-defense-pane{
  margin:12px 0 0;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:color-mix(in srgb,var(--panel) 92%,#000 3%);
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}
.defense-pane-title{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  min-height:42px;
  padding:0 13px;
  border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--panel2) 92%,#000 4%);
}
.defense-pane-title>small{
  font-size:6.5px;font-weight:950;letter-spacing:.08em;
  color:var(--accent);
}
.team-defense-field{
  position:relative;
  height:330px;
  overflow:hidden;
  isolation:isolate;
  background:linear-gradient(180deg,#285f40 0%,#17422e 72%,#123723 100%);
}
.team-defense-grass{
  position:absolute;inset:0;z-index:-4;
  background:
    repeating-linear-gradient(106deg,rgba(255,255,255,.025) 0 24px,rgba(0,0,0,.025) 24px 48px),
    radial-gradient(ellipse at 50% 103%,rgba(205,181,126,.18) 0 21%,transparent 22%);
}
.team-defense-cutout{
  position:absolute;left:50%;bottom:-95px;width:76%;height:285px;
  transform:translateX(-50%);
  border:2px solid rgba(235,220,177,.25);
  border-radius:50% 50% 0 0;
  background:radial-gradient(ellipse at 50% 78%,rgba(186,145,85,.33) 0 25%,transparent 26%);
  z-index:-3;
}
.team-defense-diamond{
  position:absolute;left:50%;top:64%;width:27%;aspect-ratio:1;
  transform:translate(-50%,-50%) rotate(45deg);
  border:2px solid rgba(245,227,183,.86);
  background:rgba(190,151,87,.16);
  box-shadow:0 0 0 1px rgba(0,0,0,.07);
  z-index:-1;
}
.team-defense-home{
  position:absolute;left:50%;top:91%;width:10px;height:10px;
  transform:translate(-50%,-50%) rotate(45deg);
  border:1px solid rgba(255,245,220,.9);background:rgba(255,245,220,.82);
  z-index:0;
}
.team-defense-pos{
  position:absolute;
  transform:translate(-50%,-50%);
  width:88px;
  min-height:47px;
  padding:5px 6px;
  border:1px solid rgba(242,232,205,.42);
  border-radius:12px;
  background:rgba(5,29,20,.88);
  color:#fff;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  gap:2px 6px;
  align-items:center;
  text-align:left;
  box-shadow:0 6px 15px rgba(0,0,0,.22);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.team-defense-pos>span{
  grid-row:1/3;
  width:27px;height:27px;border-radius:9px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.17);
  color:#f4dca6;font-size:8px;font-weight:950;
}
.team-defense-pos>strong{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:6.8px;line-height:1.12;
}
.team-defense-pos>small{
  font-size:5.7px;font-weight:850;color:rgba(255,255,255,.65);
}
.team-defense-pos.is-open{opacity:.58;border-style:dashed}
.team-defense-pos.is-filled:hover{
  transform:translate(-50%,-50%) scale(1.04);
  border-color:#f0d99d;
  background:rgba(20,68,47,.94);
}
.team-defense-foot{
  min-height:34px;padding:0 12px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  border-top:1px solid var(--line);
  color:var(--muted);font-size:6.5px;font-weight:800;
  background:color-mix(in srgb,var(--panel2) 90%,#000 5%);
}
.defense-mode-note{color:var(--accent);white-space:nowrap}

/* Wrigley field treatment stays intentionally field-green but inherits
   the scorecard framing so it reads as part of the same section. */




@media(max-width:900px){
  .advanced-layout{grid-template-columns:1fr;gap:8px}
  .team-defense-field{height:300px}
  .team-defense-pos{width:80px;min-height:44px}
}
@media(max-width:600px){
  .advanced-tools{margin-top:12px}
  .advanced-title{margin-bottom:6px!important}
  .defense-field-card,.advanced-runner-card{padding:8px;border-radius:12px}
  .fielder-grid{gap:5px;padding:5px;border-radius:11px}
  .fielder-grid-pos{min-height:55px;padding:5px 4px;border-radius:9px;gap:2px 4px}
  .fielder-grid-pos>span{width:24px;height:24px;border-radius:7px;font-size:7.5px}
  .fielder-grid-pos>strong{font-size:6.2px}
  .fielder-grid-pos>small{font-size:5.5px}
  .advanced-runner-list{gap:6px}
  .advanced-runner-row{padding:7px}

  .team-defense-pane{margin-top:9px;border-radius:13px}
  .defense-pane-title{min-height:37px;padding:0 9px}
  .defense-pane-title>span{font-size:8px}
  .defense-pane-title>small{font-size:5.6px}
  .team-defense-field{height:258px}
  .team-defense-pos{width:67px;min-height:39px;padding:4px;border-radius:10px;gap:1px 4px}
  .team-defense-pos>span{width:22px;height:22px;border-radius:7px;font-size:7px}
  .team-defense-pos>strong{font-size:5.5px}
  .team-defense-pos>small{font-size:4.8px}
  .team-defense-foot{min-height:29px;padding:0 8px;font-size:5.5px}
}
@media(max-width:390px){
  .team-defense-field{height:238px}
  .team-defense-pos{width:61px;min-height:37px}
  .team-defense-pos>span{width:20px;height:20px;font-size:6.4px}
  .team-defense-pos>strong{font-size:5px}
  .team-defense-pos>small{font-size:4.4px}
}

/* ==========================================================
   v36 PITCH-BY-PITCH EDITOR POLISH
   A clear at-bat workflow: pitch tracker first, final play
   details second. Advanced and Basic scoring behavior remains
   unchanged.
   ========================================================== */
.pitch-tools{
  margin:12px 0 16px!important;
  padding:0!important;
  border:1px solid color-mix(in srgb,var(--accent) 62%,var(--line))!important;
  border-radius:18px!important;
  overflow:hidden;
  background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 92%,#000 3%),color-mix(in srgb,var(--panel) 94%,#000 3%))!important;
  box-shadow:0 14px 30px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.035);
}
.pitch-tools-head{
  min-height:86px;
  padding:15px 16px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  border-bottom:1px solid var(--line);
  background:linear-gradient(105deg,color-mix(in srgb,var(--panel2) 92%,#000 4%),color-mix(in srgb,var(--accent) 8%,var(--panel2)));
}
.pitch-title-copy{min-width:0}.pitch-title-copy .pitch-kicker{
  display:block;margin-bottom:4px;color:var(--accent);font-size:7px;font-weight:950;letter-spacing:.16em;text-transform:uppercase;
}
.pitch-title-copy>strong{display:block;color:var(--text);font-size:15px;line-height:1.1;letter-spacing:.06em}
.pitch-title-copy>small{display:block;max-width:54ch;margin-top:6px;color:var(--muted);font-size:7.5px;line-height:1.42;font-weight:700}
.pitch-count-card{
  min-width:116px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));border-radius:13px;
  display:grid;grid-template-columns:auto auto;grid-template-areas:"label next" "count count" "sub sub";align-items:center;
  background:color-mix(in srgb,var(--panel) 90%,#000 4%);box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.pitch-count-card>small{grid-area:label;color:var(--muted);font-size:6.5px;font-weight:950;letter-spacing:.12em}
.pitch-count-card>b{grid-area:count;color:var(--accent);font-size:28px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:.02em;margin:4px 0 3px}
.pitch-count-card>span{grid-area:sub;color:var(--muted);font-size:5.5px;font-weight:900;letter-spacing:.08em}
.pitch-count-card>em{grid-area:next;justify-self:end;color:var(--text);font-style:normal;font-size:6px;font-weight:900;padding:3px 6px;border-radius:999px;background:var(--panel2);border:1px solid var(--line)}
.pitch-count-lights{
  display:flex;gap:18px;align-items:center;padding:9px 16px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--panel) 94%,#000 4%);
}
.pitch-light-group{display:flex;align-items:center;gap:8px}.pitch-light-group small{font-size:6px;font-weight:950;letter-spacing:.1em;color:var(--muted)}
.pitch-light-group>span{display:flex;gap:5px}.pitch-light-group i{display:block;width:10px;height:10px;border-radius:50%;border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line));background:color-mix(in srgb,var(--panel2) 82%,#000 8%);box-shadow:inset 0 1px 2px rgba(0,0,0,.25)}
.pitch-light-group i.on{background:var(--accent);border-color:var(--accent);box-shadow:0 0 9px color-mix(in srgb,var(--accent) 35%,transparent)}
.pitch-light-group.strikes i.on{background:color-mix(in srgb,var(--accent) 72%,var(--text) 28%)}
.pitch-entry-card{padding:13px 16px 15px;border-bottom:1px solid var(--line)}
.pitch-entry-card-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:10px}
.pitch-entry-card-head strong,.pitch-sequence-head strong{display:block;color:var(--text);font-size:9px;letter-spacing:.08em}
.pitch-entry-card-head small,.pitch-sequence-head small{display:block;margin-top:3px;color:var(--muted);font-size:6.8px;line-height:1.35}
.pitch-entry-grid{
  display:grid!important;
  grid-template-columns:minmax(170px,1.15fr) minmax(120px,.7fr) minmax(190px,1.25fr) minmax(150px,.8fr)!important;
  gap:9px!important;align-items:end!important;
}
.pitch-entry-grid label{display:block;min-width:0;color:var(--muted)!important;font-size:6.7px!important;font-weight:950!important;letter-spacing:.05em}
.pitch-entry-grid label>span{display:flex;align-items:center;gap:4px;margin-bottom:5px}.pitch-entry-grid label>span small{font-size:5.7px;color:var(--muted);font-weight:700;letter-spacing:0}
.pitch-entry-grid select,.pitch-entry-grid input{
  height:43px!important;margin:0!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--panel)!important;color:var(--text)!important;font-size:9px!important;font-weight:850!important;outline:none!important;
}
.pitch-entry-grid select:focus,.pitch-entry-grid input:focus{border-color:var(--accent)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent)!important}
.pitch-velo-wrap{display:grid;grid-template-columns:1fr auto;align-items:center;height:43px;border:1px solid var(--line);border-radius:10px;background:var(--panel);overflow:hidden}
.pitch-velo-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent)}
.pitch-velo-wrap input{width:100%!important;height:41px!important;border:0!important;border-radius:0!important;text-align:center!important;font-size:13px!important;font-variant-numeric:tabular-nums}.pitch-velo-wrap input:focus{box-shadow:none!important}
.pitch-velo-wrap>b{padding:0 9px 0 3px;color:var(--muted);font-size:6px;letter-spacing:.08em}
.record-pitch-btn{
  height:43px!important;padding:0 12px!important;border:1px solid var(--accent)!important;border-radius:11px!important;
  display:grid!important;grid-template-columns:auto 1fr!important;grid-template-rows:auto auto!important;column-gap:7px!important;align-content:center!important;text-align:left!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 18%,var(--panel2)),var(--panel2))!important;color:var(--text)!important;box-shadow:0 7px 15px rgba(0,0,0,.14)!important;
}
.record-pitch-btn>span{grid-row:1/3;font-size:16px;line-height:1;color:var(--accent)}.record-pitch-btn>strong{font-size:8px;line-height:1.1}.record-pitch-btn>small{font-size:5.7px;color:var(--muted);line-height:1.1}
.record-pitch-btn:hover{transform:translateY(-1px);background:color-mix(in srgb,var(--accent) 15%,var(--panel2))!important}.record-pitch-btn:active{transform:translateY(0) scale(.985)}
.record-pitch-btn.pitch-added{animation:pitchRecorded .35s ease}
@keyframes pitchRecorded{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 40%,transparent)}50%{box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 16%,transparent),0 8px 18px rgba(0,0,0,.16)}100%{box-shadow:0 7px 15px rgba(0,0,0,.14)}}
.pitch-sequence-card{padding:13px 16px 14px}.pitch-sequence-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.pitch-sequence-head .small-btn{min-height:30px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--text);font-size:7px;font-weight:900}
.pitch-sequence{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;max-height:218px;overflow-y:auto!important;overflow-x:hidden!important;padding:1px!important;scrollbar-width:thin;
}
.pitch-chip{
  min-width:0!important;min-height:52px;padding:7px 9px!important;border:1px solid var(--line)!important;border-radius:11px!important;
  display:grid!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important;background:color-mix(in srgb,var(--panel2) 90%,#000 3%)!important;color:var(--text)!important;
}
.pitch-chip-no{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--accent) 52%,var(--line));color:var(--accent);font-size:8px;font-weight:950;background:color-mix(in srgb,var(--panel) 88%,#000 3%)}
.pitch-chip-main{min-width:0}.pitch-chip-main>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:7.7px;color:var(--text)}.pitch-chip-main>small{display:block;margin-top:3px;font-size:6px;color:var(--muted);font-weight:800}
.pitch-chip>b{justify-self:end;max-width:105px;padding:4px 6px;border-radius:7px;background:var(--panel);border:1px solid var(--line);color:var(--text)!important;font-size:6.3px!important;text-align:center;line-height:1.15}
.pitch-chip.is-ball>b{border-color:color-mix(in srgb,var(--accent) 35%,var(--line))}.pitch-chip.is-strike>b,.pitch-chip.is-play>b,.pitch-chip.is-hbp>b{border-color:color-mix(in srgb,var(--accent) 70%,var(--line));color:var(--accent)!important}
.pitch-empty{grid-column:1/-1!important;min-height:72px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px!important}.pitch-empty>strong{font-size:8px;color:var(--text)}.pitch-empty>small{font-size:6.5px;color:var(--muted)}
.pitch-workflow-note{display:flex;gap:9px;align-items:flex-start;padding:10px 16px 12px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--panel2) 88%,#000 5%)}
.pitch-workflow-note>span{flex:0 0 auto;margin-top:1px;padding:3px 6px;border:1px solid color-mix(in srgb,var(--accent) 60%,var(--line));border-radius:999px;color:var(--accent);font-size:5.5px;font-weight:950;letter-spacing:.12em}.pitch-workflow-note p{margin:0;color:var(--muted);font-size:6.8px;line-height:1.4}.pitch-workflow-note b{color:var(--text)}
.pitch-mode-editor>.situation{margin-bottom:0!important}.pitch-mode-editor>.pitch-tools+ .editor-section-title{margin-top:14px!important}

@media(max-width:900px){
  .pitch-entry-grid{grid-template-columns:1fr 1fr!important}.pitch-result-field{grid-column:1/-1}.record-pitch-btn{grid-column:1/-1!important}
  .pitch-sequence{grid-template-columns:1fr!important;max-height:250px}
}
@media(max-width:600px){
  .pitch-mode-editor{padding-bottom:max(10px,env(safe-area-inset-bottom))!important}
  .pitch-tools{margin:8px 0 12px!important;border-radius:14px!important}
  .pitch-tools-head{min-height:75px;padding:11px 10px;gap:8px;grid-template-columns:minmax(0,1fr) 94px}
  .pitch-title-copy .pitch-kicker{font-size:5.5px;margin-bottom:3px}.pitch-title-copy>strong{font-size:11px}.pitch-title-copy>small{font-size:6px;line-height:1.3;margin-top:4px;max-width:38ch}
  .pitch-count-card{min-width:94px;padding:7px 8px;border-radius:11px}.pitch-count-card>small{font-size:5px}.pitch-count-card>b{font-size:23px;margin:3px 0 2px}.pitch-count-card>span{font-size:4.5px}.pitch-count-card>em{font-size:4.8px;padding:2px 5px}
  .pitch-count-lights{padding:7px 10px;gap:15px}.pitch-light-group{gap:6px}.pitch-light-group small{font-size:5px}.pitch-light-group>span{gap:4px}.pitch-light-group i{width:8px;height:8px}
  .pitch-entry-card{padding:10px}.pitch-entry-card-head{margin-bottom:8px}.pitch-entry-card-head strong,.pitch-sequence-head strong{font-size:7.5px}.pitch-entry-card-head small,.pitch-sequence-head small{font-size:5.7px}
  .pitch-entry-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}.pitch-entry-grid label{font-size:5.8px!important}.pitch-entry-grid label>span{margin-bottom:4px}.pitch-entry-grid select,.pitch-entry-grid input,.pitch-velo-wrap{height:40px!important}.pitch-velo-wrap input{height:38px!important;font-size:12px!important}.pitch-velo-wrap>b{font-size:5px;padding-right:7px}
  .pitch-result-field{grid-column:1/-1}.record-pitch-btn{grid-column:1/-1!important;height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;text-align:center!important}.record-pitch-btn>span{font-size:15px}.record-pitch-btn>strong{font-size:7.5px}.record-pitch-btn>small{display:none}
  .pitch-sequence-card{padding:10px}.pitch-sequence-head{margin-bottom:7px}.pitch-sequence-head .small-btn{min-height:28px;padding:0 8px;font-size:6px}.pitch-sequence{grid-template-columns:1fr!important;gap:5px!important;max-height:204px}
  .pitch-chip{min-height:47px!important;padding:6px 7px!important;grid-template-columns:24px minmax(0,1fr) auto!important;gap:6px!important;border-radius:9px!important}.pitch-chip-no{width:23px;height:23px;border-radius:7px;font-size:7px}.pitch-chip-main>strong{font-size:6.7px}.pitch-chip-main>small{font-size:5.3px}.pitch-chip>b{max-width:88px;font-size:5.5px!important;padding:3px 5px}
  .pitch-workflow-note{padding:8px 10px 9px;gap:7px}.pitch-workflow-note>span{font-size:4.8px}.pitch-workflow-note p{font-size:5.8px}
}
@media(max-width:380px){
  .pitch-tools-head{grid-template-columns:minmax(0,1fr) 86px}.pitch-title-copy>small{max-width:29ch}.pitch-count-card>b{font-size:21px}
  .pitch-entry-grid{grid-template-columns:minmax(0,1fr) 92px!important}.pitch-entry-grid select{font-size:8px!important}.pitch-chip>b{max-width:76px}
}


/* ==========================================================
   v37 PREMIUM MOBILE POLISH + GUIDED SCORING
   Presentation-only refinements. Existing score geometry and
   scoring data behavior are intentionally preserved.
   ========================================================== */

/* Drawer: one transform transition only — no overshoot animation. */
.drawer{
  transform:translate3d(-102%,0,0)!important;
  transition:transform .24s cubic-bezier(.22,.72,.22,1)!important;
  will-change:transform;
  animation:none!important;
  contain:layout paint style;
}
.drawer.open{
  transform:translate3d(0,0,0)!important;
  animation:none!important;
}
.drawer-shade{
  opacity:0;
  visibility:visible;
  transition:opacity .20s ease!important;
  will-change:opacity;
}
.drawer-shade.open{opacity:1}

/* Long team names: preserve the full selected name by scaling the
   typography before the select is allowed to truncate. */
.matchup-team select.team-name-long{font-size:9px!important;letter-spacing:-.025em!important;padding-right:14px!important}
.matchup-team select.team-name-xlong{font-size:8px!important;letter-spacing:-.035em!important;padding-right:13px!important}
.team-header-name.team-name-long{font-size:clamp(8.5px,2.5vw,12px)!important;letter-spacing:-.025em!important}
.team-header-name.team-name-xlong{font-size:clamp(7.6px,2.2vw,11px)!important;letter-spacing:-.035em!important}

/* Selected standings team reads as one continuous highlighted row. */
.standings-grid .standings-selected{
  background:color-mix(in srgb,var(--selected) 74%,var(--panel2) 26%)!important;
  color:var(--text)!important;
  font-weight:950!important;
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--accent) 32%,transparent),inset 0 -1px 0 color-mix(in srgb,var(--accent) 32%,transparent)!important;
}
.standings-grid .standings-selected span,.standings-grid .standings-selected b{font-weight:950!important;color:inherit!important}
.standings-grid .standings-selected-start{
  border-left:3px solid color-mix(in srgb,var(--accent) 80%,#fff 20%)!important;
  padding-left:4px!important;
}
.standings-grid .standings-selected-end{box-shadow:inset -1px 0 0 color-mix(in srgb,var(--accent) 34%,transparent),inset 0 1px 0 color-mix(in srgb,var(--accent) 32%,transparent),inset 0 -1px 0 color-mix(in srgb,var(--accent) 32%,transparent)!important}



/* Beginner-friendly path through richer scoring modes. */
.editor-guide{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin:8px 0 12px;
  padding:7px;
  border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line));
  border-radius:12px;
  background:color-mix(in srgb,var(--panel2) 90%,var(--accent) 4%);
}
.editor-guide span{
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:6.8px;
  font-weight:850;
  line-height:1.2;
}
.editor-guide b{
  flex:0 0 auto;
  width:20px;height:20px;
  display:grid;place-items:center;
  border-radius:7px;
  background:color-mix(in srgb,var(--accent) 14%,var(--panel));
  border:1px solid color-mix(in srgb,var(--accent) 48%,var(--line));
  color:var(--accent);
  font-size:7px;
}

@media(max-width:760px){
  /* Home is a fixed phone dashboard. The action grid no longer stretches
     vertically on tall iPhones, which keeps labels large and easy to tap. */
  body.home-page .launch-inner{
    grid-template-rows:auto auto auto auto!important;
    align-content:center!important;
    gap:clamp(7px,1.2dvh,11px)!important;
    padding:calc(max(8px,env(safe-area-inset-top)) + 5px) 0 calc(max(7px,env(safe-area-inset-bottom)) + 5px)!important;
  }
  body.home-page .launch-brand p{font-size:9.5px!important;margin-top:5px!important}
  body.home-page .launch-game-card{padding:clamp(9px,1.25dvh,12px)!important;border-radius:17px!important}
  body.home-page .launch-game-top{padding-bottom:7px!important}
  body.home-page .launch-matchup{padding:clamp(5px,1dvh,9px) 0!important}
  body.home-page .launch-team img{width:clamp(35px,10vw,44px)!important;height:clamp(35px,10vw,44px)!important;margin-bottom:3px!important}
  body.home-page .launch-team strong{font-size:15px!important}
  body.home-page .launch-team small{font-size:6.6px!important;max-width:125px;margin-inline:auto!important}
  body.home-page .launch-score strong{font-size:21px!important}
  body.home-page .launch-primary{min-height:41px!important;font-size:11.5px!important}
  body.home-page .launch-actions{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:repeat(2,clamp(72px,10.5dvh,92px))!important;
    gap:7px!important;
  }
  body.home-page .launch-actions button{
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:31px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-content:center!important;
    align-items:center!important;
    column-gap:9px!important;
    row-gap:2px!important;
    padding:9px 10px!important;
    border-radius:14px!important;
  }
  body.home-page .launch-action-icon{
    grid-row:1/3!important;
    width:30px!important;height:30px!important;
    margin:0!important;
    font-size:14px!important;
  }
  body.home-page .launch-actions strong{font-size:12px!important;line-height:1.05!important}
  body.home-page .launch-actions small{font-size:8px!important;line-height:1.15!important;margin:0!important}
  body.home-page .launch-footer{min-height:18px!important;font-size:7.5px!important}

  /* Make selected team names fit in the Wrigley matchup cards without
     sacrificing the logo or collapse control. */
  .matchup-team select.team-name-long{font-size:8.6px!important}
  .matchup-team select.team-name-xlong{font-size:7.6px!important}
  
  
  
  

  .editor-guide{grid-template-columns:1fr 1fr;gap:5px;margin:6px 0 9px;padding:6px;border-radius:10px}
  .editor-guide span{font-size:6.2px;gap:5px}.editor-guide b{width:18px;height:18px;font-size:6.5px}
}

@media(max-width:760px) and (max-height:700px){
  body.home-page .launch-brand p{display:none!important}
  body.home-page .launch-actions{grid-template-rows:repeat(2,68px)!important}
  body.home-page .launch-actions strong{font-size:11px!important}
  body.home-page .launch-actions small{font-size:7.2px!important}
}

/* v173.1 — compact sheet correction after real-device verification. */
#modeModal .setup-card{
  height:auto!important;
  max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)))!important;
  overflow:hidden!important;
}
#modeModal .setup-step.active{flex:0 1 auto!important;overflow:visible!important}
#modeModal .setup-details-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
#modeModal .setup-details-grid label{min-width:0!important}
#modeModal .setup-details-grid input{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#modeModal input[type="date"],#modeModal input[type="time"]{
  -webkit-appearance:none!important;
  appearance:none!important;
  text-align:left!important;
}
@media(max-width:760px){
  #modeModal .setup-actions{position:static!important;margin-top:8px!important}
  #modeModal .setup-step[data-setup-step="1"].active,
  #modeModal .setup-step[data-setup-step="2"].active{min-height:0!important}
}

@media(prefers-reduced-motion:reduce){
  .drawer,.drawer-shade{transition:none!important}
}


/* ==========================================================
   v38 VERIFIED MOBILE DELIVERY + NATIVE HOME/DRAWER
   This section is intentionally last and highly specific.
   It also ships with cache-busted CSS/JS URLs so deployments
   cannot silently show an older UI shell.
   ========================================================== */
@media (max-width:760px){
  /* Home: compact native dashboard. Nothing stretches to consume leftover height. */
  body.home-page .launch-inner{
    width:min(calc(100% - 24px),600px)!important;
    height:100dvh!important;
    min-height:0!important;
    padding:calc(max(10px,env(safe-area-inset-top)) + 4px) 0 calc(max(8px,env(safe-area-inset-bottom)) + 4px)!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:"brand" "game" "actions" "footer"!important;
    grid-template-rows:max-content max-content max-content max-content!important;
    align-content:start!important;
    gap:clamp(7px,1dvh,10px)!important;
    overflow:hidden!important;
  }
  body.home-page .launch-brand{margin:0!important;padding:0!important}
  body.home-page .launch-diamond{width:34px!important;height:34px!important;margin:0 auto!important}
  body.home-page .launch-brand small{margin:7px 0 3px!important;font-size:7px!important}
  body.home-page .launch-brand h1{font-size:clamp(34px,10vw,42px)!important;line-height:.95!important}
  body.home-page .launch-brand p{margin:5px auto 0!important;font-size:9.4px!important;line-height:1.25!important;max-width:330px!important}

  body.home-page .launch-game-card{
    padding:10px!important;
    border-radius:18px!important;
    box-shadow:0 12px 28px rgba(0,0,0,.20),inset 0 1px rgba(255,255,255,.035)!important;
  }
  body.home-page .launch-game-top{padding-bottom:7px!important;font-size:7.2px!important;letter-spacing:.11em!important}
  body.home-page .launch-game-top .mode-pill{font-size:6.4px!important;padding:4px 7px!important}
  body.home-page .launch-matchup{padding:7px 0!important;gap:6px!important}
  body.home-page .launch-team img{width:40px!important;height:40px!important;margin-bottom:2px!important}
  body.home-page .launch-team strong{font-size:15px!important;line-height:1!important}
  body.home-page .launch-team small{font-size:6.8px!important;margin-top:3px!important;max-width:116px!important}
  body.home-page .launch-score strong{font-size:21px!important;gap:6px!important}
  body.home-page .launch-score small{font-size:6.4px!important;margin-top:2px!important}
  body.home-page .launch-primary{min-height:42px!important;border-radius:12px!important;padding:0 14px!important;font-size:11.5px!important}

  /* The four choices are compact horizontal tiles, not giant empty squares. */
  body.home-page .launch-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,74px)!important;
    gap:8px!important;
    height:156px!important;
    min-height:156px!important;
    align-self:start!important;
  }
  body.home-page .launch-actions button{
    width:100%!important;
    height:74px!important;
    min-height:74px!important;
    padding:9px 10px!important;
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-content:center!important;
    align-items:center!important;
    justify-content:stretch!important;
    column-gap:9px!important;
    row-gap:2px!important;
    border-radius:14px!important;
    text-align:left!important;
  }
  body.home-page .launch-action-icon{
    grid-column:1!important;grid-row:1/3!important;
    width:34px!important;height:34px!important;margin:0!important;
    border-radius:10px!important;font-size:15px!important;
  }
  body.home-page .launch-actions strong{
    grid-column:2!important;grid-row:1!important;
    font-size:12.5px!important;line-height:1.05!important;margin:0!important;
  }
  body.home-page .launch-actions small{
    grid-column:2!important;grid-row:2!important;
    font-size:8.2px!important;line-height:1.1!important;margin:0!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.home-page .launch-footer{min-height:20px!important;padding:0!important;font-size:7.5px!important}
  body.home-page .launch-footer button{font-size:8.2px!important;padding:2px 0!important}

  /* Mobile hamburger menu: NO horizontal slide. It opens as a floating app sheet.
     Only opacity + small vertical scale/translation are animated, eliminating left/right jitter. */
  .drawer{
    left:12px!important;
    right:12px!important;
    top:calc(env(safe-area-inset-top) + 66px)!important;
    bottom:calc(env(safe-area-inset-bottom) + 76px)!important;
    width:auto!important;
    max-width:none!important;
    padding:12px!important;
    border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line))!important;
    border-radius:20px!important;
    overflow-y:auto!important;
    transform:translate3d(0,-8px,0) scale(.985)!important;
    transform-origin:50% 0!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:opacity .16s ease,transform .18s cubic-bezier(.2,.75,.25,1),visibility 0s linear .18s!important;
    animation:none!important;
    contain:paint!important;
    box-shadow:0 22px 54px rgba(0,0,0,.40)!important;
  }
  .drawer.open{
    transform:translate3d(0,0,0) scale(1)!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transition:opacity .16s ease,transform .18s cubic-bezier(.2,.75,.25,1),visibility 0s!important;
    animation:none!important;
  }
  .drawer-shade{
    opacity:0!important;
    transition:opacity .16s ease!important;
    backdrop-filter:blur(2px)!important;
  }
  .drawer-shade.open{opacity:1!important}

  /* Team selectors: use available card width before ellipsis. */
  .matchup-team{min-width:0!important;grid-template-columns:32px minmax(0,1fr)!important;column-gap:5px!important}
  .matchup-team select{min-width:0!important;width:100%!important;padding-left:4px!important;padding-right:17px!important;text-overflow:ellipsis!important}
  .matchup-team select.team-name-long{font-size:8.1px!important;letter-spacing:-.03em!important}
  .matchup-team select.team-name-xlong{font-size:7.3px!important;letter-spacing:-.045em!important}
  
  

  /* Stronger full-row selection in standings. */
  .standings-grid .standings-selected{
    background:color-mix(in srgb,var(--accent) 18%,var(--selected) 82%)!important;
    color:var(--text)!important;
    font-weight:950!important;
  }
  
  .standings-grid .standings-selected-start{border-left:4px solid var(--accent)!important}
  
}

@media (max-width:390px){
  body.home-page .launch-actions{grid-template-rows:repeat(2,70px)!important;height:148px!important;min-height:148px!important}
  body.home-page .launch-actions button{height:70px!important;min-height:70px!important;padding:8px 9px!important}
  body.home-page .launch-actions strong{font-size:11.8px!important}
  body.home-page .launch-actions small{font-size:7.7px!important}
}

@media (max-width:760px) and (max-height:720px){
  body.home-page .launch-brand p{display:none!important}
  body.home-page .launch-diamond{width:30px!important;height:30px!important}
  body.home-page .launch-brand h1{font-size:34px!important}
  body.home-page .launch-actions{grid-template-rows:repeat(2,64px)!important;height:136px!important;min-height:136px!important}
  body.home-page .launch-actions button{height:64px!important;min-height:64px!important}
  body.home-page .launch-game-card{padding:8px!important}
  body.home-page .launch-matchup{padding:5px 0!important}
  body.home-page .launch-team img{width:34px!important;height:34px!important}
}

/* ==========================================================
   v39 MOBILE VIEWPORT + THEME COHESION PASS
   - modal sheets return to 1x after scorecard pinch zoom
   - 16px mobile form controls prevent iOS focus-zoom
   - settings team selectors use full width
   - all modal controls inherit the active theme + dark mode
   - default-theme standings use a true full-row highlight
   - Home actions stay compact instead of becoming empty boxes
   ========================================================== */

/* Theme all app sheets from the same variables used by the scorecard. */
.modal-card{
  background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 94%,#fff 2%),var(--panel))!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
  box-shadow:0 22px 60px rgba(0,0,0,.38)!important;
}
.modal-head{border-color:var(--line)!important}
.modal-head strong,.settings-section h3,.section-row strong{color:var(--text)!important}
.modal-head small,.modal label,.settings-hint,.setting-toggle,.mode-note{color:var(--muted)!important}
.modal-head button{color:var(--text)!important}
.settings-section{border-color:var(--line)!important}
.modal input,.modal select,.modal textarea,
.settings-buttons button,.small-btn,.history-actions button,.modal-actions button{
  background:color-mix(in srgb,var(--panel2) 84%,#fff 4%)!important;
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--line) 86%,var(--accent) 14%)!important;
  box-shadow:none!important;
}
.modal input::placeholder,.modal textarea::placeholder{color:color-mix(in srgb,var(--muted) 78%,transparent)!important}
.modal select option{background:var(--panel2)!important;color:var(--text)!important}
.modal-actions .primary,.record-pitch-btn{
  background:var(--accent)!important;
  color:#102017!important;
  border-color:var(--accent)!important;
}
.modal button:disabled{opacity:.44!important;color:var(--muted)!important}
.setting-toggle input{accent-color:var(--accent)}
body.theme-postseason .modal-actions .primary,
body.theme-postseason .record-pitch-btn{color:#101821!important}
body.dark-mode .modal-card{
  background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 92%,#000 8%),color-mix(in srgb,var(--panel) 96%,#000 4%))!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body.dark-mode .modal input,body.dark-mode .modal select,body.dark-mode .modal textarea,
body.dark-mode .settings-buttons button,body.dark-mode .small-btn,body.dark-mode .history-actions button,
body.dark-mode .modal-actions button{background:color-mix(in srgb,var(--panel2) 90%,#000 10%)!important;color:var(--text)!important}

/* Full-row standings selection. This is intentionally after the palette rules. */
.standings-grid>.standings-selected{
  background:color-mix(in srgb,var(--accent) 24%,var(--panel2) 76%)!important;
  color:var(--text)!important;
  font-weight:950!important;
  border-top:1px solid color-mix(in srgb,var(--accent) 64%,var(--line))!important;
  border-bottom:1px solid color-mix(in srgb,var(--accent) 64%,var(--line))!important;
  text-shadow:0 1px 1px rgba(0,0,0,.16);
}
.standings-grid>.standings-selected-start{
  border-left:4px solid var(--accent)!important;
  border-radius:6px 0 0 6px;
}
.standings-grid>.standings-selected-end{
  border-right:1px solid color-mix(in srgb,var(--accent) 64%,var(--line))!important;
  border-radius:0 6px 6px 0;
}
body.theme-custom .standings-grid>.standings-selected{
  background:color-mix(in srgb,var(--custom-accent-safe,var(--accent)) 25%,var(--custom-grid-head) 75%)!important;
  color:var(--custom-text)!important;
  font-weight:950!important;
}
body.theme-custom.dark-mode .standings-grid>.standings-selected{
  background:color-mix(in srgb,var(--custom-accent-safe,var(--accent)) 20%,var(--custom-panel2) 80%)!important;
  color:var(--custom-text)!important;
}

body.theme-postseason .standings-grid>.standings-selected{
  background:color-mix(in srgb,var(--accent) 22%,#10273c 78%)!important;
  color:#fff8e9!important;
}

@media(max-width:760px){
  /* Reset sheets to an app-sized viewport; JS locks the viewport at 1x while any sheet is open. */
  html.modal-viewport-locked,html.modal-viewport-locked body{touch-action:pan-y!important}
  .modal{
    padding:calc(6px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom))!important;
    align-items:end!important;
    overflow:hidden!important;
  }
  .modal-card{
    width:100%!important;
    max-width:620px!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px)!important;
    margin:0 auto!important;
    border-radius:22px 22px 12px 12px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  /* iOS Safari zooms focused form controls smaller than 16px. Keep every sheet control at 16px. */
  .modal input,.modal select,.modal textarea,
  .play-card input,.play-card select,.settings-card select,
  .sub-row input,.sub-row select,.pitch-entry-grid input,.pitch-entry-grid select{
    font-size:16px!important;
    line-height:1.2!important;
  }
  .modal label{font-size:11px!important;line-height:1.25!important}
  .modal .field-help{font-size:9px!important}

  /* Settings: one team per row gives long MLB names the entire phone width. */
  .settings-card{padding:14px!important}
  .settings-card .form-grid.two{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  .settings-card #awayTeamSetting,.settings-card #homeTeamSetting{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:48px!important;padding:8px 38px 8px 12px!important;
    font-size:16px!important;font-weight:850!important;white-space:nowrap!important;text-overflow:ellipsis!important;
  }
  .settings-card .settings-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .settings-card .settings-buttons button{min-width:0!important;min-height:46px!important;padding:9px 8px!important;font-size:12px!important}
  .settings-card .settings-section h3{font-size:22px!important;margin-bottom:9px!important}
  .settings-card #scoringModeSetting{width:100%!important;min-height:48px!important}

  /* Play Editor returns to normal phone proportions after scorecard zoom. */
  #playModal .play-card{width:100%!important;max-width:620px!important;max-height:calc(100dvh - env(safe-area-inset-top) - 8px)!important}
  #playModal .modal-actions{position:sticky!important;bottom:-1px!important;z-index:8!important;background:var(--panel)!important;padding:10px 0 calc(8px + env(safe-area-inset-bottom))!important}

  /* Home: do not add filler tabs. Make the four useful actions dense and easy to scan. */
  body.home-page .launch-inner{
    gap:clamp(6px,.8dvh,9px)!important;
    align-content:center!important;
  }
  body.home-page .launch-actions{
    grid-template-rows:repeat(2,66px)!important;
    height:140px!important;min-height:140px!important;gap:8px!important;
  }
  body.home-page .launch-actions button{
    height:66px!important;min-height:66px!important;padding:8px 10px!important;
    grid-template-columns:36px minmax(0,1fr)!important;column-gap:9px!important;
  }
  body.home-page .launch-action-icon{width:32px!important;height:32px!important}
  body.home-page .launch-actions strong{font-size:12px!important}
  body.home-page .launch-actions small{font-size:8px!important}
  body.home-page .launch-game-card{padding:9px!important}
  body.home-page .launch-matchup{padding:6px 0!important}
}

@media(max-width:390px){
  body.home-page .launch-actions{grid-template-rows:repeat(2,62px)!important;height:132px!important;min-height:132px!important}
  body.home-page .launch-actions button{height:62px!important;min-height:62px!important}
  .settings-card .settings-buttons{grid-template-columns:1fr 1fr!important}
}
/* Preserve semantic danger actions after generic theme-aware button styling. */
.modal .danger,.settings-card .danger,.confirm-actions .danger{
  color:#ff8178!important;
  border-color:color-mix(in srgb,#ff8178 58%,var(--line))!important;
}

/* ==========================================================
   v40 MODE WORKSPACES + MOBILE NAVIGATION REFINEMENT
   ========================================================== */
.mode-workspace-tabs{
  display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:7px;
  margin:10px 0;padding:6px;border:1px solid var(--line);border-radius:15px;
  background:color-mix(in srgb,var(--panel2) 90%,#000 5%);box-shadow:0 8px 22px rgba(0,0,0,.12)
}
.mode-workspace-tabs button{
  min-height:42px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);
  display:flex;align-items:center;justify-content:center;gap:7px;font-size:10px;font-weight:900;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .14s ease
}
.mode-workspace-tabs button span{font-size:14px;color:var(--accent)}
.mode-workspace-tabs button.active{background:color-mix(in srgb,var(--accent) 12%,var(--panel));border-color:color-mix(in srgb,var(--accent) 40%,var(--line));color:var(--text);box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--accent) 72%,transparent)}
.mode-workspace-tabs button:active{transform:scale(.98)}
.mode-page-shell{max-width:1120px;margin:0 auto;padding:0 0 24px}
.mode-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:16px 2px 12px;padding:0 2px}
.mode-page-head small{display:block;color:var(--accent);font-size:8px;font-weight:950;letter-spacing:.14em}
.mode-page-head h2{margin:4px 0 3px;font-family:Georgia,"Times New Roman",serif;font-size:28px;color:var(--text)}
.mode-page-head p{margin:0;max-width:690px;color:var(--muted);font-size:10px;line-height:1.5}
.mode-page-head>span{flex:0 0 auto;padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel2);color:var(--accent);font-size:8px;font-weight:950;letter-spacing:.05em}
.mode-empty{padding:28px;text-align:center;color:var(--muted)}.mode-empty strong{display:block;color:var(--text);font-size:15px}.mode-empty span{display:block;margin-top:6px;font-size:10px}

/* Automatic play log */
.play-log{display:grid;gap:10px}.play-log-inning{padding:0;overflow:hidden}.play-log-inning-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:var(--panel2);border-bottom:1px solid var(--line)}.play-log-inning-head strong{font-size:11px;color:var(--text)}.play-log-inning-head small{font-size:8px;color:var(--muted)}
.play-log-row{width:100%;min-height:66px;display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 12px;border:0;border-bottom:1px solid color-mix(in srgb,var(--line) 72%,transparent);background:transparent;color:var(--text);text-align:left}.play-log-row:last-child{border-bottom:0}.play-log-row:active{background:color-mix(in srgb,var(--accent) 9%,var(--panel2))}.play-log-seq{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;border:1px solid var(--line);background:var(--panel2);color:var(--accent);font-size:8px;font-weight:950}.play-log-main{min-width:0}.play-log-main strong,.play-log-main b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.play-log-main strong{font-size:10px}.play-log-main b{margin-top:2px;font-size:9px;color:var(--accent)}.play-log-main small,.play-log-main em{display:block;margin-top:3px;font-size:7.5px;color:var(--muted);font-style:normal;line-height:1.35}.play-log-main em{color:color-mix(in srgb,var(--text) 78%,var(--muted))}.play-log-edit{font-size:8px;font-weight:900;color:var(--accent)}

/* Pitch Center */
.pitch-dashboard-grid,.stats-team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pitch-dashboard-card{padding:13px}.pitch-dashboard-head,.stats-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}.pitch-dashboard-head small,.stats-card-head small{display:block;font-size:7px;font-weight:950;color:var(--accent);letter-spacing:.1em}.pitch-dashboard-head strong,.stats-card-head strong{display:block;margin-top:3px;font-size:15px;color:var(--text)}.pitch-dashboard-head>b{font-size:11px;color:var(--accent)}.stats-card-head>span{font-size:7px;color:var(--muted)}
.pitch-kpis,.stats-kpi-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.pitch-kpis span,.stats-kpi-row span{padding:9px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--panel2) 90%,#000 4%);text-align:center}.pitch-kpis b,.stats-kpi-row b{display:block;font-size:15px;color:var(--text)}.pitch-kpis small,.stats-kpi-row small{display:block;margin-top:2px;font-size:6.5px;color:var(--muted)}
.pitch-usage{display:grid;gap:6px;margin-top:10px}.pitch-usage>div{display:grid;grid-template-columns:70px 1fr auto;align-items:center;gap:8px;padding:7px 9px;border-radius:9px;background:color-mix(in srgb,var(--panel2) 84%,transparent);border:1px solid color-mix(in srgb,var(--line) 70%,transparent)}.pitch-usage strong{font-size:9px;color:var(--accent)}.pitch-usage span{font-size:8px;font-weight:900;color:var(--text)}.pitch-usage small{font-size:7px;color:var(--muted)}.pitch-usage-empty{display:block!important;text-align:center;color:var(--muted);font-size:8px}
.pitch-atbats{margin-top:14px}.section-page-title{display:flex;justify-content:space-between;align-items:center;margin:0 2px 8px}.section-page-title strong{font-size:10px;color:var(--text);letter-spacing:.08em}.section-page-title small{font-size:8px;color:var(--muted)}.pitch-atbat{display:block;width:100%;padding:11px;margin-bottom:8px;text-align:left;color:var(--text)}.pitch-atbat-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.pitch-atbat-head strong,.pitch-atbat-head small{display:block}.pitch-atbat-head strong{font-size:10px}.pitch-atbat-head small{margin-top:2px;font-size:7px;color:var(--muted)}.pitch-atbat-head>b{font-size:8px;color:var(--accent)}.pitch-atbat-seq{display:flex;gap:6px;overflow-x:auto;padding:9px 0 6px;scrollbar-width:none}.pitch-atbat-seq::-webkit-scrollbar{display:none}.pitch-atbat-seq>span{flex:0 0 auto;min-width:74px;padding:7px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);font-size:7px;font-weight:900}.pitch-atbat-seq>span>b{margin-right:5px;color:var(--accent)}.pitch-atbat-seq>span small{display:block;margin-top:3px;color:var(--muted);font-weight:700}.pitch-atbat-seq>span.is-strike{border-color:color-mix(in srgb,var(--accent) 60%,var(--line))}.pitch-atbat-seq>span.is-ball{opacity:.82}.pitch-atbat-seq>span.is-play{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent)}.pitch-atbat-result{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:6px;border-top:1px solid color-mix(in srgb,var(--line) 72%,transparent)}.pitch-atbat-result span{font-size:7px;color:var(--muted)}.pitch-atbat-result strong{font-size:8px;color:var(--text)}

/* Automatic stats */
.stats-card{padding:12px;min-width:0}.stats-team-grid{margin-bottom:10px}.stats-scroll{overflow-x:auto;margin:9px -4px -4px;padding:0 4px 4px}.advanced-stats-table{border-collapse:separate;border-spacing:0;min-width:820px;width:100%;font-size:8px}.advanced-stats-table.compact{min-width:360px}.advanced-stats-table th,.advanced-stats-table td{padding:7px 8px;border-right:1px solid color-mix(in srgb,var(--line) 60%,transparent);border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent);text-align:center;white-space:nowrap}.advanced-stats-table th{background:var(--panel2);color:var(--accent);font-size:7px}.advanced-stats-table td{color:var(--text)}.advanced-stats-table th:first-child,.advanced-stats-table td:first-child{text-align:left;position:sticky;left:0;z-index:1;background:var(--panel)}.advanced-stats-table th:first-child{background:var(--panel2)}.stats-empty{padding:20px 8px;text-align:center;color:var(--muted);font-size:8px}.fielding-grid{align-items:start}.pitch-stat-summary{margin-bottom:10px}.pitch-stat-summary .stats-kpi-row{grid-template-columns:repeat(4,minmax(0,1fr))}

/* Home Game Center fills tall phone space with useful mode-specific destinations. */
.launch-mode-hub{grid-area:hub;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--panel) 92%,#fff 2%);padding:9px 10px;box-shadow:0 10px 24px rgba(0,0,0,.11)}
.launch-hub-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.launch-hub-head span{font-size:7px;font-weight:950;letter-spacing:.12em;color:var(--accent)}.launch-hub-head em{font-size:6px;font-style:normal;font-weight:900;color:var(--muted)}.launch-hub-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px}.launch-hub-actions button{min-height:36px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);display:flex;align-items:center;justify-content:center;gap:6px;font-size:8px;font-weight:900}.launch-hub-actions button span{color:var(--accent);font-size:11px}

.settings-buttons #settingsDark.is-on{border-color:color-mix(in srgb,var(--accent) 72%,var(--line))!important;background:color-mix(in srgb,var(--accent) 14%,var(--panel2))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent)!important}

@media(max-width:760px){
  /* Mobile header is intentionally title-only. Menu / Focus / Dark live in the bottom bar. */
  body:not(.home-page) .topbar{grid-template-columns:1fr!important;min-height:calc(62px + env(safe-area-inset-top))!important;padding:calc(8px + env(safe-area-inset-top)) 12px 8px!important}
  body:not(.home-page) .topbar #menuBtn,body:not(.home-page) .topbar .top-actions{display:none!important}
  body:not(.home-page) .topbar h1{grid-column:1!important;font-size:22px!important;justify-self:center!important}
  body:not(.home-page) .topbar .save-status{bottom:4px!important;font-size:7px!important}
  body:not(.home-page) .postseason-banner{grid-column:1!important}

  /* Bottom controls: Menu · Undo · Score · Focus · Dark. Destructive All Clear stays in Settings. */
  body:not(.home-page) .mobile-action-bar{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  body:not(.home-page) .mobile-action-bar #mobileScore{grid-column:3!important}
  body:not(.home-page) .mobile-action-bar #mobileDark.is-mode-on span,body:not(.home-page) .mobile-action-bar #mobileFocus.is-mode-on span{color:var(--accent)!important}

  /* Home content now uses the full phone height without making the four main tiles huge. */
  body.home-page .launch-inner{
    grid-template-areas:"brand" "game" "actions" "hub" "footer"!important;
    grid-template-rows:auto auto auto auto auto!important;
    align-content:space-between!important;
    gap:clamp(6px,1dvh,10px)!important;
    padding:calc(max(10px,env(safe-area-inset-top)) + 6px) 0 calc(max(9px,env(safe-area-inset-bottom)) + 7px)!important;
  }
  body.home-page .launch-brand{margin-top:0!important}
  body.home-page .launch-actions{height:auto!important;min-height:0!important;grid-template-rows:repeat(2,68px)!important}
  body.home-page .launch-actions button{height:68px!important;min-height:68px!important}
  body.home-page .launch-mode-hub{padding:7px 8px!important;border-radius:13px!important}
  body.home-page .launch-hub-head{margin-bottom:5px!important}.launch-hub-actions{gap:5px!important}.launch-hub-actions button{min-height:34px!important;font-size:7.5px!important;padding:0 4px!important}

  .mode-workspace-tabs{position:sticky;top:calc(62px + env(safe-area-inset-top));z-index:24;margin:7px 0;padding:4px;gap:4px;border-radius:13px;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .mode-workspace-tabs button{min-height:39px;gap:4px;font-size:7.5px;padding:0 4px}.mode-workspace-tabs button span{font-size:12px}
  .mode-page-head{margin:12px 3px 9px;align-items:flex-start}.mode-page-head h2{font-size:23px}.mode-page-head p{font-size:8px}.mode-page-head>span{font-size:7px}
  .pitch-dashboard-grid,.stats-team-grid{grid-template-columns:1fr}.pitch-dashboard-card,.stats-card{padding:10px}.pitch-kpis{gap:5px}.pitch-kpis span{padding:7px 4px}.pitch-kpis b{font-size:13px}.pitch-usage>div{grid-template-columns:58px 1fr auto}.play-log-row{grid-template-columns:28px minmax(0,1fr) auto;padding:8px 9px;gap:7px}.play-log-main strong{font-size:9px}.play-log-main b{font-size:8.5px}.play-log-main small,.play-log-main em{font-size:7px}.pitch-stat-summary .stats-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}.advanced-stats-table{font-size:7.5px}
}

@media(max-width:390px){
  body.home-page .launch-actions{grid-template-rows:repeat(2,64px)!important}.launch-hub-actions button b{font-size:7px}.mode-workspace-tabs button b{font-size:7px}
}
/* v40 grid placement guard for desktop Home and hidden mode drawer items. */
.launch-inner{grid-template-areas:"brand game" "actions game" "hub game" "footer footer"}
.drawer-nav[hidden]{display:none!important}

/* v41 — Automatic mode-workspace refinement */
.mode-help-strip{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 12px;margin-bottom:10px;background:color-mix(in srgb,var(--panel) 94%,var(--accent) 2%);border-color:color-mix(in srgb,var(--line) 74%,var(--accent) 16%)}
.mode-help-strip b{font-size:9px;color:var(--text);white-space:nowrap}.mode-help-strip span{font-size:7.5px;line-height:1.45;color:var(--muted);text-align:right}
.mode-summary-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0 0 10px}
.mode-summary-kpis>span{padding:9px 8px;border:1px solid var(--line);border-radius:11px;background:var(--panel);text-align:center}
.mode-summary-kpis b{display:block;font-size:15px;color:var(--text)}.mode-summary-kpis small{display:block;margin-top:2px;font-size:6.5px;color:var(--muted);font-weight:800}
.play-log-filter{display:inline-grid;grid-auto-flow:column;gap:4px;padding:4px;margin:0 0 9px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.play-log-filter button{min-width:72px;height:32px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:7.5px;font-weight:950}
.play-log-filter button.active{background:var(--panel2);color:var(--text);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 45%,var(--line))}
.play-log-inning-head>span strong,.play-log-inning-head>span small{display:block}.play-log-inning-head>em{font-size:7px;font-style:normal;font-weight:900;color:var(--accent);white-space:nowrap}
.play-log-player{display:flex!important;align-items:center;gap:6px;min-width:0}.play-log-player strong{min-width:0;flex:0 1 auto}.play-kind{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:17px;padding:0 6px;border-radius:999px;border:1px solid var(--line);font-size:5.5px!important;font-style:normal!important;font-weight:950!important;letter-spacing:.05em;line-height:1;color:var(--muted)!important;background:var(--panel2)}
.play-kind.hit{color:var(--text)!important;border-color:color-mix(in srgb,var(--accent) 55%,var(--line));background:color-mix(in srgb,var(--accent) 14%,var(--panel2))}.play-kind.out{color:#fff!important;border-color:color-mix(in srgb,#c44 52%,var(--line));background:color-mix(in srgb,#8f2929 60%,var(--panel2))}.play-kind.onbase{color:var(--text)!important;border-color:color-mix(in srgb,var(--accent) 40%,var(--line))}.play-kind.runner{color:var(--accent)!important}

/* Pitch Center: outcome analytics, usage bars, inning totals */
.pitch-kpis-four{grid-template-columns:repeat(4,minmax(0,1fr))}
.pitch-outcomes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:7px}.pitch-outcomes span{padding:7px 4px;border:1px solid color-mix(in srgb,var(--line) 75%,transparent);border-radius:9px;background:color-mix(in srgb,var(--panel2) 88%,transparent);text-align:center}.pitch-outcomes b{display:block;font-size:11px;color:var(--text)}.pitch-outcomes small{display:block;margin-top:2px;font-size:6px;color:var(--muted)}
.pitch-usage{display:grid;gap:5px;margin-top:9px}.pitch-usage>div:not(.pitch-usage-empty){display:grid;grid-template-columns:42px minmax(60px,1fr) 62px 70px;align-items:center;gap:7px;padding:7px 8px;border:1px solid color-mix(in srgb,var(--line) 66%,transparent);border-radius:9px;background:color-mix(in srgb,var(--panel2) 82%,transparent)}.pitch-usage>div>strong{font-size:8px;color:var(--accent)}.pitch-usage>div>span{position:relative;height:6px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--line) 42%,transparent)}.pitch-usage>div>span i{display:block;height:100%;border-radius:999px;background:var(--accent)}.pitch-usage>div>b{font-size:7px;color:var(--text);text-align:right}.pitch-usage>div>small{font-size:6.5px;color:var(--muted);text-align:right}
.pitch-inning-card{padding:11px;margin:10px 0}.pitch-inning-grid{margin-top:8px;border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:10px;overflow:hidden}.pitch-inning-grid>div{display:grid;grid-template-columns:70px repeat(2,minmax(0,1fr));min-height:32px;align-items:center;border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent)}.pitch-inning-grid>div:last-child{border-bottom:0}.pitch-inning-grid span,.pitch-inning-grid strong,.pitch-inning-grid b{text-align:center;font-size:7.5px;color:var(--text)}.pitch-inning-grid strong{color:var(--accent)}.pitch-inning-grid .pitch-inning-head{background:var(--panel2)}.pitch-inning-grid .pitch-inning-head b{font-size:6.5px;color:var(--muted);letter-spacing:.08em}
.pitch-atbat-result strong{display:flex;align-items:center;gap:6px;justify-content:flex-end}.pitch-atbat-result .play-kind{vertical-align:middle}

/* Stats: useful overview + mobile player cards */
.team-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}.team-stat-overview{padding:11px}.team-stat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:9px;border-bottom:1px solid var(--line)}.team-stat-head>span{display:grid;grid-template-columns:30px auto;grid-template-rows:auto auto;column-gap:8px;align-items:center}.team-stat-head img{grid-row:1/3;width:30px;height:30px;object-fit:contain}.team-stat-head b{font-size:11px;color:var(--text)}.team-stat-head small{font-size:6.5px;color:var(--muted)}.team-stat-head>strong{font-size:12px;color:var(--text);white-space:nowrap}.team-stat-head>strong i{font-size:6px;font-style:normal;color:var(--muted)}
.team-stat-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}.team-stat-kpis span{padding:8px 4px;border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:9px;background:var(--panel2);text-align:center}.team-stat-kpis b{display:block;font-size:11px;color:var(--text)}.team-stat-kpis small{display:block;margin-top:2px;font-size:5.8px;color:var(--muted)}.team-stat-detail{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.team-stat-detail span{padding:4px 7px;border-radius:999px;background:color-mix(in srgb,var(--panel2) 86%,transparent);border:1px solid color-mix(in srgb,var(--line) 60%,transparent);font-size:6.5px;color:var(--muted);font-weight:800}
.mobile-player-stats{display:none}.player-stat-card{border-bottom:1px solid color-mix(in srgb,var(--line) 62%,transparent)}.player-stat-card:last-child{border-bottom:0}.player-stat-card summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 2px;cursor:pointer}.player-stat-card summary::-webkit-details-marker{display:none}.player-stat-card summary>span:first-child{min-width:0}.player-stat-card summary strong,.player-stat-card summary small{display:block}.player-stat-card summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:var(--text)}.player-stat-card summary small{margin-top:2px;font-size:6.5px;color:var(--muted)}.player-stat-card summary>span:last-child{text-align:right}.player-stat-card summary>span:last-child b{font-size:12px;color:var(--accent)}.player-stat-card summary>span:last-child small{font-size:5.5px}.player-stat-card[open] summary{border-bottom:1px dashed color-mix(in srgb,var(--line) 60%,transparent)}.player-stat-rates{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:8px 0}.player-stat-rates span{text-align:center;padding:6px 3px;border-radius:8px;background:var(--panel2)}.player-stat-rates b{display:block;font-size:9px;color:var(--text)}.player-stat-rates small{display:block;font-size:5.5px;color:var(--muted)}.player-stat-more{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:0 0 9px}.player-stat-more span{padding:5px 4px;border:1px solid color-mix(in srgb,var(--line) 60%,transparent);border-radius:7px;text-align:center;font-size:6px;color:var(--muted)}.player-stat-more b{color:var(--text)}
.fielding-stat-list{display:grid;gap:5px;margin-top:9px}.fielding-stat-list>div{display:grid;grid-template-columns:42px repeat(4,minmax(0,1fr));align-items:center;gap:5px;padding:7px;border:1px solid color-mix(in srgb,var(--line) 65%,transparent);border-radius:9px;background:color-mix(in srgb,var(--panel2) 84%,transparent)}.fielding-stat-list>div>strong{color:var(--accent);font-size:9px}.fielding-stat-list span{text-align:center}.fielding-stat-list b,.fielding-stat-list small{display:block}.fielding-stat-list b{font-size:9px;color:var(--text)}.fielding-stat-list small{font-size:5.5px;color:var(--muted)}

@media(max-width:760px){
  .mode-help-strip{align-items:flex-start;flex-direction:column;gap:3px;padding:9px 10px}.mode-help-strip b{font-size:8px}.mode-help-strip span{text-align:left;font-size:7px}
  .mode-summary-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.mode-summary-kpis>span{padding:7px 3px}.mode-summary-kpis b{font-size:13px}.mode-summary-kpis small{font-size:5.8px}
  .play-log-filter{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.play-log-filter button{min-width:0}.play-log-inning-head>em{font-size:6.5px}.play-log-player{gap:4px}.play-kind{padding:0 5px;font-size:5px!important}
  .pitch-kpis-four{grid-template-columns:repeat(2,minmax(0,1fr))}.pitch-outcomes{grid-template-columns:repeat(4,minmax(0,1fr))}.pitch-outcomes b{font-size:10px}.pitch-outcomes small{font-size:5.5px}
  .pitch-usage>div:not(.pitch-usage-empty){grid-template-columns:34px minmax(58px,1fr) 55px 58px;gap:5px;padding:6px}.pitch-usage>div>small{font-size:6px}.pitch-inning-grid>div{grid-template-columns:55px repeat(2,minmax(0,1fr))}
  .team-overview-grid{grid-template-columns:1fr}.team-stat-overview{padding:9px}.team-stat-kpis span{padding:7px 3px}.team-stat-detail{gap:4px}.desktop-stats-table{display:none}.mobile-player-stats{display:block}.batting-stats-card{padding-bottom:2px}.player-stat-more{grid-template-columns:repeat(5,minmax(0,1fr))}.fielding-stat-list>div{grid-template-columns:34px repeat(4,minmax(0,1fr))}
}

/* ==========================================================
   v42 PLAY EDITOR READABILITY + ALIGNMENT
   Presentation-only. Keeps all scoring logic and editor order.
   ========================================================== */
.play-card{
  --editor-control-h:44px;
  --editor-label-h:22px;
}
.play-card .modal-head{
  padding-bottom:7px!important;
}
.play-card .modal-head strong{
  font-size:17px;
  line-height:1.05;
  letter-spacing:.015em;
  color:var(--text)!important;
}
.play-card .modal-head small{
  margin-top:4px!important;
  font-size:9px;
  line-height:1.25;
  color:color-mix(in srgb,var(--muted) 92%,var(--text) 8%)!important;
}
.play-card .situation{
  margin-top:8px!important;
  padding:9px 11px!important;
  min-height:40px;
  display:flex;
  align-items:center;
  font-size:13px;
  line-height:1;
  border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line))!important;
}
.play-card .editor-section-title{
  margin:12px 0 5px!important;
  padding-top:10px!important;
  font-size:9px!important;
  line-height:1!important;
  letter-spacing:.12em!important;
  color:color-mix(in srgb,var(--text) 88%,var(--accent) 12%)!important;
}
.play-card .situation + .editor-section-title{
  margin-top:10px!important;
  padding-top:0!important;
}
.play-card .editor-grid{
  margin-top:0!important;
  gap:9px 12px!important;
  align-items:stretch!important;
}
.play-card .editor-grid>label:not(.check-label),
.play-card .runner-out-fields .form-grid.two>label{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
  margin:0!important;
  gap:0!important;
  color:var(--text)!important;
  font-weight:850!important;
}
.play-card .field-label,
.play-card .runner-out-fields .form-grid.two>label>.field-label{
  min-height:var(--editor-label-h)!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:7px!important;
  padding:0 1px 5px!important;
  color:color-mix(in srgb,var(--text) 84%,var(--muted) 16%)!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.01em!important;
  white-space:nowrap;
}
.play-card .field-help{
  display:inline!important;
  flex:0 1 auto;
  margin:0!important;
  padding:0!important;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--muted)!important;
  font-size:7px!important;
  font-weight:750!important;
  line-height:1!important;
  letter-spacing:0!important;
  text-transform:none!important;
  text-align:right;
}
.play-card .editor-grid select,
.play-card .editor-grid input,
.play-card .runner-out-fields .form-grid.two select,
.play-card .runner-out-fields .form-grid.two input{
  box-sizing:border-box!important;
  width:100%!important;
  height:var(--editor-control-h)!important;
  min-height:var(--editor-control-h)!important;
  margin:0!important;
  padding:0 12px!important;
  border-width:1px!important;
  border-radius:10px!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1.15!important;
}
.play-card .check-label{
  min-height:var(--editor-control-h)!important;
  margin:var(--editor-label-h) 0 0!important;
  padding:0 11px!important;
  border:1px solid color-mix(in srgb,var(--line) 84%,var(--accent) 16%);
  border-radius:10px;
  background:color-mix(in srgb,var(--panel2) 88%,transparent);
  color:var(--text)!important;
  font-size:10px!important;
  font-weight:850!important;
}
.play-card .check-label input{
  flex:0 0 auto!important;
  margin:0 7px 0 0!important;
}
.play-card .runner-out-fields{
  margin:11px 0 3px!important;
  padding:10px!important;
}
.play-card .runner-out-title{
  margin-bottom:6px!important;
  font-size:8px!important;
}
.play-card .runner-out-count{
  margin:8px 0 0!important;
}
.play-card .modal-actions{
  gap:8px!important;
  margin-top:12px!important;
}
.play-card .modal-actions button{
  min-height:44px!important;
  padding:0 14px!important;
  border-radius:10px!important;
  font-size:11px!important;
  line-height:1!important;
}

/* Advanced: same 3x3 layout, but every tile has the same dimensions/rhythm. */
.play-card .advanced-tools{
  margin-top:12px!important;
}
.play-card .advanced-layout{
  gap:10px!important;
}
.play-card .defense-field-card,
.play-card .advanced-runner-card{
  padding:10px!important;
  border-radius:13px!important;
}
.play-card .field-card-head{
  min-height:34px!important;
  margin-bottom:7px!important;
}
.play-card .field-card-head strong{
  font-size:9px!important;
}
.play-card .field-card-head small{
  margin-top:2px!important;
  font-size:6.5px!important;
}
.play-card .fielder-grid{
  grid-auto-rows:58px!important;
  gap:6px!important;
  padding:6px!important;
  border-radius:11px!important;
}
.play-card .fielder-grid-pos{
  width:100%!important;
  height:58px!important;
  min-height:58px!important;
  box-sizing:border-box!important;
  padding:6px!important;
  border-radius:9px!important;
}
.play-card .fielder-grid-pos>span{
  width:25px!important;
  height:25px!important;
  border-radius:7px!important;
  font-size:8px!important;
}
.play-card .fielder-grid-pos>strong{
  font-size:7.3px!important;
}
.play-card .fielder-grid-pos>small{
  font-size:5.8px!important;
}
.play-card .fielder-selection{
  min-height:28px!important;
  margin-top:6px!important;
  padding:6px 8px!important;
  font-size:7px!important;
}

/* Pitch-by-Pitch: keep the same sections, reclaim space from explanations. */
.play-card .pitch-tools{
  margin:8px 0 10px!important;
  border-radius:13px!important;
}
.play-card .pitch-tools-head{
  min-height:68px!important;
  padding:10px 12px!important;
  gap:10px!important;
}
.play-card .pitch-title-copy .pitch-kicker{
  margin-bottom:3px!important;
  font-size:5.5px!important;
}
.play-card .pitch-title-copy>strong{
  font-size:13px!important;
  line-height:1!important;
}
.play-card .pitch-title-copy>small{
  max-width:46ch!important;
  margin-top:4px!important;
  font-size:6.5px!important;
  line-height:1.28!important;
}
.play-card .pitch-count-card{
  padding:7px 9px!important;
  border-radius:10px!important;
}
.play-card .pitch-count-card>b{
  margin:2px 0!important;
  font-size:24px!important;
}
.play-card .pitch-count-lights{
  padding:7px 12px!important;
}
.play-card .pitch-entry-card{
  padding:10px 12px 11px!important;
}
.play-card .pitch-entry-card-head{
  margin-bottom:7px!important;
}
.play-card .pitch-entry-card-head strong,
.play-card .pitch-sequence-head strong{
  font-size:8.5px!important;
}
.play-card .pitch-entry-card-head small,
.play-card .pitch-sequence-head small{
  margin-top:2px!important;
  font-size:6px!important;
  line-height:1.25!important;
}
.play-card .pitch-entry-grid{
  gap:8px!important;
}
.play-card .pitch-entry-grid label{
  color:var(--text)!important;
  font-size:8.5px!important;
  font-weight:900!important;
}
.play-card .pitch-entry-grid label>span{
  min-height:20px!important;
  margin-bottom:4px!important;
  align-items:flex-end!important;
}
.play-card .pitch-entry-grid label>span small{
  font-size:6px!important;
}
.play-card .pitch-entry-grid select,
.play-card .pitch-entry-grid input,
.play-card .pitch-velo-wrap{
  box-sizing:border-box!important;
  height:44px!important;
  min-height:44px!important;
  border-radius:10px!important;
}
.play-card .pitch-velo-wrap input{
  height:42px!important;
}
.play-card .record-pitch-btn{
  min-height:44px!important;
  border-radius:10px!important;
}
.play-card .pitch-sequence-card{
  padding:10px 12px 11px!important;
}
.play-card .pitch-sequence-head{
  margin-bottom:7px!important;
}
.play-card .pitch-sequence-head .small-btn{
  min-height:30px!important;
  padding:0 9px!important;
  font-size:7px!important;
}
.play-card .pitch-empty{
  min-height:58px!important;
  padding:9px!important;
  gap:3px!important;
}
.play-card .pitch-empty>strong{
  font-size:8px!important;
}
.play-card .pitch-empty>small{
  font-size:6px!important;
}
.play-card .pitch-workflow-note{
  padding:8px 12px!important;
  gap:7px!important;
}
.play-card .pitch-workflow-note p{
  font-size:6.2px!important;
  line-height:1.3!important;
}
.play-card .editor-guide{
  gap:5px!important;
  margin:7px 0 10px!important;
  padding:6px!important;
}
.play-card .editor-guide span{
  font-size:6.8px!important;
}
.play-card .editor-guide b{
  width:19px!important;
  height:19px!important;
}

@media(max-width:760px){
  .play-card{
    --editor-control-h:48px;
    --editor-label-h:25px;
    padding-inline:12px!important;
  }
  .play-card .modal-head{
    padding:4px 0 9px!important;
  }
  .play-card .modal-head strong{
    font-size:19px!important;
  }
  .play-card .modal-head small{
    font-size:11px!important;
    margin-top:4px!important;
  }
  .play-card .modal-head button{
    width:42px!important;
    height:42px!important;
    font-size:27px!important;
  }
  .play-card .situation{
    min-height:46px!important;
    padding:10px 12px!important;
    font-size:15px!important;
    border-radius:11px!important;
  }
  .play-card .editor-section-title{
    margin:11px 0 5px!important;
    padding-top:10px!important;
    font-size:10.5px!important;
  }
  .play-card .situation + .editor-section-title{
    margin-top:10px!important;
    padding-top:0!important;
  }
  .play-card .editor-grid{
    column-gap:10px!important;
    row-gap:8px!important;
  }
  .play-card .field-label,
  .play-card .runner-out-fields .form-grid.two>label>.field-label{
    min-height:25px!important;
    padding:0 1px 6px!important;
    font-size:13px!important;
    line-height:1!important;
  }
  .play-card .field-help{
    font-size:9px!important;
  }
  /* Preserve Safari anti-zoom while making values visually prominent. */
  .play-card .editor-grid select,
  .play-card .editor-grid input,
  .play-card .runner-out-fields .form-grid.two select,
  .play-card .runner-out-fields .form-grid.two input,
  .play-card .pitch-entry-grid select,
  .play-card .pitch-entry-grid input,
  .play-card .pitch-velo-wrap input{
    font-size:16px!important;
    font-weight:850!important;
  }
  .play-card .check-label{
    min-height:48px!important;
    margin-top:25px!important;
    padding:0 10px!important;
    font-size:12px!important;
  }
  .play-card .modal-actions{
    padding:8px 0 calc(7px + env(safe-area-inset-bottom))!important;
    gap:7px!important;
  }
  .play-card .modal-actions button{
    min-height:48px!important;
    padding:0 8px!important;
    font-size:13px!important;
    border-radius:10px!important;
  }
  .play-card .editor-guide{
    grid-template-columns:1fr 1fr!important;
    margin:6px 0 9px!important;
    padding:5px!important;
  }
  .play-card .editor-guide span{
    min-height:26px!important;
    font-size:7.5px!important;
  }
  .play-card .editor-guide b{
    width:20px!important;
    height:20px!important;
    font-size:7px!important;
  }
  .play-card .pitch-tools-head{
    min-height:66px!important;
    padding:9px 10px!important;
    grid-template-columns:minmax(0,1fr) 100px!important;
  }
  .play-card .pitch-title-copy>strong{
    font-size:14px!important;
  }
  .play-card .pitch-title-copy>small{
    font-size:7px!important;
    line-height:1.25!important;
  }
  .play-card .pitch-count-card{
    min-width:100px!important;
    padding:7px 8px!important;
  }
  .play-card .pitch-count-card>b{
    font-size:24px!important;
  }
  .play-card .pitch-count-lights{
    padding:6px 10px!important;
    gap:16px!important;
  }
  .play-card .pitch-light-group small{
    font-size:6px!important;
  }
  .play-card .pitch-entry-card{
    padding:9px 10px 10px!important;
  }
  .play-card .pitch-entry-card-head{
    margin-bottom:7px!important;
  }
  .play-card .pitch-entry-card-head strong,
  .play-card .pitch-sequence-head strong{
    font-size:9px!important;
  }
  .play-card .pitch-entry-card-head small,
  .play-card .pitch-sequence-head small{
    font-size:6.5px!important;
  }
  .play-card .pitch-entry-grid{
    grid-template-columns:minmax(0,1fr) minmax(112px,.78fr)!important;
    gap:8px!important;
  }
  .play-card .pitch-entry-grid label{
    font-size:11px!important;
  }
  .play-card .pitch-entry-grid label>span{
    min-height:22px!important;
    margin-bottom:5px!important;
  }
  .play-card .pitch-entry-grid label>span small{
    font-size:8px!important;
  }
  .play-card .pitch-entry-grid select,
  .play-card .pitch-entry-grid input,
  .play-card .pitch-velo-wrap{
    height:48px!important;
    min-height:48px!important;
  }
  .play-card .pitch-velo-wrap input{
    height:46px!important;
  }
  .play-card .pitch-velo-wrap>b{
    font-size:7px!important;
  }
  .play-card .pitch-result-field{
    grid-column:1/-1!important;
  }
  .play-card .record-pitch-btn{
    grid-column:1/-1!important;
    min-height:48px!important;
    font-size:12px!important;
  }
  .play-card .record-pitch-btn>strong{
    font-size:11px!important;
  }
  .play-card .pitch-sequence-card{
    padding:9px 10px!important;
  }
  .play-card .pitch-empty{
    min-height:56px!important;
  }
  .play-card .pitch-workflow-note{
    padding:7px 10px!important;
  }
  .play-card .pitch-workflow-note p{
    font-size:7px!important;
  }
  .play-card .advanced-layout{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .play-card .fielder-grid{
    grid-auto-rows:54px!important;
    gap:6px!important;
  }
  .play-card .fielder-grid-pos{
    height:54px!important;
    min-height:54px!important;
    padding:5px!important;
  }
  .play-card .fielder-grid-pos>span{
    width:24px!important;
    height:24px!important;
    font-size:8px!important;
  }
  .play-card .fielder-grid-pos>strong{
    font-size:8px!important;
  }
  .play-card .fielder-grid-pos>small{
    font-size:6px!important;
  }
}

@media(max-width:390px){
  .play-card{
    padding-inline:10px!important;
  }
  .play-card .editor-grid{
    column-gap:8px!important;
  }
  .play-card .field-label{
    font-size:12px!important;
  }
  .play-card .field-help{
    font-size:8px!important;
  }
  .play-card .modal-actions button{
    font-size:12px!important;
  }
}
nn/* ==========================================================
   v43 PLAY EDITOR — VISIBLE READABILITY PASS
   Stronger than v42: real live markup, fixed paired geometry,
   larger primary values, shorter secondary copy, less dead space.
   ========================================================== */
.play-card{
  --v43-control-h:50px;
  --v43-label-row:27px;
}
.play-card .editor-section-title{
  margin:10px 0 6px!important;
  padding-top:9px!important;
  font-size:10px!important;
  letter-spacing:.11em!important;
  line-height:1!important;
}
.play-card .editor-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:10px!important;
  row-gap:8px!important;
  align-items:start!important;
}
.play-card .editor-grid>label:not(.check-label),
.play-card .runner-out-fields .form-grid.two>label:not(.check-label){
  display:grid!important;
  grid-template-rows:var(--v43-label-row) var(--v43-control-h)!important;
  align-content:start!important;
  min-width:0!important;
  gap:0!important;
}
.play-card .field-label,
.play-card .runner-out-fields .form-grid.two>label>.field-label{
  display:flex!important;
  align-items:center!important;
  min-height:var(--v43-label-row)!important;
  height:var(--v43-label-row)!important;
  padding:0 1px 5px!important;
  font-size:11.5px!important;
  font-weight:900!important;
  line-height:1!important;
  color:var(--text)!important;
}
.play-card .field-help{
  margin-left:auto!important;
  max-width:48%!important;
  font-size:7.5px!important;
  font-weight:800!important;
  line-height:1!important;
  color:color-mix(in srgb,var(--muted) 82%,var(--text) 18%)!important;
  white-space:nowrap!important;
}
.play-card .editor-grid select,
.play-card .editor-grid input,
.play-card .runner-out-fields .form-grid.two select,
.play-card .runner-out-fields .form-grid.two input{
  height:var(--v43-control-h)!important;
  min-height:var(--v43-control-h)!important;
  padding:0 13px!important;
  border-radius:10px!important;
  border-width:1.5px!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1!important;
  color:var(--text)!important;
}
.play-card .editor-grid input::placeholder,
.play-card .runner-out-fields input::placeholder{
  color:color-mix(in srgb,var(--muted) 78%,transparent)!important;
  font-weight:750!important;
  opacity:1!important;
}
.play-card .check-label{
  height:var(--v43-control-h)!important;
  min-height:var(--v43-control-h)!important;
  margin:var(--v43-label-row) 0 0!important;
  padding:0 12px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
}
.play-card .situation{
  min-height:44px!important;
  margin-top:7px!important;
  padding:8px 12px!important;
  font-size:14px!important;
  font-weight:950!important;
}
.play-card .modal-head strong{font-size:18px!important}
.play-card .modal-head small{font-size:9.5px!important}

/* Pitch-by-pitch: retain workflow, compress explanatory chrome. */
.play-card .pitch-tools{margin:7px 0 9px!important}
.play-card .pitch-tools-head{
  min-height:58px!important;
  padding:8px 10px!important;
}
.play-card .pitch-title-copy .pitch-kicker{font-size:5.8px!important;margin-bottom:2px!important}
.play-card .pitch-title-copy>strong{font-size:14px!important}
.play-card .pitch-title-copy>small{
  margin-top:3px!important;
  font-size:6.6px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.play-card .pitch-count-card{padding:6px 8px!important}
.play-card .pitch-count-card>b{font-size:25px!important}
.play-card .pitch-count-lights{padding:5px 10px!important}
.play-card .pitch-entry-card{padding:8px 10px 9px!important}
.play-card .pitch-entry-card-head{margin-bottom:5px!important}
.play-card .pitch-entry-card-head strong{font-size:9px!important}
.play-card .pitch-entry-card-head small{font-size:6.2px!important}
.play-card .pitch-entry-grid{
  grid-template-columns:minmax(0,1.15fr) minmax(110px,.85fr)!important;
  gap:8px!important;
}
.play-card .pitch-entry-grid label{font-size:9.5px!important;color:var(--text)!important}
.play-card .pitch-entry-grid label>span{height:23px!important;min-height:23px!important;margin:0 0 4px!important;align-items:center!important}
.play-card .pitch-entry-grid label>span small{font-size:6.5px!important}
.play-card .pitch-entry-grid select,
.play-card .pitch-entry-grid input,
.play-card .pitch-velo-wrap{
  height:48px!important;
  min-height:48px!important;
  border-radius:10px!important;
}
.play-card .pitch-result-field{grid-column:1/-1!important}
.play-card .record-pitch-btn{grid-column:1/-1!important;min-height:46px!important;border-radius:10px!important}
.play-card .record-pitch-btn>strong{font-size:11px!important}
.play-card .record-pitch-btn>small{font-size:6px!important}
.play-card .pitch-sequence-card{padding:8px 10px!important}
.play-card .pitch-sequence-head{margin-bottom:5px!important}
.play-card .pitch-empty{min-height:42px!important;padding:7px!important}
.play-card .pitch-empty>strong{font-size:8.5px!important}
.play-card .pitch-empty>small{font-size:6px!important}
.play-card .pitch-workflow-note{padding:6px 9px!important}
.play-card .pitch-workflow-note p{font-size:6.4px!important;line-height:1.2!important}
.play-card .editor-guide{margin:6px 0 8px!important;padding:5px!important;gap:4px!important}
.play-card .editor-guide span{min-height:24px!important;font-size:7.2px!important}
.play-card .editor-guide b{width:19px!important;height:19px!important}

/* Advanced tiles: truly uniform dimensions. */
.play-card .fielder-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:54px!important;
  gap:6px!important;
}
.play-card .fielder-grid-pos{
  width:100%!important;
  height:54px!important;
  min-height:54px!important;
  padding:5px 6px!important;
  box-sizing:border-box!important;
}

@media(max-width:760px){
  .play-card{
    --v43-control-h:52px;
    --v43-label-row:30px;
    padding-inline:12px!important;
  }
  .play-card .modal-head{padding:3px 0 7px!important}
  .play-card .modal-head strong{font-size:21px!important}
  .play-card .modal-head small{font-size:11px!important;color:color-mix(in srgb,var(--muted) 78%,var(--text) 22%)!important}
  .play-card .situation{min-height:48px!important;font-size:16px!important;padding:8px 12px!important}
  .play-card .editor-section-title{font-size:11px!important;margin:10px 0 5px!important}
  .play-card .field-label,
  .play-card .runner-out-fields .form-grid.two>label>.field-label{
    height:30px!important;
    min-height:30px!important;
    padding-bottom:6px!important;
    font-size:14px!important;
  }
  .play-card .field-help{font-size:9px!important;max-width:46%!important}
  .play-card .editor-grid select,
  .play-card .editor-grid input,
  .play-card .runner-out-fields .form-grid.two select,
  .play-card .runner-out-fields .form-grid.two input{
    height:52px!important;
    min-height:52px!important;
    padding:0 13px!important;
    font-size:17px!important;
    border-width:1.5px!important;
  }
  .play-card .check-label{height:52px!important;min-height:52px!important;margin-top:30px!important;font-size:13px!important}
  .play-card .pitch-tools-head{min-height:60px!important;padding:7px 9px!important;grid-template-columns:minmax(0,1fr) 98px!important}
  .play-card .pitch-title-copy>strong{font-size:15px!important}
  .play-card .pitch-title-copy>small{font-size:7px!important}
  .play-card .pitch-count-card{min-width:98px!important}
  .play-card .pitch-count-card>b{font-size:25px!important}
  .play-card .pitch-entry-grid label{font-size:12px!important}
  .play-card .pitch-entry-grid label>span{height:25px!important;min-height:25px!important;margin-bottom:4px!important}
  .play-card .pitch-entry-grid label>span small{font-size:8px!important}
  .play-card .pitch-entry-grid select,
  .play-card .pitch-entry-grid input,
  .play-card .pitch-velo-wrap{height:52px!important;min-height:52px!important}
  .play-card .pitch-velo-wrap input{height:50px!important;font-size:17px!important}
  .play-card .record-pitch-btn{min-height:50px!important}
  .play-card .pitch-empty{min-height:44px!important}
  .play-card .editor-guide{grid-template-columns:1fr 1fr!important}
  .play-card .editor-guide span{font-size:8.2px!important}
  .play-card .modal-actions button{min-height:50px!important;font-size:14px!important}
}

@media(max-width:390px){
  .play-card .editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:8px!important}
  .play-card .field-label{font-size:13px!important}
  .play-card .field-help{font-size:8px!important}
  .play-card .editor-grid select,.play-card .editor-grid input{font-size:16px!important}
}

/* ==========================================================
   v44 UNIFIED PLAY EDITOR — MOBILE READABILITY SYSTEM
   Applies to Basic, Advanced, and Pitch-by-Pitch.
   Same workflow/layout; larger readable copy and tighter chrome.
   ========================================================== */
.play-card{
  --v44-control-h:52px;
  --v44-label-h:30px;
}
.play-card .editor-section-title{
  margin:12px 0 7px!important;
  padding-top:10px!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:.1em!important;
  line-height:1.1!important;
  color:var(--accent)!important;
}
.play-card .editor-grid,
.play-card .runner-out-fields .form-grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:12px!important;
  row-gap:9px!important;
  align-items:start!important;
}
.play-card .editor-grid>label:not(.check-label),
.play-card .runner-out-fields .form-grid.two>label:not(.check-label){
  display:grid!important;
  grid-template-rows:var(--v44-label-h) var(--v44-control-h)!important;
  min-width:0!important;
  gap:0!important;
  align-content:start!important;
}
.play-card .field-label,
.play-card .runner-out-fields .form-grid.two>label>.field-label{
  display:flex!important;
  align-items:center!important;
  min-height:var(--v44-label-h)!important;
  height:var(--v44-label-h)!important;
  padding:0 2px 6px!important;
  color:var(--text)!important;
  font-size:14px!important;
  font-weight:950!important;
  line-height:1!important;
}
.play-card .field-help{
  display:inline!important;
  margin:0 0 0 auto!important;
  max-width:52%!important;
  color:color-mix(in srgb,var(--muted) 72%,var(--text) 28%)!important;
  font-size:9.5px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.play-card .editor-grid select,
.play-card .editor-grid input,
.play-card .runner-out-fields .form-grid.two select,
.play-card .runner-out-fields .form-grid.two input{
  width:100%!important;
  height:var(--v44-control-h)!important;
  min-height:var(--v44-control-h)!important;
  box-sizing:border-box!important;
  padding:0 14px!important;
  border-width:1.5px!important;
  border-radius:11px!important;
  color:var(--text)!important;
  font-size:17px!important;
  font-weight:900!important;
  line-height:1.1!important;
}
.play-card .editor-grid input::placeholder,
.play-card .runner-out-fields input::placeholder{
  color:color-mix(in srgb,var(--muted) 76%,var(--text) 24%)!important;
  font-size:16px!important;
  font-weight:750!important;
  opacity:.86!important;
}
.play-card .check-label{
  height:var(--v44-control-h)!important;
  min-height:var(--v44-control-h)!important;
  margin:var(--v44-label-h) 0 0!important;
  padding:0 12px!important;
  font-size:13px!important;
  font-weight:850!important;
}
.play-card .situation{
  min-height:50px!important;
  margin-top:7px!important;
  padding:10px 14px!important;
  font-size:17px!important;
  font-weight:950!important;
  line-height:1!important;
}
.play-card .modal-head strong{font-size:21px!important;line-height:1!important}
.play-card .modal-head small{margin-top:5px!important;font-size:12px!important;line-height:1.2!important}
.play-card .runner-out-title{font-size:11px!important}
.play-card .modal-actions button{font-size:14px!important;font-weight:950!important}

/* Advanced — keep the 3x3 grid but stop using miniature typography. */
.play-card .advanced-title{margin-top:14px!important}
.play-card .field-card-head{min-height:42px!important;margin-bottom:8px!important}
.play-card .field-card-head strong{font-size:12px!important;line-height:1.1!important}
.play-card .field-card-head small{margin-top:4px!important;font-size:10px!important;line-height:1.2!important}
.play-card .field-card-head button{min-height:34px!important;font-size:10px!important}
.play-card .fielder-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:68px!important;
  gap:7px!important;
}
.play-card .fielder-grid-pos{
  height:68px!important;
  min-height:68px!important;
  padding:7px 8px!important;
  gap:3px 7px!important;
}
.play-card .fielder-grid-pos>span{
  width:29px!important;height:29px!important;
  font-size:10px!important;
}
.play-card .fielder-grid-pos>strong{
  font-size:10px!important;
  line-height:1.08!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.play-card .fielder-grid-pos>small{font-size:8px!important;line-height:1!important}
.play-card .fielder-selection{min-height:34px!important;padding:8px 10px!important;font-size:10px!important}
.play-card .advanced-runner-row{gap:8px!important;padding:9px!important}
.play-card .advanced-runner-row label{font-size:11px!important;line-height:1.15!important}
.play-card .advanced-runner-row select,
.play-card .advanced-runner-row input{height:48px!important;min-height:48px!important;font-size:16px!important}
.play-card .runner-ident strong{font-size:12px!important}.play-card .runner-ident small{font-size:9px!important}
.play-card .runner-empty{font-size:11px!important;line-height:1.35!important;padding:13px!important}

/* Pitch-by-Pitch — larger copy, fewer tiny explanatory lines. */
.play-card[data-editor-mode="pitch"] .pitch-tools{margin:8px 0 10px!important}
.play-card .pitch-tools-head{
  min-height:72px!important;
  padding:10px 12px!important;
  grid-template-columns:minmax(0,1fr) 112px!important;
  gap:12px!important;
}
.play-card .pitch-title-copy .pitch-kicker{
  margin-bottom:4px!important;
  font-size:9px!important;
  font-weight:950!important;
  letter-spacing:.12em!important;
}
.play-card .pitch-title-copy>strong{font-size:18px!important;line-height:1!important}
.play-card .pitch-title-copy>small{
  display:block!important;
  margin-top:5px!important;
  max-width:34ch!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  white-space:normal!important;
}
.play-card .pitch-count-card{padding:8px 9px!important}
.play-card .pitch-count-card>small{font-size:8px!important}
.play-card .pitch-count-card>b{font-size:25px!important}
.play-card .pitch-count-card>span{font-size:7.5px!important}
.play-card .pitch-count-card>em{font-size:7.5px!important}
.play-card .pitch-count-lights{padding:8px 12px!important;gap:18px!important}
.play-card .pitch-light-group small{font-size:9px!important}
.play-card .pitch-entry-card{padding:10px 12px 11px!important}
.play-card .pitch-entry-card-head{margin-bottom:8px!important}
.play-card .pitch-entry-card-head strong,
.play-card .pitch-sequence-head strong{font-size:12px!important;line-height:1.1!important}
.play-card .pitch-entry-card-head small,
.play-card .pitch-sequence-head small{margin-top:3px!important;font-size:9.5px!important;line-height:1.25!important}
.play-card .pitch-entry-grid{gap:9px!important}
.play-card .pitch-entry-grid label{font-size:14px!important;font-weight:950!important;line-height:1!important}
.play-card .pitch-entry-grid label>span{min-height:27px!important;margin-bottom:5px!important;align-items:center!important}
.play-card .pitch-entry-grid label>span small{font-size:9px!important}
.play-card .pitch-entry-grid select,
.play-card .pitch-entry-grid input,
.play-card .pitch-velo-wrap{
  height:52px!important;
  min-height:52px!important;
  border-radius:11px!important;
}
.play-card .pitch-entry-grid select,
.play-card .pitch-entry-grid input{font-size:17px!important;font-weight:900!important}
.play-card .pitch-velo-wrap input{height:50px!important}
.play-card .pitch-velo-wrap>b{font-size:9px!important}
.play-card .record-pitch-btn{min-height:52px!important;border-radius:11px!important}
.play-card .record-pitch-btn>strong{font-size:14px!important}
.play-card .record-pitch-btn>small{display:none!important}
.play-card .pitch-sequence-card{padding:10px 12px!important}
.play-card .pitch-sequence-head{margin-bottom:7px!important}
.play-card .pitch-sequence-head .small-btn{min-height:34px!important;font-size:10px!important}
.play-card .pitch-empty{
  min-height:48px!important;
  padding:8px 10px!important;
  gap:3px!important;
}
.play-card .pitch-empty>strong{font-size:11px!important}
.play-card .pitch-empty>small{font-size:9.5px!important}
.play-card .pitch-chip{font-size:11px!important;padding:9px 10px!important}
.play-card .pitch-chip small{font-size:9px!important}
.play-card .pitch-workflow-note{padding:8px 10px!important;gap:8px!important}
.play-card .pitch-workflow-note>span{font-size:8px!important}
.play-card .pitch-workflow-note p{font-size:10px!important;line-height:1.25!important}
.play-card .editor-guide{gap:6px!important;margin:7px 0 10px!important;padding:7px!important}
.play-card .editor-guide span{min-height:30px!important;font-size:10px!important;font-weight:850!important}
.play-card .editor-guide b{width:22px!important;height:22px!important;font-size:8px!important}

@media(max-width:760px){
  .play-card{--v44-control-h:54px;--v44-label-h:32px;padding-inline:13px!important}
  .play-card .editor-section-title{font-size:12.5px!important;margin:12px 0 7px!important}
  .play-card .field-label,
  .play-card .runner-out-fields .form-grid.two>label>.field-label{font-size:15px!important}
  .play-card .field-help{font-size:10px!important}
  .play-card .editor-grid select,
  .play-card .editor-grid input,
  .play-card .runner-out-fields .form-grid.two select,
  .play-card .runner-out-fields .form-grid.two input{font-size:18px!important}
  .play-card .editor-grid input::placeholder,
  .play-card .runner-out-fields input::placeholder{font-size:17px!important}
  .play-card .modal-head strong{font-size:22px!important}
  .play-card .modal-head small{font-size:13px!important}
  .play-card .situation{font-size:18px!important}
  .play-card .modal-actions button{min-height:52px!important;font-size:15px!important}
  .play-card .advanced-layout{grid-template-columns:1fr!important}
  .play-card .field-card-head strong{font-size:13px!important}
  .play-card .field-card-head small{font-size:10.5px!important}
  .play-card .fielder-grid{grid-auto-rows:70px!important}
  .play-card .fielder-grid-pos{height:70px!important;min-height:70px!important}
  .play-card .fielder-grid-pos>strong{font-size:10.5px!important}
  .play-card .fielder-grid-pos>small{font-size:8.5px!important}
  .play-card .advanced-runner-row label{font-size:12px!important}
  .play-card .pitch-title-copy>strong{font-size:19px!important}
  .play-card .pitch-title-copy>small{font-size:11px!important;max-width:28ch!important}
  .play-card .pitch-light-group small{font-size:9.5px!important}
  .play-card .pitch-entry-card-head strong,
  .play-card .pitch-sequence-head strong{font-size:13px!important}
  .play-card .pitch-entry-card-head small,
  .play-card .pitch-sequence-head small{font-size:10px!important}
  .play-card .pitch-entry-grid label{font-size:15px!important}
  .play-card .pitch-entry-grid select,
  .play-card .pitch-entry-grid input{font-size:18px!important}
  .play-card .pitch-workflow-note p{font-size:10.5px!important}
  .play-card .editor-guide span{font-size:10.5px!important}
}

@media(max-width:390px){
  .play-card{padding-inline:10px!important}
  .play-card .editor-grid{column-gap:8px!important}
  .play-card .field-label{font-size:14px!important}
  .play-card .field-help{font-size:9px!important}
  .play-card .pitch-tools-head{grid-template-columns:minmax(0,1fr) 102px!important}
  .play-card .pitch-title-copy>small{font-size:10px!important;max-width:25ch!important}
  .play-card .pitch-entry-grid{grid-template-columns:minmax(0,1.1fr) minmax(105px,.8fr)!important}
  .play-card .fielder-grid-pos>strong{font-size:9.5px!important}
}


/* ==========================================================
   v45 MODAL SCROLL LOCK + SCORING GRID REFINEMENT
   - Background page stays fixed while any editor/modal is open.
   - Scoring is an even 2x2 field system in every scoring mode.
   - Checkbox controls no longer inherit giant generic input sizing.
   ========================================================== */
html.modal-scroll-locked,
body.modal-scroll-locked{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
.modal:not(.hidden){overscroll-behavior:contain!important}
.modal:not(.hidden) .modal-card{
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y!important;
}

.play-card .scoring-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px 12px!important;
  align-items:start!important;
  margin-top:0!important;
}
.play-card .scoring-grid>label{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  grid-template-rows:var(--v44-label-h) var(--v44-control-h)!important;
  gap:0!important;
  align-content:start!important;
}
.play-card .scoring-grid .field-label{
  width:100%!important;
  height:var(--v44-label-h)!important;
  min-height:var(--v44-label-h)!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding:0 2px 6px!important;
  text-align:left!important;
}
.play-card .scoring-grid select{
  width:100%!important;
  max-width:none!important;
  height:var(--v44-control-h)!important;
  min-height:var(--v44-control-h)!important;
  margin:0!important;
  padding:0 14px!important;
  box-sizing:border-box!important;
  border-width:1.5px!important;
  border-radius:11px!important;
  font-size:17px!important;
  font-weight:900!important;
  line-height:1!important;
}
.play-card .batter-scored-field{
  display:grid!important;
  grid-template-rows:var(--v44-label-h) var(--v44-control-h)!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:0!important;
}
.play-card .score-check-control{
  width:100%!important;
  height:var(--v44-control-h)!important;
  min-height:var(--v44-control-h)!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:11px!important;
  padding:0 14px!important;
  border:1.5px solid var(--line)!important;
  border-radius:11px!important;
  background:var(--panel2)!important;
  color:var(--text)!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1.05!important;
  overflow:hidden!important;
}
.play-card .score-check-control input[type="checkbox"]{
  -webkit-appearance:auto!important;
  appearance:auto!important;
  display:block!important;
  flex:0 0 22px!important;
  width:22px!important;
  min-width:22px!important;
  max-width:22px!important;
  height:22px!important;
  min-height:22px!important;
  max-height:22px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:5px!important;
  accent-color:var(--accent)!important;
  background:transparent!important;
  box-shadow:none!important;
}
.play-card .score-check-control>span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
/* All checkbox rows in the editor stay compact even under generic modal input rules. */
.play-card .check-label input[type="checkbox"]{
  -webkit-appearance:auto!important;
  appearance:auto!important;
  width:22px!important;
  min-width:22px!important;
  max-width:22px!important;
  height:22px!important;
  min-height:22px!important;
  max-height:22px!important;
  margin:0 9px 0 0!important;
  padding:0!important;
  flex:0 0 22px!important;
  accent-color:var(--accent)!important;
}

@media(max-width:760px){
  .play-card .scoring-grid{gap:9px 10px!important}
  .play-card .scoring-grid select{font-size:18px!important}
  .play-card .score-check-control{font-size:14px!important;padding:0 12px!important;gap:9px!important}
}
@media(max-width:390px){
  .play-card .scoring-grid{gap:8px!important}
  .play-card .score-check-control{font-size:13px!important;padding:0 10px!important}
}

/* ==========================================================
   v46 SCORING PANEL + HARD iOS MODAL LOCK
   New markup intentionally avoids inherited form-grid/label sizing.
   ========================================================== */
html.modal-scroll-locked,
body.modal-scroll-locked{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
body.modal-scroll-locked #appShell,
body.modal-scroll-locked #main{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
.modal:not(.hidden){
  position:fixed!important;
  inset:0!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
.modal:not(.hidden)>.modal-card{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
}

.play-card .scoring-title{
  margin-bottom:8px!important;
}
.play-card .scoring-panel{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  align-items:stretch!important;
}
.play-card .score-field-card{
  min-width:0!important;
  min-height:84px!important;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:20px 1fr!important;
  align-content:stretch!important;
  padding:9px 12px 8px!important;
  border:1.5px solid var(--line)!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--panel2) 92%,#000 3%)!important;
  color:var(--text)!important;
  overflow:hidden!important;
}


.play-card .score-field-title{
  display:block!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  color:color-mix(in srgb,var(--text) 78%,var(--muted) 22%)!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  text-align:left!important;
}

.play-card .score-field-card>select{
  -webkit-appearance:auto!important;
  appearance:auto!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  height:45px!important;
  min-height:45px!important;
  margin:0!important;
  padding:0 30px 0 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  font-size:20px!important;
  font-weight:950!important;
  line-height:1!important;
  text-align:left!important;
}

.play-card .score-toggle-control{
  position:relative!important;
  min-width:0!important;
  width:100%!important;
  height:45px!important;
  min-height:45px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  color:inherit!important;
  cursor:pointer!important;
}
.play-card .score-toggle-control>input[type="checkbox"]{
  position:absolute!important;
  width:1px!important;
  min-width:1px!important;
  max-width:1px!important;
  height:1px!important;
  min-height:1px!important;
  max-height:1px!important;
  margin:-1px!important;
  padding:0!important;
  opacity:0!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  white-space:nowrap!important;
  border:0!important;
  pointer-events:none!important;
}
.play-card .score-toggle-copy{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:inherit!important;
  font-size:16px!important;
  font-weight:900!important;
  line-height:1!important;
}
.play-card .score-toggle-track{
  flex:0 0 46px!important;
  width:46px!important;
  height:26px!important;
  padding:2px!important;
  box-sizing:border-box!important;
  border:1.5px solid var(--line)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--panel) 86%,#000 8%)!important;
  transition:background .16s ease,border-color .16s ease!important;
}
.play-card .score-toggle-track>i{
  display:block!important;
  width:20px!important;
  height:20px!important;
  border-radius:50%!important;
  background:var(--muted)!important;
  transform:translateX(0)!important;
  transition:transform .16s ease,background .16s ease!important;
}
.play-card .score-toggle-control>input:checked~.score-toggle-track{
  background:color-mix(in srgb,var(--accent) 34%,var(--panel2))!important;
  border-color:var(--accent)!important;
}
.play-card .score-toggle-control>input:checked~.score-toggle-track>i{
  transform:translateX(20px)!important;
  background:var(--accent)!important;
}
.play-card .score-toggle-control:focus-within .score-toggle-track{
  outline:2px solid color-mix(in srgb,var(--accent) 65%,transparent)!important;
  outline-offset:2px!important;
}

@media(max-width:760px){
  .play-card .scoring-panel{gap:8px!important}
  .play-card .score-field-card{min-height:78px!important;padding:8px 10px 7px!important;grid-template-rows:18px 1fr!important;border-radius:11px!important}
  .play-card .score-field-title{font-size:10px!important}
  .play-card .score-field-card>select{height:43px!important;min-height:43px!important;font-size:18px!important}
  .play-card .score-toggle-control{height:43px!important;min-height:43px!important}
  .play-card .score-toggle-copy{font-size:15px!important}
}
@media(max-width:365px){
  .play-card .score-toggle-copy{font-size:13px!important}
  .play-card .score-toggle-track{flex-basis:42px!important;width:42px!important;height:24px!important}
  .play-card .score-toggle-track>i{width:18px!important;height:18px!important}
  .play-card .score-toggle-control>input:checked~.score-toggle-track>i{transform:translateX(18px)!important}
}

/* ==========================================================
   v47 UX PHASE 1 — GUIDED NEW GAME + UNIFORM MENU
   Core scorecard and scoring geometry are intentionally unchanged.
   ========================================================== */

/* Uniform hamburger menu rows. Theme is now a normal row that opens
   its own sheet instead of dominating the drawer. */
.drawer-head>div{display:flex;flex-direction:column;gap:2px}.drawer-head>div small{font-size:8px;color:var(--muted);font-weight:800;letter-spacing:.04em}
.drawer .menu-row{
  width:100%!important;min-height:52px!important;height:52px!important;
  display:grid!important;grid-template-columns:30px minmax(0,1fr) auto!important;
  align-items:center!important;gap:9px!important;padding:6px 9px!important;margin:0!important;
  border:1px solid transparent!important;border-radius:11px!important;background:transparent!important;
  color:var(--text)!important;text-align:left!important;transform:none!important;box-shadow:none!important;
  transition:background .14s ease,border-color .14s ease,opacity .14s ease!important;
}
.drawer .menu-row+.menu-row{margin-top:5px!important}
.drawer .menu-row:hover{transform:none!important;background:color-mix(in srgb,var(--panel2) 82%,#fff 6%)!important}
.drawer .drawer-nav.active{background:color-mix(in srgb,var(--selected) 78%,var(--panel2) 22%)!important;border-color:color-mix(in srgb,var(--accent) 34%,transparent)!important}
.drawer .menu-glyph{width:28px!important;height:28px!important;font-size:16px!important;color:var(--accent)!important;display:grid!important;place-items:center!important}
.drawer .menu-copy{min-width:0;display:flex;flex-direction:column;gap:2px!important;line-height:1.05}
.drawer .menu-copy strong{font-size:11px!important;color:var(--text)!important;font-weight:900!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drawer .menu-copy small{font-size:7.5px!important;line-height:1.15!important;color:var(--muted)!important;font-weight:750!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drawer .menu-trailing{font-size:15px;color:var(--accent);opacity:.85}
.drawer .menu-value{max-width:118px;padding:4px 7px;border-radius:999px;background:color-mix(in srgb,var(--panel) 72%,transparent);color:var(--muted);font-size:7px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drawer .menu-badge{min-width:24px!important;padding:4px 7px!important;border-radius:999px!important;background:color-mix(in srgb,var(--accent) 14%,var(--panel))!important;color:var(--accent)!important;font-size:7px!important}
.drawer .import-button{cursor:pointer}.drawer .desktop-menu-row{display:grid!important}
.drawer-section{padding:10px 0!important}.drawer-label{margin:0 8px 7px!important}

/* Dedicated theme picker — equal visual weight for each theme. */
.theme-picker-card{max-width:720px!important}.theme-picker-list{display:grid;gap:8px;margin-top:10px}
.theme-picker-list .theme-choice{width:100%;min-height:68px!important;display:grid;grid-template-columns:44px minmax(0,1fr) 24px;align-items:center;gap:10px;padding:9px 11px;border:1px solid var(--line);border-radius:13px;background:var(--panel2);color:var(--text);text-align:left}
.theme-picker-list .theme-choice strong{font-size:12px!important}.theme-picker-list .theme-choice small{font-size:8px!important;color:var(--muted)!important}
.theme-picker-list .theme-choice.active{border-color:var(--accent)!important;background:color-mix(in srgb,var(--selected) 74%,var(--panel2) 26%)!important}
.theme-picker-list .theme-sub{margin:0 8px 3px 54px!important;padding:8px 9px!important}

/* Guided New Game setup. */
.setup-card{max-width:860px!important;overflow:auto!important}.setup-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 14px}
.setup-progress span{position:relative;min-width:0;display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 8px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--panel2) 88%,transparent);color:var(--muted)}
.setup-progress span b{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--line);font-size:8px}.setup-progress span em{font-size:8px;font-style:normal;font-weight:900}
.setup-progress span.active{border-color:var(--accent);color:var(--text);background:color-mix(in srgb,var(--accent) 10%,var(--panel2))}.setup-progress span.active b,.setup-progress span.done b{background:var(--accent);border-color:var(--accent);color:var(--accent-ink,#08120d)}
.setup-progress span.done{color:var(--text)}
.first-game-tip{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;padding:10px 12px;margin-bottom:12px;border:1px solid color-mix(in srgb,var(--accent) 46%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--accent) 8%,var(--panel2))}
.first-game-tip strong{font-size:10px;color:var(--accent)}.first-game-tip span{font-size:8px;line-height:1.4;color:var(--muted);font-weight:750}
.setup-step{display:none}.setup-step.active{display:block;animation:setupStepIn .22s ease both}@keyframes setupStepIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.setup-heading{display:flex;flex-direction:column;gap:4px;margin:4px 0 12px}.setup-heading strong{font-size:18px;color:var(--text)}.setup-heading small{font-size:9px;line-height:1.35;color:var(--muted)}
.setup-card .mode-options{grid-template-columns:1fr!important;gap:8px!important}.setup-card .mode-option{min-height:92px!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) auto!important;grid-template-rows:auto!important;align-items:center!important;gap:11px!important;padding:10px 12px!important;border-radius:13px!important;transform:none!important}
.setup-card .mode-option:hover{transform:none!important}.setup-card .mode-option.selected{border-color:var(--accent)!important;background:color-mix(in srgb,var(--accent) 10%,var(--panel2))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent)!important}
.setup-card .mode-icon{font-size:22px!important}.setup-card .mode-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.setup-card .mode-copy strong{font-size:14px!important}.setup-card .mode-copy small{font-size:8px!important;color:var(--accent)!important}.setup-card .mode-copy p{font-size:8px!important;line-height:1.3!important;color:var(--muted)!important;max-width:none!important}.setup-card .mode-option>em{font-size:6.5px;font-style:normal;font-weight:950;letter-spacing:.05em;color:var(--muted);padding:4px 7px;border:1px solid var(--line);border-radius:999px;white-space:nowrap}.setup-card .mode-option.selected>em{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 52%,var(--line))}
.setup-matchup{display:grid;grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr);gap:10px;align-items:end}.setup-matchup label,.setup-details-grid label{display:flex;flex-direction:column;gap:6px;font-size:9px;font-weight:900;color:var(--muted)}
.setup-matchup select,.setup-details-grid input{width:100%;min-height:50px;border:1px solid var(--line);border-radius:11px;background:var(--panel2);color:var(--text);padding:0 12px;font-size:14px;font-weight:850}
#setupSwapTeams{height:50px;border:1px solid var(--line);border-radius:11px;background:var(--panel2);color:var(--accent);font-size:18px;font-weight:900;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}#setupSwapTeams small{font-size:6px;color:var(--muted)}
.setup-matchup-preview{margin-top:12px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--panel2) 88%,transparent)}
.setup-matchup-preview>div{min-width:0;display:grid;grid-template-columns:46px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center}.setup-matchup-preview img{grid-row:1/3;width:46px;height:46px;object-fit:contain}.setup-matchup-preview strong{font-size:15px;color:var(--text)}.setup-matchup-preview small{font-size:7px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.setup-matchup-preview>span{font-size:9px;font-weight:950;color:var(--accent)}
.setup-details-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.setup-details-grid .setup-wide{grid-column:1/-1}.setup-details-grid label>span small{font-size:7px;color:var(--muted);font-weight:700}
.setup-ready-card{margin-top:12px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--accent) 44%,var(--line));border-radius:13px;background:color-mix(in srgb,var(--accent) 7%,var(--panel2));display:grid;gap:3px}.setup-ready-card span{font-size:7px;font-weight:950;letter-spacing:.12em;color:var(--accent)}.setup-ready-card strong{font-size:17px;color:var(--text)}.setup-ready-card small{font-size:8px;color:var(--muted)}
.setup-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.setup-actions button{min-width:120px;min-height:46px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);font-weight:900}.setup-actions .primary{background:color-mix(in srgb,var(--accent) 76%,var(--panel));border-color:var(--accent);color:var(--accent-ink,#07120d)}

@media(max-width:760px){
  .drawer .menu-row{height:50px!important;min-height:50px!important}.drawer .menu-copy strong{font-size:10.8px!important}.drawer .menu-copy small{font-size:7.1px!important}.drawer .desktop-menu-row{display:none!important}
  .theme-picker-card{max-height:min(86dvh,720px)!important}.theme-picker-list .theme-choice{min-height:62px!important}
  .setup-card{max-height:min(90dvh,780px)!important}.setup-progress{gap:5px;margin:6px 0 10px}.setup-progress span{padding:6px 4px;gap:4px}.setup-progress span em{font-size:7px}.first-game-tip{grid-template-columns:1fr;gap:3px;padding:8px 10px}.first-game-tip strong{font-size:9px}.first-game-tip span{font-size:7.5px}
  .setup-heading strong{font-size:16px}.setup-heading small{font-size:8px}.setup-card .mode-option{min-height:82px!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:8px!important;padding:8px 9px!important}.setup-card .mode-icon{font-size:19px!important}.setup-card .mode-copy strong{font-size:13px!important}.setup-card .mode-copy small{font-size:7.5px!important}.setup-card .mode-copy p{font-size:7.2px!important}.setup-card .mode-option>em{font-size:5.7px;padding:3px 5px}
  .setup-matchup{grid-template-columns:1fr 54px 1fr;gap:6px}.setup-matchup select,.setup-details-grid input{min-height:48px;font-size:16px}#setupSwapTeams{height:48px}.setup-matchup-preview{gap:7px;padding:10px}.setup-matchup-preview>div{grid-template-columns:34px minmax(0,1fr);column-gap:6px}.setup-matchup-preview img{width:34px;height:34px}.setup-matchup-preview strong{font-size:12px}.setup-matchup-preview small{font-size:6.4px}
  .setup-details-grid{gap:8px}.setup-actions{position:sticky;bottom:-1px;background:var(--panel);margin-left:-4px;margin-right:-4px;padding:10px 4px 4px;z-index:2}.setup-actions button{flex:1;min-width:0;min-height:46px;font-size:12px}
}

@media(prefers-reduced-motion:reduce){.setup-step.active{animation:none!important}}

/* v173 — New Game must fit the iPhone viewport without internal scrolling. */
#modeModal{padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom));overflow:hidden!important}
#modeModal .setup-card{height:min(780px,calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom))))!important;max-height:none!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
#modeModal .setup-progress{flex:0 0 auto}
#modeModal .setup-step.active{flex:1 1 auto;min-height:0;overflow:hidden}
#modeModal .setup-actions{flex:0 0 auto;position:static!important}
@media(max-width:760px){
  #modeModal .setup-card{padding:8px 11px 9px!important}
  #modeModal .modal-head{min-height:38px!important;margin-bottom:0!important}
  #modeModal .setup-progress{margin:4px 0 7px!important}
  #modeModal .setup-heading{margin:2px 0 7px!important;gap:2px!important}
  #modeModal .setup-card .mode-options{gap:6px!important}
  #modeModal .setup-card .mode-option{min-height:72px!important;padding:7px 9px!important}
  #modeModal .setup-matchup-preview{margin-top:8px!important;padding:8px!important}
  #modeModal .setup-details-grid{gap:6px 8px!important}
  #modeModal .setup-details-grid label{gap:3px!important}
  #modeModal .setup-details-grid input{min-height:40px!important;height:40px!important}
  #modeModal .v1722-setup-options{margin-top:6px!important;gap:5px!important}
  #modeModal .v1722-assist-row,#modeModal .v1722-guardrail-row{min-height:48px!important;padding:6px 8px!important}
  #modeModal .v1722-assist-row small,#modeModal .v1722-guardrail-row small{display:none!important}
  #modeModal .v1722-ready-card{margin-top:6px!important;padding:7px 9px!important;gap:1px!important}
  #modeModal .v1722-ready-card strong{font-size:14px!important}
  #modeModal .setup-actions{margin-top:7px!important;padding-top:7px!important;padding-bottom:0!important}
  #modeModal .setup-actions button{min-height:42px!important}
}
@media(max-width:760px) and (max-height:700px){
  #modeModal .first-game-tip{display:none!important}
  #modeModal .setup-progress span{padding:4px 3px!important}
  #modeModal .setup-details-grid input{min-height:36px!important;height:36px!important}
  #modeModal .v1722-ready-card{display:none!important}
}

/* ==========================================================
   v49 RECOVERY HOTFIX
   - Restores v47's direct score-cell click/scroll behavior.
   - No custom double-tap interception or VisualViewport transform layer.
   - Play modal remains fixed; background remains locked while open.
   ========================================================== */
@media(max-width:900px){
  .team-scorebook-scroll{
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x pan-y pinch-zoom!important;
  }
  .unified-score-table .play-cell{
    touch-action:pan-x pan-y pinch-zoom!important;
  }
  .modal:not(.hidden){
    position:fixed!important;
    inset:0!important;
  }
}


/* ==========================================================
   v50 UX MOTION + CONTEXT GUIDANCE
   Stable v49 tap/scroll behavior intentionally untouched.
   All motion is transform/opacity/box-shadow only: no layout shifts.
   ========================================================== */
.editor-context-hint{
  display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;
  margin:7px 0 9px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));
  border-radius:11px;background:color-mix(in srgb,var(--panel2) 92%,var(--accent) 4%);overflow:hidden;
}
.editor-context-hint>span{padding:4px 7px;border-radius:999px;border:1px solid color-mix(in srgb,var(--accent) 52%,var(--line));color:var(--accent);font-size:7px;font-weight:950;letter-spacing:.11em}
.editor-context-hint>p{margin:0;color:var(--text);font-size:10px;font-weight:800;line-height:1.3}
.editor-context-hint[data-tone="out"]{border-color:color-mix(in srgb,#d94b4b 46%,var(--line))}
.editor-context-hint[data-tone="out"]>span{color:#e55f5f;border-color:color-mix(in srgb,#d94b4b 58%,var(--line))}
.editor-context-hint[data-tone="run"],.editor-context-hint[data-tone="complete"]{border-color:color-mix(in srgb,#43b86a 48%,var(--line))}
.editor-context-hint[data-tone="run"]>span,.editor-context-hint[data-tone="complete"]>span{color:#68c985;border-color:color-mix(in srgb,#43b86a 58%,var(--line))}
.editor-context-hint.hint-refresh p{animation:v50HintIn .2s ease both}
@keyframes v50HintIn{from{opacity:.45;transform:translateY(2px)}to{opacity:1;transform:none}}

/* Generic save confirmation: border pulse + path draw, never changes cell dimensions. */
.play-cell.play-confirm .play-entry{animation:v50EntryConfirm .36s ease both}
.play-cell.play-confirm .diamond line.base.origin,
.play-cell.play-confirm .diamond line.base.advance{stroke-dasharray:48;animation:v50PathDraw .42s ease both}
@keyframes v50PathDraw{from{stroke-dashoffset:48;opacity:.45}to{stroke-dashoffset:0;opacity:1}}
@keyframes v50EntryConfirm{0%{transform:scale(.985)}55%{transform:scale(1.025)}100%{transform:none}}

/* Home run: the diamond itself pulses; the table cell never grows. */
.play-cell.hr-celebrate .diamond{transform-origin:50% 50%;animation:v50HomeRunPulse .62s cubic-bezier(.2,.85,.25,1) both}
.play-cell.hr-celebrate .diamond-fill{animation:v50RunGlow .72s ease both}
.play-cell.hr-celebrate{animation:v50HrCellGlow .72s ease both}
@keyframes v50HomeRunPulse{0%{transform:scale(.88)}42%{transform:scale(1.16)}68%{transform:scale(.98)}84%{transform:scale(1.045)}100%{transform:scale(1)}}
@keyframes v50RunGlow{0%,100%{filter:none}45%{filter:drop-shadow(0 0 7px rgba(67,184,106,.72))}}
@keyframes v50HrCellGlow{0%,100%{box-shadow:inset 0 0 0 0 transparent}45%{box-shadow:inset 0 0 0 3px color-mix(in srgb,#43b86a 56%,transparent),0 0 14px color-mix(in srgb,#43b86a 22%,transparent)}}

/* A normal run gets a quieter home-plate/diamond confirmation. */
.play-cell.run-celebrate .diamond{transform-origin:50% 50%;animation:v50RunPulse .46s ease both}
.play-cell.run-celebrate{animation:v50RunCell .55s ease both}
@keyframes v50RunPulse{0%{transform:scale(.94)}50%{transform:scale(1.085)}100%{transform:scale(1)}}
@keyframes v50RunCell{0%,100%{box-shadow:inset 0 0 0 0 transparent}50%{box-shadow:inset 0 0 0 3px color-mix(in srgb,#43b86a 45%,transparent)}}

/* Outs use a quick red edge confirmation without recoloring neutral score marks. */
.play-cell.out-confirm{animation:v50OutConfirm .42s ease both}
@keyframes v50OutConfirm{0%,100%{box-shadow:inset 0 0 0 0 transparent}48%{box-shadow:inset 0 0 0 3px color-mix(in srgb,#d94b4b 58%,transparent)}}

/* Next batter is acknowledged in-place — no scrollIntoView or viewport movement. */
.unified-score-table .next-batter-ready>.sticky-ord,
.unified-score-table .next-batter-ready>.sticky-player,
.unified-score-table .next-batter-ready>.sticky-pos{animation:v50NextBatter .62s ease both}
@keyframes v50NextBatter{0%,100%{filter:none}45%{filter:brightness(1.14);box-shadow:inset 3px 0 0 var(--accent),inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent)}}

/* Pitch count feedback. New light pops independently from the rest of the editor. */
.pitch-light-group i.just-on{position:relative;transform-origin:center}
.pitch-light-group i.ball-pop{animation:v50BallLight .42s ease both}
.pitch-light-group i.strike-pop{animation:v50StrikeLight .46s cubic-bezier(.2,.9,.25,1) both}
.pitch-light-group i.strike-pop::after,.pitch-light-group i.ball-pop::after{content:"";position:absolute;inset:-1px;border:1px solid currentColor;border-radius:50%;animation:v50PitchRing .46s ease-out both;pointer-events:none}
@keyframes v50BallLight{0%{transform:scale(.5);opacity:.45}62%{transform:scale(1.22)}100%{transform:scale(1);opacity:1}}
@keyframes v50StrikeLight{0%{transform:scale(.45)}48%{transform:scale(1.42)}72%{transform:scale(.9)}100%{transform:scale(1)}}
@keyframes v50PitchRing{0%{opacity:.75;transform:scale(.65)}100%{opacity:0;transform:scale(2.4)}}
.pitch-chip.pitch-chip-new{animation:v50PitchChipIn .3s ease both}
@keyframes v50PitchChipIn{from{opacity:.45;transform:translateY(-4px) scale(.985)}to{opacity:1;transform:none}}

/* Uniform menu gets tactile press feedback while preserving every row's size. */
.drawer .menu-row{transform-origin:center;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .12s ease,opacity .15s ease!important}
.drawer .menu-row:active{transform:scale(.985)!important;background:color-mix(in srgb,var(--panel2) 78%,var(--accent) 8%)!important}

@media(max-width:600px){
  .editor-context-hint{margin:6px 0 8px;padding:8px 9px;gap:8px}
  .editor-context-hint>span{font-size:8px}
  .editor-context-hint>p{font-size:11.5px;line-height:1.28}
}
@media(prefers-reduced-motion:reduce){
  .editor-context-hint.hint-refresh p,.play-cell.play-confirm .play-entry,.play-cell.play-confirm .diamond line.base.origin,.play-cell.play-confirm .diamond line.base.advance,
  .play-cell.hr-celebrate .diamond,.play-cell.hr-celebrate .diamond-fill,.play-cell.hr-celebrate,.play-cell.run-celebrate .diamond,.play-cell.run-celebrate,.play-cell.out-confirm,
  .unified-score-table .next-batter-ready>.sticky-ord,.unified-score-table .next-batter-ready>.sticky-player,.unified-score-table .next-batter-ready>.sticky-pos,
  .pitch-light-group i.ball-pop,.pitch-light-group i.strike-pop,.pitch-light-group i.strike-pop::after,.pitch-light-group i.ball-pop::after,.pitch-chip.pitch-chip-new{animation:none!important}
}

/* ==========================================================
   v52 GUIDED RECOVERY UX
   - No score-grid touch/scroll changes.
   - Context focus uses shadow/opacity only; never changes layout.
   - Confirmation/Undo floats above the action bar without moving content.
   ========================================================== */
#batterResultGrid,#runnerGrid,#scoringPanel,#advancedTools,#pitchTools{
  position:relative;
  transition:box-shadow .18s ease,filter .18s ease,background-color .18s ease;
}
.context-focus{
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 62%,transparent),0 6px 22px color-mix(in srgb,var(--accent) 10%,transparent)!important;
  animation:v52ContextFocus .42s ease both;
}
@keyframes v52ContextFocus{
  0%{filter:brightness(1)}
  45%{filter:brightness(1.075)}
  100%{filter:brightness(1)}
}
#advancedTools.context-focus,#pitchTools.context-focus{
  border-radius:14px;
}
#applyPlayBtn{
  transition:transform .13s ease,box-shadow .16s ease,filter .16s ease!important;
}
#applyPlayBtn:active{transform:scale(.985)!important}
.app-action-toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%);
  z-index:420;display:grid;grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;gap:9px;min-width:min(360px,calc(100vw - 28px));max-width:min(520px,calc(100vw - 28px));
  padding:10px 11px;border:1px solid color-mix(in srgb,var(--accent) 52%,var(--line));
  border-radius:14px;background:color-mix(in srgb,var(--panel) 94%,#050807 6%);
  color:var(--text);box-shadow:0 14px 38px rgba(0,0,0,.28);
  animation:v52ToastIn .22s cubic-bezier(.2,.8,.25,1) both;overflow:hidden;
}
.app-action-toast .toast-check{
  width:25px;height:25px;border-radius:50%;display:grid;place-items:center;
  background:color-mix(in srgb,#43b86a 20%,var(--panel2));color:#69d38b;
  border:1px solid color-mix(in srgb,#43b86a 52%,var(--line));font-weight:950;font-size:12px
}
.app-action-toast strong{font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-action-toast button{
  min-height:34px!important;padding:7px 11px!important;border-radius:10px!important;
  border:1px solid color-mix(in srgb,var(--accent) 65%,var(--line))!important;
  background:color-mix(in srgb,var(--accent) 13%,var(--panel2))!important;
  color:var(--accent)!important;font-size:11px!important;font-weight:950!important
}
.app-action-toast>i{
  position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--accent);
  transform-origin:left center;animation:v52ToastTimer 4.2s linear both;opacity:.72
}
.app-action-toast.toast-leave{animation:v52ToastOut .16s ease both}
@keyframes v52ToastIn{from{opacity:0;transform:translate(-50%,8px) scale(.985)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes v52ToastOut{to{opacity:0;transform:translate(-50%,6px) scale(.985)}}
@keyframes v52ToastTimer{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@media(max-width:700px){
  .app-action-toast{bottom:calc(78px + env(safe-area-inset-bottom));min-width:calc(100vw - 24px);padding:10px}
  .app-action-toast strong{font-size:12.5px}
  .app-action-toast button{font-size:12px!important}
}
@media(prefers-reduced-motion:reduce){
  .context-focus,.app-action-toast,.app-action-toast.toast-leave,.app-action-toast>i{animation:none!important}
}

.app-action-toast.toast-info .toast-check{
  background:color-mix(in srgb,var(--accent) 12%,var(--panel2));
  color:var(--accent);
  border-color:color-mix(in srgb,var(--accent) 42%,var(--line));
}


/* ==========================================================
   v53 LIVE GAME FLOW UX
   Clear inning / outs / current-batter state without viewport movement.
   ========================================================== */
.live-game-bar{min-height:58px!important;grid-template-columns:minmax(0,1fr) minmax(138px,auto) minmax(0,1fr)!important;padding:7px 12px!important}
.live-inning{min-width:138px!important;display:grid;justify-items:center;align-content:center;gap:2px}
.live-inning>strong{font-size:13px!important;line-height:1!important;letter-spacing:.075em}
.live-status-row{display:flex;align-items:center;justify-content:center;gap:6px;min-height:14px;color:var(--muted);font-size:8px;font-weight:950;letter-spacing:.04em}
.live-out-dots{display:inline-flex;align-items:center;gap:3px}
.live-out-dots i{display:block;width:7px;height:7px;border-radius:50%;border:1px solid color-mix(in srgb,var(--accent) 64%,var(--line));background:transparent;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.live-out-dots i.on{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 14%,transparent)}
.live-inning .live-batter{max-width:160px;margin:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:8px!important;font-weight:800}
.live-inning .live-batter b{color:var(--text);font-weight:950}
.live-game-bar.is-final{min-height:52px!important}

.inning-transition{left:50%!important;top:max(14px,env(safe-area-inset-top))!important;width:min(430px,calc(100vw - 24px));transform:translateX(-50%)!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) 34px!important;align-items:center!important;gap:10px!important;padding:10px 10px 10px 12px!important;border-radius:14px!important;animation:v53InningIn .24s cubic-bezier(.2,.8,.2,1) both;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.inning-transition.leaving{animation:v53InningOut .17s ease both}
.inning-transition-outs{display:flex;gap:3px;padding:8px;border:1px solid color-mix(in srgb,var(--accent) 48%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--panel) 84%,transparent)}
.inning-transition-outs i{width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 14%,transparent)}
.inning-transition-copy{display:grid;min-width:0;gap:2px}
.inning-transition-copy small{font-size:7px;font-weight:950;letter-spacing:.16em;color:var(--muted)}
.inning-transition-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px!important;color:var(--text)!important;letter-spacing:.035em}
.inning-transition-copy em{font-style:normal;font-size:9px;font-weight:850;color:var(--accent)}
.inning-transition button{width:34px!important;height:34px!important;min-width:34px;border:1px solid var(--line)!important;background:color-mix(in srgb,var(--panel) 82%,transparent)!important;font-size:18px;line-height:1}
@keyframes v53InningIn{from{opacity:0;transform:translate(-50%,-12px) scale(.985)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes v53InningOut{to{opacity:0;transform:translate(-50%,-8px) scale(.99)}}

@media(max-width:600px){
 :root{--livebar-h:56px!important}
 .live-game-bar{min-height:56px!important;grid-template-columns:minmax(0,1fr) 126px minmax(0,1fr)!important;gap:4px!important;padding:5px 7px!important}
 .live-team strong{font-size:12px!important}.live-team span{font-size:7.2px!important}.live-team b{font-size:10px!important}
 .live-inning{min-width:126px!important;gap:1px!important}.live-inning>strong{font-size:11px!important}
 .live-status-row{gap:5px;font-size:7px}.live-out-dots{gap:2.5px}.live-out-dots i{width:6px;height:6px}
 .live-inning .live-batter{max-width:124px;font-size:7.4px!important}
 .inning-transition{top:max(10px,env(safe-area-inset-top))!important;width:calc(100vw - 18px);padding:9px!important;gap:8px!important}
 .inning-transition-copy strong{font-size:11px!important}.inning-transition-copy em{font-size:8.5px}
 .inning-transition-outs{padding:7px}.inning-transition-outs i{width:7px;height:7px}
}


body.theme-postseason .live-out-dots i.on,body.theme-postseason .inning-transition-outs i{background:var(--accent);border-color:var(--accent)}
@media(prefers-reduced-motion:reduce){.inning-transition,.inning-transition.leaving{animation:none!important}}


/* ==========================================================
   v54 POSTGAME EXPERIENCE
   User-facing completion flow only. Score-grid touch/scroll geometry untouched.
   ========================================================== */
.postgame-banner>div:first-child span{font-size:8px;color:var(--muted);font-weight:750;margin-top:1px}
.postgame-banner .primary{background:var(--accent)!important;color:var(--bg)!important;border-color:var(--accent)!important}
.postgame-card{width:min(780px,calc(100vw - 24px))!important;max-height:min(860px,calc(100dvh - 24px))!important}
#postgameContent{display:grid;gap:10px;padding-bottom:max(4px,env(safe-area-inset-bottom))}
.postgame-hero{display:grid;gap:8px;padding:15px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));border-radius:16px;background:linear-gradient(145deg,color-mix(in srgb,var(--panel2) 90%,var(--accent) 8%),var(--panel));text-align:center;overflow:hidden;position:relative}
.postgame-hero:after{content:"";position:absolute;inset:auto 12% -42px;height:75px;border-radius:50%;background:var(--accent);filter:blur(38px);opacity:.09;pointer-events:none}
.postgame-hero>small{font-size:8px;font-weight:950;letter-spacing:.16em;color:var(--accent)}
.postgame-hero>p{margin:0;font-size:9px;color:var(--muted);font-weight:750}
.postgame-matchup{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px}
.postgame-team{display:grid;justify-items:center;gap:3px;min-width:0}.postgame-team img{width:54px;height:54px;object-fit:contain}.postgame-team b{font-size:16px}.postgame-team span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;color:var(--muted);font-weight:800}.postgame-team.winner img{filter:drop-shadow(0 0 9px color-mix(in srgb,var(--accent) 45%,transparent))}.postgame-team.winner b{color:var(--accent)}
.postgame-final-score{display:grid;justify-items:center;gap:2px;min-width:118px}.postgame-final-score strong{font-size:35px;line-height:1;font-weight:950}.postgame-final-score strong i{font-style:normal;color:var(--accent);padding:0 7px}.postgame-final-score span{font-size:9px;color:var(--accent);font-weight:900;text-align:center}
.postgame-team-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px}.postgame-team-kpis>div{display:grid;grid-template-columns:auto repeat(5,1fr);align-items:center;gap:5px;padding:9px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.postgame-team-kpis small{font-size:9px;color:var(--accent);font-weight:950}.postgame-team-kpis span{display:grid;justify-items:center;font-size:8px;color:var(--muted);font-weight:800}.postgame-team-kpis b{font-size:12px;color:var(--text)}
.postgame-pitch-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.postgame-pitch-kpis span{display:grid;justify-items:center;gap:2px;padding:9px 5px;border:1px solid var(--line);border-radius:11px;background:var(--panel)}.postgame-pitch-kpis b{font-size:17px;color:var(--accent)}.postgame-pitch-kpis small{font-size:7px;color:var(--muted);font-weight:800;text-align:center}
.postgame-line-card,.summary-v54-line{border:1px solid var(--line);border-radius:13px;background:var(--panel);overflow:hidden}.postgame-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border-bottom:1px solid var(--line)}.postgame-section-head strong{font-size:10px;letter-spacing:.08em}.postgame-section-head small{font-size:8px;color:var(--muted);font-weight:750}.postgame-linescore-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:7px}.postgame-linescore{border-collapse:collapse;width:100%;min-width:470px}.postgame-linescore th,.postgame-linescore td{min-width:31px;padding:6px 5px;border:1px solid color-mix(in srgb,var(--line) 82%,transparent);text-align:center;font-size:8px}.postgame-linescore th{font-size:7px;color:var(--muted);background:color-mix(in srgb,var(--panel2) 80%,transparent)}.postgame-linescore td:first-child,.postgame-linescore th:first-child{position:sticky;left:0;z-index:1;background:var(--panel2)}.postgame-linescore .total{background:color-mix(in srgb,var(--accent) 8%,var(--panel2))}
.postgame-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.postgame-actions button,.summary-v54-actions button{display:grid;justify-items:center;gap:3px;min-height:58px!important;padding:8px!important;border:1px solid var(--line)!important;border-radius:11px!important;background:var(--panel)!important;color:var(--accent)!important;font-size:16px!important;font-weight:950!important}.postgame-actions button span,.summary-v54-actions button span{font-size:8px;color:var(--text);font-weight:900}.postgame-footer-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.postgame-footer-actions button{min-height:44px!important;border-radius:11px!important;font-weight:950!important}.postgame-footer-actions .primary{background:var(--accent)!important;color:var(--bg)!important;border-color:var(--accent)!important}
.launch-postgame{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:52px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--accent) 7%,var(--panel));color:var(--text);text-align:left}.launch-postgame>span{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--accent) 14%,var(--panel2));color:var(--accent);font-weight:950}.launch-postgame b{font-size:10px}.launch-postgame small{font-size:7px;color:var(--muted);font-weight:750}.launch-postgame em{font-style:normal;color:var(--accent);font-size:16px}
.summary-page-v54{display:grid;gap:9px}.summary-v54-head{display:flex;justify-content:space-between;align-items:flex-end;gap:10px}.summary-v54-head small{font-size:8px;color:var(--accent);font-weight:950;letter-spacing:.15em}.summary-v54-head h2{margin:2px 0 1px;font-size:20px}.summary-v54-head p{margin:0;font-size:8px;color:var(--muted);font-weight:750}.summary-v54-head>span{padding:5px 8px;border:1px solid var(--line);border-radius:9px;font-size:8px;color:var(--muted);font-weight:850}
.summary-final-hero{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px;gap:10px;overflow:hidden}.summary-v54-team{display:grid;grid-template-columns:46px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;column-gap:8px}.summary-v54-team img{grid-row:1/3;width:46px;height:46px;object-fit:contain}.summary-v54-team strong{font-size:15px}.summary-v54-team small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-v54-team.right{grid-template-columns:minmax(0,1fr) 46px;text-align:right}.summary-v54-team.right img{grid-column:2}.summary-v54-score{display:grid;justify-items:center;gap:2px}.summary-v54-score>small{font-size:7px;letter-spacing:.14em;color:var(--muted);font-weight:950}.summary-v54-score strong{font-size:30px;line-height:1}.summary-v54-score i{font-style:normal;color:var(--accent);padding:0 5px}.summary-v54-score span{max-width:170px;font-size:8px;color:var(--accent);font-weight:900;text-align:center}.summary-final-hero.is-final{border-color:color-mix(in srgb,var(--accent) 65%,var(--line));animation:v54FinalSettle .38s cubic-bezier(.2,.8,.2,1) both}
.summary-v54-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px}.summary-v54-kpis>div{display:grid;grid-template-columns:auto repeat(5,1fr);align-items:center;gap:4px;padding:8px;border:1px solid var(--line);border-radius:11px;background:var(--panel)}.summary-v54-kpis small{color:var(--accent);font-size:8px;font-weight:950}.summary-v54-kpis span{display:grid;justify-items:center;font-size:7px;color:var(--muted);font-weight:800}.summary-v54-kpis b{font-size:11px;color:var(--text)}
.summary-v54-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:8px}.summary-v54-actions .postgame{border-color:color-mix(in srgb,var(--accent) 64%,var(--line))!important;background:color-mix(in srgb,var(--accent) 9%,var(--panel))!important}.summary-v54-notes>div:last-child{padding:11px;font-size:10px;white-space:pre-wrap;color:var(--text);min-height:42px}
@keyframes v54FinalSettle{from{opacity:.7;transform:scale(.992)}to{opacity:1;transform:scale(1)}}
@media(max-width:700px){
 .postgame-card{width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important}
 .postgame-hero{padding:12px}.postgame-matchup{gap:6px}.postgame-team img{width:45px;height:45px}.postgame-team span{max-width:105px;font-size:7px}.postgame-final-score{min-width:104px}.postgame-final-score strong{font-size:31px}
 .postgame-team-kpis>div,.summary-v54-kpis>div{grid-template-columns:auto repeat(5,1fr);padding:7px 5px;gap:2px}.postgame-team-kpis span,.summary-v54-kpis span{font-size:6.8px}.postgame-team-kpis b,.summary-v54-kpis b{font-size:10px}
 .postgame-pitch-kpis{gap:5px}.postgame-pitch-kpis b{font-size:14px}.postgame-pitch-kpis small{font-size:6.5px}
 .summary-v54-head{padding:0 3px}.summary-v54-head h2{font-size:18px}.summary-final-hero{padding:10px 8px;gap:5px}.summary-v54-team{grid-template-columns:38px minmax(0,1fr);column-gap:5px}.summary-v54-team img{width:38px;height:38px}.summary-v54-team strong{font-size:12px}.summary-v54-team small{font-size:6.8px}.summary-v54-team.right{grid-template-columns:minmax(0,1fr) 38px}.summary-v54-score strong{font-size:27px}.summary-v54-score span{font-size:7px;max-width:110px}
 .postgame-actions button,.summary-v54-actions button{min-height:54px!important}.postgame-footer-actions button{min-height:42px!important}
 .game-complete.postgame-banner{display:grid!important}.game-complete-actions{width:100%;display:grid!important;grid-template-columns:repeat(3,1fr)}
}
@media(prefers-reduced-motion:reduce){.summary-final-hero.is-final{animation:none!important}}

/* ==========================================================
   v55 UI THEME POLISH
   Cleaner theme-aware drawer + cleaner play editor + richer Wrigley realism.
   Visual-only pass. No scoring logic changes.
   ========================================================== */

/* ---------- DRAWER / MENU COHESION ---------- */
.drawer-shade{
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.drawer{
  background:
    linear-gradient(180deg,color-mix(in srgb,var(--panel2) 94%,#000 6%),color-mix(in srgb,var(--panel) 96%,#000 4%))!important;
  border-right:1px solid color-mix(in srgb,var(--line) 78%,transparent)!important;
  box-shadow:22px 0 44px rgba(0,0,0,.34)!important;
}
.drawer-head{
  padding:4px 4px 14px!important;
  margin-bottom:2px!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 65%,transparent)!important;
}
.drawer-head strong{letter-spacing:.02em}
.drawer-head small{display:block;margin-top:3px;color:var(--muted)}
.drawer-section{
  padding:14px 0!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 48%,transparent)!important;
}
.drawer-label{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:0 8px 10px!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.16em!important;
  color:color-mix(in srgb,var(--muted) 82%,var(--text) 18%)!important;
}
.drawer-label::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:color-mix(in srgb,var(--line) 56%,transparent);
}

/* Apply one shared row system to every drawer row so the menu feels uniform. */
.menu-row,
.drawer-nav,
.drawer-tools>button,
.import-button,
.theme-choice{
  position:relative!important;
  width:100%!important;
  min-height:58px!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:10px 12px!important;
  margin:0!important;
  border:1px solid color-mix(in srgb,var(--line) 74%,transparent)!important;
  border-radius:16px!important;
  background:color-mix(in srgb,var(--panel2) 84%,var(--panel) 16%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 7px 16px rgba(0,0,0,.14)!important;
  color:var(--text)!important;
  transition:transform .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease!important;
}
.menu-row::before,
.drawer-nav::before,
.drawer-tools>button::before,
.import-button::before,
.theme-choice::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:999px;
  background:transparent;
  transition:background .14s ease,opacity .14s ease;
  opacity:.0;
}
.menu-row:hover,
.drawer-nav:hover,
.drawer-tools>button:hover,
.import-button:hover,
.theme-choice:hover{
  transform:translateX(1px)!important;
  background:color-mix(in srgb,var(--panel2) 72%,var(--selected) 28%)!important;
  border-color:color-mix(in srgb,var(--accent) 30%,var(--line))!important;
}
.drawer-nav.active,
.menu-row.active,
.theme-choice.active{
  background:color-mix(in srgb,var(--selected) 68%,var(--panel2) 32%)!important;
  border-color:color-mix(in srgb,var(--accent) 46%,var(--line))!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent),0 10px 18px rgba(0,0,0,.16)!important;
}
.drawer-nav.active::before,
.menu-row.active::before,
.theme-choice.active::before{
  background:var(--accent)!important;
  opacity:1!important;
}
.menu-glyph{
  width:28px!important;
  min-width:28px!important;
  height:28px!important;
  font-size:19px!important;
  color:color-mix(in srgb,var(--accent) 56%,var(--text) 44%)!important;
}
.menu-copy{min-width:0!important}
.menu-copy strong{
  display:block!important;
  font-size:11.8px!important;
  line-height:1.12!important;
  color:var(--text)!important;
}
.menu-copy small{
  display:block!important;
  margin-top:3px!important;
  font-size:8px!important;
  line-height:1.25!important;
  color:var(--muted)!important;
}
.menu-trailing,
.menu-value,
.menu-badge,
.theme-check{
  align-self:center!important;
}
.menu-trailing,
.menu-value{
  font-size:9px!important;
  font-weight:900!important;
  color:color-mix(in srgb,var(--muted) 70%,var(--text) 30%)!important;
}
.menu-badge{
  min-width:24px!important;
  padding:5px 7px!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--selected) 68%,var(--panel2))!important;
  color:var(--text)!important;
  border:1px solid color-mix(in srgb,var(--line) 72%,transparent)!important;
}
.theme-choice{
  grid-template-columns:42px minmax(0,1fr) 20px!important;
}
.theme-swatch{
  width:36px!important;
  height:36px!important;
  border-radius:11px!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 6px 12px rgba(0,0,0,.18)!important;
}
.theme-sub{
  margin:8px 0 0 12px!important;
  padding:10px 11px!important;
  border-left:2px solid color-mix(in srgb,var(--accent) 62%,transparent)!important;
  border-radius:0 12px 12px 0!important;
  background:color-mix(in srgb,var(--panel) 90%,#000 10%)!important;
}

/* Wrigley drawer: make the menu feel like part of the scoreboard theme. */










/* ---------- PLAY EDITOR CLEANUP ---------- */
.play-card{
  background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 96%,#fff 4%),color-mix(in srgb,var(--panel) 98%,#000 2%))!important;
  box-shadow:0 24px 54px rgba(0,0,0,.38)!important;
}
.play-card .modal-head{
  padding:2px 0 10px!important;
  margin-bottom:2px!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 52%,transparent)!important;
}
.play-card .modal-head strong{
  font-size:18px!important;
  letter-spacing:.035em!important;
}
.play-card .modal-head small{
  max-width:42ch!important;
  line-height:1.35!important;
}
.play-card .situation{
  margin-top:10px!important;
  padding:11px 13px!important;
  min-height:44px!important;
  border-radius:14px!important;
  background:color-mix(in srgb,var(--selected) 52%,var(--panel2) 48%)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 14%,transparent)!important;
}
.play-card .editor-section-title{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:14px 0 8px!important;
  padding-top:4px!important;
  font-size:8.5px!important;
  letter-spacing:.16em!important;
}
.play-card .editor-section-title::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:color-mix(in srgb,var(--line) 56%,transparent);
}
.play-card .editor-grid{
  gap:10px!important;
}
/* single clean card per field instead of double-heavy borders */
.play-card .editor-grid>label:not(.check-label),
.play-card .runner-out-fields .form-grid.two>label{
  padding:10px 12px 11px!important;
  border:1px solid color-mix(in srgb,var(--line) 72%,transparent)!important;
  border-radius:14px!important;
  background:color-mix(in srgb,var(--panel2) 76%,var(--panel) 24%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
}
.play-card .field-label,
.play-card .runner-out-fields .form-grid.two>label>.field-label{
  min-height:18px!important;
  padding:0 0 7px!important;
  color:color-mix(in srgb,var(--text) 88%,var(--muted) 12%)!important;
}
.play-card .editor-grid select,
.play-card .editor-grid input,
.play-card .runner-out-fields .form-grid.two select,
.play-card .runner-out-fields .form-grid.two input{
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.play-card .check-label{
  border-radius:14px!important;
  background:color-mix(in srgb,var(--panel2) 80%,var(--panel) 20%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
}
.play-card .runner-out-fields,
.play-card .advanced-tools,
.play-card .pitch-tools{
  border:1px solid color-mix(in srgb,var(--line) 66%,transparent)!important;
  border-radius:16px!important;
  background:color-mix(in srgb,var(--panel) 88%,#000 12%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
.play-card .runner-out-fields{padding:11px 12px!important}
.play-card .advanced-tools{padding:10px 10px 12px!important}
.play-card .advanced-layout{gap:10px!important}
.play-card .defense-field-card,
.play-card .advanced-runner-card,
.play-card .pitch-entry-card,
.play-card .pitch-sequence-card,
.play-card .pitch-workflow-note,
.play-card .pitch-count-card{
  border:1px solid color-mix(in srgb,var(--line) 58%,transparent)!important;
  border-radius:14px!important;
  background:color-mix(in srgb,var(--panel2) 82%,var(--panel) 18%)!important;
  box-shadow:none!important;
}
.play-card .field-card-head,
.play-card .pitch-entry-card-head,
.play-card .pitch-sequence-head{
  padding-bottom:7px!important;
  margin-bottom:8px!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 42%,transparent)!important;
}
.play-card .fielder-grid,
.play-card .pitch-count-lights{
  background:color-mix(in srgb,var(--panel) 80%,#000 20%)!important;
  border:1px solid color-mix(in srgb,var(--line) 44%,transparent)!important;
}
.play-card .fielder-selection,
.play-card .pitch-empty,
.play-card .editor-guide{
  background:color-mix(in srgb,var(--panel2) 76%,var(--panel) 24%)!important;
  border:1px solid color-mix(in srgb,var(--line) 48%,transparent)!important;
  border-radius:12px!important;
}
.play-card .modal-actions{
  gap:10px!important;
  margin-top:14px!important;
}
.play-card .modal-actions button{
  min-height:50px!important;
  border-radius:15px!important;
  border-width:1px!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
  box-shadow:0 10px 18px rgba(0,0,0,.14)!important;
}
.play-card .modal-actions .primary{
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 90%,#fff 10%),color-mix(in srgb,var(--accent) 88%,#000 12%))!important;
}

/* scoring cards: keep the same structure, but make them calmer and cleaner */
.play-card .scoring-title{margin-bottom:6px!important}
.play-card .scoring-panel{gap:9px!important}
.play-card .score-field-card{
  min-height:80px!important;
  padding:9px 12px 8px!important;
  border-radius:14px!important;
  border:1px solid color-mix(in srgb,var(--line) 70%,transparent)!important;
  background:color-mix(in srgb,var(--panel2) 80%,var(--panel) 20%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
}
.play-card .score-field-title{
  font-size:10px!important;
  letter-spacing:.07em!important;
}
.play-card .score-field-card>select{
  height:42px!important;
  min-height:42px!important;
  font-size:19px!important;
}
.play-card .score-toggle-control{height:42px!important;min-height:42px!important}
.play-card .score-toggle-copy{font-size:15px!important}
.play-card .score-toggle-track{
  border-color:color-mix(in srgb,var(--line) 68%,transparent)!important;
  background:color-mix(in srgb,var(--panel) 82%,#000 18%)!important;
}

/* Wrigley play editor refinement */








/* ---------- WRIGLEY SCOREBOARD + IVY/BRICK REALISM ---------- */







/* Ivy & brick: richer, more realistic masonry texture with controlled readability. */




@media(max-width:760px){
  .drawer{width:min(312px,86vw)!important}
  .menu-row,
  .drawer-nav,
  .drawer-tools>button,
  .import-button,
  .theme-choice{
    min-height:54px!important;
    padding:9px 10px!important;
    border-radius:14px!important;
  }
  .menu-copy strong{font-size:11px!important}
  .menu-copy small{font-size:7.8px!important}
  .play-card{
    padding-inline:12px!important;
  }
  .play-card .modal-head strong{font-size:17px!important}
  .play-card .situation{font-size:14px!important}
  .play-card .editor-section-title{font-size:9.5px!important}
  .play-card .editor-grid>label:not(.check-label),
  .play-card .runner-out-fields .form-grid.two>label{padding:9px 10px 10px!important}
  .play-card .editor-grid select,
  .play-card .editor-grid input,
  .play-card .runner-out-fields .form-grid.two select,
  .play-card .runner-out-fields .form-grid.two input,
  .play-card .pitch-entry-grid select,
  .play-card .pitch-entry-grid input,
  .play-card .pitch-velo-wrap input{
    min-height:38px!important;
    height:38px!important;
    font-size:16px!important;
  }
  .play-card .score-field-card{min-height:76px!important}
  .play-card .score-field-card>select{font-size:18px!important}
  .play-card .score-toggle-copy{font-size:14px!important}
  .play-card .modal-actions button{min-height:48px!important;font-size:12.5px!important}
}

/* ==========================================================
   v56 — APPROVED WRIGLEY DESIGNS + EDITOR SIMPLIFICATION
   ========================================================== */

/* Theme masthead is opt-in for Wrigley styles only. */
.wrigley-theme-masthead{display:none}







.wrigley-masthead-brand{display:grid;place-items:center}
.wrigley-clock-face{
  display:none;
  position:relative;
  width:86px;
  aspect-ratio:1;
  border:5px solid var(--wrigley-cream);
  border-radius:50%;
  background:
    radial-gradient(circle at 50% 50%,#173a2a 0 61%,transparent 62%),
    repeating-conic-gradient(from -1.5deg,var(--wrigley-cream) 0 3deg,transparent 3deg 30deg),
    #102d20;
  box-shadow:0 7px 16px rgba(0,0,0,.38),inset 0 0 0 2px rgba(255,255,255,.05);
}
.wrigley-clock-face::after{
  content:"";
  position:absolute;
  inset:9px;
  border-radius:50%;
  background:#102d20;
  z-index:0;
}
.wrigley-clock-face i{position:absolute;left:50%;top:50%;z-index:2;display:block;transform-origin:50% 100%;border-radius:999px;background:var(--wrigley-cream);box-shadow:0 1px 2px rgba(0,0,0,.45)}
.wrigley-clock-face .clock-hour{width:6px;height:25px;margin-left:-3px;margin-top:-25px;transform:rotate(var(--hour-angle,0deg))}
.wrigley-clock-face .clock-minute{width:4px;height:34px;margin-left:-2px;margin-top:-34px;transform:rotate(var(--minute-angle,0deg))}
.wrigley-clock-face .clock-pin{width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:var(--wrigley-cream);transform:none}
.wrigley-plaque-copy{display:none;text-align:center;line-height:1}
.wrigley-date-time{
  width:min(620px,84vw);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:7px 14px;
  margin-top:7px;
  border:1px solid color-mix(in srgb,var(--wrigley-gold) 50%,#314739);
  border-radius:5px;
  background:rgba(10,39,29,.92);
  color:var(--wrigley-cream);
  font-family:Georgia,"Times New Roman",serif;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 4px 10px rgba(0,0,0,.22);
}





/* Approved Ivy & Brick masthead: brick wall + vintage plaque. */










/* Use real, clean texture assets throughout each approved Wrigley style. */











/* ---------- v56 editor friction fixes ---------- */
.play-card #outResult::placeholder,
.play-card #advanceReason::placeholder,
.play-card [data-runner-reason]::placeholder{color:color-mix(in srgb,var(--muted) 88%,transparent)!important;opacity:.78!important}

/* Basic: same readable type, materially less vertical air. */
.play-card[data-editor-mode="basic"] .modal-head{padding-bottom:7px!important}
.play-card[data-editor-mode="basic"] .situation{min-height:42px!important;padding:8px 12px!important;margin-top:7px!important}
.play-card[data-editor-mode="basic"] .editor-hint{padding:8px 10px!important;margin:7px 0 8px!important;min-height:0!important}
.play-card[data-editor-mode="basic"] .editor-section-title{margin:9px 0 5px!important;padding-top:2px!important}
.play-card[data-editor-mode="basic"] .editor-grid{row-gap:7px!important;column-gap:8px!important}
.play-card[data-editor-mode="basic"] .editor-grid>label:not(.check-label){padding:7px 10px 8px!important;border-radius:12px!important}
.play-card[data-editor-mode="basic"] .field-label{min-height:16px!important;padding-bottom:5px!important}
.play-card[data-editor-mode="basic"] .editor-grid select,
.play-card[data-editor-mode="basic"] .editor-grid input{height:32px!important;min-height:32px!important}
.play-card[data-editor-mode="basic"] .scoring-panel{gap:7px!important}
.play-card[data-editor-mode="basic"] .score-field-card{min-height:68px!important;padding:7px 10px 6px!important;grid-template-rows:15px 1fr!important}
.play-card[data-editor-mode="basic"] .score-field-card>select{height:38px!important;min-height:38px!important}
.play-card[data-editor-mode="basic"] .score-toggle-control{height:38px!important;min-height:38px!important}
.play-card[data-editor-mode="basic"] .modal-actions{margin-top:10px!important}

/* Advanced / PBP: remove the box-in-box-in-box effect. */
.play-card .advanced-tools{
  margin-top:10px!important;
  padding:0!important;
  border:0!important;
  border-top:1px solid color-mix(in srgb,var(--line) 58%,transparent)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.play-card .advanced-title{margin:9px 0 7px!important;padding-top:8px!important}
.play-card .advanced-layout{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
.play-card .defense-field-card,
.play-card .advanced-runner-card{
  padding:10px!important;
  border:1px solid color-mix(in srgb,var(--line) 58%,transparent)!important;
  border-radius:14px!important;
  background:color-mix(in srgb,var(--panel2) 76%,var(--panel) 24%)!important;
}
.play-card .field-card-head{
  min-height:0!important;
  margin:0 0 7px!important;
  padding:0 0 7px!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 40%,transparent)!important;
}
.play-card .field-card-head strong{font-size:11.5px!important}
.play-card .field-card-head small{font-size:9px!important;margin-top:2px!important}
.play-card .fielder-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:auto!important;
  gap:6px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
.play-card .fielder-grid-team{
  grid-column:1/-1!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-height:26px!important;
  padding:0 2px 4px!important;
  border:0!important;
  font-size:8px!important;
}
.play-card .fielder-grid-team span{font-weight:950!important;letter-spacing:.08em!important;color:var(--muted)!important}
.play-card .fielder-grid-team small{font-size:7px!important;font-weight:800!important;letter-spacing:0!important;color:var(--muted)!important;text-transform:none!important}
.play-card .fielder-grid-pos{
  height:50px!important;
  min-height:50px!important;
  padding:5px 7px!important;
  border:1px solid color-mix(in srgb,var(--line) 68%,transparent)!important;
  border-radius:10px!important;
  background:color-mix(in srgb,var(--panel) 86%,#fff 2%)!important;
  grid-template-columns:auto 1fr auto!important;
  grid-template-rows:1fr!important;
  gap:5px!important;
}
.play-card .fielder-grid-pos>span{
  grid-row:auto!important;
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  font-size:9px!important;
}
.play-card .fielder-grid-pos>strong{font-size:9px!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.play-card .fielder-grid-pos>small{font-size:7px!important}
.play-card .fielder-selection{
  min-height:32px!important;
  margin-top:7px!important;
  padding:7px 9px!important;
  border:1px solid color-mix(in srgb,var(--line) 50%,transparent)!important;
  border-radius:10px!important;
  background:color-mix(in srgb,var(--panel) 76%,transparent)!important;
  font-size:8px!important;
}
.play-card .runner-empty{min-height:52px!important;padding:14px 10px!important}

/* Pitch tracker retains approved lights but uses the same lighter framing. */
.play-card .pitch-tools{
  border:0!important;
  border-top:1px solid color-mix(in srgb,var(--line) 58%,transparent)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  margin-top:10px!important;
}
.play-card .pitch-entry-card,
.play-card .pitch-sequence-card,
.play-card .pitch-workflow-note{
  border-color:color-mix(in srgb,var(--line) 54%,transparent)!important;
  box-shadow:none!important;
}

/* Wrigley editor gets the same vintage material without extra outlines. */






@media(max-width:760px){
  
  .wrigley-clock-face{width:76px!important;border-width:4px!important}
  
  .wrigley-date-time{width:min(520px,80vw)!important;font-size:9px!important;padding:6px 10px!important}
  
  
  .play-card[data-editor-mode="basic"] .modal-head strong{font-size:21px!important}
  .play-card[data-editor-mode="basic"] .editor-grid select,
  .play-card[data-editor-mode="basic"] .editor-grid input{height:36px!important;min-height:36px!important;font-size:17px!important}
  .play-card[data-editor-mode="basic"] .score-field-card{min-height:72px!important}
  .play-card .defense-field-card,.play-card .advanced-runner-card{padding:9px!important}
  .play-card .fielder-grid-pos{height:52px!important;min-height:52px!important;padding:5px 6px!important}
  .play-card .fielder-grid-pos>strong{font-size:9.5px!important}
  .play-card .fielder-grid-team small{display:none!important}
}

/* ==========================================================
   v57 PLAY EDITOR DENSITY + OVERLAY FIXES
   Fixes screenshot issues without changing score-grid behavior.
   ========================================================== */

/* Make the sticky header fully opaque and keep scrolled content from peeking through it. */
#playModal .play-card{
  scroll-padding-top:92px!important;
  scroll-padding-bottom:96px!important;
}
#playModal .modal-head{
  position:sticky!important;
  top:0!important;
  z-index:20!important;
  margin:0 -2px 4px!important;
  padding:8px 2px 10px!important;
  background:var(--panel)!important;
  box-shadow:0 8px 14px rgba(0,0,0,.18)!important;
}


/* Keep the guidance useful, but reclaim the large block of vertical space. */
.play-card .editor-context-hint{
  min-height:0!important;
  margin:7px 0 8px!important;
  padding:8px 10px!important;
  gap:9px!important;
  border-radius:12px!important;
}
.play-card .editor-context-hint>span{
  flex:0 0 auto!important;
  padding:5px 9px!important;
  font-size:8px!important;
}
.play-card .editor-context-hint>p{
  margin:0!important;
  font-size:11px!important;
  line-height:1.25!important;
}
.play-card .editor-guide{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;
  min-height:0!important;
  margin:6px 0 9px!important;
  padding:5px!important;
  border-radius:11px!important;
}
.play-card .editor-guide span{
  min-width:0!important;
  min-height:42px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  padding:4px 2px!important;
  text-align:center!important;
  font-size:8.5px!important;
  line-height:1.05!important;
  white-space:nowrap!important;
}
.play-card .editor-guide b{
  width:20px!important;
  height:20px!important;
  display:grid!important;
  place-items:center!important;
  font-size:7px!important;
}

/* Editor field cards: keep the current readable type size, remove dead height. */
.play-card .editor-grid,
.play-card .runner-out-fields .form-grid.two{
  align-items:start!important;
}
.play-card .editor-grid>label:not(.check-label),
.play-card .runner-out-fields .form-grid.two>label:not(.check-label){
  display:grid!important;
  grid-template-rows:22px 38px!important;
  min-height:0!important;
  height:auto!important;
  align-content:start!important;
  padding:7px 10px 8px!important;
  gap:0!important;
}
.play-card .field-label,
.play-card .runner-out-fields .form-grid.two>label>.field-label{
  height:22px!important;
  min-height:22px!important;
  padding:0 1px 5px!important;
  font-size:15px!important;
  line-height:1!important;
}
.play-card .field-help{
  font-size:10px!important;
}
.play-card .editor-grid select,
.play-card .editor-grid input,
.play-card .runner-out-fields .form-grid.two select,
.play-card .runner-out-fields .form-grid.two input{
  height:38px!important;
  min-height:38px!important;
  padding:0 28px 0 0!important;
  font-size:18px!important;
  line-height:1!important;
}
.play-card .editor-grid input::placeholder,
.play-card .runner-out-fields input::placeholder{
  font-size:16px!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}

/* Use a visible, theme-aware chevron instead of the black native Safari arrow. */
.play-card select,
.play-card .score-field-card>select,
.play-card .pitch-entry-grid select{
  -webkit-appearance:none!important;
  appearance:none!important;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--text) 50%),
    linear-gradient(135deg,var(--text) 50%,transparent 50%)!important;
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%!important;
  background-size:5px 5px,5px 5px!important;
  background-repeat:no-repeat!important;
  padding-right:30px!important;
}


/* When Advance On is not relevant, don't leave a dead half-column. */
.play-card #runnerGrid:has(#advanceReasonField.hidden){
  grid-template-columns:minmax(0,1fr)!important;
}
.play-card #runnerGrid:has(#advanceReasonField.hidden)>label:first-child{
  grid-column:1/-1!important;
}

/* Scoring: same text size, materially shorter cards. */
.play-card .scoring-panel{
  gap:8px!important;
}
.play-card .score-field-card{
  min-height:68px!important;
  height:68px!important;
  grid-template-rows:18px 38px!important;
  padding:7px 10px 5px!important;
  border-radius:12px!important;
}
.play-card .score-field-title{
  font-size:10px!important;
  line-height:1!important;
}
.play-card .score-field-card>select{
  height:38px!important;
  min-height:38px!important;
  font-size:18px!important;
}
.play-card .score-toggle-control{
  height:38px!important;
  min-height:38px!important;
}
.play-card .score-toggle-copy{font-size:15px!important}

/* Advanced fielding: one clean panel, defense label directly above positions. */
.play-card .advanced-tools{
  padding:0!important;
  border:0!important;
  border-top:1px solid color-mix(in srgb,var(--line) 50%,transparent)!important;
  background:transparent!important;
  box-shadow:none!important;
}
.play-card .advanced-title{
  margin:8px 0 6px!important;
  padding-top:8px!important;
}
.play-card .defense-field-card{
  padding:8px 9px 9px!important;
  border:1px solid color-mix(in srgb,var(--line) 54%,transparent)!important;
  border-radius:13px!important;
  background:color-mix(in srgb,var(--panel2) 70%,var(--panel) 30%)!important;
}
.play-card .field-card-head{
  min-height:0!important;
  margin:0 0 5px!important;
  padding:0 0 6px!important;
  border-bottom:0!important;
}
.play-card .field-card-head strong{font-size:13px!important}
.play-card .field-card-head small{font-size:10px!important}
.play-card .field-card-head button{
  min-height:38px!important;
  padding:0 11px!important;
  border-radius:9px!important;
}
.play-card .fielder-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:auto!important;
  gap:5px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.play-card .fielder-grid-team{
  grid-column:1/-1!important;
  min-height:20px!important;
  height:20px!important;
  padding:0 2px 3px!important;
  margin:0!important;
  border:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
}
.play-card .fielder-grid-pos{
  height:48px!important;
  min-height:48px!important;
  padding:5px 7px!important;
  border-radius:9px!important;
  grid-template-columns:30px minmax(0,1fr) auto!important;
  grid-template-rows:1fr!important;
  gap:6px!important;
}
.play-card .fielder-grid-pos>span{
  width:28px!important;
  height:28px!important;
  font-size:9px!important;
}
.play-card .fielder-grid-pos>strong{
  font-size:10px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.play-card .fielder-grid-pos>small{font-size:7.5px!important}
.play-card .fielder-selection{
  min-height:30px!important;
  margin-top:6px!important;
  padding:6px 9px!important;
  font-size:9px!important;
}
.play-card .advanced-runner-card{
  padding:8px 9px!important;
  border-radius:13px!important;
}
.play-card .runner-empty{
  min-height:42px!important;
  padding:10px!important;
}

/* Sticky action row stays available but cannot obscure the last editor section. */
#playModal .modal-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:18!important;
  margin:10px -2px 0!important;
  padding:9px 2px calc(8px + env(safe-area-inset-bottom))!important;
  background:var(--panel)!important;
  box-shadow:0 -10px 18px rgba(0,0,0,.20)!important;
}

.play-card[data-editor-mode="advanced"] .advanced-tools,
.play-card[data-editor-mode="pitch"] .advanced-tools{
  margin-bottom:78px!important;
}

@media(max-width:760px){
  #playModal .play-card{
    max-height:calc(100dvh - env(safe-area-inset-top) - 8px)!important;
  }
  #playModal .modal-head{
    top:0!important;
    padding:7px 2px 9px!important;
  }
  .play-card .modal-head strong{font-size:22px!important}
  .play-card .modal-head small{font-size:13px!important}
  .play-card .editor-context-hint>p{font-size:11.5px!important}
  .play-card .editor-guide span{font-size:8.5px!important}
  .play-card .editor-section-title{
    margin:9px 0 5px!important;
    padding-top:4px!important;
    font-size:11px!important;
  }
  .play-card .editor-grid{
    row-gap:7px!important;
    column-gap:8px!important;
  }
  .play-card .editor-grid>label:not(.check-label),
  .play-card .runner-out-fields .form-grid.two>label:not(.check-label){
    grid-template-rows:22px 38px!important;
    padding:7px 9px!important;
  }
  .play-card .field-label,
  .play-card .runner-out-fields .form-grid.two>label>.field-label{
    height:22px!important;
    min-height:22px!important;
    font-size:15px!important;
  }
  .play-card .editor-grid select,
  .play-card .editor-grid input,
  .play-card .runner-out-fields .form-grid.two select,
  .play-card .runner-out-fields .form-grid.two input{
    height:38px!important;
    min-height:38px!important;
    font-size:18px!important;
  }
  .play-card .score-field-card{
    height:66px!important;
    min-height:66px!important;
    grid-template-rows:17px 37px!important;
    padding:7px 9px 5px!important;
  }
  .play-card .score-field-card>select,
  .play-card .score-toggle-control{
    height:37px!important;
    min-height:37px!important;
  }
  .play-card .modal-actions button{
    min-height:48px!important;
    font-size:14px!important;
  }
  .play-card .fielder-grid-pos{
    height:46px!important;
    min-height:46px!important;
  }
}

@media(max-width:390px){
  .play-card .editor-guide span{font-size:7.8px!important}
  .play-card .score-toggle-copy{font-size:14px!important}
  .play-card .fielder-grid-pos>strong{font-size:9px!important}
}

/* ==========================================================
   v58 REAL-MOBILE PLAY EDITOR FIX
   Fixes the actual iOS Safari rendering shown in v57 screenshots.
   ========================================================== */

/* 1) Never let Safari paint our editor selects as light/native slabs. */
#playModal select{
  -webkit-appearance:none!important;
  appearance:none!important;
  color-scheme:dark!important;
  background-image:none!important;
  background-color:color-mix(in srgb,var(--panel) 84%,#000 16%)!important;
  color:var(--text)!important;
  -webkit-text-fill-color:var(--text)!important;
  border:1px solid color-mix(in srgb,var(--line) 72%,transparent)!important;
  border-radius:9px!important;
  box-shadow:none!important;
}

#playModal select option{
  background:var(--panel)!important;
  color:var(--text)!important;
}


/* A CSS chevron belongs to the container, not the select paint layer. */
#playModal .editor-grid>label:has(>select),
#playModal .runner-out-fields label:has(>select),
#playModal .pitch-entry-grid>label:has(>select),
#playModal .score-field-card:has(>select){position:relative!important}
#playModal .editor-grid>label:has(>select)::after,
#playModal .runner-out-fields label:has(>select)::after,
#playModal .pitch-entry-grid>label:has(>select)::after,
#playModal .score-field-card:has(>select)::after{
  content:""!important;
  position:absolute!important;
  width:7px!important;
  height:7px!important;
  right:14px!important;
  bottom:20px!important;
  border-right:2px solid color-mix(in srgb,var(--text) 82%,var(--muted))!important;
  border-bottom:2px solid color-mix(in srgb,var(--text) 82%,var(--muted))!important;
  transform:rotate(45deg)!important;
  pointer-events:none!important;
  z-index:2!important;
}

#playModal .score-field-card:has(>select)::after{bottom:16px!important}
#playModal .pitch-entry-grid>label:has(>select)::after{bottom:16px!important}

/* Explicit control padding now that the arrow is external. */
#playModal .editor-grid select,
#playModal .runner-out-fields select{
  padding:0 34px 0 10px!important;
}
#playModal .score-field-card>select{
  padding:0 34px 0 0!important;
  border:0!important;
  background-color:transparent!important;
}

#playModal .pitch-entry-grid select{
  padding:0 36px 0 12px!important;
}

/* 2) Pitch-by-Pitch should read in one logical direction. */
.play-card.pitch-mode-editor .editor-context-hint{margin-top:8px!important}
.play-card.pitch-mode-editor .editor-guide{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  min-height:38px!important;
  padding:4px 7px!important;
  margin:5px 0 8px!important;
  gap:4px!important;
}
.play-card.pitch-mode-editor .editor-guide span{
  min-height:30px!important;
  display:grid!important;
  grid-template-columns:20px minmax(0,1fr)!important;
  align-items:center!important;
  justify-items:start!important;
  gap:5px!important;
  padding:2px 4px!important;
  font-size:8px!important;
  white-space:nowrap!important;
}
.play-card.pitch-mode-editor .editor-guide b{
  width:20px!important;
  height:20px!important;
  margin:0!important;
}
.play-card.pitch-mode-editor .pitch-workflow-note{display:none!important}

/* 3) Compact the Pitch Tracker without reducing important type. */
.play-card.pitch-mode-editor .pitch-tools{
  margin:5px 0 9px!important;
  border-radius:14px!important;
}
.play-card.pitch-mode-editor .pitch-tools-head{
  min-height:82px!important;
  padding:9px 11px!important;
}
.play-card.pitch-mode-editor .pitch-title-copy>strong{font-size:15px!important}
.play-card.pitch-mode-editor .pitch-title-copy>small{
  margin-top:4px!important;
  font-size:8px!important;
  line-height:1.2!important;
}
.play-card.pitch-mode-editor .pitch-count-lights{padding:6px 10px!important}
.play-card.pitch-mode-editor .pitch-entry-card{padding:9px 10px 10px!important}
.play-card.pitch-mode-editor .pitch-entry-card-head{margin-bottom:6px!important;padding-bottom:6px!important}
.play-card.pitch-mode-editor .pitch-entry-grid{gap:7px!important}
.play-card.pitch-mode-editor .pitch-entry-grid label>span{min-height:18px!important;margin-bottom:4px!important}
.play-card.pitch-mode-editor .pitch-entry-grid select,
.play-card.pitch-mode-editor .pitch-velo-wrap,
.play-card.pitch-mode-editor .pitch-velo-wrap input{
  height:42px!important;
  min-height:42px!important;
}
.play-card.pitch-mode-editor .record-pitch-btn{min-height:46px!important}
.play-card.pitch-mode-editor .pitch-sequence-card{padding:8px 10px 9px!important}
.play-card.pitch-mode-editor .pitch-sequence-head{margin-bottom:5px!important;padding-bottom:5px!important}
.play-card.pitch-mode-editor .pitch-empty{min-height:48px!important;padding:7px 8px!important}

/* 4) Action buttons are part of the document flow. They never cover editor content. */
#playModal .modal-actions{
  position:static!important;
  bottom:auto!important;
  z-index:auto!important;
  margin:12px 0 0!important;
  padding:9px 0 calc(10px + env(safe-area-inset-bottom))!important;
  background:transparent!important;
  box-shadow:none!important;
}

.play-card[data-editor-mode="advanced"] .advanced-tools,
.play-card[data-editor-mode="pitch"] .advanced-tools{margin-bottom:0!important}
#playModal .play-card{
  scroll-padding-bottom:24px!important;
  padding-bottom:calc(14px + env(safe-area-inset-bottom))!important;
}

/* 5) Fielders: no phantom space before the 3x3 grid. */
.play-card .fielder-grid-team{
  padding:1px 2px 4px!important;
  height:22px!important;
  min-height:22px!important;
}
.play-card .fielder-grid{
  align-content:start!important;
  min-height:0!important;
}
.play-card .defense-field-card{overflow:visible!important}

@media(max-width:760px){
  #playModal select{font-size:16px!important}
  .play-card.pitch-mode-editor .editor-context-hint>p{font-size:10.5px!important}
  .play-card.pitch-mode-editor .editor-guide span{font-size:7.5px!important}
  .play-card.pitch-mode-editor .pitch-tools-head{grid-template-columns:minmax(0,1fr) 94px!important}
  .play-card.pitch-mode-editor .pitch-count-card{min-width:94px!important;padding:6px 7px!important}
  .play-card.pitch-mode-editor .pitch-count-card>b{font-size:21px!important}
  .play-card.pitch-mode-editor .pitch-entry-grid select,
  .play-card.pitch-mode-editor .pitch-entry-grid input,
  .play-card.pitch-mode-editor .pitch-velo-wrap{height:42px!important;min-height:42px!important}
  #playModal .modal-actions{gap:7px!important}
  #playModal .modal-actions button{min-height:48px!important;font-size:13px!important}
}

/* v58 final mobile alignment corrections from live render QA. */
#playModal .play-card::before{display:none!important}
#playModal .modal-head{
  padding-top:20px!important;
}
#playModal .modal-head::before{
  content:"";
  position:absolute;
  top:7px;
  left:50%;
  width:42px;
  height:5px;
  transform:translateX(-50%);
  border-radius:999px;
  background:color-mix(in srgb,var(--text) 34%,transparent);
  pointer-events:none;
}
/* A full-width field must use the full grid track, not preserve the old flex-end track. */
#playModal .editor-grid>label:not(.check-label),
#playModal .runner-out-fields .form-grid.two>label:not(.check-label){
  justify-content:stretch!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
}
#playModal #runnerGrid:has(#advanceReasonField.hidden)>label:first-child,
#playModal #runnerGrid:has(#advanceReasonField.hidden)>label:first-child>select{
  width:100%!important;
  max-width:none!important;
}
#playModal .play-card{padding-top:0!important}

/* ==========================================================
   v59 THEME / DARK MODE + DEVICE CONSISTENCY
   Presentation-only QA pass. Core score-grid / scoring behavior unchanged.
   ========================================================== */

/* 1) One theme-aware surface language across secondary workspaces. */
.modal-card,
.settings-card,
.confirm-card,
.postgame-card,
.history-item,
.summary-hero,
.summary-v54-line,
.summary-v54-actions,
.summary-v54-notes,
.team-stat-overview,
.batting-stats-card,
.pitch-inning-card,
.mode-help-strip,
.mode-summary-kpis>span,
.play-log-filter,
.pitch-outcomes span,
.pitch-usage>div:not(.pitch-usage-empty),
.fielding-stat-list>div{
  background:color-mix(in srgb,var(--panel) 94%,#000 6%)!important;
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--line) 82%,transparent)!important;
}
.modal-card input,
.modal-card select,
.modal-card textarea,
.settings-card input,
.settings-card select,
.settings-card textarea{
  background:color-mix(in srgb,var(--panel2) 90%,#000 10%)!important;
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--line) 82%,transparent)!important;
  caret-color:var(--accent)!important;
}
.modal-card input::placeholder,
.modal-card textarea::placeholder{color:color-mix(in srgb,var(--muted) 82%,transparent)!important;opacity:1!important}
.modal-card button,
.settings-card button,
.history-actions button,
.summary-v54-actions button,
.postgame-actions button,
.postgame-footer-actions button{
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--line) 82%,transparent)!important;
}
.modal-card button:not(.primary):not(.danger),
.settings-card button:not(.primary):not(.danger),
.history-actions button,
.summary-v54-actions button,
.postgame-actions button:not(.primary),
.postgame-footer-actions button:not(.primary){
  background:color-mix(in srgb,var(--panel2) 90%,#fff 2%)!important;
}
.modal-card button:focus-visible,
.settings-card button:focus-visible,
.modal-card input:focus-visible,
.modal-card select:focus-visible,
.modal-card textarea:focus-visible,
.drawer .menu-row:focus-visible{
  outline:2px solid color-mix(in srgb,var(--accent) 74%,transparent)!important;
  outline-offset:2px!important;
}
button:disabled,input:disabled,select:disabled,textarea:disabled{
  opacity:.48!important;
  filter:saturate(.55)!important;
  cursor:not-allowed!important;
}

/* 2) Selected / active state is intentionally the same pattern in every theme. */
.drawer .drawer-nav.active,
.play-log-filter button.active,
.mode-workspace-tabs button.active,
.workspace-tabs button.active{
  color:var(--text)!important;
  background:color-mix(in srgb,var(--selected) 74%,var(--panel2) 26%)!important;
  border-color:color-mix(in srgb,var(--accent) 48%,var(--line))!important;
  box-shadow:inset 3px 0 0 var(--accent),inset 0 0 0 1px color-mix(in srgb,var(--accent) 10%,transparent)!important;
}

body.theme-postseason .drawer .drawer-nav.active,
body.theme-postseason .play-log-filter button.active,
body.theme-postseason .mode-workspace-tabs button.active,
body.theme-postseason .workspace-tabs button.active{
  background:color-mix(in srgb,var(--selected) 72%,#08172a 28%)!important;
  border-color:color-mix(in srgb,var(--accent) 58%,#526476)!important;
}

/* 3) Dark mode is a true surface swap, not just dimming. */
body.dark-mode{
  color-scheme:dark;
}
body.dark-mode .card,
body.dark-mode .modal-card,
body.dark-mode .history-item,
body.dark-mode .summary-v54-line,
body.dark-mode .summary-v54-actions,
body.dark-mode .summary-v54-notes,
body.dark-mode .team-stat-overview,
body.dark-mode .pitch-inning-card{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 8px 20px rgba(0,0,0,.18)!important;
}
body.dark-mode .drawer-shade,
body.dark-mode .modal{background:rgba(0,0,0,.72)!important}
body.dark-mode .modal-card input,
body.dark-mode .modal-card select,
body.dark-mode .modal-card textarea{
  background:color-mix(in srgb,var(--panel2) 84%,#000 16%)!important;
}
body.dark-mode .summary-v54-head p,
body.dark-mode .postgame-section-head small,
body.dark-mode .history-item small,
body.dark-mode .team-stat-head small,
body.dark-mode .play-log-player small{color:color-mix(in srgb,var(--muted) 90%,#fff 10%)!important}

/* 4) Wrigley / postseason secondary screens stay inside their theme. */


body.theme-postseason .modal-card,
body.theme-postseason .history-item,
body.theme-postseason .summary-v54-line,
body.theme-postseason .summary-v54-actions,
body.theme-postseason .summary-v54-notes,
body.theme-postseason .team-stat-overview,
body.theme-postseason .pitch-inning-card{
  background:linear-gradient(180deg,#0b2037,#07182a)!important;
  border-color:color-mix(in srgb,var(--accent) 38%,#4f6277)!important;
  color:#f7f3ea!important;
}
body.theme-postseason .modal-card input,
body.theme-postseason .modal-card select,
body.theme-postseason .modal-card textarea,
body.theme-postseason .settings-card input,
body.theme-postseason .settings-card select{
  background:#071a2d!important;
  color:#f7f3ea!important;
  border-color:color-mix(in srgb,var(--accent) 35%,#506277)!important;
}

/* 5) Long team/player names: fit first, wrap only where useful, ellipsis last. */
.team-header-name{
  max-width:100%!important;
  min-width:0!important;
  letter-spacing:-.01em!important;
  line-height:1.02!important;
}
.team-header-name.team-name-long{font-size:clamp(9px,2.9vw,13px)!important;letter-spacing:-.025em!important}
.team-header-name.team-name-xlong{font-size:clamp(8.2px,2.55vw,12px)!important;letter-spacing:-.04em!important}
.matchup-team select{
  min-width:0!important;
  width:100%!important;
  text-overflow:ellipsis!important;
}
.launch-team,
.summary-v54-team,
.postgame-team,
.team-stat-head>span,
.play-log-player,
.player-stat-card summary>span:first-child{min-width:0!important}
.launch-team small,
.summary-v54-team small,
.postgame-team small{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  overflow-wrap:anywhere!important;
  line-height:1.15!important;
  min-height:2.3em!important;
}
.team-stat-head b,
.player-stat-card summary strong,
.play-log-player strong,
.fielder-grid-pos>strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.fielder-grid-pos>strong{font-size:clamp(6.3px,2vw,8px)!important}

/* 6) Small-phone safeguards. Keep touch targets >=44px while reclaiming decoration. */
@media(max-width:390px){
  main{padding-left:7px!important;padding-right:7px!important}
  .drawer{width:min(300px,88vw)!important}
  .drawer .menu-row{min-height:48px!important;height:auto!important;padding:7px 9px!important}
  .drawer .menu-copy strong{font-size:10.5px!important}
  .drawer .menu-copy small{font-size:7px!important}
  .drawer .menu-value{max-width:94px!important}
  .live-game-bar{margin-left:0!important;margin-right:0!important}
  .team-header-name{font-size:10.5px!important}
  .team-header-name.team-name-long{font-size:9px!important}
  .team-header-name.team-name-xlong{font-size:8.1px!important}
  .matchup-team select.team-name-long{font-size:8px!important}
  .matchup-team select.team-name-xlong{font-size:7.2px!important}
  .summary-v54-head{gap:8px!important}
  .summary-v54-head h2{font-size:20px!important}
  .summary-v54-team small,.postgame-team small,.launch-team small{font-size:6.5px!important}
  .postgame-card{width:100%!important;max-width:none!important}
  .mobile-action-bar button{min-width:0!important}
  .mobile-action-bar small{white-space:nowrap!important}
}
@media(max-width:350px){
  .drawer{width:min(286px,91vw)!important}
  .mobile-action-bar span{font-size:16px!important}
  .mobile-action-bar small{font-size:7px!important}
  .team-header-name.team-name-long{font-size:8.4px!important}
  .team-header-name.team-name-xlong{font-size:7.6px!important}
  .summary-v54-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .postgame-actions,.postgame-footer-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* 7) Landscape iPhone: sheets use available height and preserve safe areas. */
@media(max-height:520px) and (orientation:landscape){
  .modal{align-items:stretch!important;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)!important}
  .modal-card{
    width:min(720px,92vw)!important;
    max-width:720px!important;
    max-height:100%!important;
    margin:auto!important;
    border-radius:16px!important;
    padding:10px 12px!important;
  }
  #playModal .play-card{
    width:min(760px,94vw)!important;
    max-width:760px!important;
    height:100%!important;
    max-height:100%!important;
    border-radius:16px!important;
    padding-bottom:calc(10px + env(safe-area-inset-bottom))!important;
  }
  #playModal .modal-head{padding-top:14px!important}
  #playModal .modal-head::before{top:4px!important}
  .mobile-action-bar{padding-bottom:calc(2px + env(safe-area-inset-bottom))!important}
}

/* 8) Reduce-motion covers v50+ UX effects globally. */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}

/* ==========================================================
   v60 DESKTOP WORKSPACE + SAVED GAMES UX
   Desktop-first refinement and game-library polish.
   Mobile score-grid / scoring behavior intentionally unchanged.
   ========================================================== */

/* Saved Games becomes a real game library instead of utility rows. */
.saved-games-page{max-width:1180px;margin:0 auto;padding:4px 0 28px}
.saved-games-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:4px 0 14px;padding:0 2px}
.saved-games-head>div{min-width:0}.saved-games-head small{display:block;font-size:7px;font-weight:950;letter-spacing:.16em;color:var(--accent)}
.saved-games-head h2{margin:4px 0 3px;font-size:25px;line-height:1.05;color:var(--text)}
.saved-games-head p{max-width:650px;margin:0;color:var(--muted);font-size:8.5px;line-height:1.45}
.saved-games-head>span{flex:0 0 auto;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--muted);font-size:7px;font-weight:900}
.saved-games-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.saved-game-card{min-width:0;padding:0;overflow:hidden;border-radius:15px!important}
.saved-game-top{display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 10px;border-bottom:1px solid color-mix(in srgb,var(--line) 66%,transparent);background:color-mix(in srgb,var(--panel2) 90%,var(--panel) 10%)}
.saved-game-top .saved-status{display:inline-flex;align-items:center;min-height:21px;padding:0 7px;border:1px solid var(--line);border-radius:999px;font-size:5.8px;font-weight:950;letter-spacing:.08em;color:var(--muted)}
.saved-game-top .saved-status.live{color:#dfeadf;border-color:color-mix(in srgb,#68a676 65%,var(--line));background:color-mix(in srgb,#285f37 46%,var(--panel2))}
.saved-game-top .saved-status.final{color:var(--text);border-color:color-mix(in srgb,var(--accent) 62%,var(--line));background:color-mix(in srgb,var(--accent) 13%,var(--panel2))}
.saved-game-top .saved-status.reopened{color:var(--text);border-color:color-mix(in srgb,#7b9fc3 60%,var(--line));background:color-mix(in srgb,#315d83 36%,var(--panel2))}
.saved-game-top>em{font-size:6.5px;font-style:normal;font-weight:850;color:var(--muted)}
.saved-game-top>b{margin-left:auto;font-size:6.5px;color:var(--accent);letter-spacing:.05em}
.saved-matchup{display:grid;grid-template-columns:minmax(0,1fr) 108px minmax(0,1fr);align-items:center;gap:8px;padding:13px 12px 11px}
.saved-team{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.saved-team.right{grid-template-columns:minmax(0,1fr) 38px;text-align:right}.saved-team.right img{grid-column:2}.saved-team.right span{grid-column:1;grid-row:1}
.saved-team img{width:38px;height:38px;object-fit:contain}.saved-team span{min-width:0}.saved-team strong,.saved-team small{display:block;min-width:0}
.saved-team strong{font-size:13px;color:var(--text)}.saved-team small{margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:6.5px;color:var(--muted)}
.saved-score{text-align:center;min-width:0}.saved-score strong{display:block;font-size:27px;line-height:1;color:var(--text)}.saved-score strong i{margin:0 7px;color:var(--muted);font-style:normal;font-weight:500}.saved-score span{display:block;margin-top:5px;font-size:6.5px;font-weight:900;color:var(--accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.saved-game-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:0 12px 11px}.saved-game-meta span{min-width:0;padding:6px 7px;border-radius:8px;background:color-mix(in srgb,var(--panel2) 72%,transparent);border:1px solid color-mix(in srgb,var(--line) 48%,transparent);font-size:6px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.saved-game-actions{display:grid;grid-template-columns:1.2fr 1fr auto;gap:7px;padding:10px 12px 12px;border-top:1px solid color-mix(in srgb,var(--line) 58%,transparent)}
.saved-game-actions button{min-height:38px;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--text);font-size:7px;font-weight:900}
.saved-game-actions .saved-primary{background:color-mix(in srgb,var(--accent) 16%,var(--panel2));border-color:color-mix(in srgb,var(--accent) 52%,var(--line));color:var(--text)}
.saved-game-actions .saved-delete{padding-inline:10px;color:#e78880!important;border-color:color-mix(in srgb,#c5574f 45%,var(--line))!important;background:color-mix(in srgb,#7d2b27 16%,var(--panel2))!important}
.saved-games-empty{display:grid;place-items:center;max-width:560px;margin:40px auto;padding:34px 24px;text-align:center}.saved-games-empty>span{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:var(--panel2);border:1px solid var(--line);color:var(--accent);font-size:22px}.saved-games-empty strong{margin-top:12px;font-size:15px}.saved-games-empty p{max-width:360px;margin:6px 0 15px;color:var(--muted);font-size:8px;line-height:1.5}.saved-games-empty button{min-height:40px;padding:0 15px;border:1px solid color-mix(in srgb,var(--accent) 50%,var(--line));border-radius:9px;background:color-mix(in srgb,var(--accent) 14%,var(--panel2));color:var(--text);font-weight:900;font-size:8px}






/* Desktop should feel like a workspace, not a stretched phone. */
@media(min-width:1100px){
  body:not(.home-page) main{max-width:1540px!important;padding:12px 22px 40px!important}
  .mode-page-shell{max-width:1380px!important}
  .saved-games-page{max-width:1280px!important}
  .summary-page-v54{max-width:1320px!important;margin:0 auto}
  .live-game-bar{border-radius:12px!important}
  .mode-workspace-tabs{max-width:760px;margin:8px auto 12px!important}
  .mode-page-head{padding:5px 2px 12px!important}
  .mode-page-head h2{font-size:25px!important}
  .mode-page-head p{max-width:760px!important;font-size:8px!important}
  .mode-help-strip{padding:11px 13px!important}
  .play-log{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .play-log-inning{break-inside:avoid}
  .pitch-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
  .stats-team-grid,.team-overview-grid{gap:14px!important}
  .stats-card,.pitch-dashboard-card,.team-stat-overview{border-radius:14px!important}
  .advanced-stats-table th,.advanced-stats-table td{padding:8px 9px!important}

  /* Desktop scorebook: strong selection / hover and comfortable keyboard navigation. */
  .team-scorebook{border-radius:15px!important}
  .team-scorebook-scroll{scrollbar-gutter:stable both-edges!important}
  .play-cell{transition:background .12s ease,box-shadow .12s ease,transform .12s ease}
  .play-cell:hover{background:color-mix(in srgb,var(--selected) 24%,var(--panel))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 34%,transparent)!important}
  .play-cell:focus-visible,.player-cell:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 76%,transparent)!important;outline-offset:-3px!important;z-index:5!important}
  .play-cell[aria-selected="true"]{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 70%,transparent)!important}

  /* Right-side editor becomes a genuine inspector. */
  body.has-play-inspector main{padding-right:500px!important}
  #playModal:not(.hidden){width:476px!important}
  #playModal .play-card{width:476px!important;max-width:476px!important;border-radius:18px 0 0 18px!important;padding:0 18px 28px!important;scrollbar-gutter:stable!important}
  #playModal .modal-head{top:0!important;margin:0 -18px 6px!important;padding:19px 18px 12px!important;border-radius:18px 0 0 0!important}
  #playModal .modal-head::before{top:7px!important}
  #playModal .modal-actions{position:sticky!important;bottom:-28px!important;margin:16px -18px -28px!important;padding:12px 18px 18px!important;background:color-mix(in srgb,var(--panel) 96%,#000 4%)!important;border-top:1px solid color-mix(in srgb,var(--line) 64%,transparent)!important;box-shadow:0 -10px 22px rgba(0,0,0,.18)!important;z-index:9!important}
  
  #playModal .editor-grid{column-gap:10px!important}
  #playModal .pitch-entry-grid{grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr)!important}
  #playModal .pitch-result-field,#playModal .record-pitch-btn{grid-column:1/-1!important}
  #playModal .advanced-layout{grid-template-columns:1fr!important}
}

@media(min-width:1450px){
  .saved-games-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .saved-matchup{grid-template-columns:minmax(0,1fr) 100px minmax(0,1fr)}
  .saved-team small{font-size:6.2px}
}

/* Mobile Saved Games stays compact and thumb-friendly. */
@media(max-width:760px){
  .saved-games-page{padding:0 0 20px}.saved-games-head{align-items:flex-start;margin:3px 2px 10px}.saved-games-head p{font-size:7.2px}.saved-games-head>span{font-size:6.2px;padding:6px 8px}.saved-games-grid{grid-template-columns:1fr;gap:9px}
  .saved-game-card{border-radius:13px!important}.saved-matchup{grid-template-columns:minmax(0,1fr) 92px minmax(0,1fr);padding:11px 9px 9px}.saved-team{grid-template-columns:32px minmax(0,1fr);gap:6px}.saved-team.right{grid-template-columns:minmax(0,1fr) 32px}.saved-team img{width:32px;height:32px}.saved-score strong{font-size:23px}.saved-game-meta{grid-template-columns:1fr 1fr;padding:0 9px 9px}.saved-game-meta span:last-child{grid-column:1/-1}.saved-game-actions{grid-template-columns:1fr 1fr auto;padding:9px}.saved-game-actions button{min-height:44px;font-size:7px}.saved-game-actions .saved-delete{min-width:54px}
}

/* ==========================================================
   v61 CROSS-GAME UX SAFETY + RELEASE-CANDIDATE POLISH
   Appearance is global to the app: saved/imported games keep the
   currently selected theme, dark mode and focus state.
   ========================================================== */
.saved-appearance-note{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));
  border-radius:13px;
  background:color-mix(in srgb,var(--panel) 92%,var(--accent) 4%);
  color:var(--text);
}
.saved-appearance-note>span{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));
  border-radius:10px;
  background:var(--panel2);
  color:var(--accent);
  font-size:15px;
}
.saved-appearance-note>div{min-width:0}
.saved-appearance-note strong,
.saved-appearance-note small{display:block}
.saved-appearance-note strong{font-size:9px;line-height:1.15;color:var(--text)}
.saved-appearance-note small{margin-top:3px;font-size:7px;line-height:1.35;color:var(--muted)}
.saved-appearance-note em{
  justify-self:end;
  max-width:210px;
  padding:6px 8px;
  border:1px solid color-mix(in srgb,var(--line) 72%,transparent);
  border-radius:999px;
  background:var(--panel2);
  color:var(--accent);
  font-size:6.5px;
  line-height:1.2;
  font-style:normal;
  font-weight:900;
  text-align:right;
  white-space:normal;
}


body.theme-postseason .saved-appearance-note{
  border-color:color-mix(in srgb,var(--accent) 38%,var(--line));
}

/* Release-candidate consistency: cross-game actions have a clear focus state. */
.saved-game-actions button:focus-visible,
.launch-actions button:focus-visible,
.launch-primary:focus-visible,
.mode-workspace-tabs button:focus-visible{
  outline:2px solid var(--accent)!important;
  outline-offset:2px!important;
}

/* Keep Saved Games metadata readable without widening cards on small phones. */
@media(max-width:760px){
  .saved-appearance-note{
    grid-template-columns:32px minmax(0,1fr);
    gap:9px;
    padding:9px 10px;
  }
  .saved-appearance-note em{
    grid-column:1/-1;
    justify-self:stretch;
    max-width:none;
    text-align:left;
    border-radius:9px;
  }
  .saved-appearance-note strong{font-size:8.5px}
  .saved-appearance-note small{font-size:6.8px}
}

/* ==========================================================
   v62 RELEASE-CANDIDATE SAFETY + NAVIGATION POLISH
   Cross-game data safety and Saved Games clarity. Core scoring untouched.
   ========================================================== */
.saved-game-card.is-current{
  border-color:color-mix(in srgb,var(--accent) 72%,var(--line))!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent),0 12px 28px rgba(0,0,0,.18)!important;
}
.saved-game-card.is-current .saved-game-top{
  background:color-mix(in srgb,var(--selected) 66%,var(--panel2) 34%)!important;
}
.saved-current{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:21px;
  padding:0 7px;
  border:1px solid color-mix(in srgb,var(--accent) 68%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--accent) 15%,var(--panel2));
  color:var(--text);
  font-size:5.7px;
  font-weight:950;
  letter-spacing:.08em;
}
.saved-game-card.is-current .saved-primary{
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 22%,transparent)!important;
}
.saved-appearance-note{
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 7%,transparent)!important;
}
.saved-appearance-note>span::after{
  content:"✓";
  position:absolute;
  right:-4px;
  bottom:-4px;
  display:grid;
  place-items:center;
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--accent);
  color:var(--accent-ink,#111);
  font-size:7px;
  font-weight:950;
  border:2px solid var(--panel);
}
.saved-appearance-note>span{position:relative}
.drawer-nav[aria-current="page"],
.mode-workspace-tabs button[aria-current="page"]{
  outline-offset:-2px;
}
@media(max-width:760px){
  .saved-game-top{flex-wrap:wrap!important;row-gap:5px!important}
  .saved-game-top>b{margin-left:auto!important}
  .saved-current{min-height:19px;padding-inline:6px;font-size:5.3px}
  .saved-appearance-note small{line-height:1.4!important}
}


body.theme-postseason .saved-game-card.is-current{
  border-color:color-mix(in srgb,var(--accent) 74%,#61748c)!important;
}

/* ---------- v63 refinement pass ----------
   - uniform theme-aware menu rows
   - calmer active states
   - reduced divider density in play editor
*/

/* MENU: make every row share the same card language so nothing feels randomly highlighted. */
.drawer .menu-row,
.drawer .drawer-nav,
.drawer .drawer-action,
.drawer .drawer-tools>button,
.drawer .import-button{
  background:color-mix(in srgb,var(--panel2) 84%,var(--panel) 16%)!important;
  border:1px solid color-mix(in srgb,var(--line) 52%,transparent)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
}
.drawer .menu-row:hover,
.drawer .drawer-nav:hover,
.drawer .drawer-action:hover,
.drawer .drawer-tools>button:hover,
.drawer .import-button:hover{
  background:color-mix(in srgb,var(--panel2) 88%,var(--accent) 5%)!important;
  border-color:color-mix(in srgb,var(--accent) 24%,var(--line) 76%)!important;
}
.drawer .drawer-nav.active,
.drawer .menu-row.active{
  background:color-mix(in srgb,var(--panel2) 90%,var(--accent) 10%)!important;
  border-color:color-mix(in srgb,var(--accent) 30%,var(--line) 70%)!important;
  box-shadow:inset 3px 0 0 color-mix(in srgb,var(--accent) 78%,transparent), inset 0 1px 0 rgba(255,255,255,.05)!important;
}
.drawer .drawer-nav.active::before,
.drawer .menu-row.active::before{
  opacity:.16!important;
}
.drawer .menu-badge{
  background:color-mix(in srgb,var(--panel) 74%,var(--accent) 14%)!important;
  border:1px solid color-mix(in srgb,var(--accent) 20%,transparent)!important;
}
.drawer .menu-value,
.drawer .menu-trailing{
  background:transparent!important;
  box-shadow:none!important;
}
.drawer .drawer-label::after,
.drawer-section+.drawer-section::before{
  opacity:.45!important;
}

/* WRIGLEY menu: keep scoreboard look but avoid isolated highlighted blocks. */





/* PLAY EDITOR: reduce the number of dividing lines. */
.play-card .editor-section-title{
  margin:12px 0 6px!important;
  padding-top:0!important;
  gap:0!important;
}
.play-card .editor-section-title::after{
  display:none!important;
}
.play-card .editor-section-title > span,
.play-card .editor-section-title > b,
.play-card .editor-section-title{
  letter-spacing:.13em!important;
}
.play-card .editor-grid{gap:9px!important}
.play-card .editor-grid>label:not(.check-label),
.play-card .runner-out-fields .form-grid.two>label,
.play-card .score-field-card,
.play-card .check-label{
  border-color:color-mix(in srgb,var(--line) 52%,transparent)!important;
  box-shadow:none!important;
}
.play-card .runner-out-fields,
.play-card .advanced-tools,
.play-card .pitch-tools{
  border-color:color-mix(in srgb,var(--line) 42%,transparent)!important;
  box-shadow:none!important;
}
.play-card .runner-out-fields{padding:10px 11px!important}
.play-card .advanced-tools{padding:8px 9px 10px!important}
.play-card .pitch-tools{padding:9px 10px 10px!important}
.play-card .field-card-head,
.play-card .pitch-entry-card-head,
.play-card .pitch-sequence-head{
  padding-bottom:4px!important;
  margin-bottom:5px!important;
  border-bottom:0!important;
}
.play-card .defense-field-card,
.play-card .advanced-runner-card,
.play-card .pitch-entry-card,
.play-card .pitch-sequence-card,
.play-card .pitch-workflow-note,
.play-card .pitch-count-card{
  border-color:color-mix(in srgb,var(--line) 44%,transparent)!important;
  box-shadow:none!important;
}
.play-card .fielder-grid,
.play-card .pitch-count-lights{
  border-color:color-mix(in srgb,var(--line) 34%,transparent)!important;
}
.play-card .fielder-selection,
.play-card .pitch-empty,
.play-card .editor-guide{
  border-color:color-mix(in srgb,var(--line) 36%,transparent)!important;
}
.play-card .score-field-card{min-height:74px!important}

/* Wrigley editor: keep richness, but declutter. */



/* ==========================================================
   v64 — ALL-THEME CONSISTENCY AUDIT
   High-specificity final rules intentionally use #drawer/#playModal
   so older per-theme selectors cannot create uneven row/card treatment.
   ========================================================== */

/* One menu surface system for EVERY theme and every menu action. */
#drawer .menu-row,
#drawer .drawer-nav,
#drawer .drawer-action,
#drawer .drawer-tools > button,
#drawer .import-button{
  background:color-mix(in srgb,var(--panel2) 86%,var(--panel) 14%)!important;
  border:1px solid color-mix(in srgb,var(--line) 54%,transparent)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  color:var(--text)!important;
}
#drawer .menu-row:hover,
#drawer .drawer-nav:hover,
#drawer .drawer-action:hover,
#drawer .drawer-tools > button:hover,
#drawer .import-button:hover{
  background:color-mix(in srgb,var(--panel2) 88%,var(--accent) 6%)!important;
  border-color:color-mix(in srgb,var(--line) 66%,var(--accent) 34%)!important;
}
/* Only actual navigation destinations can have the active-page treatment. */
#drawer .drawer-nav.active{
  background:color-mix(in srgb,var(--panel2) 84%,var(--accent) 16%)!important;
  border-color:color-mix(in srgb,var(--line) 58%,var(--accent) 42%)!important;
  box-shadow:inset 4px 0 0 color-mix(in srgb,var(--accent) 82%,transparent),inset 0 1px 0 rgba(255,255,255,.04)!important;
}
#drawer .drawer-nav.active::before{display:none!important}
#drawer .drawer-action,
#drawer .drawer-tools > button,
#drawer .import-button{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
#drawer .menu-glyph{
  color:color-mix(in srgb,var(--accent) 72%,var(--text) 28%)!important;
}
#drawer .menu-copy strong{color:var(--text)!important}
#drawer .menu-copy small{color:var(--muted)!important}
#drawer .menu-trailing,
#drawer .menu-value{color:color-mix(in srgb,var(--muted) 82%,var(--text) 18%)!important}
#drawer .menu-value{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#drawer .menu-badge{
  color:color-mix(in srgb,var(--accent) 72%,var(--text) 28%)!important;
  background:color-mix(in srgb,var(--panel) 82%,var(--accent) 18%)!important;
  border:1px solid color-mix(in srgb,var(--line) 58%,var(--accent) 22%)!important;
}
#drawer .drawer-label{
  color:color-mix(in srgb,var(--muted) 88%,var(--text) 12%)!important;
}
#drawer .drawer-label::after,
#drawer .drawer-section + .drawer-section::before{
  background:color-mix(in srgb,var(--line) 44%,transparent)!important;
  opacity:1!important;
}

/* Wrigley keeps its painted scoreboard character, but the same menu hierarchy. */




/* Play Editor: one section-heading system globally. No repeated horizontal rule. */
#playModal .editor-section-title{
  margin:13px 0 7px!important;
  padding:0!important;
  display:block!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
  color:color-mix(in srgb,var(--accent) 76%,var(--text) 24%)!important;
}
#playModal .editor-section-title::before,
#playModal .editor-section-title::after{display:none!important;content:none!important}
#playModal .editor-section-title + .editor-grid,
#playModal .editor-section-title + .scoring-panel{margin-top:0!important}
#playModal .field-card-head,
#playModal .pitch-entry-card-head,
#playModal .pitch-sequence-head{
  border-bottom:0!important;
  padding-bottom:3px!important;
  margin-bottom:5px!important;
}
#playModal .runner-out-fields,
#playModal .advanced-tools,
#playModal .pitch-tools{
  border-color:color-mix(in srgb,var(--line) 34%,transparent)!important;
  box-shadow:none!important;
}
#playModal .editor-grid > label:not(.check-label),
#playModal .runner-out-fields .form-grid.two > label,
#playModal .score-field-card,
#playModal .check-label,
#playModal .defense-field-card,
#playModal .advanced-runner-card,
#playModal .pitch-entry-card,
#playModal .pitch-sequence-card,
#playModal .pitch-workflow-note,
#playModal .pitch-count-card{
  border-color:color-mix(in srgb,var(--line) 40%,transparent)!important;
  box-shadow:none!important;
}
#playModal .fielder-grid,
#playModal .pitch-count-lights,
#playModal .fielder-selection,
#playModal .pitch-empty,
#playModal .editor-guide{
  border-color:color-mix(in srgb,var(--line) 28%,transparent)!important;
  box-shadow:none!important;
}
/* Advanced title has a mode badge, but no decorative divider bars. */
#playModal .advanced-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
}
#playModal .advanced-title > b{
  flex:0 0 auto!important;
}

@media(max-width:760px){
  #drawer .menu-row,
  #drawer .drawer-nav,
  #drawer .drawer-action,
  #drawer .drawer-tools > button,
  #drawer .import-button{min-height:50px!important}
  #playModal .editor-section-title{margin:11px 0 6px!important}
}

/* ==========================================================
   v65 — Mobile Interaction + Empty-State Polish
   Release-candidate refinement. No score-grid geometry/touch changes.
   ========================================================== */

/* Modal scrolling should stay inside the sheet and remain usable around iOS keyboard/safe areas. */
.modal-card{
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
.modal-card input:focus-visible,
.modal-card select:focus-visible,
.modal-card textarea:focus-visible,
.modal-card button:focus-visible,
#drawer button:focus-visible,
#drawer label:focus-within{
  outline:2px solid color-mix(in srgb,var(--accent) 78%,#fff 22%)!important;
  outline-offset:2px!important;
}
@media(max-width:900px){
  .modal-card{
    scroll-padding-top:82px!important;
    scroll-padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
    max-height:min(88dvh,calc(100dvh - env(safe-area-inset-top)))!important;
  }
  .modal-card input,
  .modal-card select,
  .modal-card textarea{font-size:16px!important}
  .modal-card .modal-head{isolation:isolate!important}
}
@media(max-width:900px) and (orientation:landscape){
  .modal-card{
    max-height:calc(100dvh - max(6px,env(safe-area-inset-top)))!important;
    scroll-padding-bottom:calc(86px + env(safe-area-inset-bottom))!important;
  }
}

/* One theme-aware empty-state language across History / Plays / Pitches / Stats. */
.empty-state,
.saved-games-empty,
.stats-empty,
.runner-empty,
.pitch-usage-empty{
  color:var(--muted)!important;
}
.mode-empty.empty-state{
  min-height:178px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:24px 18px!important;
  text-align:center!important;
  border:1px dashed color-mix(in srgb,var(--line) 64%,transparent)!important;
  border-radius:16px!important;
  background:color-mix(in srgb,var(--panel2) 68%,var(--panel) 32%)!important;
  box-shadow:none!important;
}
.empty-state-icon{
  width:42px!important;
  height:42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  background:color-mix(in srgb,var(--selected) 60%,var(--panel2) 40%)!important;
  border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line) 72%)!important;
  color:var(--accent)!important;
  font-size:20px!important;
  line-height:1!important;
}
.mode-empty.empty-state strong{
  color:var(--text)!important;
  font-size:14px!important;
}
.mode-empty.empty-state>span:not(.empty-state-icon){
  max-width:46ch!important;
  color:var(--muted)!important;
  font-size:9px!important;
  line-height:1.45!important;
}
.mode-empty.empty-state button{
  min-height:40px!important;
  margin-top:5px!important;
  padding:0 16px!important;
  border:1px solid color-mix(in srgb,var(--accent) 42%,var(--line) 58%)!important;
  border-radius:11px!important;
  background:color-mix(in srgb,var(--selected) 68%,var(--panel2) 32%)!important;
  color:var(--text)!important;
  font-size:9px!important;
  font-weight:900!important;
}

body.theme-postseason .mode-empty.empty-state{
  border-color:color-mix(in srgb,var(--accent) 36%,var(--line) 64%)!important;
}
@media(max-width:520px){
  .mode-empty.empty-state{min-height:152px!important;padding:20px 14px!important}
  .empty-state-icon{width:38px!important;height:38px!important;font-size:18px!important}
  .mode-empty.empty-state strong{font-size:13px!important}
  .mode-empty.empty-state>span:not(.empty-state-icon){font-size:8.5px!important}
}

/* ==========================================================
   v66 — Cross-mode guided editor refinement
   Keeps all scoring controls available while clarifying progression.
   ========================================================== */

/* Active/completed step language for Advanced + Pitch-by-Pitch. */
#playModal .editor-guide span{
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,opacity .16s ease,transform .16s ease!important;
  opacity:.72;
}
#playModal .editor-guide span.is-active{
  opacity:1!important;
  background:color-mix(in srgb,var(--selected) 68%,var(--panel2) 32%)!important;
  border-color:color-mix(in srgb,var(--accent) 42%,var(--line) 58%)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 10%,transparent)!important;
}
#playModal .editor-guide span.is-active b{
  background:var(--accent)!important;
  color:var(--accent-ink,#101820)!important;
  border-color:var(--accent)!important;
}
#playModal .editor-guide span.is-done{
  opacity:.86!important;
}
#playModal .editor-guide span.is-done b{
  border-color:color-mix(in srgb,var(--accent) 55%,var(--line))!important;
  color:var(--accent)!important;
}

/* Secondary sections stay available but stop competing with the current step. */
#playModal #advancedTools.is-secondary{
  background:color-mix(in srgb,var(--panel) 92%,transparent)!important;
  border-color:color-mix(in srgb,var(--line) 26%,transparent)!important;
}
#playModal #advancedTools.is-secondary .advanced-title{opacity:.78}
#playModal #runnerGrid.is-secondary{opacity:.88}
#playModal #scoringPanel.is-ready .score-field-card{
  border-color:color-mix(in srgb,var(--accent) 28%,var(--line) 72%)!important;
}

/* Empty advanced-runner state no longer consumes a full runner card. */
#playModal .advanced-runner-card.is-empty{
  padding:10px 12px!important;
  min-height:0!important;
}
#playModal .advanced-runner-card.is-empty .field-card-head{
  margin-bottom:5px!important;
  padding-bottom:0!important;
}
#playModal .advanced-runner-card.is-empty .field-card-head small{
  display:none!important;
}
#playModal .advanced-runner-card.is-empty .advanced-runner-list{
  min-height:0!important;
}
#playModal .advanced-runner-card.is-empty .runner-empty{
  min-height:42px!important;
  padding:8px 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  border:0!important;
  background:color-mix(in srgb,var(--panel2) 72%,var(--panel) 28%)!important;
  border-radius:10px!important;
  color:var(--muted)!important;
}
#playModal .advanced-runner-card.is-empty .runner-empty b{
  color:var(--text)!important;
  font-size:11px!important;
  white-space:nowrap;
}
#playModal .advanced-runner-card.is-empty .runner-empty span{
  font-size:8px!important;
  text-align:right;
}

/* Give the current context enough emphasis without adding more divider lines. */
#playModal .context-focus{
  box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 26%,transparent),0 10px 24px rgba(0,0,0,.10)!important;
}

/* Theme-specific guide states inherit theme accent automatically. */

body.theme-postseason #playModal .editor-guide span.is-active{
  background:linear-gradient(180deg,rgba(30,49,80,.96),rgba(17,35,61,.96))!important;
}

@media(max-width:760px){
  #playModal .editor-guide span{min-height:45px!important;padding:6px 5px!important}
  #playModal .advanced-runner-card.is-empty .runner-empty{
    align-items:flex-start!important;
    flex-direction:column!important;
    gap:2px!important;
  }
  #playModal .advanced-runner-card.is-empty .runner-empty span{text-align:left!important}
}

/* ==========================================================
   v67 — Final Play Editor + interaction audit
   Cross-mode consistency without changing score-grid behavior.
   ========================================================== */

/* Make the active guide step obvious but compact across every theme. */
#playModal .editor-guide{
  gap:7px!important;
}
#playModal .editor-guide span{
  min-height:42px!important;
  border-radius:10px!important;
}
#playModal .editor-guide span.is-active{
  transform:translateY(-1px);
}
#playModal .editor-guide span.is-done b{
  font-size:9px!important;
}

/* Current section emphasis uses a soft outline only; no extra divider bars. */
#playModal .context-focus{
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 22%,transparent),0 8px 18px rgba(0,0,0,.08)!important;
}
#playModal #batterResultGrid.context-focus,
#playModal #runnerGrid.context-focus,
#playModal #scoringPanel.context-focus{
  border-radius:14px!important;
}

/* Runner-out controls audited for CS / PO / custom runner outs. */
#playModal .runner-out-fields:not(.hidden){
  display:block!important;
  margin-top:9px!important;
  padding:10px!important;
}
#playModal .runner-out-title{
  margin-bottom:7px!important;
  font-size:9px!important;
  letter-spacing:.13em!important;
}
#playModal .runner-out-count{
  margin-top:7px!important;
  min-height:40px!important;
}

/* Defensive notation + runner review read as one workflow without adding borders. */
#playModal #advancedTools.context-focus .defense-field-card,
#playModal #advancedTools.context-focus .advanced-runner-card{
  border-color:color-mix(in srgb,var(--accent) 24%,var(--line) 76%)!important;
}
#playModal #advancedTools.is-secondary{
  opacity:.92!important;
}

/* Cross-mode control geometry audit. */
#playModal .editor-grid>label:not(.check-label),
#playModal .score-field-card,
#playModal .runner-out-fields .form-grid.two>label{
  min-height:72px!important;
}
#playModal .editor-grid select,
#playModal .editor-grid input,
#playModal .runner-out-fields select,
#playModal .runner-out-fields input{
  min-height:38px!important;
}
#playModal input::placeholder{
  opacity:.72!important;
}

/* Wrigley / Postseason inherit the same audit behavior. */

body.theme-postseason #playModal .context-focus{
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 26%,transparent),0 8px 18px rgba(0,0,0,.10)!important;
}

@media(max-width:760px){
  #playModal .editor-guide{gap:5px!important}
  #playModal .editor-guide span{min-height:40px!important;padding:5px 4px!important}
  #playModal .editor-grid>label:not(.check-label),
  #playModal .score-field-card,
  #playModal .runner-out-fields .form-grid.two>label{min-height:68px!important}
  #playModal .runner-out-fields .form-grid.two{gap:8px!important}
}

/* ==========================================================
   v68 — Existing baserunner out-location support
   ========================================================== */
#playModal .advanced-runner-row.is-runner-out .runner-advance-reason{display:none!important}
#playModal .advanced-runner-row .runner-out-location.hidden,
#playModal .advanced-runner-row .runner-out-code.hidden{display:none!important}
#playModal .advanced-runner-row .runner-out-location,
#playModal .advanced-runner-row .runner-out-code{display:block}
#playModal .advanced-runner-row.is-runner-out{
  grid-template-columns:minmax(105px,1.15fr) minmax(92px,.8fr) minmax(118px,1fr) minmax(100px,.9fr)!important;
}
#playModal .advanced-runner-row.is-runner-out .runner-out-location select,
#playModal .advanced-runner-row.is-runner-out .runner-out-code input{
  border-color:color-mix(in srgb,var(--out) 38%,var(--line))!important;
}
@media(max-width:900px){
  #playModal .advanced-runner-row.is-runner-out{grid-template-columns:1fr 1fr!important}
  #playModal .advanced-runner-row.is-runner-out .runner-ident{grid-column:1/-1!important}
}

/* v69 lifecycle reliability: feedback stays inside the active theme. */
.save-status.is-saved{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent)}
.saved-game-card.is-current .saved-current{letter-spacing:.08em}

/* v70 release-candidate audit: structural styling intentionally unchanged from v69. */


/* ==========================================================
   v71 — Double-play notation + out-count refinement
   ========================================================== */
.play-entry.out.standalone .standalone-out{
  position:relative;
  z-index:2;
}
.play-cell.third-out .play-entry.out.standalone .standalone-out{
  margin-bottom:2px;
}

/* ==========================================================
   v72 — DP batter-OUT rendering correction
   Rendering logic now sends DP + batter OUT through the existing
   centered standalone-out presentation. No structural CSS changes.
   ========================================================== */


/* ==========================================================
   v74 MULTI-RUNNER + EDITOR FIT PASS
   - multi-runner cards remain readable when TP exposes 2–3 runners
   - modal sheets stay at 1x while open after scoregrid pinch zoom
   ========================================================== */
@media(max-width:760px){
  html.modal-viewport-locked{overflow:hidden!important}
  html.modal-viewport-locked body{overscroll-behavior:none!important}
  #playModal .advanced-runner-list{display:grid!important;gap:10px!important}
  #playModal .advanced-runner-row{scroll-margin-top:74px!important}
  #playModal .advanced-runner-row .runner-ident{min-width:0!important}
  #playModal .advanced-runner-row .runner-ident b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* v75 — Pitch-caused runner events + uncaught third strike */
.play-card .runner-event-head{align-items:flex-end!important;gap:10px!important;flex-wrap:wrap}
.play-card .runner-event-control{display:grid;grid-template-columns:auto minmax(150px,210px);align-items:center;gap:7px;margin-left:auto;color:var(--muted);font-size:7px;font-weight:950;letter-spacing:.05em}
.play-card .runner-event-control>span{white-space:nowrap}
.play-card .runner-event-control select{width:100%;height:34px;min-height:34px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);padding:0 8px;font-size:8px;font-weight:850}
.play-card .pitch-entry-grid{grid-template-columns:minmax(130px,1fr) minmax(86px,.68fr) minmax(125px,1fr) minmax(135px,1fr) auto!important}
.play-card .pitch-event-field select{border-color:color-mix(in srgb,var(--accent) 60%,var(--line))!important}
.play-card .pitch-chip.is-event{border-color:color-mix(in srgb,var(--accent) 70%,var(--line));background:color-mix(in srgb,var(--panel2) 82%,var(--accent) 8%)}
.pitch-event-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:7px}
.pitch-event-kpis span{padding:6px 4px;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:9px;background:color-mix(in srgb,var(--panel2) 88%,transparent);text-align:center}
.pitch-event-kpis b{display:block;font-size:10px;color:var(--text)}
.pitch-event-kpis small{display:block;margin-top:2px;font-size:5.8px;color:var(--muted)}
@media(max-width:900px){
  .play-card .runner-event-control{grid-template-columns:auto minmax(135px,1fr);width:100%;margin-left:0}
  .play-card .runner-event-control select{height:42px;min-height:42px;font-size:11px}
  .play-card .pitch-entry-grid{grid-template-columns:1fr 1fr!important}
  .play-card .pitch-entry-grid .pitch-result-field,.play-card .pitch-entry-grid .pitch-event-field{grid-column:auto!important}
  .play-card .record-pitch-btn{grid-column:1/-1!important}
}
@media(max-width:520px){
  .play-card .pitch-entry-grid{grid-template-columns:1fr 1fr!important}
  .play-card .pitch-entry-grid .pitch-result-field,.play-card .pitch-entry-grid .pitch-event-field{grid-column:1/-1!important}
  .pitch-event-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* v76 — Basic runner movement + hard Play Editor zoom isolation */

.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only.basic-runners-empty{display:none!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only{
  display:block!important;
  margin-top:10px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only>.advanced-title,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .defense-field-card,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-event-control,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-advance-reason,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-location,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-code{
  display:none!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-layout{
  display:block!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-card{
  width:100%!important;
  margin:0!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head{
  margin-bottom:8px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head strong::after{
  content:" · BASIC";
  opacity:.62;
  font-size:.72em;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head small{
  font-size:0!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head small::after{
  content:"Set where each current runner ends this play";
  font-size:9px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row{
  grid-template-columns:minmax(0,1fr) minmax(132px,.8fr)!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label[data-basic-hide]{display:none!important}

@media(max-width:900px){
  /* The scoregrid may be pinch-zoomed, but the Play Editor is its own non-zoomable surface. */
  #playModal:not(.hidden),
  #playModal:not(.hidden) .play-card,
  #playModal:not(.hidden) .play-card *{
    touch-action:pan-y!important;
  }
  #playModal:not(.hidden) .play-card input,
  #playModal:not(.hidden) .play-card select,
  #playModal:not(.hidden) .play-card button{
    touch-action:manipulation!important;
  }
  #playModal{
    overscroll-behavior:none!important;
    -webkit-user-select:none;
  }
  #playModal input,#playModal select,#playModal textarea{
    -webkit-user-select:text;
    user-select:text;
  }
}


/* ==========================================================
   v77 — Basic Runner Movement terminology + visual-viewport Play Editor
   ========================================================== */
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only>.advanced-title{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  margin:12px 0 6px!important;
  padding:10px 0 0!important;
  border-top:1px solid color-mix(in srgb,var(--line) 76%,transparent)!important;
}
.play-card[data-editor-mode="basic"] #editorDetailTitle{
  font-size:9px!important;
  letter-spacing:.12em!important;
  color:color-mix(in srgb,var(--text) 90%,var(--accent) 10%)!important;
}
.play-card[data-editor-mode="basic"] #editorModeBadge{display:none!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .defense-field-card,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-event-control,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-advance-reason,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-location,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-code{display:none!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-layout{display:block!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-card{
  width:100%!important;margin:0!important;padding:9px!important;border-radius:12px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head{
  min-height:0!important;margin:0 0 8px!important;padding:0!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head strong::after{content:none!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head strong{
  font-size:8px!important;letter-spacing:.08em!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head small{
  display:block!important;margin-top:3px!important;font-size:8px!important;line-height:1.25!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .field-card-head small::after{content:none!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row{
  grid-template-columns:minmax(0,1fr) minmax(142px,.9fr)!important;
  padding:9px!important;gap:8px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row .runner-ident b{font-size:9px!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row .runner-ident small{font-size:7px!important}

@media(max-width:900px){
  #playModal:not(.hidden){
    box-sizing:border-box!important;
    max-width:none!important;max-height:none!important;
    overflow:hidden!important;
    contain:layout paint style;
  }
  #playModal:not(.hidden) .play-card{
    box-sizing:border-box!important;
    width:100%!important;max-width:none!important;
    max-height:100%!important;
    margin:0!important;
  }
  html.modal-viewport-locked #playModal:not(.hidden),
  html.modal-viewport-locked #playModal:not(.hidden) .play-card,
  html.modal-viewport-locked #playModal:not(.hidden) .play-card *{
    touch-action:pan-y!important;
  }
  html.modal-viewport-locked #playModal:not(.hidden) input,
  html.modal-viewport-locked #playModal:not(.hidden) select,
  html.modal-viewport-locked #playModal:not(.hidden) textarea,
  html.modal-viewport-locked #playModal:not(.hidden) button{
    touch-action:manipulation!important;
  }
}
/* Basic has one runner heading only; remove the nested runner-card header. */
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-card>.field-card-head{
  display:none!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-card{
  padding-top:8px!important;
}

/* ==========================================================
   v78 — Compact Basic Runner Movement + Safari modal reset
   ========================================================== */
@media(max-width:900px){
  #playModal.viewport-resetting{visibility:hidden!important}
  #playModal:not(.hidden){
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    max-width:none!important;
    max-height:none!important;
    transform:none!important;
    zoom:1!important;
    padding:calc(6px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom))!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:center!important;
    overflow:hidden!important;
    contain:none!important;
  }
  #playModal:not(.hidden) .play-card{
    position:relative!important;
    width:100%!important;
    height:100%!important;
    max-width:620px!important;
    max-height:none!important;
    margin:0 auto!important;
    transform:none!important;
    zoom:1!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    border-radius:20px!important;
  }
  html.modal-viewport-locked #playModal,
  html.modal-viewport-locked #playModal .play-card,
  html.modal-viewport-locked #playModal .play-card *{touch-action:pan-y!important}
  html.modal-viewport-locked #playModal input,
  html.modal-viewport-locked #playModal select,
  html.modal-viewport-locked #playModal textarea,
  html.modal-viewport-locked #playModal button{touch-action:manipulation!important}
}

/* Basic Runner Movement should look like one compact control, not nested Advanced cards. */
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only{
  margin-top:8px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only>.advanced-title{
  margin:8px 0 6px!important;
  padding:8px 0 0!important;
}
.play-card[data-editor-mode="basic"] #editorDetailTitle{font-size:9px!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-layout,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-card{
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-list{
  display:grid!important;
  gap:7px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row{
  display:grid!important;
  grid-template-columns:minmax(92px,.62fr) minmax(0,1.38fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-height:64px!important;
  padding:8px 10px!important;
  border:1px solid color-mix(in srgb,var(--line) 74%,transparent)!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--panel2) 72%,transparent)!important;
  box-shadow:none!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-ident{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:2px!important;
  min-width:0!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-ident b{
  font-size:10px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-ident small{font-size:8px!important}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label{
  position:relative!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
  min-width:0!important;
  border:0!important;
  background:transparent!important;
  font-size:8px!important;
  font-weight:900!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label>select{
  width:100%!important;
  height:42px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0 34px 0 11px!important;
  border-radius:10px!important;
  font-size:15px!important;
  font-weight:850!important;
}
@media(max-width:430px){
  .play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row{
    grid-template-columns:1fr!important;
    gap:6px!important;
    min-height:0!important;
  }
  .play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label{
    grid-template-columns:64px minmax(0,1fr)!important;
  }
}


/* ==========================================================
   v79 — Visual-viewport compensated Play Editor + equal Basic runner fields
   ========================================================== */
@media(max-width:900px){
  /* Normal 1x editor */
  #playModal:not(.hidden){
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    max-width:none!important;
    max-height:none!important;
    transform:none!important;
    padding:calc(6px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:center!important;
  }
  #playModal:not(.hidden) .play-card{
    box-sizing:border-box!important;
    width:100%!important;
    height:100%!important;
    max-width:620px!important;
    max-height:none!important;
    margin:0 auto!important;
    transform:none!important;
    transform-origin:0 0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  /* If Safari still has the scoregrid pinched, make the OUTER modal match
     the live visual viewport. Only the inner card is inverse-scaled. */
  #playModal.visual-zoom-compensated:not(.hidden){
    inset:auto!important;
    left:var(--editor-vv-left)!important;
    top:var(--editor-vv-top)!important;
    right:auto!important;
    bottom:auto!important;
    width:var(--editor-vv-width)!important;
    height:var(--editor-vv-height)!important;
    padding:0!important;
    display:block!important;
    overflow:hidden!important;
  }
  #playModal.visual-zoom-compensated:not(.hidden) .play-card{
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:var(--editor-layout-width)!important;
    height:var(--editor-layout-height)!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    transform:scale(var(--editor-inverse-scale))!important;
    transform-origin:0 0!important;
    border-radius:20px!important;
  }
}

/* Basic Runner Movement: identity on top, two genuinely equal controls below. */
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px 10px!important;
  align-items:end!important;
  min-height:0!important;
  padding:9px 10px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row .runner-ident{
  grid-column:1 / -1!important;
  min-width:0!important;
  padding:0 1px 1px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-advance-reason{
  display:grid!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:auto 44px!important;
  gap:4px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  font-size:8px!important;
  line-height:1.05!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label>select,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label>input{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  border-radius:10px!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label>select{
  padding:0 34px 0 11px!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row>label>input{
  padding:0 10px!important;
  text-overflow:ellipsis!important;
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-advance-reason input::placeholder{
  opacity:.72!important;
  font-size:12px!important;
}
@media(max-width:350px){
  .play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row{
    grid-template-columns:1fr!important;
  }
  .play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row .runner-ident{grid-column:1!important}
}


/* ==========================================================
   v80 — Force/Tag/Appeal/Interference runner-out semantics
   ========================================================== */
#playModal .advanced-runner-row .runner-out-type.hidden{display:none!important}
#playModal .advanced-runner-row .runner-out-type{display:block}
#playModal .advanced-runner-row.is-runner-out{
  grid-template-columns:minmax(100px,1.05fr) minmax(84px,.72fr) minmax(105px,.9fr) minmax(118px,1.05fr) minmax(100px,.9fr)!important;
}
#playModal .advanced-runner-row.is-runner-out .runner-out-type select{border-color:color-mix(in srgb,var(--accent) 42%,var(--line))!important}
#playModal .advanced-runner-row.is-runner-out .runner-out-type,
#playModal .advanced-runner-row.is-runner-out .runner-out-location,
#playModal .advanced-runner-row.is-runner-out .runner-out-code{min-width:0!important}
@media(max-width:900px){
  #playModal .advanced-runner-row.is-runner-out{grid-template-columns:1fr 1fr!important}
  #playModal .advanced-runner-row.is-runner-out .runner-ident{grid-column:1/-1!important}
}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-type,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-location,
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .runner-out-code{display:none!important}
/* In Basic mode an OUT destination has no advanced semantic fields, so let the destination use the full row. */
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .advanced-runner-row.is-runner-out>label:first-of-type{
  grid-column:1 / -1!important;
}


/* v81 — official error accounting + extra-inning state */
#playModal .official-error-card{
  border:1px solid var(--line);border-radius:16px;padding:14px;display:grid;gap:12px;background:color-mix(in srgb,var(--panel2) 72%,transparent);
}
#playModal .official-error-card.hidden{display:none!important}
#playModal .official-error-card .field-card-head{margin:0;padding:0;border:0}
#playModal .official-error-card>label:not(.official-error-toggle){display:grid;gap:6px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
#playModal .official-error-card select{width:100%;min-height:44px}
#playModal .official-error-toggle{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--line) 65%,transparent);border-radius:12px}
#playModal .official-error-toggle input{width:20px;height:20px;flex:0 0 auto}
#playModal .official-error-toggle span{text-transform:none;letter-spacing:0;font-weight:800}
#playModal #officialErrorHelp{color:var(--muted);line-height:1.35}
.play-card[data-editor-mode="basic"] .advanced-tools.basic-runner-only .official-error-card{display:none!important}
.fielding-stat-list>div>strong{min-width:42px}

#playModal .official-error-card{grid-column:1/-1}

.play-cell .auto-runner-cell{position:absolute;left:4px;top:4px;z-index:4;font-size:7px;line-height:1;font-weight:900;letter-spacing:.06em;padding:3px 4px;border-radius:5px;border:1px solid color-mix(in srgb,var(--accent) 70%,transparent);background:color-mix(in srgb,var(--grid) 88%,transparent);color:var(--accent);white-space:nowrap;pointer-events:none}


/* v82 MLB game + lineup integration */
.mlb-link-strip{display:flex;align-items:center;gap:12px;padding:12px 14px;margin-top:10px;border-radius:14px;min-height:62px}
.mlb-link-strip .mlb-link-icon{display:grid;place-items:center;min-width:42px;height:34px;padding:0 8px;border-radius:9px;background:rgba(34,95,170,.16);border:1px solid rgba(89,139,204,.32);font-size:11px;font-weight:900;letter-spacing:.08em}
.mlb-link-strip>div{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}.mlb-link-strip strong{font-size:12px;letter-spacing:.055em}.mlb-link-strip small{font-size:11px;opacity:.72;white-space:normal;line-height:1.35}
.mlb-link-strip>button{min-height:36px;padding:0 13px;border-radius:9px;font-weight:800;white-space:nowrap}.mlb-link-strip.linked{box-shadow:inset 3px 0 0 rgba(74,162,101,.78)}
.mlb-finder-card{width:min(760px,calc(100vw - 28px));max-height:min(88dvh,820px);overflow:auto}
.mlb-finder-top{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.mlb-finder-top label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:800;letter-spacing:.05em}.mlb-finder-top input,.mlb-finder-top button{height:44px}.mlb-finder-top button{padding:0 16px;border-radius:10px;font-weight:800}
.mlb-finder-status{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:12px 0 8px;padding:8px 2px}.mlb-finder-status span{font-size:12px;font-weight:900}.mlb-finder-status small{font-size:10px;opacity:.62;text-align:right}
.mlb-games-list{display:flex;flex-direction:column;gap:8px;max-height:310px;overflow:auto;padding:2px}
.mlb-game-row{display:grid;grid-template-columns:76px 1fr 76px;align-items:center;gap:8px;width:100%;min-height:72px;padding:9px 10px;border-radius:12px;text-align:left}.mlb-game-row.selected{outline:2px solid currentColor;outline-offset:-2px}.mlb-game-team{display:flex;align-items:center;gap:6px;min-width:0}.mlb-game-team.home{justify-content:flex-end}.mlb-game-team img{width:28px;height:28px;object-fit:contain}.mlb-game-team b{font-size:12px}.mlb-game-center{display:flex;flex-direction:column;gap:3px;min-width:0;text-align:center}.mlb-game-center strong{font-size:12px;line-height:1.25}.mlb-game-center small{font-size:10px;opacity:.68;white-space:normal;line-height:1.3}
.mlb-game-preview{margin-top:12px;padding:13px;border:1px solid rgba(128,128,128,.24);border-radius:13px}.mlb-preview-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.mlb-preview-head>div{display:flex;align-items:center;gap:9px}.mlb-preview-head span{font-size:18px;font-weight:900}.mlb-preview-head b{font-size:11px;opacity:.55}.mlb-preview-head small{font-size:10px;font-weight:800;opacity:.68}.mlb-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}.mlb-preview-grid>span{display:flex;flex-direction:column;gap:4px;padding:9px;border-radius:9px;background:rgba(128,128,128,.08);min-width:0}.mlb-preview-grid small{font-size:9px;font-weight:800;opacity:.62}.mlb-preview-grid b{font-size:11px;white-space:normal;line-height:1.25;overflow-wrap:anywhere}.mlb-preview-note{margin-top:10px;padding:9px 10px;border-radius:9px;background:rgba(172,117,38,.12);font-size:10px;line-height:1.4}.mlb-preview-note.ready{background:rgba(54,142,82,.13)}
.mlb-finder-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:100px;text-align:center;padding:18px}.mlb-finder-empty.compact{min-height:58px}.mlb-finder-empty b{font-size:12px}.mlb-finder-empty small{font-size:10px;opacity:.65;line-height:1.35}.mlb-modal-actions{display:flex;justify-content:flex-end;gap:8px}.mlb-modal-actions button{min-width:150px}
@media(max-width:600px){.mlb-link-strip{gap:9px;padding:10px 11px}.mlb-link-strip .mlb-link-icon{min-width:38px}.mlb-link-strip>button{padding:0 10px}.mlb-finder-card{width:100vw;max-width:none;height:100dvh;max-height:100dvh;border-radius:0}.mlb-finder-top{grid-template-columns:1fr 118px}.mlb-game-row{grid-template-columns:54px 1fr 54px;padding:8px 7px}.mlb-game-team{flex-direction:column;gap:2px}.mlb-game-team.home{flex-direction:column-reverse}.mlb-game-team img{width:25px;height:25px}.mlb-game-team b{font-size:10px}.mlb-game-center strong{font-size:11px}.mlb-preview-grid{grid-template-columns:1fr 1fr}.mlb-modal-actions{position:sticky;bottom:0;padding-top:10px}.mlb-modal-actions button{flex:1;min-width:0}.mlb-finder-status{align-items:flex-start;flex-direction:column}.mlb-finder-status small{text-align:left}}

/* v83 — MLB lineup name + jersey number fit refinement */
.unified-score-table .sticky-player{
  container-type:inline-size;
}
.unified-score-table .player-main{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:3px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
}
.unified-score-table .player-main .player-name{
  min-width:0!important;
  max-width:100%!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  hyphens:auto!important;
}
.unified-score-table .player-main .player-num{
  flex:none!important;
  justify-self:end!important;
  white-space:nowrap!important;
  font-size:.86em!important;
  line-height:1!important;
  opacity:.96;
}
.unified-score-table .player-main.fit-long{font-size:11px!important}
.unified-score-table .player-main.fit-xlong{font-size:10.2px!important}
.unified-score-table .player-main.fit-xxlong{font-size:9.5px!important}
.unified-score-table .player-main .player-placeholder{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
@media(max-width:600px){
  .unified-score-table{
    --player-w:132px!important;
    --sticky-total:calc(var(--ord-w) + var(--player-w) + var(--pos-w))!important;
  }
  .team-scorebook-scroll{scroll-padding-left:192px!important}
  .unified-score-table .sticky-player{padding:3px 5px!important}
  .unified-score-table .player-main{font-size:9.8px!important;line-height:1.03!important;column-gap:2px!important}
  .unified-score-table .player-main.fit-long{font-size:9.2px!important}
  .unified-score-table .player-main.fit-xlong{font-size:8.6px!important}
  .unified-score-table .player-main.fit-xxlong{font-size:8px!important}
  .unified-score-table .player-main .player-name{line-height:1.05!important}
  .unified-score-table .player-main .player-num{font-size:.9em!important}
}
@media(max-width:390px){
  .unified-score-table{--player-w:128px!important}
  .team-scorebook-scroll{scroll-padding-left:188px!important}
}


/* ==========================================================
   v84 GAME REPORT / EXPORT CENTER
   ========================================================== */
.game-report-page{display:grid;gap:10px;padding-bottom:20px}.game-report-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.game-report-head small{font-size:8px;font-weight:950;letter-spacing:.15em;color:var(--accent)}.game-report-head h2{margin:2px 0;font-size:21px}.game-report-head p{margin:0;color:var(--muted);font-size:8px;font-weight:750}.game-report-head>span{padding:5px 8px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:8px;font-weight:850}.game-report-card{overflow:hidden}.report-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid var(--line)}.report-section-head>div{display:grid;gap:1px}.report-section-head small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.12em}.report-section-head strong{font-size:11px}.report-section-head>span{font-size:7px;color:var(--muted);font-weight:800;text-align:right}.report-two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:start}.report-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:7px}.report-table{width:100%;min-width:720px;border-collapse:collapse}.report-table.pitching{min-width:560px}.report-table th,.report-table td{padding:7px 6px;border:1px solid color-mix(in srgb,var(--line) 82%,transparent);font-size:7.5px;text-align:center;white-space:nowrap}.report-table th{font-size:7px;color:var(--muted);background:color-mix(in srgb,var(--panel2) 86%,transparent);position:sticky;top:0}.report-table td:first-child,.report-table th:first-child{text-align:left;position:sticky;left:0;z-index:1;background:var(--panel)}.report-table td:first-child{min-width:145px}.report-table td small{font-size:6.5px;color:var(--accent)}.report-table td em{font-style:normal;font-size:6.5px;color:var(--muted)}.report-table tfoot td{font-weight:900;background:color-mix(in srgb,var(--accent) 7%,var(--panel2))}.decision-tag{display:inline-block!important;padding:2px 4px;border-radius:5px;background:color-mix(in srgb,var(--accent) 16%,var(--panel2));color:var(--accent)!important;font-weight:950}.report-decision-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px}.report-decision-grid label,.report-decision-grid>div{display:grid;gap:5px}.report-decision-grid label>span,.report-decision-grid>div>span{font-size:7px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.report-decision-grid select{min-width:0;width:100%;height:42px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);font:inherit;font-size:9px;font-weight:850;padding:0 9px}.report-decision-grid>div b{min-height:38px;display:flex;align-items:center;padding:0 9px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);font-size:9px}.report-note{display:block;padding:0 11px 10px;color:var(--muted);font-size:7px;line-height:1.45}.report-pitch-auto{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:8px;border-top:1px solid var(--line)}.report-pitch-auto span{display:grid;justify-items:center;gap:1px;padding:6px 3px;border-radius:8px;background:var(--panel2)}.report-pitch-auto b{font-size:12px;color:var(--accent)}.report-pitch-auto small{font-size:6px;color:var(--muted);font-weight:800}.report-fielding-grid{display:grid;padding:7px}.report-fielding-grid>div{display:grid;grid-template-columns:minmax(60px,1.1fr) repeat(5,1fr);align-items:center;gap:4px;padding:7px;border-bottom:1px solid color-mix(in srgb,var(--line) 76%,transparent)}.report-fielding-grid>div:last-child{border-bottom:0}.report-fielding-grid>div>strong{font-size:9px}.report-fielding-grid span{display:grid;justify-items:center}.report-fielding-grid b{font-size:10px}.report-fielding-grid small{font-size:5.8px;color:var(--muted)}.report-empty{padding:18px 12px;color:var(--muted);font-size:8px;text-align:center}.report-recap{padding:6px}.report-recap-inning{border-bottom:1px solid var(--line);padding:7px 5px}.report-recap-inning:last-child{border-bottom:0}.report-recap-inning>div:first-child{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.report-recap-inning>div strong{font-size:9px;color:var(--accent)}.report-recap-inning>div small{font-size:6.5px;color:var(--muted)}.report-recap-inning p{display:grid;grid-template-columns:minmax(120px,180px) 1fr;gap:8px;margin:0;padding:5px 3px}.report-recap-inning p b{font-size:8px}.report-recap-inning p span{font-size:7.5px;color:var(--muted)}.report-notes>div:last-child{padding:12px;font-size:9px;white-space:pre-wrap;min-height:42px}.game-report-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:8px}.game-report-actions button{min-height:54px!important;display:grid;place-items:center;gap:2px;padding:7px!important;border:1px solid var(--line)!important;border-radius:11px!important;background:var(--panel)!important;color:var(--accent)!important;font-size:15px!important;font-weight:950!important}.game-report-actions button span{font-size:7px;color:var(--text);font-weight:900}.game-report-actions button.primary{background:var(--accent)!important;color:var(--bg)!important}.game-report-actions button.primary span{color:var(--bg)!important}.auto-runner-report-note{display:flex;gap:10px;align-items:center;padding:9px 11px;border:1px solid color-mix(in srgb,var(--accent) 36%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--accent) 6%,var(--panel))}.auto-runner-report-note b{font-size:8px;color:var(--accent);white-space:nowrap}.auto-runner-report-note span{font-size:7px;color:var(--muted);line-height:1.4}.saved-game-report-strip{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:7px 10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--panel2) 82%,transparent)}.saved-game-report-strip span{font-size:7px;color:var(--muted)}.saved-game-report-strip b{color:var(--accent)}
.export-center-card{width:min(610px,calc(100vw - 20px))!important}.export-center-intro{padding:10px 12px;color:var(--muted);font-size:8px;line-height:1.5}.export-center-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 12px 14px}.export-center-grid button{display:grid;grid-template-columns:36px 1fr;grid-template-rows:auto auto;column-gap:8px;text-align:left;align-items:center;padding:11px!important;min-height:72px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important;color:var(--text)!important}.export-center-grid button>span{grid-row:1/3;font-size:22px;color:var(--accent);text-align:center}.export-center-grid button strong{font-size:10px}.export-center-grid button small{font-size:7px;color:var(--muted);line-height:1.3}
#printReport{display:none}
@media(max-width:700px){.game-report-head{padding:0 3px}.game-report-head h2{font-size:18px}.report-two-col{grid-template-columns:1fr}.report-decision-grid{grid-template-columns:1fr}.game-report-actions{grid-template-columns:repeat(4,1fr)}.game-report-actions button[data-report-finish]{grid-column:1/-1}.report-recap-inning p{grid-template-columns:105px 1fr}.report-table td:first-child{min-width:125px}.report-pitch-auto{grid-template-columns:repeat(3,1fr)}.auto-runner-report-note{align-items:flex-start;flex-direction:column;gap:3px}.saved-game-report-strip{grid-template-columns:1fr}.export-center-grid{grid-template-columns:1fr}.export-center-grid button{min-height:64px!important}}
@media print{body.printing-game-report{background:#fff!important;color:#111!important}body.printing-game-report #app,body.printing-game-report>.modal,body.printing-game-report>.mobile-action-bar{display:none!important}body.printing-game-report #printReport{display:block!important;background:#fff!important;color:#111!important;padding:18px;font-family:Arial,sans-serif}#printReport .print-game-report header{text-align:center;border-bottom:2px solid #111;padding-bottom:10px;margin-bottom:14px}#printReport h1{font-size:28px;margin:3px 0}#printReport h2{font-size:13px;margin:12px 0 6px;text-transform:uppercase;letter-spacing:.06em}#printReport p,#printReport small{font-size:9px}#printReport .print-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}#printReport table{width:100%;border-collapse:collapse;min-width:0!important}#printReport th,#printReport td{border:1px solid #bbb;padding:4px;font-size:7px;text-align:center;position:static!important;background:#fff!important;color:#111!important}#printReport th:first-child,#printReport td:first-child{text-align:left}#printReport .postgame-linescore-scroll{overflow:visible;padding:0}#printReport .postgame-linescore{min-width:0}#printReport .print-decisions{font-size:9px;padding:8px;border:1px solid #bbb;margin-top:10px}@page{size:landscape;margin:10mm}}


/* ==========================================================
   v85 SCOREBOOK LIBRARY + SEASON STATISTICS
   ========================================================== */
.scorebook-library-page{display:grid;gap:10px;padding-bottom:22px}.library-controls{display:grid;grid-template-columns:minmax(150px,1fr) minmax(220px,1.5fr) auto;gap:8px;padding:10px;align-items:end}.library-controls label{display:grid;gap:4px}.library-controls label>span{font-size:6.5px;color:var(--muted);font-weight:900;letter-spacing:.08em;text-transform:uppercase}.library-controls select{height:42px;min-width:0;width:100%;padding:0 9px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);font:inherit;font-size:9px;font-weight:850}.library-controls button{height:42px;padding:0 13px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--accent) 9%,var(--panel2));color:var(--accent);font-size:12px;font-weight:950;white-space:nowrap}.library-controls button span{font-size:8px;color:var(--text);margin-left:4px}.library-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:5px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--panel) 94%,transparent);position:sticky;top:52px;z-index:5;backdrop-filter:blur(12px)}.library-tabs button{min-height:45px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px;font-weight:900}.library-tabs button b{font-size:8px}.library-tabs button.active{border-color:color-mix(in srgb,var(--accent) 48%,var(--line));background:color-mix(in srgb,var(--accent) 11%,var(--panel2));color:var(--accent)}.library-content{display:grid;gap:10px}.library-game-filters{display:flex;gap:6px;overflow-x:auto;padding:1px 1px 3px;-webkit-overflow-scrolling:touch}.library-game-filters button{flex:0 0 auto;min-height:34px;padding:0 11px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--muted);font-size:7px;font-weight:900}.library-game-filters button.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 11%,var(--panel));color:var(--accent)}.saved-collectible-row{display:flex;align-items:center;gap:6px;padding:6px 9px;border-top:1px solid color-mix(in srgb,var(--line) 74%,transparent);border-bottom:1px solid color-mix(in srgb,var(--line) 74%,transparent);background:color-mix(in srgb,var(--panel2) 70%,transparent)}.saved-collectible-row>span{min-width:0;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:6.5px;font-weight:800}.saved-collectible-row button{min-height:28px;padding:0 7px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-size:9px;font-weight:950}.saved-collectible-row button b{font-size:6px}.saved-collectible-row button.active{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent)}.season-overview{display:grid;gap:10px}.season-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:16px;overflow:hidden;position:relative}.season-hero:after{content:"";position:absolute;width:180px;height:180px;right:-70px;bottom:-110px;border-radius:50%;background:var(--accent);opacity:.06;filter:blur(12px)}.season-team{display:flex;align-items:center;gap:12px;min-width:0}.season-team img{width:68px;height:68px;object-fit:contain}.season-team span{display:grid;gap:2px;min-width:0}.season-team small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.12em}.season-team strong{font-size:20px;line-height:1.05}.season-team em{font-size:7px;color:var(--muted);font-style:normal;font-weight:800}.season-record{display:grid;justify-items:end;gap:2px;position:relative;z-index:1}.season-record small{font-size:6px;color:var(--muted);font-weight:900}.season-record strong{font-size:34px;line-height:1;color:var(--accent)}.season-record span{font-size:7px;color:var(--muted);font-weight:850}.season-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.season-kpis span{display:grid;justify-items:center;gap:2px;padding:11px 5px;border:1px solid var(--line);border-radius:11px;background:var(--panel)}.season-kpis b{font-size:16px;color:var(--accent)}.season-kpis small{font-size:6px;color:var(--muted);font-weight:850}.season-collection-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:10px}.season-collection-grid>section{padding:11px}.season-collection-grid>section>small{display:block;margin-bottom:8px;font-size:6.5px;color:var(--accent);font-weight:950;letter-spacing:.1em}.season-collection-grid>section:first-child>div{display:grid;grid-template-columns:1fr 1fr;gap:7px}.season-collection-grid>section:first-child span{display:grid;padding:8px;border-radius:9px;background:var(--panel2)}.season-collection-grid span b{font-size:15px}.season-collection-grid span em{font-size:6px;color:var(--muted);font-style:normal;font-weight:800}.season-recent div{display:grid;grid-template-columns:24px 42px 44px 1fr;align-items:center;gap:5px;padding:5px 0;border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent)}.season-recent div:last-child{border-bottom:0}.season-recent div>b{width:22px;height:22px;display:grid;place-items:center;border-radius:6px;background:var(--panel2);font-size:7px}.season-recent div>b.w{color:#5ccf87}.season-recent div>b.l{color:#e06a6a}.season-recent div>b.t{color:var(--muted)}.season-recent div span{font-size:8px;font-weight:900}.season-recent div strong{font-size:9px}.season-recent div em{justify-self:end;font-size:6.5px;color:var(--muted);font-style:normal}.season-source-note{margin:0;padding:0 4px;color:var(--muted);font-size:7px;line-height:1.45}.season-stat-section{display:grid;gap:9px}.season-stat-section>header{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding:2px}.season-stat-section>header small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.1em}.season-stat-section>header h3{margin:2px 0 0;font-size:19px}.season-stat-section>header>span{font-size:7px;color:var(--muted);font-weight:800}.season-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.season-table{width:100%;min-width:980px;border-collapse:collapse}.season-table.pitching{min-width:780px}.season-table th,.season-table td{padding:7px 6px;border-right:1px solid color-mix(in srgb,var(--line) 76%,transparent);border-bottom:1px solid color-mix(in srgb,var(--line) 76%,transparent);font-size:7px;text-align:center;white-space:nowrap}.season-table th{background:var(--panel2);color:var(--muted);font-size:6.5px}.season-table td:first-child,.season-table th:first-child{position:sticky;left:0;z-index:2;min-width:150px;text-align:left;background:var(--panel)}.season-table th:first-child{background:var(--panel2)}.season-table td small{font-size:6px;color:var(--accent)}.season-player-cards,.season-pitch-cards{display:none}.library-empty{display:grid;justify-items:center;text-align:center;padding:34px 20px}.library-empty>span{font-size:26px;color:var(--accent)}.library-empty strong{margin-top:7px;font-size:13px}.library-empty p{max-width:430px;margin:6px 0 0;color:var(--muted);font-size:8px;line-height:1.5}

@media(max-width:700px){.scorebook-library-page{gap:8px}.library-controls{grid-template-columns:1fr 1.35fr;gap:6px;padding:8px}.library-controls button{grid-column:1/-1;height:36px}.library-tabs{top:48px;gap:3px;padding:4px}.library-tabs button{min-height:40px;gap:4px}.library-tabs button b{font-size:6.6px}.saved-collectible-row>span{font-size:5.8px}.saved-collectible-row button{padding:0 6px}.saved-collectible-row button b{font-size:5.5px}.season-hero{grid-template-columns:1fr;padding:12px}.season-team img{width:54px;height:54px}.season-team strong{font-size:16px}.season-record{justify-items:start;padding-top:9px;border-top:1px solid var(--line)}.season-record strong{font-size:28px}.season-kpis{grid-template-columns:repeat(3,1fr);gap:5px}.season-kpis span{padding:8px 3px}.season-kpis b{font-size:13px}.season-collection-grid{grid-template-columns:1fr}.season-table-scroll{display:none}.season-player-cards,.season-pitch-cards{display:grid;gap:7px}.season-player-cards details,.season-pitch-cards article{border:1px solid var(--line);border-radius:11px;background:var(--panel);overflow:hidden}.season-player-cards summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;list-style:none}.season-player-cards summary::-webkit-details-marker{display:none}.season-player-cards summary>span{display:grid;gap:2px;min-width:0}.season-player-cards summary strong{font-size:9px}.season-player-cards summary span small{font-size:6.5px;color:var(--muted)}.season-player-cards summary>b{display:grid;justify-items:end;font-size:14px;color:var(--accent)}.season-player-cards summary>b small{font-size:5.5px;color:var(--muted)}.season-player-cards details>div,.season-pitch-cards article>div{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:8px;border-top:1px solid var(--line)}.season-player-cards details>div span,.season-pitch-cards article>div span{display:grid;justify-items:center;padding:6px 2px;border-radius:7px;background:var(--panel2)}.season-player-cards details>div b,.season-pitch-cards article>div b{font-size:10px}.season-player-cards details>div small,.season-pitch-cards article>div small{font-size:5px;color:var(--muted)}.season-pitch-cards article{padding:10px}.season-pitch-cards article>strong{font-size:9px}.season-pitch-cards article>small{display:block;margin-top:2px;font-size:6.5px;color:var(--muted)}.season-pitch-cards article>div{margin:8px -10px -10px}.season-stat-section>header h3{font-size:16px}}


/* v86 collectible scorebooks + export refinement */
.library-controls{grid-template-columns:minmax(140px,.8fr) minmax(220px,1.35fr) auto}.library-export-actions{display:flex;gap:6px}.library-export-actions button{height:42px}.library-tabs{grid-template-columns:repeat(5,1fr)}
.collection-caption{display:grid;gap:3px;padding:0 12px 10px}.collection-caption>span{font-size:5.6px;font-weight:950;letter-spacing:.09em;color:var(--muted)}.collection-caption input{width:100%;min-width:0;height:34px;padding:0 9px;border:1px solid color-mix(in srgb,var(--line) 85%,transparent);border-radius:8px;background:var(--panel2);color:var(--text);font-family:inherit;font-size:8px;font-weight:800}.collection-caption input::placeholder{color:color-mix(in srgb,var(--muted) 65%,transparent)}.collection-caption input:focus{outline:1px solid var(--accent);border-color:var(--accent)}
.collection-gallery-section{display:grid;gap:10px}.collection-gallery-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;padding:4px 2px}.collection-gallery-head small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.11em}.collection-gallery-head h3{margin:2px 0;font-size:20px}.collection-gallery-head p{margin:0;color:var(--muted);font-size:7.5px}.collection-gallery-head>div:last-child{display:grid;justify-items:center;min-width:72px;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:var(--panel)}.collection-gallery-head>div:last-child b{font-size:19px;color:var(--accent)}.collection-gallery-head>div:last-child span{font-size:5.8px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.collection-cover-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.collection-cover{position:relative;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:linear-gradient(155deg,color-mix(in srgb,var(--panel2) 91%,var(--accent) 9%),var(--panel));box-shadow:0 10px 28px rgba(0,0,0,.1)}.collection-cover:after{content:"";position:absolute;right:-42px;top:40px;width:130px;height:130px;border-radius:50%;background:var(--accent);opacity:.035;pointer-events:none}.collection-cover.is-favorite{border-color:color-mix(in srgb,var(--accent) 58%,var(--line));box-shadow:0 10px 30px color-mix(in srgb,var(--accent) 9%,transparent)}.collection-cover-top{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;border-bottom:1px solid color-mix(in srgb,var(--line) 65%,transparent)}.collection-cover-top small{max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:5.8px;font-weight:900;color:var(--accent);letter-spacing:.08em}.collection-cover-top span{font-size:11px;color:var(--accent);letter-spacing:.08em}.collection-cover-date{padding:11px 11px 2px;color:var(--muted);font-size:6px;font-weight:900;letter-spacing:.08em}.collection-cover-matchup{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:8px;padding:7px 11px}.collection-cover-matchup img{width:42px;height:42px;object-fit:contain}.collection-cover-matchup span{display:grid;text-align:center;gap:1px}.collection-cover-matchup strong{font-size:14px}.collection-cover-matchup i{font-size:5.5px;color:var(--muted);font-style:normal;text-transform:uppercase}.collection-cover-result{display:flex;align-items:center;gap:7px;padding:0 11px 9px}.collection-cover-result b{display:grid;place-items:center;min-width:25px;height:25px;border-radius:7px;background:color-mix(in srgb,var(--accent) 13%,var(--panel2));color:var(--accent);font-size:8px}.collection-cover-result span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:6.5px;color:var(--muted)}.collection-cover .collection-caption{padding:0 11px 9px}.collection-cover .collection-caption input{height:36px}.collection-cover-actions{display:grid;grid-template-columns:1.1fr 1fr 38px 38px;gap:5px;padding:9px 11px 11px;border-top:1px solid color-mix(in srgb,var(--line) 65%,transparent)}.collection-cover-actions button{min-height:36px;border:1px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--text);font-size:6.5px;font-weight:900}.collection-cover-actions button.active{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--panel2))}

@media(max-width:1000px){.collection-cover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.library-controls{grid-template-columns:1fr 1.35fr}.library-export-actions{grid-column:1/-1}.library-export-actions button{flex:1;height:38px}.library-tabs{grid-template-columns:repeat(5,1fr)}.library-tabs button{min-width:0;padding:0 2px;gap:2px;flex-direction:column}.library-tabs button span{font-size:10px}.library-tabs button b{font-size:5.7px}.collection-caption{padding:0 9px 8px}.collection-caption input{height:40px;font-size:16px}.collection-gallery-head{align-items:flex-start}.collection-gallery-head h3{font-size:16px}.collection-gallery-head p{font-size:6.8px}.collection-cover-grid{grid-template-columns:1fr;gap:9px}.collection-cover{border-radius:13px}.collection-cover-matchup{grid-template-columns:38px minmax(0,1fr) 38px}.collection-cover-matchup img{width:38px;height:38px}.collection-cover-matchup strong{font-size:13px}.collection-cover .collection-caption input{height:40px;font-size:16px}.collection-cover-actions button{min-height:42px}}
@media print{body.printing-season-book{background:#fff!important;color:#111!important}body.printing-season-book #app,body.printing-season-book>.modal,body.printing-season-book>.mobile-action-bar{display:none!important}body.printing-season-book #printReport{display:block!important;background:#fff!important;color:#111!important;padding:0;font-family:Arial,sans-serif}#printReport .print-season-book{color:#111}.season-book-cover{min-height:88vh;display:grid;place-items:center;align-content:center;text-align:center;gap:12px;border:3px double #111;padding:30px;page-break-after:always}.season-book-cover>small{font-size:11px;letter-spacing:.2em;font-weight:800}.season-book-cover>img{width:120px;height:120px;object-fit:contain}.season-book-cover h1{font-size:34px;margin:0}.season-book-cover h2{font-size:52px;margin:0}.season-book-cover p{font-size:12px!important}.season-book-cover>div{display:flex;gap:20px;margin-top:12px}.season-book-cover>div span{font-size:10px}.season-book-cover>div b{font-size:16px}.season-book-page{page-break-before:always;padding:12px}.season-book-page header{border-bottom:2px solid #111;padding-bottom:6px;margin-bottom:8px}.season-book-page header small{font-size:8px!important}.season-book-page header h2{font-size:20px!important;margin:2px 0!important}.season-book-page table{width:100%;border-collapse:collapse}.season-book-page th,.season-book-page td{border:1px solid #bbb;padding:5px;font-size:7px;text-align:center}.season-book-page th:first-child,.season-book-page td:first-child{text-align:left}body.printing-game-report #printReport .print-keepsake-meta{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:7px;font-size:8px}body.printing-game-report #printReport .print-keepsake-meta strong{flex-basis:100%;font-size:12px;font-style:italic}}

@media print{body.printing-season-book #printReport .season-book-cover + .season-book-page{page-break-before:auto!important}}


/* ==========================================================
   v87 — Scoring completeness + print cleanup
   ========================================================== */
.run-nullified{position:absolute;left:4px;bottom:4px;z-index:5;font:900 8px/1 Arial,sans-serif;letter-spacing:.04em;color:#d62828;background:rgba(255,255,255,.92);border:1px solid #d62828;border-radius:4px;padding:2px 3px;box-shadow:0 1px 2px rgba(0,0,0,.15)}
@media print{
  body.printing-game-report::before,body.printing-game-report::after{display:none!important;content:none!important}
  body.printing-game-report,body.printing-game-report #printReport{height:auto!important;min-height:0!important;overflow:visible!important}
  body.printing-game-report #printReport{padding:10px!important;margin:0!important}
  body.printing-game-report #printReport .print-game-report{display:block!important;margin:0!important;padding:0!important;break-after:avoid-page!important;page-break-after:avoid!important;break-inside:avoid-page!important;page-break-inside:avoid!important}
  body.printing-game-report #printReport .print-game-report>section:last-child{margin-bottom:0!important;padding-bottom:0!important}
  body.printing-game-report #printReport .print-game-report header{margin-top:0!important}
  @page{size:landscape;margin:9mm}
}

/* ==========================================================
   v90 — PREMIUM SCOREBOOK DESIGN SYSTEM + SIMPLE NAVIGATION
   ========================================================== */
:root{
  --ui-bg:#eee9df;--ui-surface:#fffdf8;--ui-surface-2:#f5f0e7;--ui-line:#d0c8b9;
  --ui-text:#24231f;--ui-muted:#756f64;--ui-shadow:0 10px 28px rgba(42,36,27,.08);
}
body.dark-mode{
  --ui-bg:#111513;--ui-surface:#191e1b;--ui-surface-2:#222823;--ui-line:#3d4640;
  --ui-text:#f2efe7;--ui-muted:#a9aea7;--ui-shadow:0 12px 30px rgba(0,0,0,.25);
}

/* The regular Scorebook theme is the premium plain baseline. Other color
   presets keep this layout and only change the palette. */
body.theme-custom.custom-modern:not(.dark-mode){
  background:var(--custom-bg)!important;
  --bg:var(--custom-bg)!important;--panel:var(--custom-panel)!important;--panel2:var(--custom-panel2)!important;
  --line:var(--custom-line)!important;--text:var(--custom-text)!important;--muted:var(--custom-muted)!important;
  --accent:var(--custom-accent-safe,var(--custom-accent))!important;--selected:var(--custom-selected)!important;
}
body.theme-custom.custom-modern:not(.dark-mode) .app-shell{
  background:linear-gradient(180deg,var(--custom-bg),var(--custom-bg2))!important;
}
body.theme-custom.custom-modern:not(.dark-mode) .topbar{
  background:var(--custom-header)!important;color:var(--text)!important;border-bottom:1px solid var(--line)!important;
  box-shadow:none!important;
}
body.theme-custom .card,
body.theme-custom .game-info,
body.theme-custom .matchup-selector,
body.theme-custom .standings-overview,
body.theme-custom .team-scorebook{
  border-radius:9px!important;border-width:1px!important;box-shadow:0 5px 16px rgba(0,0,0,.055)!important;
}
body.theme-custom .overview-title,
body.theme-custom .card-title,
body.theme-custom .team-scorebook-head{
  background:var(--panel2)!important;border-color:var(--line)!important;
}
body.theme-custom .unified-score-table{
  --score-grid-bg:var(--custom-grid)!important;--score-grid-sticky:var(--custom-grid-sticky)!important;
  --score-grid-head:var(--custom-grid-head)!important;--score-grid-line:var(--custom-grid-line)!important;
}
body.theme-custom .team-scorebook,
body.theme-custom .game-info,
body.theme-custom .matchup-selector,
body.theme-custom .standings-overview{background:var(--panel)!important}
body.theme-custom .live-game-bar{border-radius:8px!important;box-shadow:none!important}
body.theme-custom .topbar h1,
body.theme-custom .team-header-name,
body.theme-custom .overview-title strong{font-family:Georgia,"Times New Roman",serif!important}

/* Neutral product chrome: themes can tint accents, but do not restructure
   navigation/library surfaces. */
.v90-more-sheet,
.v90-theme-card,
.v90-settings-card{
  --panel:var(--ui-surface);--panel2:var(--ui-surface-2);--line:var(--ui-line);--text:var(--ui-text);--muted:var(--ui-muted);
  background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;
}
.v90-theme-card .modal-head,.v90-settings-card .modal-head{border-color:var(--ui-line)!important}
.v90-theme-card input,.v90-theme-card select,.v90-settings-card input,.v90-settings-card select{
  color:var(--ui-text)!important;background:var(--ui-surface-2)!important;border-color:var(--ui-line)!important;
}

/* More sheet */
.v90-more-sheet{box-shadow:0 24px 70px rgba(0,0,0,.28)!important}
.v90-more-sheet .drawer-head{border:0!important;padding:5px 5px 10px!important}
.v90-more-sheet .drawer-head>div{display:grid;gap:2px}.v90-more-sheet .drawer-head strong{font-size:22px!important;letter-spacing:-.02em}.v90-more-sheet .drawer-head small{font-size:11px;color:var(--ui-muted)}
.drawer-current{display:grid;gap:2px;margin:2px 3px 10px;padding:12px 13px;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-surface-2)}
.drawer-current>span{font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--ui-muted)}
.drawer-current>strong{font-size:17px;letter-spacing:-.02em}.drawer-current>small{font-size:11px;color:var(--ui-muted)}
.v90-more-sheet .drawer-section{padding:8px 0!important;border:0!important}
.v90-more-sheet .drawer-section+.drawer-section::before{display:none!important}
.v90-more-sheet .drawer-label{margin:0 10px 5px!important;font-size:9px!important;color:var(--ui-muted)!important;letter-spacing:.14em!important}
.v90-more-sheet .drawer-label::after{display:none!important}
.v90-more-sheet .menu-row,.v90-more-sheet .drawer-nav,.v90-more-sheet .drawer-tools>button,.v90-more-sheet .import-button{
  min-height:52px!important;margin:1px 0;padding:7px 9px!important;border:0!important;border-radius:11px!important;
  color:var(--ui-text)!important;background:transparent!important;box-shadow:none!important;
}
.v90-more-sheet .menu-row:active,.v90-more-sheet .drawer-nav.active{background:var(--ui-surface-2)!important;transform:none!important}
.v90-more-sheet .menu-glyph{width:32px;height:32px;border-radius:9px;background:var(--ui-surface-2);font-size:16px;color:var(--accent)}
.v90-more-sheet .menu-copy{display:grid;gap:1px}.v90-more-sheet .menu-copy strong{font-size:13px}.v90-more-sheet .menu-copy small{font-size:10px!important;color:var(--ui-muted)!important;font-weight:600!important}
.v90-more-sheet .menu-trailing,.v90-more-sheet .menu-value{font-size:10px;color:var(--ui-muted);max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Concept A bottom navigation */
.v90-action-bar{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  min-height:70px;padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
  background:color-mix(in srgb,var(--ui-surface) 97%,transparent)!important;border-color:var(--ui-line)!important;
  box-shadow:0 -10px 28px rgba(0,0,0,.12)!important;backdrop-filter:blur(16px);
}
.v90-action-bar button{min-height:52px!important;color:var(--ui-text)!important;border-radius:13px!important;background:transparent!important}
.v90-action-bar button span{font-size:19px!important;color:var(--ui-text)!important}.v90-action-bar button small{font-size:9px!important;color:var(--ui-muted)!important;font-weight:800!important}
.v90-action-bar button.is-active:not(.score-command){background:var(--ui-surface-2)!important}.v90-action-bar button.is-active:not(.score-command) span,.v90-action-bar button.is-active:not(.score-command) small{color:var(--accent)!important}
.v90-action-bar .score-command{
  min-height:72px!important;margin-top:-18px!important;border:1px solid color-mix(in srgb,var(--accent) 72%,var(--ui-line))!important;
  border-radius:24px!important;background:color-mix(in srgb,var(--accent) 14%,var(--ui-surface))!important;
  box-shadow:0 8px 22px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.35)!important;
}
.v90-action-bar .score-command span{font-size:27px!important;color:var(--accent)!important}.v90-action-bar .score-command small{font-size:10px!important;color:var(--ui-text)!important}
.v90-action-bar #mobileSave span{color:var(--accent)!important}

/* Scorebook Library — reduced hierarchy, fewer competing borders. */
body:has(.v90-library) .app-shell{background:var(--ui-bg)!important}
body:has(.v90-library) main{max-width:1080px!important}
body:has(.v90-library) .topbar{background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;box-shadow:none!important}
body:has(.v90-library) .topbar h1{font-family:Georgia,"Times New Roman",serif!important;color:var(--ui-text)!important}
body:has(.v90-library) .save-status{color:var(--ui-muted)!important}
.v90-library{display:grid;gap:14px;padding:8px 2px 30px;color:var(--ui-text)}
.v90-library-head{align-items:flex-start!important;margin:0!important;padding:4px 2px 2px!important}
.v90-library-head small{font-size:9px!important;color:var(--accent)!important;letter-spacing:.15em!important}.v90-library-head h2{margin:4px 0 4px!important;font:700 31px/1.03 Georgia,"Times New Roman",serif!important;color:var(--ui-text)!important}.v90-library-head p{font-size:12px!important;color:var(--ui-muted)!important}.v90-library-head>span{padding:7px 10px!important;background:transparent!important;border:1px solid var(--ui-line)!important;color:var(--ui-muted)!important;font-size:10px!important}
.v90-library-toolbar{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(110px,.6fr);gap:8px;padding:10px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);box-shadow:var(--ui-shadow)}
.v90-library-toolbar label{display:grid;gap:4px}.v90-library-toolbar label>span,.v90-game-filter label>span{font-size:9px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:var(--ui-muted)}
.v90-library-toolbar select,.v90-game-filter select{width:100%;height:43px;padding:0 34px 0 11px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface-2);color:var(--ui-text);font-size:13px;font-weight:750}
.v90-library-tabs{position:static!important;display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:4px!important;padding:4px!important;border:1px solid var(--ui-line)!important;border-radius:13px!important;background:var(--ui-surface)!important;box-shadow:none!important}
.v90-library-tabs button{min-height:46px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--ui-muted)!important}
.v90-library-tabs button span{font-size:13px!important}.v90-library-tabs button b{font-size:11px!important}.v90-library-tabs button.active{background:var(--ui-surface-2)!important;color:var(--ui-text)!important;box-shadow:inset 0 0 0 1px var(--ui-line)!important}.v90-library-tabs button.active span{color:var(--accent)!important}
.library-content{display:grid;gap:10px}.v90-game-filter{display:flex;justify-content:flex-end}.v90-game-filter label{display:grid;grid-template-columns:auto minmax(160px,220px);align-items:center;gap:8px}.v90-game-filter select{height:38px;font-size:11px}
.v90-library .saved-games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
.v90-game-card{overflow:hidden;border:1px solid var(--ui-line)!important;border-radius:15px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;box-shadow:var(--ui-shadow)!important}
.v90-game-card.is-current{border-color:color-mix(in srgb,var(--accent) 60%,var(--ui-line))!important;box-shadow:0 10px 30px color-mix(in srgb,var(--accent) 8%,transparent)!important}
.v90-game-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid var(--ui-line);background:transparent}
.v90-game-card-head>div{display:flex;align-items:center;gap:6px}.v90-game-card-head em{font-size:9px;color:var(--ui-muted);font-style:normal}.v90-game-card-head>b{font-size:9px;color:var(--ui-muted)}
.v90-game-card .saved-status,.v90-game-card .saved-current{min-height:22px;padding:0 7px;display:inline-flex;align-items:center;border:1px solid var(--ui-line);border-radius:999px;background:var(--ui-surface-2);font-size:8px;font-weight:900;letter-spacing:.05em;color:var(--ui-text)}
.v90-game-matchup{display:grid;grid-template-columns:minmax(0,1fr) 90px minmax(0,1fr);align-items:center;gap:8px;padding:15px 12px 10px}.v90-game-matchup>div:first-child,.v90-game-matchup>.right{display:flex;align-items:center;gap:8px;min-width:0}.v90-game-matchup>.right{justify-content:flex-end;text-align:right}.v90-game-matchup img{width:39px;height:39px;object-fit:contain}.v90-game-matchup span{display:grid;min-width:0}.v90-game-matchup strong{font-size:15px}.v90-game-matchup small{font-size:9px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v90-game-matchup .saved-score{text-align:center;display:grid;gap:2px}.v90-game-matchup .saved-score strong{font-size:26px;letter-spacing:-.04em}.v90-game-matchup .saved-score i{font-style:normal;color:var(--ui-muted);font-weight:500}.v90-game-matchup .saved-score span{font-size:9px;color:var(--ui-muted)}
.v90-game-details{display:flex;gap:8px;flex-wrap:wrap;padding:0 12px 9px}.v90-game-details span{font-size:9px;color:var(--ui-muted)}.v90-game-details span+span::before{content:"·";margin-right:8px}
.v90-game-card .collection-caption{padding:0 12px 9px!important}.v90-game-card .collection-caption>span{font-size:8px!important}.v90-game-card .collection-caption input{height:37px!important;border:1px solid var(--ui-line)!important;border-radius:9px!important;background:var(--ui-surface-2)!important;color:var(--ui-text)!important;font-size:12px!important}
.v90-game-rhe{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 12px 9px;padding:8px 9px;border-radius:9px;background:var(--ui-surface-2)}.v90-game-rhe span{font-size:9px;color:var(--ui-muted)}.v90-game-rhe b{color:var(--ui-text)}
.v90-card-marks{display:flex;gap:6px;padding:0 12px 10px}.v90-card-marks button{min-height:32px;padding:0 9px;border:1px solid var(--ui-line);border-radius:9px;background:transparent;color:var(--ui-muted);font-size:9px;font-weight:800}.v90-card-marks button.active{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 55%,var(--ui-line));background:color-mix(in srgb,var(--accent) 7%,var(--ui-surface))}
.v90-game-card .saved-game-actions{grid-template-columns:1.2fr 1fr auto!important;gap:6px!important;padding:10px 12px!important;border-top:1px solid var(--ui-line)!important;background:transparent!important}.v90-game-card .saved-game-actions button{min-height:40px!important;border:1px solid var(--ui-line)!important;border-radius:9px!important;background:var(--ui-surface-2)!important;color:var(--ui-text)!important;font-size:10px!important}.v90-game-card .saved-game-actions .saved-primary{background:color-mix(in srgb,var(--accent) 10%,var(--ui-surface))!important;border-color:color-mix(in srgb,var(--accent) 48%,var(--ui-line))!important}.v90-game-card .saved-game-actions .saved-delete{background:transparent!important;color:#a64c45!important;border-color:transparent!important}
.v90-empty{border:1px dashed var(--ui-line)!important;border-radius:15px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important}

/* Season hierarchy: one main section, contextual stats navigation. */
.v90-season-nav{display:grid;grid-template-columns:auto auto auto 1fr auto auto;gap:5px;align-items:center;padding:4px;border-bottom:1px solid var(--ui-line)}
.v90-season-nav button{min-height:36px;padding:0 11px;border:0;border-radius:8px;background:transparent;color:var(--ui-muted);font-size:10px;font-weight:850}.v90-season-nav button.active{background:var(--ui-surface-2);color:var(--ui-text)}.v90-season-nav button[data-library-export],.v90-season-nav button[data-library-book]{border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-text)}
.v90-library .season-hero,.v90-library .season-kpis span,.v90-library .season-collection-grid>section,.v90-library .season-table-scroll,.v90-library .season-player-cards details,.v90-library .season-pitch-cards article,.v90-library .collection-cover,.v90-library .collection-gallery-head>div:last-child,.v90-library .library-empty{
  background:var(--ui-surface)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important;box-shadow:none!important;
}
.v90-library .season-hero{border-radius:14px!important}.v90-library .season-kpis span,.v90-library .season-collection-grid>section{border-radius:11px!important}.v90-library .season-table th,.v90-library .season-table td{border-color:var(--ui-line)!important}.v90-library .season-table th{background:var(--ui-surface-2)!important;color:var(--ui-muted)!important}.v90-library .season-table td,.v90-library .season-table td:first-child{background:var(--ui-surface)!important;color:var(--ui-text)!important}.v90-library .season-player-cards details>div span,.v90-library .season-pitch-cards article>div span{background:var(--ui-surface-2)!important}
.v90-library .collection-cover{border-radius:14px!important;background:var(--ui-surface)!important}.v90-library .collection-cover:after{display:none}.v90-library .collection-cover-top,.v90-library .collection-cover-actions{border-color:var(--ui-line)!important}.v90-library .collection-cover-actions button{background:var(--ui-surface-2)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important}

@media(max-width:700px){
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
  .topbar .menu-icon,.topbar .top-actions{display:none!important}.topbar{grid-template-columns:1fr!important;min-height:76px!important;padding-inline:12px!important}.topbar h1{font-size:25px!important}.save-status{bottom:5px!important}
  .v90-more-sheet{left:8px!important;right:8px!important;top:auto!important;bottom:calc(70px + env(safe-area-inset-bottom))!important;width:auto!important;max-height:76dvh!important;padding:10px 10px 14px!important;border:1px solid var(--ui-line)!important;border-radius:22px!important;transform:translateY(calc(100% + 90px))!important;transition:transform .24s cubic-bezier(.22,.8,.2,1)!important;overflow-y:auto!important}
  .v90-more-sheet.open{transform:translateY(0)!important}.drawer-shade{background:rgba(0,0,0,.38)!important;backdrop-filter:blur(2px)}
  .v90-action-bar{display:grid!important}.v90-action-bar button{min-height:52px!important}.v90-action-bar .score-command{min-height:70px!important}
  .v90-library{gap:10px;padding:4px 0 24px}.v90-library-head{padding:2px 3px 1px!important}.v90-library-head h2{font-size:27px!important}.v90-library-head p{font-size:11px!important;max-width:250px}.v90-library-head>span{font-size:9px!important;padding:6px 8px!important}
  .v90-library-toolbar{grid-template-columns:minmax(0,1.55fr) minmax(100px,.7fr);gap:6px;padding:7px;border-radius:12px}.v90-library-toolbar select{height:42px;font-size:12px}.v90-library-toolbar label>span{font-size:8px}
  .v90-library-tabs{gap:3px!important;padding:3px!important}.v90-library-tabs button{min-height:43px!important;gap:4px!important}.v90-library-tabs button b{font-size:10px!important}.v90-library-tabs button span{font-size:12px!important}
  .v90-game-filter{justify-content:stretch}.v90-game-filter label{width:100%;grid-template-columns:36px 1fr}.v90-game-filter select{height:40px;font-size:11px}
  .v90-library .saved-games-grid{grid-template-columns:1fr!important;gap:8px!important}.v90-game-card{border-radius:13px!important}.v90-game-matchup{grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr);padding:12px 10px 8px}.v90-game-matchup img{width:34px;height:34px}.v90-game-matchup strong{font-size:13px}.v90-game-matchup small{font-size:8px}.v90-game-matchup .saved-score strong{font-size:23px}.v90-game-details{padding-inline:10px}.v90-game-card .collection-caption{padding-inline:10px!important}.v90-game-rhe{margin-inline:10px}.v90-card-marks{padding-inline:10px}.v90-game-card .saved-game-actions{padding:9px 10px!important}.v90-game-card .saved-game-actions button{min-height:44px!important}
  .v90-season-nav{grid-template-columns:repeat(3,1fr);gap:4px;padding:4px 0 8px}.v90-season-nav>span{display:none}.v90-season-nav button{min-height:38px;padding:0 5px;font-size:9px}.v90-season-nav button[data-library-export]{grid-column:1/2}.v90-season-nav button[data-library-book]{grid-column:2/4}
  .collection-gallery-head h3{font-size:18px!important}.collection-gallery-head p{font-size:9px!important}.collection-cover-grid{gap:8px!important}
}

.v90-action-bar #mobileSave.just-saved{background:color-mix(in srgb,var(--accent) 10%,var(--ui-surface))!important}.v90-action-bar #mobileSave.just-saved small{color:var(--accent)!important}
/* v90 secondary-action consolidation: keep More short enough to scan at a glance. */
.v90-about-note{display:grid;gap:3px;margin:12px 0 2px;padding:11px 12px;border-top:1px solid var(--ui-line);color:var(--ui-muted)}
.v90-about-note strong{font-size:10px;color:var(--ui-text)}.v90-about-note small{font-size:9px;line-height:1.35}
.export-import-tile{position:relative;display:grid!important;gap:4px;align-content:center;min-height:94px;padding:12px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel2)!important;color:var(--text)!important;cursor:pointer}
.export-import-tile>span{font-size:18px}.export-import-tile>strong{font-size:12px}.export-import-tile>small{font-size:9px;line-height:1.25;color:var(--muted)}.export-import-tile>input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
@media(max-width:700px){.v90-more-sheet .menu-row,.v90-more-sheet .drawer-nav{min-height:47px!important}.v90-more-sheet{max-height:84dvh!important}}


/* ==========================================================
   v91 — FOUR-THEME ARCHITECTURE + TRUE LIGHT/DARK CONTRAST
   Structure is neutral. Theme supplies identity. Mode supplies contrast.
   ========================================================== */
:root{
  --ui-bg:#ffffff;--ui-surface:#ffffff;--ui-surface-2:#f7f7f7;--ui-line:#dedede;
  --ui-text:#171717;--ui-muted:#6b6b6b;--ui-shadow:0 7px 22px rgba(0,0,0,.055);
}
body.dark-mode{
  --ui-bg:#171717;--ui-surface:#212121;--ui-surface-2:#2f2f2f;--ui-line:#454545;
  --ui-text:#f5f5f5;--ui-muted:#b4b4b4;--ui-shadow:0 8px 24px rgba(0,0,0,.30);
}

/* Default is deliberately colorless. It is the layout baseline. */
body.theme-default,
body.theme-generic{
  --bg:var(--custom-bg)!important;--panel:var(--custom-panel)!important;--panel2:var(--custom-panel2)!important;
  --line:var(--custom-line)!important;--text:var(--custom-text)!important;--muted:var(--custom-muted)!important;
  --accent:var(--custom-accent-safe,var(--custom-accent))!important;--selected:var(--custom-selected)!important;
  background:var(--custom-bg)!important;color:var(--custom-text)!important;
}
body.theme-default .app-shell,body.theme-generic .app-shell{background:var(--custom-bg)!important}
body.theme-default .topbar,body.theme-generic .topbar{background:var(--custom-header)!important;color:var(--text)!important;border-bottom:1px solid var(--line)!important;box-shadow:none!important}
body.theme-default .drawer,body.theme-generic .drawer{background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;filter:none!important}
body.theme-default .card,body.theme-generic .card,
body.theme-default .game-info,body.theme-generic .game-info,
body.theme-default .matchup-selector,body.theme-generic .matchup-selector,
body.theme-default .standings-overview,body.theme-generic .standings-overview,
body.theme-default .team-scorebook,body.theme-generic .team-scorebook{
  border:1px solid var(--line)!important;border-radius:7px!important;box-shadow:none!important;background:var(--panel)!important;
}
body.theme-default .overview-title,body.theme-generic .overview-title,
body.theme-default .card-title,body.theme-generic .card-title,
body.theme-default .team-scorebook-head,body.theme-generic .team-scorebook-head,
body.theme-default .pane-title,body.theme-generic .pane-title{
  background:var(--panel2)!important;border-color:var(--line)!important;
}
body.theme-default .unified-score-table,body.theme-generic .unified-score-table{
  --score-grid-bg:var(--custom-grid)!important;--score-grid-sticky:var(--custom-grid-sticky)!important;
  --score-grid-head:var(--custom-grid-head)!important;--score-grid-line:var(--custom-grid-line)!important;
}
body.theme-default .topbar h1,body.theme-default .team-header-name,body.theme-default .overview-title strong,
body.theme-generic .topbar h1,body.theme-generic .team-header-name,body.theme-generic .overview-title strong{
  font-family:Arial,Helvetica,sans-serif!important;
}
/* Default uses no theme color. Generic alone may use selected accent color. */
body.theme-default{--accent:var(--text)!important}
body.theme-default .game-info-icon,body.theme-default .matchup-label,body.theme-default .versus-mark,
body.theme-default .overview-title,body.theme-default .card-title,body.theme-default .team-scorebook-head,
body.theme-default .pane-title,body.theme-default .totals-row td{color:var(--text)!important}
body.theme-default .section-collapse{color:var(--text)!important;border-color:var(--line)!important}

/* True dark mode: never use brightness/tint filters. Surfaces are explicitly dark. */
body.dark-mode .topbar,body.dark-mode .card,body.dark-mode .team-left-stack,body.dark-mode .lineup-pane,
body.dark-mode .pitch-pane,body.dark-mode .scoring-pane,body.dark-mode .drawer{filter:none!important}
body.dark-mode .modal-card{background:#212121!important;color:#f5f5f5!important;border-color:#454545!important}
body.dark-mode .modal-head{border-color:#454545!important}
body.dark-mode .modal-head small,body.dark-mode .modal label{color:#b4b4b4!important}
body.dark-mode .modal input,body.dark-mode .modal select,body.dark-mode .modal textarea,
body.dark-mode .small-btn,body.dark-mode .modal-actions button,body.dark-mode .settings-buttons button{
  background:#2f2f2f!important;color:#f5f5f5!important;border-color:#4a4a4a!important;
}



body.theme-postseason.dark-mode{
  --bg:#171717!important;--panel:#212121!important;--panel2:#292929!important;--line:#484848!important;
  --text:#f5f5f5!important;--muted:#b4b4b4!important;--selected:#303030!important;background:#171717!important;
}
body.theme-postseason.dark-mode .app-shell{background:#171717!important}
body.theme-postseason.dark-mode .topbar{background:#212121!important}

/* Appearance: exactly four top-level choices. */
.v91-theme-list{display:grid!important;gap:3px!important}
.v91-theme-list>.theme-choice{min-height:58px!important;border-bottom:1px solid var(--ui-line)!important;border-radius:0!important}
.v91-theme-list>.theme-choice:first-child{border-radius:10px 10px 0 0!important}
.v91-theme-list .theme-sub{margin:2px 10px 8px 50px!important;border-left:2px solid var(--ui-line)!important;background:var(--ui-surface-2)!important}
.default-swatch{background:linear-gradient(135deg,#fff 0 72%,#171717 72%);border:1px solid #cfcfcf}
.generic-swatch{background:linear-gradient(135deg,#fff 0 68%,#2563eb 68%);border:1px solid #cfcfcf}
.v91-theme-card .theme-choice.active{background:var(--ui-surface-2)!important}
.v91-theme-card .theme-choice.active .theme-check{color:var(--ui-text)!important}
body.theme-generic .v91-theme-card .theme-choice.active .theme-check{color:var(--accent)!important}

/* Bottom bar: Score stays distinctive but is centered INSIDE the bar, not floating above it. */
.v91-action-bar{
  min-height:78px!important;align-items:center!important;padding-top:6px!important;padding-bottom:calc(6px + env(safe-area-inset-bottom))!important;
}
.v91-action-bar button{align-self:center!important;justify-self:stretch!important;margin:0!important}
.v91-action-bar .score-command{
  min-height:62px!important;height:62px!important;margin:0!important;align-self:center!important;
  border-radius:20px!important;transform:none!important;
  box-shadow:0 3px 12px rgba(0,0,0,.10)!important;
}
.v91-action-bar .score-command:active{transform:scale(.98)!important}
.v91-action-bar .score-command span{font-size:24px!important}
@media(max-width:700px){
  body{padding-bottom:calc(80px + env(safe-area-inset-bottom))!important}
  .v91-action-bar{min-height:78px!important}
  .v91-action-bar .score-command{min-height:62px!important;height:62px!important}
  .v90-more-sheet{bottom:calc(78px + env(safe-area-inset-bottom))!important}
}


/* v91 centering hard override: supersedes legacy lifted Score rules. */
@media(max-width:700px){
  body:not(.home-page) .mobile-action-bar.v91-action-bar{align-items:center!important;min-height:78px!important}
  body:not(.home-page) .mobile-action-bar.v91-action-bar .score-command{
    transform:none!important;margin:0!important;height:62px!important;min-height:62px!important;align-self:center!important;
    border-radius:20px!important;background:var(--ui-surface-2)!important;border:1px solid var(--ui-line)!important;
    box-shadow:0 3px 12px rgba(0,0,0,.10)!important;
  }
  body.theme-generic:not(.home-page) .mobile-action-bar.v91-action-bar .score-command{
    background:color-mix(in srgb,var(--accent) 8%,var(--ui-surface))!important;
    border-color:color-mix(in srgb,var(--accent) 32%,var(--ui-line))!important;
  }
  body:not(.home-page) .mobile-action-bar.v91-action-bar .score-command span{font-size:24px!important}
}

/* ==========================================================
   v92 — NEUTRAL DEFAULT + THEME ISOLATION
   Default owns no identity color. Appearance is system UI.
   Dark Mode owns contrast and never dims/tints entire sections.
   ========================================================== */

/* 1) Default is intentionally colorless. */
body.theme-default:not(.dark-mode){
  --bg:#ffffff!important;--panel:#ffffff!important;--panel2:#f5f5f5!important;
  --line:#b9b9b9!important;--text:#171717!important;--muted:#686868!important;
  --accent:#171717!important;--selected:#ececec!important;
  --custom-bg:#ffffff!important;--custom-bg2:#ffffff!important;--custom-header:#ffffff!important;
  --custom-panel:#ffffff!important;--custom-panel2:#f5f5f5!important;--custom-line:#b9b9b9!important;
  --custom-accent:#171717!important;--custom-accent-safe:#171717!important;--custom-selected:#ececec!important;
  --custom-text:#171717!important;--custom-muted:#686868!important;
  --custom-grid:#ffffff!important;--custom-grid-sticky:#fafafa!important;--custom-grid-head:#f2f2f2!important;--custom-grid-line:#b9b9b9!important;
}
body.theme-default.dark-mode{
  --bg:#171717!important;--panel:#212121!important;--panel2:#2b2b2b!important;
  --line:#4a4a4a!important;--text:#f5f5f5!important;--muted:#b4b4b4!important;
  --accent:#f5f5f5!important;--selected:#303030!important;
  --custom-bg:#171717!important;--custom-bg2:#171717!important;--custom-header:#212121!important;
  --custom-panel:#212121!important;--custom-panel2:#2b2b2b!important;--custom-line:#4a4a4a!important;
  --custom-accent:#f5f5f5!important;--custom-accent-safe:#f5f5f5!important;--custom-selected:#303030!important;
  --custom-text:#f5f5f5!important;--custom-muted:#b4b4b4!important;
  --custom-grid:#181818!important;--custom-grid-sticky:#202020!important;--custom-grid-head:#292929!important;--custom-grid-line:#4a4a4a!important;
}
body.theme-default .app-shell{background:var(--bg)!important;color:var(--text)!important}
body.theme-default .topbar{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;box-shadow:none!important}
body.theme-default .live-game-bar,
body.theme-default .game-info,
body.theme-default .matchup-selector,
body.theme-default .standings-overview,
body.theme-default .team-scorebook,
body.theme-default .card{
  background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;box-shadow:none!important;
}
/* A regular scorebook uses rules and spacing instead of colored card framing. */
body.theme-default .game-info{border-radius:4px!important}
body.theme-default .matchup-selector{border-radius:4px!important}
body.theme-default .standings-overview{border-radius:5px!important}
body.theme-default .team-scorebook{border-radius:5px!important}
body.theme-default .overview-title,
body.theme-default .card-title,
body.theme-default .team-scorebook-head,
body.theme-default .pane-title{
  background:var(--panel2)!important;color:var(--text)!important;border-color:var(--line)!important;
}
body.theme-default .game-info-icon,
body.theme-default .matchup-label,
body.theme-default .versus-mark,
body.theme-default .team-header-name,
body.theme-default .overview-title,
body.theme-default .standings-head,
body.theme-default .pane-title,
body.theme-default .mode-workspace-tabs button span,
body.theme-default .workspace-tabs button span,
body.theme-default .report-section-head small,
body.theme-default .report-recap-inning>div strong{
  color:var(--text)!important;
}
body.theme-default .section-collapse,
body.theme-default .refresh-standings,
body.theme-default .small-btn{
  color:var(--text)!important;border-color:var(--line)!important;background:var(--panel)!important;
}
body.theme-default .mode-workspace-tabs,
body.theme-default .workspace-tabs{background:var(--panel2)!important;border-color:var(--line)!important;box-shadow:none!important}
body.theme-default .mode-workspace-tabs button.active,
body.theme-default .workspace-tabs button.active,
body.theme-default .play-log-filter button.active{
  color:var(--text)!important;background:var(--selected)!important;border-color:var(--line)!important;
  box-shadow:inset 0 -3px 0 var(--text)!important;
}
body.theme-default .standings-grid>.standings-selected{
  background:var(--selected)!important;color:var(--text)!important;border-top-color:var(--line)!important;border-bottom-color:var(--line)!important;text-shadow:none!important;
}
body.theme-default .standings-grid>.standings-selected-start{border-left-color:var(--text)!important}
body.theme-default .standings-grid>.standings-selected-end{border-right-color:var(--line)!important}
body.theme-default .unified-score-table,
body.theme-default .unified-score-table th,
body.theme-default .unified-score-table td,
body.theme-default .full-width-pitch,
body.theme-default .full-width-pitch .pitch-table th,
body.theme-default .full-width-pitch .pitch-table td{
  border-color:var(--line)!important;color:var(--text)!important;
}
body.theme-default .unified-score-table th,
body.theme-default .unified-score-table .sticky-lineup-banner,
body.theme-default .unified-score-table .sticky-totals-label,
body.theme-default .unified-score-table .unified-totals-row td,
body.theme-default .full-width-pitch .pane-title,
body.theme-default .full-width-pitch .pitch-table th{background:var(--panel2)!important}
body.theme-default .unified-score-table td,
body.theme-default .full-width-pitch .pitch-table td{background:var(--panel)!important}

/* Bottom navigation is product chrome, not a theme canvas. Default has no blue/green/gold accent. */
body.theme-default .v92-action-bar{background:color-mix(in srgb,var(--ui-surface) 98%,transparent)!important;border-color:var(--ui-line)!important}
body.theme-default .v92-action-bar button span{color:var(--ui-text)!important}
body.theme-default .v92-action-bar #mobileSave span{color:var(--ui-text)!important}
body.theme-default .v92-action-bar .score-command{
  background:var(--ui-surface-2)!important;border-color:var(--ui-line)!important;box-shadow:0 3px 12px rgba(0,0,0,.10)!important;
}
body.theme-default .v92-action-bar .score-command span{color:var(--ui-text)!important}
body.theme-default .v92-action-bar button.is-active:not(.score-command) span,
body.theme-default .v92-action-bar button.is-active:not(.score-command) small{color:var(--ui-text)!important}
body.theme-default .v92-action-bar #mobileSave.just-saved{background:var(--ui-surface-2)!important}
body.theme-default .v92-action-bar #mobileSave.just-saved small{color:var(--ui-text)!important}

/* 2) Appearance is system UI. It NEVER inherits Wrigley / Playoff / Generic styling. */
body .modal-card.v92-theme-card,body.theme-default .modal-card.v92-theme-card,body.theme-generic .modal-card.v92-theme-card,body.theme-postseason .modal-card.v92-theme-card{
  --panel:var(--ui-surface)!important;--panel2:var(--ui-surface-2)!important;--line:var(--ui-line)!important;
  --text:var(--ui-text)!important;--muted:var(--ui-muted)!important;--accent:var(--ui-text)!important;--selected:var(--ui-surface-2)!important;
  background:var(--ui-surface)!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.30)!important;filter:none!important;font-family:Arial,Helvetica,sans-serif!important;
}
body .v92-theme-card *,body.theme-postseason .v92-theme-card *{font-family:Arial,Helvetica,sans-serif!important;filter:none!important}
body .v92-theme-card .modal-head{border-color:var(--ui-line)!important;background:transparent!important;color:var(--ui-text)!important}
body .v92-theme-card .modal-head strong{color:var(--ui-text)!important}
body .v92-theme-card .modal-head small{color:var(--ui-muted)!important}
body .v92-theme-card .modal-head>button{background:var(--ui-surface-2)!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important}
body .v92-theme-list{display:grid!important;gap:10px!important;background:transparent!important}
.v92-theme-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:2px 0 0}
body .v92-theme-tabs>.theme-choice{
  min-width:0!important;min-height:76px!important;margin:0!important;padding:8px 3px!important;display:grid!important;
  grid-template-columns:1fr!important;grid-template-rows:30px auto!important;place-items:center!important;gap:5px!important;
  border:1px solid var(--ui-line)!important;border-radius:10px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;
  box-shadow:none!important;text-align:center!important;
}
body .v92-theme-tabs>.theme-choice>span:nth-child(2){display:grid!important;gap:1px!important;justify-items:center!important;min-width:0!important}
body .v92-theme-tabs>.theme-choice strong{font-size:10px!important;line-height:1.1!important;color:var(--ui-text)!important;white-space:nowrap!important}
body .v92-theme-tabs>.theme-choice small{font-size:7px!important;line-height:1.1!important;color:var(--ui-muted)!important;white-space:nowrap!important}
body .v92-theme-tabs>.theme-choice .theme-check{display:none!important}
body .v92-theme-tabs>.theme-choice .theme-swatch{width:28px!important;height:28px!important;border-radius:8px!important;box-shadow:none!important}
body .v92-theme-tabs>.theme-choice.active{
  background:var(--ui-surface-2)!important;color:var(--ui-text)!important;border-color:var(--ui-text)!important;
  box-shadow:inset 0 -3px 0 var(--ui-text)!important;
}
body .v92-theme-options{display:grid;gap:0}
body .v92-theme-options .theme-sub{
  margin:0!important;padding:10px!important;border:1px solid var(--ui-line)!important;border-left:1px solid var(--ui-line)!important;
  border-radius:10px!important;background:var(--ui-surface-2)!important;color:var(--ui-text)!important;
}
body .v92-theme-options .theme-sub label{color:var(--ui-muted)!important;font-size:8px!important;letter-spacing:.10em!important}
body .v92-theme-options .theme-sub select{
  min-height:42px!important;margin-top:5px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;border-radius:9px!important;
}
.v92-theme-note{margin:0;padding:9px 2px 0;color:var(--ui-muted);font-size:8px;line-height:1.45}
.v92-theme-note b{color:var(--ui-text)}
body.dark-mode .v92-theme-card{color-scheme:dark}

/* 3) True Dark Mode: no legacy whole-section dimming or tint filters. */
body.dark-mode .app-shell,body.dark-mode .topbar,body.dark-mode .card,body.dark-mode .modal-card,
body.dark-mode .team-left-stack,body.dark-mode .lineup-pane,body.dark-mode .pitch-pane,body.dark-mode .scoring-pane,
body.dark-mode .game-info,body.dark-mode .matchup-selector,body.dark-mode .standings-overview,body.dark-mode .team-scorebook{filter:none!important}
body.theme-postseason.dark-mode .card{filter:none!important}



body.theme-postseason.dark-mode .game-field,
body.theme-postseason.dark-mode .matchup-team,
body.theme-postseason.dark-mode .overview-title,
body.theme-postseason.dark-mode .standings-card,
body.theme-postseason.dark-mode .team-scorebook-head,
body.theme-postseason.dark-mode .team-scorebook-body,
body.theme-postseason.dark-mode .team-left-stack,
body.theme-postseason.dark-mode .lineup-pane,
body.theme-postseason.dark-mode .pitch-pane,
body.theme-postseason.dark-mode .scoring-pane,
body.theme-postseason.dark-mode .unified-score-table th,
body.theme-postseason.dark-mode .unified-score-table td,
body.theme-postseason.dark-mode .pitch-table th,
body.theme-postseason.dark-mode .pitch-table td,
body.theme-postseason.dark-mode .standings-grid>div{
  background:#212121!important;color:#f5f5f5!important;border-color:#484848!important;filter:none!important;
}
body.theme-postseason.dark-mode .unified-score-table thead th,
body.theme-postseason.dark-mode .unified-score-table .sticky-lineup-banner,
body.theme-postseason.dark-mode .unified-score-table .sticky-totals-label,
body.theme-postseason.dark-mode .unified-score-table .unified-totals-row td,
body.theme-postseason.dark-mode .pane-title,
body.theme-postseason.dark-mode .standings-grid .head{background:#292929!important;color:#f5f5f5!important}

/* Keep the centered v91 Score geometry unchanged in this focused release. */
.v92-action-bar .score-command{transform:none!important;margin-top:0!important;align-self:center!important}

@media(max-width:420px){
  .v92-theme-tabs{gap:4px}
  body .v92-theme-tabs>.theme-choice{min-height:72px!important;padding:7px 2px!important}
  body .v92-theme-tabs>.theme-choice strong{font-size:9px!important}
  body .v92-theme-tabs>.theme-choice small{font-size:6.5px!important}
  body .v92-theme-tabs>.theme-choice .theme-swatch{width:26px!important;height:26px!important}
}

/* ==========================================================
   v93 — UNIFIED CONTRAST SYSTEM + SYSTEM-CHROME ISOLATION
   One invariant governs score notation:
     light score surface -> dark neutral marks
     dark score surface  -> light neutral marks
   Semantic colors remain fixed: red outs, green runs/RBI.
   ========================================================== */

/* Live contrast tokens. Default/Generic use neutral light score surfaces in Light Mode. */
body.theme-default:not(.dark-mode),
body.theme-generic:not(.dark-mode){
  --score-contrast-mark:#111111;
  --score-contrast-note:#111111;
  --score-contrast-outline:#ffffff;
}
/* Wrigley and Playoff score grids are intrinsically dark even when Light Mode is selected. */
body.theme-postseason:not(.dark-mode){
  --score-contrast-mark:#f7f7f5;
  --score-contrast-note:#f7f7f5;
  --score-contrast-outline:#0b0b0b;
}
/* Dark Mode wins over every theme. */
body.dark-mode{
  --score-contrast-mark:#f7f7f7;
  --score-contrast-note:#f7f7f7;
  --score-contrast-outline:#080808;
}

/* Neutral paths/labels always consume the live contrast token. */
body .play-entry .base.origin,
body .play-entry .base.advance{
  stroke:var(--score-contrast-mark)!important;
  filter:none!important;
}
body .play-entry .advance-reason-label{
  fill:var(--score-contrast-note)!important;
  stroke:var(--score-contrast-outline)!important;
  paint-order:stroke fill!important;
}
body .play-entry:not(.out) .play-code,
body .play-entry.runner-out .play-code{
  color:var(--score-contrast-mark)!important;
  text-shadow:none!important;
}
body .play-entry.out:not(.runner-out) .play-code,
body .standalone-out{
  color:var(--score-out,#d94a43)!important;
}
body .event-marker{
  color:var(--score-contrast-mark)!important;
  background:color-mix(in srgb,var(--score-contrast-mark) 11%,transparent)!important;
  border-color:color-mix(in srgb,var(--score-contrast-mark) 22%,transparent)!important;
}
/* Semantic baseball colors are deliberately mode-independent. */
body .play-entry .runner-out-path,
body .play-entry .runner-out-mark{stroke:var(--score-out,#d94a43)!important}
body .play-entry .runner-out-label{fill:var(--score-out,#d94a43)!important;stroke:#fff!important}
body .play-entry.scored .diamond-fill{fill:var(--score-run,#45bb69)!important}
body .rbi-code{color:var(--score-run,#45bb69)!important}

/* Product chrome is system UI, never a theme canvas. This fixes Wrigley/Playoff
   making More and the bottom navigation unreadable. */
body .v92-action-bar,body.theme-default .v92-action-bar,body.theme-generic .v92-action-bar,body.theme-postseason .v92-action-bar{
  background:color-mix(in srgb,var(--ui-surface) 98%,transparent)!important;
  border-color:var(--ui-line)!important;
  color:var(--ui-text)!important;
  filter:none!important;
}
body .v92-action-bar button,body .v92-action-bar button span,body.theme-postseason .v92-action-bar button,body.theme-postseason .v92-action-bar button span{
  color:var(--ui-text)!important;
  background:transparent!important;
}
body .v92-action-bar button small,body.theme-postseason .v92-action-bar button small{color:var(--ui-muted)!important}
body .v92-action-bar .score-command,body.theme-postseason .v92-action-bar .score-command{
  background:var(--ui-surface-2)!important;
  border-color:var(--ui-line)!important;
  box-shadow:0 3px 12px rgba(0,0,0,.12)!important;
}
body .v92-action-bar .score-command span,
body .v92-action-bar #mobileSave span{color:var(--ui-text)!important}
body .v92-action-bar button.is-active:not(.score-command){background:var(--ui-surface-2)!important}
body .v92-action-bar button.is-active:not(.score-command) span,
body .v92-action-bar button.is-active:not(.score-command) small{color:var(--ui-text)!important}

body .v90-more-sheet,body.theme-default .v90-more-sheet,body.theme-generic .v90-more-sheet,body.theme-postseason .v90-more-sheet{
  --panel:var(--ui-surface)!important;
  --panel2:var(--ui-surface-2)!important;
  --line:var(--ui-line)!important;
  --text:var(--ui-text)!important;
  --muted:var(--ui-muted)!important;
  --accent:var(--ui-text)!important;
  background:var(--ui-surface)!important;
  color:var(--ui-text)!important;
  border-color:var(--ui-line)!important;
  filter:none!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
body .v90-more-sheet *,body.theme-postseason .v90-more-sheet *{font-family:Arial,Helvetica,sans-serif!important;filter:none!important}
body .v90-more-sheet .drawer-head strong,
body .v90-more-sheet .drawer-current strong,
body .v90-more-sheet .menu-copy strong{color:var(--ui-text)!important}
body .v90-more-sheet .drawer-head small,
body .v90-more-sheet .drawer-current span,
body .v90-more-sheet .drawer-current small,
body .v90-more-sheet .drawer-label,
body .v90-more-sheet .menu-copy small,
body .v90-more-sheet .menu-trailing,
body .v90-more-sheet .menu-value{color:var(--ui-muted)!important}
body .v90-more-sheet .drawer-current,
body .v90-more-sheet .menu-glyph,
body .v90-more-sheet .drawer-head>button{
  background:var(--ui-surface-2)!important;
  border-color:var(--ui-line)!important;
  color:var(--ui-text)!important;
}
body .v90-more-sheet .menu-row,
body .v90-more-sheet .drawer-nav,
body .v90-more-sheet .drawer-tools>button{
  background:transparent!important;
  color:var(--ui-text)!important;
  border-color:transparent!important;
}
body .v90-more-sheet .menu-row:active,
body .v90-more-sheet .drawer-nav.active{background:var(--ui-surface-2)!important}

/* A true Dark Mode uses neutral dark surfaces across every theme. Theme identity
   remains in accents/borders/decorative imagery, never in the base surface color. */
body.dark-mode.theme-postseason{
  --bg:#171717!important;--panel:#212121!important;--panel2:#292929!important;
  --line:#484848!important;--text:#f5f5f5!important;--muted:#b4b4b4!important;
  --score-grid-bg:#181818!important;--score-grid-sticky:#202020!important;
  --score-grid-head:#292929!important;--score-grid-line:#4a4a4a!important;
  background:#171717!important;
}
body.dark-mode.theme-postseason .app-shell{background:#171717!important}
body.dark-mode.theme-postseason .game-field,body.dark-mode.theme-postseason .matchup-team,body.dark-mode.theme-postseason .overview-title,body.dark-mode.theme-postseason .standings-card,body.dark-mode.theme-postseason .team-scorebook-head,body.dark-mode.theme-postseason .team-scorebook-body,body.dark-mode.theme-postseason .team-scorebook-canvas,body.dark-mode.theme-postseason .team-left-stack,body.dark-mode.theme-postseason .lineup-pane,body.dark-mode.theme-postseason .pitch-pane,body.dark-mode.theme-postseason .scoring-pane,body.dark-mode.theme-postseason .unified-score-table th,body.dark-mode.theme-postseason .unified-score-table td,body.dark-mode.theme-postseason .pitch-table th,body.dark-mode.theme-postseason .pitch-table td,body.dark-mode.theme-postseason .standings-grid>div{
  background:#212121!important;
  color:#f5f5f5!important;
  border-color:#484848!important;
  filter:none!important;
}
body.dark-mode.theme-postseason .unified-score-table thead th,body.dark-mode.theme-postseason .unified-score-table .sticky-lineup-banner,body.dark-mode.theme-postseason .pane-title,body.dark-mode.theme-postseason .standings-grid .head{background:#292929!important;color:#f5f5f5!important}

/* ==========================================================
   v94 — CONTROL CONTRAST + WRIGLEY UI ISOLATION
   Interactive controls now follow the same contrast discipline as
   score notation: readable foreground is derived from the control surface,
   Dark Mode wins over theme styling, and system sheets stay neutral.
   ========================================================== */

/* APPLY PLAY — never allow dark-on-dark or light-on-light text. */
body.theme-default:not(.dark-mode) #playModal #applyPlayBtn:not(:disabled){
  background:#171717!important;color:#ffffff!important;border-color:#171717!important;opacity:1!important;
}
body.theme-generic:not(.dark-mode) #playModal #applyPlayBtn:not(:disabled){
  background:var(--accent)!important;color:#ffffff!important;border-color:var(--accent)!important;opacity:1!important;
}

body.theme-postseason:not(.dark-mode) #playModal #applyPlayBtn:not(:disabled){
  background:#10243a!important;color:#ffffff!important;border-color:var(--accent)!important;opacity:1!important;
}
/* True Dark Mode uses a high-contrast inverted primary action in every theme. */
body.dark-mode #playModal #applyPlayBtn:not(:disabled){
  background:#f5f5f5!important;color:#111111!important;border-color:#f5f5f5!important;opacity:1!important;
}
/* Disabled must still be readable. Do not communicate disabled state by
   making the label disappear into the button. */
body:not(.dark-mode) #playModal #applyPlayBtn:disabled{
  background:#e2e2e2!important;color:#707070!important;border-color:#c6c6c6!important;opacity:1!important;
}
body.dark-mode #playModal #applyPlayBtn:disabled{
  background:#343434!important;color:#b8b8b8!important;border-color:#505050!important;opacity:1!important;
}

/* Wrigley Light can keep ballpark character, but every editor label/control
   must remain high contrast against the dark-green scorebook surface. */




/* Wrigley Dark Mode: the editor is a true dark editor. Theme identity may
   survive in a restrained border/accent, never in low-contrast base surfaces. */









/* MORE is system UI. Beat legacy Wrigley #drawer selectors explicitly so
   Light Mode cannot render dark-green rows with dark text. */
body.theme-postseason #drawer.v90-more-sheet{
  background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;filter:none!important;
}
body.theme-postseason #drawer.v90-more-sheet .menu-row,body.theme-postseason #drawer.v90-more-sheet .drawer-nav,body.theme-postseason #drawer.v90-more-sheet .drawer-action,body.theme-postseason #drawer.v90-more-sheet .drawer-tools>button,body.theme-postseason #drawer.v90-more-sheet .import-button{
  background:transparent!important;color:var(--ui-text)!important;border-color:transparent!important;box-shadow:none!important;
}
body.theme-postseason #drawer.v90-more-sheet .menu-copy strong,body.theme-postseason #drawer.v90-more-sheet .drawer-head strong,body.theme-postseason #drawer.v90-more-sheet .drawer-current strong{
  color:var(--ui-text)!important;
}
body.theme-postseason #drawer.v90-more-sheet .menu-copy small,body.theme-postseason #drawer.v90-more-sheet .menu-value,body.theme-postseason #drawer.v90-more-sheet .menu-trailing,body.theme-postseason #drawer.v90-more-sheet .drawer-label{
  color:var(--ui-muted)!important;
}
body.theme-postseason #drawer.v90-more-sheet .menu-row:active,body.theme-postseason #drawer.v90-more-sheet .drawer-nav.active{
  background:var(--ui-surface-2)!important;color:var(--ui-text)!important;
}

/* ==========================================================
   v95 — NAVIGATION & LAYOUT FOUNDATION
   Home is a clear main menu; scorecard always has an explicit path Home.
   Concept A bottom command bar remains unchanged.
   ========================================================== */

.drawer-head-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.drawer-home-button{min-height:40px;padding:0 13px;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel2)!important;color:var(--text)!important;font-size:11px!important;font-weight:900!important;display:flex!important;align-items:center!important;gap:6px!important;box-shadow:none!important}
.drawer-home-button span{font-size:15px;line-height:1}
body.dark-mode .drawer-home-button{background:#2b2b2b!important;color:#f5f5f5!important;border-color:#505050!important}

/* Home information hierarchy: two primary destinations, then lightweight
   view/display controls. Dark Mode is never buried inside Appearance. */
.v95-home-actions{grid-area:actions;display:grid;gap:9px;animation:cardRise .8s .22s cubic-bezier(.2,.8,.2,1) both}
.v95-home-primary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.v95-home-primary button{min-height:86px;padding:13px 14px;border:1px solid var(--line);border-radius:17px;background:var(--panel);color:var(--text);text-align:left;display:flex;align-items:center;gap:12px;box-shadow:0 10px 24px rgba(0,0,0,.10)}
.v95-home-primary .launch-action-icon{flex:0 0 34px;margin:0}
.v95-home-primary strong,.v95-home-primary small{display:block}.v95-home-primary strong{font-size:12px}.v95-home-primary small{margin-top:4px;font-size:8px;color:var(--muted)}
.v95-home-secondary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.v95-home-secondary button{min-height:47px;padding:6px 8px;border:1px solid var(--line);border-radius:13px;background:var(--panel2);color:var(--text);display:flex;align-items:center;justify-content:center;gap:6px;font-size:9px;font-weight:900}
.v95-home-secondary button>span{font-size:13px;color:var(--accent)}
.v95-home-secondary button.is-on{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--text) 22%,transparent)}

/* A compact always-visible display control near the brand makes the current
   light/dark state obvious even before a game is opened. */
.v95-brand-row{position:relative;display:flex;justify-content:center;align-items:center;min-height:58px}
.v95-brand-row .launch-diamond{margin:0}
.v95-home-dark{position:absolute;right:0;top:50%;translate:0 -50%;min-height:42px;padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--text);display:grid;grid-template-columns:auto auto;grid-template-areas:"icon label" "icon state";align-items:center;column-gap:7px;text-align:left;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.v95-home-dark>span{grid-area:icon;font-size:17px}.v95-home-dark>b{grid-area:label;font-size:9px}.v95-home-dark>small{grid-area:state;font-size:7px;color:var(--muted)}
body.dark-mode .v95-home-dark{background:#282828;color:#f5f5f5;border-color:#505050}

@media(min-width:761px){
  .v95-home .launch-inner{grid-template-areas:"brand game" "actions game" "hub game" "footer footer";grid-template-rows:auto auto auto auto}
  .v95-home .launch-mode-hub{grid-area:hub}
}

@media(max-width:760px){
  body.home-page .v95-home .launch-inner{grid-template-areas:"brand" "game" "actions" "hub" "footer"!important;grid-template-rows:auto auto auto auto auto!important;gap:clamp(7px,1.05dvh,10px)!important}
  body.home-page .v95-home-actions{height:auto!important;min-height:0!important;gap:7px!important}
  body.home-page .v95-home-primary{gap:8px!important}
  body.home-page .v95-home-primary button{height:auto!important;min-height:66px!important;padding:9px 10px!important;border-radius:14px!important;gap:8px!important}
  body.home-page .v95-home-primary .launch-action-icon{width:28px!important;height:28px!important;flex-basis:28px!important;margin:0!important}
  body.home-page .v95-home-primary strong{font-size:10.5px!important}.v95-home-primary small{font-size:7px!important;margin-top:2px!important}
  body.home-page .v95-home-secondary{gap:6px!important}
  body.home-page .v95-home-secondary button{min-height:39px!important;border-radius:11px!important;font-size:8px!important;padding:4px 5px!important}
  body.home-page .v95-home-secondary button>span{font-size:11px!important}
  body.home-page .v95-brand-row{min-height:38px!important}
  body.home-page .v95-brand-row .launch-diamond{width:34px!important;height:34px!important}
  body.home-page .v95-home-dark{min-height:34px!important;padding:4px 8px!important;column-gap:5px!important}
  body.home-page .v95-home-dark>span{font-size:13px!important}.v95-home-dark>b{font-size:7.5px!important}.v95-home-dark>small{font-size:6px!important}
}

@media(max-width:370px){
  body.home-page .v95-home-dark b{display:none}.v95-home-dark{grid-template-columns:auto;grid-template-areas:"icon" "state";padding:4px 7px!important}
  body.home-page .v95-home-primary button{min-height:61px!important}
  body.home-page .v95-home-secondary button b{font-size:7px}
}

/* v95 direct Main Menu access without displacing Concept A bottom bar. */
.topbar .home-icon{display:none}
@media(max-width:760px){
  body:not(.home-page) .topbar{grid-template-columns:42px minmax(0,1fr) 42px!important}
  body:not(.home-page) .topbar #homeBtn{display:grid!important;grid-column:1!important;grid-row:1!important;place-items:center!important;justify-self:start!important;width:36px!important;height:36px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important;color:var(--text)!important;font-size:17px!important}
  body:not(.home-page) .topbar h1{grid-column:2!important;grid-row:1!important;justify-self:center!important}
  body:not(.home-page) .topbar .save-status{left:50%!important;translate:-50% 0!important}
}

.v95-home-secondary button{position:relative}
.v95-home-secondary button small{font-size:6.5px;color:var(--muted);font-weight:800;margin-left:1px}
@media(max-width:760px){
  body.home-page .v95-home-secondary button{display:grid!important;grid-template-columns:auto auto;grid-template-areas:"icon label" "icon state";column-gap:5px!important;place-content:center!important}
  body.home-page .v95-home-secondary button>span{grid-area:icon!important}
  body.home-page .v95-home-secondary button>b{grid-area:label!important;font-size:7.5px!important}
  body.home-page .v95-home-secondary button>small{grid-area:state!important;font-size:5.8px!important;line-height:1!important}
  body.home-page .v95-home-secondary button:not([data-home-action="dark"]){grid-template-areas:"icon label";grid-template-rows:auto!important}
}

/* ========================================================================
   v96 — Premium Scorebook visual layer
   Scope: actual v95 Scorecard + Play Editor structure is preserved.
   Default theme establishes the new clean Scorebook design system.
   Specialized Wrigley / Playoff identities remain isolated.
   ======================================================================== */

body.theme-default{
  --bg:#f7f8fa;
  --panel:#ffffff;
  --panel2:#f8fafc;
  --line:#dfe4ea;
  --text:#101828;
  --muted:#667085;
  --accent:#0b55b5;
  --selected:#eef5ff;
  --radius:18px;
  --v96-blue:#0b55b5;
  --v96-blue-strong:#084795;
  --v96-blue-soft:#eef5ff;
  --v96-card-shadow:0 5px 18px rgba(15,23,42,.055);
  background:#f7f8fa;
}
body.theme-default .app-shell{background:#f7f8fa}
body.theme-default main{max-width:1180px;padding-top:12px}
body.theme-default .card{
  background:#fff;
  border-color:#dfe4ea;
  border-radius:18px;
  box-shadow:var(--v96-card-shadow);
}

/* Scorecard app header — Scorebook is the hub; Scorecard remains the live workspace. */
body.theme-default:not(.home-page) .topbar{
  background:rgba(255,255,255,.96)!important;
  color:#101828!important;
  border-bottom:1px solid #e6e9ee!important;
  box-shadow:0 1px 0 rgba(15,23,42,.02)!important;
  backdrop-filter:saturate(135%) blur(12px);
}
body.theme-default:not(.home-page) .topbar h1{
  color:#0f172a!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-weight:800!important;
  letter-spacing:-.025em!important;
}
body.theme-default:not(.home-page) .topbar #homeBtn{
  border-color:#dfe4ea!important;
  background:#fff!important;
  color:#0b55b5!important;
  box-shadow:0 2px 8px rgba(15,23,42,.04)!important;
}
body.theme-default:not(.home-page) .save-status{
  color:#0b55b5!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
}

/* Top game information stays exactly where v95 placed it, but with calmer hierarchy. */
body.theme-default .game-info{
  border-color:#dfe4ea!important;
  background:#fff!important;
  box-shadow:var(--v96-card-shadow)!important;
}
body.theme-default .game-field{
  border-color:#edf0f3!important;
  padding-top:11px!important;
  padding-bottom:11px!important;
}
body.theme-default .game-info-icon{
  color:#0b55b5!important;
  background:#f3f7fc!important;
  border:1px solid #e0e9f5!important;
  border-radius:10px!important;
  font-size:17px!important;
}
body.theme-default .game-field label{
  color:#7b8492!important;
  letter-spacing:.12em!important;
}
body.theme-default .game-field input{
  color:#111827!important;
  font-weight:800!important;
}

/* Matchup and live status */
body.theme-default .matchup-selector{
  background:#fff!important;
  border-color:#dfe4ea!important;
  box-shadow:var(--v96-card-shadow)!important;
  padding:10px!important;
}
body.theme-default .matchup-label{color:#6b7280!important}
body.theme-default .matchup-team select{
  color:#111827!important;
  font-weight:850!important;
}
body.theme-default .versus-mark{
  color:#98a2b3!important;
  font-size:9px!important;
  letter-spacing:.12em!important;
}
body.theme-default .live-game-bar{
  background:linear-gradient(180deg,#ffffff,#fbfcfe)!important;
  border-color:#dce3eb!important;
  box-shadow:var(--v96-card-shadow)!important;
  min-height:84px;
}
body.theme-default .live-team strong{color:#0f172a!important}
body.theme-default .live-team span{color:#667085!important}
body.theme-default .live-inning>strong{
  color:#0b55b5!important;
  letter-spacing:.08em!important;
}
body.theme-default .live-inning small{color:#667085!important}
body.theme-default .live-batter b{color:#101828!important}
body.theme-default .live-out-dots i{
  background:#e5e7eb!important;
  border-color:#d5dae1!important;
}
body.theme-default .live-out-dots i.on{
  background:#d92d20!important;
  border-color:#d92d20!important;
}

/* Standings remain in their v95 location. */
body.theme-default .standings-overview{
  border-color:#dfe4ea!important;
  background:#fff!important;
  box-shadow:var(--v96-card-shadow)!important;
}
body.theme-default .overview-title,
body.theme-default .card-title{
  background:#fbfcfd!important;
  border-bottom-color:#e8ebef!important;
  color:#344054!important;
  letter-spacing:.09em!important;
}
body.theme-default .title-glyph{color:#0b55b5!important}
body.theme-default .section-collapse{
  color:#667085!important;
  border-color:#d8dde5!important;
  background:#fff!important;
}
body.theme-default .standings-head{
  background:#f8fafc!important;
  color:#667085!important;
  border-bottom-color:#e8ebef!important;
}
body.theme-default .refresh-mini{
  color:#0b55b5!important;
  border-color:#c7d7eb!important;
  background:#fff!important;
}
body.theme-default .standings-grid>div{
  background:#fff!important;
  color:#344054!important;
  border-color:#edf0f3!important;
}
body.theme-default .standings-grid .head{
  background:#f8fafc!important;
  color:#7b8492!important;
}
body.theme-default .standings-selected{
  background:#eef5ff!important;
  color:#0b55b5!important;
  font-weight:800!important;
}
body.theme-default .standings-foot{color:#98a2b3!important;background:#fbfcfd!important}

/* Team scorebook — same markup, same horizontal score grid, upgraded visual hierarchy. */
body.theme-default .team-scorebook{
  border-color:#dbe1e8!important;
  background:#fff!important;
  box-shadow:0 7px 24px rgba(15,23,42,.06)!important;
  margin-bottom:14px!important;
}
body.theme-default .team-scorebook-head{
  background:#fbfcfd!important;
  border-bottom:1px solid #e8ebef!important;
  min-height:52px!important;
}
body.theme-default .team-header-name{
  color:#101828!important;
  font-size:12px!important;
  letter-spacing:.035em!important;
}
body.theme-default .team-scorebook-scroll{
  background:#fff!important;
  scrollbar-color:#c7d2df #f5f7fa;
}
body.theme-default .unified-score-table{
  background:#fff!important;
  color:#101828!important;
}
body.theme-default .unified-score-table th,
body.theme-default .unified-score-table td{
  border-color:#e7ebf0!important;
}
body.theme-default .unified-score-table thead th{
  background:#f8fafc!important;
  color:#667085!important;
}
body.theme-default .unified-score-table .sticky-lineup-banner{
  color:#344054!important;
  background:#f6f8fb!important;
  letter-spacing:.08em!important;
}
body.theme-default .unified-score-table .sticky-ord,
body.theme-default .unified-score-table .sticky-player,
body.theme-default .unified-score-table .sticky-pos{
  background:#fff!important;
  color:#344054!important;
}
body.theme-default .unified-score-table .batter-row.current-batter .sticky-ord,
body.theme-default .unified-score-table .batter-row.current-batter .sticky-player,
body.theme-default .unified-score-table .batter-row.current-batter .sticky-pos{
  background:#eef5ff!important;
}
body.theme-default .unified-score-table .batter-row.current-batter .sticky-ord{
  color:#0b55b5!important;
  box-shadow:inset 3px 0 0 #0b55b5!important;
}
body.theme-default .unified-score-table .active-inning-col{
  color:#0b55b5!important;
  background:#edf4ff!important;
}
body.theme-default .player-main{color:#101828!important;font-weight:850!important}
body.theme-default .player-subs{color:#667085!important}
body.theme-default .pos-cell{color:#667085!important}
body.theme-default .stat-cell{background:#fbfcfd!important;color:#344054!important}

/* Defense is still directly underneath the lineup in Advanced / Pitch-by-Pitch. */
body.theme-default .team-defense-pane{
  margin:10px!important;
  border:1px solid #dfe5ec!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(15,23,42,.035)!important;
}
body.theme-default .team-defense-pane .pane-title,
body.theme-default .defense-pane-title{
  background:#fbfcfd!important;
  color:#344054!important;
  border-bottom:1px solid #e8ebef!important;
}
body.theme-default .defense-pane-title small{color:#0b55b5!important}
body.theme-default .team-defense-field{
  background:linear-gradient(180deg,#f5f8f5,#eef4ee)!important;
}
body.theme-default .team-defense-grass{opacity:.54!important}
body.theme-default .team-defense-pos{
  border-color:#cbd5df!important;
  background:rgba(255,255,255,.94)!important;
  color:#344054!important;
  box-shadow:0 2px 8px rgba(15,23,42,.08)!important;
}
body.theme-default .team-defense-pos.is-filled{
  border-color:#9bb8dc!important;
  box-shadow:0 0 0 2px rgba(11,85,181,.08),0 3px 10px rgba(15,23,42,.08)!important;
}
body.theme-default .team-defense-pos span{color:#0b55b5!important}
body.theme-default .team-defense-pos small{color:#667085!important}
body.theme-default .team-defense-foot{
  color:#667085!important;
  background:#fbfcfd!important;
  border-top-color:#e8ebef!important;
}

/* Pitching remains full width below defense/lineup. */
body.theme-default .full-width-pitch{
  margin:10px!important;
  border:1px solid #dfe5ec!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:#fff!important;
}
body.theme-default .full-width-pitch .pane-title{
  background:#fbfcfd!important;
  color:#344054!important;
  border-bottom:1px solid #e8ebef!important;
}
body.theme-default .add-pitcher-btn{
  border-color:#c9d7e8!important;
  background:#fff!important;
  color:#0b55b5!important;
}
body.theme-default .pitch-table th{
  background:#f8fafc!important;
  color:#667085!important;
  border-color:#e7ebf0!important;
}
body.theme-default .pitch-table td{
  background:#fff!important;
  border-color:#e7ebf0!important;
}
body.theme-default .pitch-table input{
  background:#fff!important;
  color:#101828!important;
}

/* ------------------------------------------------------------------------
   v96 Play Editor: same v95 controls + scoring logic; premium visual layer.
   ------------------------------------------------------------------------ */
body.theme-default #playModal{
  background:rgba(15,23,42,.46)!important;
  backdrop-filter:blur(3px);
}
body.theme-default #playModal .play-card{
  border:1px solid #d9e0e8!important;
  border-radius:24px!important;
  background:#fff!important;
  color:#101828!important;
  box-shadow:0 26px 70px rgba(15,23,42,.24)!important;
  padding:14px!important;
}
body.theme-default #playModal .modal-head{
  border-bottom:1px solid #e8ebef!important;
  padding:3px 2px 12px!important;
}
body.theme-default #playModal .modal-head strong{
  color:#101828!important;
  letter-spacing:.10em!important;
  font-size:12px!important;
}
body.theme-default #playModal .modal-head small{color:#667085!important}
body.theme-default #playModal .modal-head button{
  width:36px!important;
  height:36px!important;
  border:1px solid #e1e5ea!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  color:#475467!important;
  display:grid!important;
  place-items:center!important;
}
body.theme-default #playModal .situation{
  background:#f4f7fb!important;
  color:#344054!important;
  border:1px solid #e1e8f0!important;
  border-radius:14px!important;
  padding:10px 12px!important;
}
body.theme-default #playModal .editor-context-hint{
  background:#eef5ff!important;
  border:1px solid #d4e4f7!important;
  border-radius:14px!important;
  color:#344054!important;
}
body.theme-default #playModal .editor-context-hint>span{
  color:#0b55b5!important;
  background:#fff!important;
  border:1px solid #cdddf0!important;
}
body.theme-default #playModal .editor-section-title{
  color:#667085!important;
  border-bottom-color:#eef1f4!important;
  letter-spacing:.12em!important;
}
body.theme-default #playModal label{color:#667085!important}
body.theme-default #playModal .field-label,
body.theme-default #playModal .score-field-title{color:#667085!important}
body.theme-default #playModal input,
body.theme-default #playModal select{
  min-height:42px!important;
  border:1px solid #d8dee7!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#101828!important;
  box-shadow:inset 0 1px 1px rgba(15,23,42,.015)!important;
}
body.theme-default #playModal input:focus,
body.theme-default #playModal select:focus{
  border-color:#8db2de!important;
  box-shadow:0 0 0 3px rgba(11,85,181,.09)!important;
  outline:none!important;
}
body.theme-default #playModal .scoring-panel{
  gap:8px!important;
}
body.theme-default #playModal .score-field-card{
  background:#fbfcfd!important;
  border:1px solid #e2e7ed!important;
  border-radius:14px!important;
}
body.theme-default #playModal .score-field-card select{
  background:#fff!important;
}
body.theme-default #playModal .score-toggle-track{
  background:#d0d5dd!important;
}
body.theme-default #playModal .score-toggle-control input:checked + .score-toggle-copy + .score-toggle-track{
  background:#0b55b5!important;
}
body.theme-default #playModal .runner-out-fields,
body.theme-default #playModal .defense-field-card,
body.theme-default #playModal .official-error-card,
body.theme-default #playModal .advanced-runner-card,
body.theme-default #playModal .pitch-entry-card,
body.theme-default #playModal .pitch-sequence-card{
  background:#fbfcfd!important;
  border-color:#dfe5ec!important;
  border-radius:16px!important;
  box-shadow:none!important;
}
body.theme-default #playModal .field-card-head{
  border-bottom-color:#e8ebef!important;
}
body.theme-default #playModal .field-card-head strong,
body.theme-default #playModal .pitch-entry-card-head strong,
body.theme-default #playModal .pitch-sequence-head strong{color:#344054!important}
body.theme-default #playModal .field-card-head small,
body.theme-default #playModal .pitch-entry-card-head small,
body.theme-default #playModal .pitch-sequence-head small{color:#667085!important}
body.theme-default #playModal .fielder-grid button{
  border-color:#d6dde6!important;
  background:#fff!important;
  color:#344054!important;
  border-radius:12px!important;
}
body.theme-default #playModal .fielder-grid button.selected,
body.theme-default #playModal .fielder-grid button.is-selected{
  background:#eef5ff!important;
  border-color:#8eb3df!important;
  color:#0b55b5!important;
}
body.theme-default #playModal .fielder-selection{
  background:#fff!important;
  border-color:#e1e6ec!important;
  color:#667085!important;
}
body.theme-default #playModal .advanced-title b,
body.theme-default #playModal #editorModeBadge{
  color:#0b55b5!important;
  background:#eef5ff!important;
  border-color:#cddff4!important;
}
body.theme-default #playModal .modal-actions{
  position:sticky!important;
  bottom:-14px!important;
  margin:14px -14px -14px!important;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom))!important;
  background:rgba(255,255,255,.96)!important;
  border-top:1px solid #e7ebf0!important;
  backdrop-filter:blur(10px)!important;
  z-index:4!important;
}
body.theme-default #playModal .modal-actions button{
  min-height:44px!important;
  border-radius:12px!important;
  border-color:#d7dde5!important;
  background:#fff!important;
  color:#344054!important;
  font-weight:850!important;
}
body.theme-default #playModal #clearPlayBtn{color:#b42318!important}
body.theme-default #playModal #applyPlayBtn:not(:disabled){
  background:linear-gradient(180deg,#1265c6,#0b55b5)!important;
  border-color:#0b55b5!important;
  color:#fff!important;
  box-shadow:0 6px 14px rgba(11,85,181,.18)!important;
}
body.theme-default #playModal #applyPlayBtn:disabled{
  background:#e8edf3!important;
  border-color:#e0e5eb!important;
  color:#98a2b3!important;
  box-shadow:none!important;
}

/* Subtle, meaningful motion only. */
@keyframes v96SoftPulse{
  0%{box-shadow:0 0 0 0 rgba(11,85,181,.17)}
  70%{box-shadow:0 0 0 7px rgba(11,85,181,0)}
  100%{box-shadow:0 0 0 0 rgba(11,85,181,0)}
}
body.theme-default .score-target-pulse{animation:v96SoftPulse .52s ease-out!important}
body.theme-default button{transition:transform .11s ease,border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
body.theme-default button:active{transform:scale(.985)}

/* True neutral dark mode treatment for the new design. */
body.theme-default.dark-mode{
  --bg:#111214;
  --panel:#1a1b1e;
  --panel2:#202226;
  --line:#35383d;
  --text:#f5f6f7;
  --muted:#a6abb3;
  --accent:#6ba8ef;
  --selected:#1b3049;
  --v96-card-shadow:none;
  background:#111214!important;
}
body.theme-default.dark-mode .app-shell{background:#111214!important}
body.theme-default.dark-mode:not(.home-page) .topbar{
  background:rgba(20,21,24,.96)!important;
  color:#f5f6f7!important;
  border-bottom-color:#33363b!important;
}
body.theme-default.dark-mode:not(.home-page) .topbar h1{color:#f7f7f8!important}
body.theme-default.dark-mode:not(.home-page) .topbar #homeBtn{
  background:#1b1c1f!important;
  color:#8ab9ef!important;
  border-color:#383b40!important;
}
body.theme-default.dark-mode .card,
body.theme-default.dark-mode .game-info,
body.theme-default.dark-mode .matchup-selector,
body.theme-default.dark-mode .team-scorebook,
body.theme-default.dark-mode .team-defense-pane,
body.theme-default.dark-mode .full-width-pitch{
  background:#1a1b1e!important;
  border-color:#35383d!important;
  box-shadow:none!important;
}
body.theme-default.dark-mode .game-field,
body.theme-default.dark-mode .team-scorebook-head,
body.theme-default.dark-mode .overview-title,
body.theme-default.dark-mode .card-title,
body.theme-default.dark-mode .full-width-pitch .pane-title,
body.theme-default.dark-mode .defense-pane-title{
  border-color:#34373c!important;
}
body.theme-default.dark-mode .game-info-icon{background:#202a35!important;border-color:#304054!important;color:#7fb1ec!important}
body.theme-default.dark-mode .game-field input,
body.theme-default.dark-mode .matchup-team select,
body.theme-default.dark-mode .team-header-name,
body.theme-default.dark-mode .player-main{color:#f4f5f6!important}
body.theme-default.dark-mode .game-field label,
body.theme-default.dark-mode .matchup-label,
body.theme-default.dark-mode .live-team span,
body.theme-default.dark-mode .live-inning small{color:#a6abb3!important}
body.theme-default.dark-mode .live-game-bar{background:#1a1b1e!important;border-color:#35383d!important}
body.theme-default.dark-mode .live-team strong,
body.theme-default.dark-mode .live-batter b{color:#f5f6f7!important}
body.theme-default.dark-mode .overview-title,
body.theme-default.dark-mode .card-title,
body.theme-default.dark-mode .standings-head,
body.theme-default.dark-mode .standings-grid .head,
body.theme-default.dark-mode .team-scorebook-head,
body.theme-default.dark-mode .full-width-pitch .pane-title,
body.theme-default.dark-mode .defense-pane-title{
  background:#202226!important;
  color:#c9cdd2!important;
}
body.theme-default.dark-mode .standings-grid>div,
body.theme-default.dark-mode .unified-score-table,
body.theme-default.dark-mode .unified-score-table .sticky-ord,
body.theme-default.dark-mode .unified-score-table .sticky-player,
body.theme-default.dark-mode .unified-score-table .sticky-pos,
body.theme-default.dark-mode .pitch-table td,
body.theme-default.dark-mode .pitch-table input{
  background:#1a1b1e!important;
  color:#eef0f2!important;
  border-color:#34373c!important;
}
body.theme-default.dark-mode .unified-score-table thead th,
body.theme-default.dark-mode .pitch-table th,
body.theme-default.dark-mode .unified-score-table .sticky-lineup-banner,
body.theme-default.dark-mode .stat-cell{
  background:#202226!important;
  color:#aeb3ba!important;
  border-color:#34373c!important;
}
body.theme-default.dark-mode .unified-score-table .batter-row.current-batter .sticky-ord,
body.theme-default.dark-mode .unified-score-table .batter-row.current-batter .sticky-player,
body.theme-default.dark-mode .unified-score-table .batter-row.current-batter .sticky-pos{
  background:#1b3049!important;
}
body.theme-default.dark-mode .team-defense-field{background:linear-gradient(180deg,#182019,#141b15)!important}
body.theme-default.dark-mode .team-defense-pos{background:#24262a!important;border-color:#484c52!important;color:#eef0f2!important}
body.theme-default.dark-mode .team-defense-foot{background:#202226!important;color:#a6abb3!important;border-color:#34373c!important}
body.theme-default.dark-mode #playModal{background:rgba(0,0,0,.62)!important}
body.theme-default.dark-mode #playModal .play-card{
  background:#1b1c1f!important;
  color:#f5f6f7!important;
  border-color:#383b40!important;
}
body.theme-default.dark-mode #playModal .modal-head{border-color:#36393e!important}
body.theme-default.dark-mode #playModal .modal-head strong{color:#f5f6f7!important}
body.theme-default.dark-mode #playModal .modal-head small,
body.theme-default.dark-mode #playModal label,
body.theme-default.dark-mode #playModal .field-label,
body.theme-default.dark-mode #playModal .score-field-title{color:#aeb3ba!important}
body.theme-default.dark-mode #playModal .modal-head button,
body.theme-default.dark-mode #playModal input,
body.theme-default.dark-mode #playModal select,
body.theme-default.dark-mode #playModal .score-field-card,
body.theme-default.dark-mode #playModal .runner-out-fields,
body.theme-default.dark-mode #playModal .defense-field-card,
body.theme-default.dark-mode #playModal .official-error-card,
body.theme-default.dark-mode #playModal .advanced-runner-card,
body.theme-default.dark-mode #playModal .pitch-entry-card,
body.theme-default.dark-mode #playModal .pitch-sequence-card,
body.theme-default.dark-mode #playModal .fielder-grid button,
body.theme-default.dark-mode #playModal .fielder-selection{
  background:#222428!important;
  color:#eef0f2!important;
  border-color:#3b3e44!important;
}
body.theme-default.dark-mode #playModal .situation{background:#22262c!important;color:#d6dae0!important;border-color:#3a414b!important}
body.theme-default.dark-mode #playModal .editor-context-hint{background:#1c2b3c!important;border-color:#314863!important;color:#dce8f5!important}
body.theme-default.dark-mode #playModal .modal-actions{
  background:rgba(27,28,31,.97)!important;
  border-top-color:#36393e!important;
}
body.theme-default.dark-mode #playModal .modal-actions button{
  background:#24262a!important;
  color:#e7e9ec!important;
  border-color:#404349!important;
}
body.theme-default.dark-mode #playModal #applyPlayBtn:not(:disabled){
  background:#1b67be!important;
  color:#fff!important;
  border-color:#2a78cf!important;
}

/* Mobile preservation: maintain v95 geometry, improve touch/reading without reflowing the scorecard. */
@media(max-width:600px){
  body.theme-default main{padding:8px 7px calc(86px + env(safe-area-inset-bottom))!important}
  body.theme-default:not(.home-page) .topbar{min-height:calc(68px + env(safe-area-inset-top))!important}
  body.theme-default:not(.home-page) .topbar h1{font-size:23px!important}
  body.theme-default .game-field{padding:8px 7px!important}
  body.theme-default .game-info-icon{width:25px!important;height:25px!important;font-size:14px!important;border-radius:8px!important}
  body.theme-default .game-field label{font-size:5.8px!important}
  body.theme-default .game-field input{font-size:8.4px!important}
  body.theme-default .matchup-selector{padding:6px!important}
  body.theme-default .team-scorebook-head{min-height:45px!important}
  body.theme-default .team-header-name{font-size:9px!important}
  body.theme-default .team-defense-pane,
  body.theme-default .full-width-pitch{margin:7px!important;border-radius:14px!important}
  body.theme-default #playModal{padding:8px!important;align-items:end!important}
  body.theme-default #playModal .play-card{
    width:100%!important;
    max-width:100%!important;
    border-radius:22px 22px 12px 12px!important;
    padding:12px!important;
  }
  body.theme-default #playModal .form-grid.two.editor-grid{gap:7px!important}
  body.theme-default #playModal input,
  body.theme-default #playModal select{font-size:16px!important}
  body.theme-default #playModal .modal-actions{
    bottom:-12px!important;
    margin:12px -12px -12px!important;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.theme-default button,
  body.theme-default .score-target-pulse{transition:none!important;animation:none!important}
}

/* v96 specificity locks against earlier neutral-Default compatibility rules. */
body.theme-default:not(.dark-mode) .mode-workspace-tabs,
body.theme-default:not(.dark-mode) .workspace-tabs{
  background:#fff!important;
  border-color:#dfe4ea!important;
  box-shadow:0 2px 9px rgba(15,23,42,.035)!important;
}
body.theme-default:not(.dark-mode) .mode-workspace-tabs button span,
body.theme-default:not(.dark-mode) .workspace-tabs button span{color:#667085!important}
body.theme-default:not(.dark-mode) .mode-workspace-tabs button.active,
body.theme-default:not(.dark-mode) .workspace-tabs button.active,
body.theme-default:not(.dark-mode) .mode-workspace-tabs button[aria-current="page"],
body.theme-default:not(.dark-mode) .workspace-tabs button[aria-current="page"]{
  color:#0b55b5!important;
  background:#eef5ff!important;
  border-color:#c8d9ed!important;
  box-shadow:inset 0 -2px 0 #0b55b5!important;
}
body.theme-default:not(.dark-mode) .mode-workspace-tabs button.active span,
body.theme-default:not(.dark-mode) .workspace-tabs button.active span{color:#0b55b5!important}
body.theme-default:not(.dark-mode) .standings-grid>.standings-selected{
  background:#eef5ff!important;
  color:#0b55b5!important;
  border-top-color:#d6e4f4!important;
  border-bottom-color:#d6e4f4!important;
}
body.theme-default:not(.dark-mode) .standings-grid>.standings-selected-start{border-left-color:#0b55b5!important}
body.theme-default:not(.dark-mode) #playModal #applyPlayBtn:not(:disabled){
  background:linear-gradient(180deg,#1265c6,#0b55b5)!important;
  border-color:#0b55b5!important;
  color:#fff!important;
  box-shadow:0 6px 14px rgba(11,85,181,.18)!important;
}
body.theme-default.dark-mode #playModal #applyPlayBtn:not(:disabled){
  background:#1b67be!important;
  border-color:#2a78cf!important;
  color:#fff!important;
}

/* ========================================================================
   v97 — APPROVED PREMIUM HOME + SCORECARD VISUAL CONVERSION
   Keeps v95/v96 scoring and data structure; replaces the Home visual layer
   and tightens the real Scorecard presentation to match the approved concept.
   ======================================================================== */

/* ---------- Home / Scorebook hub ---------- */
body.home-page.theme-default{
  background:#f7f8fa!important;
  --v97-blue:#0758bd;
  --v97-blue-deep:#064b9f;
  --v97-soft:#f5f8fc;
  --v97-line:#dfe5ec;
  --v97-text:#0d1728;
  --v97-muted:#687386;
}
body.home-page.theme-default .app-shell{background:#f7f8fa!important}
body.home-page.theme-default .topbar,
body.home-page.theme-default .mobile-action-bar{display:none!important}
body.home-page.theme-default main{padding:0!important;max-width:none!important;width:100%!important}
body.home-page.theme-default .v97-home{
  min-height:100dvh;
  background:
    radial-gradient(circle at 50% -15%,rgba(255,255,255,.98),rgba(255,255,255,.72) 34%,transparent 58%),
    linear-gradient(180deg,#fafbfd 0%,#f6f8fb 100%);
  color:var(--v97-text);
}
body.home-page.theme-default .v97-home-inner{
  width:min(100%,520px);
  margin:0 auto;
  padding:calc(20px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom));
  display:grid;
  gap:14px;
}
body.home-page.theme-default .v97-home-brand{text-align:center;position:relative;padding-top:2px}
body.home-page.theme-default .v97-brand-row{height:43px;display:flex;align-items:center;justify-content:center;position:relative}
body.home-page.theme-default .v97-brand-mark{
  width:34px;height:34px;border:2px solid var(--v97-blue);border-radius:50%;position:relative;display:inline-block;background:#fff;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
}
body.home-page.theme-default .v97-brand-mark:before,
body.home-page.theme-default .v97-brand-mark:after{
  content:"";position:absolute;top:6px;bottom:6px;width:8px;border:1.5px solid var(--v97-blue);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;
}
body.home-page.theme-default .v97-brand-mark:before{left:5px;transform:rotate(-9deg)}
body.home-page.theme-default .v97-brand-mark:after{right:5px;transform:rotate(9deg)}
body.home-page.theme-default .v97-settings-button{
  position:absolute;right:0;top:2px;width:40px;height:40px;border:1px solid var(--v97-line);border-radius:12px;background:#fff;color:#667085;font-size:16px;
  box-shadow:0 2px 9px rgba(15,23,42,.035);
}
body.home-page.theme-default .v97-home-brand h1{
  margin:8px 0 3px;font-family:Georgia,"Times New Roman",serif;font-size:47px;line-height:.94;letter-spacing:-.045em;font-weight:800;color:#0c1524;
}
body.home-page.theme-default .v97-home-brand>p{margin:0;font-size:9px;font-weight:800;letter-spacing:.28em;color:#6c7586}
body.home-page.theme-default .v97-save-line{margin-top:13px;display:flex;align-items:center;justify-content:center;gap:8px;color:#697386;font-size:9px}
body.home-page.theme-default .v97-save-line>span{width:20px;height:20px;display:grid;place-items:center;border:1px solid #bcd0e8;border-radius:50%;color:var(--v97-blue);font-size:10px;background:#f7fbff}
body.home-page.theme-default .v97-save-line b{font-weight:700}
body.home-page.theme-default .v97-save-line i{width:3px;height:3px;border-radius:50%;background:#98a2b3}
body.home-page.theme-default .v97-save-line small{font-size:9px;color:#7c8492}

body.home-page.theme-default .v97-current-game{
  background:#fff;border:1px solid var(--v97-line);border-radius:20px;box-shadow:0 10px 26px rgba(15,23,42,.055);overflow:hidden;
}
body.home-page.theme-default .v97-current-head{min-height:50px;padding:0 18px;display:flex;align-items:center;justify-content:space-between}
body.home-page.theme-default .v97-current-head>span{display:flex;align-items:center;gap:9px;font-size:10px;letter-spacing:.14em;font-weight:900;color:#1f2937}
body.home-page.theme-default .v97-current-head>span i{width:8px;height:8px;border-radius:50%;background:#0871ee;box-shadow:0 0 0 4px rgba(8,113,238,.08)}
body.home-page.theme-default .v97-current-head em{font-style:normal;border:1px solid #bdd0e8;border-radius:999px;padding:5px 10px;font-size:8px;font-weight:900;letter-spacing:.08em;color:#1f5a9f;background:#f8fbff}
body.home-page.theme-default .v97-current-matchup{display:grid;grid-template-columns:1fr 1.05fr 1fr;align-items:center;padding:3px 12px 12px}
body.home-page.theme-default .v97-current-team{text-align:center;min-width:0;padding:0 8px}
body.home-page.theme-default .v97-current-team:first-child{border-right:1px solid #edf0f4}
body.home-page.theme-default .v97-current-team.right{border-left:1px solid #edf0f4}
body.home-page.theme-default .v97-current-team img{width:58px;height:58px;object-fit:contain;display:block;margin:0 auto 6px}
body.home-page.theme-default .v97-current-team strong{display:block;font-size:17px;line-height:1;font-weight:900;color:#131d2c}
body.home-page.theme-default .v97-current-team small{display:block;margin-top:6px;font-size:8px;color:#727b8a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.home-page.theme-default .v97-current-score{text-align:center;min-width:0}
body.home-page.theme-default .v97-current-score>strong{display:flex;justify-content:center;align-items:center;gap:9px;font-family:Georgia,"Times New Roman",serif;font-size:31px;line-height:1;font-weight:800;color:#101828;letter-spacing:-.04em}
body.home-page.theme-default .v97-current-score>strong span{font-family:system-ui,sans-serif;font-size:20px;font-weight:500;color:#4d5767}
body.home-page.theme-default .v97-current-score>b{display:block;margin-top:8px;font-size:9px;letter-spacing:.12em;color:var(--v97-blue);font-weight:900}
body.home-page.theme-default .v97-base-state{margin:10px auto 0;width:48px;height:26px;position:relative}
body.home-page.theme-default .v97-base-state>i,
body.home-page.theme-default .v97-base-state>span i{position:absolute;width:13px;height:13px;background:#e4e7ec;transform:rotate(45deg);border-radius:1px}
body.home-page.theme-default .v97-base-state>i{left:18px;top:0}
body.home-page.theme-default .v97-base-state>span i:first-child{left:5px;top:12px}
body.home-page.theme-default .v97-base-state>span i:last-child{right:5px;top:12px}
body.home-page.theme-default .v97-base-state i.on{background:var(--v97-blue)}
body.home-page.theme-default .v97-game-row{width:calc(100% - 30px);margin:0 15px;border:0;border-top:1px solid #edf0f3;min-height:51px;background:#fff;color:#202939;display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:9px;text-align:left;padding:0 3px;font-size:10px}
body.home-page.theme-default .v97-game-row>span{color:#667085;font-size:15px}
body.home-page.theme-default .v97-game-row>b{font-size:10px}
body.home-page.theme-default .v97-game-row>small{font-size:7.5px;color:#98a2b3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.home-page.theme-default .v97-game-row>em{font-style:normal;font-size:24px;font-weight:300;color:#667085}

body.home-page.theme-default .v97-game-center{display:grid;gap:7px}
body.home-page.theme-default .v97-section-label{padding-left:8px;font-size:10px;letter-spacing:.16em;color:#6a7485}
body.home-page.theme-default .v97-home-tabs{height:54px;border:1px solid var(--v97-line);border-radius:14px;background:#fff;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;overflow:hidden;box-shadow:0 3px 12px rgba(15,23,42,.025)}
body.home-page.theme-default .v97-home-tabs button{border:0;border-right:1px solid #e8ecf1;background:#fff;color:#202939;display:flex;align-items:center;justify-content:center;gap:8px;font-size:10px;font-weight:800;position:relative}
body.home-page.theme-default .v97-home-tabs button:last-child{border-right:0}
body.home-page.theme-default .v97-home-tabs button span{font-size:15px;color:#475467}
body.home-page.theme-default .v97-home-tabs button.active{color:var(--v97-blue);background:#fbfdff}
body.home-page.theme-default .v97-home-tabs button.active span{color:var(--v97-blue)}
body.home-page.theme-default .v97-home-tabs button.active:after{content:"";position:absolute;left:15%;right:15%;bottom:0;height:2px;border-radius:2px;background:var(--v97-blue)}
body.home-page.theme-default .v97-continue{min-height:61px;border:0;border-radius:15px;background:linear-gradient(180deg,#0a61c8 0%,#0758bd 100%);box-shadow:0 9px 20px rgba(7,88,189,.19);color:white;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;padding:0 18px;text-align:left}
body.home-page.theme-default .v97-continue span{font-size:18px}.v97-continue b{font-size:14px}.v97-continue em{font-style:normal;font-size:26px;font-weight:300}

body.home-page.theme-default .v97-home-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.home-page.theme-default .v97-home-actions button{min-height:83px;border:1px solid var(--v97-line);border-radius:17px;background:#fff;color:#172132;box-shadow:0 5px 16px rgba(15,23,42,.04);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 13px;text-align:left}
body.home-page.theme-default .v97-action-icon{width:38px;height:38px;border:1.5px solid var(--v97-blue);border-radius:50%;display:grid;place-items:center;color:var(--v97-blue);font-size:21px;line-height:1;background:#fff}
body.home-page.theme-default .v97-home-actions button>span:nth-child(2){min-width:0}
body.home-page.theme-default .v97-home-actions b{display:block;font-size:11px;white-space:nowrap}
body.home-page.theme-default .v97-home-actions small{display:block;margin-top:4px;font-size:7.5px;color:#7b8492;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.home-page.theme-default .v97-home-actions em{font-style:normal;color:#7b8492;font-size:19px;font-weight:300}
body.home-page.theme-default .v97-home-actions button.is-on .v97-action-icon{background:#edf5ff}
body.home-page.theme-default .v97-home-footer{min-height:58px;border-top:1px solid #e4e8ee;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 7px 0;color:#6c7585}
body.home-page.theme-default .v97-home-footer>span{font-size:18px;color:var(--v97-blue)}
body.home-page.theme-default .v97-home-footer p{margin:0;font-size:9px;line-height:1.55}.v97-home-footer p b{color:#525c6d}.v97-home-footer>small{font-size:7px;color:#a1a8b2}
body.home-page.theme-default .v97-postgame{border-radius:15px!important;box-shadow:none!important}

@media(max-width:430px){
  body.home-page.theme-default .v97-home-inner{padding-left:16px;padding-right:16px;gap:11px}
  body.home-page.theme-default .v97-home-brand h1{font-size:42px}
  body.home-page.theme-default .v97-current-head{min-height:43px;padding:0 14px}
  body.home-page.theme-default .v97-current-team img{width:50px;height:50px}
  body.home-page.theme-default .v97-current-matchup{padding-bottom:9px}
  body.home-page.theme-default .v97-current-score>strong{font-size:28px}
  body.home-page.theme-default .v97-game-row{min-height:45px}
  body.home-page.theme-default .v97-home-tabs{height:48px}
  body.home-page.theme-default .v97-continue{min-height:56px}
  body.home-page.theme-default .v97-home-actions button{min-height:72px;padding:9px 10px}
  body.home-page.theme-default .v97-action-icon{width:34px;height:34px;font-size:18px}
  body.home-page.theme-default .v97-home-actions b{font-size:10px}
  body.home-page.theme-default .v97-home-actions small{font-size:6.8px}
}
@media(max-width:370px){
  body.home-page.theme-default .v97-home-inner{padding-left:12px;padding-right:12px;gap:9px}
  body.home-page.theme-default .v97-home-brand h1{font-size:38px}
  body.home-page.theme-default .v97-save-line{margin-top:8px}
  body.home-page.theme-default .v97-current-team img{width:42px;height:42px}
  body.home-page.theme-default .v97-current-team strong{font-size:14px}
  body.home-page.theme-default .v97-current-team small{font-size:6.5px}
  body.home-page.theme-default .v97-current-score>strong{font-size:24px}
  body.home-page.theme-default .v97-current-score>b{font-size:7.5px;margin-top:6px}
  body.home-page.theme-default .v97-base-state{margin-top:6px}
  body.home-page.theme-default .v97-home-actions button{min-height:66px;gap:7px}
  body.home-page.theme-default .v97-action-icon{width:30px;height:30px;font-size:16px}
}

/* Dark Home uses true neutral inversion, not a blue tint. */
body.home-page.theme-default.dark-mode{background:#151618!important;--v97-soft:#202226;--v97-line:#34373c;--v97-text:#f5f6f7;--v97-muted:#aeb3ba}
body.home-page.theme-default.dark-mode .app-shell,
body.home-page.theme-default.dark-mode .v97-home{background:#151618!important;color:#f5f6f7!important}
body.home-page.theme-default.dark-mode .v97-brand-mark,
body.home-page.theme-default.dark-mode .v97-settings-button,
body.home-page.theme-default.dark-mode .v97-current-game,
body.home-page.theme-default.dark-mode .v97-game-row,
body.home-page.theme-default.dark-mode .v97-home-tabs,
body.home-page.theme-default.dark-mode .v97-home-tabs button,
body.home-page.theme-default.dark-mode .v97-home-actions button{background:#1d1f22!important;border-color:#34373c!important;color:#f5f6f7!important}
body.home-page.theme-default.dark-mode .v97-home-brand h1,
body.home-page.theme-default.dark-mode .v97-current-team strong,
body.home-page.theme-default.dark-mode .v97-current-score>strong{color:#f7f7f8!important}
body.home-page.theme-default.dark-mode .v97-current-team:first-child{border-right-color:#34373c!important}
body.home-page.theme-default.dark-mode .v97-current-team.right{border-left-color:#34373c!important}
body.home-page.theme-default.dark-mode .v97-game-row{border-top-color:#34373c!important}
body.home-page.theme-default.dark-mode .v97-home-tabs button{border-right-color:#34373c!important}
body.home-page.theme-default.dark-mode .v97-home-tabs button.active{background:#222a35!important;color:#7db7ff!important}
body.home-page.theme-default.dark-mode .v97-home-tabs button.active span{color:#7db7ff!important}
body.home-page.theme-default.dark-mode .v97-home-footer{border-top-color:#34373c!important;color:#aeb3ba!important}
body.home-page.theme-default.dark-mode .v97-home-footer p b{color:#d0d4da!important}

/* ---------- Actual Scorecard premium refinement ---------- */
body.theme-default:not(.home-page) main{background:#f7f8fa!important}
body.theme-default:not(.home-page) .topbar{min-height:74px!important}
body.theme-default:not(.home-page) .topbar h1{font-size:25px!important}
body.theme-default:not(.home-page) .topbar #homeBtn{border-radius:13px!important;width:39px!important;height:39px!important}
body.theme-default .game-info{border-radius:17px!important;overflow:hidden!important}
body.theme-default .game-field{min-height:60px!important}
body.theme-default .mlb-game-card{border-radius:18px!important;border-color:#dfe5ec!important;background:#fff!important;box-shadow:0 5px 18px rgba(15,23,42,.045)!important;padding:12px 14px!important}
body.theme-default .mlb-game-card .mlb-game-icon{border-radius:12px!important;background:#edf4fd!important;color:#0b55b5!important}
body.theme-default .mlb-game-card button{border-radius:11px!important;background:#fff!important;color:#0f172a!important;border-color:#b9c3d0!important;box-shadow:none!important}
body.theme-default .matchup-selector{border-radius:17px!important}
body.theme-default .live-game-bar{border-radius:17px!important;min-height:76px!important}
body.theme-default .mode-workspace-tabs{border-radius:15px!important;overflow:hidden!important;min-height:54px!important}
body.theme-default .mode-workspace-tabs button{min-height:52px!important;border-radius:0!important}
body.theme-default .standings-overview{border-radius:18px!important;overflow:hidden!important}
body.theme-default .team-scorebook{border-radius:18px!important;overflow:hidden!important}
body.theme-default .team-scorebook-head{padding-left:13px!important;padding-right:13px!important}
body.theme-default .team-scorebook-head .team-header-logo{width:32px!important;height:32px!important}
body.theme-default .team-defense-pane,
body.theme-default .full-width-pitch{margin:11px!important;border-radius:16px!important}
body.theme-default .full-width-pitch{border:1px solid #dfe5ec!important;overflow:hidden!important;background:#fff!important;box-shadow:0 3px 12px rgba(15,23,42,.035)!important}

/* Quiet, useful motion only. */
@media(prefers-reduced-motion:no-preference){
  body.home-page.theme-default .v97-current-game{animation:v97CardIn .42s cubic-bezier(.2,.8,.2,1) both}
  body.home-page.theme-default .v97-game-center{animation:v97CardIn .45s .05s cubic-bezier(.2,.8,.2,1) both}
  body.home-page.theme-default .v97-continue{animation:v97CardIn .45s .09s cubic-bezier(.2,.8,.2,1) both}
  body.home-page.theme-default .v97-home-actions{animation:v97CardIn .48s .13s cubic-bezier(.2,.8,.2,1) both}
  body.home-page.theme-default button{transition:transform .15s ease,background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
  body.home-page.theme-default button:active{transform:scale(.985)}
}
@keyframes v97CardIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}


/* ========================================================================
   v97.1 — iPhone Home bottom-edge hotfix
   Keeps v97 layout and behavior. The explanatory footer is compacted into
   one line on phones so it stays fully inside the dynamic viewport/safe area.
   ======================================================================== */
@media (max-width:760px){
  body.home-page.theme-default .v97-home-inner{
    box-sizing:border-box!important;
    padding-bottom:calc(max(8px,env(safe-area-inset-bottom)) + 3px)!important;
  }
  body.home-page.theme-default .v97-home-footer{
    box-sizing:border-box!important;
    min-height:30px!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:7px!important;
    padding:5px 7px 0!important;
    align-items:center!important;
  }
  body.home-page.theme-default .v97-home-footer>span{font-size:13px!important}
  body.home-page.theme-default .v97-home-footer p{
    font-size:7.6px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.home-page.theme-default .v97-home-footer p br{display:none!important}
  body.home-page.theme-default .v97-home-footer p br+*{margin-left:0!important}
  body.home-page.theme-default .v97-home-footer>small{display:none!important}
}
@media (max-width:370px){
  body.home-page.theme-default .v97-home-inner{gap:8px!important}
  body.home-page.theme-default .v97-home-footer{min-height:27px!important;padding-top:3px!important}
  body.home-page.theme-default .v97-home-footer p{font-size:7px!important}
}

/* ========================================================================
   v99 — PHASE 2: REAL SCORECARD PREMIUM VISUAL SYSTEM
   Baseline: v97.1.  This pass deliberately does NOT alter scorecard markup,
   scoring geometry, runner paths, lineup order, defense placement, pitching
   placement, or command-bar geometry.  It is a visual-layer conversion only.
   ======================================================================== */

/* ------------------------------------------------------------------------
   Surgical Home viewport repair.
   IMPORTANT: do not change the approved v97/v97.1 tile sizes or positions.
   ------------------------------------------------------------------------ */
body.home-page.theme-default{
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  overscroll-behavior-y:none!important;
  background:#fff!important;
}
body.home-page.theme-default .app-shell{
  height:100dvh!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#fff!important;
}
body.home-page.theme-default main{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#fff!important;
}
body.home-page.theme-default .v97-home{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
  background:linear-gradient(180deg,#fafbfd 0%,#f7f9fc 58%,#ffffff 90%,#ffffff 100%)!important;
}
body.home-page.theme-default .v97-home-inner{
  height:100%!important;
  min-height:0!important;
  box-sizing:border-box!important;
}
body.home-page.theme-default .v97-home-footer{
  background:transparent!important;
}
body.home-page.theme-default.dark-mode,
body.home-page.theme-default.dark-mode .app-shell,
body.home-page.theme-default.dark-mode main,
body.home-page.theme-default.dark-mode .v97-home{
  background:#151618!important;
}

/* ------------------------------------------------------------------------
   Scorecard foundation — same real v95/v97 structure, cleaner visual layer.
   ------------------------------------------------------------------------ */
body.theme-default:not(.home-page){
  --v99-blue:#075fca;
  --v99-blue-deep:#084b9a;
  --v99-blue-soft:#eef6ff;
  --v99-page:#f4f6f9;
  --v99-card:#ffffff;
  --v99-soft:#f8fafc;
  --v99-line:#dfe5ec;
  --v99-line-soft:#edf1f5;
  --v99-text:#101828;
  --v99-muted:#667085;
  --v99-shadow:0 7px 24px rgba(15,23,42,.055);
  background:var(--v99-page)!important;
}
body.theme-default:not(.home-page) .app-shell{
  background:var(--v99-page)!important;
}
body.theme-default:not(.home-page) main{
  background:var(--v99-page)!important;
  padding-top:10px!important;
}

/* Header remains the live-workspace "Scorecard" header. */
body.theme-default:not(.home-page) .topbar{
  min-height:70px!important;
  background:rgba(255,255,255,.97)!important;
  border-bottom:1px solid #e6eaf0!important;
  box-shadow:0 1px 0 rgba(15,23,42,.025)!important;
}
body.theme-default:not(.home-page) .topbar h1{
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:27px!important;
  font-weight:800!important;
  letter-spacing:-.035em!important;
  color:#0d1728!important;
}
body.theme-default:not(.home-page) .topbar #homeBtn{
  width:40px!important;
  height:40px!important;
  border:1px solid #dce3eb!important;
  border-radius:13px!important;
  background:#fff!important;
  color:var(--v99-blue)!important;
  box-shadow:0 2px 8px rgba(15,23,42,.04)!important;
}
body.theme-default:not(.home-page) .save-status{
  color:#667085!important;
  font-weight:750!important;
}

/* Game information remains the first scorecard section. */
body.theme-default:not(.home-page) .game-info{
  margin-bottom:10px!important;
  border:1px solid var(--v99-line)!important;
  border-radius:18px!important;
  background:var(--v99-card)!important;
  box-shadow:var(--v99-shadow)!important;
  overflow:hidden!important;
}
body.theme-default:not(.home-page) .game-field{
  min-height:62px!important;
  border-color:var(--v99-line-soft)!important;
  background:#fff!important;
}
body.theme-default:not(.home-page) .game-info-icon{
  width:30px!important;
  height:30px!important;
  border:1px solid #dbe8f8!important;
  border-radius:10px!important;
  background:#f2f7fd!important;
  color:var(--v99-blue)!important;
  box-shadow:none!important;
}
body.theme-default:not(.home-page) .game-field label{
  color:#7b8492!important;
  font-weight:900!important;
  letter-spacing:.13em!important;
}
body.theme-default:not(.home-page) .game-field input{
  color:#172033!important;
  font-weight:800!important;
  background:transparent!important;
  border-color:transparent!important;
}
body.theme-default:not(.home-page) .game-field input:focus{
  background:#f7fbff!important;
  border-color:#bed5ef!important;
  box-shadow:0 0 0 3px rgba(7,95,202,.08)!important;
}

/* Matchup selector keeps its exact place below Game Information. */
body.theme-default:not(.home-page) .matchup-selector{
  margin-bottom:10px!important;
  padding:11px!important;
  border:1px solid var(--v99-line)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:var(--v99-shadow)!important;
}
body.theme-default:not(.home-page) .matchup-team{
  border-radius:14px!important;
}
body.theme-default:not(.home-page) .matchup-label{
  color:#7b8492!important;
  font-weight:900!important;
  letter-spacing:.13em!important;
}
body.theme-default:not(.home-page) .matchup-team img{
  filter:drop-shadow(0 2px 3px rgba(15,23,42,.08));
}
body.theme-default:not(.home-page) .matchup-team select{
  color:#111827!important;
  font-weight:850!important;
  background:transparent!important;
}
body.theme-default:not(.home-page) .versus-mark{
  color:#98a2b3!important;
  font-weight:900!important;
  letter-spacing:.14em!important;
}

/* Sticky live-game status: visually lighter, still functionally identical. */
body.theme-default:not(.home-page) .live-game-bar{
  margin-bottom:10px!important;
  border:1px solid #d8e1eb!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 7px 20px rgba(15,23,42,.065),inset 0 3px 0 var(--v99-blue)!important;
  backdrop-filter:saturate(135%) blur(12px)!important;
  -webkit-backdrop-filter:saturate(135%) blur(12px)!important;
}
body.theme-default:not(.home-page) .live-team strong{
  color:#172033!important;
  font-weight:900!important;
}
body.theme-default:not(.home-page) .live-team span{
  color:#6e7787!important;
}
body.theme-default:not(.home-page) .live-inning>strong{
  color:var(--v99-blue)!important;
  font-weight:950!important;
  letter-spacing:.09em!important;
}
body.theme-default:not(.home-page) .live-batter b{
  color:#172033!important;
}
body.theme-default:not(.home-page) .live-out-dots i{
  background:#e7ebf0!important;
  border-color:#d7dde5!important;
}
body.theme-default:not(.home-page) .live-out-dots i.on{
  background:#d92d20!important;
  border-color:#d92d20!important;
}

/* In-game workspace tabs retain their location/behavior. */
body.theme-default:not(.home-page) .mode-workspace-tabs{
  margin-bottom:10px!important;
  border:1px solid var(--v99-line)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(15,23,42,.03)!important;
}
body.theme-default:not(.home-page) .mode-workspace-tabs button{
  background:#fff!important;
  color:#475467!important;
  border-color:#e8ecf1!important;
  font-weight:800!important;
}
body.theme-default:not(.home-page) .mode-workspace-tabs button.active,
body.theme-default:not(.home-page) .mode-workspace-tabs button[aria-selected="true"]{
  color:var(--v99-blue)!important;
  background:#fbfdff!important;
  box-shadow:inset 0 -2px 0 var(--v99-blue)!important;
}

/* Standings keep the existing placement and collapse behavior. */
body.theme-default:not(.home-page) .standings-overview{
  margin-bottom:12px!important;
  border:1px solid var(--v99-line)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:var(--v99-shadow)!important;
}
body.theme-default:not(.home-page) .overview-title{
  min-height:45px!important;
  padding-left:13px!important;
  padding-right:10px!important;
  background:#fbfcfe!important;
  color:#344054!important;
  border-bottom:1px solid #e8edf2!important;
}
body.theme-default:not(.home-page) .overview-title strong{
  font-weight:900!important;
  letter-spacing:.09em!important;
}
body.theme-default:not(.home-page) .title-glyph{
  color:var(--v99-blue)!important;
}
body.theme-default:not(.home-page) .section-collapse,
body.theme-default:not(.home-page) .refresh-mini{
  background:#fff!important;
  color:var(--v99-blue)!important;
  border-color:#d2deeb!important;
  box-shadow:none!important;
}
body.theme-default:not(.home-page) .standings-head{
  background:#f8fafc!important;
  color:#667085!important;
  border-color:#e9edf2!important;
}
body.theme-default:not(.home-page) .standings-grid>div{
  background:#fff!important;
  color:#344054!important;
  border-color:#eef1f4!important;
}
body.theme-default:not(.home-page) .standings-grid .head{
  background:#f8fafc!important;
  color:#7b8492!important;
}
body.theme-default:not(.home-page) .standings-selected{
  background:#eef6ff!important;
  color:#075fca!important;
  font-weight:850!important;
}
body.theme-default:not(.home-page) .standings-foot{
  background:#fbfcfe!important;
  color:#98a2b3!important;
}

/* Team scorebook: lineup/scoring grid remains the exact same scrollable table. */
body.theme-default:not(.home-page) .team-scorebook{
  margin-bottom:14px!important;
  border:1px solid #dbe2ea!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 8px 26px rgba(15,23,42,.06)!important;
  overflow:hidden!important;
}
body.theme-default:not(.home-page) .team-scorebook-head{
  min-height:54px!important;
  padding-left:12px!important;
  padding-right:10px!important;
  background:rgba(255,255,255,.98)!important;
  border-bottom:1px solid #e6ebf1!important;
  box-shadow:0 3px 10px rgba(15,23,42,.025)!important;
}
body.theme-default:not(.home-page) .team-header-logo,
body.theme-default:not(.home-page) .team-logo{
  filter:drop-shadow(0 2px 3px rgba(15,23,42,.08));
}
body.theme-default:not(.home-page) .team-header-name{
  color:#101828!important;
  font-weight:900!important;
  letter-spacing:.025em!important;
}
body.theme-default:not(.home-page) .team-scorebook-scroll{
  background:#fff!important;
  scrollbar-color:#bdc8d6 #f4f6f8!important;
}
body.theme-default:not(.home-page) .unified-score-table{
  background:#fff!important;
  color:#172033!important;
}
body.theme-default:not(.home-page) .unified-score-table th,
body.theme-default:not(.home-page) .unified-score-table td{
  border-color:#e8edf2!important;
}
body.theme-default:not(.home-page) .unified-score-table thead th{
  background:#f7f9fc!important;
  color:#697386!important;
}
body.theme-default:not(.home-page) .unified-score-table .sticky-lineup-banner{
  background:#f4f7fb!important;
  color:#344054!important;
  font-weight:900!important;
  letter-spacing:.09em!important;
}
body.theme-default:not(.home-page) .unified-score-table .sticky-ord,
body.theme-default:not(.home-page) .unified-score-table .sticky-player,
body.theme-default:not(.home-page) .unified-score-table .sticky-pos{
  background:#fff!important;
}
body.theme-default:not(.home-page) .unified-score-table .active-inning-col{
  background:#eaf4ff!important;
  color:#075fca!important;
  box-shadow:inset 0 -2px 0 #075fca!important;
}
body.theme-default:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-ord,
body.theme-default:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-player,
body.theme-default:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-pos{
  background:#eff6ff!important;
}
body.theme-default:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-ord{
  color:#075fca!important;
  box-shadow:inset 3px 0 0 #075fca!important;
}
body.theme-default:not(.home-page) .player-main{
  color:#172033!important;
  font-weight:850!important;
}
body.theme-default:not(.home-page) .player-subs,
body.theme-default:not(.home-page) .pos-cell{
  color:#667085!important;
}
body.theme-default:not(.home-page) .stat-cell{
  background:#fbfcfe!important;
  color:#344054!important;
}

/* Defense stays immediately underneath each lineup in Advanced/Pitch modes. */
body.theme-default:not(.home-page) .team-defense-pane{
  margin:11px!important;
  border:1px solid #dce4ec!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 4px 14px rgba(15,23,42,.04)!important;
}
body.theme-default:not(.home-page) .defense-pane-title{
  min-height:42px!important;
  padding-left:12px!important;
  padding-right:12px!important;
  background:#fbfcfe!important;
  color:#344054!important;
  border-bottom:1px solid #e7ecf1!important;
}
body.theme-default:not(.home-page) .defense-pane-title>small{
  color:#075fca!important;
}
body.theme-default:not(.home-page) .team-defense-field{
  background:
    radial-gradient(ellipse at 50% 104%,rgba(223,205,166,.38) 0 22%,transparent 23%),
    linear-gradient(180deg,#f4f8f4 0%,#edf4ee 72%,#e8f0e9 100%)!important;
}
body.theme-default:not(.home-page) .team-defense-grass{
  opacity:.36!important;
}
body.theme-default:not(.home-page) .team-defense-cutout{
  border-color:rgba(176,154,114,.32)!important;
  background:radial-gradient(ellipse at 50% 78%,rgba(201,174,126,.20) 0 25%,transparent 26%)!important;
}
body.theme-default:not(.home-page) .team-defense-diamond{
  border-color:rgba(166,141,99,.55)!important;
  background:rgba(218,195,151,.18)!important;
  box-shadow:none!important;
}
body.theme-default:not(.home-page) .team-defense-pos{
  border:1px solid #cdd8e4!important;
  background:rgba(255,255,255,.95)!important;
  color:#344054!important;
  box-shadow:0 3px 10px rgba(15,23,42,.075)!important;
  backdrop-filter:blur(4px)!important;
  -webkit-backdrop-filter:blur(4px)!important;
}
body.theme-default:not(.home-page) .team-defense-pos.is-filled{
  border-color:#9cbce0!important;
  box-shadow:0 0 0 2px rgba(7,95,202,.07),0 3px 10px rgba(15,23,42,.075)!important;
}
body.theme-default:not(.home-page) .team-defense-pos>span{
  background:#edf5ff!important;
  border-color:#d2e2f5!important;
  color:#075fca!important;
}
body.theme-default:not(.home-page) .team-defense-pos>small{
  color:#667085!important;
}
body.theme-default:not(.home-page) .team-defense-foot{
  background:#fbfcfe!important;
  color:#667085!important;
  border-top:1px solid #e7ecf1!important;
}
body.theme-default:not(.home-page) .defense-mode-note{
  color:#075fca!important;
}

/* Pitching remains directly below Defense (or below lineup in Basic). */
body.theme-default:not(.home-page) .full-width-pitch{
  margin:11px!important;
  border:1px solid #dce4ec!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 4px 14px rgba(15,23,42,.04)!important;
  overflow:hidden!important;
}
body.theme-default:not(.home-page) .full-width-pitch .pane-title{
  min-height:42px!important;
  background:#fbfcfe!important;
  color:#344054!important;
  border-bottom:1px solid #e7ecf1!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
}
body.theme-default:not(.home-page) .add-pitcher-btn{
  background:#fff!important;
  color:#075fca!important;
  border-color:#cddcec!important;
  box-shadow:none!important;
}
body.theme-default:not(.home-page) .pitch-table th{
  background:#f7f9fc!important;
  color:#697386!important;
  border-color:#e8edf2!important;
}
body.theme-default:not(.home-page) .pitch-table td{
  background:#fff!important;
  border-color:#e8edf2!important;
}
body.theme-default:not(.home-page) .pitch-table input{
  background:#fff!important;
  color:#172033!important;
  border-color:transparent!important;
}
body.theme-default:not(.home-page) .pitch-table input:focus{
  background:#f7fbff!important;
  border-color:#bdd3ec!important;
}

/* Bottom command bar: same 5-button geometry and centered Score command. */
body.theme-default:not(.home-page) .mobile-action-bar{
  background:rgba(255,255,255,.97)!important;
  border-top:1px solid #dde4ec!important;
  box-shadow:0 -8px 24px rgba(15,23,42,.07)!important;
  backdrop-filter:saturate(135%) blur(14px)!important;
  -webkit-backdrop-filter:saturate(135%) blur(14px)!important;
}
body.theme-default:not(.home-page) .mobile-action-bar button{
  color:#5f6b7a!important;
}
body.theme-default:not(.home-page) .mobile-action-bar .score-command{
  color:#fff!important;
  background:linear-gradient(180deg,#0a66d3 0%,#0758bd 100%)!important;
  border-color:#0758bd!important;
  box-shadow:0 6px 16px rgba(7,88,189,.22)!important;
}
body.theme-default:not(.home-page) .mobile-action-bar .score-command span,
body.theme-default:not(.home-page) .mobile-action-bar .score-command small{
  color:#fff!important;
}

/* Dark Mode mirrors the same hierarchy without a blue-tinted page. */
body.theme-default.dark-mode:not(.home-page){
  --v99-page:#111214;
  --v99-card:#1a1b1e;
  --v99-soft:#202226;
  --v99-line:#35383d;
  --v99-line-soft:#303338;
  --v99-text:#f5f6f7;
  --v99-muted:#a6abb3;
  --v99-shadow:none;
  background:#111214!important;
}
body.theme-default.dark-mode:not(.home-page) .app-shell,
body.theme-default.dark-mode:not(.home-page) main{
  background:#111214!important;
}
body.theme-default.dark-mode:not(.home-page) .topbar,
body.theme-default.dark-mode:not(.home-page) .game-info,
body.theme-default.dark-mode:not(.home-page) .game-field,
body.theme-default.dark-mode:not(.home-page) .matchup-selector,
body.theme-default.dark-mode:not(.home-page) .live-game-bar,
body.theme-default.dark-mode:not(.home-page) .mode-workspace-tabs,
body.theme-default.dark-mode:not(.home-page) .mode-workspace-tabs button,
body.theme-default.dark-mode:not(.home-page) .standings-overview,
body.theme-default.dark-mode:not(.home-page) .team-scorebook,
body.theme-default.dark-mode:not(.home-page) .team-scorebook-head,
body.theme-default.dark-mode:not(.home-page) .team-scorebook-scroll,
body.theme-default.dark-mode:not(.home-page) .unified-score-table,
body.theme-default.dark-mode:not(.home-page) .team-defense-pane,
body.theme-default.dark-mode:not(.home-page) .full-width-pitch,
body.theme-default.dark-mode:not(.home-page) .pitch-table td,
body.theme-default.dark-mode:not(.home-page) .pitch-table input{
  background:#1a1b1e!important;
  color:#eef0f2!important;
  border-color:#35383d!important;
  box-shadow:none!important;
}
body.theme-default.dark-mode:not(.home-page) .game-field input,
body.theme-default.dark-mode:not(.home-page) .matchup-team select,
body.theme-default.dark-mode:not(.home-page) .team-header-name,
body.theme-default.dark-mode:not(.home-page) .player-main{
  color:#f4f5f6!important;
}
body.theme-default.dark-mode:not(.home-page) .game-info-icon,
body.theme-default.dark-mode:not(.home-page) .team-defense-pos>span{
  background:#202a35!important;
  border-color:#30445b!important;
  color:#82b6ef!important;
}
body.theme-default.dark-mode:not(.home-page) .overview-title,
body.theme-default.dark-mode:not(.home-page) .standings-head,
body.theme-default.dark-mode:not(.home-page) .standings-grid .head,
body.theme-default.dark-mode:not(.home-page) .unified-score-table thead th,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .sticky-lineup-banner,
body.theme-default.dark-mode:not(.home-page) .defense-pane-title,
body.theme-default.dark-mode:not(.home-page) .full-width-pitch .pane-title,
body.theme-default.dark-mode:not(.home-page) .pitch-table th,
body.theme-default.dark-mode:not(.home-page) .team-defense-foot{
  background:#202226!important;
  color:#b9bec5!important;
  border-color:#34373c!important;
}
body.theme-default.dark-mode:not(.home-page) .standings-grid>div,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .sticky-ord,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .sticky-player,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .sticky-pos{
  background:#1a1b1e!important;
  color:#eef0f2!important;
  border-color:#34373c!important;
}
body.theme-default.dark-mode:not(.home-page) .standings-selected,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-ord,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-player,
body.theme-default.dark-mode:not(.home-page) .unified-score-table .batter-row.current-batter .sticky-pos{
  background:#1b3049!important;
  color:#8dc0f8!important;
}
body.theme-default.dark-mode:not(.home-page) .team-defense-field{
  background:linear-gradient(180deg,#1a211b,#151b16 74%,#131814)!important;
}
body.theme-default.dark-mode:not(.home-page) .team-defense-pos{
  background:#24262a!important;
  color:#eef0f2!important;
  border-color:#484c52!important;
  box-shadow:none!important;
}
body.theme-default.dark-mode:not(.home-page) .mobile-action-bar{
  background:rgba(24,25,28,.97)!important;
  border-top-color:#35383d!important;
  box-shadow:0 -8px 24px rgba(0,0,0,.22)!important;
}
body.theme-default.dark-mode:not(.home-page) .mobile-action-bar button{
  color:#b3b8c0!important;
}

/* Mobile: preserve existing geometry; only tighten surface spacing slightly. */
@media(max-width:600px){
  body.theme-default:not(.home-page) main{padding-top:8px!important}
  body.theme-default:not(.home-page) .game-info,
  body.theme-default:not(.home-page) .matchup-selector,
  body.theme-default:not(.home-page) .standings-overview,
  body.theme-default:not(.home-page) .team-scorebook{border-radius:15px!important}
  body.theme-default:not(.home-page) .team-scorebook-head{min-height:48px!important}
  body.theme-default:not(.home-page) .team-defense-pane,
  body.theme-default:not(.home-page) .full-width-pitch{margin:9px!important;border-radius:14px!important}
}

/* ==========================================================
   v101 — Compact/Fitted System Screens + More Dashboard
   ========================================================== */
:root{--v101-blue:#0b67d8;--v101-soft:#f5f9ff;--v101-border:#dce5ef}

/* Frozen Home button on the live Scorecard. */
body:not(.home-page) .topbar .home-icon{position:fixed!important;left:max(10px,env(safe-area-inset-left))!important;top:calc(9px + env(safe-area-inset-top))!important;z-index:155!important;background:color-mix(in srgb,var(--panel) 94%,transparent)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 4px 14px rgba(15,23,42,.08)!important}

/* Uniform game information tiles with long-location wrapping. */
body.theme-default:not(.home-page) .game-info.with-extras{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-field{min-height:82px!important;padding:10px 12px!important;gap:9px!important;align-items:center!important}
body.theme-default:not(.home-page) .game-info .game-field-copy{min-width:0!important}
body.theme-default:not(.home-page) .game-info .game-field-copy label{font-size:9px!important;letter-spacing:.14em!important;margin-bottom:4px!important}
body.theme-default:not(.home-page) .game-info .game-field-copy input,
body.theme-default:not(.home-page) .game-info .game-field-copy textarea{font-size:14px!important;font-weight:800!important;line-height:1.18!important;color:var(--text)!important;background:transparent!important;border:0!important;outline:0!important;padding:0!important;width:100%!important;min-width:0!important;resize:none!important;font-family:inherit!important}
body.theme-default:not(.home-page) .game-info .game-field-copy textarea{white-space:normal!important;overflow:hidden!important;display:block!important;min-height:36px!important;max-height:48px!important}
body.theme-default:not(.home-page) .game-info-icon{width:38px!important;height:38px!important;border-radius:12px!important;font-size:18px!important;flex:0 0 38px!important}

/* Approved compact field defense, without the half-circle outfield graphic. */
body.theme-default:not(.home-page) .team-defense-cutout{display:none!important}
body.theme-default:not(.home-page) .team-defense-field{height:270px!important;background:linear-gradient(180deg,#fbfdfb,#f3f7f3)!important}
body.theme-default:not(.home-page) .team-defense-grass{opacity:.38!important;background:linear-gradient(180deg,rgba(210,230,214,.18),rgba(232,235,224,.24))!important}
body.theme-default:not(.home-page) .team-defense-diamond{top:64%!important;width:29%!important;border-color:#d8caa7!important;background:rgba(223,207,164,.14)!important}
body.theme-default:not(.home-page) .team-defense-pos{width:102px!important;min-height:48px!important;padding:6px 7px!important;border-radius:11px!important;grid-template-columns:29px minmax(0,1fr)!important;background:#fff!important;border-color:#b8d2f4!important;box-shadow:0 4px 11px rgba(18,72,135,.10)!important;color:#101828!important}
body.theme-default:not(.home-page) .team-defense-pos>strong{font-size:7.5px!important;line-height:1.05!important;white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
body.theme-default:not(.home-page) .team-defense-pos>small{font-size:6px!important}
body.theme-default:not(.home-page) .team-defense-pos>span{width:27px!important;height:27px!important}

/* Pitching remains the same table, but uses much less vertical space. */
body.theme-default:not(.home-page) .pitch-pane{margin-top:7px!important;border-radius:13px!important}
body.theme-default:not(.home-page) .pitch-pane .pane-title{height:30px!important;min-height:30px!important;padding:0 9px!important;font-size:10px!important}
body.theme-default:not(.home-page) .pitch-pane .add-pitcher-btn{width:27px!important;height:27px!important;min-height:27px!important;border-radius:9px!important;font-size:16px!important}
body.theme-default:not(.home-page) .full-width-pitch .pitch-table th{height:23px!important;padding:3px 5px!important;font-size:8px!important;letter-spacing:.06em!important}
body.theme-default:not(.home-page) .full-width-pitch .pitch-table td{height:31px!important;padding:1px 3px!important}
body.theme-default:not(.home-page) .pitch-table input{height:29px!important;min-height:29px!important;padding:2px 5px!important;font-size:12px!important;line-height:1!important}
body.theme-default:not(.home-page) .pitch-table .pitcher-name input{font-size:12.5px!important;font-weight:750!important}

/* Approved Home-style More dashboard. */
.v101-more-sheet{padding:10px 12px 14px!important;overflow-y:auto!important}
.v101-sheet-handle{width:54px;height:5px;border-radius:999px;background:color-mix(in srgb,var(--ui-muted) 45%,transparent);margin:0 auto 9px}
.v101-drawer-head{padding:0 4px 9px!important;display:flex!important;align-items:center!important;justify-content:space-between!important}
.v101-drawer-head>button{width:42px!important;height:42px!important;border-radius:13px!important}
.v101-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:2px 0 10px}
.v101-quick-tile{min-width:0;min-height:104px;border:1px solid var(--ui-line)!important;border-radius:17px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;padding:11px 6px 9px!important;display:grid;justify-items:center;align-content:center;gap:4px;text-align:center}
.v101-quick-tile>span{width:43px;height:43px;border-radius:13px;background:var(--ui-surface-2);border:1px solid color-mix(in srgb,var(--accent) 18%,var(--ui-line));display:grid;place-items:center;color:var(--accent)}
.v101-quick-tile svg,.v101-menu-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.v101-quick-tile b{font-size:12px!important}.v101-quick-tile small{font-size:9.5px!important;color:var(--ui-muted)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.v101-dashboard-section{padding:5px 0!important}
.v101-paired-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.v101-full-grid{display:grid;grid-template-columns:1fr;gap:9px}
.v101-menu-tile{min-width:0;min-height:74px!important;padding:9px 11px!important;border:1px solid var(--ui-line)!important;border-radius:15px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;display:grid!important;grid-template-columns:43px minmax(0,1fr) 16px!important;align-items:center!important;gap:10px!important;text-align:left!important}
.v101-menu-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--ui-surface-2);border:1px solid color-mix(in srgb,var(--accent) 17%,var(--ui-line));color:var(--accent)}
.v101-menu-copy{display:grid;gap:2px;min-width:0}.v101-menu-tile strong{font-size:12.5px!important;line-height:1.15!important}.v101-menu-tile small{font-size:9.3px!important;line-height:1.2!important;color:var(--ui-muted)!important;white-space:normal!important}.v101-menu-tile em{font-style:normal;font-size:22px;color:var(--ui-muted)}
.v101-danger-tile{margin-top:7px!important;width:100%;border-color:#ffc7c2!important;background:#fff8f7!important;color:#c72218!important}.v101-danger-tile .v101-menu-icon{color:#d92d20;background:#fff0ee;border-color:#ffd0cc}.v101-danger-tile small{color:#ba5049!important}
body.dark-mode .v101-danger-tile{background:#281716!important;border-color:#67302c!important}.dark-mode .v101-danger-tile small{color:#f6a19a!important}

/* Appearance: larger controls, compact dashboard use of space. */
.v101-theme-card{width:min(720px,calc(100vw - 20px))!important;max-height:min(90dvh,820px)!important;padding:14px!important}
.v101-theme-card .v92-theme-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
.v101-theme-card .theme-choice{position:relative;min-height:116px!important;border-radius:18px!important;display:grid!important;grid-template-columns:1fr!important;justify-items:center!important;align-content:center!important;text-align:center!important;gap:6px!important;padding:13px 10px!important}
.v101-theme-card .theme-choice .theme-swatch{width:48px!important;height:48px!important;border-radius:14px!important}
.v101-theme-card .theme-choice strong{font-size:15px!important}.v101-theme-card .theme-choice small{font-size:11px!important}.v101-theme-card .theme-check{position:absolute;right:9px;bottom:8px}
.v101-theme-card .v92-theme-options{display:grid!important;gap:10px!important;margin-top:10px!important}.v101-theme-card .theme-sub{margin:0!important;padding:10px!important;border:1px solid var(--ui-line)!important;border-radius:14px!important;background:var(--ui-surface)!important}.v101-theme-card .theme-sub label{font-size:10px!important}.v101-theme-card .theme-sub select{min-height:44px!important;font-size:13px!important}
.v101-appearance-display{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.v101-appearance-display button{min-height:65px;border:1px solid var(--ui-line);border-radius:15px;background:var(--ui-surface);color:var(--ui-text);display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;text-align:left;padding:10px}.v101-appearance-display button>span{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;color:var(--accent);background:var(--ui-surface-2);font-size:20px}.v101-appearance-display button div{display:grid;gap:2px}.v101-appearance-display button b{font-size:13px}.v101-appearance-display button small{font-size:10px;color:var(--ui-muted)}.v101-appearance-display button.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--ui-surface))}

/* Export & Backup: paired cards with readable copy. */
.v101-export-card{width:min(720px,calc(100vw - 20px))!important;max-height:min(90dvh,840px)!important;padding:14px!important}
.v101-section-title{display:flex;align-items:center;gap:10px;margin:6px 0 7px;font-size:10px;font-weight:900;letter-spacing:.11em;color:var(--ui-muted)}.v101-section-title:after{content:"";height:1px;background:var(--ui-line);flex:1}
.v101-export-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:0!important}.v101-export-grid button,.v101-export-grid .export-import-tile{position:relative;min-height:105px!important;border:1px solid var(--ui-line)!important;border-radius:17px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;padding:12px!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 14px!important;grid-template-rows:auto auto!important;align-items:center!important;column-gap:10px!important;text-align:left!important}.v101-export-icon{grid-row:1/3;width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--ui-surface-2);color:var(--accent);font-size:20px}.v101-export-grid strong{font-size:13px!important;align-self:end}.v101-export-grid small{font-size:10px!important;color:var(--ui-muted)!important;align-self:start;line-height:1.25}.v101-export-grid em{grid-row:1/3;grid-column:3;font-style:normal;font-size:20px;color:var(--ui-muted)}.v101-import-wide{grid-column:1/-1!important;min-height:82px!important}

/* Finish/Postgame: bigger type and tighter section spacing. */
.postgame-card{width:min(720px,calc(100vw - 20px))!important;max-height:min(92dvh,860px)!important;padding:14px!important}
#postgameContent{gap:0!important}.v101-postgame-screen{display:grid;gap:9px}.v101-final-card{display:grid;grid-template-columns:1fr 1.25fr 1fr;align-items:center;border:1px solid var(--ui-line);border-radius:18px;background:var(--ui-surface);padding:16px;text-align:center}.v101-final-card>div{display:grid;gap:2px}.v101-final-card small{font-size:12px;color:var(--ui-muted);font-weight:850}.v101-final-card strong{font-size:44px;line-height:.95}.v101-final-center{padding:0 12px;border-left:1px solid var(--ui-line);border-right:1px solid var(--ui-line)}.v101-final-center b{font-size:19px;color:var(--accent)}.v101-final-center span{font-size:11px;color:var(--ui-muted);line-height:1.3}.v101-notes-card{border:1px solid var(--ui-line);border-radius:17px;background:var(--ui-surface);padding:13px}.v101-notes-card label{display:block;font-size:13px;font-weight:850;margin-bottom:5px}.v101-notes-card textarea{width:100%;min-height:70px;border:0;background:transparent;color:var(--ui-text);font:inherit;font-size:14px;line-height:1.45;resize:vertical;outline:0}.v101-archive-row{width:100%;min-height:68px;border:1px solid var(--ui-line);border-radius:15px;background:var(--ui-surface);color:var(--ui-text);display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;text-align:left;padding:10px 12px}.v101-archive-row>span{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--ui-surface-2);color:var(--accent);font-size:20px}.v101-archive-row>div{display:grid;gap:2px}.v101-archive-row strong{font-size:14px}.v101-archive-row small{font-size:10px;color:var(--ui-muted)}.v101-archive-row>b{font-size:22px;color:var(--accent)}.v101-postgame-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.v101-postgame-actions button{min-height:105px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-surface);color:var(--ui-text);display:grid;justify-items:center;align-content:center;gap:4px;padding:9px}.v101-postgame-actions button>span{width:42px;height:42px;border-radius:12px;background:var(--ui-surface-2);display:grid;place-items:center;color:var(--accent);font-size:21px}.v101-postgame-actions strong{font-size:12px;text-align:center}.v101-postgame-actions small{font-size:9.5px;color:var(--ui-muted);line-height:1.2;text-align:center}.v101-finish-home{min-height:52px!important;border-radius:15px!important;font-size:15px!important;font-weight:900!important}.v101-reopen{border:0!important;background:transparent!important;color:var(--ui-muted)!important;font-size:10px!important;text-decoration:underline}

@media(max-width:700px){
 .v101-more-sheet{left:8px!important;right:8px!important;bottom:calc(74px + env(safe-area-inset-bottom))!important;max-height:82dvh!important;border-radius:22px!important}
 .v101-quick-grid{gap:6px}.v101-quick-tile{min-height:92px;padding:8px 3px!important}.v101-quick-tile>span{width:37px;height:37px}.v101-quick-tile b{font-size:10px!important}.v101-quick-tile small{font-size:8px!important}
 .v101-paired-grid{gap:7px}.v101-menu-tile{min-height:64px!important;padding:7px 8px!important;grid-template-columns:34px minmax(0,1fr) 12px!important;gap:7px!important}.v101-menu-icon{width:33px;height:33px;border-radius:10px}.v101-menu-icon svg{width:19px;height:19px}.v101-menu-tile strong{font-size:10px!important}.v101-menu-tile small{font-size:7.8px!important}.v101-menu-tile em{font-size:17px}
 .v101-theme-card,.v101-export-card,.postgame-card{width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important}
 .v101-theme-card .theme-choice{min-height:92px!important}.v101-theme-card .theme-choice strong{font-size:13px!important}.v101-theme-card .theme-choice small{font-size:9px!important}
 .v101-export-grid button,.v101-export-grid .export-import-tile{min-height:88px!important;padding:9px!important;grid-template-columns:36px minmax(0,1fr) 12px!important;gap:7px!important}.v101-export-icon{width:34px;height:34px;font-size:17px}.v101-export-grid strong{font-size:11px!important}.v101-export-grid small{font-size:8.5px!important}
 .v101-final-card{padding:12px}.v101-final-card strong{font-size:36px}.v101-final-center b{font-size:16px}.v101-final-center span{font-size:9px}.v101-notes-card textarea{font-size:13px}.v101-postgame-actions button{min-height:92px}.v101-postgame-actions strong{font-size:10px}.v101-postgame-actions small{font-size:8px}
 body.theme-default:not(.home-page) .game-info.with-extras .game-field{min-height:72px!important;padding:8px!important}
 body.theme-default:not(.home-page) .game-info .game-field-copy input,body.theme-default:not(.home-page) .game-info .game-field-copy textarea{font-size:13px!important}
 body.theme-default:not(.home-page) .team-defense-pos{width:88px!important}
}

/* ==========================================================
   v102 — Device regression fixes from real iPhone verification
   Surgical fixes: restore compact Home, dark score-grid contrast,
   functional utility panels, menu state feedback, and lineup spacing.
   ========================================================== */

/* More quick controls always show their real current state. */
.v101-quick-tile.is-on{
  border-color:color-mix(in srgb,var(--accent) 52%,var(--ui-line))!important;
  background:color-mix(in srgb,var(--accent) 7%,var(--ui-surface))!important;
}
.v101-quick-tile.is-on>span{
  background:color-mix(in srgb,var(--accent) 12%,var(--ui-surface-2))!important;
  border-color:color-mix(in srgb,var(--accent) 42%,var(--ui-line))!important;
}

/* MLB import confirmation must sit above the MLB finder sheet. */
#mlbModal{z-index:150!important}
#confirmModal{z-index:190!important}
#mlbImportBtn.is-working{opacity:.78;pointer-events:none}

/* Location is a two-line value inside the SAME uniform tile — no inner box. */
body.theme-default:not(.home-page) .game-info .game-field-copy textarea{
  -webkit-appearance:none!important;appearance:none!important;
  border:0!important;outline:0!important;box-shadow:none!important;
  background:transparent!important;border-radius:0!important;
  padding:0!important;margin:0!important;
  min-height:34px!important;height:34px!important;max-height:34px!important;
  line-height:1.22!important;overflow:hidden!important;
}
body.theme-default:not(.home-page) .game-info .game-field-copy textarea:focus{
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
}

/* In dark mode, mark current inning with an underline/header cue only.
   Do NOT paint a pale column behind the baseball path/segment graphics. */
body.theme-default.dark-mode:not(.home-page) .unified-score-table .play-cell.active-inning-col{
  background:#1a1b1e!important;color:inherit!important;box-shadow:none!important;
}
body.theme-default.dark-mode:not(.home-page) .unified-score-table .score-head-inning.active-inning-col{
  background:#202226!important;color:#7db7ff!important;
  box-shadow:inset 0 -3px 0 #2786ed!important;
}
body.theme-default.dark-mode:not(.home-page) .unified-score-table .score-head-spacer.active-inning-col{
  background:#202226!important;
}

/* The team name header should not create a large sticky spacer on iPhone. */
@media(max-width:700px){
  body.theme-default:not(.home-page) .team-scorebook-head{
    position:relative!important;top:auto!important;z-index:3!important;
    min-height:48px!important;margin:0!important;
  }
  body.theme-default:not(.home-page) .team-scorebook{scroll-margin-top:calc(var(--livebar-h) + 6px)!important}
}

/* Functional Game Information / Lineup manager sheets. */
.v102-manager-card{
  width:min(720px,calc(100vw - 18px))!important;
  max-height:min(92dvh,860px)!important;
  padding:14px!important;
  background:var(--ui-bg)!important;color:var(--ui-text)!important;
  border-color:var(--ui-line)!important;
}
.v102-team-pair{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:9px;margin:8px 0 11px}
.v102-team-pair>span{padding-bottom:14px;font-size:10px;font-weight:900;color:var(--ui-muted)}
.v102-team-pair label{display:grid!important;gap:5px!important;color:var(--ui-muted)!important}
.v102-team-pair label small{font-size:9px;font-weight:900;letter-spacing:.1em}
.v102-team-pair select{width:100%;min-width:0;background:var(--ui-surface)!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;border-radius:12px!important}
.v102-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--ui-line);border-radius:18px;overflow:hidden;background:var(--ui-surface)}
.v102-info-tile{min-width:0;min-height:96px!important;display:grid!important;grid-template-columns:39px minmax(0,1fr)!important;grid-template-rows:auto 1fr!important;column-gap:9px!important;align-items:center!important;padding:10px!important;border-right:1px solid var(--ui-line);border-bottom:1px solid var(--ui-line);color:var(--ui-text)!important}
.v102-info-tile:nth-child(3n){border-right:0}.v102-info-tile:nth-last-child(-n/**/+3){border-bottom:0}
.v102-info-tile>span{grid-row:1/3;width:38px;height:38px;border:1px solid color-mix(in srgb,var(--accent) 20%,var(--ui-line));border-radius:12px;background:var(--ui-surface-2);color:var(--accent);display:grid;place-items:center;font-size:18px}
.v102-info-tile>small{font-size:9px!important;font-weight:900!important;letter-spacing:.12em;color:var(--ui-muted)!important;align-self:end}
.v102-info-tile input,.v102-info-tile textarea{-webkit-appearance:none;appearance:none;width:100%!important;min-width:0!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:var(--ui-text)!important;padding:0!important;margin:0!important;font:800 14px/1.2 inherit!important;resize:none!important;align-self:start}
.v102-info-tile textarea{height:38px!important;max-height:38px!important;overflow:hidden!important;white-space:normal!important}
.v102-manager-note{margin:10px 2px;color:var(--ui-muted);font-size:11px;line-height:1.35}
.v102-manager-done{width:100%;min-height:48px;border-radius:14px!important;background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important;font-weight:900!important}
.v102-side-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:8px 0 10px;padding:4px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface-2)}
.v102-side-tabs button{min-height:40px;border:0;border-radius:10px;background:transparent;color:var(--ui-muted);font-weight:850}
.v102-side-tabs button.active{background:var(--ui-surface);color:var(--accent);box-shadow:0 2px 8px rgba(15,23,42,.06)}
.v102-lineup-head{display:grid;grid-template-columns:32px minmax(0,1fr) 92px;gap:7px;padding:0 10px 6px;color:var(--ui-muted);font-size:9px;font-weight:900;letter-spacing:.1em}
.v102-lineup-list{border:1px solid var(--ui-line);border-radius:17px;overflow:hidden;background:var(--ui-surface)}
.v102-lineup-row{width:100%;min-height:56px;border:0;border-bottom:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-text);display:grid;grid-template-columns:32px minmax(0,1fr) 92px 16px;gap:7px;align-items:center;text-align:left;padding:7px 10px}
.v102-lineup-row:last-child{border-bottom:0}.v102-lineup-row>b{font-size:12px;color:var(--ui-muted)}.v102-lineup-row>span{display:grid;gap:2px;min-width:0}.v102-lineup-row strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v102-lineup-row small{font-size:9px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v102-lineup-row em{font-style:normal;font-size:10px;font-weight:800;color:var(--ui-muted);text-align:right}.v102-lineup-row i{font-style:normal;color:var(--ui-muted);font-size:18px}

@media(max-width:700px){
  .v102-manager-card{width:100%!important;max-height:90dvh!important}
  .v102-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v102-info-tile:nth-child(3n){border-right:1px solid var(--ui-line)}
  .v102-info-tile:nth-child(2n){border-right:0}
  .v102-info-tile:nth-last-child(-n/**/+3){border-bottom:1px solid var(--ui-line)}
  .v102-info-tile:nth-last-child(-n/**/+2){border-bottom:0}
  .v102-info-tile{min-height:82px!important}
  .v102-lineup-row{min-height:54px;grid-template-columns:26px minmax(0,1fr) 72px 12px;padding:7px 8px}
  .v102-lineup-head{grid-template-columns:26px minmax(0,1fr) 72px}
}

/* ==========================================================
   v103 — iPhone visual refinement pass
   - illuminate inning NUMBER only (never the full score column)
   - no post-play receipt banner
   - cleaner, centered Game Information
   - centered live status with correct dark-mode text contrast
   - Light Mode mirrors Dark Mode's uncluttered score-grid treatment
   ========================================================== */

/* Current inning: keep every scoring cell neutral. The inning header/number
   alone carries the active cue so baseball paths never compete with UI color. */
.unified-score-table .play-cell.active-inning-col,
.unified-score-table td.active-inning-col:not(.score-head-inning){
  background:var(--score-grid-bg)!important;
  color:inherit!important;
  box-shadow:none!important;
}
.unified-score-table .score-head-inning.active-inning-col{
  background:var(--score-grid-head)!important;
  color:var(--accent)!important;
  box-shadow:none!important;
  font-weight:950!important;
  text-shadow:0 0 9px color-mix(in srgb,var(--accent) 58%,transparent)!important;
}
body.theme-default:not(.home-page) .unified-score-table .score-head-inning.active-inning-col{
  background:#f7f9fc!important;
  color:#075fca!important;
  box-shadow:none!important;
  text-shadow:0 0 8px rgba(7,95,202,.28)!important;
}
body.theme-default.dark-mode:not(.home-page) .unified-score-table .score-head-inning.active-inning-col{
  background:#202226!important;
  color:#78b7ff!important;
  box-shadow:none!important;
  text-shadow:0 0 10px rgba(39,134,237,.55)!important;
}

/* Light mode uses the same clean score-grid philosophy as dark mode:
   white scoring cells, subtle grid, and no full-column selection wash. */
body.theme-default:not(.dark-mode):not(.home-page) .unified-score-table .play-cell,
body.theme-default:not(.dark-mode):not(.home-page) .unified-score-table td.play-cell{
  background:#fff!important;
}

/* Game Information: keep equal 3x2 geometry, but center each icon/value group
   and make the icon a little smaller so the copy owns the tile. */
body.theme-default:not(.home-page) .game-info.with-extras .game-field{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:7px!important;
  padding:9px 8px!important;
  min-height:72px!important;
  text-align:center!important;
}
body.theme-default:not(.home-page) .game-info-icon{
  width:32px!important;
  height:32px!important;
  flex:0 0 32px!important;
  border-radius:10px!important;
  font-size:15px!important;
}
body.theme-default:not(.home-page) .game-info .game-field-copy{
  flex:0 1 auto!important;
  width:auto!important;
  max-width:calc(100% - 39px)!important;
  min-width:0!important;
  text-align:center!important;
}
body.theme-default:not(.home-page) .game-info .game-field-copy label{
  text-align:center!important;
  margin-bottom:3px!important;
}
body.theme-default:not(.home-page) .game-info .game-field-copy input,
body.theme-default:not(.home-page) .game-info .game-field-copy textarea{
  text-align:center!important;
  margin-inline:auto!important;
  line-height:1.18!important;
}
body.theme-default:not(.home-page) .game-info .game-field-copy textarea{
  display:block!important;
  min-height:34px!important;
  height:auto!important;
  max-height:40px!important;
}

/* Live game status: visually center both teams around the inning state rather
   than pinning abbreviations to the outer card edges. */
body.theme-default:not(.home-page) .live-game-bar{
  grid-template-columns:minmax(0,1fr) minmax(142px,auto) minmax(0,1fr)!important;
  gap:12px!important;
  padding-inline:14px!important;
}
body.theme-default:not(.home-page) .live-team,
body.theme-default:not(.home-page) .live-team.right{
  display:grid!important;
  justify-items:center!important;
  align-content:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:2px!important;
}
body.theme-default:not(.home-page) .live-team strong{
  font-size:13px!important;
  line-height:1.05!important;
}
body.theme-default:not(.home-page) .live-team span{
  font-size:9px!important;
  line-height:1.1!important;
}
body.theme-default:not(.home-page) .live-team b{font-size:12px!important}
body.theme-default:not(.home-page) .live-inning{min-width:142px!important;gap:2px!important}
body.theme-default:not(.home-page) .live-inning>strong{font-size:13px!important}
body.theme-default:not(.home-page) .live-inning .live-batter{
  max-width:180px!important;
  text-align:center!important;
  font-size:8.5px!important;
}

/* Explicit dark-mode foregrounds fix the COL / batter / WSH text that was
   inheriting light-theme navy in the live-status card. */
body.theme-default.dark-mode:not(.home-page) .live-team strong,
body.theme-default.dark-mode:not(.home-page) .live-team span b,
body.theme-default.dark-mode:not(.home-page) .live-inning .live-batter b{
  color:#f5f6f7!important;
}
body.theme-default.dark-mode:not(.home-page) .live-team span,
body.theme-default.dark-mode:not(.home-page) .live-inning .live-batter,
body.theme-default.dark-mode:not(.home-page) .live-status-row{
  color:#aeb4bc!important;
}

@media(max-width:600px){
  body.theme-default:not(.home-page) .game-info.with-extras .game-field{
    min-height:68px!important;
    padding:7px 5px!important;
    gap:5px!important;
  }
  body.theme-default:not(.home-page) .game-info-icon{
    width:27px!important;height:27px!important;flex-basis:27px!important;
    border-radius:8px!important;font-size:13px!important;
  }
  body.theme-default:not(.home-page) .game-info .game-field-copy{
    max-width:calc(100% - 32px)!important;
  }
  body.theme-default:not(.home-page) .game-info .game-field-copy label{
    font-size:7.7px!important;
  }
  body.theme-default:not(.home-page) .game-info .game-field-copy input,
  body.theme-default:not(.home-page) .game-info .game-field-copy textarea{
    font-size:12.5px!important;
  }
  body.theme-default:not(.home-page) .live-game-bar{
    grid-template-columns:minmax(0,1fr) 132px minmax(0,1fr)!important;
    gap:4px!important;
    padding:7px 6px!important;
  }
  body.theme-default:not(.home-page) .live-inning{min-width:132px!important}
  body.theme-default:not(.home-page) .live-team strong{font-size:12px!important}
  body.theme-default:not(.home-page) .live-team span{font-size:8px!important}
  body.theme-default:not(.home-page) .live-team b{font-size:10px!important}
  body.theme-default:not(.home-page) .live-inning .live-batter{max-width:132px!important;font-size:7.5px!important}
}


/* ==========================================================
   v105 — Game Center refinement
   Final Game Information treatment + comprehensive Plays/Stats
   ========================================================== */
/* Approved Game Information: uniform tiles, centered hierarchy, standalone icons. */
body.theme-default:not(.home-page) .game-info.with-extras .game-field{
  display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto 26px minmax(28px,auto)!important;
  justify-items:center!important;align-content:center!important;gap:7px!important;padding:12px 8px!important;min-height:104px!important;text-align:center!important;
}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy{display:contents!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy label{grid-row:1!important;text-align:center!important;margin:0!important;font-size:9px!important;letter-spacing:.17em!important;font-weight:900!important;color:var(--muted)!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-info-icon{grid-row:2!important;width:auto!important;height:auto!important;min-width:0!important;flex:none!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font-size:19px!important;color:#67aaf4!important;display:grid!important;place-items:center!important;padding:0!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy input,
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy textarea{grid-row:3!important;text-align:center!important;margin:0 auto!important;font-size:16px!important;font-weight:850!important;line-height:1.12!important;max-width:100%!important;color:var(--text)!important;overflow-wrap:anywhere!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy textarea{min-height:30px!important;max-height:42px!important;white-space:normal!important}
body.theme-default.dark-mode:not(.home-page) .game-info.with-extras .game-info-icon{color:#73b5ff!important}

.v105-page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:13px 15px;margin:10px 0;border-radius:18px}.v105-page-intro small{display:block;font-size:9px;font-weight:900;letter-spacing:.16em;color:var(--muted)}.v105-page-intro h2{font:700 22px/1.05 Georgia,serif;margin:3px 0 5px}.v105-page-intro p{font-size:12.5px;line-height:1.38;color:var(--muted);max-width:620px;margin:0}.v105-play-filters{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:999px;flex:none}.v105-play-filters button{border:0;background:transparent;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:850;color:var(--muted)}.v105-play-filters button.active{background:#0b66d4;color:#fff}
.v105-play-list{display:grid;gap:12px}.v105-inning-card{padding:0;overflow:hidden;border-radius:18px}.v105-inning-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;background:color-mix(in srgb,var(--accent) 6%,transparent);border-bottom:1px solid var(--line)}.v105-inning-identity{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;row-gap:3px;align-items:center;min-width:0}.v105-half-label{grid-column:1/-1;display:flex;align-items:center;gap:8px;color:var(--accent);font-size:10px;font-weight:950;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap}.v105-half-label:after{content:"";height:1px;background:var(--line);flex:1}.v105-inning-identity img{grid-column:1;grid-row:2;width:34px;height:34px;object-fit:contain}.v105-inning-teamline{grid-column:2;grid-row:2;display:flex;align-items:center;gap:7px;min-width:0}.v105-inning-teamline strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v105-batting-pill{font-size:8px;line-height:1;letter-spacing:.11em;font-weight:950;color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);background:color-mix(in srgb,var(--accent) 8%,transparent);border-radius:999px;padding:4px 6px;white-space:nowrap}.v105-inning-kpis{display:flex;gap:2px}.v105-inning-kpis span{display:grid;place-items:center;min-width:40px;padding:4px 7px;border-left:1px solid var(--line)}.v105-inning-kpis b{font-size:14px}.v105-inning-kpis small{font-size:7.5px;color:var(--muted);letter-spacing:.08em}.v105-play-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.55fr) 76px;padding:7px 12px 7px 49px;border-bottom:1px solid var(--line);font-size:7.5px;letter-spacing:.10em;font-weight:900;color:var(--muted)}.v105-play-columns span:last-child{text-align:center}.v105-inning-rows{display:grid}.v105-play-event{display:grid;grid-template-columns:28px minmax(0,1fr) 76px;gap:9px;align-items:center;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;color:inherit;padding:10px 12px;min-height:82px}.v105-play-event:last-child{border-bottom:0}.v105-play-event:active{background:color-mix(in srgb,var(--accent) 8%,transparent)}.v105-pa-num{width:27px;height:27px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:850;color:var(--muted)}.v105-event-body{min-width:0;display:grid;gap:5px}.v105-event-top{display:flex;align-items:center;gap:7px;min-width:0}.v105-event-top>strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v105-event-top>small{font-size:9px;color:var(--muted);white-space:nowrap}.v105-result-pill{margin-left:auto;padding:4px 7px;border-radius:7px;border:1px solid var(--line);font-size:9px;font-style:normal;font-weight:900;white-space:nowrap}.v105-result-pill.hit{color:#1b9a4b;border-color:#51b87555;background:#45b96b12}.v105-result-pill.out{color:#d14a4a;border-color:#d5545455;background:#d5545410}.v105-result-pill.onbase{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);background:color-mix(in srgb,var(--accent) 8%,transparent)}.v105-result-pill.runner{color:#b98018;border-color:#c2943d55;background:#c2943d10}.v105-result-detail,.v105-movement{display:flex;align-items:baseline;gap:7px;min-width:0}.v105-result-detail{font-size:11px}.v105-result-detail b,.v105-movement b{font-size:8px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);flex:none}.v105-movement em{font-size:11px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v105-event-metrics{display:grid;grid-template-columns:1fr 1fr;gap:4px;align-items:center}.v105-event-metrics span{display:grid;place-items:center;border-left:1px solid var(--line);padding:3px}.v105-event-metrics b{font-size:14px}.v105-event-metrics small{font-size:7px;letter-spacing:.08em;color:var(--muted)}.v105-event-metrics>i{grid-column:1/-1;text-align:center;color:var(--accent);font-style:normal;font-size:14px}
.v105-stats-intro>span{border:1px solid rgba(11,102,212,.32);background:rgba(11,102,212,.08);border-radius:999px;padding:7px 11px;color:#0b66d4;font-size:10px;font-weight:850}.v105-linescore{padding:0;overflow:hidden;border-radius:18px;margin-bottom:12px}.v105-subhead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;border-bottom:1px solid var(--line)}.v105-subhead strong{font-size:11px;text-transform:uppercase;letter-spacing:.08em}.v105-subhead span{font-size:8.5px;color:var(--muted)}.v105-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.v105-linescore table,.v105-stat-block table{border-collapse:collapse;width:100%;min-width:560px}.v105-linescore th,.v105-linescore td{padding:8px 9px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center;font-size:11px}.v105-linescore th:first-child{text-align:left;position:sticky;left:0;background:var(--card);z-index:1}.v105-linescore th:first-child span{display:flex;align-items:center;gap:7px}.v105-linescore th:first-child img{width:20px;height:20px;object-fit:contain}.v105-linescore .sum{font-weight:900}.v105-team-stack{display:grid;gap:16px}.v105-team-section{padding:0;overflow:hidden;border-radius:20px}.v105-team-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 12%,transparent),transparent 76%)}.v105-team-section.home .v105-team-head{background:linear-gradient(90deg,color-mix(in srgb,var(--muted) 10%,transparent),transparent 76%)}.v105-team-role{display:block;font-size:8px;letter-spacing:.16em;font-weight:950;color:var(--accent);margin-bottom:5px}.v105-team-id{display:flex;align-items:center;gap:9px}.v105-team-id img{width:38px;height:38px;object-fit:contain}.v105-team-id span{display:grid}.v105-team-id strong{font-size:15px}.v105-team-id small{font-size:9px;color:var(--muted)}.v105-rhe{display:flex}.v105-rhe span{min-width:38px;padding:3px 6px;text-align:center;border-left:1px solid var(--line)}.v105-rhe b{display:block;font-size:15px}.v105-rhe small{font-size:7px;color:var(--muted)}.v105-rate-grid{display:grid;grid-template-columns:repeat(6,1fr);border-bottom:1px solid var(--line)}.v105-rate-grid span{padding:9px 4px;text-align:center;border-right:1px solid var(--line)}.v105-rate-grid span:last-child{border-right:0}.v105-rate-grid b{display:block;font-size:13px}.v105-rate-grid small{font-size:7px;letter-spacing:.07em;color:var(--muted)}.v105-rate-four{grid-template-columns:repeat(4,1fr)}.v105-stat-block{border-bottom:1px solid var(--line)}.v105-stat-block th,.v105-stat-block td{padding:8px 9px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center;font-size:10.5px;white-space:nowrap}.v105-stat-block thead th{font-size:7.5px;letter-spacing:.07em;color:var(--muted);background:color-mix(in srgb,var(--card) 92%,var(--accent) 8%)}.v105-stat-block th:first-child{position:sticky;left:0;z-index:2;min-width:148px;text-align:left;background:var(--card)}.v105-stat-block th:first-child b{font-size:11px}.v105-stat-block th:first-child small{display:block;font-size:8px;color:var(--muted);font-weight:500}.v105-secondary-stats{display:grid;grid-template-columns:1fr 1fr}.v105-secondary-stats>section:first-child{border-right:1px solid var(--line)}.v105-secondary-stats>section>div:last-child{display:grid;grid-template-columns:repeat(4,1fr)}.v105-secondary-stats>section>div:last-child span{text-align:center;padding:9px 4px;border-right:1px solid var(--line)}.v105-secondary-stats>section>div:last-child span:last-child{border-right:0}.v105-secondary-stats b{display:block;font-size:13px}.v105-secondary-stats small{font-size:7px;color:var(--muted)}.v105-fielding-detail{border-bottom:0}.v105-stats-page{padding-bottom:10px}
body.dark-mode .v105-stats-intro>span{color:#69aaf7;background:rgba(47,128,237,.12);border-color:rgba(83,150,238,.35)}
@media(max-width:600px){body.theme-default:not(.home-page) .game-info.with-extras .game-field{min-height:96px!important;padding:10px 5px!important;gap:5px!important}body.theme-default:not(.home-page) .game-info.with-extras .game-info-icon{font-size:16px!important}body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy label{font-size:7.8px!important}body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy input,body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy textarea{font-size:14px!important}.v105-page-intro{align-items:flex-start}.v105-page-intro p{max-width:300px}.v105-play-columns{display:none}.v105-inning-kpis span{min-width:34px;padding:4px 4px}.v105-event-top>strong{font-size:13px}.v105-result-pill{font-size:8.5px}.v105-secondary-stats{grid-template-columns:1fr}.v105-secondary-stats>section:first-child{border-right:0;border-bottom:1px solid var(--line)}}


/* v105 final polish: native picker glyphs are redundant with the approved blue icons. */
body.theme-default:not(.home-page) .game-info input[type="date"]::-webkit-calendar-picker-indicator,
body.theme-default:not(.home-page) .game-info input[type="time"]::-webkit-calendar-picker-indicator{opacity:0!important;width:0!important;height:0!important;margin:0!important;padding:0!important}
.v105-linescore.short table{min-width:100%!important}


/* ==========================================================
   v105 — Device UX refinement
   ========================================================== */

/* Approved Game Information target: compact uniform 3x2, centered, standalone icon. */
body.theme-default:not(.home-page) .game-info.with-extras{border-radius:18px!important;overflow:hidden!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-field{
  min-height:78px!important;height:78px!important;padding:7px 5px!important;gap:2px!important;
  grid-template-columns:1fr!important;grid-template-rows:13px 18px minmax(22px,auto)!important;
  justify-items:center!important;align-content:center!important;text-align:center!important;
}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy{display:contents!important}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy label{
  grid-row:1!important;margin:0!important;text-align:center!important;font-size:7.4px!important;line-height:1!important;
  letter-spacing:.18em!important;font-weight:900!important;color:var(--muted)!important;
}
body.theme-default:not(.home-page) .game-info.with-extras .game-info-icon{
  grid-row:2!important;width:auto!important;height:auto!important;min-width:0!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
  font-size:14px!important;line-height:1!important;color:#65aaf5!important;display:grid!important;place-items:center!important;
}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy input,
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy textarea{
  grid-row:3!important;width:100%!important;max-width:100%!important;margin:0 auto!important;padding:0 3px!important;
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:var(--text)!important;
  text-align:center!important;font-family:inherit!important;font-size:13.5px!important;font-weight:850!important;line-height:1.06!important;
  overflow:hidden!important;overflow-wrap:anywhere!important;
}
body.theme-default:not(.home-page) .game-info.with-extras .game-field-copy textarea{
  min-height:28px!important;max-height:30px!important;height:30px!important;resize:none!important;white-space:normal!important;
}
body.theme-default.dark-mode:not(.home-page) .game-info.with-extras .game-info-icon{color:#74b8ff!important}

/* Lineup Manager: selected team is obvious and player editor is visible above the sheet. */
#lineupManagerModal:not(.hidden){z-index:132!important}
#playerModal:not(.hidden){z-index:154!important}
.v102-side-tabs{gap:4px!important;padding:4px!important;background:var(--ui-surface-2)!important}
.v102-side-tabs button{min-height:42px!important;border:1px solid transparent!important;transition:background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease!important}
.v102-side-tabs button.active{background:#0b66d4!important;color:#fff!important;border-color:#0b66d4!important;box-shadow:0 3px 10px rgba(11,102,212,.22)!important}
body.dark-mode .v102-side-tabs button.active{background:#2f80ed!important;border-color:#4b92ef!important;color:#fff!important}
.v102-lineup-row:active{background:color-mix(in srgb,var(--accent) 9%,var(--ui-surface))!important}

/* Stats: fixed sticky player column, clipped text, and separator shadow prevent overlap while swiping. */
.v105-batting-table{min-width:1120px!important}
.v105-batting-table th:first-child{
  width:164px!important;min-width:164px!important;max-width:164px!important;box-sizing:border-box!important;overflow:hidden!important;
  background:var(--card)!important;box-shadow:8px 0 12px -12px rgba(0,0,0,.65)!important;
}
.v105-batting-table thead th:first-child{background:color-mix(in srgb,var(--card) 92%,var(--accent) 8%)!important}
.v105-batting-table tbody th:first-child b{
  display:block!important;max-width:145px!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.1!important;
}
.v105-batting-table tbody th:first-child small{margin-top:3px!important}
body:not(.dark-mode) .v105-batting-table th:first-child{box-shadow:8px 0 12px -12px rgba(15,23,42,.38)!important}

/* Basic mode Summary uses the same visible Scorecard/Summary switcher. */
.basic-summary-workspace .mode-workspace-tabs{margin-top:7px!important}
/* v105 stats overlap hotfix: --card is undefined in Default theme, so sticky cells need solid surfaces. */
.v105-batting-table th:first-child{background:var(--panel)!important;z-index:5!important}
.v105-batting-table thead th:first-child{background:var(--panel2)!important;z-index:6!important}
body.dark-mode .v105-batting-table th:first-child{background:var(--panel)!important}
#lineupManagerModal .v102-side-tabs button.active{background:#0b66d4!important;background-color:#0b66d4!important;background-image:none!important;color:#fff!important;border-color:#0b66d4!important}
body.dark-mode #lineupManagerModal .v102-side-tabs button.active{background:#2f80ed!important;background-color:#2f80ed!important;color:#fff!important;border-color:#4b92ef!important}

/* ==========================================================
   v107 — Interaction cleanup / stats scrolling consistency
   ========================================================== */

/* Stats: Pitcher is the identity column and must stay opaque while numeric
   columns scroll underneath, matching the approved Batting behavior. */
.v105-pitch-table{min-width:690px!important}
.v105-pitch-table th:first-child{
  position:sticky!important;left:0!important;z-index:5!important;
  width:164px!important;min-width:164px!important;max-width:164px!important;
  box-sizing:border-box!important;overflow:hidden!important;text-align:left!important;
  background:var(--panel)!important;
  box-shadow:8px 0 12px -12px rgba(15,23,42,.38)!important;
}
.v105-pitch-table thead th:first-child{
  z-index:6!important;background:var(--panel2)!important;
}
.v105-pitch-table tbody th:first-child{
  white-space:normal!important;line-height:1.1!important;text-overflow:ellipsis!important;
}
body.dark-mode .v105-pitch-table th:first-child{
  background:var(--panel)!important;box-shadow:8px 0 12px -12px rgba(0,0,0,.72)!important;
}
body.dark-mode .v105-pitch-table thead th:first-child{background:var(--panel2)!important}

/* Fielding detail uses the same no-show-through rule for its smaller identity column. */
.v105-fielding-detail table th:first-child{
  position:sticky!important;left:0!important;z-index:5!important;
  min-width:74px!important;background:var(--panel)!important;
  box-shadow:8px 0 12px -12px rgba(15,23,42,.34)!important;
}
.v105-fielding-detail table thead th:first-child{z-index:6!important;background:var(--panel2)!important}
body.dark-mode .v105-fielding-detail table th:first-child{background:var(--panel)!important;box-shadow:8px 0 12px -12px rgba(0,0,0,.68)!important}
body.dark-mode .v105-fielding-detail table thead th:first-child{background:var(--panel2)!important}

/* Keep selected lineup tab state equally legible in both palettes and expose a
   keyboard/accessibility focus treatment without changing the approved layout. */
#lineupManagerModal .v102-side-tabs [role="tab"]:focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px!important}

/* The fixed identity cells in Stats should always inherit the active theme text
   color rather than a Light-only or Dark-only hard-coded value. */
.v105-batting-table th:first-child,.v105-pitch-table th:first-child,.v105-fielding-detail table th:first-child{color:var(--text)!important}

/* v107 Safari horizontal-table containment. */
.v105-table-scroll{position:relative!important;isolation:isolate!important;overscroll-behavior-x:contain!important;touch-action:pan-x pan-y pinch-zoom!important}
.v105-batting-table th:first-child,.v105-pitch-table th:first-child,.v105-fielding-detail table th:first-child{background-clip:padding-box!important}

/* ========================================================================
   v108 — PITCH EDITOR COMPACTNESS + DARK HOME CONTRAST
   Functionality-first polish requested from real-device v107 testing.
   ======================================================================== */

/* Home: CURRENT GAME / READY / FINAL must remain readable in true dark mode. */
body.home-page.theme-default.dark-mode .v97-current-head>span{
  color:#dfe4eb!important;
}
body.home-page.theme-default.dark-mode .v97-current-head>span i{
  background:#2b8cff!important;
  box-shadow:0 0 0 4px rgba(43,140,255,.12)!important;
}
body.home-page.theme-default.dark-mode .v97-current-head em{
  background:#f5f7fa!important;
  border-color:#b9c8dc!important;
  color:#235f9f!important;
}

/* Play editor: use vertical space more deliberately without shrinking key type. */
#playModal .play-card.pitch-mode-editor{
  padding-top:10px!important;
}
#playModal .play-card.pitch-mode-editor .modal-head{
  padding-top:7px!important;
  padding-bottom:7px!important;
}
#playModal .play-card.pitch-mode-editor .situation{
  min-height:42px!important;
  margin-top:5px!important;
  padding:7px 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .editor-context-hint{
  margin:6px 0 7px!important;
  padding:7px 9px!important;
  min-height:0!important;
}
#playModal .play-card.pitch-mode-editor .editor-guide{
  margin:5px 0 7px!important;
  min-height:43px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-tools{
  margin:4px 0 8px!important;
  border-radius:15px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-tools-head{
  min-height:68px!important;
  padding:7px 9px!important;
  gap:7px!important;
  grid-template-columns:minmax(0,1fr) 90px!important;
  align-items:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-title-copy{
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-title-copy .pitch-kicker{
  margin-bottom:2px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-title-copy>strong{
  font-size:14px!important;
  line-height:1.05!important;
}
#playModal .play-card.pitch-mode-editor .pitch-title-copy>small{
  max-width:none!important;
  margin-top:3px!important;
  font-size:7.5px!important;
  line-height:1.2!important;
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-count-card{
  min-width:90px!important;
  padding:5px 7px!important;
  border-radius:12px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-count-card>b{
  font-size:23px!important;
  margin:2px 0!important;
}
#playModal .play-card.pitch-mode-editor .pitch-count-lights{
  padding:5px 8px!important;
  min-height:30px!important;
  justify-content:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-card{
  padding:7px 9px 8px!important;
  border-radius:14px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-card-head{
  margin-bottom:5px!important;
  padding-bottom:2px!important;
  justify-content:center!important;
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-card-head strong{
  font-size:10px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-card-head small{
  margin-top:2px!important;
  font-size:7px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-grid{
  gap:6px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-grid label>span{
  min-height:16px!important;
  height:auto!important;
  margin:0 0 3px!important;
  justify-content:center!important;
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-grid select,
#playModal .play-card.pitch-mode-editor .pitch-entry-grid input,
#playModal .play-card.pitch-mode-editor .pitch-velo-wrap{
  height:40px!important;
  min-height:40px!important;
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .pitch-entry-grid select{
  text-align:center!important;
  text-align-last:center!important;
  padding-left:24px!important;
  padding-right:30px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-velo-wrap input{
  text-align:center!important;
}

/* Record Pitch is a primary step inside the pitch workflow, but remains quieter
   than Apply Play. */
body.theme-default #playModal .play-card.pitch-mode-editor .record-pitch-btn{
  min-height:44px!important;
  border:1.5px solid #78aeea!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#eef6ff 0%,#e3f0ff 100%)!important;
  color:#0b55b5!important;
  box-shadow:0 3px 9px rgba(11,85,181,.09)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  text-align:center!important;
}
body.theme-default #playModal .play-card.pitch-mode-editor .record-pitch-btn>span{
  color:#0b55b5!important;
}
body.theme-default #playModal .play-card.pitch-mode-editor .record-pitch-btn>strong{
  color:#0b55b5!important;
  font-size:11px!important;
}
body.theme-default #playModal .play-card.pitch-mode-editor .record-pitch-btn>small{
  display:none!important;
}
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .record-pitch-btn{
  background:linear-gradient(180deg,#173b65 0%,#153457 100%)!important;
  border-color:#3d84cf!important;
  color:#f4f8ff!important;
  box-shadow:0 3px 10px rgba(0,0,0,.18)!important;
}
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .record-pitch-btn>span,
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .record-pitch-btn>strong{
  color:#f4f8ff!important;
}

#playModal .play-card.pitch-mode-editor .pitch-sequence-card{
  padding:7px 9px 8px!important;
  border-radius:14px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-sequence-head{
  margin-bottom:4px!important;
  padding-bottom:2px!important;
}
#playModal .play-card.pitch-mode-editor .pitch-empty{
  min-height:42px!important;
  padding:6px 8px!important;
}

/* Pitch-mode batter result gets enough room for full result labels such as
   Strikeout Swinging while keeping notation available beside it. */
#playModal .play-card.pitch-mode-editor #batterResultGrid{
  grid-template-columns:minmax(0,1.45fr) minmax(104px,.55fr)!important;
  column-gap:7px!important;
}
#playModal .play-card.pitch-mode-editor #batterResultGrid select{
  font-size:14px!important;
}

/* If a two-column editor row has only one visible field, don't leave a dead
   half-column beside it. */
#playModal .play-card.pitch-mode-editor .editor-grid.two>label:only-child,
#playModal .play-card.pitch-mode-editor .editor-grid.two>label:not(.hidden):last-child:first-child{
  grid-column:1/-1!important;
}

@media(max-width:430px){
  #playModal .play-card.pitch-mode-editor{
    padding-left:12px!important;
    padding-right:12px!important;
  }
  #playModal .play-card.pitch-mode-editor .pitch-tools-head{
    grid-template-columns:minmax(0,1fr) 86px!important;
  }
  #playModal .play-card.pitch-mode-editor .pitch-count-card{min-width:86px!important}
  #playModal .play-card.pitch-mode-editor #batterResultGrid{
    grid-template-columns:minmax(0,1.5fr) minmax(96px,.5fr)!important;
  }
}

/* v108 follow-up QA: dark conversion + centered compact field presentation. */
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .pitch-entry-card-head strong,
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .pitch-sequence-head strong{
  color:#eef2f6!important;
}
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .pitch-entry-card-head small,
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .pitch-sequence-head small{
  color:#aeb6c1!important;
}
body.theme-default.dark-mode #playModal .play-card.pitch-mode-editor .pitch-count-lights{
  color:#b7c0cb!important;
}

#playModal .play-card.pitch-mode-editor #batterResultGrid .field-label,
#playModal .play-card.pitch-mode-editor #runnerGrid .field-label,
#playModal .play-card.pitch-mode-editor .score-field-title{
  justify-content:center!important;
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor #batterResultGrid select,
#playModal .play-card.pitch-mode-editor #batterResultGrid input,
#playModal .play-card.pitch-mode-editor #runnerGrid select,
#playModal .play-card.pitch-mode-editor #runnerGrid input,
#playModal .play-card.pitch-mode-editor .score-field-card select{
  text-align:center!important;
  text-align-last:center!important;
}
#playModal .play-card.pitch-mode-editor #batterResultGrid input::placeholder,
#playModal .play-card.pitch-mode-editor #runnerGrid input::placeholder{
  text-align:center!important;
}
#playModal .play-card.pitch-mode-editor .score-toggle-copy{
  text-align:center!important;
}


/* ==========================================================
   v110 — Editor layout refinement
   Basic: content-fitted quick grid
   Advanced: actual position-only defense field + centered runner cards
   Pitch-by-Pitch: refined count + sequence-first split workflow
   ========================================================== */

/* Shared editor shell: compact content, no artificial section stretching. */
body.editor-basic-v110 #playModal .editor-context-hint,
body.editor-basic-v110 #playModal .editor-guide,
body.editor-advanced-v110 #playModal .editor-context-hint,
body.editor-advanced-v110 #playModal .editor-guide,
body.editor-pitch-v110 #playModal .editor-context-hint,
body.editor-pitch-v110 #playModal .editor-guide{display:none!important}

body.editor-basic-v110 #playModal .play-card,
body.editor-advanced-v110 #playModal .play-card,
body.editor-pitch-v110 #playModal .play-card{width:100%!important;max-width:100%!important;margin:0!important;padding:0 14px 18px!important;background:var(--panel)!important;box-shadow:none!important;overflow-y:auto!important;overscroll-behavior:contain!important}
body.editor-advanced-v110 #playModal .play-card,
body.editor-pitch-v110 #playModal .play-card{height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
body.editor-basic-v110 #playModal .modal-head,
body.editor-advanced-v110 #playModal .modal-head,
body.editor-pitch-v110 #playModal .modal-head{position:sticky!important;top:0!important;z-index:30!important;margin:0 -14px 8px!important;padding:18px 14px 10px!important;background:color-mix(in srgb,var(--panel) 97%,transparent)!important;border-bottom:1px solid color-mix(in srgb,var(--line) 68%,transparent)!important;backdrop-filter:blur(16px)!important}
body.editor-basic-v110 #playModal .modal-head button,
body.editor-advanced-v110 #playModal .modal-head button,
body.editor-pitch-v110 #playModal .modal-head button{width:42px!important;height:42px!important;border-radius:13px!important}
body.editor-basic-v110 #playModal .situation,
body.editor-advanced-v110 #playModal .situation,
body.editor-pitch-v110 #playModal .situation{min-height:42px!important;margin:4px 0 10px!important;border-radius:13px!important;font-size:15px!important;display:flex!important;align-items:center!important;justify-content:center!important;background:var(--soft)!important;border:1px solid var(--line)!important}
body.editor-basic-v110 #playModal .editor-section-title,
body.editor-advanced-v110 #playModal .editor-section-title,
body.editor-pitch-v110 #playModal .editor-section-title{font-size:11px!important;letter-spacing:.12em!important;margin:10px 0 6px!important;color:var(--muted)!important}
body.editor-basic-v110 #playModal input,body.editor-basic-v110 #playModal select,
body.editor-advanced-v110 #playModal input,body.editor-advanced-v110 #playModal select,
body.editor-pitch-v110 #playModal input,body.editor-pitch-v110 #playModal select{width:100%!important;min-width:0!important;box-sizing:border-box!important;min-height:48px!important;border-radius:13px!important;font-size:15px!important}

/* BASIC — Quick Grid with a true content-fitted bottom sheet. */
body.editor-basic-v110 #playModal:not(.hidden){display:flex!important;align-items:flex-end!important;justify-content:center!important;position:fixed!important;inset:0!important;padding:0!important;background:rgba(8,15,24,.24)!important;backdrop-filter:blur(2px)!important;z-index:999!important}
body.editor-basic-v110 #playModal .play-card{height:auto!important;min-height:0!important;max-height:calc(100dvh - 44px)!important;border-radius:24px 24px 0 0!important;box-shadow:0 -18px 44px rgba(0,0,0,.18)!important}
body.editor-basic-v110 #playModal #advancedTools,body.editor-basic-v110 #playModal #pitchTools{display:none!important}
body.editor-basic-v110 #playModal #batterResultGrid{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,.65fr)!important;gap:8px!important}
body.editor-basic-v110 #playModal #batterResultGrid>label{min-width:0!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important}
body.editor-basic-v110 #playModal #batterResultGrid .field-label{font-size:11px!important;margin-bottom:5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.editor-basic-v110 #playModal .basic-runner-line{display:grid!important;grid-template-columns:minmax(0,1.55fr) minmax(0,.85fr)!important;gap:8px!important;align-items:stretch!important}
body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid{display:block!important;min-width:0!important}
body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label{height:100%!important;min-width:0!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
body.editor-basic-v110 #playModal #advanceReasonField.hidden{display:none!important}
body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card{min-width:0!important;min-height:0!important;height:auto!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:7px!important}
body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card .score-field-title{text-align:center!important;margin:0!important;font-size:10px!important}
body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-control{justify-content:center!important}
body.editor-basic-v110 #playModal .scoring-panel{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;border:0!important;background:transparent!important;padding:0!important}
body.editor-basic-v110 #playModal .score-field-card{min-height:78px!important;padding:8px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
body.editor-basic-v110 #playModal .modal-actions{position:static!important;margin:12px -14px -18px!important;padding:10px 14px calc(12px + env(safe-area-inset-bottom))!important;background:var(--panel)!important;border-top:1px solid var(--line)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
body.editor-basic-v110 #playModal #applyPlayBtn{grid-column:1/-1!important;min-height:52px!important}

/* Shared batter result overlap protection. */
body.editor-advanced-v110 #playModal #batterResultGrid,
body.editor-pitch-v110 #playModal #batterResultGrid{display:grid!important;grid-template-columns:minmax(0,1.55fr) minmax(116px,.7fr)!important;gap:9px!important;align-items:stretch!important}
body.editor-advanced-v110 #playModal #batterResultGrid>label,
body.editor-pitch-v110 #playModal #batterResultGrid>label{min-width:0!important;overflow:hidden!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important}
body.editor-advanced-v110 #playModal #batterResultGrid .field-label,
body.editor-pitch-v110 #playModal #batterResultGrid .field-label{display:flex!important;align-items:baseline!important;gap:4px!important;min-width:0!important;font-size:11px!important;margin-bottom:5px!important;white-space:nowrap!important}
body.editor-advanced-v110 #playModal #batterResultGrid .field-help,
body.editor-pitch-v110 #playModal #batterResultGrid .field-help{font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* ADVANCED — real defensive field, position-only controls. */
body.editor-advanced-v110 #playModal #advancedTools{border:0!important;padding:0!important;margin:5px 0 0!important;background:transparent!important}
body.editor-advanced-v110 #playModal #advancedTools>.advanced-title{display:none!important}
body.editor-advanced-v110 #playModal .advanced-layout{display:block!important}
body.editor-advanced-v110 #playModal .defense-field-card,
body.editor-advanced-v110 #playModal .advanced-runner-card{height:auto!important;min-height:0!important;border:1px solid var(--line)!important;border-radius:18px!important;background:var(--soft)!important;padding:11px!important;margin:0 0 10px!important;box-shadow:none!important;overflow:hidden!important}
body.editor-advanced-v110 #playModal .field-card-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin-bottom:8px!important}
body.editor-advanced-v110 #playModal .field-card-head strong{font-size:13px!important;letter-spacing:.055em!important}
body.editor-advanced-v110 #playModal .field-card-head small{font-size:10px!important}
body.editor-advanced-v110 #playModal #clearFieldersBtn{min-height:38px!important;width:auto!important;padding:0 12px!important;border-radius:11px!important}
body.editor-advanced-v110 #playModal .fielder-grid{position:relative!important;display:block!important;width:100%!important;height:300px!important;border-radius:18px!important;overflow:hidden!important;background:linear-gradient(180deg,#eef8ef 0%,#dcefdc 58%,#ead9b9 100%)!important;border:1px solid color-mix(in srgb,#1d74d5 20%,var(--line))!important}
body.editor-advanced-v110.dark-mode #playModal .fielder-grid{background:linear-gradient(180deg,#183423 0%,#102a1d 58%,#403626 100%)!important}
body.editor-advanced-v110 #playModal .defense-field-surface{position:absolute!important;inset:0!important;pointer-events:none!important}
body.editor-advanced-v110 #playModal .defense-outfield{position:absolute!important;left:7%!important;right:7%!important;top:7%!important;height:66%!important;border-radius:50% 50% 18% 18% / 76% 76% 24% 24%!important;border:1px solid rgba(69,139,81,.28)!important;background:repeating-radial-gradient(ellipse at 50% 83%,rgba(45,135,64,.10) 0 14px,rgba(255,255,255,.03) 15px 28px)!important}
body.editor-advanced-v110 #playModal .defense-infield{position:absolute!important;width:37%!important;aspect-ratio:1!important;left:50%!important;top:56%!important;transform:translate(-50%,-50%) rotate(45deg)!important;border-radius:5px!important;background:color-mix(in srgb,#d6b77b 44%,transparent)!important;border:2px solid color-mix(in srgb,#fff 65%,#d3b678)!important}
body.editor-advanced-v110 #playModal .defense-mound{position:absolute!important;width:25px!important;height:25px!important;border-radius:50%!important;left:50%!important;top:56%!important;transform:translate(-50%,-50%)!important;background:color-mix(in srgb,#d6b77b 62%,var(--panel))!important;border:1px solid color-mix(in srgb,#fff 65%,#c7a966)!important}
body.editor-advanced-v110 #playModal .defense-home{position:absolute!important;width:13px!important;height:13px!important;left:50%!important;top:88%!important;transform:translate(-50%,-50%) rotate(45deg)!important;background:var(--panel)!important;border:1px solid var(--line)!important}
body.editor-advanced-v110 #playModal .fielder-grid-team{position:absolute!important;left:12px!important;top:10px!important;z-index:5!important;display:flex!important;flex-direction:column!important;gap:1px!important;padding:6px 8px!important;border-radius:10px!important;background:color-mix(in srgb,var(--panel) 90%,transparent)!important;border:1px solid color-mix(in srgb,var(--line) 72%,transparent)!important;backdrop-filter:blur(8px)!important}
body.editor-advanced-v110 #playModal .fielder-grid-team span{font-size:9px!important;font-weight:900!important;letter-spacing:.09em!important}
body.editor-advanced-v110 #playModal .fielder-grid-team small{font-size:7px!important}
body.editor-advanced-v110 #playModal .defense-sequence-lines{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:3!important;pointer-events:none!important;overflow:visible!important}
body.editor-advanced-v110 #playModal .defense-sequence-lines line{stroke:#1674dc!important;stroke-width:1.7!important;vector-effect:non-scaling-stroke!important;marker-end:url(#defenseArrow)!important;opacity:.9!important}
body.editor-advanced-v110 #playModal .defense-sequence-lines marker path{fill:#1674dc!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos{position:absolute!important;z-index:4!important;transform:translate(-50%,-50%)!important;width:47px!important;height:47px!important;min-height:47px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:color-mix(in srgb,var(--panel) 96%,transparent)!important;border:1.5px solid color-mix(in srgb,var(--text) 42%,var(--line))!important;box-shadow:0 4px 10px rgba(0,0,0,.10)!important;color:var(--text)!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos>span{width:auto!important;height:auto!important;background:transparent!important;border:0!important;color:inherit!important;font-size:13px!important;font-weight:900!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos>strong,body.editor-advanced-v110 #playModal .fielder-grid-pos>small{display:none!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos.selected{background:#1674dc!important;border-color:#1674dc!important;color:#fff!important;box-shadow:0 0 0 4px color-mix(in srgb,#1674dc 18%,transparent),0 5px 12px rgba(22,116,220,.24)!important}
body.editor-advanced-v110 #playModal .fielder-selection{margin-top:8px!important;padding:9px 11px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important;text-align:center!important;font-size:11px!important;font-weight:800!important;color:var(--muted)!important}

/* Advanced runners: centered, compact, content-driven cards. */
body.editor-advanced-v110 #playModal .runner-event-head{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;text-align:center!important}
body.editor-advanced-v110 #playModal .runner-event-head>div{display:grid!important;justify-items:center!important;gap:2px!important}
body.editor-advanced-v110 #playModal .runner-event-control{display:grid!important;grid-template-columns:100px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;width:100%!important;max-width:100%!important;text-align:left!important}
body.editor-advanced-v110 #playModal .runner-event-control>span{text-align:right!important;font-size:11px!important}
body.editor-advanced-v110 #playModal .runner-event-control select{min-height:44px!important}
body.editor-advanced-v110 #playModal .advanced-runner-list{display:grid!important;gap:8px!important;margin-top:2px!important}
body.editor-advanced-v110 #playModal .advanced-runner-row{width:100%!important;box-sizing:border-box!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--panel)!important;padding:10px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;align-items:end!important}
body.editor-advanced-v110 #playModal .advanced-runner-row .runner-ident{grid-column:1/-1!important;display:flex!important;align-items:baseline!important;justify-content:center!important;gap:7px!important;text-align:center!important;padding-bottom:2px!important}
body.editor-advanced-v110 #playModal .advanced-runner-row .runner-ident b{font-size:12px!important;max-width:72%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.editor-advanced-v110 #playModal .advanced-runner-row .runner-ident small{font-size:9px!important;color:var(--muted)!important;white-space:nowrap!important}
body.editor-advanced-v110 #playModal .advanced-runner-row label{min-width:0!important;font-size:10px!important;text-align:center!important;color:var(--muted)!important}
body.editor-advanced-v110 #playModal .advanced-runner-row input,
body.editor-advanced-v110 #playModal .advanced-runner-row select{min-height:44px!important;margin-top:4px!important;text-align:center!important;text-align-last:center!important;font-size:14px!important}
body.editor-advanced-v110 #playModal #runnerGrid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body.editor-advanced-v110 #playModal #runnerGrid>label{min-width:0!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important}
body.editor-advanced-v110 #playModal .scoring-panel{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;border:0!important;background:transparent!important;padding:0!important}
body.editor-advanced-v110 #playModal .score-field-card{min-height:76px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important;padding:8px!important}
body.editor-advanced-v110 #playModal .modal-actions{position:sticky!important;bottom:-18px!important;z-index:25!important;margin:12px -14px -18px!important;padding:9px 14px calc(12px + env(safe-area-inset-bottom))!important;background:color-mix(in srgb,var(--panel) 97%,transparent)!important;border-top:1px solid var(--line)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;box-shadow:0 -10px 24px rgba(0,0,0,.10)!important}
body.editor-advanced-v110 #playModal #applyPlayBtn{grid-column:1/-1!important;min-height:52px!important}

/* PITCH-BY-PITCH — refined count widget, sequence-first, split completion workflow. */
body.editor-pitch-v110 #playModal #pitchTools{height:auto!important;min-height:0!important;border:1px solid var(--line)!important;border-radius:18px!important;background:var(--soft)!important;padding:10px!important;margin:0 0 10px!important}
body.editor-pitch-v110 #playModal .pitch-tools-head{height:auto!important;min-height:0!important;border:0!important;border-radius:15px!important;background:var(--panel)!important;padding:10px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 128px!important;align-items:center!important;gap:9px!important}
body.editor-pitch-v110 #playModal .pitch-title-copy{display:grid!important;gap:2px!important;text-align:center!important;justify-items:center!important}
body.editor-pitch-v110 #playModal .pitch-title-copy strong{font-size:17px!important;letter-spacing:.04em!important}
body.editor-pitch-v110 #playModal .pitch-title-copy small{font-size:9.5px!important;line-height:1.3!important;max-width:190px!important}
body.editor-pitch-v110 #playModal .pitch-kicker{font-size:8px!important;letter-spacing:.13em!important}
body.editor-pitch-v110 #playModal .pitch-count-card{width:100%!important;min-width:0!important;min-height:0!important;border:1px solid var(--line)!important;border-radius:15px!important;padding:8px 9px!important;background:var(--soft)!important;display:grid!important;grid-template-columns:1fr!important;gap:4px!important;justify-items:center!important;text-align:center!important}
body.editor-pitch-v110 #playModal .pitch-count-top{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:5px!important}
body.editor-pitch-v110 #playModal .pitch-count-top small{font-size:8px!important;letter-spacing:.11em!important;font-weight:900!important}
body.editor-pitch-v110 #playModal .pitch-count-top em{position:static!important;margin:0!important;padding:3px 6px!important;border:1px solid var(--line)!important;border-radius:999px!important;font-size:7px!important;font-style:normal!important;white-space:nowrap!important;background:var(--panel)!important}
body.editor-pitch-v110 #playModal .pitch-count-card>b{font-size:31px!important;line-height:1!important;letter-spacing:.02em!important;color:var(--text)!important}
body.editor-pitch-v110 #playModal .pitch-count-lights{width:100%!important;margin:1px 0 0!important;padding:6px 5px 3px!important;border-radius:10px!important;background:var(--panel)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important;align-items:start!important}
body.editor-pitch-v110 #playModal .pitch-light-group{display:grid!important;justify-items:center!important;gap:3px!important;min-width:0!important}
body.editor-pitch-v110 #playModal .pitch-light-group small{font-size:6.5px!important;letter-spacing:.08em!important}
body.editor-pitch-v110 #playModal .pitch-light-group>span{display:flex!important;gap:3px!important;justify-content:center!important}
body.editor-pitch-v110 #playModal .pitch-light-group i{width:8px!important;height:8px!important;min-width:8px!important}
body.editor-pitch-v110 #playModal .pitch-sequence-card{height:auto!important;min-height:0!important;margin:8px 0!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--panel)!important;padding:9px!important}
body.editor-pitch-v110 #playModal .pitch-sequence-head{align-items:center!important;margin-bottom:2px!important}
body.editor-pitch-v110 #playModal .pitch-sequence-head strong{font-size:11px!important;letter-spacing:.10em!important}
body.editor-pitch-v110 #playModal .pitch-sequence-head small{font-size:8px!important}
body.editor-pitch-v110 #playModal #undoPitchBtn{min-height:34px!important;padding:0 9px!important;font-size:9px!important}
body.editor-pitch-v110 #playModal .pitch-sequence{display:flex!important;align-items:flex-start!important;gap:0!important;overflow-x:auto!important;padding:8px 0 3px!important;scrollbar-width:none!important}
body.editor-pitch-v110 #playModal .pitch-sequence::-webkit-scrollbar{display:none!important}
body.editor-pitch-v110 #playModal .pitch-chip{min-width:104px!important;width:104px!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:0 7px!important;display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;position:relative!important;gap:2px!important}
body.editor-pitch-v110 #playModal .pitch-chip::after{content:"";position:absolute!important;height:2px!important;background:var(--line)!important;top:15px!important;left:59px!important;width:90px!important;z-index:0!important}
body.editor-pitch-v110 #playModal .pitch-chip-no{width:31px!important;height:31px!important;min-width:31px!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:var(--panel)!important;border:2px solid var(--line)!important;z-index:2!important;font-size:10px!important;font-weight:900!important}
body.editor-pitch-v110 #playModal .pitch-chip-main strong{font-size:9.5px!important}
body.editor-pitch-v110 #playModal .pitch-chip-main small{font-size:7.5px!important}
body.editor-pitch-v110 #playModal .pitch-chip>b{font-size:7.5px!important;border:1px solid var(--line)!important;border-radius:999px!important;padding:2px 5px!important;max-width:92px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.editor-pitch-v110 #playModal .pitch-entry-card{height:auto!important;min-height:0!important;margin:8px 0 0!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--panel)!important;padding:9px!important}
body.editor-pitch-v110 #playModal .pitch-entry-card-head{margin:0 0 7px!important;text-align:center!important}
body.editor-pitch-v110 #playModal .pitch-entry-card-head strong{font-size:11px!important;letter-spacing:.10em!important}
body.editor-pitch-v110 #playModal .pitch-entry-card-head small{display:none!important}
body.editor-pitch-v110 #playModal .pitch-entry-grid{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)!important;gap:7px!important}
body.editor-pitch-v110 #playModal .pitch-entry-grid label{min-width:0!important;font-size:9.5px!important}
body.editor-pitch-v110 #playModal .pitch-entry-grid select,body.editor-pitch-v110 #playModal .pitch-entry-grid input{min-height:44px!important;font-size:13px!important}
body.editor-pitch-v110 #playModal .pitch-result-field,body.editor-pitch-v110 #playModal .pitch-event-field{grid-column:auto!important}
body.editor-pitch-v110 #playModal .record-pitch-btn{grid-column:1/-1!important;min-height:47px!important;border-radius:13px!important}
body.editor-pitch-v110 #playModal .pitch-workflow-note{display:none!important}
body.editor-pitch-v110 #playModal .complete-pa-heading{height:auto!important;min-height:0!important;margin:3px 0 8px!important;padding:11px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:linear-gradient(135deg,color-mix(in srgb,#1d74d5 8%,var(--panel)),var(--panel))!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
body.editor-pitch-v110 #playModal .complete-pa-heading span{display:flex!important;align-items:center!important;gap:8px!important;font-size:11px!important;font-weight:900!important;letter-spacing:.065em!important}
body.editor-pitch-v110 #playModal .complete-pa-heading span::before{content:"2";width:24px;height:24px;border-radius:7px;background:#1d74d5;color:#fff;display:grid;place-items:center;font-size:10px}
body.editor-pitch-v110 #playModal .complete-pa-heading small{font-size:8px!important;color:var(--muted)!important;text-align:right!important}
body.editor-pitch-v110 #playModal #advancedTools{border:0!important;background:transparent!important;padding:0!important;margin:8px 0!important}
body.editor-pitch-v110 #playModal #advancedTools>.advanced-title{display:none!important}
body.editor-pitch-v110 #playModal .defense-field-card,body.editor-pitch-v110 #playModal .advanced-runner-card{height:auto!important;min-height:0!important;border:1px solid var(--line)!important;border-radius:16px!important;background:var(--soft)!important;padding:9px!important;margin-bottom:8px!important}
body.editor-pitch-v110 #playModal .fielder-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
body.editor-pitch-v110 #playModal .fielder-grid-team{grid-column:1/-1!important}
body.editor-pitch-v110 #playModal .fielder-grid-pos{min-height:48px!important}
body.editor-pitch-v110 #playModal #runnerGrid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body.editor-pitch-v110 #playModal #runnerGrid>label{min-width:0!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--soft)!important}
body.editor-pitch-v110 #playModal .scoring-panel{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;border:0!important;background:transparent!important;padding:0!important}
body.editor-pitch-v110 #playModal .score-field-card{min-height:74px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:var(--soft)!important;padding:8px!important}
body.editor-pitch-v110 #playModal .modal-actions{position:sticky!important;bottom:-18px!important;z-index:25!important;margin:12px -14px -18px!important;padding:9px 14px calc(12px + env(safe-area-inset-bottom))!important;background:color-mix(in srgb,var(--panel) 97%,transparent)!important;border-top:1px solid var(--line)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;box-shadow:0 -10px 24px rgba(0,0,0,.10)!important}
body.editor-pitch-v110 #playModal #applyPlayBtn{grid-column:1/-1!important;min-height:52px!important}

@media(max-width:480px){
 body.editor-basic-v110 #playModal .play-card{border-radius:24px 24px 0 0!important}
 body.editor-advanced-v110 #playModal .play-card,body.editor-pitch-v110 #playModal .play-card{border-radius:0!important}
}

/* v110 QA corrections: Basic hidden-field specificity and compact toggle. */
body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>#advanceReasonField.hidden{display:none!important}
body.editor-basic-v110 #playModal #batterResultGrid{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)!important}
body.editor-basic-v110 #playModal .basic-runner-line{grid-template-columns:minmax(0,1.35fr) minmax(0,.75fr)!important}
body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-copy{display:none!important}
body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label:first-child{height:auto!important;min-height:82px!important}
body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card{height:auto!important;min-height:82px!important;align-self:stretch!important}

/* v110 QA — keep the count lights physically inside the redesigned count card. */
body.editor-pitch-v110 #playModal .pitch-count-card>.pitch-count-lights{
  position:static!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;float:none!important;max-width:none!important;box-sizing:border-box!important;overflow:visible!important;
}
body.editor-pitch-v110 #playModal #batterResultGrid .field-help{display:none!important}

/* Pitch-by-Pitch inherits the same real position-only defense field as Advanced, slightly more compact. */
body.editor-pitch-v110 #playModal .defense-field-card{height:auto!important;min-height:0!important;overflow:hidden!important}
body.editor-pitch-v110 #playModal .fielder-grid{position:relative!important;display:block!important;width:100%!important;height:270px!important;border-radius:17px!important;overflow:hidden!important;background:linear-gradient(180deg,#eef8ef 0%,#dcefdc 58%,#ead9b9 100%)!important;border:1px solid color-mix(in srgb,#1d74d5 20%,var(--line))!important}
body.editor-pitch-v110.dark-mode #playModal .fielder-grid{background:linear-gradient(180deg,#183423 0%,#102a1d 58%,#403626 100%)!important}
body.editor-pitch-v110 #playModal .defense-field-surface{position:absolute!important;inset:0!important;pointer-events:none!important}
body.editor-pitch-v110 #playModal .defense-outfield{position:absolute!important;left:7%!important;right:7%!important;top:7%!important;height:66%!important;border-radius:50% 50% 18% 18% / 76% 76% 24% 24%!important;border:1px solid rgba(69,139,81,.28)!important;background:repeating-radial-gradient(ellipse at 50% 83%,rgba(45,135,64,.10) 0 14px,rgba(255,255,255,.03) 15px 28px)!important}
body.editor-pitch-v110 #playModal .defense-infield{position:absolute!important;width:37%!important;aspect-ratio:1!important;left:50%!important;top:56%!important;transform:translate(-50%,-50%) rotate(45deg)!important;border-radius:5px!important;background:color-mix(in srgb,#d6b77b 44%,transparent)!important;border:2px solid color-mix(in srgb,#fff 65%,#d3b678)!important}
body.editor-pitch-v110 #playModal .defense-mound{position:absolute!important;width:23px!important;height:23px!important;border-radius:50%!important;left:50%!important;top:56%!important;transform:translate(-50%,-50%)!important;background:color-mix(in srgb,#d6b77b 62%,var(--panel))!important;border:1px solid color-mix(in srgb,#fff 65%,#c7a966)!important}
body.editor-pitch-v110 #playModal .defense-home{position:absolute!important;width:12px!important;height:12px!important;left:50%!important;top:88%!important;transform:translate(-50%,-50%) rotate(45deg)!important;background:var(--panel)!important;border:1px solid var(--line)!important}
body.editor-pitch-v110 #playModal .fielder-grid-team{position:absolute!important;left:10px!important;top:9px!important;z-index:5!important;display:flex!important;flex-direction:column!important;gap:1px!important;padding:5px 7px!important;border-radius:9px!important;background:color-mix(in srgb,var(--panel) 90%,transparent)!important;border:1px solid color-mix(in srgb,var(--line) 72%,transparent)!important;backdrop-filter:blur(8px)!important}
body.editor-pitch-v110 #playModal .fielder-grid-team span{font-size:8px!important;font-weight:900!important;letter-spacing:.08em!important}
body.editor-pitch-v110 #playModal .fielder-grid-team small{font-size:6.5px!important}
body.editor-pitch-v110 #playModal .defense-sequence-lines{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:3!important;pointer-events:none!important;overflow:visible!important}
body.editor-pitch-v110 #playModal .defense-sequence-lines line{stroke:#1674dc!important;stroke-width:1.6!important;vector-effect:non-scaling-stroke!important;marker-end:url(#defenseArrow)!important;opacity:.9!important}
body.editor-pitch-v110 #playModal .fielder-grid-pos{position:absolute!important;z-index:4!important;transform:translate(-50%,-50%)!important;width:43px!important;height:43px!important;min-height:43px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:color-mix(in srgb,var(--panel) 96%,transparent)!important;border:1.5px solid color-mix(in srgb,var(--text) 42%,var(--line))!important;box-shadow:0 4px 9px rgba(0,0,0,.10)!important;color:var(--text)!important}
body.editor-pitch-v110 #playModal .fielder-grid-pos>span{width:auto!important;height:auto!important;background:transparent!important;border:0!important;color:inherit!important;font-size:12px!important;font-weight:900!important}
body.editor-pitch-v110 #playModal .fielder-grid-pos>strong,body.editor-pitch-v110 #playModal .fielder-grid-pos>small{display:none!important}
body.editor-pitch-v110 #playModal .fielder-grid-pos.selected{background:#1674dc!important;border-color:#1674dc!important;color:#fff!important;box-shadow:0 0 0 4px color-mix(in srgb,#1674dc 18%,transparent),0 5px 12px rgba(22,116,220,.24)!important}
body.editor-pitch-v110 #playModal .fielder-selection{margin-top:7px!important;padding:8px 10px!important;border:1px solid var(--line)!important;border-radius:11px!important;background:var(--panel)!important;text-align:center!important;font-size:10px!important;font-weight:800!important;color:var(--muted)!important}

/* Pitch lower runner cards use the same centered content-driven treatment. */
body.editor-pitch-v110 #playModal .runner-event-head{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;text-align:center!important}
body.editor-pitch-v110 #playModal .runner-event-head>div{display:grid!important;justify-items:center!important;gap:2px!important}
body.editor-pitch-v110 #playModal .runner-event-control{display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;align-items:center!important;gap:7px!important;width:100%!important;text-align:left!important}
body.editor-pitch-v110 #playModal .runner-event-control>span{text-align:right!important;font-size:10px!important}
body.editor-pitch-v110 #playModal .advanced-runner-list{display:grid!important;gap:7px!important}
body.editor-pitch-v110 #playModal .advanced-runner-row{width:100%!important;box-sizing:border-box!important;border:1px solid var(--line)!important;border-radius:14px!important;background:var(--panel)!important;padding:9px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;align-items:end!important}
body.editor-pitch-v110 #playModal .advanced-runner-row .runner-ident{grid-column:1/-1!important;display:flex!important;align-items:baseline!important;justify-content:center!important;gap:6px!important;text-align:center!important}
body.editor-pitch-v110 #playModal .advanced-runner-row .runner-ident b{font-size:11px!important;max-width:72%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.editor-pitch-v110 #playModal .advanced-runner-row .runner-ident small{font-size:8px!important;white-space:nowrap!important}
body.editor-pitch-v110 #playModal .advanced-runner-row label{min-width:0!important;font-size:9px!important;text-align:center!important}
body.editor-pitch-v110 #playModal .advanced-runner-row input,body.editor-pitch-v110 #playModal .advanced-runner-row select{min-height:42px!important;margin-top:3px!important;text-align:center!important;text-align-last:center!important;font-size:13px!important}

/* v110 count-card legacy-grid reset (the old named grid areas no longer apply). */
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-tools-head{grid-template-columns:minmax(0,1fr) 128px!important}
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-count-card{width:128px!important;min-width:128px!important;max-width:128px!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:none!important}
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-count-card>.pitch-count-top,
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-count-card>#pitchCountBadge,
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-count-card>#pitchCountLights{grid-area:auto!important;min-width:0!important;max-width:100%!important}

/* ============================================================
   v110 — APPROVED EDITOR DESIGN INTEGRATION
   Locked targets:
   - Basic: v109 content-fitted Quick Grid
   - Advanced: approved Defense Option E + centered runner cards
   - Pitch-by-Pitch: approved Option A + shared Defense Option E
   This block intentionally restores the approved layouts without
   applying the later rejected micro-spacing experiment.
   ============================================================ */

/* Shared simple defense — Option E. Diamond only; no outfield arc. */
body.editor-advanced-v110 #playModal .fielder-grid,
body.editor-pitch-v110 #playModal .fielder-grid{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:314px!important;
  min-height:314px!important;
  padding:16px 14px 12px!important;
  box-sizing:border-box!important;
  border-radius:18px!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  background:var(--soft)!important;
}
body.editor-advanced-v110 #playModal .defense-field-surface,
body.editor-pitch-v110 #playModal .defense-field-surface{
  position:absolute!important;
  inset:0!important;
  pointer-events:none!important;
}
body.editor-advanced-v110 #playModal .defense-outfield,
body.editor-pitch-v110 #playModal .defense-outfield{
  display:none!important;
  background:none!important;
  border:0!important;
}
body.editor-advanced-v110 #playModal .defense-infield,
body.editor-pitch-v110 #playModal .defense-infield{
  position:absolute!important;
  left:50%!important;
  top:56%!important;
  width:164px!important;
  height:164px!important;
  aspect-ratio:auto!important;
  transform:translate(-50%,-50%) rotate(45deg)!important;
  border:3px solid color-mix(in srgb,var(--line) 35%,#d7c39b 65%)!important;
  background:transparent!important;
  border-radius:8px!important;
}
body.editor-advanced-v110 #playModal .defense-mound,
body.editor-pitch-v110 #playModal .defense-mound{
  position:absolute!important;
  left:50%!important;
  top:54%!important;
  width:12px!important;
  height:12px!important;
  transform:translate(-50%,-50%)!important;
  border-radius:50%!important;
  border:2px solid var(--line)!important;
  background:var(--panel)!important;
}
body.editor-advanced-v110 #playModal .defense-home,
body.editor-pitch-v110 #playModal .defense-home{
  position:absolute!important;
  left:50%!important;
  top:auto!important;
  bottom:26px!important;
  width:12px!important;
  height:12px!important;
  transform:translateX(-50%) rotate(45deg)!important;
  border-radius:2px!important;
  border:2px solid var(--line)!important;
  background:var(--panel)!important;
}
body.editor-advanced-v110 #playModal .fielder-grid-team,
body.editor-pitch-v110 #playModal .fielder-grid-team{
  position:absolute!important;
  left:14px!important;
  top:12px!important;
  z-index:5!important;
}
body.editor-advanced-v110 #playModal .fielder-grid-team small,
body.editor-pitch-v110 #playModal .fielder-grid-team small{
  display:none!important;
}
body.editor-advanced-v110 #playModal .defense-sequence-lines,
body.editor-pitch-v110 #playModal .defense-sequence-lines{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  z-index:3!important;
  pointer-events:none!important;
  overflow:visible!important;
}
body.editor-advanced-v110 #playModal .defense-sequence-lines line,
body.editor-pitch-v110 #playModal .defense-sequence-lines line{
  stroke:var(--accent)!important;
  stroke-width:1.7!important;
  vector-effect:non-scaling-stroke!important;
  marker-end:url(#defenseArrow)!important;
  opacity:.9!important;
}
body.editor-advanced-v110 #playModal .defense-sequence-lines path,
body.editor-pitch-v110 #playModal .defense-sequence-lines path{
  fill:var(--accent)!important;
}
body.editor-advanced-v110 #playModal .fielder-grid-pos,
body.editor-pitch-v110 #playModal .fielder-grid-pos{
  position:absolute!important;
  z-index:4!important;
  transform:translate(-50%,-50%)!important;
  width:58px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border-radius:14px!important;
  border:1px solid var(--line)!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-shadow:0 3px 8px rgba(0,0,0,.08)!important;
}
body.editor-advanced-v110 #playModal .fielder-grid-pos>span,
body.editor-pitch-v110 #playModal .fielder-grid-pos>span{
  width:auto!important;
  height:auto!important;
  border:0!important;
  background:transparent!important;
  color:inherit!important;
  font-size:16px!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
}
body.editor-advanced-v110 #playModal .fielder-grid-pos>strong,
body.editor-advanced-v110 #playModal .fielder-grid-pos>small,
body.editor-pitch-v110 #playModal .fielder-grid-pos>strong,
body.editor-pitch-v110 #playModal .fielder-grid-pos>small{
  display:none!important;
}

/* Approved Option E position spread. */
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="LF"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="LF"]{left:15%!important;top:25%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="CF"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="CF"]{left:50%!important;top:15%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="RF"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="RF"]{left:85%!important;top:25%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="3B"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="3B"]{left:19%!important;top:67%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="SS"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="SS"]{left:34%!important;top:43%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="2B"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="2B"]{left:66%!important;top:43%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="1B"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="1B"]{left:81%!important;top:67%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="P"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="P"]{left:50%!important;top:54%!important}
body.editor-advanced-v110 #playModal .fielder-grid-pos[data-field-pos="C"],
body.editor-pitch-v110 #playModal .fielder-grid-pos[data-field-pos="C"]{left:50%!important;top:84%!important}

/* Approved selected-position appearance: pale blue in light, solid blue in dark. */
body.theme-default.editor-advanced-v110 #playModal .fielder-grid button.fielder-grid-pos.selected,
body.theme-default.editor-pitch-v110 #playModal .fielder-grid button.fielder-grid-pos.selected{
  background:#e8f2ff!important;
  border-color:#1674dc!important;
  color:#0b55b5!important;
  box-shadow:0 0 0 2px color-mix(in srgb,#1674dc 15%,transparent),0 3px 8px rgba(0,0,0,.08)!important;
}
body.theme-default.dark-mode.editor-advanced-v110 #playModal .fielder-grid button.fielder-grid-pos.selected,
body.theme-default.dark-mode.editor-pitch-v110 #playModal .fielder-grid button.fielder-grid-pos.selected{
  background:#1674dc!important;
  border-color:#5aa4f3!important;
  color:#fff!important;
  box-shadow:0 0 0 2px color-mix(in srgb,#1674dc 18%,transparent),0 3px 8px rgba(0,0,0,.14)!important;
}

/* Pitch-by-Pitch approved Option A: split live hero + compact count. */
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-tools-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 132px!important;
  gap:10px!important;
  align-items:stretch!important;
}
body.editor-pitch-v110 #playModal .pitch-title-copy{
  min-height:126px!important;
  padding:16px 14px!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--soft)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
body.editor-pitch-v110 #playModal .pitch-title-copy>strong{
  font-size:17px!important;
  line-height:1.05!important;
  letter-spacing:.08em!important;
}
body.editor-pitch-v110 #playModal .pitch-title-copy>small{
  max-width:30ch!important;
  font-size:11px!important;
  line-height:1.4!important;
}
body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .pitch-count-card{
  width:132px!important;
  min-width:132px!important;
  max-width:132px!important;
  min-height:126px!important;
  align-self:stretch!important;
  padding:9px 10px!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--soft)!important;
  box-sizing:border-box!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:none!important;
}
body.editor-pitch-v110 #playModal .pitch-count-card>b{
  font-size:31px!important;
  color:var(--text)!important;
}
body.editor-pitch-v110 #playModal .pitch-count-card>.pitch-count-lights{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  width:100%!important;
  margin:0!important;
  padding:2px 2px 0!important;
  gap:10px!important;
  background:transparent!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
body.editor-pitch-v110 #playModal .pitch-sequence-card{
  margin-top:10px!important;
}

/* Keep the v109 approved center/content-driven runner treatment and
   protect Play/Notation from ever overlapping. */
body.editor-advanced-v110 #playModal #batterResultGrid,
body.editor-pitch-v110 #playModal #batterResultGrid{
  grid-template-columns:minmax(0,1.55fr) minmax(116px,.7fr)!important;
  gap:9px!important;
}
body.editor-advanced-v110 #playModal .advanced-runner-row,
body.editor-pitch-v110 #playModal .advanced-runner-row{
  height:auto!important;
  min-height:0!important;
}

/* v110 dark hierarchy parity. */
body.theme-default.dark-mode.editor-advanced-v110 #playModal .field-card-head strong,
body.theme-default.dark-mode.editor-advanced-v110 #playModal .runner-event-head strong,
body.theme-default.dark-mode.editor-pitch-v110 #playModal .field-card-head strong,
body.theme-default.dark-mode.editor-pitch-v110 #playModal .runner-event-head strong{color:#eef0f2!important}
body.theme-default.dark-mode.editor-advanced-v110 #playModal .field-card-head small,
body.theme-default.dark-mode.editor-advanced-v110 #playModal .runner-event-head small,
body.theme-default.dark-mode.editor-pitch-v110 #playModal .field-card-head small,
body.theme-default.dark-mode.editor-pitch-v110 #playModal .runner-event-head small{color:#aeb4bd!important}

/* v110 approved dark defense parity — neutral simple field, no legacy green/tan gradient. */
body.theme-default.dark-mode.editor-advanced-v110 #playModal .fielder-grid,
body.theme-default.dark-mode.editor-pitch-v110 #playModal .fielder-grid{
  background:var(--soft)!important;
  border-color:var(--line)!important;
}


/* ==========================================================
   v112 — FROZEN PLAY ACTIONS + TRANSIENT OVERLAY ZOOM LOCK
   The Play Editor becomes a three-region shell on mobile:
   fixed header / independently scrolling content / fixed actions.
   Scorecard zoom remains enabled when no transient overlay is open.
   ========================================================== */
@media(max-width:900px){
  #playModal:not(.hidden)>.play-card{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    min-height:0!important;
  }
  #playModal:not(.hidden)>.play-card>.modal-head{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    z-index:31!important;
  }
  #playModal:not(.hidden)>.play-card>.play-scroll-body{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
    scrollbar-gutter:stable!important;
  }
  #playModal:not(.hidden)>.play-card>.modal-actions{
    position:relative!important;
    inset:auto!important;
    bottom:auto!important;
    flex:0 0 auto!important;
    z-index:32!important;
    margin:0 -14px -18px!important;
    padding:10px 14px calc(12px + env(safe-area-inset-bottom))!important;
    background:color-mix(in srgb,var(--panel) 98%,transparent)!important;
    border-top:1px solid var(--line)!important;
    box-shadow:0 -10px 24px rgba(0,0,0,.12)!important;
    transform:none!important;
  }
  

  /* Any transient sheet/menu is a non-zoomable interaction surface. */
  html.modal-viewport-locked .modal:not(.hidden),
  html.modal-viewport-locked .modal:not(.hidden) .modal-card,
  html.modal-viewport-locked #drawer.open,
  html.modal-viewport-locked #drawer.open *{
    touch-action:pan-y!important;
  }
  html.modal-viewport-locked .modal:not(.hidden) input,
  html.modal-viewport-locked .modal:not(.hidden) select,
  html.modal-viewport-locked .modal:not(.hidden) textarea,
  html.modal-viewport-locked .modal:not(.hidden) button,
  html.modal-viewport-locked #drawer.open button,
  html.modal-viewport-locked #drawer.open input,
  html.modal-viewport-locked #drawer.open select{
    touch-action:manipulation!important;
  }
}


/* ==========================================================
   v113 — ZOOM-INDEPENDENT SCORECARD CHROME + DEFENSE SPACING
   The scorecard body remains pinch-zoomable. Workspace tabs and
   bottom commands are rendered through visual-viewport chrome
   wrappers so they retain a consistent physical size.
   ========================================================== */
@media(max-width:900px){
  /* The source workspace tabs retain layout space, while the cloned
     chrome copy follows their natural Y position until it reaches the
     top of the visual viewport, then remains frozen there. */
  .mode-workspace-tabs.v113-tabs-source{
    position:sticky!important;
    top:var(--v113-live-layout-h,76px)!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  .v113-workspace-chrome,
  .v113-bottom-chrome{
    position:fixed!important;
    z-index:145!important;
    overflow:visible!important;
    pointer-events:none!important;
    margin:0!important;
    padding:0!important;
  }
  .v113-workspace-chrome{z-index:146!important}
  .v113-workspace-chrome>.mode-workspace-tabs{
    position:absolute!important;
    left:0!important;top:0!important;
    margin:0!important;
    pointer-events:auto!important;
    transform-origin:0 0!important;
    border-radius:0 0 14px 14px!important;
    box-shadow:0 8px 22px rgba(15,23,42,.14)!important;
    backdrop-filter:blur(16px)!important;
    -webkit-backdrop-filter:blur(16px)!important;
  }
  .v113-bottom-chrome>#mobileActionBar{
    display:grid!important;
    position:absolute!important;
    left:0!important;top:0!important;right:auto!important;bottom:auto!important;
    margin:0!important;
    pointer-events:auto!important;
    transform-origin:0 0!important;
  }
  .v113-workspace-chrome,.v113-workspace-chrome *,
  .v113-bottom-chrome,.v113-bottom-chrome *{
    touch-action:manipulation!important;
  }

  /* Sticky lineup header must clear the fixed workspace strip once the
     strip is pinned at the top. */
  body:not(.home-page) .team-scorebook{scroll-margin-top:calc(var(--v113-live-layout-h,76px) + var(--v113-tabs-visual-h,54px) + 6px)!important}
  body:not(.home-page) .team-scorebook-head{top:calc(var(--v113-live-layout-h,76px) + var(--v113-tabs-visual-h,54px))!important}

  /* Scorecard defensive alignment: use the available field area rather
     than bunching the nine positions around the center. */
  body.theme-default:not(.home-page) .team-defense-field{
    height:304px!important;
    min-height:304px!important;
  }
  body.theme-default:not(.home-page) .team-defense-diamond{
    top:62%!important;
    width:34%!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos{
    width:84px!important;
    min-height:48px!important;
    padding:6px!important;
    grid-template-columns:27px minmax(0,1fr)!important;
    column-gap:6px!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>span{
    width:27px!important;height:27px!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>strong{
    font-size:7.2px!important;
    line-height:1.06!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>.defense-numbers{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    margin-top:3px!important;
    min-width:0!important;
    font-size:6px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  body.theme-default:not(.home-page) .defense-field-number{
    font-style:normal!important;
    color:var(--muted)!important;
    font-weight:800!important;
    letter-spacing:.02em!important;
  }
  body.theme-default:not(.home-page) .defense-jersey-number{
    font-style:normal!important;
    color:var(--accent)!important;
    font-size:7px!important;
    font-weight:950!important;
    letter-spacing:.02em!important;
    padding-left:5px!important;
    border-left:1px solid var(--line)!important;
  }
  body.theme-default.dark-mode:not(.home-page) .defense-jersey-number{color:#73b5ff!important}
}

@media(min-width:901px){
  body.theme-default:not(.home-page) .team-defense-field{height:330px!important}
  body.theme-default:not(.home-page) .team-defense-pos{width:98px!important}
  body.theme-default:not(.home-page) .team-defense-pos>.defense-numbers{display:flex!important;gap:6px!important;align-items:center!important}
  body.theme-default:not(.home-page) .defense-field-number{font-style:normal!important;color:var(--muted)!important;font-weight:800!important}
  body.theme-default:not(.home-page) .defense-jersey-number{font-style:normal!important;color:var(--accent)!important;font-weight:950!important;padding-left:6px!important;border-left:1px solid var(--line)!important}
}

/* ==========================================================
   v114 — STABLE FULL SCORECARD CHROME + DEFENSE CORRECTION
   ========================================================== */
@media(max-width:900px){
  body.v114-scorecard-chrome{padding-top:var(--v114-top-layout-h,132px)!important;padding-bottom:var(--v114-bottom-layout-h,72px)!important}
  .v114-top-chrome{
    position:fixed!important;left:0;top:0;width:100%;z-index:148!important;
    margin:0!important;padding:0!important;background:var(--page)!important;
    pointer-events:auto!important;overflow:visible!important;
    backface-visibility:hidden!important;-webkit-backface-visibility:hidden!important;
    contain:layout paint style;
  }
  .v114-top-inner{width:100%;transform-origin:0 0!important;}
  .v114-top-inner>.live-game-bar{
    position:relative!important;top:auto!important;left:auto!important;
    margin:0!important;border-radius:0!important;box-shadow:0 4px 12px rgba(15,23,42,.08)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  .v114-top-inner>.mode-workspace-tabs{
    position:relative!important;top:auto!important;left:auto!important;
    margin:0!important;visibility:visible!important;pointer-events:auto!important;
    border-radius:0 0 14px 14px!important;box-shadow:0 7px 16px rgba(15,23,42,.11)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  .v114-bottom-chrome{
    position:fixed!important;left:0;right:0;bottom:0;z-index:149!important;
    margin:0!important;padding:0!important;pointer-events:none!important;
    backface-visibility:hidden!important;-webkit-backface-visibility:hidden!important;
    contain:layout paint style;
  }
  .v114-bottom-chrome>#mobileActionBar{
    display:grid!important;pointer-events:auto!important;margin:0!important;
    position:relative!important;left:0!important;right:auto!important;top:0!important;bottom:auto!important;
  }
  .v114-top-chrome,.v114-top-chrome *,.v114-bottom-chrome,.v114-bottom-chrome *{touch-action:manipulation!important}
  body.v114-scorecard-chrome .team-scorebook-head{top:0!important}
  body.v114-scorecard-chrome .team-scorebook{scroll-margin-top:8px!important}

  body.theme-default:not(.home-page) .team-defense-field{height:318px!important;min-height:318px!important;padding:8px!important}
  body.theme-default:not(.home-page) .team-defense-diamond{top:63%!important;width:36%!important;opacity:.72!important}
  body.theme-default:not(.home-page) .team-defense-pos{
    width:78px!important;min-height:44px!important;padding:5px 6px!important;
    grid-template-columns:25px minmax(0,1fr)!important;column-gap:5px!important;
    border-radius:13px!important;box-shadow:0 3px 10px rgba(15,23,42,.08)!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>span{width:25px!important;height:25px!important;border-radius:9px!important;font-size:9px!important}
  body.theme-default:not(.home-page) .team-defense-pos>strong{font-size:7px!important;line-height:1.02!important;max-height:2.1em!important;overflow:hidden!important}
  body.theme-default:not(.home-page) .team-defense-pos>.defense-numbers{display:flex!important;align-items:center!important;gap:4px!important;margin-top:3px!important;font-size:6.4px!important;line-height:1!important;white-space:nowrap!important}
  body.theme-default:not(.home-page) .defense-field-number{font-style:normal!important;color:var(--muted)!important;font-weight:900!important;letter-spacing:.05em!important}
  body.theme-default:not(.home-page) .defense-jersey-number{font-style:normal!important;color:var(--accent)!important;font-size:7.2px!important;font-weight:950!important;padding-left:4px!important;border-left:1px solid var(--line)!important}
  body.theme-default.dark-mode:not(.home-page) .defense-jersey-number{color:#73b5ff!important}
}
@media(min-width:901px){body.theme-default:not(.home-page) .defense-field-number{font-style:normal!important}}


/* ==========================================================
   v115 — native sticky game chrome + grid-only zoom
   ========================================================== */
@media(max-width:900px){
  html,body{touch-action:pan-x pan-y!important}
  body:not(.home-page){padding-bottom:calc(78px + env(safe-area-inset-bottom))!important}
  #main .live-game-bar.v115-live-sticky{
    position:sticky!important;top:0!important;z-index:104!important;
    margin-top:0!important;margin-bottom:8px!important;
    transform:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  #main .mode-workspace-tabs.v115-tabs-sticky{
    position:sticky!important;top:var(--v115-livebar-h,76px)!important;z-index:103!important;
    margin-top:0!important;margin-bottom:12px!important;
    transform:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    box-shadow:0 7px 16px rgba(15,23,42,.10)!important;
  }
  body.theme-default:not(.home-page) #main .live-game-bar.v115-live-sticky{border-radius:17px!important}
  body.theme-default:not(.home-page) #main .mode-workspace-tabs.v115-tabs-sticky{border-radius:15px!important}
  #mobileActionBar{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;
    width:100%!important;transform:none!important;z-index:149!important;
    backface-visibility:hidden!important;-webkit-backface-visibility:hidden!important;
  }
  #mobileActionBar,#mobileActionBar *{touch-action:manipulation!important}
  .team-scorebook-scroll[data-scroll-side]{overscroll-behavior-x:contain;touch-action:pan-x pan-y!important;overflow-x:auto!important;overflow-y:visible!important}
  .team-scorebook-scroll[data-scroll-side] .unified-score-table{
    zoom:var(--v115-grid-zoom,1);transform-origin:0 0!important;transition:none!important;
  }
  .team-scorebook-scroll.is-pinching{scroll-behavior:auto!important}
  .team-scorebook-scroll.is-grid-zoomed{cursor:zoom-out}
  /* v114 hosts are never used in v115. */
  .v113-top-chrome,.v113-bottom-chrome,.v114-top-chrome,.v114-bottom-chrome{display:none!important}
}
@media(max-width:900px){
  #main .live-game-bar.v115-live-sticky,
  #main .mode-workspace-tabs.v115-tabs-sticky{background:var(--panel)!important}
  body.dark-mode #main .live-game-bar.v115-live-sticky,
  body.dark-mode #main .mode-workspace-tabs.v115-tabs-sticky{background:var(--panel)!important}
}

/* ==========================================================
   v116 — multi-surface scorecard pinch zoom + defense names
   ========================================================== */
@media(max-width:900px){
  /* All scorecard work surfaces own their horizontal pan. Safari page
     zoom remains disabled, so the sticky game chrome never disappears. */
  .team-scorebook-scroll[data-v116-zoom-surface],
  .pitch-scroll[data-v116-zoom-surface],
  .v116-defense-zoom-scroll{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
    touch-action:pan-x pan-y!important;
    scrollbar-width:thin!important;
  }
  .v116-zoom-frame{
    position:relative!important;
    display:block!important;
    min-width:100%!important;
    transform-origin:0 0!important;
  }
  .team-scorebook-scroll[data-v116-zoom-surface]>.v116-zoom-frame>.unified-score-table,
  .pitch-scroll[data-v116-zoom-surface]>.v116-zoom-frame>.pitch-table,
  .v116-defense-zoom-scroll>.v116-zoom-frame>.team-defense-field{
    transform-origin:0 0!important;
    margin:0!important;
  }
  .team-scorebook-scroll.is-v116-pinching,
  .pitch-scroll.is-v116-pinching,
  .v116-defense-zoom-scroll.is-v116-pinching{scroll-behavior:auto!important}

  /* v115 zoom is superseded by explicit v116 frames. */
  .team-scorebook-scroll[data-scroll-side] .unified-score-table{
    zoom:1;
  }

  /* Defense field now has its own horizontal zoom surface so pinching it
     cannot trigger Safari page zoom or hide the app chrome. */
  .v116-defense-zoom-scroll{border:0!important;background:transparent!important}
  .v116-defense-zoom-scroll .team-defense-field{
    width:100%!important;
    min-width:100%!important;
  }

  /* Let each player card grow only as much as its longest intentional
     name line needs. Coordinates were moved inward enough to protect
     field edges while preserving real defensive spacing. */
  body.theme-default:not(.home-page) .team-defense-pos{
    width:var(--def-card-w,82px)!important;
    min-width:var(--def-card-w,82px)!important;
    max-width:126px!important;
    min-height:48px!important;
    height:auto!important;
    padding:5px 6px!important;
    grid-template-columns:25px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    column-gap:6px!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>.defense-name{
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:flex-start!important;
    min-width:0!important;
    width:100%!important;
    max-height:none!important;
    overflow:visible!important;
    line-height:1.02!important;
    font-size:7.3px!important;
    font-weight:900!important;
    color:var(--text)!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>.defense-name>b{
    display:block!important;
    width:auto!important;
    max-width:none!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font:inherit!important;
    line-height:inherit!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>.defense-numbers{
    grid-column:2!important;
    display:flex!important;
    align-items:center!important;
    gap:4px!important;
    margin-top:3px!important;
    white-space:nowrap!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>.defense-numbers .defense-field-number{
    font-size:6.5px!important;
    letter-spacing:.04em!important;
  }
  body.theme-default:not(.home-page) .team-defense-pos>.defense-numbers .defense-jersey-number{
    font-size:7.2px!important;
  }
  body.theme-default:not(.home-page) .team-defense-field{
    height:326px!important;
    min-height:326px!important;
  }
  body.theme-default:not(.home-page) .team-defense-diamond{
    top:62%!important;
    width:37%!important;
  }
}

@media(min-width:901px){
  body.theme-default:not(.home-page) .team-defense-pos{width:var(--def-card-w,98px)!important;max-width:138px!important}
  body.theme-default:not(.home-page) .team-defense-pos>.defense-name{display:flex!important;flex-direction:column!important;line-height:1.02!important}
  body.theme-default:not(.home-page) .team-defense-pos>.defense-name>b{white-space:nowrap!important}
}


/* ==========================================================
   v117 — compact mobile active-batter rail; live scorecard no zoom
   ========================================================== */
.mobile-lineup-rail,.mobile-player-label{display:none}
@media(max-width:600px){
  /* Live scoring stays at a stable 1x scale. Horizontal table scroll is
     the navigation model; pinch zoom is intentionally not required. */
  .team-scorebook-scroll,
  .full-width-pitch .pitch-scroll,
  .v116-defense-zoom-scroll{
    touch-action:pan-x pan-y!important;
  }
  .team-scorebook-scroll[data-v116-zoom-surface],
  .pitch-scroll[data-v116-zoom-surface],
  .v116-defense-zoom-scroll{
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  .v116-zoom-frame{width:100%!important;height:auto!important;min-width:100%!important;transform:none!important}
  .v116-zoom-frame>.unified-score-table,
  .v116-zoom-frame>.pitch-table,
  .v116-zoom-frame>.team-defense-field{zoom:1!important;transform:none!important}
  .v116-defense-zoom-scroll{overflow:visible!important}

  /* One frozen BATTER rail replaces separate # / Player / Position
     columns on the phone. This frees about four normal inning cells. */
  .team-scorebook-scroll{scroll-padding-left:168px!important;scroll-snap-type:x proximity!important}
  .unified-score-table{
    --ord-w:0px;--player-w:168px;--pos-w:0px;--inning-w:62px;--stat-w:54px;
    --sticky-total:var(--player-w);--row-h:58px;
    width:1172px!important;min-width:1172px!important;
  }
  .unified-score-table .c-ord,.unified-score-table .c-pos{width:0!important;min-width:0!important;max-width:0!important}
  .unified-score-table .sticky-ord,.unified-score-table .sticky-pos{display:none!important}
  .unified-score-table .sticky-player{left:0!important;width:var(--player-w)!important;min-width:var(--player-w)!important;max-width:var(--player-w)!important;padding:0!important;overflow:visible!important}
  .unified-score-table .sticky-lineup-banner,.unified-score-table .sticky-totals-label{width:var(--player-w)!important;min-width:var(--player-w)!important;max-width:var(--player-w)!important}
  .unified-score-table .score-head-secondary .sticky-player{height:29px!important;padding:0 9px!important;text-align:left!important;font-size:8.5px!important;letter-spacing:.08em!important}
  .desktop-player-label{display:none!important}.mobile-player-label{display:inline!important}
  .desktop-player-content{display:none!important}.mobile-lineup-rail{display:grid!important}

  .mobile-lineup-rail{
    grid-template-columns:24px minmax(0,1fr);align-items:center;column-gap:6px;
    width:100%;min-height:58px;padding:6px 7px 6px 4px;box-sizing:border-box;text-align:left;
  }
  .mobile-rail-order{
    display:grid;place-items:center;align-self:stretch;font-size:10px;font-weight:950;
    color:var(--text);border-right:1px solid var(--line);padding-right:3px;
  }
  .mobile-rail-copy{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:3px}
  .mobile-rail-primary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:5px;min-width:0}
  .mobile-rail-name{display:block;min-width:0;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;font-size:10.8px;line-height:1.05;font-weight:950;color:var(--text);letter-spacing:-.01em}
  .mobile-rail-name.rail-fit-long{font-size:10px}.mobile-rail-name.rail-fit-xlong{font-size:9.2px}.mobile-rail-name.rail-fit-xxlong{font-size:8.5px}
  .mobile-rail-jersey{font-style:normal;font-size:9px;line-height:1;font-weight:900;color:var(--text);white-space:nowrap}
  .mobile-rail-meta{display:flex;align-items:center;gap:5px;min-width:0;font-size:8.2px;line-height:1;color:var(--muted);font-weight:850}
  .mobile-rail-meta>b{color:var(--accent);font-size:8.6px}.mobile-rail-meta>i{font-style:normal;padding-left:5px;border-left:1px solid var(--line);white-space:nowrap}
  .mobile-rail-history{
    display:block;width:100%;font-size:7.5px;line-height:1.16;font-weight:750;color:var(--muted);
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:normal!important;overflow-wrap:break-word!important;
  }
  .unified-score-table .batter-row>td{max-height:none!important}
  .unified-score-table .batter-row.has-substitution>td{height:auto!important;min-height:76px!important;max-height:none!important}
  .unified-score-table .batter-row.has-substitution .mobile-lineup-rail{min-height:76px;padding-top:7px;padding-bottom:7px}
  .unified-score-table .current-batter>.sticky-player{box-shadow:inset 4px 0 0 var(--accent),inset 0 2px 0 var(--accent),inset 0 -2px 0 var(--accent)!important}
  .unified-score-table .score-head-inning{scroll-margin-left:var(--player-w)!important}
  .unified-score-table .score-head-primary th{font-size:8.8px!important}
  .unified-score-table .play-cell{touch-action:manipulation!important}
}
@media(min-width:601px){
  .desktop-player-content{display:block!important}.mobile-lineup-rail{display:none!important}.desktop-player-label{display:inline!important}.mobile-player-label{display:none!important}
}

/* v117 mobile table-layout correction: keep zero-width order/POS table cells
   in the table formatting context so the combined 166px batter rail owns
   a real column width instead of overflowing from a zero-width cell. */
@media(max-width:600px){
  .unified-score-table{
    --ord-w:0px!important;--player-w:166px!important;--pos-w:0px!important;
    --sticky-total:166px!important;--inning-w:62px!important;--stat-w:54px!important;
    width:1180px!important;min-width:1180px!important;
  }
  .unified-score-table .c-ord,.unified-score-table .c-pos{width:0!important}
  .unified-score-table .sticky-ord,.unified-score-table .sticky-pos{
    display:table-cell!important;width:0!important;min-width:0!important;max-width:0!important;
    padding:0!important;border-right:0!important;font-size:0!important;color:transparent!important;
    overflow:hidden!important;
  }
  .unified-score-table .sticky-player{
    left:0!important;width:166px!important;min-width:166px!important;max-width:166px!important;
    padding:0!important;overflow:visible!important;
  }
  .unified-score-table .sticky-lineup-banner,.unified-score-table .sticky-totals-label{
    width:166px!important;min-width:166px!important;max-width:166px!important;
  }
  .team-scorebook-scroll{scroll-padding-left:166px!important}
  .mobile-lineup-rail{grid-template-columns:23px minmax(0,1fr)!important;gap:6px!important;width:100%!important}
  .mobile-rail-order{
    width:21px!important;height:21px!important;align-self:center!important;padding:0!important;border:0!important;
    border-radius:7px!important;background:var(--panel2)!important;color:var(--muted)!important;font-size:7.5px!important;
  }
  .current-batter .mobile-rail-order{background:var(--accent)!important;color:#fff!important}
  .mobile-rail-history{font-size:7.2px!important;line-height:1.18!important;white-space:normal!important;overflow:visible!important;overflow-wrap:break-word!important}
}


/* ==========================================================
   v118 — MENU LAYERING + TRUE MOBILE BATTER RAIL + NO ZOOM
   Fixes the More-sheet collision with sticky scorecard chrome,
   uses a real one-column mobile batter rail (no hidden #/POS
   table columns), and blocks all scorecard pinch/page zoom.
   ========================================================== */
@media(max-width:600px){
  /* The More sheet is a true transient layer above sticky game chrome.
     The bottom command bar remains visible below it. */
  .drawer-shade{
    z-index:148!important;
    background:rgba(0,0,0,.42)!important;
  }
  #drawer.v90-more-sheet,
  #drawer.v101-more-sheet{
    z-index:155!important;
    left:8px!important;
    right:8px!important;
    top:calc(env(safe-area-inset-top) + 8px)!important;
    bottom:calc(78px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    border-radius:22px!important;
  }
  #mobileActionBar{z-index:149!important}

  /* No scorecard zoom. One-finger vertical/horizontal panning remains. */
  #main,
  #main .team-scorebook-scroll,
  #main .pitch-scroll,
  #main .v116-defense-zoom-scroll,
  #main .unified-score-table,
  #main .pitch-table,
  #main .team-defense-field{
    touch-action:pan-x pan-y!important;
  }
  #main .v116-zoom-frame{
    width:100%!important;
    height:auto!important;
    min-width:100%!important;
    transform:none!important;
  }
  #main .v116-zoom-frame>.unified-score-table,
  #main .v116-zoom-frame>.pitch-table,
  #main .v116-zoom-frame>.team-defense-field,
  #main .unified-score-table,
  #main .pitch-table,
  #main .team-defense-field{
    zoom:1!important;
    transform:none!important;
    transform-origin:0 0!important;
  }

  /* v118 mobile table contains one real frozen BATTER column. */
  .unified-score-table.v118-mobile-score-table{
    --ord-w:0px!important;
    --player-w:180px!important;
    --pos-w:0px!important;
    --sticky-total:180px!important;
    --inning-w:62px!important;
    --stat-w:54px!important;
    --row-h:58px!important;
    table-layout:fixed!important;
    width:1194px!important;
    min-width:1194px!important;
  }
  .v118-mobile-score-table .c-player{
    width:180px!important;
    min-width:180px!important;
    max-width:180px!important;
  }
  .v118-mobile-score-table .sticky-lineup-banner,
  .v118-mobile-score-table .sticky-totals-label,
  .v118-mobile-score-table .sticky-player{
    position:sticky!important;
    left:0!important;
    width:180px!important;
    min-width:180px!important;
    max-width:180px!important;
    z-index:8!important;
    background:var(--score-grid-sticky,var(--panel))!important;
  }
  .v118-mobile-score-table thead .sticky-lineup-banner,
  .v118-mobile-score-table thead .sticky-player{z-index:11!important}
  .v118-mobile-score-table .score-head-secondary .sticky-player{
    height:30px!important;
    padding:0 10px!important;
    text-align:left!important;
    font-size:8.6px!important;
    letter-spacing:.09em!important;
  }
  .team-scorebook-scroll{scroll-padding-left:180px!important}
  .v118-mobile-score-table .score-head-inning{scroll-margin-left:180px!important}

  .v118-mobile-score-table .mobile-lineup-rail{
    display:grid!important;
    grid-template-columns:25px minmax(0,1fr)!important;
    align-items:center!important;
    column-gap:7px!important;
    width:100%!important;
    min-height:58px!important;
    padding:6px 8px 6px 5px!important;
    box-sizing:border-box!important;
  }
  .v118-mobile-score-table .mobile-rail-order{
    width:22px!important;
    height:22px!important;
    display:grid!important;
    place-items:center!important;
    align-self:center!important;
    padding:0!important;
    border:0!important;
    border-radius:7px!important;
    background:var(--panel2)!important;
    color:var(--muted)!important;
    font-size:7.7px!important;
    font-weight:950!important;
  }
  .v118-mobile-score-table .current-batter .mobile-rail-order{background:var(--accent)!important;color:#fff!important}
  .v118-mobile-score-table .mobile-rail-copy{min-width:0!important;gap:3px!important}
  .v118-mobile-score-table .mobile-rail-primary{grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
  .v118-mobile-score-table .mobile-rail-name{
    min-width:0!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font-size:10.8px!important;
    line-height:1.05!important;
  }
  .v118-mobile-score-table .mobile-rail-name.rail-fit-long{font-size:10px!important}
  .v118-mobile-score-table .mobile-rail-name.rail-fit-xlong{font-size:9.2px!important}
  .v118-mobile-score-table .mobile-rail-name.rail-fit-xxlong{font-size:8.4px!important}
  .v118-mobile-score-table .mobile-rail-jersey{font-size:9px!important}
  .v118-mobile-score-table .mobile-rail-meta{font-size:8.2px!important;gap:5px!important}
  .v118-mobile-score-table .mobile-rail-meta>b{font-size:8.6px!important}
  .v118-mobile-score-table .mobile-rail-history{
    width:100%!important;
    max-width:none!important;
    font-size:7.6px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }
  .v118-mobile-score-table .batter-row.has-substitution>td{
    height:auto!important;
    min-height:78px!important;
    max-height:none!important;
  }
  .v118-mobile-score-table .batter-row.has-substitution .mobile-lineup-rail{
    min-height:78px!important;
    padding-top:7px!important;
    padding-bottom:7px!important;
  }
  .v118-mobile-score-table .current-batter>.sticky-player{
    box-shadow:inset 4px 0 0 var(--accent),inset 0 2px 0 var(--accent),inset 0 -2px 0 var(--accent)!important;
  }
}

/* ==========================================================
   v119 — PITCH HISTORY / MODAL ACTIONS / MOBILE RAIL POLISH
   ========================================================== */
@media(max-width:900px){
  /* The Play Editor is its own workspace. Never show scorecard commands under it. */
  body.play-editor-open #mobileActionBar{display:none!important;visibility:hidden!important;pointer-events:none!important}
  body.play-editor-open #playModal{z-index:210!important}
  body.play-editor-open #playModal>.play-card{height:100dvh!important;max-height:100dvh!important;padding-bottom:0!important}
  body.play-editor-open #playModal>.play-card>.play-scroll-body{
    touch-action:pan-x pan-y!important;
    padding-bottom:8px!important;
  }
  body.play-editor-open #playModal>.play-card>.modal-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    flex:0 0 auto!important;
    position:relative!important;
    bottom:auto!important;
    margin:0 -14px!important;
    padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;
    z-index:40!important;
    background:color-mix(in srgb,var(--panel) 98%,transparent)!important;
    border-top:1px solid var(--line)!important;
    box-shadow:0 -10px 24px rgba(0,0,0,.14)!important;
  }
  body.play-editor-open #playModal>.play-card>.modal-actions #applyPlayBtn{
    display:block!important;
    visibility:visible!important;
    grid-column:1/-1!important;
    min-height:52px!important;
  }

  /* Horizontal pitch history is intentionally swipeable inside the vertical editor. */
  body.editor-pitch-v110 #playModal .pitch-sequence{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    touch-action:pan-x!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-snap-type:x proximity!important;
    scrollbar-width:thin!important;
    scrollbar-color:color-mix(in srgb,var(--muted) 48%,transparent) transparent!important;
    padding-bottom:7px!important;
  }
  body.editor-pitch-v110 #playModal .pitch-sequence::-webkit-scrollbar{display:block!important;height:4px!important}
  body.editor-pitch-v110 #playModal .pitch-sequence::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--muted) 45%,transparent)!important;border-radius:999px!important}
  body.editor-pitch-v110 #playModal .pitch-chip{scroll-snap-align:start!important}
  body.editor-pitch-v110 #playModal .pitch-chip:last-child::after{display:none!important}
  body.editor-pitch-v110 #playModal .pitch-sequence-head{gap:8px!important}
  .v119-pitch-sequence-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;flex:0 0 auto!important}
  body.editor-pitch-v110 #playModal .v119-pitch-sequence-actions .small-btn{min-height:34px!important;padding:0 9px!important;font-size:9px!important;white-space:nowrap!important}
  body.editor-pitch-v110 #playModal .v119-history-btn{color:var(--accent)!important}
  body.editor-pitch-v110 #playModal .v119-history-btn:disabled{opacity:.42!important;color:var(--muted)!important}

  /* The standalone Complete Plate Appearance step banner was visually orphaned. */
  body.editor-pitch-v110 #playModal .complete-pa-heading{display:none!important}

  /* Pitch history viewer sits above the Play Editor and scrolls independently. */
  #pitchHistoryModal{z-index:240!important}
  #pitchHistoryModal>.pitch-history-card{
    width:min(92vw,520px)!important;
    max-width:520px!important;
    max-height:min(82dvh,720px)!important;
    margin:auto!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:22px!important;
    display:flex!important;
    flex-direction:column!important;
    background:var(--panel)!important;
  }
  #pitchHistoryModal .modal-head{flex:0 0 auto!important}
  .pitch-history-list{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding:10px 12px 14px!important;display:grid!important;gap:8px!important}
  .pitch-history-row{display:grid!important;grid-template-columns:34px minmax(0,1.25fr) minmax(0,1fr) 48px!important;align-items:center!important;gap:8px!important;padding:10px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:var(--soft)!important}
  .pitch-history-no{width:31px!important;height:31px!important;border-radius:999px!important;display:grid!important;place-items:center!important;border:2px solid var(--line)!important;font-size:11px!important;font-weight:950!important;color:var(--text)!important;background:var(--panel)!important}
  .pitch-history-pitch,.pitch-history-result,.pitch-history-count{min-width:0!important}
  .pitch-history-pitch strong,.pitch-history-result strong{display:block!important;font-size:11px!important;line-height:1.12!important;color:var(--text)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .pitch-history-pitch small,.pitch-history-result small{display:block!important;margin-top:3px!important;font-size:8.5px!important;color:var(--muted)!important}
  .pitch-history-result{text-align:right!important}
  .pitch-history-count{text-align:center!important;padding-left:7px!important;border-left:1px solid var(--line)!important}
  .pitch-history-count small{display:block!important;font-size:6.5px!important;letter-spacing:.08em!important;color:var(--muted)!important}
  .pitch-history-count b{display:block!important;margin-top:2px!important;font-size:12px!important;color:var(--accent)!important}
  .pitch-history-empty{padding:28px 12px!important;text-align:center!important;color:var(--muted)!important}
  .pitch-history-empty strong{display:block!important;color:var(--text)!important;margin-bottom:5px!important}

  /* No extra BATTER header row on the mobile score grid. */
  .v118-mobile-score-table .score-head-secondary{display:none!important}

  /* Order badges use the same palette as the surrounding Dark Mode surface. */
  body.dark-mode .v118-mobile-score-table .mobile-rail-order,
  body.theme-default.dark-mode .v118-mobile-score-table .mobile-rail-order{
    background:#292a2c!important;
    color:#c7c9ce!important;
    border:1px solid #36383d!important;
  }
  body.dark-mode .v118-mobile-score-table .current-batter .mobile-rail-order,
  body.theme-default.dark-mode .v118-mobile-score-table .current-batter .mobile-rail-order{
    background:var(--accent)!important;
    color:#fff!important;
    border-color:var(--accent)!important;
  }
}

@media(max-width:900px){
  html.modal-viewport-locked.play-editor-open,
  html.modal-viewport-locked.play-editor-open body.play-editor-open{
    touch-action:pan-x pan-y!important;
  }
  html.modal-viewport-locked.play-editor-open body.editor-pitch-v110 #playModal .play-card #pitchSequence,
  html.modal-viewport-locked.play-editor-open body.editor-pitch-v110 #playModal .play-card #pitchSequence *{
    touch-action:pan-x!important;
  }
  /* Default Dark uses a near-white global accent for score marks; do not use
     that token for the current batting-order badge. Keep it visibly dark-mode. */
  body.theme-default.dark-mode .v118-mobile-score-table .current-batter .mobile-rail-order,
  body.dark-mode .v118-mobile-score-table .current-batter .mobile-rail-order{
    background:#1d74d5!important;
    color:#fff!important;
    border-color:#1d74d5!important;
  }
}


/* ==========================================================
   v120 — DARK MODE SCORE-GRID STATISTICS SURFACE
   Keep AB / R / RBI / BB / K cells in the same palette as the
   rest of the live score grid instead of inheriting v99 light
   scorecard surfaces.
   ========================================================== */
body.dark-mode:not(.home-page) .unified-score-table td.stat-cell,
body.dark-mode:not(.home-page) .v118-mobile-score-table td.stat-cell{
  background:var(--score-grid-bg,var(--panel))!important;
  color:var(--text)!important;
  border-color:var(--score-grid-line,var(--line))!important;
}
body.dark-mode:not(.home-page) .unified-score-table .unified-totals-row td.stat-cell,
body.dark-mode:not(.home-page) .v118-mobile-score-table .unified-totals-row td.stat-cell{
  background:var(--score-grid-head,var(--panel2))!important;
  color:var(--text)!important;
  border-color:var(--score-grid-line,var(--line))!important;
}
/* Default Dark is deliberately neutral; pin exact surfaces after older
   default-theme light score-grid rules that use !important. */
body.theme-default.dark-mode:not(.home-page) .unified-score-table td.stat-cell,
body.theme-default.dark-mode:not(.home-page) .v118-mobile-score-table td.stat-cell{
  background:#1a1b1e!important;
  color:#eef0f2!important;
  border-color:#35383d!important;
}
body.theme-default.dark-mode:not(.home-page) .unified-score-table .unified-totals-row td.stat-cell,
body.theme-default.dark-mode:not(.home-page) .v118-mobile-score-table .unified-totals-row td.stat-cell{
  background:#202226!important;
  color:#f5f6f7!important;
  border-color:#35383d!important;
}


/* ==========================================================
   v121 — BASIC EDITOR CONTENT FIT + EXISTING BASE RUNNERS
   ========================================================== */
@media(max-width:900px){
  /* v119 intentionally made Advanced/Pitch full-height. Basic returns to the
     approved content-fitted bottom sheet and only scrolls if its content truly
     exceeds the viewport. */
  body.play-editor-open.editor-basic-v110 #playModal>.play-card{
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 16px)!important;
    align-self:flex-end!important;
  }
  body.play-editor-open.editor-basic-v110 #playModal>.play-card>.play-scroll-body{
    flex:0 1 auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 214px)!important;
    overflow-y:auto!important;
    padding:0 0 10px!important;
  }
  body.play-editor-open.editor-basic-v110 #playModal>.play-card>.modal-actions{
    flex:0 0 auto!important;
    margin:0 -14px!important;
  }

  /* The Basic editor does use AdvancedTools as the data host for EXISTING
     baserunners. Only the defensive portion remains hidden. */
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only:not(.basic-runners-empty){
    display:block!important;
    margin:10px 0 0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only.basic-runners-empty{display:none!important}
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only>.advanced-title{
    display:block!important;
    margin:10px 0 6px!important;
    padding:0!important;
    border:0!important;
    font-size:11px!important;
    line-height:1.1!important;
    letter-spacing:.12em!important;
    color:var(--muted)!important;
  }
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only .advanced-layout{display:block!important}
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only .defense-field-card,
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only .official-error-card{display:none!important}
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only .advanced-runner-card{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only .advanced-runner-card>.field-card-head{display:none!important}
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only .advanced-runner-list{display:grid!important;gap:8px!important;margin:0!important}

  /* Uniform card language for the three primary Basic sections. */
  body.editor-basic-v110 #playModal #batterResultGrid>label,
  body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label,
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card,
  body.editor-basic-v110 #playModal .score-field-card,
  body.editor-basic-v110 #playModal .v121-basic-base-runner{
    border:1px solid var(--line)!important;
    border-radius:15px!important;
    background:var(--soft)!important;
    box-shadow:none!important;
  }
  body.editor-basic-v110 #playModal .editor-section-title,
  body.editor-basic-v110 #playModal #advancedTools>.advanced-title{
    margin-top:10px!important;
    margin-bottom:6px!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label:first-child,
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card{min-height:78px!important}
  body.editor-basic-v110 #playModal .score-field-card{min-height:72px!important}

  /* Existing runners: name/base identity across the top, then a compact pair
     of controls. No runner means this entire section disappears. */
  body.editor-basic-v110 #playModal .v121-basic-base-runner{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:8px!important;
    padding:9px!important;
    align-items:end!important;
  }
  body.editor-basic-v110 #playModal .v121-runner-who{
    grid-column:1/-1!important;
    display:flex!important;
    align-items:baseline!important;
    justify-content:space-between!important;
    gap:8px!important;
    min-width:0!important;
    padding:0 2px 1px!important;
  }
  body.editor-basic-v110 #playModal .v121-runner-who b{
    min-width:0!important;
    font-size:11px!important;
    line-height:1.1!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    color:var(--text)!important;
  }
  body.editor-basic-v110 #playModal .v121-runner-who small{
    flex:0 0 auto!important;
    font-size:8px!important;
    font-weight:900!important;
    letter-spacing:.08em!important;
    color:var(--muted)!important;
  }
  body.editor-basic-v110 #playModal .v121-basic-base-runner label{
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    gap:5px!important;
    color:var(--muted)!important;
    font-size:9px!important;
    font-weight:850!important;
  }
  body.editor-basic-v110 #playModal .v121-basic-base-runner label>span{padding-left:2px!important}
  body.editor-basic-v110 #playModal .v121-basic-base-runner label>span small{font-size:7px!important;font-weight:700!important}
  body.editor-basic-v110 #playModal .v121-basic-base-runner select,
  body.editor-basic-v110 #playModal .v121-basic-base-runner input{
    min-height:44px!important;
    height:44px!important;
    border-radius:12px!important;
    background:var(--panel)!important;
  }
  body.editor-basic-v110 #playModal .v121-basic-base-runner .hidden{display:none!important}

  /* Do not reserve empty space after the final visible Basic section. */
  body.editor-basic-v110 #playModal .play-scroll-body>:last-child{margin-bottom:0!important}
}

/* ==========================================================
   v122 — UNIFORM PLAY EDITOR + QUICK PITCH ENTRY
   ========================================================== */
@media(max-width:900px){
  /* Shared section rhythm: labels are not decorative boxes. The actual
     input/select is the control, eliminating the uneven box-within-box look. */
  #playModal .editor-section-title{
    margin:12px 0 6px!important;
    font-size:11px!important;
    line-height:1.15!important;
    letter-spacing:.12em!important;
    color:var(--muted)!important;
  }
  #playModal .v122-batter-result-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    align-items:start!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  #playModal .v122-batter-result-grid>label,
  #playModal #runnerGrid>label,
  #playModal .score-field-card{
    min-width:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  #playModal .v122-batter-result-grid .v122-notation-field{grid-column:1/-1!important}
  #playModal .v122-batter-result-grid .field-label,
  #playModal #runnerGrid .field-label,
  #playModal .score-field-title{
    display:flex!important;
    min-height:18px!important;
    align-items:baseline!important;
    justify-content:center!important;
    gap:4px!important;
    margin:0 0 5px!important;
    padding:0!important;
    text-align:center!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font-size:9.5px!important;
    line-height:1.15!important;
    font-weight:850!important;
    letter-spacing:.04em!important;
    color:var(--muted)!important;
  }
  #playModal .v122-batter-result-grid .field-help,
  #playModal #runnerGrid .field-help{
    flex:0 0 auto!important;
    font-size:7.4px!important;
    line-height:1!important;
    font-weight:750!important;
    color:var(--muted)!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  #playModal .v122-batter-result-grid select,
  #playModal .v122-batter-result-grid input,
  #playModal #runnerGrid select,
  #playModal #runnerGrid input,
  #playModal .score-field-card select{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    padding:0 13px!important;
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    background:var(--panel)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    font-size:12.5px!important;
    line-height:1!important;
    text-align:left!important;
    text-overflow:ellipsis!important;
  }
  #playModal .v122-batter-result-grid input::placeholder,
  #playModal #runnerGrid input::placeholder{
    color:var(--muted)!important;
    opacity:.72!important;
    font-size:11px!important;
    text-overflow:clip!important;
  }
  #playModal .v122-notation-field input{text-align:left!important}

  /* Batter Advance is a balanced two-column row. */
  body.editor-basic-v110 #playModal .basic-runner-line{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    align-items:stretch!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid{
    display:block!important;
    min-width:0!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label:first-child{
    height:auto!important;
    min-height:0!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:5px!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card .score-field-title{
    min-height:18px!important;
    margin:0 0 5px!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-control{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    padding:0 12px!important;
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    background:var(--panel)!important;
    justify-content:center!important;
    box-sizing:border-box!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-copy{display:none!important}

  /* Scoring controls are three equal, centered fields with one visual layer. */
  #playModal .scoring-panel{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  #playModal .score-field-card{min-height:0!important;height:auto!important}
  #playModal .score-field-card.score-toggle-card:not(.v122-batter-advance-toggle){display:none!important}

  /* Existing baserunners are always the final content section. */
  #playModal .advanced-runner-card.v122-existing-runners-last{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:12px 0 0!important;
    padding:10px!important;
    border:1px solid var(--line)!important;
    border-radius:16px!important;
    background:var(--soft)!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  #playModal .advanced-runner-card.v122-existing-runners-last.is-empty{
    padding:9px 10px!important;
  }
  body.editor-basic-v110 #playModal .advanced-runner-card.v122-existing-runners-last.is-empty{display:none!important}
  #playModal .advanced-runner-card.v122-existing-runners-last>.field-card-head{
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    text-align:center!important;
    margin:0 0 8px!important;
  }
  #playModal .advanced-runner-card.v122-existing-runners-last>.field-card-head>div{
    display:grid!important;
    justify-items:center!important;
    gap:2px!important;
  }
  #playModal .advanced-runner-card.v122-existing-runners-last>.field-card-head strong{
    font-size:11px!important;
    letter-spacing:.10em!important;
    color:var(--text)!important;
  }
  #playModal .advanced-runner-card.v122-existing-runners-last>.field-card-head small{
    font-size:8.5px!important;
    line-height:1.2!important;
    color:var(--muted)!important;
  }
  body.editor-basic-v110 #playModal #advancedTools{display:none!important}
  body.editor-basic-v110 #playModal .v121-basic-base-runner{
    border:0!important;
    border-top:1px solid var(--line)!important;
    border-radius:0!important;
    background:transparent!important;
    padding:10px 0 0!important;
    margin-top:4px!important;
  }
  body.editor-basic-v110 #playModal .v121-basic-base-runner:first-child{border-top:0!important;padding-top:0!important;margin-top:0!important}

  /* Advanced / Pitch: move the runner card outside AdvancedTools without
     changing the approved defense surface. */
  body.editor-advanced-v110 #playModal .advanced-layout,
  body.editor-pitch-v110 #playModal .advanced-layout{
    display:block!important;
  }
  body.editor-advanced-v110 #playModal .advanced-runner-card.v122-existing-runners-last,
  body.editor-pitch-v110 #playModal .advanced-runner-card.v122-existing-runners-last{
    display:block!important;
  }

  /* Quick pitch entry: common action is one tap after choosing pitch/velo. */
  body.editor-pitch-v110 #playModal .v122-pitch-entry-card{
    padding:10px!important;
    border:1px solid var(--line)!important;
    border-radius:16px!important;
    background:var(--soft)!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-card .pitch-entry-card-head{
    margin-bottom:9px!important;
    text-align:center!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-card .pitch-entry-card-head strong{
    display:block!important;
    font-size:11px!important;
    letter-spacing:.11em!important;
    color:var(--text)!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-card .pitch-entry-card-head small{
    display:block!important;
    margin-top:3px!important;
    font-size:8.5px!important;
    line-height:1.25!important;
    color:var(--muted)!important;
    white-space:normal!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid>label{
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    gap:5px!important;
    text-align:center!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid>label>span{
    min-height:17px!important;
    text-align:center!important;
    font-size:9.5px!important;
    font-weight:850!important;
    color:var(--muted)!important;
    white-space:normal!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid>label>span small{font-size:7.5px!important}
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid select,
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid input,
  body.editor-pitch-v110 #playModal .v122-pitch-entry-grid .pitch-velo-wrap{
    height:48px!important;
    min-height:48px!important;
    border-radius:13px!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-quick-actions{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-quick-actions button{
    min-height:48px!important;
    border-radius:13px!important;
    border:1px solid var(--line)!important;
    background:var(--panel)!important;
    color:var(--text)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    font-size:12px!important;
    font-weight:900!important;
    box-shadow:none!important;
  }
  body.editor-pitch-v110 #playModal #pitchBallBtn span{color:#2f7fdc!important}
  body.editor-pitch-v110 #playModal #pitchStrikeBtn span{color:#d44b45!important}
  body.editor-pitch-v110 #playModal .v122-pitch-quick-actions button:active{transform:scale(.985)!important}
  body.editor-pitch-v110 #playModal .v122-other-pitch-results{
    grid-column:1/-1!important;
    border:0!important;
    background:transparent!important;
  }
  body.editor-pitch-v110 #playModal .v122-other-pitch-results summary{
    list-style:none!important;
    cursor:pointer!important;
    text-align:center!important;
    color:var(--muted)!important;
    font-size:9px!important;
    font-weight:800!important;
    padding:3px 0!important;
  }
  body.editor-pitch-v110 #playModal .v122-other-pitch-results summary::-webkit-details-marker{display:none!important}
  body.editor-pitch-v110 #playModal .v122-other-pitch-results summary::after{content:"  ▾";color:var(--accent)!important}
  body.editor-pitch-v110 #playModal .v122-other-pitch-results[open] summary::after{content:"  ▴"}
  body.editor-pitch-v110 #playModal .v122-other-pitch-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin-top:6px!important;
  }
  body.editor-pitch-v110 #playModal .v122-other-pitch-grid button{
    min-height:38px!important;
    border:1px solid var(--line)!important;
    border-radius:11px!important;
    background:var(--panel)!important;
    color:var(--text)!important;
    font-size:9px!important;
    font-weight:800!important;
  }
  body.editor-pitch-v110 #playModal .v122-compat-pitch-field{display:none!important}
  body.editor-pitch-v110 #playModal .pitch-workflow-note{display:none!important}

  /* Pitch/Advanced batter result now follows exactly the same equal pair +
     full-width notation geometry as Basic. */
  body.editor-advanced-v110 #playModal #batterResultGrid,
  body.editor-pitch-v110 #playModal #batterResultGrid,
  body.editor-basic-v110 #playModal #batterResultGrid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
  body.editor-advanced-v110 #playModal #batterResultGrid>label,
  body.editor-pitch-v110 #playModal #batterResultGrid>label,
  body.editor-basic-v110 #playModal #batterResultGrid>label{
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    overflow:visible!important;
  }

  /* Content fit should end at the final runner section, not reserve dead room. */
  body.editor-basic-v110 #playModal .play-scroll-body>:last-child,
  body.editor-advanced-v110 #playModal .play-scroll-body>:last-child,
  body.editor-pitch-v110 #playModal .play-scroll-body>:last-child{margin-bottom:0!important}
}
@media(max-width:900px){
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only,
  body.editor-basic-v110 #playModal #advancedTools.basic-runner-only:not(.basic-runners-empty){display:none!important}
  body.editor-pitch-v110 #playModal .pitch-result-field.v122-compat-pitch-field,
  body.editor-pitch-v110 #playModal .pitch-event-field.v122-compat-pitch-field,
  body.editor-pitch-v110 #playModal #addPitchBtn.v122-compat-pitch-field{display:none!important}
}
@media(max-width:900px){
  /* Final v122 specificity pass: older approved-layout rules intentionally had
     stronger selectors. These overrides are narrowly scoped to the controls
     being normalized in v122. */
  #playModal .play-card.pitch-mode-editor #batterResultGrid.v122-batter-result-grid,
  #playModal .play-card[data-editor-mode="advanced"] #batterResultGrid.v122-batter-result-grid,
  #playModal .play-card[data-editor-mode="basic"] #batterResultGrid.v122-batter-result-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
  #playModal .v122-batter-result-grid .field-help,
  #playModal #runnerGrid .field-help{
    margin:0!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label,
  body.editor-advanced-v110 #playModal #runnerGrid>label,
  body.editor-pitch-v110 #playModal #runnerGrid>label,
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card,
  body.editor-basic-v110 #playModal .scoring-panel .score-field-card,
  body.editor-advanced-v110 #playModal .scoring-panel .score-field-card,
  body.editor-pitch-v110 #playModal .scoring-panel .score-field-card{
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    min-height:0!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line #runnerGrid>label:first-child{
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line .score-toggle-card{
    border:0!important;
    background:transparent!important;
  }
  body.editor-pitch-v110 #playModal .v122-pitch-quick-actions>button{
    grid-column:auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
}
@media(max-width:900px){
  #playModal .play-card #batterResultGrid.v122-batter-result-grid{
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
}

/* ==========================================================
   v123 — EDITOR RHYTHM + UNIFIED VELOCITY
   ========================================================== */
@media(max-width:900px){
  /* Keep the transition from Batter Advance to Scoring as deliberate as
     every other section boundary — neither crowded nor wasteful. */
  #playModal .scoring-title{
    margin-top:16px!important;
    margin-bottom:6px!important;
    padding-top:0!important;
  }

  /* One velocity field, matching Pitch Type.  The unit is part of the value
     presentation instead of a detached sub-box. */
  body.editor-pitch-v110 #playModal .v123-velocity-field{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    padding:0 13px!important;
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    background:var(--panel)!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  body.editor-pitch-v110 #playModal .v123-velocity-field:focus-within{
    border-color:var(--accent)!important;
    box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent)!important;
  }
  body.editor-pitch-v110 #playModal .v123-velocity-field #pitchVelo{
    flex:0 1 auto!important;
    width:62px!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:var(--text)!important;
    font-size:17px!important;
    line-height:1!important;
    font-weight:900!important;
    text-align:right!important;
    appearance:textfield!important;
    -moz-appearance:textfield!important;
  }
  body.editor-pitch-v110 #playModal .v123-velocity-field #pitchVelo::-webkit-inner-spin-button,
  body.editor-pitch-v110 #playModal .v123-velocity-field #pitchVelo::-webkit-outer-spin-button{
    -webkit-appearance:none!important;
    margin:0!important;
  }
  body.editor-pitch-v110 #playModal .v123-velocity-field:not(.has-velocity) #pitchVelo{
    width:100%!important;
    text-align:center!important;
  }
  body.editor-pitch-v110 #playModal .v123-velocity-field #pitchVelo:focus{box-shadow:none!important}
  body.editor-pitch-v110 #playModal .v123-velocity-suffix{
    display:none!important;
    flex:0 0 auto!important;
    color:var(--muted)!important;
    font-size:12px!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:.01em!important;
    white-space:nowrap!important;
  }
  body.editor-pitch-v110 #playModal .v123-velocity-field.has-velocity .v123-velocity-suffix{
    display:inline!important;
  }
}

/* v123 final specificity: the approved pitch pair and section rhythm must win
   over older compact-editor rules. */
@media(max-width:900px){
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .v122-pitch-entry-grid #pitchType,
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .v123-velocity-field{
    height:48px!important;
    min-height:48px!important;
  }
  body.editor-basic-v110 #playModal .play-card[data-editor-mode="basic"] .scoring-title,
  body.editor-advanced-v110 #playModal .play-card[data-editor-mode="advanced"] .scoring-title,
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .scoring-title{
    margin-top:16px!important;
    margin-bottom:6px!important;
  }
}

/* ==========================================================
   v125 — DISTINCT EDITOR SECTION CARDS + OVERLAP CLEANUP
   Phase 2 live Scorecard / Defense / Pitching sign-off pass.
   ========================================================== */
@media(max-width:900px){
  /* Each core plate-appearance step reads as one intentional card. */
  #playModal #batterResultTitle,
  #playModal #runnerSectionTitle,
  #playModal .scoring-title{
    box-sizing:border-box!important;
    width:100%!important;
    margin:14px 0 0!important;
    padding:11px 12px 6px!important;
    border:1px solid var(--line)!important;
    border-bottom:0!important;
    border-radius:16px 16px 0 0!important;
    background:var(--soft)!important;
    color:var(--text)!important;
    text-align:center!important;
    font-size:11px!important;
    line-height:1.15!important;
    font-weight:900!important;
    letter-spacing:.12em!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    z-index:auto!important;
  }

  /* Batter Result: equal pair + full-width notation inside one section. */
  #playModal #batterResultGrid.v122-batter-result-grid{
    box-sizing:border-box!important;
    margin:0!important;
    padding:5px 12px 12px!important;
    border:1px solid var(--line)!important;
    border-top:0!important;
    border-radius:0 0 16px 16px!important;
    background:var(--soft)!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  /* Batter Advance: same shell in all three editor modes. */
  body.editor-basic-v110 #playModal .basic-runner-line,
  body.editor-advanced-v110 #playModal #runnerGrid,
  body.editor-pitch-v110 #playModal #runnerGrid{
    box-sizing:border-box!important;
    width:100%!important;
    margin:0!important;
    padding:5px 12px 12px!important;
    border:1px solid var(--line)!important;
    border-top:0!important;
    border-radius:0 0 16px 16px!important;
    background:var(--soft)!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  body.editor-basic-v110 #playModal .basic-runner-line{
    gap:9px!important;
  }

  /* Scoring is its own card and all three controls occupy one even row. */
  #playModal .scoring-panel{
    box-sizing:border-box!important;
    width:100%!important;
    margin:0!important;
    padding:5px 12px 12px!important;
    border:1px solid var(--line)!important;
    border-top:0!important;
    border-radius:0 0 16px 16px!important;
    background:var(--soft)!important;
    box-shadow:none!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    align-items:start!important;
    overflow:visible!important;
  }
  #playModal .scoring-panel .score-field-card{
    min-width:0!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:0!important;
  }
  #playModal .scoring-panel .score-field-title{
    position:static!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:18px!important;
    margin:0 0 5px!important;
    padding:0!important;
    text-align:center!important;
    white-space:nowrap!important;
    overflow:visible!important;
    font-size:9.5px!important;
    line-height:1.15!important;
    font-weight:850!important;
    letter-spacing:.04em!important;
    color:var(--muted)!important;
  }
  #playModal .scoring-panel .score-field-card>select{
    box-sizing:border-box!important;
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:0 30px 0 12px!important;
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    background:var(--panel)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    font-size:12.5px!important;
    line-height:1!important;
    font-weight:850!important;
    text-align:left!important;
  }

  /* Existing baserunners remain the final section, visually aligned with
     the three cards above rather than appearing attached to Scoring. */
  #playModal .advanced-runner-card.v122-existing-runners-last{
    box-sizing:border-box!important;
    margin:14px 0 0!important;
    padding:11px 12px 12px!important;
    border:1px solid var(--line)!important;
    border-radius:16px!important;
    background:var(--soft)!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  #playModal .advanced-runner-card.v122-existing-runners-last>.field-card-head{
    margin:0 0 10px!important;
  }

  /* Runner-out detail, when revealed, gets breathing room and cannot collide
     with the next section heading. */
  #playModal #runnerOutFields:not(.hidden){
    box-sizing:border-box!important;
    margin:10px 0 0!important;
    padding:10px 12px!important;
    border:1px solid var(--line)!important;
    border-radius:14px!important;
    background:var(--soft)!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    overflow:visible!important;
  }

  /* Explicit section separation: no legacy negative/absolute offsets can
     pull SCORING or MARKER into BATTER ADVANCE. */
  #playModal #runnerSectionTitle + .basic-runner-line,
  #playModal #runnerSectionTitle + #runnerGrid,
  #playModal .scoring-title + .scoring-panel{
    position:relative!important;
    top:auto!important;
    bottom:auto!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
  }
}

/* v124 final specificity pass — older approved editor rules carried more
   specific !important selectors. Keep the section-card shells authoritative. */
@media(max-width:900px){
  body.editor-basic-v110 #playModal .play-card[data-editor-mode="basic"] #batterResultGrid.v122-batter-result-grid,
  body.editor-advanced-v110 #playModal .play-card[data-editor-mode="advanced"] #batterResultGrid.v122-batter-result-grid,
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor #batterResultGrid.v122-batter-result-grid{
    margin:0!important;
    padding:5px 12px 12px!important;
    border:1px solid var(--line)!important;
    border-top:0!important;
    border-radius:0 0 16px 16px!important;
    background:var(--soft)!important;
  }
  body.editor-basic-v110 #playModal .play-card[data-editor-mode="basic"] .scoring-panel,
  body.editor-advanced-v110 #playModal .play-card[data-editor-mode="advanced"] .scoring-panel,
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .scoring-panel{
    margin:0!important;
    padding:5px 12px 12px!important;
    border:1px solid var(--line)!important;
    border-top:0!important;
    border-radius:0 0 16px 16px!important;
    background:var(--soft)!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
  }
  body.editor-basic-v110 #playModal .play-card[data-editor-mode="basic"] .scoring-panel .score-field-card,
  body.editor-advanced-v110 #playModal .play-card[data-editor-mode="advanced"] .scoring-panel .score-field-card,
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .scoring-panel .score-field-card{
    padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
  }
  body.editor-basic-v110 #playModal .play-card[data-editor-mode="basic"] .scoring-panel .score-field-title,
  body.editor-advanced-v110 #playModal .play-card[data-editor-mode="advanced"] .scoring-panel .score-field-title,
  body.editor-pitch-v110 #playModal .play-card.pitch-mode-editor .scoring-panel .score-field-title{
    position:static!important;inset:auto!important;transform:none!important;margin:0 0 5px!important;
  }
}

/* ==========================================================
   v125 — Bottom-bar-safe fitted utility sheets
   Utility menus remain separate from the live scorecard and stop above the
   permanent mobile command bar instead of scrolling behind it.
   The Play Editor keeps its dedicated full-height/modal action architecture.
   ========================================================== */
@media (max-width:700px){
  body:not(.home-page){
    --v125-action-bar-clearance: calc(86px + env(safe-area-inset-bottom));
    --v125-sheet-top-clearance: max(8px, env(safe-area-inset-top));
  }

  /* Reserve the permanent command bar for every ordinary utility sheet. */
  body:not(.home-page) .modal:not(.hidden):not(#playModal):not(#pitchHistoryModal):not(#lineupManagerModal):not(#v176PersonalTeamModal){
    padding:var(--v125-sheet-top-clearance) 0 var(--v125-action-bar-clearance)!important;
    box-sizing:border-box!important;
    place-items:end stretch!important;
  }

  body:not(.home-page) .modal:not(.hidden):not(#playModal):not(#pitchHistoryModal):not(#lineupManagerModal):not(#v176PersonalTeamModal) > .modal-card{
    width:100%!important;
    max-width:none!important;
    max-height:calc(100dvh - var(--v125-action-bar-clearance) - var(--v125-sheet-top-clearance))!important;
    margin:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:14px!important;
  }

  /* These are the tall utility sheets reported on-device. Keep their header
     visible while only their contents scroll. */
  #lineupManagerModal:not(.hidden) > .v102-lineup-card,
  #exportModal:not(.hidden) > .v101-export-card,
  #themeModal:not(.hidden) > .v101-theme-card,
  #settingsModal:not(.hidden) > .settings-card,
  #mlbModal:not(.hidden) > .mlb-finder-card,
  #gameInfoModal:not(.hidden) > .v102-manager-card,
  #playerModal:not(.hidden) > .modal-card{
    display:flex!important;
    flex-direction:column!important;
  }

  #lineupManagerModal .modal-head,
  #exportModal .modal-head,
  #themeModal .modal-head,
  #settingsModal .modal-head,
  #mlbModal .modal-head,
  #gameInfoModal .modal-head,
  #playerModal .modal-head{
    flex:0 0 auto!important;
    top:0!important;
  }

  /* The manager/export content can scroll naturally within the available
     sheet height. No tile or lineup row may disappear beneath the action bar. */
  #lineupManagerContent,
  #exportModal .v101-export-grid{
    flex:0 0 auto!important;
  }
}

/* ==========================================================
   v126 — Phase 2 Plays refinement + Game Information cleanup
   ========================================================== */
.v126-game-info-note{
  margin:14px 4px 4px!important;
  padding:0 2px 4px!important;
}
#gameInfoManagerContent{padding-bottom:8px!important}
#gameInfoManagerContent .v102-manager-done{display:none!important}

.v126-plays-page{padding-bottom:calc(var(--mobile-action-height,86px) + env(safe-area-inset-bottom) + 18px)!important}
.v126-plays-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px 14px!important;margin:10px 0 12px!important;border-radius:18px!important;
}
.v126-plays-title{min-width:0}
.v126-plays-title>small{display:block;font-size:8px;font-weight:900;letter-spacing:.17em;color:var(--muted);margin-bottom:4px}
.v126-plays-title>div{display:flex;align-items:baseline;gap:9px;min-width:0}
.v126-plays-title h2{margin:0;font:700 22px/1 Georgia,serif;color:var(--text)}
.v126-plays-title span{font-size:10px;font-weight:800;color:var(--muted);white-space:nowrap}
.v126-play-filters{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;border:1px solid var(--line);border-radius:14px;background:var(--soft);min-width:180px}
.v126-play-filters button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:0 9px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:850}
.v126-play-filters button span{font-size:10px}.v126-play-filters button small{font-size:8px;opacity:.72}
.v126-play-filters button.active{background:var(--accent);color:#fff;box-shadow:0 2px 7px color-mix(in srgb,var(--accent) 24%,transparent)}
.v126-play-list{display:grid;gap:12px}
.v126-inning-card{padding:0!important;overflow:hidden;border-radius:18px!important}
.v126-inning-card .v105-inning-head{padding:10px 12px!important;background:color-mix(in srgb,var(--accent) 5%,var(--panel))!important}
.v126-inning-rows{display:grid}
.v126-play-event{
  position:relative;display:grid;grid-template-columns:30px minmax(0,1fr) 72px;gap:10px;align-items:center;
  width:100%;min-height:88px;padding:11px 12px;border:0;border-bottom:1px solid var(--line);
  background:var(--panel);color:var(--text);text-align:left;
}
.v126-play-event:last-child{border-bottom:0}
.v126-play-event:active{background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
.v126-play-event:before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 3px 3px 0;background:transparent}
.v126-play-event.tone-hit:before{background:#33a65c}.v126-play-event.tone-out:before{background:#d24c4c}.v126-play-event.tone-onbase:before{background:var(--accent)}.v126-play-event.tone-runner:before{background:#be8a2f}
.v126-pa-num{width:29px;height:29px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;font-size:11px;font-weight:900;color:var(--muted);background:var(--soft)}
.v126-event-main{display:grid;gap:8px;min-width:0}
.v126-event-title{display:flex;align-items:center;gap:8px;min-width:0}
.v126-batter-id{display:flex;align-items:baseline;gap:6px;min-width:0;flex:1}
.v126-batter-id strong{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.v126-batter-id small{font-size:9px;font-weight:800;color:var(--muted);white-space:nowrap}
.v126-result-pill{flex:none;margin:0;padding:4px 7px;border:1px solid var(--line);border-radius:8px;font-size:8.5px;font-style:normal;font-weight:950;white-space:nowrap}
.v126-result-pill.hit{color:#1b9a4b;border-color:#51b87555;background:#45b96b12}.v126-result-pill.out{color:#d14a4a;border-color:#d5545455;background:#d5545410}.v126-result-pill.onbase{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);background:color-mix(in srgb,var(--accent) 8%,transparent)}.v126-result-pill.runner{color:#b98018;border-color:#c2943d55;background:#c2943d10}
.v126-event-details{display:grid;gap:5px;min-width:0}
.v126-event-details>span{display:grid;grid-template-columns:58px minmax(0,1fr);gap:7px;align-items:start;min-width:0}
.v126-event-details b{font-size:7.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);padding-top:1px}
.v126-event-details em{font-size:10.5px;line-height:1.3;font-style:normal;color:var(--text);min-width:0;white-space:normal;overflow-wrap:anywhere}
.v126-event-details .movement em{color:var(--muted)}
.v126-event-metrics{display:grid;grid-template-columns:1fr 1fr;gap:3px;align-self:stretch;border-left:1px solid var(--line);padding-left:8px}
.v126-event-metrics>span{display:grid;place-items:center;align-content:center;min-height:36px}
.v126-event-metrics b{font-size:14px}.v126-event-metrics small{font-size:6.5px;letter-spacing:.08em;color:var(--muted)}
.v126-event-metrics>i{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:4px;color:var(--accent);font-style:normal;border-top:1px solid var(--line);padding-top:5px}
.v126-event-metrics>i span{font-size:12px}.v126-event-metrics>i small{font-size:7px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}

body.dark-mode .v126-play-event{background:var(--panel)!important}
body.dark-mode .v126-play-filters{background:var(--soft)!important}

@media(max-width:600px){
 .v126-plays-toolbar{align-items:stretch!important;flex-direction:column!important;gap:9px!important;padding:11px 12px!important}
 .v126-plays-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
 .v126-plays-title>small{margin:0}.v126-plays-title>div{margin-left:auto}
 .v126-play-filters{width:100%;min-width:0}
 .v126-play-event{grid-template-columns:28px minmax(0,1fr) 64px;gap:8px;padding:10px 9px 10px 11px;min-height:92px}
 .v126-batter-id strong{font-size:12.5px}
 .v126-event-details>span{grid-template-columns:54px minmax(0,1fr);gap:5px}
 .v126-event-details em{font-size:10px}
 .v126-event-metrics{padding-left:5px}
}


/* ==========================================================
   v127 — Phase 2 Stats refinement + Plays corrections
   ========================================================== */

/* Plays: active team filter stays readable in true Dark Mode even when
   the theme accent itself is light/near-white. */
body.dark-mode .v126-play-filters button.active{
  background:#2f80ed!important;
  color:#fff!important;
  box-shadow:0 2px 8px rgba(47,128,237,.28)!important;
}
body.dark-mode .v126-play-filters button.active span,
body.dark-mode .v126-play-filters button.active small{color:#fff!important;opacity:1!important}

/* Stats page: compact intro and stronger team-book separation. */
.v127-stats-page{padding-bottom:calc(var(--mobile-action-height,86px) + env(safe-area-inset-bottom) + 18px)!important}
.v127-stats-intro{margin-bottom:12px!important}
.v127-team-stack{gap:18px!important}
.v127-team-section{
  border:1px solid var(--line)!important;
  box-shadow:0 8px 24px rgba(18,35,52,.06)!important;
  background:var(--panel)!important;
}
.v127-team-section.away{border-top:3px solid var(--accent)!important}
.v127-team-section.home{border-top:3px solid color-mix(in srgb,var(--muted) 68%,var(--line))!important}
.v127-team-section .v105-team-head{
  padding:14px!important;
  background:var(--panel)!important;
}
.v127-team-section.away .v105-team-head{background:color-mix(in srgb,var(--accent) 7%,var(--panel))!important}
.v127-team-section.home .v105-team-head{background:color-mix(in srgb,var(--muted) 5%,var(--panel))!important}
.v127-team-section .v105-team-role{margin-bottom:6px!important}
.v127-team-section .v105-team-id strong{font-size:15.5px!important;line-height:1.15!important}
.v127-team-section .v105-team-id small{font-size:9.5px!important}
.v127-team-section .v105-rhe{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--soft)}
.v127-team-section .v105-rhe span{min-width:40px!important;padding:6px 7px!important;border-left:1px solid var(--line)!important}
.v127-team-section .v105-rhe span:first-child{border-left:0!important}

/* Six headline offensive rates are a dedicated summary strip. */
.v127-team-section>.v105-rate-grid{
  margin:0!important;
  background:var(--soft)!important;
  border-top:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
}
.v127-team-section>.v105-rate-grid span{padding:10px 4px!important}
.v127-team-section>.v105-rate-grid b{font-size:14px!important}
.v127-team-section>.v105-rate-grid small{font-size:7.5px!important;font-weight:800!important}

/* Each statistical family reads as its own section rather than one long table. */
.v127-team-section .v105-stat-block{background:var(--panel)!important;border-bottom:1px solid var(--line)!important}
.v127-team-section .v105-subhead{min-height:42px!important;padding:10px 12px!important;background:color-mix(in srgb,var(--soft) 72%,var(--panel))!important}
.v127-team-section .v105-subhead strong{font-size:11.5px!important}
.v127-team-section .v105-subhead span{font-size:8.5px!important}

/* Horizontal table containment + opaque sticky identity cells. */
.v127-team-section .v105-table-scroll{
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
  background:var(--panel)!important;
  scrollbar-width:thin;
}
.v127-team-section .v105-table-scroll table{background:var(--panel)!important}
.v127-team-section .v105-stat-block th,
.v127-team-section .v105-stat-block td{background:var(--panel)!important;color:var(--text)!important}
.v127-team-section .v105-stat-block thead th{
  background:var(--soft)!important;
  color:var(--muted)!important;
  position:sticky;
  top:0;
  z-index:1;
}
.v127-team-section .v105-stat-block th:first-child{
  position:sticky!important;
  left:0!important;
  z-index:3!important;
  min-width:150px!important;
  background:var(--panel)!important;
  box-shadow:1px 0 0 var(--line);
}
.v127-team-section .v105-stat-block thead th:first-child{
  z-index:4!important;
  background:var(--soft)!important;
}

/* Baserunning and Fielding are two balanced mini-cards. */
.v127-team-section .v105-secondary-stats{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  padding:12px!important;
  background:var(--panel)!important;
  border-bottom:1px solid var(--line)!important;
}
.v127-team-section .v105-secondary-stats>section{
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  overflow:hidden!important;
  background:var(--soft)!important;
}
.v127-team-section .v105-secondary-stats>section:first-child{border-right:1px solid var(--line)!important}
.v127-team-section .v105-secondary-stats>section .v105-subhead{background:transparent!important;border-bottom:1px solid var(--line)!important;justify-content:center!important}
.v127-team-section .v105-secondary-stats>section>div:last-child{background:var(--panel)!important}
.v127-team-section .v105-secondary-stats>section>div:last-child span{padding:9px 3px!important}

/* Line score uses the same fully opaque surfaces in both themes. */
.v127-stats-page .v105-linescore{border:1px solid var(--line)!important;background:var(--panel)!important}
.v127-stats-page .v105-linescore table,
.v127-stats-page .v105-linescore th,
.v127-stats-page .v105-linescore td{background:var(--panel)!important;color:var(--text)!important}
.v127-stats-page .v105-linescore thead th{background:var(--soft)!important;color:var(--muted)!important}
.v127-stats-page .v105-linescore th:first-child{background:var(--panel)!important;box-shadow:1px 0 0 var(--line)}
.v127-stats-page .v105-linescore thead th:first-child{background:var(--soft)!important}

body.dark-mode .v127-team-section,
body.dark-mode .v127-team-section .v105-team-head,
body.dark-mode .v127-team-section .v105-stat-block,
body.dark-mode .v127-team-section .v105-table-scroll,
body.dark-mode .v127-team-section .v105-table-scroll table,
body.dark-mode .v127-team-section .v105-stat-block th,
body.dark-mode .v127-team-section .v105-stat-block td,
body.dark-mode .v127-stats-page .v105-linescore,
body.dark-mode .v127-stats-page .v105-linescore table,
body.dark-mode .v127-stats-page .v105-linescore th,
body.dark-mode .v127-stats-page .v105-linescore td{
  background:var(--panel)!important;
  color:var(--text)!important;
}
body.dark-mode .v127-team-section .v105-stat-block thead th,
body.dark-mode .v127-team-section .v105-stat-block thead th:first-child,
body.dark-mode .v127-stats-page .v105-linescore thead th,
body.dark-mode .v127-stats-page .v105-linescore thead th:first-child{
  background:var(--soft)!important;
  color:var(--muted)!important;
}

@media(max-width:620px){
  .v127-stats-intro{align-items:center!important;padding:11px 12px!important}
  .v127-stats-intro p{display:none!important}
  .v127-stats-intro h2{font-size:21px!important;margin-bottom:0!important}
  .v127-team-section .v105-team-head{align-items:center!important}
  .v127-team-section .v105-team-id img{width:34px!important;height:34px!important}
  .v127-team-section .v105-rhe span{min-width:36px!important;padding:5px!important}
  .v127-team-section .v105-secondary-stats{grid-template-columns:1fr!important;gap:8px!important;padding:10px!important}
  .v127-team-section .v105-stat-block th:first-child{min-width:142px!important}
  .v127-team-section .v105-subhead span{white-space:nowrap!important}
}

/* ========================================================================
   v129 — Phase 2 Stats table geometry correction
   Deterministic sticky identity widths prevent header/body overlap and make
   Fielding Detail use the phone width efficiently.
   ======================================================================== */

/* All Stats data tables use separate borders so sticky cells paint as a true
   opaque layer instead of allowing moving cell borders/text to bleed through. */
.v129-stats-page .v105-stat-block table{
  border-collapse:separate!important;
  border-spacing:0!important;
}
.v129-stats-page .v105-table-scroll{
  padding:0!important;
  margin:0!important;
  scroll-padding-left:0!important;
}

/* BATTING — one deterministic frozen PLAYER rail followed by fixed-width stats.
   This prevents PA/AB text from ever colliding with the sticky PLAYER header. */
.v129-stats-page .v105-batting-table{
  table-layout:fixed!important;
  width:1490px!important;
  min-width:1490px!important;
  max-width:none!important;
}
.v129-stats-page .v105-batting-table th:first-child{
  width:176px!important;
  min-width:176px!important;
  max-width:176px!important;
  left:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:var(--panel)!important;
  z-index:8!important;
  box-shadow:2px 0 0 var(--line),10px 0 14px -14px rgba(15,23,42,.5)!important;
}
.v129-stats-page .v105-batting-table thead th:first-child{
  background:var(--soft)!important;
  z-index:9!important;
}
.v129-stats-page .v105-batting-table th:not(:first-child),
.v129-stats-page .v105-batting-table td{
  width:62px!important;
  min-width:62px!important;
  max-width:62px!important;
  box-sizing:border-box!important;
}
.v129-stats-page .v105-batting-table tbody th:first-child b{
  max-width:156px!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* PITCHING — the true left edge is always PITCHER | IP | H | R ... . */
.v129-stats-page .v105-pitch-table{
  table-layout:fixed!important;
  width:720px!important;
  min-width:720px!important;
  max-width:720px!important;
}
.v129-stats-page .v105-pitch-table th:first-child{
  width:176px!important;
  min-width:176px!important;
  max-width:176px!important;
  left:0!important;
  box-sizing:border-box!important;
  background:var(--panel)!important;
  z-index:8!important;
  box-shadow:2px 0 0 var(--line),10px 0 14px -14px rgba(15,23,42,.5)!important;
}
.v129-stats-page .v105-pitch-table thead th:first-child{
  background:var(--soft)!important;
  z-index:9!important;
}
.v129-stats-page .v105-pitch-table th:not(:first-child),
.v129-stats-page .v105-pitch-table td{
  width:68px!important;
  min-width:68px!important;
  max-width:68px!important;
  box-sizing:border-box!important;
}

/* FIELDING DETAIL — POS is just a baseball abbreviation, so there is no reason
   for it to consume a player-name-sized sticky column. The full PO/A/E/DP/TP
   line fits the mobile card without horizontal scrolling. */
.v129-stats-page .v105-fielding-detail .v105-table-scroll{
  overflow-x:hidden!important;
}
.v129-stats-page .v105-fielding-detail table{
  table-layout:fixed!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
.v129-stats-page .v105-fielding-detail table th:first-child{
  position:static!important;
  width:66px!important;
  min-width:66px!important;
  max-width:66px!important;
  text-align:center!important;
  box-shadow:none!important;
  background:var(--panel)!important;
  z-index:auto!important;
}
.v129-stats-page .v105-fielding-detail table thead th:first-child{
  background:var(--soft)!important;
}
.v129-stats-page .v105-fielding-detail table th:not(:first-child),
.v129-stats-page .v105-fielding-detail table td{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  text-align:center!important;
}

/* Dark Mode keeps the same geometry with fully opaque frozen surfaces. */
body.dark-mode .v129-stats-page .v105-batting-table th:first-child,
body.dark-mode .v129-stats-page .v105-pitch-table th:first-child{
  background:var(--panel)!important;
  box-shadow:2px 0 0 var(--line),10px 0 14px -14px rgba(0,0,0,.8)!important;
}
body.dark-mode .v129-stats-page .v105-batting-table thead th:first-child,
body.dark-mode .v129-stats-page .v105-pitch-table thead th:first-child,
body.dark-mode .v129-stats-page .v105-fielding-detail table thead th:first-child{
  background:var(--soft)!important;
}

@media(max-width:620px){
  .v129-stats-page .v105-batting-table th:first-child,
  .v129-stats-page .v105-pitch-table th:first-child{
    min-width:176px!important;
    width:176px!important;
    max-width:176px!important;
  }
  .v129-stats-page .v105-fielding-detail table th:first-child{
    width:62px!important;
    min-width:62px!important;
    max-width:62px!important;
  }
}

/* ========================================================================
   v129 — Stats frozen-header mask + Pitch Center completion
   The frozen PLAYER/PITCHER header owns a dedicated opaque compositor layer
   so horizontally scrolling column labels can never paint through it in iOS
   Safari. Pitch Center receives the same compact Game Center rhythm as Plays
   and Stats without changing pitch/scoring logic.
   ======================================================================== */

/* STATS HEADER MASKING ---------------------------------------------------- */
.v129-stats-page .v105-table-scroll{
  position:relative!important;
  isolation:isolate!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
.v129-stats-page .v105-batting-table,
.v129-stats-page .v105-pitch-table{
  position:relative!important;
  isolation:isolate!important;
}
/* Moving header cells do not need vertical sticky behavior inside these
   horizontal-only scrollers. Keeping them ordinary cells avoids Safari's
   competing sticky layers. */
.v129-stats-page .v105-batting-table thead th:not(:first-child),
.v129-stats-page .v105-pitch-table thead th:not(:first-child){
  position:relative!important;
  top:auto!important;
  left:auto!important;
  z-index:1!important;
  background:var(--panel2,var(--panel))!important;
}
/* The identity header is the only horizontally sticky header cell. Give it
   a promoted, fully opaque layer that sits above every moving label. */
.v129-stats-page .v105-batting-table thead th:first-child,
.v129-stats-page .v105-pitch-table thead th:first-child{
  position:sticky!important;
  left:0!important;
  top:auto!important;
  z-index:80!important;
  isolation:isolate!important;
  background:var(--panel2,var(--panel))!important;
  background-color:var(--panel2,var(--panel))!important;
  background-image:none!important;
  background-clip:border-box!important;
  -webkit-transform:translateZ(0)!important;
  transform:translateZ(0)!important;
  backface-visibility:hidden!important;
  -webkit-backface-visibility:hidden!important;
  box-shadow:inset 0 0 0 999px var(--panel2,var(--panel)),2px 0 0 var(--line),12px 0 16px -16px rgba(15,23,42,.7)!important;
}
/* Body identity cells get the same compositor treatment so names stay opaque
   during fast horizontal swipes. */
.v129-stats-page .v105-batting-table tbody th:first-child,
.v129-stats-page .v105-pitch-table tbody th:first-child{
  position:sticky!important;
  left:0!important;
  z-index:60!important;
  isolation:isolate!important;
  background:var(--panel)!important;
  background-color:var(--panel)!important;
  background-image:none!important;
  background-clip:border-box!important;
  -webkit-transform:translateZ(0)!important;
  transform:translateZ(0)!important;
  backface-visibility:hidden!important;
  -webkit-backface-visibility:hidden!important;
  box-shadow:inset 0 0 0 999px var(--panel),2px 0 0 var(--line),12px 0 16px -16px rgba(15,23,42,.55)!important;
}
body.dark-mode .v129-stats-page .v105-batting-table thead th:first-child,
body.dark-mode .v129-stats-page .v105-pitch-table thead th:first-child{
  background:var(--panel2,var(--panel))!important;
  background-color:var(--panel2,var(--panel))!important;
  box-shadow:inset 0 0 0 999px var(--panel2,var(--panel)),2px 0 0 var(--line),12px 0 16px -16px rgba(0,0,0,.95)!important;
}
body.dark-mode .v129-stats-page .v105-batting-table tbody th:first-child,
body.dark-mode .v129-stats-page .v105-pitch-table tbody th:first-child{
  background:var(--panel)!important;
  background-color:var(--panel)!important;
  box-shadow:inset 0 0 0 999px var(--panel),2px 0 0 var(--line),12px 0 16px -16px rgba(0,0,0,.9)!important;
}
/* A narrow mask lip closes the 1–2 px rasterization seam Safari can expose
   between the frozen rail and the first moving column while momentum scrolling. */
.v129-stats-page .v105-batting-table thead th:first-child::after,
.v129-stats-page .v105-pitch-table thead th:first-child::after,
.v129-stats-page .v105-batting-table tbody th:first-child::after,
.v129-stats-page .v105-pitch-table tbody th:first-child::after{
  content:"";
  position:absolute;
  top:0;
  right:-3px;
  bottom:0;
  width:4px;
  background:inherit;
  pointer-events:none;
}

/* PITCH CENTER ----------------------------------------------------------- */
.v129-pitches-page{padding-bottom:calc(var(--mobile-action-height,86px) + env(safe-area-inset-bottom) + 18px)!important}
.v129-pitches-page .mode-page-head{
  align-items:center!important;
  padding:10px 12px!important;
  margin:10px 0!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--panel)!important;
}
.v129-pitches-page .mode-page-head h2{font-size:22px!important;margin:2px 0!important}
.v129-pitches-page .mode-page-head p{font-size:8.5px!important;line-height:1.35!important}
.v129-pitches-page .mode-help-strip{margin-bottom:12px!important;border-radius:14px!important}
.v129-pitches-page .pitch-dashboard-grid{gap:12px!important}
.v129-pitches-page .pitch-dashboard-card{
  border-radius:16px!important;
  overflow:hidden!important;
  background:var(--panel)!important;
}
.v129-pitches-page .pitch-inning-card{border-radius:16px!important;background:var(--panel)!important}
.v129-pitches-page .pitch-atbat{
  border-radius:15px!important;
  overflow:hidden!important;
  background:var(--panel)!important;
}
.v129-pitches-page .pitch-atbat-seq{
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
}
.v129-pitches-page .pitch-atbat-seq>span{background:var(--panel2,var(--panel))!important}
body.dark-mode .v129-pitches-page .mode-page-head,
body.dark-mode .v129-pitches-page .pitch-dashboard-card,
body.dark-mode .v129-pitches-page .pitch-inning-card,
body.dark-mode .v129-pitches-page .pitch-atbat{background:var(--panel)!important;color:var(--text)!important}
@media(max-width:620px){
  .v129-pitches-page .mode-page-head p{display:none!important}
  .v129-pitches-page .mode-help-strip{padding:9px 10px!important}
  .v129-pitches-page .pitch-dashboard-grid{grid-template-columns:1fr!important}
}

/* ========================================================================
   v130 — Stats two-pane tables
   PLAYER/PITCHER identity rails are physically separate from the horizontally
   scrolling stat grids. No sticky table-cell compositor is used, so iOS Safari
   cannot paint PA/AB/IP/H labels through the identity header during momentum
   scrolling.
   ======================================================================== */
.v130-stats-page .v130-stat-block{overflow:hidden!important;background:var(--panel)!important}
.v130-stats-page .v130-split-table{
  --v130-id-w:176px;
  --v130-head-h:42px;
  --v130-row-h:78px;
  display:grid!important;
  grid-template-columns:var(--v130-id-w) minmax(0,1fr)!important;
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  background:var(--panel)!important;
  border:0!important;
}
.v130-stats-page .v130-pitch-split{--v130-row-h:64px}
.v130-stats-page .v130-id-pane{
  position:relative!important;
  z-index:4!important;
  min-width:0!important;
  width:var(--v130-id-w)!important;
  overflow:hidden!important;
  background:var(--panel)!important;
  border-right:2px solid var(--line)!important;
  box-shadow:8px 0 14px -14px rgba(15,23,42,.5)!important;
}
.v130-stats-page .v130-id-head,
.v130-stats-page .v130-stat-head{
  height:var(--v130-head-h)!important;
  min-height:var(--v130-head-h)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  background:var(--soft)!important;
  border-bottom:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:8px!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  white-space:nowrap!important;
}
.v130-stats-page .v130-id-head{
  justify-content:flex-start!important;
  padding:0 14px!important;
}
.v130-stats-page .v130-id-row{
  height:var(--v130-row-h)!important;
  min-height:var(--v130-row-h)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  padding:8px 14px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  border-bottom:1px solid var(--line)!important;
  overflow:hidden!important;
}
.v130-stats-page .v130-id-row b{
  display:block!important;
  max-width:100%!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1.12!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.v130-stats-page .v130-id-row small{
  display:block!important;
  margin-top:4px!important;
  color:var(--muted)!important;
  font-size:8px!important;
  line-height:1!important;
}
.v130-stats-page .v130-pitch-id b{white-space:normal!important}
.v130-stats-page .v130-stat-scroll{
  position:relative!important;
  z-index:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
  touch-action:pan-x pan-y!important;
  background:var(--panel)!important;
  scrollbar-width:thin!important;
}
.v130-stats-page .v130-stat-grid{
  --v130-cell-w:64px;
  display:grid!important;
  grid-template-columns:repeat(var(--v130-cols),var(--v130-cell-w))!important;
  grid-template-rows:var(--v130-head-h)!important;
  grid-auto-rows:var(--v130-row-h)!important;
  width:max-content!important;
  min-width:max-content!important;
  background:var(--panel)!important;
}
.v130-stats-page .v130-pitch-split .v130-stat-grid{--v130-cell-w:68px}
.v130-stats-page .v130-stat-cell{
  height:var(--v130-row-h)!important;
  min-height:var(--v130-row-h)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  padding:6px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  border-right:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
  font-size:11px!important;
  white-space:nowrap!important;
}
.v130-stats-page .v130-stat-head{border-right:1px solid var(--line)!important}
body.dark-mode .v130-stats-page .v130-split-table,
body.dark-mode .v130-stats-page .v130-id-pane,
body.dark-mode .v130-stats-page .v130-id-row,
body.dark-mode .v130-stats-page .v130-stat-scroll,
body.dark-mode .v130-stats-page .v130-stat-grid,
body.dark-mode .v130-stats-page .v130-stat-cell{background:var(--panel)!important}
body.dark-mode .v130-stats-page .v130-id-head,
body.dark-mode .v130-stats-page .v130-stat-head{background:var(--soft)!important}
body.dark-mode .v130-stats-page .v130-id-pane{box-shadow:8px 0 14px -14px rgba(0,0,0,.95)!important}

@media(max-width:620px){
  .v130-stats-page .v130-split-table{--v130-id-w:166px;--v130-row-h:76px}
  .v130-stats-page .v130-pitch-split{--v130-row-h:62px}
  .v130-stats-page .v130-id-head{padding:0 12px!important}
  .v130-stats-page .v130-id-row{padding:8px 12px!important}
  .v130-stats-page .v130-id-row b{font-size:10.5px!important}
  .v130-stats-page .v130-stat-grid{--v130-cell-w:62px}
  .v130-stats-page .v130-pitch-split .v130-stat-grid{--v130-cell-w:66px}
}

/* ==========================================================
   v132 — Runner movement / baserunning audit
   ========================================================== */
@media(max-width:900px){
  #playModal .play-card.v132-runner-only-event #runnerGrid,
  #playModal .play-card.v132-runner-only-event .v122-batter-advance-toggle{
    opacity:.52!important;
  }
  #playModal .play-card.v132-runner-only-event #runnerGrid select:disabled,
  #playModal .play-card.v132-runner-only-event #runnerGrid input:disabled{
    cursor:not-allowed!important;
  }
  body.editor-basic-v110 #playModal .v132-basic-out-details{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:8px!important;
    min-width:0!important;
  }
  body.editor-basic-v110 #playModal .v132-basic-out-details.hidden{display:none!important}
  body.editor-basic-v110 #playModal .v132-basic-out-details label{min-width:0!important}
  body.editor-basic-v110 #playModal .v132-basic-out-details input,
  body.editor-basic-v110 #playModal .v132-basic-out-details select{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    height:44px!important;
    border-radius:12px!important;
    background:var(--panel)!important;
  }
  body.editor-basic-v110 #playModal .v121-basic-base-runner.v132-has-out-detail{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  }
}
@media(max-width:900px){
  #playModal .v132-run-timing{grid-column:1/-1!important;min-width:0!important}
  #playModal .v132-run-timing.hidden{display:none!important}
  #playModal .v132-run-timing select{width:100%!important;min-width:0!important}
}

/* v154.2 fallback — obstruction error-control structural hotfix */
#v140Preview .v1542-error-box{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;box-sizing:border-box!important}
#v140Preview .v1542-error-toggle-row{display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;align-items:start!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#v140Preview .v1542-error-toggle-row>input.v1542-error-checkbox[type="checkbox"]{display:block!important;width:22px!important;min-width:22px!important;max-width:22px!important;height:22px!important;min-height:22px!important;max-height:22px!important;padding:0!important;margin:1px 0 0!important;box-sizing:border-box!important;-webkit-appearance:checkbox!important;appearance:auto!important}
#v140Preview .v1542-error-copy{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
#v140Preview .v1542-error-copy b,#v140Preview .v1542-error-copy small{display:block!important;width:100%!important;max-width:100%!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important}
#v140Preview label.v1542-error-fielder{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:5px!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important}
#v140Preview label.v1542-error-fielder>span,#v140Preview label.v1542-error-fielder>select{width:100%!important;min-width:0!important;max-width:100%!important}


/* v156 substitution timing + position changes */
.v156-sub-row{position:relative;margin-bottom:18px!important}
.v156-sub-row .sub-type{min-width:0}
.v156-sub-row .v156-sub-help{grid-column:1/-1;display:block;margin:-1px 2px 0;font-size:10px;line-height:1.35;color:var(--muted,#6b7280)}
.v156-sub-row input[readonly]{opacity:.72;background:rgba(127,127,127,.08)}
@media(max-width:600px){
 .v156-sub-row{grid-template-columns:minmax(118px,1.25fr) minmax(120px,1.5fr) 48px 64px 52px 40px!important;overflow-x:auto;padding-bottom:2px}
 .v156-sub-row .v156-sub-help{position:sticky;left:0;max-width:calc(100vw - 48px);font-size:11px}
}

/* v156.1 — compact at-bat marker + personnel modal */
body .play-cell .event-marker,
body .play-cell .v137-grid-marker{
  height:8px!important;min-height:8px!important;max-height:8px!important;
  line-height:8px!important;font-size:5.5px!important;font-weight:900!important;
  letter-spacing:.055em!important;padding:0 2px!important;border:0!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  overflow:hidden!important;white-space:nowrap!important;
}
body:not(.dark-mode) .play-cell .event-marker,
body:not(.dark-mode) .play-cell .v137-grid-marker{background:#111!important;color:#fff!important}
body.dark-mode .play-cell .event-marker,
body.dark-mode .play-cell .v137-grid-marker{background:#f3f4f6!important;color:#111827!important;box-shadow:0 -1px 0 #4b5563!important}
#playModal #v137AtBatBtn{white-space:nowrap!important;font-size:12px!important;padding-left:5px!important;padding-right:5px!important}
#v146AtBatModal.v1561-unused{} /* cache-bust selector */
.v1561-atbat-card{width:min(92vw,460px)!important}
.v1561-atbat-options button{min-height:70px!important}
#v1561PersonnelModal{z-index:1605!important}
.v1561-personnel-card{width:min(94vw,510px)!important;max-height:min(86dvh,720px)!important;background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:22px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.v1561-personnel-scroll{padding:12px 14px;overflow-y:auto;display:grid;gap:10px;-webkit-overflow-scrolling:touch}
.v1561-change-section{border:1px solid var(--line);border-radius:15px;background:var(--panel2);padding:12px;display:grid;gap:10px}
.v1561-change-section>header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border:0!important;padding:0!important;background:transparent!important}
.v1561-change-section>header div{min-width:0}.v1561-change-section>header small,.v1561-change-section>header strong{display:block}.v1561-change-section>header small{font-size:8px;letter-spacing:.08em;color:var(--muted)}.v1561-change-section>header strong{margin-top:2px;font-size:15px}.v1561-change-section>header>span{max-width:48%;font-size:9px;color:var(--muted);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v1561-change-grid{display:grid;grid-template-columns:92px minmax(0,1fr);gap:8px}.v1561-change-grid label{display:grid;gap:4px;font-size:8px;color:var(--muted);font-weight:750}.v1561-change-grid label.wide{grid-column:1/-1}.v1561-change-grid input,.v1561-change-grid select{width:100%;min-width:0;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);padding:0 10px;font-size:13px}.v1561-effective{display:grid;align-content:center;gap:2px;padding:6px 9px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.v1561-effective small{font-size:7px;color:var(--muted);letter-spacing:.08em}.v1561-effective b{font-size:10px}.v1561-help{font-size:8px;line-height:1.4;color:var(--muted)}
.v1561-personnel-actions{flex:none;display:grid;grid-template-columns:1fr 1.35fr;gap:8px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--panel)}.v1561-personnel-actions button{min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);color:var(--text);font-weight:800}.v1561-personnel-actions button.primary{background:#1674dc!important;color:#fff!important;border-color:#1674dc!important}
body.dark-mode .v1561-personnel-card{background:#212121!important;border-color:#454545!important}body.dark-mode .v1561-personnel-scroll,body.dark-mode .v1561-personnel-actions{background:#212121!important}body.dark-mode .v1561-change-section{background:#292929!important;border-color:#4a4a4a!important}body.dark-mode .v1561-change-grid input,body.dark-mode .v1561-change-grid select,body.dark-mode .v1561-effective{background:#1f1f1f!important;color:#f5f5f5!important;border-color:#505050!important}body.dark-mode .v1561-personnel-actions button:not(.primary){background:#292929!important;color:#f5f5f5!important;border-color:#505050!important}
@media(max-width:430px){.v1561-personnel-card{width:calc(100vw - 20px)!important}.v1561-personnel-scroll{padding:10px}.v1561-change-section{padding:11px}.v1561-change-grid{grid-template-columns:78px minmax(0,1fr)}.v1561-change-section>header>span{max-width:44%}}


/* ==========================================================
   v156.2 — fixed lineup density + thinner change marker
   ========================================================== */
body .play-cell .event-marker,
body .play-cell .v137-grid-marker{
  height:5px!important;min-height:5px!important;max-height:5px!important;
  line-height:5px!important;font-size:4.4px!important;letter-spacing:.04em!important;
  padding:0 1px!important;box-shadow:none!important;
}
body.dark-mode .play-cell .event-marker,
body.dark-mode .play-cell .v137-grid-marker{
  background:#e5e7eb!important;color:#111827!important;box-shadow:0 -1px 0 #4b5563!important;
}
body .play-entry:has(.event-marker) .play-code,
body .play-entry:has(.v137-grid-marker) .play-code{bottom:7px!important}

/* Score-grid row size is invariant, even with substitutions or long names. */
@media(max-width:600px){
 .v118-mobile-score-table{--row-h:58px!important}
 .v118-mobile-score-table .batter-row>td,
 .v118-mobile-score-table .batter-row.has-substitution>td{
   height:58px!important;min-height:58px!important;max-height:58px!important;
   overflow:hidden!important;box-sizing:border-box!important;
 }
 .v118-mobile-score-table .mobile-lineup-rail,
 .v118-mobile-score-table .batter-row.has-substitution .mobile-lineup-rail{
   height:58px!important;min-height:58px!important;max-height:58px!important;
   padding:5px 8px 5px 5px!important;overflow:hidden!important;
 }
 .v118-mobile-score-table .mobile-rail-copy{gap:2px!important;overflow:hidden!important}
 .v118-mobile-score-table .mobile-rail-primary{min-width:0!important;align-items:baseline!important}
 .v118-mobile-score-table .mobile-rail-name{
   overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
   max-width:100%!important;font-size:10.4px!important;line-height:1!important;
 }
 .v118-mobile-score-table .mobile-rail-name.rail-fit-long{font-size:9.5px!important}
 .v118-mobile-score-table .mobile-rail-name.rail-fit-xlong{font-size:8.6px!important}
 .v118-mobile-score-table .mobile-rail-name.rail-fit-xxlong{font-size:7.8px!important}
 .v118-mobile-score-table .mobile-rail-name.rail-fit-ultra{font-size:7.1px!important;letter-spacing:-.03em!important}
 .v118-mobile-score-table .mobile-rail-jersey{font-size:8px!important;flex:none!important}
 .v118-mobile-score-table .mobile-rail-meta{
   display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
   font-size:7.5px!important;line-height:1.05!important;color:var(--muted)!important;font-weight:850!important;
 }
 .v118-mobile-score-table .mobile-rail-history{
   display:block!important;width:100%!important;max-width:100%!important;
   overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
   font-size:6.8px!important;line-height:1.05!important;font-weight:750!important;
 }
}

/* Dedicated personnel inputs: full visible value on iPhone/Safari. */
#v1561PersonnelModal .v1562-name-label{
  grid-column:1/-1!important;width:100%!important;min-width:0!important;max-width:none!important;
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
}
#v1561PersonnelModal input.v1562-personnel-name{
  display:block!important;box-sizing:border-box!important;
  width:100%!important;min-width:100%!important;max-width:100%!important;
  height:42px!important;padding:0 11px!important;margin:0!important;
  font-size:16px!important;line-height:42px!important;letter-spacing:0!important;
  text-align:left!important;text-indent:0!important;text-transform:uppercase!important;
  direction:ltr!important;overflow:hidden!important;white-space:nowrap!important;
  -webkit-text-fill-color:currentColor!important;opacity:1!important;
}
body.dark-mode #v1561PersonnelModal input.v1562-personnel-name{
  background:#1f1f1f!important;color:#f5f5f5!important;-webkit-text-fill-color:#f5f5f5!important;border-color:#505050!important;
}



/* ==========================================================
   v156.3 — structural at-bat change marker
   ========================================================== */
body .play-cell .event-marker.v1563-change-marker,
body .play-cell .v137-grid-marker.v1563-change-marker{
 position:absolute!important;
 left:0!important;right:0!important;bottom:0!important;
 width:100%!important;
 height:1px!important;min-height:1px!important;max-height:1px!important;
 padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
 background:#111!important;color:transparent!important;
 font-size:0!important;line-height:0!important;letter-spacing:0!important;
 display:block!important;overflow:visible!important;box-shadow:none!important;
}
body .play-cell .v1563-change-marker::after{
 content:attr(data-label)!important;
 position:absolute!important;
 left:50%!important;bottom:0!important;transform:translateX(-50%)!important;
 width:auto!important;min-width:15px!important;max-width:28px!important;
 height:4px!important;min-height:4px!important;max-height:4px!important;
 padding:0 2px!important;margin:0!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 overflow:hidden!important;white-space:nowrap!important;
 background:#111!important;color:#fff!important;
 font-size:3.3px!important;line-height:4px!important;font-weight:950!important;
 letter-spacing:.035em!important;border-radius:1px 1px 0 0!important;
 box-shadow:none!important;box-sizing:border-box!important;
}
body.dark-mode .play-cell .event-marker.v1563-change-marker,
body.dark-mode .play-cell .v137-grid-marker.v1563-change-marker{background:#e5e7eb!important;color:transparent!important}
body.dark-mode .play-cell .v1563-change-marker::after{background:#e5e7eb!important;color:#111827!important}
body .play-entry:has(.v1563-change-marker) .play-code{bottom:5px!important}



/* ==========================================================
   v156.4 — full-width thin marker, original notation position,
   single defense label, multi-sub history, true player modal dark mode
   ========================================================== */

/* Keep the accepted thin height, but make the marker itself span the entire
   at-bat cell instead of using a small center badge. */
body .play-cell .event-marker.v1563-change-marker,
body .play-cell .v137-grid-marker.v1563-change-marker{
 left:0!important;right:0!important;bottom:0!important;width:100%!important;
 height:4px!important;min-height:4px!important;max-height:4px!important;
 background:#111!important;color:transparent!important;overflow:hidden!important;
 z-index:2!important;
}
body .play-cell .v1563-change-marker::after{
 left:0!important;right:0!important;bottom:0!important;transform:none!important;
 width:100%!important;min-width:100%!important;max-width:100%!important;
 height:4px!important;min-height:4px!important;max-height:4px!important;
 padding:0 1px!important;border-radius:0!important;box-sizing:border-box!important;
 background:#111!important;color:#fff!important;
 font-size:3.3px!important;line-height:4px!important;font-weight:950!important;
 text-align:center!important;
}
body.dark-mode .play-cell .event-marker.v1563-change-marker,
body.dark-mode .play-cell .v137-grid-marker.v1563-change-marker,
body.dark-mode .play-cell .v1563-change-marker::after{
 background:#e5e7eb!important;color:#111827!important;
}
body.dark-mode .play-cell .event-marker.v1563-change-marker,
body.dark-mode .play-cell .v137-grid-marker.v1563-change-marker{color:transparent!important}

/* Return 1B/2B/etc. toward its original lower-right home. It now clears only
   the four-pixel marker instead of being lifted high above it. */
body .play-entry:has(.v1563-change-marker) .play-code{
 bottom:3px!important;right:3px!important;z-index:3!important;
}

/* The blue badge already names the defensive position. Never repeat it below
   the player's name. */
.team-defense-pos .defense-field-number{display:none!important}
.team-defense-pos.is-open .defense-numbers{display:none!important}
.team-defense-pos .defense-numbers{min-height:0!important;margin-top:2px!important}
.team-defense-pos .defense-numbers .defense-jersey-number{margin-left:0!important}

/* Actual prior-player names fit into the fixed third rail line. */
@media(max-width:600px){
 .v118-mobile-score-table .mobile-rail-history.history-fit-long{font-size:6.2px!important;letter-spacing:-.01em!important}
 .v118-mobile-score-table .mobile-rail-history.history-fit-xlong{font-size:5.7px!important;letter-spacing:-.025em!important}
 .v118-mobile-score-table .mobile-rail-history.history-fit-ultra{font-size:5.2px!important;letter-spacing:-.04em!important}
}

/* Player / Substitutions is an older modal and had late light-mode rules that
   escaped the normal dark conversion. These selectors intentionally live at
   the end of the active stylesheet so the whole sheet converts together. */
body.dark-mode #playerModal{background:rgba(0,0,0,.62)!important;color-scheme:dark!important}
body.dark-mode #playerModal>.modal-card{
 background:#202124!important;color:#f5f5f5!important;border-color:#45474a!important;
 box-shadow:0 -12px 42px rgba(0,0,0,.5)!important;
}
body.dark-mode #playerModal .modal-head,
body.dark-mode #playerModal .form-grid,
body.dark-mode #playerModal .section-row,
body.dark-mode #playerModal #subsEditor,
body.dark-mode #playerModal .modal-actions{
 background:#202124!important;color:#f5f5f5!important;border-color:#45474a!important;
}
body.dark-mode #playerModal label,
body.dark-mode #playerModal .section-row strong,
body.dark-mode #playerModal .modal-head strong{color:#f5f5f5!important}
body.dark-mode #playerModal .modal-head small,
body.dark-mode #playerModal .v156-sub-help{color:#aeb3bb!important}
body.dark-mode #playerModal input,
body.dark-mode #playerModal select{
 background:#2b2c2f!important;color:#f5f5f5!important;-webkit-text-fill-color:#f5f5f5!important;
 border-color:#55585d!important;box-shadow:none!important;color-scheme:dark!important;
}
body.dark-mode #playerModal input::placeholder{color:#9aa0a8!important;-webkit-text-fill-color:#9aa0a8!important}
body.dark-mode #playerModal .sub-row{background:transparent!important;border-color:#45474a!important}
body.dark-mode #playerModal .modal-head button,
body.dark-mode #playerModal #addSubBtn{
 background:#2b2c2f!important;color:#f5f5f5!important;border-color:#55585d!important;
}
#playerModal #savePlayerBtn,
body.dark-mode #playerModal #savePlayerBtn{
 background:#1674dc!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
 border-color:#1674dc!important;opacity:1!important;
}

/* ==========================================================
   v156.5 — notation-position micro hotfix
   Keep v156.4 marker geometry unchanged. Restore the play code
   closer to its natural lower-right score-cell position.
   ========================================================== */
body .play-entry:has(.v1563-change-marker) .play-code{
  bottom:2px!important;
  right:1px!important;
  z-index:3!important;
}


/* ==========================================================
   v158.1 — AUTOMATIC RUNNER SEGMENT DISPLAY
   Replace the AR · 2B pill with normal scorecard geometry.
   ========================================================== */
.play-cell .play-entry.auto-runner-seeded{
  position:absolute!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  pointer-events:none!important;
  z-index:2!important;
}
.play-cell .play-entry.auto-runner-seeded svg{
  position:absolute!important;
  inset:5px!important;
  width:calc(100% - 10px)!important;
  height:calc(100% - 10px)!important;
}
.play-cell .play-entry.auto-runner-seeded .auto-runner-origin{
  position:absolute!important;
  left:5px!important;
  top:5px!important;
  z-index:5!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--accent)!important;
  font-size:6.5px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  white-space:nowrap!important;
}
.play-cell .play-entry.auto-runner-seeded .base.origin,
.play-cell .play-entry.auto-runner-seeded .base.advance{
  stroke-width:3.8!important;
}
.play-cell .play-entry.auto-runner-seeded .runner-out-path{stroke-width:4.2!important}
.play-cell .play-entry.auto-runner-seeded .runner-out-mark{stroke-width:3.9!important}
.play-cell .play-entry.auto-runner-seeded .runner-out-label,
.play-cell .play-entry.auto-runner-seeded .advance-reason-label{font-size:6.2px!important}
.play-cell .auto-runner-cell{display:none!important}

/* v158.2 uses the v158.1 segment treatment unchanged. The only display
   change is timing: the placed runner is now present before the first play. */

/* v159 — dedicated appeal workflow */
#v140Preview .v159-appeal-note{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
#v140Preview .v159-appeal-note b{font-size:11px;white-space:nowrap}
#v140Preview .v159-appeal-note span{font-size:10px;color:var(--muted);text-align:right;line-height:1.3}
#v140Preview .v159-appeal-list{display:grid;gap:8px;padding-top:2px}
#v140Preview .v159-appeal-card{border:1px solid var(--line);border-radius:13px;background:var(--panel);overflow:hidden}
#v140Preview .v159-appeal-card.selected{border-color:color-mix(in srgb,var(--accent) 62%,var(--line));box-shadow:inset 3px 0 0 var(--accent)}
#v140Preview .v159-appeal-choice{width:100%;min-height:54px;padding:9px 11px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;background:transparent;color:var(--text);border:0}
#v140Preview .v159-appeal-choice span{min-width:0;display:grid;gap:2px}
#v140Preview .v159-appeal-choice b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#v140Preview .v159-appeal-choice small{font-size:10px;color:var(--muted)}
#v140Preview .v159-appeal-choice em{font-style:normal;font-size:10px;font-weight:900;color:var(--accent)}
#v140Preview .v159-appeal-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 10px 10px}
#v140Preview .v159-appeal-fields label{display:grid;gap:5px;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
#v140Preview .v159-appeal-fields select,#v140Preview .v159-appeal-fields input{width:100%;min-height:42px;color:var(--text);background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:0 10px}
#v140Preview .v159-appeal-fields .wide{grid-column:1/-1}
body.dark-mode #v140Preview .v159-appeal-card,body.dark-mode #v140Preview .v159-appeal-fields select,body.dark-mode #v140Preview .v159-appeal-fields input{background:var(--panel)}
@media(max-width:600px){#v140Preview .v159-appeal-fields{grid-template-columns:1fr}#v140Preview .v159-appeal-fields .wide{grid-column:auto}#v140Preview .v159-appeal-note{align-items:flex-start;flex-direction:column}#v140Preview .v159-appeal-note span{text-align:left}}
/* v159.3 has no visual redesign; keep v159.1 appeal section styling intact. */

/* v160 — final Phase 2 runner-only advancement presentation */
#v140Preview .v160-runner-event-summary .v160-runner-event-context{margin-top:0}
#v140Preview .v160-runner-resolution .v149-runner-card{overflow:hidden}
#v140Preview .v160-runner-resolution .v155-segment-card{margin-top:0}
#v140Preview .v160-runner-resolution .v155-segment-head small{max-width:42ch}
#playModal .modal-actions #addPaBtn.v160-hidden-during-runner-event{display:none!important}

/* ==========================================================
   v161 — Plays audit trail foundation
   ========================================================== */
.v161-plays-page{display:grid;gap:14px;padding-bottom:110px}
.v161-plays-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px}
.v161-plays-head>div{min-width:0}.v161-plays-head small{font-size:10px;font-weight:900;letter-spacing:.12em;color:var(--accent)}
.v161-plays-head h2{margin:3px 0 2px;font-size:25px}.v161-plays-head p{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
.v161-plays-head>span{display:grid;place-items:center;min-width:82px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}
.v161-plays-head>span b{font-size:21px}.v161-plays-head>span small{color:var(--muted);letter-spacing:0;font-size:9px}
.v161-filters{padding:12px}.v161-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.v161-filter-grid label{display:grid;gap:5px;min-width:0}.v161-filter-grid label>span{font-size:9px;font-weight:900;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}
.v161-filter-grid select{width:100%;height:42px;min-width:0;border:1px solid var(--line);border-radius:11px;background:var(--panel);color:var(--text);padding:0 30px 0 10px;font-weight:800;font-size:11px}
.v161-event-list{display:grid;gap:9px}.v161-event{border:1px solid var(--line);border-radius:16px;background:var(--panel);overflow:hidden;box-shadow:var(--shadow-sm,0 5px 20px rgba(0,0,0,.04))}
.v161-event-jump{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) 72px;gap:11px;align-items:center;padding:13px 14px;border:0;background:transparent;color:var(--text);text-align:left}
.v161-event-no{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--soft);border:1px solid var(--line);font-size:11px;font-weight:950}
.v161-event-body{display:grid;gap:5px;min-width:0}.v161-event-kicker{display:flex;align-items:center;gap:6px;min-width:0}.v161-event-kicker>b,.v161-event-kicker>i{font-size:9px;font-style:normal;font-weight:900;letter-spacing:.06em;color:var(--muted)}
.v161-event-kicker>em{margin-left:auto;font-style:normal;font-size:8px;font-weight:950;letter-spacing:.06em;padding:4px 6px;border-radius:999px;border:1px solid var(--line)}
.v161-type-batter{color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}.v161-type-runner{color:#16856c;background:rgba(22,133,108,.09)}.v161-type-appeal{color:#a06a00;background:rgba(160,106,0,.09)}.v161-type-personnel{color:#7653bd;background:rgba(118,83,189,.09)}.v161-type-pitching{color:#b34d46;background:rgba(179,77,70,.09)}
.v161-event-title{display:flex;gap:8px;align-items:baseline;min-width:0}.v161-event-title strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v161-event-title>b{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v161-event-detail,.v161-event-movement{display:block;font-size:10px;color:var(--muted);line-height:1.35;white-space:normal}.v161-event-movement{font-weight:750;color:var(--text)}
.v161-responsibility{font-size:9px;color:var(--muted)}.v161-responsibility b{color:var(--text);margin-right:4px}
.v161-event-side{display:grid;justify-items:end;gap:3px}.v161-event-side>b{font-size:12px;max-width:70px;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v161-event-side>small{font-size:8px;color:var(--muted);font-weight:900}.v161-event-side>i{font-style:normal;color:var(--accent);font-size:13px}
.v161-event.tone-runner{box-shadow:inset 3px 0 0 #16856c}.v161-event.tone-appeal{box-shadow:inset 3px 0 0 #a06a00}.v161-event.tone-personnel{box-shadow:inset 3px 0 0 #7653bd}.v161-event.tone-pitching{box-shadow:inset 3px 0 0 #b34d46}
.v161-pitches{border-top:1px solid var(--line);background:var(--soft)}.v161-pitches summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 14px;cursor:pointer;list-style:none;font-size:10px;font-weight:850}.v161-pitches summary::-webkit-details-marker{display:none}.v161-pitches summary>b{font-size:9px;color:var(--muted)}
.v161-pitches>div{display:flex;gap:7px;overflow-x:auto;padding:0 14px 12px;scrollbar-width:none}.v161-pitches>div::-webkit-scrollbar{display:none}.v161-pitches>div>span{flex:0 0 105px;display:grid;grid-template-columns:20px 1fr;gap:2px 5px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.v161-pitches>div>span>b{grid-row:1/3;display:grid;place-items:center;width:20px;height:20px;border-radius:999px;background:var(--soft);font-size:9px}.v161-pitches>div>span>strong{font-size:9px}.v161-pitches>div>span>small{font-size:8px;color:var(--muted);white-space:normal;line-height:1.2}
.play-cell.v161-audit-highlight{position:relative;z-index:8;animation:v161AuditPulse 1.8s ease-out!important;outline:3px solid var(--accent)!important;outline-offset:-3px!important;box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 18%,transparent)!important}
@keyframes v161AuditPulse{0%,35%{background:color-mix(in srgb,var(--accent) 22%,var(--grid))}100%{background:var(--grid)}}
body.dark-mode .v161-event,body.dark-mode .v161-filter-grid select,body.dark-mode .v161-pitches>div>span{background:var(--panel)!important;color:var(--text)!important}
@media(max-width:700px){.v161-plays-page{gap:10px}.v161-plays-head{padding:14px}.v161-plays-head h2{font-size:21px}.v161-plays-head p{font-size:10px}.v161-plays-head>span{min-width:66px;padding:8px}.v161-filter-grid{grid-template-columns:1fr 1fr}.v161-event-jump{grid-template-columns:30px minmax(0,1fr) 56px;gap:8px;padding:11px 10px}.v161-event-no{width:27px;height:27px;font-size:9px}.v161-event-title{display:grid;gap:2px}.v161-event-title strong{font-size:12px}.v161-event-title>b{font-size:10px}.v161-event-kicker{gap:4px}.v161-event-kicker>em{font-size:7px;padding:3px 5px}.v161-event-side>b{font-size:10px;max-width:54px}}

/* ==========================================================
   v162 — Plays audit trail refinement
   ========================================================== */

.v162-event{position:relative;border:1px solid color-mix(in srgb,var(--line) 92%,transparent);border-radius:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--panel) 96%,var(--soft)) 0%,var(--panel) 100%);box-shadow:0 8px 24px rgba(15,23,42,.05),0 1px 0 rgba(255,255,255,.35) inset}
.v162-event::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:color-mix(in srgb,var(--line) 65%,transparent)}
.v162-event-inspect{position:relative}
.v162-event-inspect::after{content:"";position:absolute;left:52px;right:16px;bottom:0;height:1px;background:color-mix(in srgb,var(--line) 45%,transparent)}
.v162-event .v161-event-body{gap:6px}
.v162-event .v161-event-title strong{font-size:14px}
.v162-event .v161-event-title b{font-size:12px;color:var(--text)}
.v162-event .v161-event-detail{color:color-mix(in srgb,var(--muted) 88%,var(--text));max-width:58ch}
.v162-event .v161-event-side{align-self:stretch;padding:5px 0 5px 10px;border-left:1px solid color-mix(in srgb,var(--line) 55%,transparent)}
.v162-event .v161-event-side>small{letter-spacing:.09em}
.v162-card-facts{margin-top:4px;gap:6px}
.v162-card-facts i{display:inline-flex;align-items:center;min-height:20px;padding:3px 7px;border-radius:999px;background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 92%,white) 0%,var(--soft) 100%);box-shadow:0 1px 0 rgba(255,255,255,.55) inset}
.v162-event-actions{padding:9px 10px;background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 55%,transparent) 0%,var(--soft) 100%)}
.v162-event-actions>.v161-pitches summary,.v162-jump-button{box-shadow:0 1px 0 rgba(255,255,255,.45) inset}
.v162-jump-button{font-size:9px;font-weight:950}
.v162-detail-card{background:var(--panel);color:var(--text);border:1px solid color-mix(in srgb,var(--line) 88%,transparent);box-shadow:0 -16px 44px rgba(0,0,0,.28)}
.v162-detail-card .modal-head{background:var(--panel);border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent);margin:0 -12px 10px;padding:12px 12px 10px}
.v162-detail-card .modal-head button{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:var(--soft);color:var(--text)}
.v162-detail-hero{background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 76%,white) 0%,var(--soft) 100%);box-shadow:0 1px 0 rgba(255,255,255,.5) inset}
.v162-detail-section{box-shadow:0 1px 0 rgba(255,255,255,.42) inset}
.v162-detail-topline{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.v162-detail-topline h4{margin:0}
.v162-pitch-summary{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.v162-pitch-summary span{display:grid;gap:2px;min-width:44px;padding:6px 7px;border-radius:10px;background:var(--soft);border:1px solid color-mix(in srgb,var(--line) 60%,transparent);text-align:center}
.v162-pitch-summary b{font-size:11px;line-height:1}
.v162-pitch-summary small{font-size:7px;font-weight:850;letter-spacing:.04em;color:var(--muted);text-transform:uppercase}
.v162-pitch-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 148px;gap:12px;align-items:start}
.v162-detail-pitches{min-width:0}
.v162-pitch-map{display:grid;gap:8px;align-content:start;padding:10px;border-radius:12px;background:var(--soft);border:1px solid color-mix(in srgb,var(--line) 60%,transparent)}
.v162-pitch-map-head strong{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase}
.v162-pitch-map-head small{display:block;margin-top:2px;font-size:8px;color:var(--muted)}
.v162-mini-zone{position:relative;width:100%;aspect-ratio:4/5;border:1px solid color-mix(in srgb,var(--line) 85%,transparent);border-radius:12px;background:repeating-linear-gradient(to right,transparent 0,transparent calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% + .75px),transparent calc(33.333% + .75px),transparent calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% + .75px),transparent calc(66.666% + .75px)),repeating-linear-gradient(to bottom,transparent 0,transparent calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% + .75px),transparent calc(33.333% + .75px),transparent calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% + .75px),transparent calc(66.666% + .75px));overflow:hidden}
.v162-mini-zone-box{position:absolute;left:28%;right:28%;top:13%;bottom:13%;border:2px solid var(--accent);border-radius:2px;background:color-mix(in srgb,var(--accent) 4%,transparent)}
.v162-mini-zone i{position:absolute;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;transform:translate(-50%,-50%);font-size:8px;font-weight:950;color:#fff;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.22);background:#1874d2;z-index:2}
.v162-mini-zone i.is-ball{background:#697386}
.v162-mini-zone i.is-strike{background:#1874d2}
.v162-mini-zone i.is-play{background:#16856c}
.v162-mini-zone i.is-hbp{background:#b34d46}
.v162-mini-zone i.is-event{background:#7653bd}
.v162-mini-zone i.out-zone{outline:1px solid rgba(0,0,0,.14)}
.v162-mini-zone-note{font-size:8px;line-height:1.35;color:var(--muted)}
.v162-detail-actions{padding-top:10px;background:linear-gradient(180deg,rgba(255,255,255,0),var(--panel) 28%)}
.v162-detail-actions button{flex:1;min-height:43px;border-radius:11px;border:1px solid var(--line);font-weight:900;background:var(--soft);color:var(--text)}
.v162-detail-actions .primary{background:var(--accent);color:#fff;border-color:var(--accent)}
body.dark-mode .v162-event,body.dark-mode .v162-detail-card,body.dark-mode .v162-detail-card .modal-head,body.dark-mode .v162-detail-section,body.dark-mode .v162-pitch-map,body.dark-mode .v162-pitch-summary span,body.dark-mode .v162-detail-actions button{background:var(--panel)!important;color:var(--text)!important}
body.dark-mode .v162-event{background:linear-gradient(180deg,color-mix(in srgb,var(--panel) 92%,#101722) 0%,var(--panel) 100%)!important;box-shadow:0 10px 28px rgba(0,0,0,.34),0 1px 0 rgba(255,255,255,.03) inset}
body.dark-mode .v162-card-facts i,body.dark-mode .v162-event-actions,body.dark-mode .v162-detail-hero,body.dark-mode .v162-facts>div,body.dark-mode .v162-movement-list>div,body.dark-mode .v162-detail-pitches>div,body.dark-mode .v162-pitch-map,body.dark-mode .v162-pitch-summary span{background:var(--soft)!important;color:var(--text)!important;box-shadow:none!important}
body.dark-mode .v162-detail-actions{background:linear-gradient(180deg,rgba(6,12,19,0),var(--panel) 28%)!important}
body.dark-mode .v162-detail-actions button{background:var(--soft)!important;color:var(--text)!important}
body.dark-mode .v162-detail-actions .primary{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
body.dark-mode .v162-detail-card .modal-head button,body.dark-mode .v162-event-actions>.v161-pitches summary{background:var(--soft)!important;color:var(--text)!important}
@media(max-width:700px){.v162-event-inspect::after{left:44px;right:10px}.v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 126px;gap:10px}.v162-pitch-summary{justify-content:flex-start}.v162-pitch-summary span{min-width:40px;padding:5px 6px}.v162-mini-zone i{width:18px;height:18px;font-size:7px}}
@media(max-width:560px){.v162-pitch-detail-grid{grid-template-columns:1fr 118px}.v162-event .v161-event-side{padding-left:8px}}

.v162-groups{display:grid;gap:17px}
.v162-inning-group{display:grid;gap:8px}
.v162-inning-group>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px}
.v162-inning-group>header>div{display:flex;align-items:baseline;gap:8px}.v162-inning-group>header b{font-size:12px;letter-spacing:.07em}.v162-inning-group>header small,.v162-inning-group>header>span{font-size:9px;color:var(--muted);font-weight:800}
.v162-event{overflow:hidden}
.v162-event-inspect{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) 72px;gap:11px;align-items:center;padding:13px 14px;border:0;background:transparent;color:var(--text);text-align:left}
.v162-card-facts{display:flex;flex-wrap:wrap;gap:5px;margin-top:1px}.v162-card-facts i{font-style:normal;font-size:8px;font-weight:850;color:var(--muted);padding:3px 5px;border-radius:6px;background:var(--soft);border:1px solid color-mix(in srgb,var(--line) 70%,transparent)}
.v162-event-actions{display:flex;align-items:stretch;justify-content:space-between;gap:8px;border-top:1px solid var(--line);background:var(--soft);padding:7px 8px}
.v162-event-actions>.v161-pitches{flex:1;border:0;background:transparent;min-width:0}.v162-event-actions>.v161-pitches summary{height:34px;padding:0 8px;border-radius:8px;background:var(--panel);border:1px solid var(--line)}.v162-event-actions>.v161-pitches>div{position:absolute;left:0;right:0;z-index:3;background:var(--soft);border:1px solid var(--line);border-radius:0 0 12px 12px;padding:9px;box-shadow:0 8px 18px rgba(0,0,0,.12)}.v162-event-actions>.v161-pitches{position:relative}
.v162-jump-button{flex:0 0 auto;min-height:34px;padding:0 11px;border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line));border-radius:9px;background:color-mix(in srgb,var(--accent) 7%,var(--panel));color:var(--accent);font-size:9px;font-weight:900;white-space:nowrap}.v162-jump-button span{font-size:12px;margin-right:4px}
.v162-detail-modal{z-index:1500}.v162-detail-card{width:min(640px,calc(100vw - 24px));max-height:min(88dvh,820px);overflow:auto}.v162-detail-content{display:grid;gap:11px;padding-bottom:4px}
.v162-detail-hero{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px;border-radius:14px;background:var(--soft);border-left:4px solid var(--accent)}.v162-detail-hero.tone-runner{border-left-color:#16856c}.v162-detail-hero.tone-appeal{border-left-color:#a06a00}.v162-detail-hero.tone-personnel{border-left-color:#7653bd}.v162-detail-hero.tone-pitching{border-left-color:#b34d46}.v162-detail-hero small{font-size:9px;font-weight:900;letter-spacing:.07em;color:var(--muted)}.v162-detail-hero h3{margin:3px 0 1px;font-size:18px}.v162-detail-hero p{margin:0;font-size:11px;color:var(--muted)}.v162-detail-hero>span{font-size:16px;font-weight:950;text-align:right}
.v162-detail-section{padding:12px 13px;border:1px solid var(--line);border-radius:13px;background:var(--panel)}.v162-detail-section h4{margin:0 0 7px;font-size:9px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}.v162-detail-section>p{margin:0;font-size:11px;line-height:1.45;color:var(--text)}
.v162-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px}.v162-facts>div,.v162-fact{display:grid;gap:3px;padding:7px;border-radius:9px;background:var(--soft)}.v162-facts span,.v162-fact span{font-size:8px;color:var(--muted);font-weight:850}.v162-facts b,.v162-fact b{font-size:10px}
.v162-movement-list{display:grid;gap:6px}.v162-movement-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:8px 9px;border-radius:9px;background:var(--soft)}.v162-movement-list b{font-size:10px}.v162-movement-list span{font-size:10px;font-weight:850}.v162-movement-list small,.v162-movement-list em{grid-column:1/-1;font-size:8px;color:var(--muted);font-style:normal}
.v162-detail-pitches{display:grid;gap:5px}.v162-detail-pitches>div{display:grid;grid-template-columns:24px 1fr;gap:7px;align-items:center;padding:7px 8px;border-radius:9px;background:var(--soft)}.v162-detail-pitches>div>b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:var(--panel);border:1px solid var(--line);font-size:9px}.v162-detail-pitches span{display:grid;gap:2px}.v162-detail-pitches strong{font-size:9px}.v162-detail-pitches small{font-size:8px;color:var(--muted)}
.v162-detail-actions{position:sticky;bottom:-1px;display:flex;gap:8px;padding-top:8px;background:var(--panel)}.v162-detail-actions button{flex:1;min-height:43px;border-radius:11px;border:1px solid var(--line);font-weight:900}.v162-detail-actions .primary{background:var(--accent);color:#fff;border-color:var(--accent)}
body.dark-mode .v162-event-actions,body.dark-mode .v162-detail-hero,body.dark-mode .v162-card-facts i,body.dark-mode .v162-facts>div,body.dark-mode .v162-movement-list>div,body.dark-mode .v162-detail-pitches>div{background:var(--soft)!important;color:var(--text)!important}
@media(max-width:700px){.v162-groups{gap:14px}.v162-event-inspect{grid-template-columns:30px minmax(0,1fr) 54px;gap:8px;padding:10px}.v162-event-actions{padding:6px}.v162-jump-button{padding:0 8px;font-size:8px}.v162-event-actions>.v161-pitches summary{font-size:9px}.v162-detail-card{width:100vw;max-width:none;max-height:91dvh;border-radius:20px 20px 0 0}.v162-facts{grid-template-columns:1fr 1fr}.v162-detail-hero h3{font-size:16px}.v162-detail-hero>span{font-size:13px}.v162-inning-group>header{padding:0 2px}}

/* v162.1 final overrides */
.v162-event{position:relative;border:1px solid color-mix(in srgb,var(--line) 92%,transparent);border-radius:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--panel) 96%,var(--soft)) 0%,var(--panel) 100%);box-shadow:0 8px 24px rgba(15,23,42,.05),0 1px 0 rgba(255,255,255,.35) inset;overflow:hidden}
.v162-event::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:color-mix(in srgb,var(--line) 65%,transparent)}
.v162-event-inspect{position:relative}
.v162-event-inspect::after{content:"";position:absolute;left:52px;right:16px;bottom:0;height:1px;background:color-mix(in srgb,var(--line) 45%,transparent)}
.v162-event .v161-event-body{gap:6px}.v162-event .v161-event-title strong{font-size:14px}.v162-event .v161-event-title b{font-size:12px;color:var(--text)}.v162-event .v161-event-detail{color:color-mix(in srgb,var(--muted) 88%,var(--text));max-width:58ch}
.v162-event .v161-event-side{align-self:stretch;padding:5px 0 5px 10px;border-left:1px solid color-mix(in srgb,var(--line) 55%,transparent)}.v162-event .v161-event-side>small{letter-spacing:.09em}
.v162-card-facts{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.v162-card-facts i{display:inline-flex;align-items:center;min-height:20px;padding:3px 7px;border-radius:999px;background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 92%,white) 0%,var(--soft) 100%);border:1px solid color-mix(in srgb,var(--line) 70%,transparent);box-shadow:0 1px 0 rgba(255,255,255,.55) inset}
.v162-event-actions{display:flex;align-items:stretch;justify-content:space-between;gap:8px;border-top:1px solid var(--line);background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 55%,transparent) 0%,var(--soft) 100%);padding:9px 10px}.v162-event-actions>.v161-pitches summary,.v162-jump-button{box-shadow:0 1px 0 rgba(255,255,255,.45) inset}.v162-jump-button{font-size:9px;font-weight:950}
.v162-detail-card{background:var(--panel);color:var(--text);border:1px solid color-mix(in srgb,var(--line) 88%,transparent);box-shadow:0 -16px 44px rgba(0,0,0,.28)}
.v162-detail-card .modal-head{background:var(--panel);border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent);margin:0 -12px 10px;padding:12px 12px 10px}.v162-detail-card .modal-head button{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:var(--soft);color:var(--text)}
.v162-detail-hero{background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 76%,white) 0%,var(--soft) 100%);box-shadow:0 1px 0 rgba(255,255,255,.5) inset}.v162-detail-section{box-shadow:0 1px 0 rgba(255,255,255,.42) inset}
.v162-detail-topline{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.v162-detail-topline h4{margin:0}
.v162-pitch-summary{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.v162-pitch-summary span{display:grid;gap:2px;min-width:44px;padding:6px 7px;border-radius:10px;background:var(--soft);border:1px solid color-mix(in srgb,var(--line) 60%,transparent);text-align:center}.v162-pitch-summary b{font-size:11px;line-height:1}.v162-pitch-summary small{font-size:7px;font-weight:850;letter-spacing:.04em;color:var(--muted);text-transform:uppercase}
.v162-pitch-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 148px;gap:12px;align-items:start}.v162-detail-pitches{display:grid;gap:5px;min-width:0}
.v162-pitch-map{display:grid;gap:8px;align-content:start;padding:10px;border-radius:12px;background:var(--soft);border:1px solid color-mix(in srgb,var(--line) 60%,transparent)}.v162-pitch-map-head strong{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase}.v162-pitch-map-head small{display:block;margin-top:2px;font-size:8px;color:var(--muted)}
.v162-mini-zone{position:relative;width:100%;aspect-ratio:4/5;border:1px solid color-mix(in srgb,var(--line) 85%,transparent);border-radius:12px;background:repeating-linear-gradient(to right,transparent 0,transparent calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% + .75px),transparent calc(33.333% + .75px),transparent calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% + .75px),transparent calc(66.666% + .75px)),repeating-linear-gradient(to bottom,transparent 0,transparent calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(33.333% + .75px),transparent calc(33.333% + .75px),transparent calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% - .75px),color-mix(in srgb,var(--line) 72%,transparent) calc(66.666% + .75px),transparent calc(66.666% + .75px));overflow:hidden}
.v162-mini-zone-box{position:absolute;left:28%;right:28%;top:13%;bottom:13%;border:2px solid var(--accent);border-radius:2px;background:color-mix(in srgb,var(--accent) 4%,transparent)}
.v162-mini-zone i{position:absolute;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;transform:translate(-50%,-50%);font-size:8px;font-weight:950;color:#fff;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.22);background:#1874d2;z-index:2}.v162-mini-zone i.is-ball{background:#697386}.v162-mini-zone i.is-strike{background:#1874d2}.v162-mini-zone i.is-play{background:#16856c}.v162-mini-zone i.is-hbp{background:#b34d46}.v162-mini-zone i.is-event{background:#7653bd}.v162-mini-zone i.out-zone{outline:1px solid rgba(0,0,0,.14)}
.v162-mini-zone-note{font-size:8px;line-height:1.35;color:var(--muted)}
.v162-detail-actions{position:sticky;bottom:-1px;display:flex;gap:8px;padding-top:10px;background:linear-gradient(180deg,rgba(255,255,255,0),var(--panel) 28%)}.v162-detail-actions button{flex:1;min-height:43px;border-radius:11px;border:1px solid var(--line);font-weight:900;background:var(--soft);color:var(--text)}.v162-detail-actions .primary{background:var(--accent);color:#fff;border-color:var(--accent)}
body.dark-mode .v162-event{background:linear-gradient(180deg,color-mix(in srgb,var(--panel) 92%,#101722) 0%,var(--panel) 100%)!important;box-shadow:0 10px 28px rgba(0,0,0,.34),0 1px 0 rgba(255,255,255,.03) inset}
body.dark-mode .v162-card-facts i,body.dark-mode .v162-event-actions,body.dark-mode .v162-detail-hero,body.dark-mode .v162-facts>div,body.dark-mode .v162-movement-list>div,body.dark-mode .v162-detail-pitches>div,body.dark-mode .v162-pitch-map,body.dark-mode .v162-pitch-summary span,body.dark-mode .v162-detail-card .modal-head button,body.dark-mode .v162-event-actions>.v161-pitches summary,body.dark-mode .v162-detail-actions button{background:var(--soft)!important;color:var(--text)!important;box-shadow:none!important}
body.dark-mode .v162-detail-card,body.dark-mode .v162-detail-card .modal-head,body.dark-mode .v162-detail-section{background:var(--panel)!important;color:var(--text)!important}
body.dark-mode .v162-detail-actions{background:linear-gradient(180deg,rgba(6,12,19,0),var(--panel) 28%)!important}body.dark-mode .v162-detail-actions .primary{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
@media(max-width:700px){.v162-event-inspect::after{left:44px;right:10px}.v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 126px;gap:10px}.v162-pitch-summary{justify-content:flex-start}.v162-pitch-summary span{min-width:40px;padding:5px 6px}.v162-mini-zone i{width:18px;height:18px;font-size:7px}}
@media(max-width:560px){.v162-pitch-detail-grid{grid-template-columns:1fr 118px}.v162-event .v161-event-side{padding-left:8px}}
@media(max-width:430px){.v162-pitch-detail-grid{grid-template-columns:1fr}.v162-pitch-map{max-width:150px;justify-self:end}}


/* ==========================================================
   v162.2 — Plays dark mode + pitch map hotfix
   ========================================================== */
.v162-event .v162-card-facts{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.v162-event .v162-card-facts i{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;border:1px solid color-mix(in srgb,var(--line) 65%,transparent);background:color-mix(in srgb,var(--soft) 80%,transparent);font-style:normal;font-size:8px;font-weight:900;letter-spacing:.04em;color:var(--text)}
.v162-event-actions{align-items:flex-start}
.v162-event-actions>.v161-pitches{flex:1;min-width:0;border:1px solid color-mix(in srgb,var(--line) 60%,transparent);border-radius:11px;overflow:hidden;background:var(--panel)}
.v162-event-actions>.v161-pitches>div{padding:7px;display:grid;gap:6px}
.v162-event-actions>.v161-pitches>div>span{border:1px solid color-mix(in srgb,var(--line) 55%,transparent);border-radius:9px;padding:6px 8px;background:var(--panel)}
.v162-jump-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:156px;min-height:40px;padding:0 12px;border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:11px;background:color-mix(in srgb,var(--accent) 8%,var(--panel));color:var(--text);font-weight:900;white-space:nowrap}
.v162-jump-button span{font-size:12px;color:var(--accent)}
.v162-detail-modal .v162-detail-card{background:var(--panel)!important;color:var(--text)!important}
.v162-detail-modal .v162-detail-content{display:grid;gap:10px;background:var(--panel);color:var(--text)}
.v162-detail-modal .v162-detail-card .modal-head{background:var(--panel)!important;color:var(--text)!important}
.v162-detail-modal .v162-detail-card .modal-head strong,
.v162-detail-modal .v162-detail-card .modal-head small{color:inherit}
.v162-detail-modal .v162-detail-card .modal-head button{display:grid;place-items:center;background:var(--soft)!important;color:var(--text)!important;border:1px solid color-mix(in srgb,var(--line) 70%,transparent)!important}
.v162-detail-actions{display:flex;gap:8px;position:sticky;bottom:-1px;z-index:2;padding-top:10px;background:linear-gradient(180deg,rgba(255,255,255,0),var(--panel) 28%)!important}
.v162-detail-actions button{display:inline-flex;align-items:center;justify-content:center;text-align:center;flex:1;min-height:44px;padding:0 12px;border-radius:11px;border:1px solid color-mix(in srgb,var(--line) 70%,transparent);background:var(--soft)!important;color:var(--text)!important;font-weight:900}
.v162-detail-actions .primary{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
.v162-pitch-map{box-shadow:0 1px 0 rgba(255,255,255,.35) inset}
.v162-mini-zone{background-color:color-mix(in srgb,var(--panel) 65%,transparent)}
body.dark-mode .v162-event{background:linear-gradient(180deg,color-mix(in srgb,var(--panel) 96%,#101722) 0%,var(--panel) 100%)!important;border-color:color-mix(in srgb,var(--line) 92%,transparent)!important;box-shadow:0 10px 28px rgba(0,0,0,.34),0 1px 0 rgba(255,255,255,.03) inset}
body.dark-mode .v162-event .v161-event-side{border-left-color:color-mix(in srgb,var(--line) 65%,transparent)!important}
body.dark-mode .v162-event .v161-event-detail{color:color-mix(in srgb,var(--muted) 88%,var(--text))!important}
body.dark-mode .v162-event .v162-card-facts i,
body.dark-mode .v162-event-actions,
body.dark-mode .v162-event-actions>.v161-pitches,
body.dark-mode .v162-event-actions>.v161-pitches summary,
body.dark-mode .v162-event-actions>.v161-pitches>div>span,
body.dark-mode .v162-detail-modal .v162-detail-card,
body.dark-mode .v162-detail-modal .v162-detail-content,
body.dark-mode .v162-detail-modal .v162-detail-card .modal-head,
body.dark-mode .v162-detail-modal .v162-detail-card .modal-head button,
body.dark-mode .v162-detail-hero,
body.dark-mode .v162-detail-section,
body.dark-mode .v162-facts>div,
body.dark-mode .v162-movement-list>div,
body.dark-mode .v162-detail-pitches>div,
body.dark-mode .v162-pitch-map,
body.dark-mode .v162-pitch-summary span,
body.dark-mode .v162-detail-actions button{color:var(--text)!important}
body.dark-mode .v162-event .v162-card-facts i,
body.dark-mode .v162-event-actions,
body.dark-mode .v162-event-actions>.v161-pitches,
body.dark-mode .v162-event-actions>.v161-pitches summary,
body.dark-mode .v162-event-actions>.v161-pitches>div>span,
body.dark-mode .v162-detail-hero,
body.dark-mode .v162-facts>div,
body.dark-mode .v162-movement-list>div,
body.dark-mode .v162-detail-pitches>div,
body.dark-mode .v162-pitch-map,
body.dark-mode .v162-pitch-summary span,
body.dark-mode .v162-detail-actions button,
body.dark-mode .v162-detail-modal .v162-detail-card .modal-head button{background:var(--soft)!important;box-shadow:none!important}
body.dark-mode .v162-detail-modal .v162-detail-card,
body.dark-mode .v162-detail-modal .v162-detail-content,
body.dark-mode .v162-detail-modal .v162-detail-card .modal-head,
body.dark-mode .v162-detail-section{background:var(--panel)!important}
body.dark-mode .v162-detail-actions{background:linear-gradient(180deg,rgba(6,12,19,0),var(--panel) 28%)!important}
body.dark-mode .v162-detail-actions .primary{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
body.dark-mode .v162-jump-button{background:color-mix(in srgb,var(--accent) 16%,var(--panel))!important;color:var(--text)!important;border-color:color-mix(in srgb,var(--line) 72%,transparent)!important}
@media(max-width:430px){
  .v162-jump-button{min-width:132px;font-size:8px}
  .v162-event .v162-card-facts{gap:5px}
  .v162-event .v162-card-facts i{padding:0 7px;font-size:7.5px}
}

/* ==========================================================
   v162.3 — Plays final polish
   ========================================================== */
.v162-event .v161-event-detail{line-height:1.4}
.v162-event-actions{align-items:center;padding:7px 9px;gap:7px}
.v162-event-actions>.v161-pitches summary{padding:7px 10px}
.v162-event-actions>.v161-pitches>div{padding:6px;gap:5px}
.v162-event-actions>.v161-pitches>div>span{padding:5px 7px}
.v162-jump-button{min-width:144px;min-height:34px;padding:0 10px;border-radius:10px}
.v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 164px}
.v162-pitch-map{padding:10px 10px 9px}
.v162-mini-zone{position:relative;width:100%;aspect-ratio:1/1.02;border:1px solid color-mix(in srgb,var(--line) 78%,transparent);border-radius:14px;background:color-mix(in srgb,var(--panel) 72%,var(--soft));overflow:hidden}
.v162-mini-zone-box{position:absolute;left:19%;right:19%;top:15%;bottom:15%;border:2px solid var(--accent);border-radius:3px;background-color:color-mix(in srgb,var(--panel) 86%,var(--soft));background-image:linear-gradient(to right,transparent calc(33.333% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(33.333% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(33.333% + .75px),transparent calc(33.333% + .75px),transparent calc(66.666% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(66.666% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(66.666% + .75px),transparent calc(66.666% + .75px)),linear-gradient(to bottom,transparent calc(33.333% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(33.333% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(33.333% + .75px),transparent calc(33.333% + .75px),transparent calc(66.666% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(66.666% - .75px),color-mix(in srgb,var(--line) 78%,transparent) calc(66.666% + .75px),transparent calc(66.666% + .75px))}
.v162-mini-zone i{width:19px;height:19px}
body.dark-mode .v162-mini-zone{background:color-mix(in srgb,var(--panel) 88%,#0f1720)!important}
body.dark-mode .v162-mini-zone-box{background-color:color-mix(in srgb,var(--panel) 92%,#0f1720)!important}
@media(max-width:700px){
  .v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 138px;gap:10px}
  .v162-jump-button{min-width:126px;min-height:32px;padding:0 8px}
}
@media(max-width:560px){
  .v162-pitch-detail-grid{grid-template-columns:1fr 132px}
}
@media(max-width:430px){
  .v162-pitch-detail-grid{grid-template-columns:1fr}
  .v162-pitch-map{max-width:168px;justify-self:end}
  .v162-jump-button{min-width:128px;font-size:8px}
}


/* ==========================================================
   v162.4 — Plays dark-mode button + strikezone fit hotfix
   ========================================================== */
.v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 176px;column-gap:10px;align-items:start}
.v162-pitch-map{width:100%;max-width:176px;justify-self:center;margin-inline:auto;padding:10px 10px 9px}
.v162-mini-zone{margin-inline:auto}
body.dark-mode .v162-detail-actions .primary,
body.dark-mode .v162-detail-actions button.primary,
body.dark-mode .v162-detail-actions [data-v162-detail-jump]{background:#2f80ed!important;border-color:#4b92ef!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important}
body.dark-mode .v162-detail-actions [data-v162-detail-jump]:disabled{background:#35506f!important;border-color:#4a6079!important;color:rgba(255,255,255,.72)!important}
@media(max-width:700px){
  .v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 150px;column-gap:10px}
  .v162-pitch-map{max-width:150px}
}
@media(max-width:560px){
  .v162-pitch-detail-grid{grid-template-columns:minmax(0,1fr) 146px;column-gap:8px}
  .v162-pitch-map{max-width:146px}
}
@media(max-width:430px){
  .v162-pitch-detail-grid{grid-template-columns:1fr;row-gap:10px}
  .v162-pitch-map{max-width:172px;justify-self:center;margin-inline:auto}
}

/* ==========================================================
   v162.5 — Option C: centered single strikezone + compact pitch log
   ========================================================== */
.v1625-pitch-section{overflow:hidden}
.v1625-pitch-flow{display:grid;gap:12px;min-width:0}
.v1625-zone-block{display:grid;gap:7px;width:min(100%,390px);justify-self:center;margin-inline:auto;padding:10px 11px 9px;border:1px solid color-mix(in srgb,var(--line) 62%,transparent);border-radius:14px;background:color-mix(in srgb,var(--soft) 72%,var(--panel));box-shadow:0 1px 0 rgba(255,255,255,.32) inset}
.v1625-zone-heading{text-align:center}.v1625-zone-heading strong{display:block;font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;color:var(--text)}.v1625-zone-heading small{display:block;margin-top:2px;font-size:8px;line-height:1.3;color:var(--muted)}
.v1625-zone-canvas{position:relative;width:min(100%,350px);aspect-ratio:4/3;justify-self:center;border:1px solid color-mix(in srgb,var(--line) 78%,transparent);border-radius:14px;background:color-mix(in srgb,var(--panel) 76%,var(--soft));overflow:hidden}
.v1625-zone-box{position:absolute;left:20%;right:20%;top:13%;bottom:13%;border:2.5px solid var(--accent);border-radius:3px;background-color:color-mix(in srgb,var(--panel) 88%,var(--soft));background-image:linear-gradient(to right,transparent calc(33.333% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(33.333% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(33.333% + .8px),transparent calc(33.333% + .8px),transparent calc(66.666% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(66.666% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(66.666% + .8px),transparent calc(66.666% + .8px)),linear-gradient(to bottom,transparent calc(33.333% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(33.333% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(33.333% + .8px),transparent calc(33.333% + .8px),transparent calc(66.666% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(66.666% - .8px),color-mix(in srgb,var(--line) 80%,transparent) calc(66.666% + .8px),transparent calc(66.666% + .8px))}
.v1625-zone-marker{position:absolute;z-index:3;display:grid;place-items:center;width:25px;height:25px;padding:0;border-radius:50%;transform:translate(-50%,-50%);border:2px solid #fff;background:#1874d2;color:#fff;box-shadow:0 2px 7px rgba(0,0,0,.3);transition:opacity .16s ease,transform .16s ease,box-shadow .16s ease}.v1625-zone-marker span{font-size:9px;line-height:1;font-weight:950}.v1625-zone-marker.is-ball{background:#697386}.v1625-zone-marker.is-strike{background:#1874d2}.v1625-zone-marker.is-play{background:#16856c}.v1625-zone-marker.is-hbp{background:#b34d46}.v1625-zone-marker.is-event{background:#7653bd}.v1625-zone-marker.out-zone{outline:1px solid rgba(0,0,0,.18)}
.v1625-zone-block.is-many .v1625-zone-marker{width:22px;height:22px}.v1625-zone-block.is-many .v1625-zone-marker span{font-size:8px}.v1625-zone-block.is-dense .v1625-zone-marker{width:20px;height:20px}.v1625-zone-block.is-dense .v1625-zone-marker span{font-size:7px}
.v1625-zone-note{text-align:center;font-size:8px;line-height:1.35;color:var(--muted)}
.v1625-pitch-log{display:grid;grid-template-columns:1fr;gap:6px;min-width:0}.v1625-pitch-log.is-long{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px}.v1625-pitch-row{display:grid;grid-template-columns:27px minmax(0,1fr);gap:7px;align-items:center;width:100%;min-width:0;min-height:46px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--line) 62%,transparent);border-radius:10px;background:var(--soft);color:var(--text);text-align:left;transition:opacity .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}.v1625-pitch-row>b{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;border:1px solid var(--line);background:var(--panel);font-size:9px}.v1625-pitch-row>span{display:grid;gap:2px;min-width:0}.v1625-pitch-row strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v1625-pitch-row small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v1625-pitch-row.is-strike>b{box-shadow:inset 3px 0 0 #1874d2}.v1625-pitch-row.is-ball>b{box-shadow:inset 3px 0 0 #697386}.v1625-pitch-row.is-play>b{box-shadow:inset 3px 0 0 #16856c}.v1625-pitch-row.is-hbp>b{box-shadow:inset 3px 0 0 #b34d46}.v1625-pitch-row.is-event>b{box-shadow:inset 3px 0 0 #7653bd}
[data-v1625-pitch].v1625-dimmed{opacity:.32}.v1625-zone-marker.v1625-active{opacity:1!important;transform:translate(-50%,-50%) scale(1.17);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%,transparent),0 3px 9px rgba(0,0,0,.34)}.v1625-pitch-row.v1625-active{opacity:1!important;border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--soft));box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent)}
body.dark-mode .v1625-zone-block{background:var(--soft)!important;color:var(--text)!important;box-shadow:none}.dark-mode .v1625-zone-canvas{background:color-mix(in srgb,var(--panel) 90%,#10161d)!important}.dark-mode .v1625-zone-box{background-color:color-mix(in srgb,var(--panel) 94%,#10161d)!important}.dark-mode .v1625-pitch-row{background:var(--soft)!important;color:var(--text)!important}.dark-mode .v1625-pitch-row>b{background:var(--panel)!important}
/* Retire the old right-side mini-map layout inside Play Details. */
.v1625-pitch-section .v162-pitch-detail-grid,.v1625-pitch-section .v162-pitch-map,.v1625-pitch-section .v162-detail-pitches{display:none!important}
@media(max-width:700px){
 .v1625-pitch-section .v162-detail-topline{display:grid;gap:8px}.v1625-pitch-section .v162-pitch-summary{justify-content:flex-start}
 .v1625-zone-block{width:min(100%,360px)}.v1625-zone-canvas{width:min(100%,330px)}
 .v1625-pitch-row{min-height:44px;padding:6px 7px}
}
@media(max-width:430px){
 .v1625-pitch-flow{gap:10px}.v1625-zone-block{width:100%;max-width:350px;padding:9px}.v1625-zone-canvas{width:100%;max-width:318px}
 .v1625-pitch-log.is-long{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 6px}
 .v1625-pitch-row{grid-template-columns:24px minmax(0,1fr);gap:5px;min-height:42px;padding:5px 6px}.v1625-pitch-row>b{width:22px;height:22px;font-size:8px}.v1625-pitch-row strong{font-size:8.5px}.v1625-pitch-row small{font-size:7.5px}
 .v1625-zone-marker{width:23px;height:23px}.v1625-zone-block.is-many .v1625-zone-marker{width:20px;height:20px}.v1625-zone-block.is-dense .v1625-zone-marker{width:18px;height:18px}
}


/* ==========================================================
   v162.8 — Option C active-asset rebuild
   ========================================================== */
#v162PlayDetailModal .v1627-pitch-section{padding:12px!important;overflow:visible!important}
#v162PlayDetailModal .v1627-pitch-section .v162-detail-topline{margin-bottom:10px!important}
#v162PlayDetailModal .v1627-pitch-flow{display:grid!important;gap:10px!important}
#v162PlayDetailModal .v1627-zone-block{width:100%!important;max-width:none!important;margin:0!important;padding:12px 12px 10px!important;gap:8px!important;border:1px solid color-mix(in srgb,var(--line) 68%,transparent)!important;border-radius:14px!important;background:var(--soft)!important}
#v162PlayDetailModal .v1627-zone-block .v1625-zone-heading{margin:0!important;text-align:center!important}
#v162PlayDetailModal .v1627-zone-block .v1625-zone-heading strong{font-size:11px!important;letter-spacing:.08em!important}
#v162PlayDetailModal .v1627-zone-block .v1625-zone-heading small{font-size:8.5px!important;margin-top:3px!important}
#v162PlayDetailModal .v1627-zone-canvas{position:relative!important;width:100%!important;max-width:338px!important;aspect-ratio:4/3!important;margin:0 auto!important;border:1px solid color-mix(in srgb,var(--line) 68%,transparent)!important;border-radius:14px!important;background:var(--panel)!important;overflow:visible!important}
#v162PlayDetailModal .v1627-zone-box{position:absolute!important;left:25%!important;right:25%!important;top:22%!important;bottom:18%!important;border:2.5px solid var(--text)!important;border-radius:3px!important;background-color:transparent!important;background-image:linear-gradient(to right,transparent calc(33.333% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(33.333% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(33.333% + .8px),transparent calc(33.333% + .8px),transparent calc(66.666% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(66.666% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(66.666% + .8px),transparent calc(66.666% + .8px)),linear-gradient(to bottom,transparent calc(33.333% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(33.333% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(33.333% + .8px),transparent calc(33.333% + .8px),transparent calc(66.666% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(66.666% - .8px),color-mix(in srgb,var(--line) 82%,transparent) calc(66.666% + .8px),transparent calc(66.666% + .8px))!important}
#v162PlayDetailModal .v1625-zone-marker{display:grid!important;place-items:center!important;width:24px!important;height:24px!important;padding:0!important;border-radius:50%!important;border:2px solid #fff!important;color:#fff!important;box-shadow:0 2px 7px rgba(0,0,0,.30)!important;opacity:1!important}
#v162PlayDetailModal .v1625-zone-marker span{font-size:8.5px!important;font-weight:950!important;color:#fff!important}
#v162PlayDetailModal .v1627-zone-block.is-many .v1625-zone-marker{width:22px!important;height:22px!important}
#v162PlayDetailModal .v1627-zone-block.is-dense .v1625-zone-marker{width:20px!important;height:20px!important}
/* Option C result language: colored number circles + matching result dot. */
#v162PlayDetailModal .tone-ball{--v1627-tone:#20a66b}
#v162PlayDetailModal .tone-called{--v1627-tone:#d54b45}
#v162PlayDetailModal .tone-swing{--v1627-tone:#c53e57}
#v162PlayDetailModal .tone-foul{--v1627-tone:#e49a18}
#v162PlayDetailModal .tone-play{--v1627-tone:#2f80ed}
#v162PlayDetailModal .tone-hbp{--v1627-tone:#b45c39}
#v162PlayDetailModal .tone-event{--v1627-tone:#8255c7}
#v162PlayDetailModal .tone-neutral{--v1627-tone:#6b7280}
#v162PlayDetailModal .v1625-zone-marker.tone-ball,
#v162PlayDetailModal .v1625-zone-marker.tone-called,
#v162PlayDetailModal .v1625-zone-marker.tone-swing,
#v162PlayDetailModal .v1625-zone-marker.tone-foul,
#v162PlayDetailModal .v1625-zone-marker.tone-play,
#v162PlayDetailModal .v1625-zone-marker.tone-hbp,
#v162PlayDetailModal .v1625-zone-marker.tone-event,
#v162PlayDetailModal .v1625-zone-marker.tone-neutral{background:var(--v1627-tone)!important;background-color:var(--v1627-tone)!important}
#v162PlayDetailModal .v1627-pitch-log{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0!important}
#v162PlayDetailModal .v1627-pitch-log.single{grid-template-columns:1fr!important}
#v162PlayDetailModal .v1627-log-column{min-width:0!important;border:1px solid color-mix(in srgb,var(--line) 74%,transparent)!important;border-radius:11px!important;background:var(--panel)!important;overflow:hidden!important}
#v162PlayDetailModal .v1627-log-row{position:relative!important;display:grid!important;grid-template-columns:28px minmax(0,1fr) minmax(72px,auto)!important;align-items:center!important;gap:7px!important;width:100%!important;min-height:40px!important;margin:0!important;padding:7px 9px!important;border:0!important;border-bottom:1px solid color-mix(in srgb,var(--line) 52%,transparent)!important;border-radius:0!important;background:transparent!important;color:var(--text)!important;text-align:left!important;box-shadow:none!important}
#v162PlayDetailModal .v1627-log-row:last-child{border-bottom:0!important}
#v162PlayDetailModal .v1627-log-number{display:grid!important;place-items:center!important;width:24px!important;height:24px!important;border-radius:50%!important;background:var(--v1627-tone)!important;color:#fff!important;border:1.5px solid rgba(255,255,255,.92)!important;font-size:8.5px!important;font-weight:950!important;box-shadow:0 1px 4px rgba(0,0,0,.18)!important}
#v162PlayDetailModal .v1627-log-row>strong{min-width:0!important;font-size:8.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#v162PlayDetailModal .v1627-log-row>span{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;min-width:0!important;color:var(--muted)!important;font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#v162PlayDetailModal .v1627-log-row>span i{flex:0 0 6px!important;width:6px!important;height:6px!important;border-radius:50%!important;background:var(--v1627-tone)!important}
#v162PlayDetailModal [data-v1625-pitch].v1625-dimmed{opacity:.32!important}
#v162PlayDetailModal .v1625-zone-marker.v1625-active{opacity:1!important;transform:translate(-50%,-50%) scale(1.15)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--v1627-tone) 24%,transparent),0 3px 9px rgba(0,0,0,.34)!important}
#v162PlayDetailModal .v1627-log-row.v1625-active{opacity:1!important;background:color-mix(in srgb,var(--v1627-tone) 8%,var(--panel))!important}
/* Option C has actions after the content, never covering pitch rows. */
#v162PlayDetailModal .v162-detail-actions{position:static!important;bottom:auto!important;padding-top:10px!important;background:transparent!important}
body.dark-mode #v162PlayDetailModal .v1627-zone-block,
body.dark-mode #v162PlayDetailModal .v1627-log-column{background:#202020!important}
body.dark-mode #v162PlayDetailModal .v1627-zone-canvas{background:#1b1b1b!important}
body.dark-mode #v162PlayDetailModal .v1627-zone-box{border-color:#f5f5f5!important}
@media(max-width:430px){
 #v162PlayDetailModal .v1627-pitch-section{padding:10px!important}
 #v162PlayDetailModal .v1627-zone-block{padding:10px!important}
 #v162PlayDetailModal .v1627-zone-canvas{max-width:310px!important}
 #v162PlayDetailModal .v1627-pitch-log{gap:6px!important}
 #v162PlayDetailModal .v1627-log-row{grid-template-columns:25px minmax(0,1fr) minmax(58px,auto)!important;gap:5px!important;min-height:38px!important;padding:6px 7px!important}
 #v162PlayDetailModal .v1627-log-number{width:22px!important;height:22px!important;font-size:8px!important}
 #v162PlayDetailModal .v1627-log-row>strong{font-size:8px!important}
 #v162PlayDetailModal .v1627-log-row>span{font-size:7.5px!important}
}


/* ==========================================================
   v162.9 — bottom-fitted Play Details + approved strikezone geometry
   ========================================================== */
/* True bottom sheet: anchored to the viewport bottom with no floating lower corners. */
#v162PlayDetailModal.v162-detail-modal{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  padding:0!important;
}
#v162PlayDetailModal.v162-detail-modal.hidden{display:none!important}
#v162PlayDetailModal>.v162-detail-card{
  width:min(640px,100vw)!important;
  max-width:640px!important;
  max-height:calc(100dvh - max(8px,env(safe-area-inset-top)))!important;
  margin:0!important;
  border-radius:20px 20px 0 0!important;
  border-bottom:0!important;
  padding-bottom:calc(12px + env(safe-area-inset-bottom))!important;
}
/* Reuse the app's approved live pitch-location geometry exactly:
   outer canvas 4:3; strike zone left/right 28%, top/bottom 13%. */
#v162PlayDetailModal .v1627-zone-block{
  width:min(100%,360px)!important;
  max-width:360px!important;
  margin:0 auto!important;
  padding:10px!important;
}
#v162PlayDetailModal .v1627-zone-canvas{
  width:min(100%,310px)!important;
  max-width:310px!important;
  aspect-ratio:4/3!important;
  margin:0 auto!important;
  overflow:visible!important;
}
#v162PlayDetailModal .v1627-zone-box{
  left:28%!important;
  right:28%!important;
  top:13%!important;
  bottom:13%!important;
  border:2.5px solid var(--text)!important;
}
/* Keep the Option C markers and log compact around the corrected zone. */
#v162PlayDetailModal .v1627-pitch-flow{gap:9px!important}
#v162PlayDetailModal .v1627-pitch-log{gap:0 10px!important}
#v162PlayDetailModal .v1627-log-row{min-height:40px!important;padding:6px 7px!important}
@media(max-width:700px){
  #v162PlayDetailModal>.v162-detail-card{
    width:100vw!important;
    max-width:none!important;
    max-height:calc(100dvh - max(6px,env(safe-area-inset-top)))!important;
  }
  #v162PlayDetailModal .v1627-zone-block{width:min(100%,342px)!important;max-width:342px!important}
  #v162PlayDetailModal .v1627-zone-canvas{width:min(100%,292px)!important;max-width:292px!important}
}
@media(max-width:430px){
  #v162PlayDetailModal .v1627-zone-block{width:min(100%,330px)!important;max-width:330px!important;padding:9px!important}
  #v162PlayDetailModal .v1627-zone-canvas{width:min(100%,280px)!important;max-width:280px!important}
  #v162PlayDetailModal .v1627-pitch-log{gap:0 8px!important}
  #v162PlayDetailModal .v1627-log-row{min-height:38px!important;padding:5px 6px!important}
}

/* ==========================================================
   v162.10 — true bottom fit + reduced borders + pitch filters
   ========================================================== */
/* A fixed-height bottom sheet, not a content-height floating card. */
#v162PlayDetailModal.v162-detail-modal{align-items:flex-end!important;padding:0!important}
#v162PlayDetailModal>.v162-detail-card{
  height:calc(100dvh - max(6px,env(safe-area-inset-top)))!important;
  min-height:calc(100dvh - max(6px,env(safe-area-inset-top)))!important;
  max-height:calc(100dvh - max(6px,env(safe-area-inset-top)))!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  margin:0!important;
  border-radius:20px 20px 0 0!important;
  border-bottom:0!important;
  padding-bottom:0!important;
}
#v162PlayDetailModal>.v162-detail-card>.sheet-handle,
#v162PlayDetailModal>.v162-detail-card>.modal-head{flex:0 0 auto}
#v162PlayDetailModal .v162-detail-content{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-bottom:calc(14px + env(safe-area-inset-bottom))!important;
}
/* Keep only meaningful borders: outer section, actual zone, row separators. */
#v162PlayDetailModal .v16210-pitch-section{border-color:color-mix(in srgb,var(--line) 70%,transparent)!important}
#v162PlayDetailModal .v16210-zone-block{
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding-left:0!important;
  padding-right:0!important;
}
#v162PlayDetailModal .v1627-zone-canvas{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#v162PlayDetailModal .v1627-pitch-log{border:0!important;gap:0 16px!important}
#v162PlayDetailModal .v1627-log-column{border:0!important;background:transparent!important;border-radius:0!important;overflow:visible!important}
#v162PlayDetailModal .v1627-log-row{border-left:0!important;border-right:0!important;border-radius:0!important;background:transparent!important}
#v162PlayDetailModal .v1627-log-row:first-child{border-top:1px solid color-mix(in srgb,var(--line) 55%,transparent)!important}
#v162PlayDetailModal .v1627-log-row:last-child{border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent)!important}
/* Summary pills become explicit map filters. */
#v162PlayDetailModal .v16210-map-filters{display:flex!important;flex-wrap:wrap!important;gap:6px!important;justify-content:flex-start!important}
#v162PlayDetailModal .v16210-map-filters .v16210-filter{
  display:grid!important;
  gap:2px!important;
  min-width:56px!important;
  min-height:48px!important;
  padding:6px 9px!important;
  border-radius:11px!important;
  border:1px solid color-mix(in srgb,var(--line) 70%,transparent)!important;
  background:var(--soft)!important;
  color:var(--text)!important;
  text-align:center!important;
  box-shadow:none!important;
}
#v162PlayDetailModal .v16210-map-filters .v16210-filter b{font-size:13px!important;line-height:1!important}
#v162PlayDetailModal .v16210-map-filters .v16210-filter small{font-size:7.5px!important;font-weight:900!important;letter-spacing:.04em!important;text-transform:uppercase!important;color:var(--muted)!important}
#v162PlayDetailModal .v16210-map-filters .v16210-filter.active{
  background:color-mix(in srgb,var(--accent) 13%,var(--panel))!important;
  border-color:color-mix(in srgb,var(--accent) 65%,var(--line))!important;
  color:var(--accent)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent)!important;
}
#v162PlayDetailModal .v16210-map-filters .v16210-filter.active small{color:currentColor!important}
#v162PlayDetailModal .v1625-zone-marker{transition:opacity .14s ease,transform .14s ease,visibility .14s ease!important}
#v162PlayDetailModal .v1625-zone-marker.v16210-filter-hidden{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translate(-50%,-50%) scale(.72)!important}
#v162PlayDetailModal .v16210-zone-note{text-align:center;font-size:8px;line-height:1.35;color:var(--muted);margin-top:4px}
body.dark-mode #v162PlayDetailModal .v16210-zone-block,
body.dark-mode #v162PlayDetailModal .v1627-zone-canvas,
body.dark-mode #v162PlayDetailModal .v1627-log-column,
body.dark-mode #v162PlayDetailModal .v1627-log-row{background:transparent!important}
body.dark-mode #v162PlayDetailModal .v16210-map-filters .v16210-filter{background:var(--soft)!important;color:var(--text)!important}
body.dark-mode #v162PlayDetailModal .v16210-map-filters .v16210-filter.active{background:color-mix(in srgb,#2f80ed 24%,var(--panel))!important;border-color:#4b92ef!important;color:#8fc1ff!important}
@media(max-width:430px){
  #v162PlayDetailModal .v16210-map-filters .v16210-filter{min-width:60px!important;min-height:46px!important;padding:5px 8px!important}
  #v162PlayDetailModal .v1627-pitch-log{gap:0 10px!important}
}


/* ==========================================================
   v162.11 — content-fitted Play Details sheet + fixed actions
   ========================================================== */
#v162PlayDetailModal.v16211-detail-modal{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  padding:0!important;
}
#v162PlayDetailModal.v16211-detail-modal.hidden{display:none!important}
#v162PlayDetailModal>.v16211-detail-card{
  width:min(640px,100vw)!important;
  max-width:640px!important;
  height:auto!important;
  min-height:0!important;
  max-height:calc(100dvh - max(18px,env(safe-area-inset-top)))!important;
  margin:0!important;
  padding:0!important;
  border-radius:22px 22px 0 0!important;
  border-bottom:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  background:var(--panel)!important;
  box-shadow:0 -18px 46px rgba(0,0,0,.28)!important;
}
#v162PlayDetailModal>.v16211-detail-card>.sheet-handle{
  flex:0 0 auto!important;
  margin:8px auto 1px!important;
}
#v162PlayDetailModal>.v16211-detail-card>.modal-head{
  position:relative!important;
  top:auto!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:10px 12px 9px!important;
  background:var(--panel)!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 66%,transparent)!important;
  z-index:5!important;
}
#v162PlayDetailModal .v16211-detail-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  background:var(--panel)!important;
}
#v162PlayDetailModal .v162-detail-content{
  display:grid!important;
  gap:11px!important;
  overflow:visible!important;
  min-height:0!important;
  padding:10px 12px 12px!important;
  background:var(--panel)!important;
}
#v162PlayDetailModal .v16211-detail-footer{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:6!important;
  padding:9px 12px calc(10px + env(safe-area-inset-bottom))!important;
  border-top:1px solid color-mix(in srgb,var(--line) 66%,transparent)!important;
  background:var(--panel)!important;
  box-shadow:0 -8px 18px rgba(0,0,0,.05)!important;
}
#v162PlayDetailModal .v16211-detail-footer:empty{display:none!important}
#v162PlayDetailModal .v16211-fixed-actions{
  position:static!important;
  inset:auto!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;
  background:transparent!important;
}
#v162PlayDetailModal .v16211-fixed-actions button{
  min-height:48px!important;
  height:48px!important;
  margin:0!important;
  flex:none!important;
}
body.dark-mode #v162PlayDetailModal>.v16211-detail-card,
body.dark-mode #v162PlayDetailModal>.v16211-detail-card>.modal-head,
body.dark-mode #v162PlayDetailModal .v16211-detail-scroll,
body.dark-mode #v162PlayDetailModal .v162-detail-content,
body.dark-mode #v162PlayDetailModal .v16211-detail-footer{background:var(--panel)!important;color:var(--text)!important}
@media(max-width:700px){
  #v162PlayDetailModal>.v16211-detail-card{
    width:100vw!important;
    max-width:none!important;
    max-height:calc(100dvh - max(10px,env(safe-area-inset-top)))!important;
  }
}
@media(max-width:430px){
  #v162PlayDetailModal>.v16211-detail-card{border-radius:20px 20px 0 0!important}
  #v162PlayDetailModal .v162-detail-content{padding:9px 12px 10px!important}
  #v162PlayDetailModal .v16211-detail-footer{padding:8px 12px calc(9px + env(safe-area-inset-bottom))!important}
  #v162PlayDetailModal .v16211-fixed-actions button{min-height:46px!important;height:46px!important;font-size:14px!important}
}


/* ==========================================================
   v162.12 — Plays footer uniformity + geometry-neutral overlay lock
   ========================================================== */
.v16212-event-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:8px!important;
}
.v16212-event-actions>.v161-pitches{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
}
.v16212-event-actions>.v161-pitches summary{
  width:100%!important;
  min-height:34px!important;
  box-sizing:border-box!important;
}
.v16212-no-pitches{
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:34px!important;
  box-sizing:border-box!important;
  padding:0 10px!important;
  border:1px solid color-mix(in srgb,var(--line) 72%,transparent)!important;
  border-radius:9px!important;
  background:var(--panel)!important;
  color:var(--muted)!important;
  font-size:9px!important;
  font-weight:850!important;
}
.v16212-event-actions>.v162-jump-button{
  justify-self:end!important;
  margin:0!important;
}
body.dark-mode .v16212-no-pitches{
  background:var(--panel)!important;
  color:var(--muted)!important;
  border-color:color-mix(in srgb,var(--line) 72%,transparent)!important;
}

/* Do not change document geometry when an overlay opens. Background touch and
   wheel gestures are already blocked in JS, and open modal surfaces contain
   their own scrolling. This avoids scrollbar/viewport reflow on iOS. */
html.modal-scroll-locked,
body.modal-scroll-locked{
  overflow:visible!important;
  overscroll-behavior:auto!important;
}
body.modal-scroll-locked #appShell,
body.modal-scroll-locked #main{
  overflow:visible!important;
  overscroll-behavior:auto!important;
}
.modal:not(.hidden){
  overscroll-behavior:none!important;
}
.modal:not(.hidden)>.modal-card{
  overscroll-behavior:contain!important;
}
@media(max-width:430px){
  .v16212-event-actions{grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important}
  .v16212-no-pitches{min-height:32px!important;padding:0 8px!important;font-size:8px!important}
}

/* ==========================================================
   v163 — Phase 4 Stats Foundation
   ========================================================== */
.v163-stats-page{padding-bottom:18px}
.v163-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;margin-bottom:10px;border-radius:18px}
.v163-intro small{font-size:8px;font-weight:950;letter-spacing:.16em;color:var(--accent)}
.v163-intro h2{margin:3px 0 2px;font-size:22px}.v163-intro p{margin:0;max-width:540px;font-size:10px;line-height:1.4;color:var(--muted)}
.v163-intro>span{flex:none;padding:7px 10px;border:1px solid var(--line);border-radius:999px;font-size:8px;font-weight:900;color:var(--muted)}
.v163-stats-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:0 0 10px;padding:5px;border:1px solid var(--line);border-radius:15px;background:var(--panel)}
.v163-stats-nav button{min-width:0;min-height:38px;padding:0 5px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:8px;font-weight:900;white-space:nowrap}
.v163-stats-nav button.active{background:color-mix(in srgb,#2f80ed 14%,var(--panel));color:#2f80ed;box-shadow:inset 0 0 0 1px color-mix(in srgb,#2f80ed 50%,transparent)}
.v163-source-note{margin:8px 3px 10px;font-size:8px;line-height:1.45;color:var(--muted)}
.v163-team-stack{display:grid;gap:14px}.v163-team{padding:0;overflow:hidden;border-radius:19px}
.v163-team-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 13px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,color-mix(in srgb,#2f80ed 9%,var(--panel)),var(--panel) 72%)}
.v163-team.home .v163-team-head{background:linear-gradient(90deg,color-mix(in srgb,var(--muted) 7%,var(--panel)),var(--panel) 72%)}
.v163-team-head>div:first-child>small{display:block;margin-bottom:5px;font-size:7px;font-weight:950;letter-spacing:.16em;color:#2f80ed}.v163-team.home .v163-team-head>div:first-child>small{color:var(--muted)}
.v163-team-head>div:first-child>span{display:flex;align-items:center;gap:8px}.v163-team-head img{width:34px;height:34px;object-fit:contain}.v163-team-head span span{display:grid}.v163-team-head strong{font-size:14px}.v163-team-head em{font-style:normal;font-size:8px;color:var(--muted)}
.v163-rhe{display:flex}.v163-rhe i{display:grid;min-width:37px;padding:2px 6px;text-align:center;border-left:1px solid var(--line);font-style:normal}.v163-rhe b{font-size:14px}.v163-rhe small{font-size:7px;color:var(--muted)}
.v163-overview{display:grid}.v163-overview-kpis{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line)}.v163-overview-kpis span{text-align:center;padding:10px 4px;border-right:1px solid var(--line)}.v163-overview-kpis span:last-child{border-right:0}.v163-overview-kpis b{display:block;font-size:14px}.v163-overview-kpis small{font-size:7px;color:var(--muted)}
.v163-overview-groups{display:grid;grid-template-columns:1fr 1fr}.v163-overview-groups section{min-width:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.v163-overview-groups section:nth-child(even){border-right:0}.v163-overview-groups header,.v163-track-card header,.v163-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}.v163-overview-groups header strong,.v163-track-card header strong,.v163-section-head strong{font-size:9px;text-transform:uppercase;letter-spacing:.07em}.v163-overview-groups header small,.v163-track-card header small,.v163-section-head small{font-size:7px;color:var(--muted)}
.v163-overview-groups section>div{display:grid;grid-template-columns:repeat(5,1fr)}.v163-overview-groups section>div span{min-width:0;padding:8px 2px;text-align:center;border-right:1px solid var(--line)}.v163-overview-groups section>div span:last-child{border-right:0}.v163-overview-groups b{display:block;font-size:11px}.v163-overview-groups small{font-size:6.5px;color:var(--muted)}.v163-overview-groups .v163-none{grid-column:1/-1;padding:12px;font-size:8px;color:var(--muted)}
.v163-track-card{border-top:1px solid var(--line)}.v163-track-card>div{display:grid;grid-template-columns:repeat(6,1fr)}.v163-track-card>div span{text-align:center;padding:8px 3px;border-right:1px solid var(--line)}.v163-track-card>div span:last-child{border-right:0}.v163-track-card b{display:block;font-size:11px}.v163-track-card small{font-size:6.5px;color:var(--muted)}
.v163-stat-body{min-width:0}.v163-split{display:grid;grid-template-columns:minmax(132px,34%) minmax(0,1fr);min-width:0;border-top:0}
.v163-id-pane{position:relative;z-index:2;border-right:1px solid var(--line);background:var(--panel);box-shadow:9px 0 13px -14px rgba(0,0,0,.45)}
.v163-id-head,.v163-stat-head{height:34px;display:flex;align-items:center;padding:0 9px;border-bottom:1px solid var(--line);background:var(--panel2);font-size:7px;font-weight:950;letter-spacing:.08em;color:var(--muted)}
.v163-id-row{height:46px;display:flex;flex-direction:column;justify-content:center;min-width:0;padding:0 9px;border-bottom:1px solid var(--line)}.v163-id-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.v163-id-row small{margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:7px;color:var(--muted)}.v163-id-row.is-empty b{color:var(--muted);font-weight:700}
.v163-stat-scroll{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}.v163-stat-grid{display:grid;grid-template-columns:repeat(var(--v163-cols),minmax(54px,1fr));min-width:max-content}.v163-stat-head{justify-content:center;padding:0 6px;border-right:1px solid var(--line)}.v163-stat-cell{height:46px;min-width:54px;display:grid;place-items:center;padding:0 6px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);font-size:9px;white-space:nowrap}.v163-stat-grid>*:last-child{border-right:0}
body.dark-mode .v163-stats-nav,body.dark-mode .v163-team,body.dark-mode .v163-id-pane{background:var(--panel)!important;color:var(--text)!important}body.dark-mode .v163-id-head,body.dark-mode .v163-stat-head{background:var(--panel2)!important;color:var(--muted)!important}body.dark-mode .v163-stats-nav button.active{background:rgba(47,128,237,.18)!important;color:#69aaf7!important;box-shadow:inset 0 0 0 1px rgba(83,150,238,.42)!important}
@media(max-width:700px){.v163-intro{margin-left:0;margin-right:0}.v163-overview-groups{grid-template-columns:1fr}.v163-overview-groups section{border-right:0}.v163-stats-nav{gap:3px}.v163-stats-nav button{font-size:7.2px;padding:0 2px}.v163-split{grid-template-columns:128px minmax(0,1fr)}.v163-track-card>div{grid-template-columns:repeat(3,1fr)}.v163-track-card>div span:nth-child(3){border-right:0}.v163-track-card>div span:nth-child(-n/**/+3){border-bottom:1px solid var(--line)}}
@media(max-width:430px){.v163-intro{padding:11px 12px}.v163-intro h2{font-size:19px}.v163-intro p{font-size:8.5px}.v163-intro>span{font-size:7px}.v163-stats-nav button{min-height:35px;font-size:6.8px}.v163-team-head{padding:10px}.v163-team-head img{width:30px;height:30px}.v163-team-head strong{font-size:12px}.v163-rhe i{min-width:32px;padding:2px 4px}.v163-overview-kpis b{font-size:12px}.v163-split{grid-template-columns:120px minmax(0,1fr)}.v163-id-row,.v163-stat-cell{height:43px}.v163-id-head,.v163-stat-head{height:32px}.v163-stat-grid{grid-template-columns:repeat(var(--v163-cols),52px)}}

/* ==========================================================
   v164 — Phase 4 Stats refinement
   ========================================================== */
.v163-stats-page{padding-bottom:88px}
.v163-stats-nav{position:sticky;top:calc(var(--livebar-h,44px) + 43px);z-index:18;box-shadow:0 8px 18px -18px rgba(0,0,0,.5);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.v163-team{border:1px solid color-mix(in srgb,var(--line) 94%,transparent);box-shadow:0 8px 24px rgba(15,23,42,.055)}
.v163-team.away{border-top:3px solid #2f80ed}.v163-team.home{border-top:3px solid color-mix(in srgb,var(--muted) 58%,var(--line))}
.v163-team-head{min-height:62px}
.v164-split{grid-template-columns:minmax(128px,32%) minmax(0,1fr)}
.v164-id-pane{isolation:isolate;box-shadow:10px 0 14px -15px rgba(0,0,0,.68)}
.v163-id-head,.v163-stat-head{height:32px}
.v163-id-row,.v163-stat-cell{height:41px}
.v163-id-row{padding:0 8px}.v163-id-row b{font-size:8.7px;letter-spacing:-.01em}.v163-id-row small{font-size:6.8px}
.v164-stat-grid{grid-template-columns:repeat(var(--v163-cols),50px)}
.v163-stat-head{padding:0 4px;font-size:6.7px}.v163-stat-cell{min-width:50px;padding:0 4px;font-size:8.5px;font-variant-numeric:tabular-nums}
.v164-total-id,.v164-total-cell{position:relative;font-weight:950;background:color-mix(in srgb,#2f80ed 7%,var(--panel))!important;border-top:2px solid color-mix(in srgb,#2f80ed 32%,var(--line))!important}
.v164-total-id b{color:#1d65bd}.v164-total-id small{font-weight:750}
.v164-total-cell{color:var(--text)}
.v164-stat-scroll{position:relative;background:var(--panel);scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--line) 75%,transparent) transparent}
.v164-stat-scroll::after{content:"";position:sticky;right:0;float:right;display:block;width:16px;height:100%;margin-top:-100%;pointer-events:none;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--panel) 88%,transparent));opacity:.62}
.v163-section-head{padding:7px 9px}.v163-section-head small{white-space:normal;text-align:right;line-height:1.25}
.v163-source-note{margin:6px 4px 9px;padding:7px 9px;border-left:2px solid color-mix(in srgb,#2f80ed 55%,var(--line));border-radius:0 8px 8px 0;background:color-mix(in srgb,var(--soft) 58%,transparent);font-size:7.6px}
body.dark-mode .v163-team{box-shadow:0 10px 26px rgba(0,0,0,.28)}
body.dark-mode .v164-total-id,body.dark-mode .v164-total-cell{background:color-mix(in srgb,#2f80ed 13%,var(--panel))!important;border-top-color:rgba(83,150,238,.42)!important}
body.dark-mode .v164-total-id b{color:#78b4fb}
body.dark-mode .v163-source-note{background:rgba(47,128,237,.075);border-left-color:#4b92ef}
@media(max-width:700px){
 .v163-stats-nav{top:calc(var(--livebar-h,44px) + 40px)}
 .v164-split{grid-template-columns:116px minmax(0,1fr)}
 .v164-stat-grid{grid-template-columns:repeat(var(--v163-cols),48px)}
 .v163-stat-cell{min-width:48px}
}
@media(max-width:430px){
 .v163-intro{margin-bottom:7px}.v163-team-stack{gap:11px}
 .v163-stats-nav{margin-bottom:7px;padding:4px;border-radius:13px}.v163-stats-nav button{min-height:33px}
 .v163-team-head{min-height:56px;padding:8px 9px}.v163-rhe i{min-width:30px}
 .v164-split{grid-template-columns:108px minmax(0,1fr)}
 .v163-id-row,.v163-stat-cell{height:39px}.v163-id-head,.v163-stat-head{height:30px}
 .v163-id-row{padding:0 7px}.v163-id-row b{font-size:8.2px}.v163-id-row small{font-size:6.4px}
 .v164-stat-grid{grid-template-columns:repeat(var(--v163-cols),46px)}.v163-stat-cell{min-width:46px;font-size:8px}.v163-stat-head{font-size:6.3px}
 .v163-source-note{font-size:7px;margin-top:5px}
}

/* ==========================================================
   v165 — PHASE 5 SEASON / LIBRARY FOUNDATION
   ========================================================== */
.v165-library{--v165-soft:color-mix(in srgb,var(--accent) 7%,var(--ui-surface));}
.v165-library-summary{display:grid;grid-template-columns:repeat(3,minmax(0,.7fr)) minmax(180px,1.35fr);gap:7px}
.v165-library-summary>div{min-height:72px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface);display:grid;align-content:center;gap:1px;box-shadow:var(--ui-shadow)}
.v165-library-summary small{font-size:7px;font-weight:950;letter-spacing:.1em;color:var(--ui-muted)}
.v165-library-summary b{font-size:20px;line-height:1.05;color:var(--ui-text)}
.v165-library-summary span{font-size:8px;color:var(--ui-muted);font-weight:750}
.v165-library-summary .is-season{background:var(--v165-soft);border-color:color-mix(in srgb,var(--accent) 34%,var(--ui-line))}
.v165-library-summary .is-season small,.v165-library-summary .is-season b{color:var(--accent)}
.v165-library-toolbar{margin-top:-1px}
.v165-game-group{display:grid;gap:7px}
.v165-game-group>header{display:flex;align-items:flex-end;justify-content:space-between;padding:2px 3px}
.v165-game-group>header>div{display:flex;align-items:baseline;gap:7px}
.v165-game-group>header small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.12em}
.v165-game-group>header strong{font:700 18px/1 Georgia,"Times New Roman",serif;color:var(--ui-text)}
.v165-game-group>header>span{font-size:8px;color:var(--ui-muted);font-weight:800}
.v165-season-dashboard{display:grid;gap:10px}
.v165-season-archive{display:grid;gap:7px;padding:11px;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-surface)}
.v165-season-archive>header{display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.v165-season-archive>header>div{display:grid;gap:1px}.v165-season-archive header small{font-size:7px;letter-spacing:.12em;color:var(--accent);font-weight:950}.v165-season-archive header strong{font-size:12px}.v165-season-archive header>span{font-size:8px;color:var(--ui-muted)}
.v165-season-archive.is-empty p{margin:1px 0 0;color:var(--ui-muted);font-size:9px}
.v165-season-cards{display:flex;gap:7px;overflow-x:auto;padding:1px 1px 3px;-webkit-overflow-scrolling:touch;scrollbar-width:none}.v165-season-cards::-webkit-scrollbar{display:none}
.v165-season-cards button{flex:0 0 170px;display:grid;gap:4px;padding:9px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface-2);color:var(--ui-text);text-align:left}
.v165-season-cards button.active{border-color:color-mix(in srgb,var(--accent) 52%,var(--ui-line));background:var(--v165-soft)}
.v165-season-cards button>span{display:flex;align-items:center;gap:7px}.v165-season-cards img{width:29px;height:29px;object-fit:contain}.v165-season-cards i{display:grid;font-style:normal}.v165-season-cards i small{font-size:7px;color:var(--ui-muted);font-weight:850}.v165-season-cards i strong{font-size:16px}.v165-season-cards em{position:absolute;opacity:0;pointer-events:none}.v165-season-cards b,.v165-season-cards u{font-size:7px;text-decoration:none;color:var(--ui-muted);font-weight:800}.v165-season-cards u{color:var(--accent)}
.v165-season-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:15px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);box-shadow:var(--ui-shadow)}
.v165-season-identity{display:flex;align-items:center;gap:12px;min-width:0}.v165-season-identity img{width:62px;height:62px;object-fit:contain}.v165-season-identity span{display:grid;gap:2px;min-width:0}.v165-season-identity small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.12em}.v165-season-identity strong{font:700 20px/1.05 Georgia,"Times New Roman",serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v165-season-identity em{font-size:8px;color:var(--ui-muted);font-style:normal}
.v165-record{display:grid;justify-items:end;gap:2px}.v165-record small{font-size:6.5px;color:var(--ui-muted);font-weight:900}.v165-record strong{font-size:34px;line-height:1;color:var(--accent)}.v165-record span{font-size:7px;color:var(--ui-muted);font-weight:850}
.v165-season-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.v165-season-metrics>span{display:grid;gap:2px;padding:11px;border:1px solid var(--ui-line);border-radius:11px;background:var(--ui-surface)}.v165-season-metrics small{font-size:6px;letter-spacing:.07em;color:var(--ui-muted);font-weight:900}.v165-season-metrics b{font-size:20px;color:var(--ui-text)}.v165-season-metrics em{font-size:7px;color:var(--ui-muted);font-style:normal}
.v165-recent-form{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:11px;background:var(--ui-surface)}.v165-recent-form header{display:grid}.v165-recent-form header small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.1em}.v165-recent-form header span{font-size:7px;color:var(--ui-muted)}.v165-recent-form>div{display:flex;gap:5px}.v165-recent-form>div>span{width:27px;height:27px;display:grid;place-items:center;border-radius:7px;background:var(--ui-surface-2);font-size:8px;font-weight:950}.v165-recent-form>div>span.w{color:#278354;background:color-mix(in srgb,#34a56c 11%,var(--ui-surface))}.v165-recent-form>div>span.l{color:#b94f49;background:color-mix(in srgb,#d45c56 10%,var(--ui-surface))}.v165-recent-form>div>span.t{color:var(--ui-muted)}.v165-recent-form em{font-size:8px;color:var(--ui-muted);font-style:normal}
.v165-season-history{display:grid;gap:7px}.v165-season-history>header{display:flex;align-items:flex-end;justify-content:space-between;padding:1px 3px}.v165-season-history>header>div{display:grid}.v165-season-history header small{font-size:7px;color:var(--accent);font-weight:950;letter-spacing:.1em}.v165-season-history header strong{font-size:12px}.v165-season-history header>span{font-size:8px;color:var(--ui-muted)}
.v165-season-history-list{display:grid;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-surface);overflow:hidden}.v165-season-history-list article{display:grid;grid-template-columns:32px minmax(0,1fr) auto auto;align-items:center;gap:9px;padding:9px 10px;border-bottom:1px solid var(--ui-line)}.v165-season-history-list article:last-child{border-bottom:0}.v165-history-result{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;background:var(--ui-surface-2);font-size:8px;font-weight:950}.v165-history-result.w{color:#278354}.v165-history-result.l{color:#b94f49}.v165-history-result.t{color:var(--ui-muted)}.v165-history-main{display:grid;gap:2px;min-width:0}.v165-history-main>span{display:flex;align-items:center;gap:5px}.v165-history-main strong{font-size:10px}.v165-history-main i{font-style:normal;color:var(--ui-muted)}.v165-history-main small{font-size:7px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v165-history-main em{font-size:7px;color:var(--accent);font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v165-history-marks{display:flex;gap:3px;color:var(--accent);font-size:10px}.v165-history-actions{display:flex;gap:5px}.v165-history-actions button{min-height:34px;padding:0 9px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface-2);color:var(--ui-text);font-size:8px;font-weight:850}.v165-history-actions button:last-child{border-color:color-mix(in srgb,var(--accent) 42%,var(--ui-line));background:var(--v165-soft)}
.v165-season-note{margin:0 3px;color:var(--ui-muted);font-size:7.5px;line-height:1.5}
body.dark .v165-library-summary>div,body.dark .v165-season-archive,body.dark .v165-season-hero,body.dark .v165-season-metrics>span,body.dark .v165-recent-form,body.dark .v165-season-history-list{box-shadow:none}

@media(max-width:700px){
 .v165-library-summary{grid-template-columns:repeat(3,1fr);gap:5px}.v165-library-summary>div{min-height:60px;padding:8px}.v165-library-summary b{font-size:17px}.v165-library-summary .is-season{grid-column:1/-1;min-height:58px;grid-template-columns:auto 1fr auto;align-items:center;column-gap:8px}.v165-library-summary .is-season small{grid-column:1}.v165-library-summary .is-season b{grid-column:2;grid-row:1/3;font-size:22px;text-align:center}.v165-library-summary .is-season span{grid-column:3;grid-row:1/3;text-align:right}
 .v165-game-group{gap:5px}.v165-game-group>header strong{font-size:16px}
 .v165-season-archive{padding:9px}.v165-season-cards button{flex-basis:144px;padding:8px}.v165-season-cards img{width:26px;height:26px}.v165-season-cards i strong{font-size:14px}
 .v165-season-hero{grid-template-columns:1fr;padding:12px}.v165-season-identity img{width:50px;height:50px}.v165-season-identity strong{font-size:17px}.v165-record{justify-items:start;padding-top:9px;border-top:1px solid var(--ui-line)}.v165-record strong{font-size:29px}
 .v165-season-metrics{grid-template-columns:repeat(2,1fr);gap:5px}.v165-season-metrics>span{padding:9px}.v165-season-metrics b{font-size:17px}
 .v165-recent-form{padding:9px}.v165-recent-form>div>span{width:25px;height:25px}
 .v165-season-history-list article{grid-template-columns:30px minmax(0,1fr) auto;gap:7px;padding:9px}.v165-history-marks{display:none}.v165-history-actions{grid-column:2/4;display:grid;grid-template-columns:1fr 1fr}.v165-history-actions button{min-height:38px}.v165-history-main strong{font-size:9px}.v165-history-main small,.v165-history-main em{font-size:6.5px}
}

/* v165.1 — removable demo-season preview controls */
.v1651-demo-panel{margin:12px 0 14px;padding:14px;border:1px solid var(--border,#dbe3ee);border-radius:16px;background:var(--card,#fff);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;box-shadow:0 5px 18px rgba(15,23,42,.05)}
.v1651-demo-panel.is-loaded{background:color-mix(in srgb,var(--primary,#2563eb) 5%,var(--card,#fff))}
.v1651-demo-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--primary,#2563eb) 10%,transparent);color:var(--primary,#2563eb);font-size:19px;font-weight:900}
.v1651-demo-panel>div:nth-child(2){min-width:0;display:grid;gap:2px}
.v1651-demo-panel small{font-size:10px;letter-spacing:.11em;font-weight:900;color:var(--muted,#64748b)}
.v1651-demo-panel strong{font-size:14px;line-height:1.25;color:var(--ink,#0f172a)}
.v1651-demo-panel span{font-size:11px;line-height:1.4;color:var(--muted,#64748b)}
.v1651-demo-panel button{border:0;border-radius:11px;padding:10px 12px;white-space:nowrap;background:var(--primary,#2563eb);color:#fff;font:800 11px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.v1651-demo-panel.is-loaded button{background:transparent;color:var(--primary,#2563eb);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary,#2563eb) 34%,var(--border,#dbe3ee))}
.v1651-demo-card{position:relative}
.v1651-demo-badge{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:999px;background:color-mix(in srgb,var(--primary,#2563eb) 11%,transparent);color:var(--primary,#2563eb);font-size:9px!important;letter-spacing:.09em;font-weight:900!important}
body.dark .v1651-demo-panel,.dark .v1651-demo-panel{background:var(--card,#111827);border-color:var(--border,#334155);box-shadow:none}
body.dark .v1651-demo-panel.is-loaded,.dark .v1651-demo-panel.is-loaded{background:color-mix(in srgb,var(--primary,#60a5fa) 9%,var(--card,#111827))}
body.dark .v1651-demo-panel strong,.dark .v1651-demo-panel strong{color:var(--ink,#f8fafc)}
@media(max-width:620px){
 .v1651-demo-panel{grid-template-columns:auto minmax(0,1fr);padding:12px;gap:10px}
 .v1651-demo-panel button{grid-column:1/-1;width:100%;min-height:42px}
 .v1651-demo-icon{width:34px;height:34px;border-radius:10px}
}

/* ==========================================================
   v165.2 — Library visual cleanup
   Cleaner hierarchy, less nested bordering, tighter mobile rhythm.
   ========================================================== */
.v165-library.v90-library{gap:10px!important}
.v165-library .library-content{gap:9px!important}

/* Team + season: keep one quiet control surface. */
.v165-library .v165-library-toolbar{
  padding:8px!important;
  gap:7px!important;
  border-color:color-mix(in srgb,var(--ui-line) 78%,transparent)!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
.v165-library .v165-library-toolbar label{gap:3px!important}
.v165-library .v165-library-toolbar label>span{font-size:8px!important;letter-spacing:.105em!important}
.v165-library .v165-library-toolbar select{
  height:40px!important;
  border-radius:9px!important;
  border-color:color-mix(in srgb,var(--ui-line) 80%,transparent)!important;
  background:color-mix(in srgb,var(--ui-surface-2) 76%,var(--ui-surface))!important;
}

/* Single navigation hierarchy: this is now the only section switcher. */
.v1652-library-tabs{
  position:static!important;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:2px!important;
  padding:3px!important;
  border:1px solid color-mix(in srgb,var(--ui-line) 78%,transparent)!important;
  border-radius:12px!important;
  background:var(--ui-surface)!important;
  box-shadow:none!important;
}
.v1652-library-tabs button{
  min-width:0!important;
  min-height:48px!important;
  padding:5px 2px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:var(--ui-muted)!important;
}
.v1652-library-tabs button span{font-size:13px!important;line-height:1!important}
.v1652-library-tabs button b{font-size:8px!important;line-height:1.1!important;font-weight:850!important;white-space:nowrap!important}
.v1652-library-tabs button.active{
  background:var(--ui-surface-2)!important;
  color:var(--ui-text)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-line) 86%,transparent)!important;
}
.v1652-library-tabs button.active span{color:var(--accent)!important}

/* Replace duplicated Overview/Batting/Pitching strip with utilities only. */
.v1652-season-tools{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:2px 2px 5px;
}
.v1652-season-tools>span{display:grid;gap:1px}
.v1652-season-tools small{font-size:7px;letter-spacing:.11em;color:var(--ui-muted);font-weight:900}
.v1652-season-tools b{font-size:10px;color:var(--ui-text)}
.v1652-season-tools>div{display:flex;gap:5px}
.v1652-season-tools button{
  min-height:34px;
  padding:0 10px;
  border:1px solid color-mix(in srgb,var(--ui-line) 82%,transparent);
  border-radius:8px;
  background:var(--ui-surface);
  color:var(--ui-text);
  font-size:8px;
  font-weight:850;
}

/* Summary + demo controls: remove excess visual weight. */
.v165-library-summary{gap:5px!important}
.v165-library-summary>div{
  min-height:64px!important;
  padding:8px 10px!important;
  border-radius:10px!important;
  border-color:color-mix(in srgb,var(--ui-line) 74%,transparent)!important;
  box-shadow:none!important;
}
.v1651-demo-panel{
  margin:0!important;
  padding:10px 11px!important;
  border-radius:12px!important;
  border-color:color-mix(in srgb,var(--ui-line) 76%,transparent)!important;
  box-shadow:none!important;
}
.v1651-demo-icon{width:34px!important;height:34px!important;border-radius:9px!important}

/* Group headings should separate seasons without another card-like box. */
.v165-game-group{gap:5px!important}
.v165-game-group>header{padding:3px 2px 5px!important;border-bottom:1px solid color-mix(in srgb,var(--ui-line) 64%,transparent)}
.v165-game-group>header strong{font-size:17px!important}

/* Saved scorecards: keep all information/actions but lighten nested separators. */
.v165-library .v90-game-card{
  border-color:color-mix(in srgb,var(--ui-line) 78%,transparent)!important;
  border-radius:13px!important;
  box-shadow:none!important;
}
.v165-library .v90-game-card-head{
  padding:8px 10px!important;
  border-bottom:0!important;
}
.v165-library .v90-game-matchup{padding:9px 10px 7px!important}
.v165-library .v90-game-details{padding:0 10px 7px!important;gap:6px!important}
.v165-library .v90-game-details span+span::before{margin-right:6px!important}
.v165-library .v90-game-card .collection-caption{padding:0 10px 7px!important}
.v165-library .v90-game-card .collection-caption input{height:35px!important;border-radius:8px!important}
.v165-library .v90-game-rhe{
  margin:0 10px 7px!important;
  padding:7px 8px!important;
  border-radius:8px!important;
  background:color-mix(in srgb,var(--ui-surface-2) 70%,var(--ui-surface))!important;
}
.v165-library .v90-card-marks{padding:0 10px 8px!important;gap:5px!important}
.v165-library .v90-card-marks button{min-height:30px!important;border-radius:8px!important}
.v165-library .v90-game-card .saved-game-actions{
  padding:8px 10px 9px!important;
  border-top:1px solid color-mix(in srgb,var(--ui-line) 62%,transparent)!important;
  gap:5px!important;
}
.v165-library .v90-game-card .saved-game-actions button{min-height:39px!important;border-radius:8px!important}

/* Season dashboard: retain hierarchy, remove border stacking. */
.v165-season-dashboard{gap:8px!important}
.v165-season-archive,
.v165-season-hero,
.v165-season-metrics>span,
.v165-recent-form,
.v165-season-history-list{
  box-shadow:none!important;
  border-color:color-mix(in srgb,var(--ui-line) 76%,transparent)!important;
}
.v165-season-archive{padding:10px!important;border-radius:12px!important}
.v165-season-hero{padding:12px!important;border-radius:12px!important}
.v165-season-metrics{gap:5px!important}
.v165-season-metrics>span{padding:9px!important;border-radius:9px!important}
.v165-recent-form{border-radius:10px!important}
.v165-season-history-list{border-radius:11px!important}

@media(max-width:700px){
 .v165-library.v90-library{gap:8px!important;padding-top:2px!important}
 .v165-library .v165-library-toolbar{padding:6px!important;gap:5px!important}
 .v165-library .v165-library-toolbar select{height:39px!important;font-size:12px!important}
 .v1652-library-tabs{padding:2px!important;gap:1px!important}
 .v1652-library-tabs button{min-height:45px!important;padding:4px 1px!important;gap:2px!important}
 .v1652-library-tabs button span{font-size:12px!important}
 .v1652-library-tabs button b{font-size:7px!important}
 .v1652-season-tools{padding:0 1px 4px!important}
 .v1652-season-tools>span{display:none}
 .v1652-season-tools>div{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:5px}
 .v1652-season-tools button{min-height:35px!important}
 .v165-library-summary>div{min-height:56px!important;padding:7px!important}
 .v165-library-summary .is-season{min-height:52px!important}
 .v1651-demo-panel{grid-template-columns:auto minmax(0,1fr)!important;padding:9px!important;gap:8px!important}
 .v1651-demo-panel button{grid-column:1/-1!important;min-height:38px!important;padding:8px 10px!important}
 .v165-library .v90-game-matchup{padding:8px 9px 6px!important}
 .v165-library .v90-game-matchup img{width:32px!important;height:32px!important}
 .v165-library .v90-game-card .saved-game-actions{padding:7px 9px 8px!important}
 .v165-library .v90-game-card .saved-game-actions button{min-height:40px!important}
}

/* ==========================================================
   v166 — Season / Library refinement
   ========================================================== */
.v166-season-tools{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important}
.v166-season-scope{font-style:normal;font-size:8px;font-weight:750;color:var(--ui-muted);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v166-active-only{border-style:dashed!important;background:color-mix(in srgb,var(--accent) 3%,var(--ui-surface))!important}
.v166-active-only>span{color:var(--accent)!important}
.v166-library-toolbar select{font-variant-numeric:tabular-nums}
body.dark .v166-active-only,.dark .v166-active-only{background:color-mix(in srgb,var(--accent) 6%,var(--ui-surface))!important}
@media(max-width:700px){
 .v166-season-tools{grid-template-columns:1fr!important;gap:5px!important;padding-bottom:5px!important}
 .v166-season-tools>span{display:none!important}
 .v166-season-scope{display:block!important;text-align:left!important;padding:0 2px;font-size:7.5px!important}
 .v166-season-tools>div{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important}
}

/* ==========================================================
   v167 — Phase 6 Postgame Experience Foundation
   ========================================================== */
#postgameModal .postgame-card{padding:12px!important}
#postgameContent{min-width:0}
.v167-postgame-screen{display:grid;gap:11px;padding-bottom:2px}
.v167-final-hero{overflow:hidden;border:1px solid var(--ui-line);border-radius:20px;background:var(--ui-surface);box-shadow:0 8px 24px rgba(15,23,42,.06)}
.v167-final-kicker{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-bottom:1px solid var(--ui-line);background:color-mix(in srgb,var(--accent) 5%,var(--ui-surface))}
.v167-final-kicker span{font-size:8px;font-weight:950;letter-spacing:.1em;color:var(--ui-muted)}.v167-final-kicker b{font-size:9px;color:var(--accent);letter-spacing:.08em}
.v167-final-matchup{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:15px 13px 12px}
.v167-final-team{position:relative;min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;column-gap:8px;text-align:left}.v167-final-team.right{grid-template-columns:auto minmax(0,1fr) 38px;text-align:right}.v167-final-team.right img{grid-column:3;grid-row:1/3}.v167-final-team.right strong,.v167-final-team.right small{grid-column:2}.v167-final-team.right>b{grid-column:1;grid-row:1/3}
.v167-final-team img{grid-row:1/3;width:38px;height:38px;object-fit:contain}.v167-final-team strong{font-size:14px;line-height:1.05}.v167-final-team small{font-size:8px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v167-final-team>b{grid-column:3;grid-row:1/3;font-size:36px;line-height:1;font-variant-numeric:tabular-nums}
.v167-final-center{min-width:74px;text-align:center;display:grid;gap:2px}.v167-final-center span{font-size:10px;font-weight:950;letter-spacing:.12em;color:var(--accent)}.v167-final-center small{max-width:125px;font-size:7px;line-height:1.3;color:var(--ui-muted)}
.v167-rhe{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--ui-line)}.v167-rhe>span{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,32px);align-items:center;padding:7px 10px}.v167-rhe>span:first-child{border-right:1px solid var(--ui-line)}.v167-rhe>span>b{font-size:9px}.v167-rhe i{display:grid;text-align:center;font-style:normal;font-size:11px;font-weight:900}.v167-rhe i small{font-size:6px;color:var(--ui-muted);font-weight:800}
.v167-section-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin:0 2px 6px}.v167-section-head>div{display:grid;gap:1px}.v167-section-head small{font-size:7px;font-weight:950;letter-spacing:.13em;color:var(--accent)}.v167-section-head strong{font-size:12px}.v167-section-head>span{font-size:7px;color:var(--ui-muted);text-align:right}
.v167-archive-stamp{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:9px;padding:9px 11px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--ui-line));border-radius:14px;background:color-mix(in srgb,var(--accent) 5%,var(--ui-surface))}.v167-archive-stamp>span{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--accent) 13%,var(--ui-surface));color:var(--accent);font-weight:950}.v167-archive-stamp>div{display:grid;gap:1px}.v167-archive-stamp strong{font-size:10px}.v167-archive-stamp small{font-size:7.5px;line-height:1.3;color:var(--ui-muted)}
.v167-standout-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.v167-standout{overflow:hidden;border:1px solid var(--ui-line);border-radius:15px;background:var(--ui-surface)}.v167-standout header{display:flex;align-items:center;gap:7px;padding:8px 9px;border-bottom:1px solid var(--ui-line);background:var(--ui-surface-2)}.v167-standout header img{width:28px;height:28px;object-fit:contain}.v167-standout header div{display:grid;min-width:0}.v167-standout header small{font-size:6.5px;font-weight:950;letter-spacing:.08em;color:var(--accent)}.v167-standout header strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v167-standout-row{display:grid;grid-template-columns:26px minmax(0,1fr);gap:7px;align-items:center;padding:8px 9px}.v167-standout-row+.v167-standout-row{border-top:1px solid color-mix(in srgb,var(--ui-line) 72%,transparent)}.v167-standout-row>span{width:25px;height:25px;border-radius:8px;display:grid;place-items:center;background:var(--ui-surface-2);color:var(--accent);font-size:12px}.v167-standout-row div{display:grid;gap:1px;min-width:0}.v167-standout-row small{font-size:6px;font-weight:900;letter-spacing:.08em;color:var(--ui-muted)}.v167-standout-row b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v167-standout-row em{font-style:normal;font-size:7px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v167-decisions,.v167-memory{padding:11px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-surface)}.v167-decisions>.v167-section-head,.v167-memory>.v167-section-head{margin:0 0 8px}.v167-decisions>div:last-child{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.v167-decisions label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px;padding:5px 7px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface-2)}.v167-decisions label>span{font-size:8px;font-weight:950;color:var(--accent)}.v167-decisions select{min-width:0!important;width:100%!important;min-height:32px!important;border:0!important;padding:0 2px!important;background:transparent!important;color:var(--ui-text)!important;font-size:9px!important;font-weight:800!important}
.v167-memory-title,.v167-notes{display:grid;gap:4px}.v167-memory-title>span,.v167-notes>span{font-size:7px;font-weight:900;letter-spacing:.06em;color:var(--ui-muted)}.v167-memory-title input{width:100%;min-height:39px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface-2);color:var(--ui-text);padding:8px 10px;font:800 11px/1.2 inherit}.v167-memory-marks{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:7px 0}.v167-memory-marks button{min-height:36px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface-2);color:var(--ui-muted);font-size:9px;font-weight:850}.v167-memory-marks button.active{border-color:color-mix(in srgb,var(--accent) 50%,var(--ui-line));background:color-mix(in srgb,var(--accent) 8%,var(--ui-surface));color:var(--accent)}.v167-notes textarea{width:100%;min-height:58px;max-height:110px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface-2);color:var(--ui-text);padding:8px 10px;font:500 10px/1.4 inherit;resize:vertical}
.v167-quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.v167-quick-actions button{min-height:73px;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-surface);color:var(--ui-text);display:grid;justify-items:center;align-content:center;gap:2px;padding:7px}.v167-quick-actions button>span{font-size:16px;color:var(--accent)}.v167-quick-actions button strong{font-size:8.5px}.v167-quick-actions button small{font-size:6.5px;color:var(--ui-muted);text-align:center}
.v167-postgame-footer{position:sticky;bottom:calc(-14px - env(safe-area-inset-bottom));z-index:4;display:grid;grid-template-columns:.8fr 1.2fr;gap:8px;margin:0 -2px;padding:9px 2px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,var(--ui-surface) 20%)}.v167-postgame-footer button{min-height:46px;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-surface-2);color:var(--ui-text);font-size:10px;font-weight:900}.v167-postgame-footer .primary{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}.v167-reopen{border:0;background:transparent;color:var(--ui-muted);font-size:8px;text-decoration:underline;padding:4px}

.v167-summary-page{padding-bottom:16px}.v167-summary-head{display:flex;align-items:end;justify-content:space-between;gap:10px;padding:4px 2px 10px}.v167-summary-head small{font-size:7px;font-weight:950;letter-spacing:.13em;color:var(--accent)}.v167-summary-head h2{margin:2px 0;font-size:22px}.v167-summary-head p{margin:0;font-size:8.5px;color:var(--ui-muted)}.v167-summary-head>span{padding:6px 8px;border:1px solid var(--ui-line);border-radius:999px;font-size:7px;font-weight:900;color:var(--ui-muted)}
.v167-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.v167-summary-grid>.v167-summary-panel,.v167-summary-grid>.v167-decisions,.v167-summary-grid>.v167-memory,.v167-summary-grid>.auto-runner-report-note{min-width:0}.v167-summary-panel{padding:11px;border-radius:17px}.v167-summary-panel .v167-section-head{margin-bottom:8px}.v167-summary-grid>.v167-summary-panel:first-child,.v167-summary-grid>.v167-summary-panel:nth-child(2),.v167-summary-grid>.v167-decisions,.v167-summary-grid>.v167-memory,.v167-summary-grid>.auto-runner-report-note,.v167-summary-actions{grid-column:1/-1}
.v167-scoring-list{display:grid;border-top:1px solid var(--ui-line)}.v167-scoring-list>div{display:grid;grid-template-columns:55px minmax(90px,.8fr) minmax(0,1.5fr) 34px;gap:8px;align-items:center;min-height:39px;border-bottom:1px solid var(--ui-line);font-size:8px}.v167-scoring-list span{font-size:7px;font-weight:900;color:var(--accent)}.v167-scoring-list b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v167-scoring-list em{font-style:normal;color:var(--ui-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v167-scoring-list strong{text-align:right}.v167-more-recap,.v167-empty-recap{display:block;padding:8px 0 0;font-size:7px;color:var(--ui-muted)}
.v167-summary-actions{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:8px}.v167-summary-actions button{min-height:50px;border:0;border-radius:10px;background:var(--ui-surface-2);color:var(--ui-text);display:grid;place-items:center;align-content:center;gap:2px;font-size:14px}.v167-summary-actions button span{font-size:7px;font-weight:900;color:var(--ui-muted)}
body.dark-mode .v167-final-hero,body.dark-mode .v167-standout,body.dark-mode .v167-decisions,body.dark-mode .v167-memory,body.dark-mode .v167-summary-panel,body.dark-mode .v167-quick-actions button{box-shadow:none!important}

@media(max-width:700px){
 #postgameModal .postgame-card{width:100vw!important;max-height:calc(100dvh - 8px)!important;border-radius:22px 22px 0 0!important;padding:10px 10px calc(8px + env(safe-area-inset-bottom))!important}
 .v167-postgame-screen{gap:9px}.v167-final-matchup{padding:12px 9px 9px;gap:5px}.v167-final-team{grid-template-columns:31px minmax(0,1fr) auto;column-gap:5px}.v167-final-team.right{grid-template-columns:auto minmax(0,1fr) 31px}.v167-final-team img{width:31px;height:31px}.v167-final-team strong{font-size:11px}.v167-final-team small{font-size:6.5px}.v167-final-team>b{font-size:30px}.v167-final-center{min-width:52px}.v167-final-center small{font-size:6px;max-width:86px}.v167-rhe>span{grid-template-columns:minmax(0,1fr) repeat(3,26px);padding:6px 8px}.v167-standout-grid{gap:6px}.v167-standout header{padding:7px}.v167-standout header img{width:24px;height:24px}.v167-standout-row{grid-template-columns:22px minmax(0,1fr);padding:7px;gap:5px}.v167-standout-row>span{width:21px;height:21px;font-size:10px}.v167-standout-row b{font-size:8px}.v167-standout-row em{font-size:6.3px}.v167-decisions,.v167-memory{padding:9px}.v167-decisions>div:last-child{grid-template-columns:1fr;gap:5px}.v167-decisions label{grid-template-columns:24px minmax(0,1fr);min-height:37px}.v167-decisions select{font-size:10px!important}.v167-quick-actions button{min-height:65px}.v167-postgame-footer{bottom:calc(-10px - env(safe-area-inset-bottom));margin:0;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
 .v167-summary-grid{grid-template-columns:1fr;gap:8px}.v167-summary-head h2{font-size:19px}.v167-summary-head p{font-size:7.5px}.v167-summary-grid>*{grid-column:1!important}.v167-scoring-list>div{grid-template-columns:45px minmax(80px,.8fr) minmax(0,1.4fr) 28px;gap:5px}.v167-summary-actions{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:430px){
 .v167-final-kicker{padding:7px 9px}.v167-final-kicker span,.v167-final-kicker b{font-size:6.5px}.v167-final-team small{display:none}.v167-final-team>b{font-size:28px}.v167-rhe>span>b{font-size:8px}.v167-rhe i{font-size:10px}.v167-section-head strong{font-size:10px}.v167-section-head>span{font-size:6.3px}.v167-standout header strong{font-size:8px}.v167-memory-marks button{font-size:8px}.v167-postgame-footer button{min-height:44px}.v167-summary-page .v167-standout-grid{grid-template-columns:1fr}.v167-summary-page .v167-final-center small{display:none}
}

/* v167.1 — Scoring recap team distinction */
.v1671-scoring-list .v1671-scoring-row{
  position:relative;
  padding-left:9px;
  border-left:3px solid transparent;
}
.v1671-scoring-list .v1671-scoring-row.is-away{
  border-left-color:#3b82f6;
  background:linear-gradient(90deg,rgba(59,130,246,.08),transparent 32%);
}
.v1671-scoring-list .v1671-scoring-row.is-home{
  border-left-color:#ef4444;
  background:linear-gradient(90deg,rgba(239,68,68,.08),transparent 32%);
}
.v1671-scoring-list .v1671-inning{
  display:flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.v1671-scoring-list .v1671-inning i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:16px;
  padding:0 5px;
  border-radius:999px;
  font-size:6px;
  line-height:1;
  font-style:normal;
  font-weight:950;
  letter-spacing:.05em;
  color:#fff;
}
.v1671-scoring-list .is-away .v1671-inning i{background:#3b82f6}
.v1671-scoring-list .is-home .v1671-inning i{background:#ef4444}
body.dark-mode .v1671-scoring-list .v1671-scoring-row.is-away{background:linear-gradient(90deg,rgba(59,130,246,.14),transparent 34%)}
body.dark-mode .v1671-scoring-list .v1671-scoring-row.is-home{background:linear-gradient(90deg,rgba(239,68,68,.14),transparent 34%)}
@media(max-width:600px){
  .v1671-scoring-list>div{grid-template-columns:72px minmax(72px,.8fr) minmax(0,1.35fr) 28px!important}
  .v1671-scoring-list .v1671-inning{gap:4px}
  .v1671-scoring-list .v1671-inning i{min-width:22px;padding:0 4px;font-size:5.5px}
}

/* ==========================================================
   v167.2 — Postgame dark mode parity hotfix
   Scope: Postgame modal + final-summary components only.
   ========================================================== */
body.dark-mode #postgameModal .postgame-card{
  background:#171717!important;
  color:#f5f5f5!important;
  border-color:#404040!important;
  box-shadow:0 -18px 45px rgba(0,0,0,.46)!important;
}
body.dark-mode #postgameModal .modal-head{
  background:#171717!important;
  border-bottom-color:#383838!important;
  color:#f5f5f5!important;
}
body.dark-mode #postgameModal .modal-head small{color:#b7b7b7!important}
body.dark-mode #postgameModal .modal-head button{
  background:#2a2a2a!important;
  color:#f5f5f5!important;
  border-color:#3b3b3b!important;
}
body.dark-mode #postgameModal .v167-final-hero,
body.dark-mode #postgameModal .v167-standout,
body.dark-mode #postgameModal .v167-decisions,
body.dark-mode #postgameModal .v167-memory,
body.dark-mode #postgameModal .v167-quick-actions button{
  background:#202020!important;
  color:#f5f5f5!important;
  border-color:#444!important;
  box-shadow:none!important;
}
body.dark-mode #postgameModal .v167-final-kicker,
body.dark-mode #postgameModal .v167-standout header,
body.dark-mode #postgameModal .v167-standout-row>span,
body.dark-mode #postgameModal .v167-decisions label,
body.dark-mode #postgameModal .v167-memory-title input,
body.dark-mode #postgameModal .v167-memory-marks button,
body.dark-mode #postgameModal .v167-notes textarea,
body.dark-mode #postgameModal .v167-postgame-footer button:not(.primary){
  background:#2a2a2a!important;
  color:#f5f5f5!important;
  border-color:#444!important;
}
body.dark-mode #postgameModal .v167-decisions select{
  color:#f5f5f5!important;
  background:#2a2a2a!important;
  color-scheme:dark;
}
body.dark-mode #postgameModal .v167-memory-title input,
body.dark-mode #postgameModal .v167-notes textarea{
  caret-color:#60a5fa!important;
}
body.dark-mode #postgameModal .v167-memory-title input::placeholder,
body.dark-mode #postgameModal .v167-notes textarea::placeholder{color:#929292!important}
body.dark-mode #postgameModal .v167-memory-marks button.active{
  background:#17345a!important;
  color:#8ec5ff!important;
  border-color:#3b82f6!important;
}
body.dark-mode #postgameModal .v167-archive-stamp{
  background:#1b2735!important;
  border-color:#35506f!important;
}
body.dark-mode #postgameModal .v167-archive-stamp>span{
  background:#203e61!important;
  color:#8ec5ff!important;
}
body.dark-mode #postgameModal .v167-section-head small,
body.dark-mode #postgameModal .v167-final-kicker b,
body.dark-mode #postgameModal .v167-final-center span,
body.dark-mode #postgameModal .v167-decisions label>span,
body.dark-mode #postgameModal .v167-quick-actions button>span{color:#79b7ff!important}
body.dark-mode #postgameModal .v167-final-kicker span,
body.dark-mode #postgameModal .v167-final-team small,
body.dark-mode #postgameModal .v167-final-center small,
body.dark-mode #postgameModal .v167-rhe i small,
body.dark-mode #postgameModal .v167-section-head>span,
body.dark-mode #postgameModal .v167-standout-row small,
body.dark-mode #postgameModal .v167-standout-row em,
body.dark-mode #postgameModal .v167-memory-title>span,
body.dark-mode #postgameModal .v167-notes>span,
body.dark-mode #postgameModal .v167-quick-actions button small,
body.dark-mode #postgameModal .v167-reopen{color:#aaa!important}
body.dark-mode #postgameModal .v167-postgame-footer{
  background:linear-gradient(180deg,transparent,#171717 20%)!important;
}
body.dark-mode #postgameModal .v167-postgame-footer .primary{
  background:#3182f6!important;
  border-color:#3182f6!important;
  color:#fff!important;
  box-shadow:none!important;
}
body.dark-mode #postgameModal .v167-postgame-footer .primary:active{background:#246bd0!important}

/* Final Summary uses the same neutral dark hierarchy. */
body.dark-mode .v167-summary-page .v167-final-hero,
body.dark-mode .v167-summary-page .v167-standout,
body.dark-mode .v167-summary-page .v167-decisions,
body.dark-mode .v167-summary-page .v167-memory,
body.dark-mode .v167-summary-page .v167-summary-panel,
body.dark-mode .v167-summary-page .v167-summary-actions{
  background:#202020!important;
  color:#f5f5f5!important;
  border-color:#444!important;
  box-shadow:none!important;
}
body.dark-mode .v167-summary-page .v167-summary-actions button,
body.dark-mode .v167-summary-page .v167-decisions label,
body.dark-mode .v167-summary-page .v167-memory-title input,
body.dark-mode .v167-summary-page .v167-memory-marks button,
body.dark-mode .v167-summary-page .v167-notes textarea{
  background:#2a2a2a!important;
  color:#f5f5f5!important;
  border-color:#444!important;
}

/* v168 — Export / Backup / Sharing */
.v168-export-card{padding:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;max-height:min(92dvh,860px)!important}.v168-export-card>.sheet-handle{margin-top:7px}.v168-export-card>.modal-head{flex:0 0 auto;padding:8px 14px 11px!important}.v168-export-scroll{overflow:auto;-webkit-overflow-scrolling:touch;padding:4px 14px max(18px,env(safe-area-inset-bottom));display:grid;gap:15px}.v168-export-section{display:grid;gap:7px}.v168-export-heading{display:flex;align-items:end;justify-content:space-between;padding:0 2px}.v168-export-heading span{font-size:9px;font-weight:900;letter-spacing:.12em;color:var(--ui-text,var(--text))}.v168-export-heading small{font-size:7.5px;color:var(--ui-muted,var(--muted))}.v168-export-grid{margin:0!important}.v168-export-grid.one{grid-template-columns:1fr!important}.v168-export-grid.one>*{grid-column:1/-1!important}.v168-export-grid .export-import-tile{cursor:pointer}.v168-export-grid .export-import-tile input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.v168-recovery-btn{width:100%;border:1px solid var(--ui-line,var(--line));border-radius:14px;background:var(--ui-surface-2,var(--panel2));color:var(--ui-text,var(--text));min-height:58px;display:grid;grid-template-columns:28px 1fr 12px;align-items:center;text-align:left;gap:8px;padding:9px 12px}.v168-recovery-btn>span{font-size:18px;color:var(--accent)}.v168-recovery-btn strong{display:block;font-size:10px}.v168-recovery-btn small{display:block;color:var(--ui-muted,var(--muted));font-size:7.5px;margin-top:2px}.v168-recovery-btn em{font-style:normal;color:var(--ui-muted,var(--muted));font-size:18px}.v168-backup-note{margin:0 2px;font-size:7.5px;line-height:1.45;color:var(--ui-muted,var(--muted))}.v168-recovery-btn.hidden{display:none!important}
@media(max-width:700px){.v168-export-card{width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important}.v168-export-scroll{padding-left:10px;padding-right:10px;gap:12px}.v168-export-heading{align-items:flex-start;flex-direction:column;gap:2px}.v168-export-grid{grid-template-columns:1fr!important;gap:7px!important}.v168-export-grid button,.v168-export-grid .export-import-tile{min-height:72px!important}.v168-backup-note{font-size:7px}}
body.dark .v168-export-card{background:#181818!important;color:#f5f5f5!important}body.dark .v168-export-grid button,body.dark .v168-export-grid .export-import-tile{background:#222!important;border-color:#3b3b3b!important;color:#f5f5f5!important}body.dark .v168-recovery-btn{background:#202020!important;border-color:#3b3b3b!important;color:#f5f5f5!important}

/* ==========================================================
   v169 — APP-WIDE POLISH & RELEASE HARDENING
   Geometry-neutral consistency and mobile stability only.
   ========================================================== */
html.v169-release-hardened,
html.v169-release-hardened body{
  max-width:100%;
  overscroll-behavior-x:none;
}
html.v169-release-hardened body{overflow-x:clip}
html.v169-release-hardened #main,
html.v169-release-hardened .modal,
html.v169-release-hardened .drawer{overscroll-behavior-x:none}

/* Scrollable sheets stop at their own edges instead of chaining into the
   scorecard behind them. This does not change sheet height or positioning. */
html.v169-release-hardened .modal-card,
html.v169-release-hardened .v168-export-scroll,
html.v169-release-hardened .v162-detail-scroll,
html.v169-release-hardened .v161-event-list,
html.v169-release-hardened .v165-game-history{
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

/* Consistent keyboard focus without adding permanent outlines for touch. */
html.v169-release-hardened :where(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid color-mix(in srgb,var(--accent,#3182f6) 72%,white 28%);
  outline-offset:2px;
}
html.v169-release-hardened :where(button,input,select,textarea):disabled{
  opacity:.48!important;
  cursor:not-allowed!important;
  filter:saturate(.65);
}

/* Avoid accidental text/layout overflow from long player names, venue names,
   memory titles, and imported metadata. */
html.v169-release-hardened :where(.card,.modal-card,.team-scorebook-head,.v161-event-card,.v167-standout,.v165-game-card) *{
  min-width:0;
}
html.v169-release-hardened :where(.player-name,.v161-player,.v167-standout b,.v165-game-card strong,.memory-title,.game-location){
  overflow-wrap:anywhere;
}

/* Existing empty states now share the same readable density. */
html.v169-release-hardened :where(.library-empty,.saved-games-empty,.v140-empty,.v167-empty-recap){
  text-align:center;
  line-height:1.4;
}
html.v169-release-hardened :where(.library-empty,.saved-games-empty,.v140-empty) p{
  max-width:46ch;
  margin-left:auto;
  margin-right:auto;
}

/* Mobile touch polish. Do not alter dimensions of score cells/pitch markers. */
@media (hover:none) and (pointer:coarse){
  html.v169-release-hardened :where(button,a,[role="button"]){
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  html.v169-release-hardened :where(input,select,textarea){font-size:max(16px,1em)}
}

/* Keep new Phase 7 surfaces on the same dark-mode alias as the rest of the app. */
body.dark-mode .v168-export-card{background:#181818!important;color:#f5f5f5!important}
body.dark-mode .v168-export-grid button,
body.dark-mode .v168-export-grid .export-import-tile{background:#222!important;border-color:#3b3b3b!important;color:#f5f5f5!important}
body.dark-mode .v168-recovery-btn{background:#202020!important;border-color:#3b3b3b!important;color:#f5f5f5!important}

@media(prefers-reduced-motion:reduce){
  html.v169-release-hardened *,
  html.v169-release-hardened *::before,
  html.v169-release-hardened *::after{
    scroll-behavior:auto!important;
  }
}


/* ==========================================================
   v169.1 — UI CLEANUP + OPTION B ICONS
   - Dark-mode New Game parity
   - Minimal premium-stroke collapse / refresh / plus / undo icons
   - Content-fitted More sheet
   - Full-logo safety treatment
   ========================================================== */
.v1691-stroke-icon,
.v1691-nav-icon svg{
  width:22px;height:22px;display:block;fill:none;stroke:currentColor;
  stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
}
.section-collapse{
  width:44px!important;height:44px!important;flex:0 0 44px!important;
  border:0!important;background:transparent!important;box-shadow:none!important;
  color:var(--ui-text,var(--text))!important;padding:0!important;
}
.section-collapse .v1691-stroke-icon{width:20px;height:20px;transition:transform .16s ease}
.section-collapse.is-collapsed .v1691-stroke-icon{transform:rotate(180deg)}
.refresh-mini{
  width:40px!important;height:40px!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;color:var(--accent)!important;
  display:grid!important;place-items:center!important;padding:0!important;
}
.refresh-mini .v1691-stroke-icon{width:21px;height:21px}
.add-pitcher-btn{
  width:40px!important;height:40px!important;min-height:40px!important;border:0!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
  color:var(--accent)!important;display:grid!important;place-items:center!important;padding:0!important;
}
.add-pitcher-btn .v1691-stroke-icon{width:23px;height:23px}
#mobileUndo .v1691-nav-icon{display:grid;place-items:center;line-height:1}
#mobileUndo .v1691-nav-icon svg{width:25px;height:25px;stroke-width:1.75}

/* New Game: explicit true dark-mode surfaces instead of inherited light setup UI. */
body.dark-mode #modeModal .setup-card{
  background:#191b1f!important;color:#f4f6f8!important;border-color:#3b4048!important;
  box-shadow:0 -18px 44px rgba(0,0,0,.5)!important;
}
body.dark-mode #modeModal .modal-head{background:#191b1f!important;border-bottom-color:#343942!important}
body.dark-mode #modeModal .modal-head strong,
body.dark-mode #modeModal .setup-heading strong,
body.dark-mode #modeModal .setup-matchup-preview strong,
body.dark-mode #modeModal .setup-ready-card strong{color:#f7f8fa!important}
body.dark-mode #modeModal .modal-head small,
body.dark-mode #modeModal .setup-heading small,
body.dark-mode #modeModal .setup-matchup label,
body.dark-mode #modeModal .setup-details-grid label,
body.dark-mode #modeModal .setup-matchup-preview small,
body.dark-mode #modeModal .setup-progress span,
body.dark-mode #modeModal .setup-card .mode-copy p,
body.dark-mode #modeModal .setup-card .mode-option>em{color:#aeb4bd!important}
body.dark-mode #modeModal .modal-head button,
body.dark-mode #modeModal .setup-progress span,
body.dark-mode #modeModal .setup-card .mode-option,
body.dark-mode #modeModal .setup-matchup select,
body.dark-mode #modeModal .setup-details-grid input,
body.dark-mode #modeModal #setupSwapTeams,
body.dark-mode #modeModal .setup-matchup-preview,
body.dark-mode #modeModal .setup-ready-card,
body.dark-mode #modeModal .setup-actions button:not(.primary){
  background:#23262b!important;color:#f4f6f8!important;border-color:#41464f!important;
  box-shadow:none!important;
}
body.dark-mode #modeModal .setup-progress span.active,
body.dark-mode #modeModal .setup-card .mode-option.selected{
  background:#202a39!important;border-color:#4d8fef!important;color:#f7f9fc!important;
}
body.dark-mode #modeModal .setup-progress span.active b,
body.dark-mode #modeModal .setup-progress span.done b{
  background:#e8edf5!important;border-color:#e8edf5!important;color:#11151b!important;
}
body.dark-mode #modeModal .setup-actions{background:#191b1f!important;border-top-color:#343942!important}
body.dark-mode #modeModal .setup-actions .primary{
  background:#1769d2!important;border-color:#2f82f3!important;color:#fff!important;
}
body.dark-mode #modeModal select,
body.dark-mode #modeModal input{color-scheme:dark!important}
body.dark-mode #modeModal select option{background:#23262b!important;color:#f4f6f8!important}

/* Full-logo sources have a normalized transparent safety canvas. Never crop them again in UI. */
img[src*="assets/logos-full/"]{
  object-fit:contain!important;object-position:center!important;clip-path:none!important;
  mask:none!important;overflow:visible!important;background:transparent!important;
}
.setup-matchup-preview img[src*="assets/logos-full/"],
.team-logo[src*="assets/logos-full/"],
.team-header-logo[src*="assets/logos-full/"],
.matchup-team img[src*="assets/logos-full/"]{padding:1px!important}

/* Two levels of destructive cleanup: plays only, then the entire current scorecard. */
#drawer .v1691-clear-plays{margin-top:7px!important}
#drawer .v1691-clear-plays + #drawerClearBtn{margin-top:7px!important}
body.dark-mode #drawer .v1691-clear-plays{background:#251c1b!important;border-color:#603431!important}

/* More is a bottom-anchored, content-fitted sheet on phones. It grows only
   until it reaches the available viewport, then its own content scrolls. */
@media(max-width:600px){
  #drawer.v90-more-sheet,
  #drawer.v101-more-sheet{
    top:auto!important;
    bottom:calc(78px + env(safe-area-inset-bottom))!important;
    height:max-content!important;
    min-height:0!important;
    max-height:calc(100dvh - 94px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    overflow-y:auto!important;
    border-radius:22px!important;
  }
}


/* ==========================================================
   v169.2 — CORRECTIVE UI HOTFIX
   Fixes v169.1 regressions seen on iPhone.
   ========================================================== */

/* Option B means a visible stroke icon only. Keep the touch target, remove
   every inherited visible container/background from older Default styles. */
body.theme-default:not(.home-page) .section-collapse,
body.theme-default.dark-mode:not(.home-page) .section-collapse,
body:not(.home-page) .section-collapse{
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;flex:0 0 36px!important;
  margin-left:auto!important;padding:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;outline-offset:2px!important;color:var(--ui-text,var(--text))!important;
  appearance:none!important;-webkit-appearance:none!important;
}
body.theme-default:not(.home-page) .section-collapse::before,
body.theme-default:not(.home-page) .section-collapse::after{display:none!important;content:none!important}
body.theme-default:not(.home-page) .section-collapse .v1691-stroke-icon{
  width:20px!important;height:20px!important;stroke-width:1.9!important;
}
body.theme-default:not(.home-page) .refresh-mini,
body.theme-default.dark-mode:not(.home-page) .refresh-mini{
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;appearance:none!important;-webkit-appearance:none!important;
  color:var(--accent)!important;
}
body.theme-default:not(.home-page) .refresh-mini::before,
body.theme-default:not(.home-page) .refresh-mini::after{display:none!important;content:none!important}
body.theme-default:not(.home-page) .pitch-pane .add-pitcher-btn,
body.theme-default.dark-mode:not(.home-page) .pitch-pane .add-pitcher-btn{
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;appearance:none!important;-webkit-appearance:none!important;
  color:var(--accent)!important;
}
body.theme-default:not(.home-page) .pitch-pane .add-pitcher-btn::before,
body.theme-default:not(.home-page) .pitch-pane .add-pitcher-btn::after{display:none!important;content:none!important}
body.theme-default:not(.home-page) .refresh-mini .v1691-stroke-icon{width:21px!important;height:21px!important}
body.theme-default:not(.home-page) .pitch-pane .add-pitcher-btn .v1691-stroke-icon{width:22px!important;height:22px!important}

/* The setup wizard now carries its own dark-state class so Safari/body-class
   timing cannot leave a light sheet on top of a dark game. */
#modeModal.v1692-dark .setup-card,
#modeModal.v1692-dark .modal-card{
  --panel:#191b1f;--panel2:#23262b;--line:#41464f;--text:#f4f6f8;--muted:#aeb4bd;
  --ui-surface:#191b1f;--ui-surface-2:#23262b;--ui-line:#41464f;--ui-text:#f4f6f8;--ui-muted:#aeb4bd;
  background:#191b1f!important;color:#f4f6f8!important;border-color:#3b4048!important;
  box-shadow:0 -18px 44px rgba(0,0,0,.5)!important;
}
#modeModal.v1692-dark .modal-head,
#modeModal.v1692-dark .setup-actions{background:#191b1f!important;border-color:#343942!important}
#modeModal.v1692-dark :where(.modal-head strong,.setup-heading strong,.setup-matchup-preview strong,.setup-ready-card strong,.mode-copy strong){color:#f7f8fa!important}
#modeModal.v1692-dark :where(.modal-head small,.setup-heading small,.setup-matchup label,.setup-details-grid label,.setup-matchup-preview small,.setup-progress span,.mode-copy p,.mode-option>em){color:#aeb4bd!important}
#modeModal.v1692-dark :where(.modal-head button,.setup-progress span,.mode-option,.setup-matchup select,.setup-details-grid input,#setupSwapTeams,.setup-matchup-preview,.setup-ready-card,.setup-actions button:not(.primary)){
  background:#23262b!important;color:#f4f6f8!important;border-color:#41464f!important;box-shadow:none!important;
}
#modeModal.v1692-dark .mode-option.selected,
#modeModal.v1692-dark .setup-progress span.active{background:#202a39!important;border-color:#4d8fef!important;color:#f7f9fc!important}
#modeModal.v1692-dark .setup-progress span.active b,
#modeModal.v1692-dark .setup-progress span.done b{background:#e8edf5!important;border-color:#e8edf5!important;color:#11151b!important}
#modeModal.v1692-dark .setup-actions .primary{background:#1769d2!important;border-color:#2f82f3!important;color:#fff!important}
#modeModal.v1692-dark :where(select,input){color-scheme:dark!important}
#modeModal.v1692-dark select option{background:#23262b!important;color:#f4f6f8!important}
#modeModal.v1692-dark .sheet-handle{background:#656a72!important}

/* Native iOS selects need a compact label. The preview below carries the full
   team name, so the control no longer needs to squeeze city + mascot + abbr. */
#modeModal .setup-matchup select{
  min-width:0!important;max-width:100%!important;font-size:16px!important;font-weight:800!important;
  padding-left:10px!important;padding-right:30px!important;text-overflow:ellipsis!important;overflow:hidden!important;
}
#modeModal .setup-matchup label{min-width:0!important}
@media(max-width:430px){
  #modeModal .setup-matchup{grid-template-columns:minmax(0,1fr) 50px minmax(0,1fr)!important;gap:6px!important}
  #modeModal .setup-matchup select{font-size:15px!important;padding-left:8px!important;padding-right:25px!important}
  #modeModal #setupSwapTeams{width:50px!important;min-width:50px!important}
}

/* Official MLB SVGs are complete assets; don't crop or enlarge them. */
img[src*="mlbstatic.com/team-logos/"]{
  object-fit:contain!important;object-position:center!important;clip-path:none!important;mask:none!important;
  overflow:visible!important;background:transparent!important;
}
.setup-matchup-preview img[src*="mlbstatic.com/team-logos/"]{padding:2px!important}
.team-logo[src*="mlbstatic.com/team-logos/"]{padding:2px!important}

/* ==========================================================
   v169.3 — USER-REPORTED LAYOUT CORRECTIONS
   1) Summary score/name spacing
   2) Light-mode setup step-number contrast
   3) Cleaner centered Scorecard matchup selector
   ========================================================== */

/* Game Summary: reserve breathing room around the score so longer team names
   never visually run into 1–0 / 3–2 / etc. */
.summary-hero{
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  column-gap:28px!important;
  padding-left:18px!important;
  padding-right:18px!important;
}
.summary-team{min-width:0!important;gap:11px!important}
.summary-team span{
  display:block!important;
  min-width:0!important;
  line-height:1.12!important;
  overflow-wrap:normal!important;
}
.summary-score{
  min-width:max-content!important;
  padding-inline:6px!important;
  white-space:nowrap!important;
}
@media(max-width:600px){
  .summary-hero{column-gap:14px!important;padding-left:12px!important;padding-right:12px!important}
  .summary-team{gap:7px!important}
  .summary-score{padding-inline:3px!important}
}

/* New Game / Light Mode: selected and completed step circles use a dark fill,
   therefore the numeral must be white. This deliberately does not touch the
   dark-mode setup treatment from v169.2. */
#modeModal:not(.v1692-dark) .setup-progress span.active b,
#modeModal:not(.v1692-dark) .setup-progress span.done b,
body:not(.dark-mode) #modeModal .setup-progress span.active b,
body:not(.dark-mode) #modeModal .setup-progress span.done b{
  background:#111317!important;
  border-color:#111317!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  opacity:1!important;
}

/* Scorecard matchup selector: one clean horizontal hierarchy. TEAM 1 / TEAM 2
   labels are removed in markup; each logo + selector is centered around VS. */
body:not(.home-page) .matchup-selector.v1693-matchup-selector{
  grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr)!important;
  align-items:center!important;
  gap:18px!important;
  padding:16px 22px!important;
}
body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team{
  display:grid!important;
  grid-template-columns:64px minmax(0,220px)!important;
  grid-template-rows:1fr!important;
  justify-content:center!important;
  align-items:center!important;
  gap:14px!important;
  min-width:0!important;
  padding:0!important;
  border-radius:0!important;
}
body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team img{
  grid-row:auto!important;
  width:60px!important;
  height:60px!important;
  padding:2px!important;
  object-fit:contain!important;
}
body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team select{
  width:100%!important;
  min-width:0!important;
  height:46px!important;
  padding:0 28px 0 4px!important;
  font-size:15px!important;
  line-height:1.1!important;
  text-align:center!important;
  text-align-last:center!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body:not(.home-page) .matchup-selector.v1693-matchup-selector .versus-mark{
  align-self:center!important;
  justify-self:center!important;
  font-size:15px!important;
  letter-spacing:.14em!important;
  line-height:1!important;
}
@media(max-width:600px){
  body:not(.home-page) .matchup-selector.v1693-matchup-selector{
    grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr)!important;
    gap:7px!important;
    padding:11px 9px!important;
  }
  body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team{
    grid-template-columns:40px minmax(0,1fr)!important;
    gap:6px!important;
  }
  body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team img{
    width:40px!important;height:40px!important;padding:1px!important;
  }
  body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team select{
    height:38px!important;
    padding-left:1px!important;
    padding-right:18px!important;
    font-size:10px!important;
    letter-spacing:-.01em!important;
  }
  body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team select.team-name-long{font-size:9px!important}
  body:not(.home-page) .matchup-selector.v1693-matchup-selector .matchup-team select.team-name-xlong{font-size:8px!important}
  body:not(.home-page) .matchup-selector.v1693-matchup-selector .versus-mark{font-size:11px!important}
}

/* ==========================================================
   v169.4 — MOBILE GAME SUMMARY MATCHUP BALANCE
   Keep the score truly centered and prevent full team names from
   crowding it on phone-sized layouts.
   ========================================================== */
.summary-hero{
  grid-template-columns:minmax(0,1fr) 104px minmax(0,1fr)!important;
  column-gap:18px!important;
  align-items:center!important;
}
.summary-hero .summary-team{
  min-width:0!important;
  width:100%!important;
}
.summary-hero .summary-team:first-child{
  justify-content:flex-start!important;
  padding-right:6px!important;
}
.summary-hero .summary-team.right{
  justify-content:flex-end!important;
  padding-left:6px!important;
}
.summary-hero .summary-team span{
  min-width:0!important;
  max-width:100%!important;
  font-size:clamp(13px,2.2vw,18px)!important;
  line-height:1.08!important;
  text-wrap:balance!important;
}
.summary-hero .summary-team:first-child span{text-align:left!important}
.summary-hero .summary-team.right span{text-align:right!important}
.summary-hero .summary-score{
  width:104px!important;
  min-width:104px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  padding:0!important;
  font-variant-numeric:tabular-nums!important;
  text-align:center!important;
}
.summary-hero .summary-score span{
  margin:0!important;
  flex:0 0 auto!important;
}

@media(max-width:600px){
  .summary-hero{
    grid-template-columns:minmax(0,1fr) 92px minmax(0,1fr)!important;
    column-gap:10px!important;
    padding:14px 12px!important;
  }
  .summary-hero .summary-team{gap:6px!important}
  .summary-hero .summary-team img{
    width:38px!important;
    height:38px!important;
    flex:0 0 38px!important;
  }
  .summary-hero .summary-team span{
    font-size:15px!important;
    line-height:1.08!important;
  }
  .summary-hero .summary-score{
    width:92px!important;
    min-width:92px!important;
    font-size:25px!important;
    gap:7px!important;
  }
}

@media(max-width:390px){
  .summary-hero{
    grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding-inline:10px!important;
  }
  .summary-hero .summary-team img{
    width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }
  .summary-hero .summary-team span{font-size:13.5px!important}
  .summary-hero .summary-score{
    width:82px!important;
    min-width:82px!important;
    font-size:23px!important;
    gap:6px!important;
  }
}

/* ==========================================================
   v169.5 — Mobile Game Summary line score
   1–9 by default; extras appear only once reached.
   Team + R/H/E remain readable while inning columns scroll.
   ========================================================== */
.basic-summary-workspace .summary-line-card{overflow:hidden}
.basic-summary-workspace .summary-line-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  padding:10px 12px 12px;
}
.basic-summary-workspace .summary-line-scroll::-webkit-scrollbar{display:none}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  width:max-content!important;
  min-width:100%!important;
  table-layout:fixed;
  margin:0 auto;
}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table th,
.basic-summary-workspace .summary-line-scroll .v1695-summary-table td{
  min-width:25px!important;
  width:25px;
  height:34px;
  padding:5px 3px!important;
  border:0!important;
  border-top:1px solid var(--line)!important;
  border-left:1px solid var(--line)!important;
  text-align:center;
  font-size:10px!important;
  line-height:1;
  white-space:nowrap;
  background:var(--panel);
  color:var(--text);
}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table thead th{
  height:32px;
  font-size:9px!important;
  font-weight:850;
  background:var(--panel2);
}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table tr>*:last-child{border-right:1px solid var(--line)!important}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table tbody tr:last-child>*{border-bottom:1px solid var(--line)!important}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-team-col{
  position:sticky;
  left:0;
  z-index:4;
  min-width:48px!important;
  width:48px;
  padding-left:6px!important;
  padding-right:6px!important;
  background:var(--panel2);
  box-shadow:5px 0 9px -9px rgba(0,0,0,.9);
}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table thead .summary-team-col{z-index:7}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-total-col{
  position:sticky;
  z-index:5;
  min-width:28px!important;
  width:28px;
  font-weight:850;
  background:var(--panel2);
}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-e-col{right:0}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-h-col{right:28px}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-r-col{right:56px;box-shadow:-5px 0 9px -9px rgba(0,0,0,.9)}
.basic-summary-workspace .summary-line-scroll .v1695-summary-table thead .summary-total-col{z-index:7}

@media (max-width:430px){
  .basic-summary-workspace .summary-line-scroll{padding:9px 8px 10px}
  .basic-summary-workspace .summary-line-scroll .v1695-summary-table th,
  .basic-summary-workspace .summary-line-scroll .v1695-summary-table td{min-width:24px!important;width:24px;font-size:9.5px!important;padding:4px 2px!important}
  .basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-team-col{min-width:46px!important;width:46px}
  .basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-total-col{min-width:27px!important;width:27px}
  .basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-h-col{right:27px}
  .basic-summary-workspace .summary-line-scroll .v1695-summary-table .summary-r-col{right:54px}
}


/* ==========================================================
   v169.6 — New Game standard primary action
   ========================================================== */
body.theme-default #modeModal .setup-actions :is(#setupContinue,#setupStart):not(:disabled){
 background:linear-gradient(180deg,#1265c6 0%,#0b55b5 100%)!important;
 border-color:#0b55b5!important;
 color:#fff!important;
 box-shadow:0 6px 14px rgba(11,85,181,.20)!important;
}
body.theme-default #modeModal .setup-actions :is(#setupContinue,#setupStart):not(:disabled):active{transform:scale(.99)}
body.theme-default.dark-mode #modeModal .setup-actions :is(#setupContinue,#setupStart):not(:disabled),
body.theme-default #modeModal.v1692-dark .setup-actions :is(#setupContinue,#setupStart):not(:disabled){
 background:linear-gradient(180deg,#2683ed 0%,#1769d2 100%)!important;
 border-color:#2f82f3!important;
 color:#fff!important;
 box-shadow:0 6px 16px rgba(23,105,210,.26)!important;
}
body.theme-default #modeModal .setup-actions :is(#setupContinue,#setupStart):disabled{
 background:#e8edf3!important;border-color:#dfe5ec!important;color:#98a2b3!important;box-shadow:none!important;
}
body.theme-default.dark-mode #modeModal .setup-actions :is(#setupContinue,#setupStart):disabled,
body.theme-default #modeModal.v1692-dark .setup-actions :is(#setupContinue,#setupStart):disabled{
 background:#2a2d32!important;border-color:#3b4048!important;color:#777f8b!important;
}

/* Longer notation fitting on score-grid cells. */
.play-entry .play-code.notation-micro{font-size:4.9px!important;max-width:78%!important;line-height:.9!important;white-space:nowrap!important;letter-spacing:-.02em!important;text-align:right!important}
.play-entry .play-code.notation-nano{font-size:4.0px!important;max-width:92%!important;line-height:.88!important;white-space:nowrap!important;letter-spacing:-.04em!important;text-align:right!important}
.play-entry .standalone-out.notation-micro{font-size:11px!important;letter-spacing:-.03em!important;white-space:nowrap!important}
.play-entry .standalone-out.notation-nano{font-size:8.5px!important;letter-spacing:-.05em!important;white-space:nowrap!important}
.play-entry .rbi-code.notation-micro{font-size:4.3px!important}.play-entry .rbi-code.notation-nano{font-size:3.8px!important}
@media(max-width:600px){
 .play-entry .play-code.notation-micro{font-size:4.5px!important}.play-entry .play-code.notation-nano{font-size:3.7px!important}
 .play-entry .standalone-out.notation-micro{font-size:10px!important}.play-entry .standalone-out.notation-nano{font-size:7.8px!important}
}

/* ==========================================================
   v169.7 — stacked long defensive notation in scoregrid
   ========================================================== */
.play-entry .play-code.notation-stacked{
 right:2px!important;bottom:2px!important;width:58%!important;max-width:58%!important;height:auto!important;
 display:grid!important;gap:0!important;white-space:normal!important;overflow:visible!important;
 font-size:6.1px!important;line-height:1.04!important;letter-spacing:-.01em!important;text-align:center!important;
}
.play-entry .play-code.notation-stack-3{font-size:5.7px!important;width:62%!important;max-width:62%!important}
.play-entry .standalone-out.notation-stacked{
 display:grid!important;gap:0!important;max-width:90%!important;margin:auto!important;white-space:normal!important;
 font-size:10.5px!important;line-height:1.02!important;letter-spacing:-.015em!important;text-align:center!important;
}
.play-entry .standalone-out.notation-stack-3{font-size:9.3px!important}
.v1697-notation-line{display:block!important;white-space:nowrap!important;min-width:0!important}
@media(max-width:430px){
 .play-entry .play-code.notation-stacked{font-size:5.8px!important;width:62%!important;max-width:62%!important}
 .play-entry .play-code.notation-stack-3{font-size:5.3px!important;width:66%!important;max-width:66%!important}
 .play-entry .standalone-out.notation-stacked{font-size:9.8px!important}
 .play-entry .standalone-out.notation-stack-3{font-size:8.8px!important}
}


/* v170 — simplified scoring-style architecture */
#modeModal .v170-mode-options{gap:12px!important}
#modeModal .v170-mode-options .mode-option{min-height:112px!important}
#modeModal .v170-mode-options .mode-copy p{max-width:62ch!important}
@media(min-width:760px){
  #modeModal .v170-mode-options{grid-template-columns:1fr 1fr!important}
  #modeModal .v170-mode-options .mode-option{grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-content:center!important}
  #modeModal .v170-mode-options .mode-option>em{grid-column:2;justify-self:start;margin-top:5px}
}

/* ==========================================================
   v171 — Assist Mode
   ========================================================== */
.v171-assist-setting{align-items:flex-start!important;gap:12px!important}
.v171-assist-setting>span{display:flex;flex-direction:column;gap:3px;min-width:0}
.v171-assist-setting>span b{font-size:14px;line-height:1.15;font-weight:800;color:var(--text,#141414)}
.v171-assist-setting>span small{display:block;font-size:12px;line-height:1.35;color:var(--muted,#6b7280);font-weight:500}
.v171-setup-assist{display:flex;align-items:flex-start;gap:12px;margin:14px 0 12px;padding:14px 15px;border:1px solid var(--line,#d5d7db);border-radius:16px;background:var(--surface,#fff);cursor:pointer}
.v171-setup-assist input{width:20px;height:20px;flex:0 0 auto;margin-top:1px;accent-color:#1677e8}
.v171-setup-assist span{display:flex;flex-direction:column;gap:3px;min-width:0}
.v171-setup-assist b{font-size:14px;line-height:1.2}
.v171-setup-assist small{font-size:12px;line-height:1.35;color:var(--muted,#6b7280)}
.v171-assist-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:11px 12px;border:1px solid rgba(22,119,232,.34);border-radius:14px;background:rgba(22,119,232,.075)}
.v171-assist-strip>div{min-width:0;display:flex;align-items:center;gap:9px;flex:1}
.v171-assist-badge{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:#1677e8;color:#fff;font-size:10px;font-weight:900;letter-spacing:.06em}
.v171-assist-strip p{margin:0;min-width:0;font-size:11px;line-height:1.35;color:var(--muted,#5f6368);font-weight:650}
.v171-assist-strip>button{flex:0 0 auto;min-height:34px;padding:0 10px;border:1px solid rgba(22,119,232,.4);border-radius:10px;background:transparent;color:#1677e8;font-size:11px;font-weight:850}
.v171-assist-strip.is-off{border-color:var(--line,#d5d7db);background:var(--surface-soft,#f7f7f8)}
.v171-assist-strip.is-off .v171-assist-badge{background:#686b70}
.v171-assist-strip.is-off>button{border-color:var(--line,#cfd2d6);color:var(--text,#171717)}
.v171-runner-assist{grid-column:1/-1;display:flex;flex-direction:column;gap:5px;padding:9px 10px;margin:-2px 0 7px;border-radius:11px;border:1px solid rgba(22,119,232,.26);background:rgba(22,119,232,.06)}
.v171-runner-assist>span{font-size:9px;font-weight:900;letter-spacing:.08em;color:#1677e8}
.v171-runner-assist>b{font-size:12px;line-height:1.15}
.v171-runner-assist>small{font-size:10px;line-height:1.3;color:var(--muted,#6b7280)}
.v171-runner-assist>div{display:flex;align-items:center;justify-content:space-between;gap:10px}
.v171-runner-assist>div b{font-size:11px}
.v171-runner-assist button{min-height:32px;padding:0 10px;border:0;border-radius:9px;background:#1677e8;color:#fff;font-size:10px;font-weight:850}
.v171-runner-assist.is-required{border-style:dashed}
.v149-runner-card.v171-assist-prefilled{box-shadow:inset 3px 0 0 #1677e8}
body.dark .v171-assist-setting>span b,body.dark-mode .v171-assist-setting>span b{color:#f4f6f8}
body.dark .v171-setup-assist,body.dark-mode .v171-setup-assist{background:#1f2023;border-color:#3a3d42}
body.dark .v171-setup-assist small,body.dark-mode .v171-setup-assist small{color:#aeb4bd}
body.dark .v171-assist-strip,body.dark-mode .v171-assist-strip{background:rgba(49,145,255,.11);border-color:rgba(49,145,255,.34)}
body.dark .v171-assist-strip p,body.dark-mode .v171-assist-strip p{color:#b7bdc7}
body.dark .v171-assist-strip.is-off,body.dark-mode .v171-assist-strip.is-off{background:#202124;border-color:#3a3d42}
body.dark .v171-assist-strip.is-off>button,body.dark-mode .v171-assist-strip.is-off>button{color:#f3f4f6;border-color:#4b4e54}
body.dark .v171-runner-assist,body.dark-mode .v171-runner-assist{background:rgba(49,145,255,.1);border-color:rgba(49,145,255,.3)}
body.dark .v171-runner-assist>small,body.dark-mode .v171-runner-assist>small{color:#aeb4bd}
@media(max-width:560px){.v171-assist-strip{align-items:flex-start}.v171-assist-strip>div{align-items:flex-start;flex-direction:column;gap:5px}.v171-assist-strip p{font-size:10px}.v171-runner-assist>div{align-items:flex-start}.v171-runner-assist button{flex:0 0 auto}}


/* ==========================================================
   v172 — Guided / Freeform scoring
   ========================================================== */
.v172-setup-guardrails{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px;padding:14px 15px;border:1px solid var(--line,#d5d7db);border-radius:16px;background:var(--surface,#fff)}
.v172-setup-guardrails>span{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.v172-setup-guardrails b{font-size:14px;line-height:1.2}.v172-setup-guardrails small,.v172-setting-disclosure{font-size:12px;line-height:1.35;color:var(--muted,#6b7280)}
.v172-setup-guardrails select{flex:0 0 112px;min-height:42px;border-radius:11px;border:1px solid var(--line,#d5d7db);background:var(--panel,#fff);color:var(--text,#151515);font-weight:800;padding:0 9px}
.v172-setting-disclosure{display:block;margin-top:5px;font-weight:500}
.v172-guardrail-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:11px 12px;border-radius:14px;border:1px solid var(--line,#d5d7db);background:var(--surface-soft,#f7f7f8)}
.v172-guardrail-strip>div{display:flex;align-items:center;gap:9px;min-width:0;flex:1}.v172-guardrail-strip p{margin:0;font-size:11px;line-height:1.35;color:var(--muted,#60646b);font-weight:650}.v172-guardrail-strip p b{color:var(--text,#181818)}
.v172-guardrail-badge{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:#59606a;color:#fff;font-size:10px;font-weight:900;letter-spacing:.055em}.v172-guardrail-strip>button{flex:0 0 auto;min-height:34px;padding:0 10px;border-radius:10px;border:1px solid var(--line,#cfd2d6);background:transparent;color:var(--text,#171717);font-size:11px;font-weight:850}
.v172-guardrail-strip.is-freeform{border-color:rgba(208,139,18,.42);background:rgba(230,159,29,.09)}.v172-guardrail-strip.is-freeform .v172-guardrail-badge{background:#a56600}.v172-guardrail-strip.is-freeform>button{border-color:rgba(183,119,11,.45);color:#8a5600}
.v172-freeform-disclosure{display:flex;align-items:flex-start;gap:11px;margin:12px 0;padding:12px 13px;border-radius:14px;border:1px solid rgba(205,136,17,.42);background:rgba(230,159,29,.09)}.v172-freeform-disclosure>span{display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:#a56600;color:#fff;font-weight:950;flex:0 0 auto}.v172-freeform-disclosure>div{display:flex;flex-direction:column;gap:3px;min-width:0}.v172-freeform-disclosure strong{font-size:11px;letter-spacing:.055em;color:var(--text,#171717)}.v172-freeform-disclosure small{font-size:11px;line-height:1.35;color:var(--muted,#666)}
.v172-history-freeform{padding:4px 7px;border-radius:999px;background:rgba(213,143,20,.12);border:1px solid rgba(199,128,7,.32);color:#895300;font-size:9px;font-weight:900;letter-spacing:.045em}
body.dark-mode .v172-setup-guardrails{background:#232529;border-color:#454a52}body.dark-mode .v172-setup-guardrails select{background:#2a2d32;border-color:#4c515a;color:#f6f6f6}body.dark-mode .v172-guardrail-strip.is-freeform{background:rgba(209,143,25,.105);border-color:rgba(230,163,42,.34)}body.dark-mode .v172-guardrail-strip.is-freeform .v172-guardrail-badge{background:#b8780a}body.dark-mode .v172-guardrail-strip.is-freeform>button{color:#f0b44f;border-color:rgba(240,180,79,.38)}body.dark-mode .v172-freeform-disclosure{background:rgba(209,143,25,.10);border-color:rgba(230,163,42,.32)}body.dark-mode .v172-freeform-disclosure>span{background:#b8780a}body.dark-mode .v172-history-freeform{background:rgba(222,155,38,.12);border-color:rgba(235,171,59,.30);color:#efb850}
@media(max-width:430px){.v172-setup-guardrails{align-items:flex-start;flex-direction:column}.v172-setup-guardrails select{width:100%;flex-basis:auto}.v172-guardrail-strip{align-items:flex-start}.v172-guardrail-strip>div{align-items:flex-start;flex-direction:column;gap:5px}.v172-guardrail-strip>button{margin-top:1px}}


/* v172.1 — Freeform warning stacking + per-event Plays audit markers */
#confirmModal.v1721-freeform-confirm{z-index:420!important}
#confirmModal.v1721-freeform-confirm .confirm-card{border-color:rgba(208,139,18,.58)!important;box-shadow:0 -18px 54px rgba(0,0,0,.44)!important}
.v1721-freeform-event{box-shadow:inset 3px 0 0 #b8780a!important}
.v1721-freeform-tag{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;margin-right:6px!important;padding:3px 6px!important;border-radius:999px!important;border:1px solid rgba(184,120,10,.35)!important;background:rgba(222,155,38,.12)!important;color:#895300!important;font-size:9px!important;font-weight:950!important;line-height:1!important;letter-spacing:.055em!important;vertical-align:middle!important}
.v1721-freeform-event-note{display:flex;align-items:flex-start;gap:10px;margin:12px 0;padding:11px 12px;border:1px solid rgba(205,136,17,.40);border-radius:13px;background:rgba(230,159,29,.09)}
.v1721-freeform-event-note>span{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:#a56600;color:#fff;font-size:9px;font-weight:950;letter-spacing:.055em}
.v1721-freeform-event-note>div{display:flex;flex-direction:column;gap:3px;min-width:0}.v1721-freeform-event-note strong{font-size:12px;color:var(--text)}.v1721-freeform-event-note small{font-size:11px;line-height:1.35;color:var(--muted)}
body.dark-mode .v1721-freeform-tag{background:rgba(222,155,38,.14)!important;border-color:rgba(235,171,59,.34)!important;color:#efb850!important}
body.dark-mode .v1721-freeform-event-note{background:rgba(209,143,25,.10);border-color:rgba(230,163,42,.32)}body.dark-mode .v1721-freeform-event-note>span{background:#b8780a}

/* ==========================================================
   v172.2 — FREEFORM WARNING STACK + NEW GAME STEP 3 POLISH
   ========================================================== */

/* The Scorebook play editor intentionally sits at z-index:999 on mobile.
   Freeform confirmation must always be above it while the editor remains open. */
#confirmModal.v1721-freeform-confirm,
#confirmModal.v1722-freeform-confirm{
  z-index:2400!important;
}
#confirmModal.v1721-freeform-confirm:not(.hidden),
#confirmModal.v1722-freeform-confirm:not(.hidden){
  display:grid!important;
  pointer-events:auto!important;
}
#confirmModal.v1721-freeform-confirm .confirm-card,
#confirmModal.v1722-freeform-confirm .confirm-card{
  position:relative!important;
  z-index:1!important;
}

/* Step 3 field containment — iOS date/time controls have large intrinsic widths. */
#modeModal .setup-details-grid>*{min-width:0!important}
#modeModal .setup-details-grid label{min-width:0!important;overflow:hidden!important}
#modeModal .setup-details-grid input{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
#modeModal .setup-details-grid input[type="date"],
#modeModal .setup-details-grid input[type="time"]{
  display:block!important;
}

#modeModal .v1722-setup-options{
  display:grid!important;
  gap:10px!important;
  margin:12px 0 10px!important;
}
#modeModal .v1722-assist-row,
#modeModal .v1722-guardrail-row{
  margin:0!important;
  padding:13px 14px!important;
  min-height:72px!important;
  border:1px solid var(--line,#d5d7db)!important;
  border-radius:14px!important;
  background:var(--panel2,#f7f7f8)!important;
  box-shadow:none!important;
}
#modeModal .v1722-assist-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  cursor:pointer!important;
}
#modeModal .v1722-assist-row>span,
#modeModal .v1722-guardrail-row>span{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  min-width:0!important;
}
#modeModal .v1722-assist-row b,
#modeModal .v1722-guardrail-row b{
  color:var(--text,#151515)!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:900!important;
}
#modeModal .v1722-assist-row small,
#modeModal .v1722-guardrail-row small{
  color:var(--muted,#6b7280)!important;
  font-size:9px!important;
  line-height:1.35!important;
  font-weight:650!important;
}

/* Compact native-feeling Assist switch. */
#modeModal .v1722-assist-row #setupAssistMode{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:46px!important;
  height:28px!important;
  min-width:46px!important;
  min-height:28px!important;
  margin:0!important;
  padding:0!important;
  border-radius:999px!important;
  border:1px solid color-mix(in srgb,var(--text) 22%,var(--line))!important;
  background:color-mix(in srgb,var(--text) 9%,var(--panel))!important;
  position:relative!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:background .18s ease,border-color .18s ease!important;
}
#modeModal .v1722-assist-row #setupAssistMode::after{
  content:""!important;
  position:absolute!important;
  width:22px!important;
  height:22px!important;
  left:2px!important;
  top:2px!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 1px 3px rgba(0,0,0,.28)!important;
  transition:transform .18s ease!important;
}
#modeModal .v1722-assist-row #setupAssistMode:checked{
  background:#1677e8!important;
  border-color:#1677e8!important;
}
#modeModal .v1722-assist-row #setupAssistMode:checked::after{transform:translateX(18px)!important}

#modeModal .v1722-guardrail-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
}
#modeModal .v1722-guardrail-segment{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:3px!important;
  padding:3px!important;
  min-width:184px!important;
  border:1px solid var(--line,#d5d7db)!important;
  border-radius:11px!important;
  background:color-mix(in srgb,var(--text) 5%,var(--panel))!important;
}
#modeModal .v1722-guardrail-segment button{
  min-width:0!important;
  min-height:36px!important;
  padding:0 11px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--muted,#68707a)!important;
  font-size:11px!important;
  font-weight:900!important;
  box-shadow:none!important;
}
#modeModal .v1722-guardrail-segment button.is-selected{
  background:#1677e8!important;
  color:#fff!important;
  box-shadow:0 1px 3px rgba(0,0,0,.16)!important;
}
#modeModal .v1722-hidden-select{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
}
#modeModal .v1722-ready-card{
  margin-top:0!important;
  padding:10px 13px!important;
  gap:2px!important;
  border-radius:13px!important;
  background:color-mix(in srgb,#1677e8 6%,var(--panel2))!important;
  border-color:color-mix(in srgb,#1677e8 28%,var(--line))!important;
}
#modeModal .v1722-ready-card span{font-size:6.5px!important;color:#1677e8!important}
#modeModal .v1722-ready-card strong{font-size:15px!important;line-height:1.18!important}
#modeModal .v1722-ready-card small{font-size:8px!important;line-height:1.25!important}

body.dark-mode #modeModal .v1722-assist-row,
body.dark-mode #modeModal .v1722-guardrail-row,
#modeModal.v1692-dark .v1722-assist-row,
#modeModal.v1692-dark .v1722-guardrail-row{
  background:#222428!important;
  border-color:#41464e!important;
}
body.dark-mode #modeModal .v1722-assist-row b,
body.dark-mode #modeModal .v1722-guardrail-row b,
#modeModal.v1692-dark .v1722-assist-row b,
#modeModal.v1692-dark .v1722-guardrail-row b{color:#f7f8fa!important}
body.dark-mode #modeModal .v1722-assist-row small,
body.dark-mode #modeModal .v1722-guardrail-row small,
#modeModal.v1692-dark .v1722-assist-row small,
#modeModal.v1692-dark .v1722-guardrail-row small{color:#aeb4bd!important}
body.dark-mode #modeModal .v1722-guardrail-segment,
#modeModal.v1692-dark .v1722-guardrail-segment{
  background:#17191c!important;
  border-color:#42464d!important;
}
body.dark-mode #modeModal .v1722-ready-card,
#modeModal.v1692-dark .v1722-ready-card{
  background:rgba(22,119,232,.10)!important;
  border-color:rgba(71,145,235,.34)!important;
}

@media(max-width:430px){
  #modeModal .setup-details-grid{gap:8px!important}
  #modeModal .v1722-assist-row,
  #modeModal .v1722-guardrail-row{min-height:66px!important;padding:11px 12px!important}
  #modeModal .v1722-guardrail-row{grid-template-columns:minmax(0,1fr) 156px!important;gap:8px!important}
  #modeModal .v1722-guardrail-segment{min-width:0!important;width:156px!important}
  #modeModal .v1722-guardrail-segment button{font-size:9.5px!important;padding:0 7px!important}
  #modeModal .v1722-assist-row small,
  #modeModal .v1722-guardrail-row small{font-size:8.2px!important}
}
@media(max-width:360px){
  #modeModal .v1722-guardrail-row{grid-template-columns:1fr!important}
  #modeModal .v1722-guardrail-segment{width:100%!important}
}

/* v173.1 FINAL CASCADE — compact sheet and iOS field containment. */
#modeModal .setup-card{
  height:auto!important;
  max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)))!important;
  overflow:hidden!important;
}
#modeModal .setup-step.active{flex:0 1 auto!important;min-height:0!important;overflow:visible!important}
#modeModal .setup-actions{position:static!important;flex:0 0 auto!important;margin-top:8px!important}
#modeModal .setup-details-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
#modeModal .setup-details-grid label{min-width:0!important}
#modeModal .setup-details-grid input{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#modeModal input[type="date"],#modeModal input[type="time"]{
  -webkit-appearance:none!important;
  appearance:none!important;
  text-align:left!important;
}
@media(max-width:760px){
  #modeModal .setup-step[data-setup-step="1"].active,
  #modeModal .setup-step[data-setup-step="2"].active{min-height:0!important}
}

/* v173.2 FINAL CASCADE — clear field labels and consistent centered values. */
#modeModal .setup-details-grid label > span{
  display:block!important;
  width:100%!important;
  margin:0 0 5px!important;
}
#modeModal .setup-details-grid input{
  text-align:center!important;
  text-align-last:center!important;
}
#modeModal .setup-details-grid input::placeholder{
  text-align:center!important;
}
#modeModal input[type="date"],
#modeModal input[type="time"]{
  text-align:center!important;
  text-align-last:center!important;
}

/* ==========================================================
   v174 — PERSONAL / MLB GAME SOURCE FOUNDATION
   ========================================================== */
#modeModal .v174-setup-progress{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
#modeModal .v174-setup-progress span{min-width:0!important;padding:7px 5px!important}
#modeModal .v174-setup-progress em{font-size:8px!important;white-space:nowrap!important}
#modeModal .v174-setup-progress b{width:26px!important;height:26px!important;font-size:10px!important}
#modeModal .v174-source-options{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
#modeModal .v174-source-option{
  display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;
  min-width:0!important;min-height:120px!important;padding:14px!important;border:1px solid var(--line)!important;border-radius:16px!important;
  background:var(--panel2)!important;color:var(--text)!important;text-align:left!important;box-shadow:none!important;
}
#modeModal .v174-source-option.selected{border:2px solid var(--text)!important;background:color-mix(in srgb,var(--text) 4%,var(--panel2))!important}
#modeModal .v174-source-icon{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border:1px solid var(--line)!important;border-radius:12px!important;font-size:15px!important;font-weight:1000!important;background:var(--panel)!important}
#modeModal .v174-source-option>span:nth-child(2){display:grid!important;gap:2px!important;min-width:0!important}
#modeModal .v174-source-option strong{font-size:16px!important;line-height:1.05!important}
#modeModal .v174-source-option small{font-size:9px!important;font-weight:850!important}
#modeModal .v174-source-option p{margin:4px 0 0!important;font-size:8.5px!important;line-height:1.3!important;color:var(--muted)!important}
#modeModal .v174-source-option>em{font-size:6.5px!important;font-style:normal!important;font-weight:950!important;letter-spacing:.08em!important;border:1px solid var(--line)!important;border-radius:999px!important;padding:5px 7px!important;white-space:nowrap!important}
#modeModal .v174-personal-matchup{display:grid!important;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr)!important;gap:10px!important;align-items:end!important}
#modeModal .v174-personal-matchup.hidden,#modeModal .v174-mlb-matchup.hidden{display:none!important}
#modeModal .v174-personal-matchup label{display:grid!important;gap:5px!important;min-width:0!important}
#modeModal .v174-personal-matchup label>span{font-size:10px!important;font-weight:900!important;color:var(--muted)!important}
#modeModal .v174-personal-matchup label>span small{font-size:6.5px!important;letter-spacing:.08em!important}
#modeModal .v174-personal-matchup input{width:100%!important;min-width:0!important;box-sizing:border-box!important;text-align:center!important;font-weight:850!important}
#modeModal #setupSwapPersonalTeams{min-width:58px!important;height:58px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--panel2)!important;color:var(--text)!important;font-size:18px!important;display:grid!important;place-items:center!important;align-content:center!important;gap:1px!important}
#modeModal #setupSwapPersonalTeams small{font-size:6.5px!important;font-weight:850!important;color:var(--muted)!important}
#modeModal .v174-lineup-note{margin:8px 0 0!important;padding:8px 10px!important;border-radius:10px!important;background:color-mix(in srgb,#1677e8 5%,var(--panel2))!important;color:var(--muted)!important;font-size:8px!important;line-height:1.3!important}
#modeModal .setup-step[data-setup-step="4"].active{overflow:visible!important}

.v174-personal-selector .matchup-team{border:0!important;background:transparent!important;color:inherit!important;display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;text-align:left!important;padding:0!important}
.v174-personal-selector .matchup-team:last-child{text-align:right!important;justify-content:flex-end!important}
.v174-personal-selector .matchup-team img{flex:0 0 auto!important}
.v174-personal-selector .matchup-team span{display:grid!important;min-width:0!important}
.v174-personal-selector .matchup-team strong{font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v174-personal-selector .matchup-team small{font-size:7px!important;color:var(--muted)!important}
.v174-personal-info-teams{display:grid!important;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr)!important;gap:8px!important;align-items:end!important;margin-bottom:8px!important}
.v174-personal-info-teams label{display:grid!important;gap:4px!important;min-width:0!important}
.v174-personal-info-teams label small{font-size:7px!important;font-weight:900!important;color:var(--muted)!important;letter-spacing:.08em!important}
.v174-personal-info-teams input{width:100%!important;min-width:0!important;text-align:center!important;box-sizing:border-box!important}
.v174-personal-info-teams>span{align-self:center!important;text-align:center!important;font-size:9px!important;font-weight:950!important;color:var(--muted)!important}
.v174-personal-team-preview{display:grid!important;grid-template-columns:1fr auto 1fr!important;gap:8px!important;align-items:center!important;margin:0 0 10px!important;padding:7px 9px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--panel2)!important}
.v174-personal-team-preview span{font-size:11px!important;font-weight:950!important;text-align:center!important}
.v174-personal-team-preview small{font-size:7px!important;color:var(--muted)!important;text-align:center!important}

.v174-library-source{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:5px!important;margin:0 0 10px!important;padding:4px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--panel2)!important}
.v174-library-source button{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:38px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--muted)!important;box-shadow:none!important}
.v174-library-source button b{font-size:10px!important}
.v174-library-source button small{display:grid!important;place-items:center!important;min-width:20px!important;height:20px!important;border-radius:999px!important;background:color-mix(in srgb,var(--text) 6%,transparent)!important;font-size:7px!important;font-weight:900!important}
.v174-library-source button.active{background:var(--text)!important;color:var(--panel)!important}
.v174-library-source button.active small{background:color-mix(in srgb,var(--panel) 18%,transparent)!important;color:var(--panel)!important}
.v174-history-source{display:inline-flex!important;align-items:center!important;min-height:18px!important;padding:0 6px!important;border-radius:999px!important;font-size:6.5px!important;font-weight:950!important;letter-spacing:.08em!important;border:1px solid var(--line)!important}
.v174-history-source.personal{background:color-mix(in srgb,#1677e8 8%,var(--panel2))!important;color:#1677e8!important;border-color:color-mix(in srgb,#1677e8 25%,var(--line))!important}
.v174-history-source.mlb{background:color-mix(in srgb,var(--text) 5%,var(--panel2))!important;color:var(--text)!important}
.v174-personal-hidden{display:none!important}

body.dark-mode #modeModal .v174-source-option,#modeModal.v1692-dark .v174-source-option,
body.dark-mode #modeModal #setupSwapPersonalTeams,#modeModal.v1692-dark #setupSwapPersonalTeams{background:#222428!important;border-color:#41464e!important}
body.dark-mode #modeModal .v174-source-option.selected,#modeModal.v1692-dark .v174-source-option.selected{border-color:#f7f8fa!important;background:#292c31!important}
body.dark-mode #modeModal .v174-source-icon,#modeModal.v1692-dark .v174-source-icon{background:#17191c!important;border-color:#42464d!important}

@media(max-width:430px){
 #modeModal .v174-setup-progress{gap:4px!important}
 #modeModal .v174-setup-progress span{gap:4px!important;padding:6px 3px!important}
 #modeModal .v174-setup-progress em{font-size:7px!important}
 #modeModal .v174-source-options{grid-template-columns:1fr!important;gap:8px!important}
 #modeModal .v174-source-option{min-height:92px!important;grid-template-columns:42px minmax(0,1fr) auto!important;padding:11px 12px!important}
 #modeModal .v174-source-icon{width:36px!important;height:36px!important}
 #modeModal .v174-source-option p{font-size:7.8px!important}
 #modeModal .v174-personal-matchup{grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr)!important;gap:7px!important}
 #modeModal #setupSwapPersonalTeams{min-width:48px!important;height:52px!important}
}
@media(max-width:360px){
 #modeModal .v174-setup-progress em{font-size:6.4px!important}
 #modeModal .v174-source-option>em{display:none!important}
 #modeModal .v174-source-option{grid-template-columns:38px minmax(0,1fr)!important}
}

/* ==========================================================
   v175 — COMPACT SOURCE + UNIFIED SCOREBOOK LIBRARY
   ========================================================== */
#modeModal .v174-source-options{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
#modeModal .v174-source-option{min-height:78px!important;grid-template-columns:42px minmax(0,1fr) auto!important;padding:10px 12px!important;gap:10px!important;border-radius:14px!important}
#modeModal .v174-source-icon{width:38px!important;height:38px!important;border-radius:10px!important}
#modeModal .v174-source-option strong{font-size:13px!important}
#modeModal .v174-source-option small{font-size:7.8px!important}
#modeModal .v174-source-option p{margin:2px 0 0!important;font-size:7.3px!important;line-height:1.25!important;max-width:54ch!important}
#modeModal .v174-source-option>em{font-size:6px!important;padding:4px 6px!important}

.v175-library{display:grid!important;gap:10px!important;padding-bottom:18px!important}
.v175-library-head{margin-bottom:0!important}
.v175-library-head p{max-width:520px!important}
.v175-source-nav{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:4px!important;padding:4px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--panel)!important}
.v175-source-nav button{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:38px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--muted)!important;box-shadow:none!important}
.v175-source-nav button b{font-size:9px!important}
.v175-source-nav button small{display:grid!important;place-items:center!important;min-width:19px!important;height:19px!important;border-radius:999px!important;background:color-mix(in srgb,var(--text) 7%,transparent)!important;font-size:6.5px!important;font-weight:900!important}
.v175-source-nav button.active{background:var(--text)!important;color:var(--panel)!important}
.v175-source-nav button.active small{background:color-mix(in srgb,var(--panel) 18%,transparent)!important;color:var(--panel)!important}
.v175-library-summary{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important}
.v175-library-summary>div{display:grid!important;gap:1px!important;padding:9px 10px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important}
.v175-library-summary small{font-size:6.5px!important;letter-spacing:.12em!important;font-weight:950!important;color:var(--muted)!important}
.v175-library-summary b{font-size:17px!important;line-height:1!important}
.v175-library-summary span{font-size:7px!important;color:var(--muted)!important;font-weight:800!important}
.v175-demo-strip{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:7px 10px!important;border:1px dashed var(--line)!important;border-radius:10px!important;background:var(--panel2)!important}
.v175-demo-strip>span{display:flex!important;align-items:baseline!important;gap:7px!important;min-width:0!important}
.v175-demo-strip b{font-size:7.5px!important}
.v175-demo-strip small{font-size:6.7px!important;color:var(--muted)!important}
.v175-demo-strip button{min-height:26px!important;padding:0 9px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--text)!important;font-size:7px!important;font-weight:850!important;box-shadow:none!important}
.v175-library-content{display:grid!important;gap:12px!important}
.v175-library-block{display:grid!important;gap:7px!important}
.v175-section-head{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:10px!important;padding:0 3px!important}
.v175-section-head>div{display:grid!important;gap:1px!important}
.v175-section-head small{font-size:6.5px!important;letter-spacing:.12em!important;font-weight:950!important;color:var(--muted)!important}
.v175-section-head strong{font-size:13px!important}
.v175-section-head>span{font-size:6.8px!important;color:var(--muted)!important;font-weight:800!important}
.v175-compact-list{display:grid!important;gap:6px!important}
.v175-compact-game{position:relative!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important;overflow:hidden!important}
.v175-compact-open{width:100%!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto!important;align-items:center!important;gap:8px!important;padding:8px 10px!important;border:0!important;background:transparent!important;color:var(--text)!important;text-align:left!important;box-shadow:none!important}
.v175-compact-source{font-size:5.8px!important;font-weight:950!important;letter-spacing:.08em!important;border:1px solid var(--line)!important;border-radius:999px!important;padding:3px 5px!important}
.v175-compact-source.personal{color:#1677e8!important;border-color:color-mix(in srgb,#1677e8 28%,var(--line))!important}
.v175-compact-open>div{display:grid!important;gap:1px!important;min-width:0!important}
.v175-compact-open>div strong{font-size:9px!important}
.v175-compact-open>div small{font-size:6.5px!important;color:var(--muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v175-compact-open>b{font-size:10px!important;white-space:nowrap!important}
.v175-compact-open>em{font-style:normal!important;color:var(--muted)!important;font-size:12px!important}
.v175-pin{position:absolute!important;top:3px!important;right:3px!important;font-size:6px!important;color:#b47700!important}
.v175-team-season-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
.v175-team-season-grid article{display:grid!important;grid-template-columns:34px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;min-width:0!important;padding:8px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important}
.v175-team-mark{display:grid!important;place-items:center!important;width:32px!important;height:32px!important;border:1px solid var(--line)!important;border-radius:10px!important;font-size:7px!important;font-weight:950!important;background:var(--panel2)!important}
.v175-team-mark.personal{font-size:15px!important}
.v175-team-season-grid article>div{display:grid!important;gap:1px!important;min-width:0!important}
.v175-team-season-grid article small{font-size:5.8px!important;letter-spacing:.07em!important;color:var(--muted)!important;font-weight:900!important}
.v175-team-season-grid article strong{font-size:8.3px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v175-team-season-grid article em{font-size:6px!important;font-style:normal!important;color:var(--muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v175-team-season-grid article button{min-height:27px!important;padding:0 7px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel2)!important;color:var(--text)!important;font-size:6.5px!important;font-weight:850!important;box-shadow:none!important}
.v175-library-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;gap:5px!important}
.v175-library-search input{min-width:0!important;height:36px!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--panel)!important;color:var(--text)!important;font-size:8px!important;box-sizing:border-box!important}
.v175-library-search button{min-height:36px!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--panel)!important;color:var(--text)!important;font-size:7px!important;font-weight:850!important;box-shadow:none!important}
.v175-status-filters{display:flex!important;gap:5px!important;overflow-x:auto!important;padding-bottom:1px!important;scrollbar-width:none!important}
.v175-status-filters::-webkit-scrollbar{display:none!important}
.v175-status-filters button{flex:0 0 auto!important;min-height:29px!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--panel)!important;color:var(--muted)!important;font-size:6.8px!important;font-weight:850!important;box-shadow:none!important}
.v175-status-filters button.active{background:var(--text)!important;color:var(--panel)!important;border-color:var(--text)!important}
.v175-scorebook-grid{margin-top:0!important}
.v175-filter-empty,.v175-source-empty{display:grid!important;justify-items:center!important;gap:6px!important;padding:24px 16px!important;text-align:center!important}
.v175-filter-empty strong,.v175-source-empty strong{font-size:12px!important}
.v175-filter-empty p,.v175-source-empty p{margin:0!important;font-size:7.5px!important;color:var(--muted)!important;max-width:42ch!important}
.v175-source-empty>span{font-size:24px!important}
.v175-source-empty button{margin-top:4px!important;min-height:36px!important;padding:0 14px!important;border:0!important;border-radius:10px!important;background:#1677e8!important;color:white!important;font-size:8px!important;font-weight:900!important}
.v175-season-detail{display:grid!important;gap:9px!important}
.v175-season-back{justify-self:start!important;min-height:30px!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--panel)!important;color:var(--text)!important;font-size:7px!important;font-weight:850!important;box-shadow:none!important}
.v175-season-title{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:10px!important;padding:10px 12px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--panel)!important}
.v175-season-title>div{display:grid!important;gap:1px!important}.v175-season-title small{font-size:6px!important;color:var(--muted)!important;font-weight:900!important;letter-spacing:.09em!important}.v175-season-title strong{font-size:14px!important}.v175-season-title>span{font-size:7px!important;color:var(--muted)!important;font-weight:850!important}
.v175-season-tabs{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:4px!important;padding:4px!important;border:1px solid var(--line)!important;border-radius:11px!important;background:var(--panel2)!important}
.v175-season-tabs button{min-height:31px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:var(--muted)!important;font-size:7px!important;font-weight:850!important;box-shadow:none!important}.v175-season-tabs button.active{background:var(--text)!important;color:var(--panel)!important}

body.dark-mode .v175-source-nav,body.dark-mode .v175-library-summary>div,body.dark-mode .v175-compact-game,body.dark-mode .v175-team-season-grid article,body.dark-mode .v175-season-title{background:#1b1d20!important;border-color:#3a3e45!important}
body.dark-mode .v175-demo-strip,body.dark-mode .v175-team-mark,body.dark-mode .v175-team-season-grid article button,body.dark-mode .v175-season-tabs{background:#22252a!important;border-color:#3e434b!important}

@media(max-width:430px){
 #modeModal .v174-source-option{min-height:72px!important;grid-template-columns:38px minmax(0,1fr) auto!important;padding:9px 10px!important}
 #modeModal .v174-source-icon{width:34px!important;height:34px!important}
 #modeModal .v174-source-option p{font-size:6.9px!important}
 .v175-team-season-grid{grid-template-columns:1fr!important}
}
@media(max-width:360px){#modeModal .v174-source-option>em{display:block!important}}

/* ==========================================================
   v176 — REUSABLE PERSONAL TEAMS
   ========================================================== */
#modeModal .v174-personal-matchup label{align-content:end!important}
#modeModal .v176-saved-team-select{width:100%!important;min-width:0!important;height:30px!important;box-sizing:border-box!important;padding:0 24px 0 8px!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--panel2)!important;color:var(--text)!important;font-size:7.2px!important;font-weight:850!important;text-align-last:center!important}
#modeModal .v174-personal-matchup input{height:38px!important}
#modeModal .v174-lineup-note{min-height:0!important}

.v176-team-template-bar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;margin:8px 0!important;padding:9px 10px!important;border:1px solid color-mix(in srgb,#1677e8 30%,var(--line))!important;border-radius:12px!important;background:color-mix(in srgb,#1677e8 5%,var(--panel))!important}
.v176-team-template-bar>div:first-child{display:grid!important;gap:1px!important;min-width:0!important}.v176-team-template-bar small{font-size:6px!important;font-weight:950!important;letter-spacing:.1em!important;color:#1677e8!important}.v176-team-template-bar strong{font-size:9px!important}.v176-team-template-bar span{font-size:6.5px!important;line-height:1.25!important;color:var(--muted)!important}
.v176-team-template-bar>div:last-child{display:flex!important;gap:5px!important;align-items:center!important}.v176-team-template-bar button{min-height:31px!important;padding:0 9px!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--panel)!important;color:var(--text)!important;font-size:6.5px!important;font-weight:900!important;box-shadow:none!important;white-space:nowrap!important}.v176-team-template-bar button.primary{background:#1677e8!important;color:white!important;border-color:#1677e8!important}

.v176-team-manager-card{width:min(760px,calc(100vw - 22px))!important;max-height:min(88dvh,780px)!important;overflow:auto!important}.v176-team-identity{display:grid!important;grid-template-columns:minmax(0,2fr) minmax(100px,1fr)!important;gap:8px!important}.v176-team-identity label{display:grid!important;gap:4px!important}.v176-team-identity label span{font-size:7px!important;color:var(--muted)!important;font-weight:900!important}.v176-team-identity input{width:100%!important;height:38px!important;box-sizing:border-box!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--panel2)!important;color:var(--text)!important;padding:0 10px!important;font-size:9px!important;font-weight:850!important}
.v176-team-manager-lineup{display:grid!important;gap:5px!important;margin-top:10px!important}.v176-team-manager-lineup>header{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:10px!important;padding:0 2px 3px!important}.v176-team-manager-lineup>header>div{display:grid!important;gap:1px!important}.v176-team-manager-lineup>header small{font-size:6px!important;letter-spacing:.1em!important;color:var(--muted)!important;font-weight:950!important}.v176-team-manager-lineup>header strong{font-size:11px!important}.v176-team-manager-lineup>header>span{font-size:6.5px!important;color:var(--muted)!important}
.v176-team-player-head,.v176-team-player-row{display:grid!important;grid-template-columns:24px minmax(0,1fr) 78px 84px!important;align-items:center!important;gap:5px!important}.v176-team-player-head{padding:0 6px!important;color:var(--muted)!important;font-size:5.8px!important;font-weight:950!important;letter-spacing:.08em!important}.v176-team-player-row{padding:5px 6px!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--panel2)!important}.v176-team-player-row>b{text-align:center!important;font-size:7px!important}.v176-team-player-row input,.v176-team-player-row select{min-width:0!important;width:100%!important;height:31px!important;box-sizing:border-box!important;border:1px solid var(--line)!important;border-radius:7px!important;background:var(--panel)!important;color:var(--text)!important;padding:0 7px!important;font-size:7px!important;font-weight:800!important}.v176-team-player-row input[data-v176-team-player-num]{text-align:center!important}.v176-team-player-row select{text-align:center!important}
.v176-team-manager-actions{position:sticky!important;bottom:-1px!important;display:grid!important;grid-template-columns:auto 1fr 1fr!important;gap:6px!important;margin-top:10px!important;padding:8px 0 2px!important;background:linear-gradient(180deg,transparent,var(--panel) 20%)!important}.v176-team-manager-actions button{min-height:38px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--panel2)!important;color:var(--text)!important;font-size:7px!important;font-weight:900!important;box-shadow:none!important}.v176-team-manager-actions button.primary{background:#1677e8!important;color:white!important;border-color:#1677e8!important}.v176-team-manager-actions button.danger{color:#c62828!important}

.v176-saved-team-subhead,.v176-team-season-subhead{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:1px 3px!important}.v176-saved-team-subhead span,.v176-team-season-subhead span{font-size:6px!important;font-weight:950!important;letter-spacing:.1em!important;color:var(--muted)!important}.v176-saved-team-subhead small{font-size:6.2px!important;color:var(--muted)!important}.v176-team-season-subhead{margin-top:2px!important}
.v176-saved-team-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.v176-saved-team-card{display:grid!important;grid-template-columns:34px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;min-width:0!important;padding:8px!important;border:1px solid color-mix(in srgb,#1677e8 20%,var(--line))!important;border-radius:12px!important;background:var(--panel)!important}.v176-saved-team-card>div{display:grid!important;gap:1px!important;min-width:0!important}.v176-saved-team-card small{font-size:5.7px!important;letter-spacing:.07em!important;color:#1677e8!important;font-weight:950!important}.v176-saved-team-card strong{font-size:8.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.v176-saved-team-card em{font-size:6px!important;font-style:normal!important;color:var(--muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.v176-saved-team-card button{min-height:27px!important;padding:0 7px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel2)!important;color:var(--text)!important;font-size:6.5px!important;font-weight:850!important;box-shadow:none!important}

body.dark-mode #modeModal .v176-saved-team-select,body.dark-mode .v176-team-template-bar,body.dark-mode .v176-team-player-row,body.dark-mode .v176-saved-team-card{background:#1b1d20!important;border-color:#3a3e45!important}body.dark-mode .v176-team-player-row input,body.dark-mode .v176-team-player-row select,body.dark-mode .v176-team-template-bar button,body.dark-mode .v176-team-manager-actions button{background:#22252a!important;border-color:#3e434b!important}

@media(max-width:430px){
 #modeModal .v174-personal-matchup{gap:6px!important}#modeModal .v176-saved-team-select{height:27px!important;font-size:6.4px!important;padding-left:5px!important}#modeModal .v174-personal-matchup input{height:34px!important}
 .v176-team-template-bar{grid-template-columns:1fr!important;gap:6px!important}.v176-team-template-bar>div:last-child{display:grid!important;grid-template-columns:1fr 1fr!important}.v176-team-template-bar>div:last-child:has(button:only-child){grid-template-columns:1fr!important}
 .v176-saved-team-grid{grid-template-columns:1fr!important}.v176-team-player-head,.v176-team-player-row{grid-template-columns:22px minmax(0,1fr) 58px 66px!important}.v176-team-player-row{gap:4px!important;padding:4px!important}.v176-team-player-row input,.v176-team-player-row select{height:29px!important;padding:0 5px!important;font-size:6.4px!important}.v176-team-identity{grid-template-columns:minmax(0,2fr) minmax(82px,1fr)!important}.v176-team-manager-actions{grid-template-columns:1fr 1fr!important}.v176-team-manager-actions .danger{grid-column:1/-1!important;order:3!important}
}
