/* Site navigation stays outside the replay so loaded files survive tab changes. */
#replay-analysis{height:calc(100vh - var(--site-nav-height));height:calc(100dvh - var(--site-nav-height))}#analysis-frame{display:block;border:0;width:100%;height:100%;background:#111916}
:root{--site-nav-height:44px}
.site-tabs{height:var(--site-nav-height);display:flex;align-items:stretch;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);background:#101f1b;padding:0 24px}
.site-tab-links a{display:flex;align-items:center;justify-content:center;min-width:100px;padding:0 18px;color:var(--muted);text-decoration:none;font-weight:650;border-bottom:2px solid transparent}
.site-tab-links a[aria-current=page]{color:var(--accent);border-bottom-color:var(--accent)}
.site-tab-links a:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}
.stage{height:calc(100vh - var(--site-nav-height));height:calc(100dvh - var(--site-nav-height))}.stage:fullscreen{height:100dvh}
#game-db,#rebound-trajectories{height:calc(100vh - var(--site-nav-height));height:calc(100dvh - var(--site-nav-height));overflow:auto;overscroll-behavior:contain;padding:32px 28px max(28px,env(safe-area-inset-bottom));font-size:13px}
.db-shell{max-width:1200px;margin:auto}.db-heading{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:28px}.db-eyebrow{color:var(--accent);font:10px ui-monospace,monospace;letter-spacing:2px}.db-heading h1{font-size:32px;margin:6px 0 0;font-weight:650;letter-spacing:-1px}.db-version{color:var(--muted);font-size:11px}
.db-sections{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}.db-sections button,.db-more{background:#213b30;border:1px solid var(--border);color:var(--text);border-radius:8px;padding:9px 15px;min-height:40px}.db-sections button[aria-pressed=true]{background:var(--accent);color:#183022;border-color:var(--accent)}
.db-tools{display:flex;gap:12px;align-items:center;margin-bottom:20px}.db-tools input{width:min(480px,100%);min-width:0;padding:11px 14px;background:#182d25;border:1px solid var(--border);color:var(--text);border-radius:9px}.db-tools output{white-space:nowrap;color:var(--muted);font-size:11px}
.db-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.db-card{background:#142922;border:1px solid var(--border);border-radius:12px;padding:18px;min-width:0;overflow-wrap:anywhere}.db-card-heading{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-bottom:12px}.db-card h2{font-size:15px;font-weight:650}.db-card p{line-height:1.8;white-space:pre-line}.db-badge{font-size:10px;white-space:nowrap;color:#b3c6ba;background:#243b30;padding:3px 7px;border-radius:5px}.db-source{display:block;color:#8aab99;font:10px/1.6 ui-monospace,monospace;margin-top:14px;overflow-wrap:anywhere}.db-note{color:#94aa9b;line-height:1.7;margin:12px 0 18px}.db-card .db-note{font-size:11px;margin-bottom:0}.db-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:10px;margin:16px 0;scrollbar-width:thin}#game-db table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}#game-db th,#game-db td{text-align:left;vertical-align:top;border-bottom:1px solid var(--border);padding:13px 15px;min-width:90px}#game-db th{background:#1e352b;font-size:11px;color:#a4bcaa;white-space:nowrap}#game-db td{font-size:12px;line-height:1.8}#game-db td:last-child{color:#9eafa5}#game-db tr:last-child td{border-bottom:0}
.db-skill-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.db-skill{padding:0}.db-skill>summary{padding:17px 18px;cursor:pointer;line-height:2;list-style:none}.db-skill>summary:before{content:'›';margin-right:10px;color:var(--accent)}.db-skill[open]>summary:before{content:'⌄'}.db-skill .db-badge{margin-left:10px}.db-skill-meta{display:block;padding-left:19px;color:var(--muted);font-size:10px}.db-skill-body{padding:0 18px 18px}.db-skill-body>.db-card{margin:15px 0;background:#10221c}.db-command{color:var(--accent);margin-bottom:10px}.db-motion{border-top:1px solid var(--border);padding:12px 0}.db-motion>summary{cursor:pointer;color:#b8ddbc;min-height:30px}.db-code{font:10px/1.6 ui-monospace,monospace;color:var(--muted);margin-top:9px}.db-more{display:block;margin:22px auto}.db-compare-controls{display:flex;gap:10px;margin:16px 0}.db-compare-controls select{min-height:38px}
@media(max-width:800px){.db-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.db-skill-grid{grid-template-columns:1fr}}
@media(max-width:500px){#game-db{padding:20px 14px max(20px,env(safe-area-inset-bottom))}.db-heading{display:block;margin-bottom:18px}.db-version{display:block;margin-top:8px}.db-heading h1{font-size:27px}.db-grid{grid-template-columns:1fr}.db-sections{gap:6px}.db-sections button{padding:8px 11px;font-size:12px}.db-card{padding:15px}.db-skill{padding:0}.db-table-wrap{max-width:100%}.site-tabs{padding:0 12px;gap:8px}.site-tab-links{gap:0}.site-tab-links a{min-width:72px;padding:0 10px;font-size:11px}}

.db-rebound{margin-top:16px}.db-rebound>summary{cursor:pointer;color:var(--accent);font-size:14px;min-height:28px}.db-rebound-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.db-rebound-controls label{display:flex;flex-direction:column;gap:7px;min-width:0;color:var(--muted);font-size:11px}.db-rebound-controls input{width:100%;min-width:0;box-sizing:border-box;min-height:38px;padding:8px;border:1px solid var(--border);border-radius:7px;background:#0e201a;color:var(--text);font:inherit}
.db-action-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px;padding-bottom:18px;border-bottom:1px solid var(--border)}.db-action-tabs button{min-height:40px;border:1px solid var(--border);border-radius:8px;padding:9px 13px;color:var(--muted);background:#152b22;font:inherit;cursor:pointer}.db-action-tabs button[aria-selected=true]{background:#b8ddbc;border-color:#b8ddbc;color:#10221c;font-weight:700}.db-action-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.db-action-title{font-size:22px;letter-spacing:-.5px;margin:0 0 12px}.db-action-panel>.db-card{margin:18px 0}.db-action-panel>.db-note{max-width:900px;line-height:1.9}.db-calc-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0}.db-calc-controls label,.db-skill-filters label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:11px;color:var(--muted)}.db-calc-controls input,.db-calc-controls select,.db-skill-filters select{box-sizing:border-box;width:100%;min-width:0;min-height:42px;padding:9px 10px;border:1px solid var(--border);border-radius:7px;background:#0e201a;color:var(--text);font:inherit;font-size:13px}.db-calc-controls input:invalid{border-color:#ef997e}.db-calc-result table{table-layout:fixed}.db-calc-result tr:first-child td{color:var(--accent);font-weight:700;background:#18382b}.db-calc-result td:last-child{width:35%;font-variant-numeric:tabular-nums}.db-calc-result .db-note{margin-bottom:0}.db-all-comparison>summary,.db-related-skills>summary{color:var(--accent);cursor:pointer;min-height:30px}.db-related-skills .db-grid{margin-top:14px}.db-skill-filters{display:flex;align-items:end;flex-wrap:wrap;gap:16px;margin-bottom:18px}.db-skill-filters label{min-width:150px}.db-skill-filters .db-checkbox{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:42px;min-width:0}.db-checkbox input{accent-color:var(--accent)}.db-position-meta{display:block;padding-left:19px;font-size:11px;color:#b8ddbc}.db-action-panel .db-source{overflow-wrap:anywhere}
@media(max-width:800px){.db-calc-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
.db-action-tabs{position:sticky;top:-1px;z-index:5;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:10px 0 14px;background:#10221c;scrollbar-width:thin}.db-action-tabs button{flex-shrink:0}
#game-db .db-intercept-outcomes th{white-space:normal}.db-calc-result .db-intercept-outcomes th:first-child{width:40%}.db-calc-result .db-intercept-outcomes td:last-child{width:30%}.db-calc-result .db-intercept-outcomes td:nth-child(n+2){white-space:nowrap}
.db-state-details>summary{cursor:pointer;min-height:32px;color:var(--accent)}.db-state-detail>summary{min-height:38px;line-height:1.8}.db-state-detail .db-code{overflow-wrap:anywhere}.db-state-clip{margin:12px 0;padding:8px 12px;border-left:2px solid var(--border)}.db-state-clip .db-note{margin:4px 0}.db-state-detail .db-source{display:block;margin-top:14px}
@media(max-width:500px){.db-action-tabs{gap:6px;margin-bottom:18px}.db-action-tabs button{font-size:11px;padding:8px 10px}.db-calc-controls{gap:12px 10px;margin:18px 0}.db-calc-result th,.db-calc-result td{min-width:0!important;padding:11px 9px!important}.db-skill-filters{gap:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.db-skill-filters label{min-width:0}.db-skill-filters .db-checkbox{grid-column:1/-1}.db-position-meta{font-size:10px}}
@media(max-width:500px){#game-db .db-rebound th,#game-db .db-rebound td{min-width:0;padding:11px 6px;font-size:10px;white-space:nowrap}.db-rebound table{table-layout:fixed}}

@media(max-width:500px){#game-db .db-steal-motion th,#game-db .db-steal-motion td{min-width:0;padding:11px 6px;font-size:10px}.db-steal-motion table{table-layout:fixed}}

/* Brand stays within the existing 44px navigation height. */
.site-brand{display:flex;align-items:center;gap:9px;flex-shrink:0;align-self:center;white-space:nowrap}.site-brand img{display:block;width:46px;height:24px;object-fit:contain}.site-brand-name{display:flex;align-items:baseline;gap:7px;line-height:1}.site-brand-name strong{font-size:18px;font-weight:800;letter-spacing:-.7px;color:#f7e9de}.site-brand-name small{font:11px/1 ui-monospace,monospace;color:#fa887a;letter-spacing:.3px}.site-tab-links{display:flex;align-self:stretch;gap:8px;min-width:0}
@media(max-width:500px){.site-tab-links{gap:0}.site-brand{gap:7px}.site-brand img{width:34px;height:20px}.site-brand-name{flex-direction:column;align-items:flex-start;gap:3px}.site-brand-name strong{font-size:15px}.site-brand-name small{font-size:9px}}

.db-stats-view>.db-card{margin-bottom:22px}.db-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.db-stat-controls{grid-template-columns:repeat(5,minmax(0,1fr))}.db-stat-effects{margin-top:18px}.db-stat-effect{border-top:1px solid var(--border);padding:14px 0}.db-stat-effect-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.db-stat-effect h3{font-size:12px;line-height:1.7;font-weight:600}.db-stat-delta{color:var(--accent);font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}.db-stat-card .db-stat-values{font:12px/1.8 ui-monospace,monospace;color:#d1dfd4;margin:5px 0}.db-stat-condition,.db-stat-flat{display:block;font-size:10px;line-height:1.8;color:var(--muted)}.db-stat-flat{color:#d6ba88;margin:4px 0}.db-stat-formulas h3{font-size:12px;line-height:1.7;margin-top:16px}.db-stat-formulas .db-source{margin-top:6px}.db-stat-formulas>summary,.db-stat-scope>summary{font-size:12px}.db-stat-grid .db-card-heading{flex-wrap:wrap;gap:7px}
@media(max-width:800px){.db-stat-controls{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:500px){.db-stat-grid{grid-template-columns:1fr}.db-stat-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.db-stat-controls label:last-child{grid-column:1/-1}.db-stat-delta{font-size:13px}.db-stat-effect-heading{gap:8px}.db-stat-effect{padding:12px 0}}
.db-stat-tabs{margin-bottom:20px}.db-stat-panel>.db-card{margin-bottom:20px}.db-stat-basis{display:block;color:#c8cfb3;font-size:10px;line-height:1.8;margin:6px 0}.db-profile-table-wrap{margin:16px 0;max-width:100%}.db-profile-table{table-layout:fixed}#game-db .db-profile-table th,#game-db .db-profile-table td{min-width:0;padding:10px 12px}#game-db .db-profile-table th:first-child{width:30%}#game-db .db-profile-table th:last-child{width:14%}.db-profile-table input{box-sizing:border-box;width:100%;min-width:0;min-height:40px;padding:8px;border:1px solid var(--border);border-radius:7px;background:#0e201a;color:var(--text);font:inherit;font-size:13px}.db-profile-table input:invalid{border-color:#ef997e}.db-profile-stat-delta{font-variant-numeric:tabular-nums;white-space:nowrap}.db-profile-role{grid-template-columns:minmax(140px,260px);margin:18px 0}.db-stat-copy{margin:16px 0}.db-profile-opponent-option{display:flex;align-items:center;gap:9px;margin:24px 0 16px;min-height:42px;font-size:13px;cursor:pointer}.db-profile-opponent-option input{accent-color:var(--accent);width:17px;height:17px}.db-profile-opponent{border-top:1px solid var(--border);padding-top:18px}.db-profile-opponent h3{font-size:14px}.db-profile-opponent-inputs{grid-template-columns:repeat(6,minmax(0,1fr))}.db-profile-context input:disabled,.db-profile-context select:disabled{opacity:.45}.db-profile-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.db-profile-values>div{min-width:0}.db-profile-values small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.db-profile-values strong{font-size:12px;line-height:1.7;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.db-profile-effect>.db-motion{padding:8px 0;margin-top:8px}.db-profile-effect>.db-motion>summary{font-size:11px}.db-profile-effect>.db-note{font-size:11px;margin:7px 0}.db-profile-result-group>h2{font-size:15px}
@media(max-width:800px){.db-profile-opponent-inputs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:500px){#game-db .db-profile-table th,#game-db .db-profile-table td{padding:8px 4px;font-size:10px}#game-db .db-profile-table th:first-child{width:30%}#game-db .db-profile-table th:last-child{width:12%}.db-profile-table input{padding:7px 4px;font-size:12px}.db-profile-role{grid-template-columns:1fr}.db-profile-opponent-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.db-profile-values strong{font-size:10px}.db-stat-tabs{flex-wrap:wrap;position:static}.db-stat-tabs button{font-size:11px}}
.db-stat-carousel{min-width:0;max-width:100%;margin:20px 0}.db-carousel-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.db-carousel-header button{width:42px;height:42px;flex:0 0 42px;border:1px solid var(--border);border-radius:9px;background:#183126;color:var(--accent);font-family:inherit;font-size:24px;line-height:1;cursor:pointer}.db-carousel-header button:disabled{opacity:.35;cursor:default}.db-carousel-counter{font-size:13px;color:var(--text);font-variant-numeric:tabular-nums}.db-carousel-names{position:relative;display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:2px 0 10px;margin-bottom:12px;max-width:100%}.db-carousel-names button{flex:0 0 auto;border:1px solid var(--border);border-radius:8px;padding:8px 11px;background:#152b22;color:var(--muted);font-family:inherit;font-size:11px;line-height:1.6;cursor:pointer;white-space:nowrap}.db-carousel-names button[aria-pressed=true]{color:#10221b;background:var(--accent);border-color:var(--accent);font-weight:700}.db-stat-track{position:relative;display:flex;align-items:flex-start;gap:14px;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:thin;overscroll-behavior-x:contain;border-radius:12px;box-sizing:border-box}.db-stat-track>.db-carousel-card{flex:0 0 100%;width:100%;min-width:0;box-sizing:border-box;scroll-snap-align:start;scroll-snap-stop:always}.db-carousel-header button:focus-visible,.db-carousel-names button:focus-visible,.db-stat-track:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.db-profile-entry{margin:18px 0;border-top:1px solid var(--border);padding-top:14px}.db-profile-entry>summary{cursor:pointer;color:var(--accent);font-size:13px;min-height:32px}.db-carousel-card .db-card-heading{flex-wrap:wrap}.db-carousel-card .db-stat-effect-heading{gap:18px}
@media(max-width:500px){.db-carousel-counter{font-size:12px}.db-carousel-names button{padding:7px 9px;font-size:10px}.db-carousel-card .db-stat-effect-heading{gap:8px}.db-stat-track{gap:10px}}
@media(hover:hover) and (pointer:fine){.db-stat-track{cursor:grab}}
.db-stat-track.is-dragging{cursor:grabbing;user-select:none;scroll-snap-type:none}
.db-carousel-names,.db-stat-track{scrollbar-width:none;-ms-overflow-style:none}.db-carousel-names::-webkit-scrollbar,.db-stat-track::-webkit-scrollbar{display:none}
.db-stat-track{gap:20px;padding:18px clamp(24px,10%,140px) 28px;border-radius:0;background:none}.db-stat-track>.db-carousel-card{scroll-snap-align:center;border-radius:18px;opacity:.45;transform:scale(.94);transform-origin:center top;transition:transform .22s ease,opacity .22s ease,border-color .22s ease}.db-stat-track>.db-carousel-card.is-current{opacity:1;transform:scale(1);border-color:#52694e;background:#183027;box-shadow:0 12px 24px #0003}.db-stat-track:focus-visible{outline:none}.db-stat-track:focus-visible>.is-current{outline:2px solid var(--accent);outline-offset:2px}.db-carousel-card .db-stat-values{font:12px/1.8 ui-monospace,monospace;color:#d1dfd4;margin:5px 0}
@media(max-width:500px){.db-stat-track{gap:6px;padding:14px 36px 24px}.db-stat-track>.db-carousel-card{border-radius:14px}.db-stat-track>.db-carousel-card:not(.is-current){padding:12px}}
@media(prefers-reduced-motion:reduce){.db-stat-track>.db-carousel-card{transition:none}}
.db-stat-track.is-repositioning>.db-carousel-card{transition:none}
.db-stat-branches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:12px 0}.db-stat-branch{min-width:0}.db-stat-branch+.db-stat-branch{border-left:1px solid var(--border);padding-left:16px}.db-stat-branch-label{margin:0 0 8px;font-size:11px;font-weight:600;color:#c8cfb3}.db-stat-branch .db-stat-delta{display:block;font-size:13px;line-height:1.8;white-space:normal}.db-stat-number{white-space:nowrap}.db-stat-branch-unit{display:block;font-size:10px;line-height:1.7;color:var(--muted);font-weight:400}.db-stat-branch-rule{display:block;font-size:12px;line-height:1.8;font-weight:600;color:var(--accent);overflow-wrap:anywhere}.db-stat-branch .db-stat-basis{margin:5px 0;font-size:10px}.db-stat-example{margin-top:7px}.db-stat-branch .db-stat-flat{font-size:10px}
.db-stat-branch-rule{word-break:keep-all}
.db-stat-rule-help,.db-stat-rule-example{font-size:11px;line-height:1.85;margin:12px 0;color:var(--muted);overflow-wrap:anywhere}.db-stat-rule-example{color:#c8cfb3}
.db-stat-efficiency{display:grid;gap:5px;margin:14px 0;padding:12px;border:1px solid #435946;border-radius:9px;background:#10261e;line-height:1.65;overflow-wrap:anywhere}.db-stat-efficiency>strong{font-size:12px;color:#e3d59f}.db-stat-efficiency>span{font-size:12px;color:#dae8db}.db-stat-efficiency>small{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}.db-stat-efficiency[data-kind=reversed]{border-color:#aa8761}.db-stat-trend{min-width:0;margin-top:18px}.db-trend-detail{margin:12px 0 0}.db-trend-table{table-layout:fixed;width:100%}#game-db .db-trend-table th,#game-db .db-trend-table td{min-width:0;padding:9px 5px;font-size:11px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}#game-db .db-trend-table th:first-child{width:16%}.db-trend-detail>summary{font-size:12px}
@media(max-width:500px){.db-stat-efficiency{padding:9px}.db-stat-efficiency>strong{font-size:11px}}
@media(max-width:500px){.db-unit-view .db-stat-track{padding-inline:20px}.db-stat-branches{gap:9px}.db-stat-branch+.db-stat-branch{padding-left:9px}.db-stat-branch .db-stat-delta{font-size:11px}.db-stat-branch-rule{font-size:11px}}
@media(max-width:700px){:root{--site-nav-height:82px}.site-tabs{flex-direction:column;align-items:stretch;padding:6px 12px 0;gap:2px}.site-brand{height:28px;align-self:flex-start}.site-tab-links{flex:1;width:100%;gap:0}.site-tab-links a{flex:1;min-width:0;padding:0 2px;font-size:11px;white-space:nowrap}#rebound-trajectories{padding:20px 14px max(20px,env(safe-area-inset-bottom))}}
