.duel-page{--a:#80c7eb;--b:#f09981}.duel-page a{text-decoration:none;color:inherit}.duel-page h2{font-size:18px;font-weight:600;margin:0 0 16px}:where(.duel-page) p{margin:10px 0}.notice{background:#29302870;border-left:3px solid var(--gold);padding:12px 15px;font-size:13px;color:#c4c2b3;margin:0 0 22px}.fighters{display:grid;grid-template-columns:1fr 1fr;gap:20px}.duel-page .fighter,.duel-page .model,.duel-page .panel{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:25px}.fighter{border-top:3px solid var(--a)}.fighter.side-b{border-top-color:var(--b)}.fighter h2{color:var(--a)}.side-b h2{color:var(--b)}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}.duel-page label{display:flex;flex-direction:column;gap:8px;font-size:14px;color:var(--muted)}.duel-page input,.duel-page select,.duel-page button{font:inherit;border:1px solid #3a4b60;border-radius:8px;background:#0d1520;color:var(--text);min-height:44px;padding:9px 10px;max-width:100%;width:100%}.duel-page input:focus-visible,.duel-page select:focus-visible,.duel-page button:focus-visible,.duel-page summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.duel-page input:invalid:not(:placeholder-shown){border-color:#da7d6d}.duel-page button{cursor:pointer;width:auto;font-size:13px;font-weight:600;background:#213141}.duel-page button:hover{background:#2c4052}.duel-page button:disabled{opacity:.45;cursor:default}.duel-page .primary{background:var(--gold);color:#17212a;border-color:var(--gold)}.duel-page .primary:hover{background:#efce90}.buffs{margin:14px 0}.buffs summary,.model>summary,.panel>summary{cursor:pointer;min-height:44px;align-content:center}.buff-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}.buff-grid label{flex-direction:row;align-items:center;font-size:12px;min-height:36px}.buff-grid input{width:17px;min-height:17px;accent-color:var(--gold)}.summary{padding-top:12px;border-top:1px solid var(--line);font-size:13px;min-height:100px}.summary strong{color:var(--gold)}.summary small{display:block;color:var(--muted);font-size:11px}.duel-page .model{margin-top:20px;padding:12px 22px}.controls{grid-template-columns:repeat(3,1fr);margin:12px 0}.actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 12px}#status{min-height:28px;font-size:13px;color:var(--gold)}.battle{background:#101b26;border:1px solid #3b4a54;border-radius:12px;overflow:hidden;margin:20px 0}.battle-heading{display:flex;justify-content:space-between;padding:18px 22px 0}.duel-page .battle-heading h2{margin:0}#clock{font:20px monospace;color:var(--gold)}.hp-panels{display:grid;grid-template-columns:1fr 1fr;gap:40px;padding:18px 22px 8px}.hp-title{display:flex;justify-content:space-between;font-size:13px}.hp-bar{height:9px;background:#2b3036;border-radius:3px;overflow:hidden;margin:7px 0}.hp-fill{height:100%;background:var(--a);width:100%;transition:width .08s linear}.hp-panel:nth-child(2) .hp-fill{background:var(--b)}.duel-page canvas{display:block;width:100%;height:auto;aspect-ratio:1100 / 340;background:#111e27;image-rendering:pixelated}.playback{padding:16px 22px;display:flex;align-items:end;gap:12px;flex-wrap:wrap}.playback label{min-width:86px}.seek-label{flex:1;min-width:160px}.seek-label input{padding:0;accent-color:var(--gold);border:0}.result{margin:0;padding:12px 22px 20px;color:var(--gold)}.panel{margin:20px 0}.table-scroll{max-height:300px;overflow:auto}.duel-page table{border-collapse:collapse;width:100%;font-size:12px}.duel-page td,.duel-page th{padding:8px 12px;border-bottom:1px solid var(--line);text-align:left}.duel-page th{position:sticky;top:0;background:#182734}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metrics div{background:#0e1924;padding:15px;border-radius:8px;font-size:12px;color:var(--muted)}.metrics strong{display:block;color:var(--gold);font-size:26px}#batch-result p{font-size:13px}[hidden]{display:none!important}@media(max-width:700px){.fighters{grid-template-columns:1fr}.duel-page .fighter,.duel-page .panel{padding:16px}.controls{grid-template-columns:1fr 1fr}.actions button{flex:1 1 42%}.actions .primary{flex-basis:100%}.hp-panels{gap:18px;padding:16px 12px 6px}.battle-heading{padding:16px 12px 0}.playback{padding:12px}.metrics{grid-template-columns:1fr 1fr}.hp-title{font-size:11px}.duel-page .battle-heading h2{font-size:16px}}



@media(max-width:700px){.hp-title{display:grid;grid-template-columns:1fr;gap:3px;font-size:12px}.hp-title span,.hp-title strong{white-space:nowrap}}

input[readonly]{color:var(--gold);background:#1e2e3b;font-weight:700}

.battle-conditions{margin:8px 12px;padding:8px 10px;background:#172735;border-radius:6px;font-size:12px;overflow-wrap:anywhere}.battle-conditions summary{cursor:pointer;min-height:32px}.battle-conditions p{margin:5px 0}#combat-detail p,#batch-result p{overflow-wrap:anywhere}

.hit-evidence{margin:12px 0;border-top:1px solid var(--line);padding-top:8px}.hit-evidence summary{min-height:44px;cursor:pointer}.hit-evidence .grid{grid-template-columns:1fr}.confirm-evidence{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.confirm-evidence input{width:18px;min-width:18px;min-height:18px;margin-top:4px}.hit-evidence p{overflow-wrap:anywhere}

.defense-settings{margin:12px 0}.defense-settings summary,.calculation-details summary{min-height:44px;cursor:pointer}.calculation-details p,.defense-settings p{overflow-wrap:anywhere}.calculation-details{margin-top:12px;font-size:12px}

.fighter,.grid>*{min-width:0}.summary,.summary small{overflow-wrap:anywhere}

.battle-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:8px 22px}.battle-stat-card{min-width:0;background:#172735;border-left:3px solid var(--a);padding:10px 12px;border-radius:6px;overflow-wrap:anywhere;font-size:12px}.battle-stat-card:nth-child(2){border-color:var(--b)}.battle-stat-card strong,.battle-stat-card span,.battle-stat-card small{display:block}.battle-stat-card strong,.battle-stat-card b{color:var(--gold)}.battle-stat-card p{margin:6px 0;line-height:1.8}.battle-stat-card span,.battle-stat-card small{color:var(--muted);line-height:1.6}@media(max-width:700px){.battle-summary{padding:8px 12px;gap:8px}.battle-stat-card{padding:8px;font-size:11px}}@media(max-width:360px){.battle-summary{grid-template-columns:1fr}}

.duel-page label,.duel-page button{overflow-wrap:anywhere;min-width:0}

.duel-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.duel-shortcuts a { display:inline-flex; align-items:center; min-height:44px; padding:6px 12px; border:1px solid var(--gold); border-radius:8px; color:var(--gold); }
.duel-shortcuts [hidden] { display:none; }
.duel-shortcuts a:focus-visible, #battle:focus-visible, #analysis:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
#setup-diff { margin:6px 22px; overflow-wrap:anywhere; }
#analysis-basis { overflow-wrap:anywhere; }

.duel-page .muted { color:var(--muted); font-size:13px; }
.duel-page .metrics { margin-top:0; padding-top:0; border-top:0; }
.duel-page .metrics > div { grid-column:auto; }
.duel-compute-note { margin-top:24px; }

.duel-page .battle-actions { padding:0 22px; }
.duel-page #settings { margin-top:28px; }
.duel-page #settings:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
@media (max-width:700px) {
  .duel-page .battle-actions { padding:0 12px; }
}

.duel-page .battle-message { margin:8px 22px; color:var(--muted); font-size:13px; }
.duel-page .battle-message:empty { display:none; }
.duel-page .settings-heading { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:12px; margin-bottom:14px; }
.duel-page .settings-heading h2 { margin:0; }
/* Keep the apply controls still while a lazy banner decodes or rotates. */
.duel-page [data-banner="duel-before-settings"] {
 width:100%; height:154px!important; min-height:154px!important;
}
.duel-page [data-banner="duel-before-settings"] .banner-frame,
.duel-page [data-banner="duel-before-settings"] .banner-frame a,
.duel-page [data-banner="duel-before-settings"] .banner-frame picture {
 width:100%; height:100%!important;
}
@media(max-width:700px){
 .duel-page [data-banner="duel-before-settings"] {
  height:126px!important; min-height:126px!important;
 }
}
.duel-page .table-scroll:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
@media (max-width:700px) {
  .duel-page .playback .seek-label { flex:1 0 100%; min-width:0; }
  .duel-page .battle-message { margin-inline:12px; }
}

.duel-page canvas.is-compact { aspect-ratio:600 / 340; }

#save-confirm{color:#e5edf5;background:#142230;border:1px solid #d5b46c;border-radius:12px;padding:22px;width:min(420px,calc(100% - 32px));max-width:calc(100% - 32px);box-sizing:border-box}#save-confirm::backdrop{background:#000a}#save-confirm h2{margin-top:0;font-size:1.2rem}#save-confirm p{line-height:1.65;overflow-wrap:anywhere}#save-confirm .actions{justify-content:flex-end}#save-confirm button{min-width:80px;min-height:44px}
