/* Shared DugoutLogic identity. Keep the supplied crest intact. */
:root{--bg:#f3f4f6;--ink:#132236;--primary:#bd202b;--muted:#566477;--line:#d9dfe6}
body{isolation:isolate}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:url('brand/dugoutlogic.png') center 48% / min(92vw,900px) auto no-repeat;opacity:.055;filter:grayscale(1)}
.brand{font-size:18px;letter-spacing:-.035em;font-weight:850;gap:8px}
.brand-logo{width:48px;height:48px;object-fit:contain;flex-shrink:0}
.brand-accent{color:var(--primary)}
header{border-bottom:2px solid var(--line)}
.brand-intro{position:relative;min-height:218px;padding-right:190px;display:flex;flex-direction:column;justify-content:center}
.brand-hero{position:absolute;right:0;top:50%;transform:translateY(-50%);width:180px;height:180px;object-fit:contain}
.brand-intro .eyebrow{margin:0 0 6px}
.panel{box-shadow:0 5px 20px #13223606}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline-color:#bd202b}
footer strong{display:block;font-size:15px;letter-spacing:-.025em;color:var(--ink)}
footer>span{display:block;font-size:12px;letter-spacing:.015em;margin:4px 0 8px}
footer small{font-size:10px;letter-spacing:.14em}
html[data-theme=dark]{--bg:#101827;--ink:#e7edf7;--primary:#ff9299;--muted:#b2bfd2;--line:#40506a}
html[data-theme=dark] body::before{opacity:.075;filter:grayscale(.65)}
html[data-theme=dark] .primary{background:#bd202b;color:#fff}
@media(max-width:480px){.brand{font-size:16px}.brand-logo{width:40px;height:40px}.brand-intro{min-height:180px;padding-right:122px}.brand-hero{width:120px;height:120px}.brand-intro h1{font-size:36px}}
@media(max-width:359px){.brand-intro{padding-right:100px}.brand-hero{width:96px;height:96px}.brand-intro h1{font-size:32px}}
@media print{body::before{display:none}}

.password-field{display:block;position:relative}
/* Keep only the custom reveal button in enhanced password fields. */
.password-field input::-ms-reveal{display:none}
.password-field input[type=password],.password-field input[type=text]{padding-right:54px}
.password-peek{position:absolute;right:3px;top:2px;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--muted);touch-action:none}
.password-peek:hover{color:var(--primary)}
.password-peek[aria-pressed=true] .eye-slash{display:none}

.password-rules{padding-left:20px;font-size:14px;margin:14px 0}.password-rules li{margin:7px 0}
.password-rules [data-met=false],.password-match[data-met=false]{color:#b3222d}
.password-rules [data-met=true],.password-match[data-met=true]{color:#216e3b}
.password-match{font-size:14px}.rule-status{font-weight:700}
html[data-theme=dark] .password-rules [data-met=false],html[data-theme=dark] .password-match[data-met=false]{color:#ffaca8}
html[data-theme=dark] .password-rules [data-met=true],html[data-theme=dark] .password-match[data-met=true]{color:#93dfaa}

.coach-player-selection label:has(input[type=checkbox]){display:flex;align-items:center;gap:12px;min-height:44px}.coach-player-selection input[type=checkbox]{width:22px;height:22px;accent-color:var(--primary)}

.dashboard-summary{display:flex;gap:24px;flex-wrap:wrap;padding:16px 0 24px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}
.dashboard-summary strong{display:block;font-size:18px;color:var(--ink)}
.dashboard-heading{margin:26px 0 14px}.dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dashboard-card{position:relative;display:flex;flex-direction:column;gap:7px;background:white;border:1px solid var(--line);border-radius:16px;padding:20px 38px 20px 18px;text-decoration:none;color:var(--ink);min-height:140px}
.dashboard-card>strong{font-size:20px;line-height:1.2}.dashboard-card>span:not(.eyebrow){font-size:14px;color:var(--muted)}.dashboard-card .eyebrow{font-size:10px}
.dashboard-card>b{position:absolute;right:16px;bottom:18px;color:var(--primary)}.dashboard-card{border-top:3px solid var(--primary)}
a.dashboard-card:hover{border-color:var(--primary);box-shadow:0 4px 16px #13223612}.dashboard-unavailable{border-style:dashed;border-top-style:solid}
html[data-theme=dark] .dashboard-card{background:#1b283c}
@media(max-width:480px){.dashboard-grid{gap:10px}.dashboard-card{min-width:0;min-height:140px;padding:16px 12px 38px;overflow-wrap:anywhere}.dashboard-card>strong{font-size:18px}.dashboard-card>b{right:12px;bottom:12px}.dashboard-summary{gap:20px}}

.game-mode-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.game-mode-heading h1,.game-mode-heading form{margin:0}.game-mode-heading button{white-space:nowrap;margin-top:0}

.game-tabs:has(+.game-subtabs){margin-bottom:0}
.game-subtabs{display:flex;width:50%;margin:0 0 18px;padding:3px;gap:3px;background:var(--line);border-radius:12px;overflow:hidden}
.game-subtabs[hidden]{display:none}.game-subtabs.opponent-subtabs{margin-left:auto}
.game-subtabs button{flex:1;min-width:0;min-height:36px;padding:6px 4px;border:0;border-radius:9px;background:transparent;color:var(--ink);font-size:14px;font-weight:700;line-height:1.2}
.game-subtabs button[aria-selected=true]{background:var(--primary);color:white}
@media print{.game-subtabs{display:none}}

.compact-game-toolbar{display:flex;align-items:center;gap:8px;margin:8px 0 12px}.compact-game-toolbar[hidden]{display:none}.compact-game-toolbar>select,.compact-game-toolbar #compact-inning{flex:1;min-width:0;width:50%}.compact-game-toolbar select{font-weight:700}.compact-game-toolbar #compact-inning select{width:100%}.live-batter{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:12px}.live-batter select{flex-basis:100%}.batter-status{margin-left:auto;font-weight:700;color:var(--primary)}.batting-totals{font-weight:700;margin:12px 0}.batting-dialog-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center}dialog[data-batting-dialog]{max-width:90vw;border:1px solid var(--line);border-radius:14px;background:var(--bg);color:var(--ink)}

.live-batting [hidden],.inning-nav[hidden]{display:none!important}

.live-batting .live-batter.batter-up{background:#57df63;color:#142719}
.live-batting .live-batter.batter-deck{background:linear-gradient(110deg,#a6edab,#d5f6d8);color:#142719}
.live-batting .live-batter.batter-hole{background:linear-gradient(110deg,#daf6dc,#effaf0);color:#142719}
.live-batting .live-batter.batter-out{background:#fbdcde;color:#421b20}
.live-batting .live-batter:is(.batter-up,.batter-deck,.batter-hole,.batter-out) .card-identity span,.live-batting .live-batter:is(.batter-up,.batter-deck,.batter-hole,.batter-out) .batter-status{color:inherit}
.batter-actions{display:flex;gap:6px;flex-basis:100%;flex-wrap:nowrap}.batter-actions button{flex:0 1 54px;min-width:0;min-height:34px;padding:6px 8px;font-size:13px;font-weight:700;border:0;border-radius:5px;background:#ae2932;color:#fff}

.live-batting .live-batter.batter-up{background:#71e34f}
.live-batting .live-batter.batter-deck{background:linear-gradient(110deg,#a0ed7b,#c5f5ae)}
.live-batting .live-batter.batter-hole{background:linear-gradient(110deg,#c4f5ac,#e0fbd3)}
.live-batter:has(.batter-heading){padding-top:0;overflow:hidden}.batter-heading{flex-basis:calc(100% + 24px);margin:0 -12px;padding:4px 12px;text-align:center;background:#d9dfe7;color:#15243b;font-size:13px;font-weight:800}.live-batter:has(.batter-heading) .card-identity{margin-top:2px}

.batter-number-row{display:flex;align-items:center;gap:10px;flex-basis:100%;min-width:0}.batter-number{font-size:13px;min-width:28px}.batter-number-row .batter-actions{flex:1;min-width:0;gap:6px}.batter-number-row .batter-actions button{flex:0 1 48px;padding:6px}.batter-number-row .batter-out-action{margin-left:auto}

/* Shared team navigation replaces page breadcrumbs. */
.team-context{margin:0 0 1rem;font-size:.875rem;line-height:1.4;overflow-wrap:anywhere}
.team-context a{font-weight:600}
@media print{.team-context{display:none}}

.runner-destinations{width:min(92vw,420px);box-sizing:border-box}
.runner-result-buttons,.runner-prompt-controls{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.runner-result-buttons button{min-width:3.5rem;min-height:44px}

/* Keep page headings close to the app header without the team link row. */
.shell>header~.intro{padding-top:10px}

.dashboard-return-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.dashboard-return-link{margin-left:auto;flex-shrink:0;color:inherit;font:inherit;letter-spacing:inherit;text-decoration:underline;text-underline-offset:3px}
.dashboard-return-link:hover{color:var(--primary)}
.dashboard-return-only{margin:10px 0 6px}
@media print{.dashboard-return-link{display:none}}

input.run-limit-input::placeholder{color:#9299a3;opacity:1}
input.run-limit-input{min-width:0;width:100%;max-width:19rem}

.runs-settings{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:10px}
.runs-settings h3{margin:0 0 8px}

/* Align numeric entries on the Rules page. */
.defense-rules-form input[type="number"],.defense-rules-form input.run-limit-input{text-align:right}

.game-duration-inputs{display:flex;gap:8px}.game-duration-inputs label{width:5rem!important;text-align:right}.game-duration-inputs input{width:100%;text-align:right}.game-duration-inputs span{font-size:12px;color:var(--muted)}

.game-clock{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:4px 0;font-size:14px}.game-clock[hidden]{display:none}.game-clock strong{font-variant-numeric:tabular-nums}.game-clock [data-clock-notice]{font-weight:600}.clock-actions{display:flex;gap:12px;align-items:center}
body.game-clock-pink{background:#fce4ec!important;color:#15243b}body.game-clock-yellow{background:#fff3b0!important;color:#15243b}

.game-manager-controls{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.game-manager-controls [data-record-half]{font-size:13px;min-height:36px}

.base-runners{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:12px}.base-runners h2{font-size:17px}.runner-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0}.runner-row+.runner-row{border-top:1px solid var(--line)}.runner-row .card-identity{min-width:0;flex:1}.runner-row .batter-actions{flex:0 0 auto}.runner-row .batter-actions button{flex:0 0 auto;min-width:54px}.remaining-batters{margin-top:12px}

.batter-number-row .batter-actions{justify-content:space-between;gap:8px}.batter-number-row .batter-actions button{flex:0 0 auto;white-space:nowrap;padding:8px}.batter-number-row .batter-out-action{margin-left:0}

.runner-row .batter-out-action{margin-left:16px}.batter-number-row .batter-out-action{margin-left:16px}

.batter-number-row .batter-actions{justify-content:flex-end;gap:22px}.batter-number-row .batter-out-action{margin-left:0}

.batting-totals-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.batting-totals-row .batting-totals{margin:0}.batting-totals-row [data-record-half]{font-size:12px;white-space:nowrap;padding:4px 0;min-height:36px;flex-shrink:0}

.game-tabs[data-inning-centric] a{background:var(--bg);color:var(--ink);cursor:default;border:1px solid var(--line)}.inning-centric-title{padding:14px;text-align:center;background:#182638;color:white;border-radius:12px;margin:14px 0;font-size:22px;font-weight:800}.inning-role-tabs{display:flex;gap:12px;background:transparent;padding:0;margin-bottom:14px}.inning-role-tabs button{-webkit-appearance:none;appearance:none;flex:1;min-width:0;min-height:44px;padding:10px 16px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-weight:700;line-height:1.2;cursor:pointer}.inning-role-tabs button.active{background:#b42330;border-color:#b42330;color:#fff}.inning-role-tabs button:focus-visible{outline:3px solid var(--primary);outline-offset:3px}.game-tabs[data-inning-centric]~.compact-game-toolbar{display:none!important}

.game-tabs[data-inning-centric] a{display:block;text-align:center}.game-tabs[data-inning-centric] small{display:block;font-weight:400;font-size:12px;margin-top:4px}

[data-game-progress] [hidden]{display:none!important}

.game-clock{gap:10px 16px;align-items:center}.game-clock [data-clock-notice]:empty{display:none}.game-clock [data-clock-start]{margin-left:auto;white-space:nowrap;padding:8px 12px;min-height:40px;border:1px solid var(--line);border-radius:10px}.game-clock dialog{width:min(420px,calc(100vw - 32px));box-sizing:border-box;border:1px solid var(--line);border-radius:16px;padding:22px;background:var(--bg);color:var(--ink)}.game-clock dialog .clock-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.game-clock dialog button{min-height:44px;border-radius:10px;margin:0}.game-clock dialog [hidden]{display:none!important}.game-clock dialog input{width:100%;box-sizing:border-box;min-width:0;margin-top:8px}.game-clock [data-clock-error]{color:var(--primary)}

.game-tabs[data-inning-centric]{gap:12px;background:transparent;padding:0;border:0;border-radius:0}.game-tabs[data-inning-centric] a{flex:1;min-width:0;min-height:44px;padding:10px 12px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-weight:700;cursor:pointer;text-decoration:none}.game-tabs[data-inning-centric] a.active,.game-tabs[data-inning-centric] a[aria-current="page"]{background:#b42330;border-color:#b42330;color:#fff}.game-tabs[data-inning-centric] a:focus-visible{outline:3px solid var(--primary);outline-offset:3px}

/* Tint the page without obscuring controls or changing their contrast. */
body.game-clock-red{background-image:linear-gradient(rgba(220,38,38,.22),rgba(220,38,38,.22));background-color:var(--bg)}

/* Compact live scoring rows and side-by-side spectator summaries. */
.compact-player-identity{display:flex;align-items:baseline;gap:7px;min-width:0;flex:1;font-size:18px;line-height:1.25}
.compact-player-number{font-size:inherit;font-weight:800;white-space:nowrap}.compact-player-name{font-size:inherit;font-weight:400;overflow-wrap:anywhere}
.compact-player-row{display:flex;align-items:center;gap:12px;width:100%;min-width:0}
.live-batting .live-batter{padding:8px 10px;gap:4px;margin-bottom:8px}
.live-batting .live-batter:has(.batter-heading){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;align-items:stretch;align-content:start;min-height:0;padding:0;gap:0}
.live-batting .batter-heading{margin:0;padding:2px 10px;font-size:12px;align-self:start}.live-batting .live-batter:has(.batter-heading)>.compact-player-row{padding:8px 10px}
.compact-player-row .batter-actions{flex:0 0 auto;gap:10px}.compact-player-row .batter-actions button{flex:0 0 auto;white-space:nowrap;min-height:34px;padding:6px 8px}
.live-batting .base-runners{padding:8px 10px;margin:8px 0}.base-runners h2{margin-bottom:4px;font-size:15px}
.live-batting .runner-row{padding:6px 0;gap:10px}.runner-on-base{font-size:13px;white-space:nowrap}
.live-batting .runner-row .batter-actions{gap:10px}.live-batting .runner-row .batter-out-action{margin-left:0}
.batting-viewer .batting-leaders,.batting-viewer .runner-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.batting-viewer .runner-row{min-width:0;border-top:0;padding:4px 6px}.batting-viewer .runner-row+.runner-row{border-left:1px solid var(--line)}
.batting-viewer .compact-player-identity{flex-wrap:wrap;gap:3px 6px}.batting-viewer .live-batter{min-width:0}
@media(max-width:420px){.compact-player-identity{font-size:16px}.compact-player-row{gap:6px}.compact-player-row .batter-actions,.live-batting .runner-row .batter-actions{gap:6px}.compact-player-row .batter-actions button,.runner-row .batter-actions button{font-size:12px;padding:6px;min-width:0}.batting-viewer .batting-leaders,.batting-viewer .runner-list{gap:4px}}

/* Constrain Safari's native date/time editor to the dialog's content width. */
.game-clock dialog input[type="datetime-local"]{display:block;appearance:none;-webkit-appearance:none;width:100%;max-width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;font-size:16px;text-align:left}
.game-clock dialog input[type="datetime-local"]::-webkit-date-and-time-value{min-width:0;text-align:left}
.game-clock dialog input[type="datetime-local"]::-webkit-datetime-edit{min-width:0;padding:0}
.game-clock dialog{max-width:calc(100vw - 32px)}

/* Field undo keeps the same action, within easy reach above the players. */
.illustrated-game-field .field-undo{position:absolute;top:10px;left:10px;z-index:5;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:8px;border:1px solid rgba(255,255,255,.55);border-radius:50%;background:rgba(18,35,26,.38);color:#fff;box-shadow:0 2px 5px rgba(0,0,0,.15);backdrop-filter:blur(4px);cursor:pointer}
.illustrated-game-field .field-undo[hidden]{display:none}
.illustrated-game-field .field-undo:hover{background:rgba(18,35,26,.65)}
.illustrated-game-field .field-undo:focus-visible{outline:3px solid #fff;outline-offset:3px}

.batting-undo-slot{display:flex;gap:8px;flex-shrink:0}
.batting-undo-slot .batting-undo{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:8px;border:1px solid currentColor;border-radius:50%;background:transparent;color:var(--accent,#bd202b);cursor:pointer}
.batting-undo-slot .batting-undo[hidden]{display:none}
.batting-undo-slot .batting-undo:hover{background:rgba(189,32,43,.12)}
.batting-undo-slot .batting-undo:focus-visible{outline:3px solid currentColor;outline-offset:3px}
