/* 开场独立于对局布局；进入荣耀模式后整个层及渲染器均释放。 */
body.opening-active > :not(#opening):not(#vs-map-picker):not(script) { visibility: hidden !important; }
#opening { position:fixed; inset:0; z-index:200; overflow:hidden; color:#eee8d8; background:#101510; font-family:inherit; isolation:isolate; }
#opening[hidden], #opening [hidden] { display:none !important; }
.opening-art, .opening-shade, .opening-grain { position:absolute; inset:0; pointer-events:none; }
.opening-art { background:url('../assets/opening-battlefield.webp') center 60% / cover no-repeat; animation:opening-breathe 20s ease-in-out infinite alternate; transition:filter .8s,opacity .8s; }
.opening-shade { background:linear-gradient(180deg,rgba(8,13,11,.5),transparent 58%,rgba(7,12,10,.85)),radial-gradient(ellipse at 50% 22%,transparent 10%,rgba(8,12,10,.35) 85%); }
.opening-grain { opacity:.12; background:repeating-linear-gradient(0deg,transparent 0 3px,#000 4px); }
.opening-top { position:absolute; top:28px; left:3.5%; right:3.5%; display:flex; align-items:center; justify-content:space-between; gap:16px; z-index:3; font-size:11px; letter-spacing:3px; color:#c7bd9f; }
.opening-mark { display:flex; align-items:center; gap:12px; }
.opening-mark svg { width:30px; height:30px; color:#d7bc73; }
#opening button { font-family:inherit; cursor:pointer; transition:background .2s,transform .2s,border-color .2s; }
#opening button:focus-visible { outline:3px solid #fae9b0; outline-offset:6px; }
#opening button:disabled { opacity:.5; cursor:wait; }
.opening-quiet { font-size:12px; padding:8px 14px; background:#0a100e80; border:1px solid #bbaa7150; color:#e3dbc4; border-radius:3px; }
.opening-quiet:hover { background:#28302a; }
.opening-cover { position:relative; z-index:2; width:min(780px,90%); margin:clamp(90px,14vh,180px) auto 0; text-align:center; }
.opening-eyebrow { display:flex; align-items:center; justify-content:center; gap:16px; font-size:11px; letter-spacing:5px; color:#cdbc89; }
.opening-eyebrow:before,.opening-eyebrow:after { content:''; width:45px; height:1px; background:#c6aa6970; }
#opening h1 { margin:14px 0 6px; font-size:clamp(52px,7.3vw,110px); line-height:1.15; font-weight:900; letter-spacing:.12em; text-indent:.12em; color:#eadbb5; background:linear-gradient(#fff8dc 15%,#ceb773 64%,#95773f); background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent; filter:drop-shadow(0 7px 9px #060806); }
.opening-english { letter-spacing:.7em; text-indent:.7em; font-size:clamp(10px,1.3vw,18px); color:#d1bd8d; }
.opening-tagline { margin:22px 0 26px; color:#e4e0d1; font-size:clamp(13px,1.3vw,17px); letter-spacing:3px; text-shadow:0 2px 8px #000; }
.opening-start { position:relative; min-width:240px; padding:16px 34px; font-size:20px; font-weight:700; letter-spacing:5px; color:#221c0d; background:linear-gradient(120deg,#ac8b47,#f0dba1 50%,#bd994e); border:1px solid #ffe6a3; border-radius:3px; box-shadow:0 0 0 5px #a68a3f15,0 8px 38px #0009; }
.opening-start:hover { transform:translateY(-3px); background:linear-gradient(120deg,#ceb16c,#ffeac0,#d2b064); }
.opening-start span { margin-left:22px; font-size:18px; }
.opening-status { height:20px; margin:14px 0; font-size:12px; color:#bdb7a0; letter-spacing:1px; }
.opening-footer { position:absolute; z-index:3; bottom:25px; left:4%; right:4%; display:flex; justify-content:space-between; align-items:center; gap:16px; font-size:11px; letter-spacing:2px; color:#c4bfae; }
.opening-footer b { color:#d3b879; font-weight:400; }
#opening[data-stage="duel"] .opening-art { opacity:.13; filter:blur(4px); }
#opening[data-stage="modes"] .opening-art { filter:blur(5px) brightness(.4); }
#opening-duel { position:absolute; inset:0; }
#opening-duel canvas { width:100%; height:100%; display:block; }
.duel-caption { position:absolute; left:0; right:0; top:17%; text-align:center; pointer-events:none; }
.duel-caption strong { display:block; font-size:clamp(25px,4vw,48px); letter-spacing:10px; color:#f0deb2; }
.duel-caption small { display:block; margin-top:14px; color:#9d9f8d; letter-spacing:6px; font-size:11px; }
.duel-sides { position:absolute; bottom:17%; left:20%; right:20%; display:flex; justify-content:space-between; font-size:12px; letter-spacing:5px; }
.duel-sides span:first-child { color:#fc8972; }.duel-sides span:last-child { color:#93befe; }
#opening-skip { position:absolute; right:4%; bottom:75px; }
#opening-flash { position:absolute; inset:0; background:#ffdda1; opacity:0; pointer-events:none; }
.opening-modes { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:80px 5%; box-sizing:border-box; z-index:2; animation:opening-reveal .55s ease-out; }
.opening-modes h2 { font-size:clamp(28px,3.5vw,46px); letter-spacing:7px; margin:0 0 10px; color:#efdfb5; }
.opening-modes > p { margin:0 0 30px; font-size:13px; color:#b5b4a4; letter-spacing:2px; }
.mode-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; width:min(820px,100%); }
#opening .mode-card { position:relative; display:flex; flex-direction:column; align-items:flex-start; text-align:left; padding:32px; min-height:275px; border:1px solid #b79a535c; border-top:3px solid #d9ba70; background:linear-gradient(140deg,#3a3925ed,#121b16ed 75%); color:#ede4cd; border-radius:5px; overflow:hidden; }
#opening .mode-card:hover { transform:translateY(-5px); border-color:#e4c67e; background:linear-gradient(140deg,#514730ed,#16211bed 75%); }
#opening .mode-card.versus { border-color:#5e85ac66; border-top-color:#739cb5; background:linear-gradient(140deg,#243b48ed,#141c21ed 75%); }
.mode-card svg { width:50px; height:50px; margin:0 0 22px; color:#d9bf80; }.mode-card.versus svg { color:#8caec9; }
.mode-card strong { font-size:27px; letter-spacing:3px; }.mode-card small { color:#b7b9a9; font-size:13px; margin-top:13px; line-height:1.8; }
.mode-card em { font-style:normal; margin-top:auto; padding-top:22px; font-size:13px; color:#efd297; letter-spacing:2px; }
.mode-number { position:absolute; right:22px; top:20px; font-size:60px; font-weight:800; opacity:.08; }
#opening-mode-note { min-height:38px; max-width:600px; margin:20px 0 8px; color:#e4cba0; font-size:14px; line-height:1.7; text-align:center; }
@keyframes opening-breathe { from{transform:scale(1)}to{transform:scale(1.035)} }
@keyframes opening-reveal { from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)} }
@media(max-height:650px) { .opening-cover{margin-top:80px}.opening-tagline{margin:14px 0 18px}#opening h1{font-size:65px}.opening-modes{padding-top:60px;padding-bottom:45px}#opening .mode-card{min-height:215px;padding:22px}.mode-card svg{width:32px;height:32px;margin-bottom:12px}.opening-modes>p{margin-bottom:20px}.opening-footer{bottom:15px} }
@media(max-width:620px) { .opening-top{top:18px;font-size:9px;letter-spacing:1px}.opening-footer{font-size:9px;letter-spacing:0}.opening-footer span:last-child{display:none}.mode-grid{gap:12px}#opening .mode-card{padding:20px 15px;min-height:255px}.mode-card strong{font-size:22px}.mode-card small{font-size:12px}.opening-tagline{letter-spacing:1px}.opening-english{letter-spacing:.4em}.duel-sides{left:10%;right:10%} }
@media(prefers-reduced-motion:reduce) { .opening-art,.opening-modes{animation:none}#opening button{transition:none} }
@media(max-height:480px) { .opening-modes{justify-content:flex-start;overflow-y:auto;padding-top:65px;padding-bottom:25px}.opening-footer{display:none}.opening-cover{margin-top:62px}#opening h1{font-size:48px}.opening-eyebrow{font-size:9px}.opening-tagline{margin:10px 0 14px}.opening-start{padding:11px 25px}.opening-status{margin-top:10px} }

.opening-mark img { display:block; width:108px; height:72px; object-fit:contain; border-radius:3px; }
@media(max-width:620px){.opening-mark img{width:75px;height:50px}.opening-top{align-items:flex-start}}
@media(max-height:480px){.opening-mark img{width:63px;height:42px}.opening-top{top:12px}}

.mode-card .mode-art {width:112px;height:112px;object-fit:contain;margin:0 0 18px;filter:drop-shadow(0 5px 9px #0007)}
@media(max-height:650px){.mode-card .mode-art{width:76px;height:76px;margin-bottom:10px}}
@media(max-width:620px){.mode-card .mode-art{width:94px;height:94px;margin-bottom:14px}}

/* 加载条位于对轰画面下方；不与跳过、页脚重叠。 */
.opening-loading{position:absolute;bottom:max(76px,12%);left:50%;transform:translateX(-50%);width:min(440px,64%);padding:12px 16px;background:#101912e6;border:1px solid #c7a96140;border-radius:8px;pointer-events:none}
.opening-loading-copy{display:flex;justify-content:space-between;gap:12px;color:#ecd99d;font-size:13px;letter-spacing:2px;margin-bottom:10px}
#opening-progress{height:6px;background:#090e0b;border-radius:4px;overflow:hidden;box-shadow:inset 0 0 0 1px #e8ce8433}
#opening-progress-fill{display:block;width:0;height:100%;background:linear-gradient(90deg,#9d803e,#ffe8a6);box-shadow:0 0 12px #f7d270;border-radius:inherit}
#opening[data-stage="duel"] .duel-sides{bottom:28%}
#opening-skip{bottom:38px}
#opening[data-stage="duel"] .opening-footer{display:none}
@media(max-width:620px){.opening-loading{width:calc(100% - 48px);bottom:88px}.opening-loading-copy{font-size:12px}#opening[data-stage="duel"] .duel-sides{bottom:180px}}
@media(max-height:480px){.opening-loading{bottom:26px;width:48%;padding:8px 12px}.opening-loading-copy{font-size:11px;margin-bottom:6px}#opening[data-stage="duel"] .duel-sides{bottom:110px}#opening-skip{bottom:26px}.duel-caption{top:20%}.duel-caption small{display:none}}

/* English game title and navigation. */
.opening-top-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:.5rem; }
.opening-top-actions a { text-decoration:none; white-space:nowrap; }
.opening-mark { font-weight:750; white-space:nowrap; }
.opening-cover h1 { font-size:clamp(2.55rem, 10vw, 8rem); white-space:normal; line-height:.96; }
.battle-kill-title { display:block; margin:0 auto 4px; padding:.55rem .8rem; width:fit-content; border:1px solid #a69655; background:#142319; color:#f7ddb1; text-transform:uppercase; letter-spacing:.05em; }
