:root{font-family:Microsoft YaHei UI,PingFang SC,Noto Sans CJK SC,sans-serif;color:#eaf1fb;background:#0a101b;--ink: #eaf1fb;--muted: #a9bad2;--line: #304055;--panel: #101b2b;--gold: #e8cb94;--red: #ff7785;--blue: #72bbff;--green: #74dcb7;--yellow: #f4ca79;--mono: "Cascadia Mono", Consolas, monospace;font-synthesis:none;text-rendering:optimizeLegibility;color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(ellipse at 50% -10%,#233249 0,#0a101b 55%)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid #ffe3ad;outline-offset:3px}button:disabled{opacity:.5;cursor:default}a{color:#b6c8e1;text-decoration:none}a:hover{color:#ffe4b9}[hidden]{display:none!important}#app{width:min(1680px,96vw);margin:0 auto;padding:20px 0 12px}.masthead{display:flex;justify-content:space-between;align-items:center;min-height:62px;margin-bottom:12px}.brand{display:flex;align-items:center;gap:13px}.brand-sigil{font-size:43px;color:var(--gold);line-height:1}h1{margin:0;font-size:26px;font-weight:700;letter-spacing:.13em}.brand p{margin:6px 0 0;color:var(--muted);font-size:12px;letter-spacing:.07em}.version{color:#e4ceab;margin-left:12px;font-size:10px;letter-spacing:.03em}.page-links{display:flex;gap:21px;font-size:12px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;border-block:1px solid var(--line);padding:9px 0}.round-state{display:flex;gap:14px;align-items:center;white-space:nowrap;font-size:13px}.live-dot{width:5px;height:5px;background:#7be5c1;border-radius:50%;box-shadow:0 0 9px #7be5c150}#status-label{font-size:12px;font-weight:500;color:#b8c9df}#elapsed{font:17px var(--mono);font-weight:600;color:#f1e8d5}#phase-label{color:var(--gold);font-size:12px}.controls,.speed-controls{display:flex;align-items:center;gap:5px}.controls>button,.speed-controls button{min-height:34px;padding:6px 12px;background:#172438;border:1px solid #35475e;border-radius:4px;font-size:12px}.controls>button:hover,.speed-controls button:hover{background:#253954;border-color:#7d8fac}.speed-controls{gap:0;border:1px solid #35475e;border-radius:4px;overflow:hidden}.speed-controls button{min-width:40px;padding:6px 8px;border:0;border-radius:0;background:#101c2d;color:#a7bad3;font-family:var(--mono)}.speed-controls button.active,.speed-controls button[aria-pressed=true]{background:#d5bf98;color:#142031;font-weight:700}#restart-button{border-color:#746345;color:#f0d5a8}#effects-button{background:transparent}#effects-button[aria-pressed=true]{border-color:#7bd1b8;color:#a8eed6}.faction-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px 0}.faction-strip>button,.faction-card,.country-card{display:block;min-width:0;padding:9px 12px 10px;text-align:left;border:1px solid #344359;border-top:2px solid var(--team-color, var(--color, #b7c8dd));border-radius:4px;background:#121d2ce0;color:var(--ink)}.faction-strip>button:hover{background:#1b2b40;border-color:var(--team-color, var(--color, #8ea9cf))}.faction-strip .dead{opacity:.58}.faction-top,.country-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.faction-name,.country-name{color:var(--team-color, var(--color, #edf4ff));font-size:14px;font-weight:700}.faction-land,.country-land{font:17px var(--mono);font-weight:600}.faction-hp,.country-vitals{margin-top:5px;font-size:12px;line-height:1.6;color:#c8d8ec;white-space:nowrap}.faction-hp strong,.country-vitals strong{color:#f0f5fc;font-family:var(--mono)}.faction-state,.country-state{margin-top:4px;color:#adbed6;font-size:11px}.faction-school,.school-summary{display:inline-block;margin-top:4px;font-size:11px;color:#b1c5df}.hp-bars,.faction-bars{display:flex;flex-direction:column;gap:3px;margin-top:5px}.hp-bars i,.faction-bars i{display:block;height:2px;background:var(--team-color, var(--color, #bad0ed))}.arena-region{min-width:0}.arena-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:30px;padding:0 1px 7px;font-size:12px}.arena-title{display:flex;gap:18px;align-items:center;color:#e2d3b9}.arena-subtitle{color:#9cb0cd;font-size:11px}.altar-status{display:flex;align-items:center;gap:10px;color:#cab895}.altar-status>span:first-child{font-size:16px;color:#f0d197}#altar-next{color:#9fb3d0;font:11px var(--mono)}.arena-viewport{position:relative;overflow:hidden;border:1px solid #46516b;border-radius:5px;background:#0d1421;box-shadow:0 6px 25px #0004}.arena-shell{position:relative;width:100%;aspect-ratio:1480 / 720;container-type:inline-size}#game{position:absolute;inset:0}#game canvas{display:block;width:100%!important;height:100%!important}#spell-slots{position:absolute;left:0;top:75.4167%;width:33.7838%;height:8.0556%;overflow:hidden;pointer-events:none}#spell-slots button{position:absolute;top:0;height:100%;min-width:0;padding:1px 0 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;border-bottom:2px solid var(--spell-color, var(--tint, #b6cce9));background:#122031;border-radius:0;color:var(--spell-color, var(--tint, #eaf1fc));overflow:hidden;pointer-events:auto}#spell-slots button:hover{background:#26384f}#spell-slots button:focus-visible{outline-offset:-2px}.spell-icon,.slot-icon{font-size:clamp(13px,1.2cqw,21px);line-height:1}.spell-short,.slot-name{font-size:clamp(10px,.81cqw,13px);white-space:nowrap;font-weight:600;letter-spacing:-.025em}.spell-chance,.slot-chance{font:clamp(9px,.63cqw,11px) var(--mono);color:#a7b9d0;line-height:1}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;background:#101928;color:#dbcbac;font-size:14px;z-index:5}.loading-sigil{font-size:43px;color:#e2c997}.round-overlay{position:absolute;left:35.1351%;top:0;width:64.8649%;height:100%;z-index:6;display:grid;place-items:center;background:#06101cba;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.round-result{padding:34px 48px;text-align:center;border:1px solid #c5b1847a;background:#112033ed;box-shadow:0 14px 80px #0005}.result-kicker{color:#d5ba87;font-size:11px;letter-spacing:.2em}.round-result h2{font-size:clamp(22px,3cqw,44px);margin:16px 0;color:#ffe4b6}.round-result p{font-size:13px;color:#bbcadf;margin-bottom:22px}.round-result button{padding:10px 24px;background:#ddc18d;color:#142032;border:1px solid #ffdea5;border-radius:3px;font-weight:600}.mobile-view-controls{display:none}.battle-notes{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:9px;min-height:65px;border-bottom:1px solid var(--line);padding:0 1px 9px}.last-cast{min-width:0;font-size:13px}.note-label{color:#9eb3ce;font-size:11px}.last-cast .note-label{margin-right:13px}#last-cast{font-weight:600;color:#f0e1c6}#last-value{margin-left:10px;color:#ffe2a1;font:14px var(--mono);font-weight:700}#last-effect{margin:7px 0 0;color:#becde1;font-size:11px;line-height:1.7}.field-stats{display:flex;align-items:center;gap:35px;flex-shrink:0}.field-stats>div{display:flex;flex-direction:column;gap:5px;min-width:65px}.field-stats strong{font:18px var(--mono);color:#f0e0c1}.footer{display:flex;justify-content:space-between;gap:15px;padding-top:11px;color:#93a8c7;font-size:10px}#seed-label{font-family:var(--mono);color:#acbed6}dialog{width:min(850px,92vw);max-height:min(860px,90dvh);padding:0;border:1px solid #61708a;border-radius:6px;background:#121e30;color:#eaf1fc;box-shadow:0 20px 100px #0009}dialog::backdrop{background:#050b17ba;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.guide-header{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:23px 27px 18px;background:#152236;z-index:1;border-bottom:1px solid #36485f}.guide-header h2{margin:7px 0 0;font-size:22px;color:#f0dcc0}.close-guide{width:44px;height:44px;flex-shrink:0;border:1px solid #5a6b83;border-radius:4px;background:#1c2d45;font-size:26px;line-height:1}.guide-body{padding:20px 27px 28px}.guide-lead{margin:0 0 22px;font-size:14px;line-height:1.95;color:#d2deed}.rule-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 26px;padding-bottom:22px;border-bottom:1px solid #3b4c64}.rule-summary b{color:#e7c99a;font-size:13px;font-weight:600}.rule-summary p{margin:7px 0 0;font-size:12px;line-height:1.9;color:#bdd0e6}.spell-guide,.country-guide{margin-top:20px}.spell-guide h3,.country-guide h3{margin:16px 0 12px;font-size:18px;color:#f0d7b0}.spell-guide p,.country-guide p{margin:6px 0;font-size:13px;line-height:1.9;color:#c5d5e9}.spell-guide article,.spell-guide .spell-entry{padding:13px 0;border-bottom:1px solid #2d4058}.spell-guide article h4,.spell-guide h4{margin:0 0 6px;font-size:14px}.school-list,.school-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.school-list>div,.school-grid>div{padding:10px;border:1px solid #394c65;background:#182740;font-size:12px;line-height:1.7}.school-list strong,.school-grid strong{color:#e2ceac}.faction-strip .country-schools{display:grid;grid-template-columns:repeat(8,1fr);gap:3px}.country-schools>span{font-size:10px;color:#b1c5df;white-space:nowrap}.country-schools b{font:11px var(--mono);color:#f1dcb5;padding-left:3px}.country-schools .country-outcome{grid-column:1 / -1;white-space:normal}#faction-strip .country-card{--team-color: var(--country-color, #bfd1e8);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:baseline;border-top-color:var(--country-color)}#faction-strip .country-name{color:var(--country-color);font-size:14px}#faction-strip .country-land{justify-self:end;font-size:17px;color:#f2eddf;white-space:nowrap}.country-health,.country-shield{display:block;color:#d1deef;font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums;white-space:nowrap}.country-health:after,.country-shield:after{content:"";display:block;width:100%;height:2px;margin-top:4px;background:linear-gradient(to right,var(--country-color) var(--hp, 100%),#27364a var(--hp, 100%))}.country-shield:after{background:linear-gradient(to right,#b1e4fc var(--shield, 100%),#27364a var(--shield, 100%))}.country-schools{grid-column:1 / -1;color:#adc0da;font-size:11px;line-height:1.6}#faction-strip .country-card.fallen{opacity:.65;background:#111923;border-top-style:dashed}#faction-strip .country-card.fallen .country-name{color:#b9c4d3}.guide-body:has(.rules-guide)>.guide-lead,.guide-body:has(.rules-guide)>.rule-summary{display:none}.spell-guide:has(.rules-guide){margin-top:0}.spell-guide .rules-guide{padding:0 0 18px;margin-bottom:21px;border-bottom:1px solid #526078}.rules-guide h3{margin-top:0;color:#ffe1b1}.rules-guide p{font-size:13px;line-height:1.95;margin:10px 0}.rules-guide strong{color:#f5deb6}.spell-guide .spell-guide-card{padding:16px 18px;margin-top:13px;border:1px solid #334961;border-left:3px solid var(--spell-color, #d4c194);border-radius:4px;background:#16263a;scroll-margin:25px}.spell-guide .spell-guide-card h3{margin:0 0 9px;color:var(--spell-color, #e6cba0);font-size:17px}.spell-guide-card h3 small{margin-left:6px;font-size:11px;font-weight:400;color:#acbdd3;white-space:nowrap}.spell-guide .spell-guide-card p{margin:7px 0;color:#cfdded;line-height:1.9;font-size:13px}.spell-guide .spell-guide-card.selected{background:#20334a;border-color:var(--spell-color, #e6cba0);box-shadow:inset 0 0 0 1px #c4d8fa15}.spell-guide .spell-guide-card .spell-coefficient{color:#adbed4;font-size:11px;margin-top:11px}.spell-guide .spell-guide-card .unlocked{color:#b5e7cd}.spell-guide .spell-guide-card .locked{color:#9fadc2}@media(max-width:1100px){#app{width:96vw;padding-top:12px}.round-state{gap:8px}.controls>button{padding-inline:8px}.faction-strip{gap:8px}.faction-strip>button{padding-inline:9px}.arena-subtitle{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:0s!important;animation-duration:0s!important}}@media(max-width:760px){body{min-width:320px}#app{width:100%;padding:12px max(10px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.masthead{min-height:48px;margin-bottom:10px}.brand{gap:7px}.brand-sigil{font-size:33px}h1{font-size:20px;letter-spacing:.06em}.brand p{font-size:10px;margin-top:4px;letter-spacing:0}.version{font-size:9px;margin-left:5px}.page-links{font-size:11px;gap:12px}.toolbar{display:flex;flex-wrap:wrap;gap:9px;padding:8px 0}.round-state{width:100%;gap:11px}#elapsed{font-size:18px}#phase-label{margin-left:auto;font-size:11px}.controls{width:100%;display:grid;grid-template-columns:auto 1fr auto auto;gap:5px}.controls>button,.speed-controls button{min-height:44px;font-size:11px;padding:6px 8px}.speed-controls{display:grid;grid-template-columns:repeat(3,1fr)}.speed-controls button{min-width:0;padding-inline:5px}#effects-button{display:none}.faction-strip{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:11px 0}.faction-strip>button{padding:7px 6px;min-height:76px;border-radius:3px}.faction-top,.country-top{flex-direction:column;align-items:flex-start;gap:3px}.faction-name,.country-name{font-size:12px}.faction-land,.country-land{font-size:15px}.faction-hp,.country-vitals{font-size:10px;line-height:1.7;margin-top:3px;white-space:normal}.faction-hp>span,.country-vitals>span{display:block;white-space:nowrap}.faction-state,.country-state,.faction-school,.school-summary{font-size:9px}.hp-bars,.faction-bars{display:none}.faction-strip .country-schools{grid-template-columns:repeat(4,1fr);gap:3px 1px}.country-schools>span{font-size:9px}.country-schools b{font-size:10px;padding-left:1px}.arena-heading{font-size:11px;min-height:26px;padding-bottom:7px}.altar-status{gap:6px;font-size:10px}.altar-status>span:first-child{font-size:13px}#altar-next{font-size:9px}.mobile-view-controls{display:flex;gap:5px;margin-bottom:7px}.mobile-view-controls button{flex:1;min-height:38px;border:1px solid #415670;border-radius:4px;background:#142236;color:#b9cce5;font-size:12px}.mobile-view-controls button.active,.mobile-view-controls button[aria-pressed=true]{color:#f4dfba;border-color:#b99c6b;background:#273344}.arena-viewport{aspect-ratio:var(--view-ratio, 4 / 3)}.arena-shell{width:var(--view-width, 154.1667%);transform:translate(var(--view-offset, -35.1351%));aspect-ratio:1480 / 720}#spell-slots{z-index:2}.spell-icon,.slot-icon{font-size:clamp(15px,1.4cqw,20px)}.spell-short,.slot-name{font-size:clamp(10px,1cqw,13px)}.spell-chance,.slot-chance{font-size:clamp(9px,.8cqw,11px)}.round-result{padding:23px 21px;max-width:90%}.round-result h2{font-size:23px}.round-result p{font-size:11px;line-height:1.7;margin-bottom:17px}.round-result button{min-height:44px;padding:10px 16px;font-size:12px}.loading{font-size:12px}.battle-notes{flex-wrap:wrap;gap:9px;margin-top:11px;min-height:0;padding-bottom:11px}.last-cast{width:100%;font-size:12px}#last-value{font-size:12px}#last-effect{margin-top:6px;font-size:11px;line-height:1.8}.field-stats{justify-content:space-between;gap:18px;width:100%}.field-stats>div{flex-direction:row;gap:10px;align-items:center;min-width:0}.field-stats strong{font-size:15px}.note-label{font-size:10px}.footer{flex-direction:column;gap:6px;font-size:9px;padding-top:10px;line-height:1.6}dialog{width:calc(100vw - 20px);max-height:calc(94dvh - env(safe-area-inset-top));border-radius:5px}.guide-header{padding:16px 17px 14px}.guide-header h2{font-size:20px}.guide-body{padding:16px 17px 22px}.guide-lead{font-size:13px;line-height:1.9;margin-bottom:18px}.rule-summary{grid-template-columns:1fr;gap:16px}.rule-summary b{font-size:13px}.rule-summary p{font-size:12px;line-height:1.9}.school-list,.school-grid{grid-template-columns:1fr}#faction-strip .country-card{grid-template-columns:minmax(0,1fr);gap:4px;padding:8px 6px;align-content:start}#faction-strip .country-name{font-size:12px}#faction-strip .country-land{justify-self:start;font-size:12px;letter-spacing:-.03em}.country-health,.country-shield{font-size:10px;line-height:1.55;letter-spacing:-.035em}.country-health:after,.country-shield:after{margin-top:2px;height:1px}.country-schools{grid-column:1;font-size:9px;line-height:1.55;margin-top:1px;overflow-wrap:anywhere}.spell-guide .rules-guide{padding-bottom:14px;margin-bottom:15px}.rules-guide p{font-size:12px;line-height:1.95}.spell-guide .spell-guide-card{padding:13px 12px;margin-top:10px}.spell-guide .spell-guide-card h3{font-size:16px;line-height:1.6}.spell-guide-card h3 small{font-size:10px;margin-left:4px}.spell-guide .spell-guide-card p{font-size:12px}}@media(max-width:370px){.page-links{gap:8px;font-size:10px}.controls>button{padding-inline:5px}.faction-strip>button{padding-inline:4px}.faction-hp,.country-vitals{font-size:9px}#faction-strip .country-card{padding-inline:4px}#faction-strip .country-land{font-size:11px}.country-health,.country-shield{font-size:9px}}
