:root{--ink:#49464d;--muted:#9c8e79;--paper:#f8f5ea;--line:#e4ddca;--green:#8fa88a;--red:#a75b4e}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px 'Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif}button,input,select{font:inherit}button,summary,select{cursor:pointer}button{touch-action:manipulation}button:disabled{opacity:.45;cursor:default}button:focus-visible,summary:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #9ba78b;outline-offset:3px}[hidden]{display:none!important}h1,h2,p{margin-top:0}.gamebar{display:flex;align-items:center;gap:18px;height:56px;padding:0 28px;border-bottom:1px solid var(--line)}.brand{color:#6f644e;text-decoration:none;font-size:19px;font-weight:750}.gamebar-divider{height:18px;border-left:1px solid #d4cbb7}.chapter-label{color:var(--muted);font-size:13px}.gamebar nav{display:flex;gap:8px;margin-left:auto}.menu-button,.quiet{border:1px solid var(--line);border-radius:11px;background:transparent;color:#9d8c6f;padding:9px 14px;font-size:13px}.menu-button:hover:not(:disabled),.quiet:hover{background:#eee8d6}.menu-button span:not(:empty){margin-left:6px;color:#aa6151;font-weight:700}.game-shell{max-width:1800px;margin:auto;padding:18px 24px 24px}.region-ribbon{display:flex;align-items:center;gap:20px;min-height:58px;margin-bottom:16px}.region-title{display:flex;gap:12px;align-items:center}.territory-number{font:24px Georgia,serif;color:#b2a486}.region-title small{font-size:12px;color:var(--muted)}.region-title h1{font-size:23px;color:#79664b;margin:4px 0 0}.campaign-steps{display:flex;justify-content:center;align-items:center;gap:20px;flex:1;color:#b4aa93;font-size:13px}.campaign-steps i{font-style:normal;color:#d4cbb8}.campaign-steps span{padding:8px 15px;border-radius:20px}body[data-phase=home] [data-step=home],body[data-phase=soldiers] [data-step=soldiers],body[data-phase=captain] [data-step=captain],body[data-phase=result] [data-step=captain]{background:#ebe3cc;color:#9d8259;font-weight:700}.territory-progress{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px}.territory-progress strong{font-weight:400;font-size:19px;color:#88744f}.territory-progress small{font-size:13px;color:#b0a187}.layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;align-items:stretch}.battle-wrap{min-width:0;position:relative}.field{height:clamp(550px,calc(100dvh - 190px),930px);position:relative;isolation:isolate;overflow:hidden;background:#dbb47c;border:1px solid #ddd0b3;border-radius:18px}.field[data-phase=captain],.field[data-phase=result]{background-image:none}.field-shade{position:absolute;inset:0;pointer-events:none;background:#f4edcd0a;z-index:0}.welcome{position:absolute;inset:0;pointer-events:none;z-index:5}.hero-nameplate{position:absolute;left:50%;top:80%;transform:translateX(-50%);text-align:center;padding:10px 28px;background:#faf4dcf2;border:1px solid #d4c5a5;border-radius:11px;color:#7a694f;white-space:nowrap}.hero-nameplate small,.hero-nameplate span{display:block;color:#a19173;font-size:12px}.hero-nameplate strong{display:block;font-size:20px;margin:5px 0}.command-deck{min-width:0;border:1px solid var(--line);border-radius:17px;padding:22px 18px;background:#fcfaf2}.setup{position:static;width:100%}.window-heading{padding:0 0 20px;border-bottom:1px solid var(--line);margin-bottom:23px}.window-heading span{display:none}.window-heading h2{font-size:19px;color:#847152;margin:0}.label{display:block;color:#9f8c70;font-size:13px;margin-bottom:9px}.window-body select{width:100%;padding:12px;border:1px solid #ded5c3;border-radius:9px;background:#fffdf7;color:#71624e;font-size:14px}.expedition-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px;margin:17px 0 28px;font-size:12px;color:#a18f72}.bar{height:7px;width:100%;background:#e6e1d2;border-radius:8px;overflow:hidden}.bar i{display:block;height:100%;background:#a5b68d;transition:width .2s}.setting-row{margin:0 0 21px}.segmented{display:flex;gap:6px}.segmented button{flex:1;padding:11px 6px;border:1px solid #ded6c4;border-radius:9px;background:#fffdf7;color:#a29175;font-size:13px}.segmented button[aria-pressed=true]{background:#ece7d6;border-color:#b9b098;color:#7e6a47;font-weight:700}.primary{width:100%;padding:14px 17px;background:#788d76;color:#fffef9;border:1px solid #71856f;border-radius:10px;font-weight:750;font-size:16px}.primary:hover{background:#657d64}.setup-tip{font-size:12px;line-height:1.8;color:#ae9f85;text-align:center;margin:14px 0 0}.idle-footer{border-top:1px solid var(--line);margin-top:26px;padding-top:22px;font-size:13px;color:#a28f72;line-height:1.7}.idle-footer strong{display:block;font-size:13px;margin-bottom:7px;color:#8c7858}.rule-details{font-size:12px;margin-top:19px;color:#ad9a7e}.rule-details summary{font-size:12px}.rule-details p{margin:12px 0 0}.actor{position:absolute;transform:translate(-50%,-100%);z-index:3;pointer-events:none}.sprite{position:relative;display:block;line-height:0;filter:saturate(.86)}.sprite svg,.sprite img{display:block;width:100%;height:100%;object-fit:contain;overflow:visible}.hero{left:50%;top:74%;width:310px}.hero .sprite{height:220px}.ground-shadow{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);width:44%;height:7%;border-radius:50%;background:#58482926;filter:blur(2px);pointer-events:none}.actor-label{position:relative;display:block;width:max-content;margin:-4px auto 0;padding:4px 12px;background:#fbf5dded;border-radius:15px;font-size:12px;color:#a08f70}.field[data-phase=home] .hero{left:50%;top:77%;width:395px}.field[data-phase=home] .hero .sprite{height:310px}.field[data-phase=home] .actor-label{display:none}.field[data-phase=captain] .hero,.field[data-phase=result] .hero{left:23%;top:84%;width:340px}.field[data-phase=captain] .hero .sprite,.field[data-phase=result] .hero .sprite{height:255px}.boss{left:79%;top:84%;width:340px}.boss .sprite{height:255px;transform:scaleX(-1)}.hud{position:absolute;inset:0;pointer-events:none;z-index:8}.health-card{position:absolute;left:50%;top:calc(74% - 273px);transform:translateX(-50%);width:173px;padding:7px 9px;background:#fffbedeF;border-radius:8px}.health-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;color:#a3957c;font-size:12px}.health-heading strong{font-size:12px;font-weight:500}.health-heading small{font-size:12px;font-weight:700;color:#7e775d}.shield-icon{display:none}.hp-bar{height:6px}.field[data-phase=captain] .health-card{left:23%;top:calc(84% - 308px)}.stage-label{position:absolute;top:16px;right:18px;display:flex;flex-wrap:wrap;gap:8px 15px;align-items:center;padding:9px 13px;background:#fffaf0ee;border-radius:10px;width:146px;color:#9b8765}.stage-label small{font-size:12px}.stage-label b{font-size:15px;color:#817257}.stage-label .bar{height:4px}.field-footer{display:flex;align-items:center;gap:8px;font-size:12px;color:#ac9d80;padding:9px 5px}.tiny-diamond{display:none}.edition{display:none}.enemy{position:absolute;border:0;background:none;padding:0;width:133px;transform:translate(-50%,-100%);z-index:4;overflow:visible}.enemy .sprite{width:133px;height:129px;margin:auto}.enemy .ground-shadow{bottom:0;width:55%;height:10px}.bubble{position:relative;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;min-width:115px;max-width:185px;width:max-content;background:#fff9e7f7;border:2px solid #c7c3a2;border-radius:12px;padding:9px 13px 12px;margin-bottom:5px;color:#72654d}.bubble b{font:700 21px Georgia,serif;line-height:1.15}.bubble small{font-size:12px;color:#a4997d}.enemy-timer{height:3px;position:absolute;bottom:4px;left:5%;max-width:90%;background:#a4b895;border-radius:4px}.target .bubble{border:3px solid #9b4650;background:#fff8ed;box-shadow:0 0 0 2px #fff6e6a6}.target .enemy-timer{background:#9b4650}.target .sprite{filter:saturate(.86) drop-shadow(1px 0 1px #9b465099) drop-shadow(-1px 0 1px #9b465077)}.current-question{text-align:center;padding:17px 0 25px;border-bottom:1px solid var(--line);margin-bottom:17px}.current-question small{display:block;font-size:12px;color:#ad9a7b;margin-bottom:15px}.current-question strong{display:block;overflow-wrap:anywhere;font:700 34px Georgia,serif;color:#514951}.command-caption{font-size:13px;color:#a08a69;margin-bottom:13px}.command-caption>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.command-caption strong{font-size:13px;font-weight:500}.command-caption>small{display:block;font-size:12px;color:#b4a286;margin-top:7px}.pos-badge{color:#b6a489;font-size:12px}.time-track{height:4px;background:#ece7da;border-radius:5px;margin-bottom:16px;overflow:hidden}.time-track i{display:block;height:100%;background:#b2bea2;width:100%}.answer-controls{display:flex;flex-direction:column;gap:11px}.choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}.choices button{position:relative;min-width:0;min-height:72px;padding:17px 10px;background:#fff;border:1px solid #e0dbe5;border-radius:13px;color:#504b57;font-size:17px;font-weight:750;line-height:1.5}.choices button:hover{border-color:#a6b296;background:#f6f9f2}.choices button:active{background:#e6eddd}.choices kbd{display:none}.reveal{border:1px solid #e4ddcc;border-radius:9px;background:#f2efe3;color:#9d8e70;padding:11px 10px;font-size:13px}.reveal span{font-size:11px;margin-left:9px;color:#b3a387}.feedback{margin-top:16px;min-height:100px;padding:15px;background:#f2f1e7;border:2px solid #afb9ab;border-radius:11px;font-size:14px;line-height:1.8;color:#788578}.feedback strong{display:block;font:700 23px Georgia,serif;color:#687c61;margin-bottom:8px}.feedback span{display:block;color:#6f7c71}.feedback small{display:block;font-size:11px;color:#a1a38d;margin-top:7px}.feedback.wrong{border-color:#c5a798;background:#f8efe5}.feedback.wrong strong{color:#a46750}#answerForm{display:flex;flex-direction:column;gap:9px}#answerForm input{width:100%;min-width:0;padding:14px 12px;font-size:17px;color:#615646;background:#fff;border:1px solid #dcd3bf;border-radius:9px}.duel-question{position:absolute;top:43%;transform:translate(-50%,-50%);z-index:5;background:#fff8e4;border:2px solid #baab87;border-radius:12px;padding:10px 23px;min-width:145px;text-align:center;display:flex;flex-direction:column;gap:5px}.duel-question strong{font:700 28px Georgia,serif;color:#61513d}.duel-question small,.duel-question span{font-size:12px;color:#aa946e}.spell-layer{position:absolute;inset:0;z-index:7;pointer-events:none}.spell-bolt{position:absolute;width:14px;height:7px;border-radius:50%;background:#fff0ad;box-shadow:0 0 5px 2px #dca94f;animation:spell-flight .4s ease-in forwards}@keyframes spell-flight{from{left:var(--from-x);top:var(--from-y);opacity:1}85%{opacity:1}to{left:var(--to-x);top:var(--to-y);opacity:0}}.float{position:absolute;left:50%;top:43%;z-index:12;color:#fff9e5;font-size:24px;font-weight:900;text-shadow:0 2px 2px #694f2d;animation:rise .8s ease-out forwards;pointer-events:none}.float.bad{color:#ffe0cb}@keyframes rise{from{transform:translate(-50%,0);opacity:1}to{transform:translate(-50%,-35px);opacity:0}}.hit .sprite{filter:brightness(1.5) sepia(.2)}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#55493545;z-index:12;padding:25px;text-align:center}.overlay>div{padding:26px 35px;background:#fbf6e9f5;border:1px solid #d4c6a9;border-radius:15px;color:#79664d}.overlay h2{font-size:27px;margin:13px 0}.overlay p{font-size:14px;line-height:1.8;color:#998565;margin-bottom:0}.eyebrow,.countdown small{font-size:12px;color:#af9975}.countdown h2{font-size:40px}.result-panel h2{font-size:21px;color:#8d7754;margin-bottom:24px}.result-panel .eyebrow{display:block;margin-bottom:12px}.result-stat{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--line);font-size:12px;color:#ac9876}.result-stat b{font-size:17px;color:#8e7650}.result-panel .primary{margin:23px 0 9px}.result-panel .quiet{width:100%}.result-panel .micro{font-size:12px;line-height:1.6;margin-top:16px;color:#b29f7c}dialog{border:1px solid #d6cbb3;border-radius:16px;background:#fcf9ef;color:#776346;box-shadow:0 15px 70px #30241126;max-width:440px;padding:26px}dialog::backdrop{background:#39372a70}dialog h2{font-size:23px}dialog p{font-size:14px;line-height:1.7}#leaveDialog>div{display:flex;gap:12px}dialog .primary{width:auto;font-size:14px;padding:10px 20px}.notebook-dialog{width:min(920px,94vw);max-width:920px;max-height:85dvh;padding:23px 28px}.dialog-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:14px}.dialog-heading h2{margin:4px 0 0}.dialog-heading small{color:#aa997a;font-size:12px}.close-button{border:1px solid #ded4c1;border-radius:8px;background:transparent;color:#a59170;width:35px;height:35px;font-size:25px}.note-tabs{display:flex;gap:8px;margin-top:20px}.note-tabs button{background:transparent;border:1px solid #ded5c1;border-radius:8px;padding:9px 18px;color:#a18c69;font-size:14px}.note-tabs button[aria-pressed=true]{background:#eae5d4;color:#7e6d4e}.note-tabs b{font-size:12px;margin-left:7px}.note-help{font-size:12px;color:#b09f80;margin:13px 0}.word-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;align-items:start}.word-card{border:1px solid #e0d7c3;border-radius:8px;background:#fffdf7;padding:12px;min-width:0}.word-card summary{display:flex;align-items:center;justify-content:space-between;list-style:none;gap:5px}.word-card summary::-webkit-details-marker{display:none}.word-card summary span{font:700 16px Georgia,serif;overflow-wrap:anywhere}.word-card summary small{display:block;font:12px system-ui,sans-serif;color:#aa997b;margin-top:5px}.word-card i{font-style:normal;font-size:13px;color:#99a588}.word-card p{font-size:13px;margin:15px 0 8px;line-height:1.6}.word-card>small{font-size:12px;color:#ad9979;line-height:1.6}.empty-note{grid-column:1/-1;color:#ad9979;padding:20px;text-align:center}.save-note{font-size:12px;text-align:center;color:#b3a487;margin-top:20px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#saveWarning{color:#aa5945;font-size:13px;padding:8px;text-align:center;margin:0}
@media(min-width:1500px){.layout{grid-template-columns:minmax(0,1fr) 360px}.command-deck{padding:25px 20px}.choices button{min-height:80px}.hero .sprite{height:250px}.hero{width:340px}.health-card{top:calc(74% - 303px)}}
@media(max-width:1100px){.game-shell{padding:15px}.layout{grid-template-columns:minmax(0,1fr) 280px;gap:12px}.campaign-steps{gap:3px}.campaign-steps span{padding:7px 9px}.territory-progress{display:none}.command-deck{padding:18px 14px}.choices button{font-size:15px;padding:14px 7px}.hero{width:265px}.hero .sprite{height:195px}.health-card{top:calc(74% - 248px)}.field[data-phase=captain] .hero,.boss{width:250px}.field[data-phase=captain] .hero .sprite,.boss .sprite{height:200px}.field[data-phase=captain] .health-card{top:calc(84% - 253px)}.word-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.gamebar{height:49px;padding:0 12px}.brand{font-size:17px}.gamebar-divider,.chapter-label{display:none}.menu-button{font-size:12px;padding:7px 10px}.game-shell{padding:10px 9px 18px}.region-ribbon{min-height:45px;margin-bottom:12px;gap:8px}.region-title h1{font-size:19px}.region-title small{font-size:11px}.territory-number{font-size:21px}.campaign-steps{display:none}.territory-progress{display:flex;margin-left:auto;gap:5px;font-size:11px}.territory-progress strong{font-size:16px}.layout{display:flex;flex-direction:column;gap:10px}.field{height:440px;min-height:0;border-radius:13px;background-position:center}.field[data-phase=home]{height:300px;background-position:center 63%}.field[data-phase=home] .hero{top:78%;width:260px}.field[data-phase=home] .hero .sprite{height:200px}.hero-nameplate{top:79%;padding:6px 20px}.hero-nameplate small,.hero-nameplate span{display:none}.hero-nameplate strong{font-size:16px;margin:0}.hero{width:205px}.hero .sprite{height:148px}.actor-label{font-size:11px;padding:3px 9px}.health-card{top:calc(74% - 196px);width:145px;padding:6px 8px}.health-heading strong,.health-heading small{font-size:11px}.stage-label{top:10px;right:11px;width:127px;padding:7px 10px;gap:6px 10px}.stage-label small{font-size:11px}.stage-label b{font-size:13px}.enemy{width:101px}.enemy .sprite{height:100px;width:101px}.bubble{min-width:98px;max-width:146px;padding:7px 9px 10px;margin-bottom:3px}.bubble b{font-size:18px}.bubble small{font-size:11px}.field-footer{font-size:11px;padding:6px 2px;line-height:1.5}.command-deck{padding:14px 13px;border-radius:13px}.window-heading{padding-bottom:12px;margin-bottom:16px}.window-heading h2{font-size:17px}.setting-row{display:flex;align-items:center;gap:12px;margin-bottom:12px}.setting-row .label{margin:0;min-width:82px}.segmented{flex:1}.expedition-summary{margin:13px 0 20px}.setup-tip{margin:10px 0 0}.idle-footer{margin-top:18px;padding-top:14px;font-size:12px}.idle-footer strong{font-size:12px}.rule-details{margin-top:12px}.current-question{padding:0 0 10px;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:12px}.current-question small{margin:0;font-size:11px}.current-question strong{font-size:25px}.command-caption{margin-bottom:9px;display:flex;align-items:center;justify-content:space-between;gap:10px}.command-caption>div{gap:8px}.command-caption strong{font-size:12px}.command-caption>small{font-size:10px;margin:0}.time-track{margin-bottom:10px}.answer-controls{display:grid;grid-template-columns:1fr 76px;gap:8px}.choices{gap:8px}.choices button{min-height:48px;font-size:15px;padding:8px;border-radius:10px}.reveal{padding:8px 5px;font-size:12px}.reveal span{display:block;margin:6px 0 0;font-size:10px;line-height:1.6}.feedback{min-height:57px;margin-top:11px;padding:10px 12px;font-size:12px}.feedback strong{display:inline;font-size:17px;margin:0 10px 0 0}.feedback span{display:inline;font-size:12px}.feedback small{display:none}#answerForm{display:grid;grid-template-columns:1fr 65px;gap:7px}#answerForm input{font-size:16px;padding:10px}#answerForm .primary{font-size:14px;padding:8px}.field[data-phase=captain] .hero,.field[data-phase=result] .hero,.boss{width:200px}.field[data-phase=captain] .hero .sprite,.field[data-phase=result] .hero .sprite,.boss .sprite{height:155px}.field[data-phase=captain] .health-card{top:calc(84% - 203px);width:123px}.duel-question{min-width:120px;padding:9px 13px}.duel-question strong{font-size:23px}.duel-question small,.duel-question span{font-size:11px}.overlay>div{padding:19px 18px}.overlay h2{font-size:23px}.overlay p{font-size:13px}.countdown h2{font-size:36px}.result-panel{display:grid;grid-template-columns:1fr 1fr;gap:7px 14px}.result-panel h2,.result-panel .eyebrow,.result-panel .micro{grid-column:1/-1;margin:0}.result-panel h2{font-size:20px;margin:7px 0}.result-panel .primary,.result-panel .quiet{margin:12px 0}.result-stat{font-size:11px;padding:10px 0}.result-stat b{font-size:15px}.notebook-dialog{padding:19px 15px}.word-list{grid-template-columns:1fr 1fr}.word-card{padding:10px}.word-card summary span{font-size:15px}dialog{max-width:92vw;padding:22px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.spell-bolt{display:none}}

.target-indicator{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:visible}.target-indicator line{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke}.target-line-under{stroke:#fff4df;stroke-width:5;opacity:.65}.target-line{stroke:#9b4650;stroke-width:2.5;opacity:.9}.target-tag{display:none;position:absolute;top:-16px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#9b4650;color:#fff6ed;font-size:10px;font-weight:600;padding:2px 8px;border-radius:5px}.target .target-tag{display:block}.design-link{text-decoration:none;display:inline-flex;align-items:center}body[data-phase=soldiers] .design-link,body[data-phase=captain] .design-link{display:none}@media(max-width:760px){.gamebar{gap:8px}.design-link{padding:7px;font-size:11px}.gamebar nav{gap:5px}.target-line{stroke-width:2.25}.command-caption>small{max-width:145px}}
/* Kingdom progression follows the approved blue-and-gold castle palette. */
:root{--ink:#3c4350;--muted:#766d60;--line:#d9d0bc}
.chapter-label,.label,.menu-button,.quiet,.command-caption strong,.setup-tip,.rule-details,.field-footer,.note-help{color:#726650}.label,.menu-button,.quiet,.segmented button,.setup-tip,.rule-details,.rule-details summary,.command-caption strong,.command-caption>small,.field-footer{font-size:14px}.primary{background:#405d7a;border-color:#354e68}.primary:hover{background:#304963}.window-heading h2,.region-title h1{color:#40556d}.field[data-phase=home],.field[data-phase=trial],.field[data-phase=result][data-encounter=kingdom]{background-image:none}.kingdom-card{margin:18px 0;padding:15px;border:1px solid #c7cfd6;border-radius:10px;background:#f1f4f6}.trust-heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px;color:#425d78;font-size:16px}.kingdom-card .bar i{background:#6788a6}.kingdom-card p{color:#596879;font-size:14px;line-height:1.6;margin:10px 0}.trial-button{width:100%;padding:11px 10px;background:#fffdfa;border:1px solid #adbac6;color:#405b78;border-radius:8px;font-size:14px;font-weight:700}.trial-button:hover:not(:disabled){background:#e8eff4}.trial-button[aria-pressed=true]{background:#405d7a;color:white}.equipment-card{margin-top:18px;border-top:1px solid var(--line);padding-top:18px}.equipment-card small{font-size:13px;color:#8b713f}.equipment-card h3{margin:7px 0;color:#405b78}.equipment-card p{font-size:14px;color:#716650}.pronunciation-toggle{display:flex;align-items:center;gap:9px;font-size:14px;margin:14px 0 5px;color:#596274}.pronunciation-toggle input{width:18px;height:18px;accent-color:#405d7a}.pronunciation-help{font-size:12px;color:#7c7468;margin:0 0 16px}.pronunciation{font:14px/1.5 'Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif!important;color:#716858;display:block;margin-top:5px;letter-spacing:0}.pronunciation:empty{display:none}.bubble .pronunciation{margin:0;font-size:13px!important}.word-card summary .pronunciation{font-size:13px!important;font-weight:400}.current-question>div{min-width:0}.current-question .pronunciation{font-size:16px!important}.feedback .pronunciation{font-size:13px!important;margin:-3px 0 6px}.hero-motion{transform-origin:50% 90%}.sprite svg{overflow:hidden}.field[data-phase=trial] .hero{left:23%;top:85%;width:300px}.field[data-phase=trial] .hero .sprite{height:245px}.field[data-phase=trial] .health-card{left:23%;top:calc(85% - 298px)}.field[data-encounter=kingdom] .boss .sprite{transform:none}.field[data-phase=trial] .boss{left:77%;top:85%;width:345px}.field[data-phase=trial] .boss .sprite{height:270px}.field[data-phase=trial] .duel-question{top:41%;max-width:90%}.duel-question strong{overflow-wrap:anywhere}.guardian-panel{position:absolute;z-index:8;top:18px;left:18px;width:min(300px,calc(100% - 192px));background:#fffaf0f2;border:1px solid #aeb8c4;border-radius:12px;padding:13px 15px;color:#40566e}.guardian-panel>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.guardian-panel strong{font-size:16px}.guardian-panel span{font-size:13px;white-space:nowrap}.guardian-panel .bar i{background:#5f7b9a}.shield-pips{display:flex;gap:7px;margin-top:10px}.shield-pips i{width:33px;height:8px;border:1px solid #728ba1;border-radius:3px;background:#e4e6e8}.shield-pips .filled{background:#477ba5}.guardian-panel p{font-size:14px;margin:7px 0 0}.guardian-panel.exposed{border-color:#b1934d;background:#fff6ddeb}.shield-art{position:absolute;left:76%;top:22%;width:92px;height:92px;transform:translateX(-50%);z-index:4;border-radius:50%;overflow:hidden;pointer-events:none}.lion-effect{width:100%;height:100%;display:block}.overlay .lion-effect{width:90px;height:90px;margin:auto;border-radius:50%;overflow:hidden}.map-dialog{width:min(1100px,96vw);max-width:1100px;max-height:94dvh}.map-dialog img{display:block;width:100%;max-height:65dvh;object-fit:contain;margin:16px 0}.map-dialog p{margin:10px 0}.map-dialog .primary{display:block;margin-left:auto}.field[data-phase=trial] .stage-label{width:146px}body[data-phase=trial] .design-link{display:none}.overlay .primary{margin-top:20px}.result-stat{font-size:14px;color:#72654e}.setup .window-heading{margin-bottom:16px}.expedition-summary{margin-bottom:20px}.health-heading strong{color:#655b4d}.hero-nameplate{color:#3e526b}.hero-nameplate span{color:#726650}
@media(max-width:1100px){.field[data-phase=trial] .hero{width:240px}.field[data-phase=trial] .hero .sprite{height:210px}.field[data-phase=trial] .boss{width:280px}.field[data-phase=trial] .boss .sprite{height:235px}.field[data-phase=trial] .health-card{top:calc(85% - 263px)}.guardian-panel{width:min(270px,calc(100% - 172px));padding:10px}.guardian-panel strong{font-size:14px}.guardian-panel>div:first-child{flex-wrap:wrap;gap:5px}.shield-art{width:75px;height:75px;top:24%}}
@media(max-width:760px){.gamebar{height:auto;min-height:52px;flex-wrap:wrap;padding:8px 10px;gap:8px}.gamebar nav{flex-wrap:wrap;gap:5px}.menu-button,.design-link{font-size:12px;padding:7px}.field[data-phase=trial] .hero{left:23%;top:87%;width:185px}.field[data-phase=trial] .hero .sprite{height:165px}.field[data-phase=trial] .boss{left:76%;top:87%;width:215px}.field[data-phase=trial] .boss .sprite{height:195px}.field[data-phase=trial] .health-card{top:calc(87% - 216px);width:145px}.guardian-panel{top:10px;left:10px;width:calc(100% - 158px);min-width:160px;padding:10px}.guardian-panel strong,.guardian-panel p{font-size:13px}.field[data-phase=trial] .stage-label{width:125px}.field[data-phase=trial] .duel-question{top:43%;padding:8px 13px}.shield-art{width:60px;height:60px;top:30%;left:80%}.current-question .pronunciation{font-size:14px!important}.current-question>div{text-align:right}.feedback .pronunciation{display:inline!important;margin:0 10px 0 0}.kingdom-card{margin-top:14px}.field-footer{font-size:12px}.setup-tip{font-size:13px}.command-caption>small{font-size:12px}.equipment-card{margin-top:14px}.result-panel .micro{font-size:13px}.map-dialog{padding:16px}.health-heading strong,.health-heading small,.actor-label{font-size:12px}.word-card summary .pronunciation{font-size:12px!important}.field[data-phase=trial] .stage-label small{font-size:12px}}

body[data-phase=trial] [data-step=trial]{background:#e5edf4;color:#405d7a;font-weight:700}@media(max-width:1300px){.campaign-steps{gap:3px}.campaign-steps span{padding:7px 8px}}

.course-picker{margin:0 0 18px;border:1px solid #c7cfd6;background:#f8fafb;border-radius:13px;padding:14px}.course-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.course-tabs button{text-align:left;border:1px solid #c3ccd4;border-radius:9px;background:#fff;padding:13px 16px;color:#536275}.course-tabs button strong{display:block;font-size:17px}.course-tabs button span{display:block;font-size:13px;margin-top:5px}.course-tabs button[aria-pressed=true]{background:#405d7a;color:white;border-color:#405d7a;box-shadow:inset 4px 0 #e1bf78}.level-tabs{display:flex;gap:8px;margin-top:12px}.level-tabs button{background:#fff;border:1px solid #c3ccd4;padding:9px 16px;border-radius:8px;color:#536275;font-size:14px}.level-tabs button[aria-pressed=true]{background:#e7edf3;border-color:#6a849c;color:#304c68;font-weight:700}.course-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px;color:#657285;font-size:13px}.course-meta p{margin:0}.course-meta span{color:#7a756b}.faction-filter{display:flex;gap:12px;align-items:center;font-size:14px;margin:16px 0;color:#596879}.faction-filter select{min-width:0;flex:1;padding:9px;background:#fffdf7;border:1px solid #d5ccb9;border-radius:8px;color:#5c6170}.word-topic{font-size:12px!important;color:#526e8a}.vocabulary-source{font-size:13px;color:#726955;margin-top:20px;line-height:1.6}.vocabulary-source a{color:#405d7a}.vocabulary-source p{font-size:13px;margin:10px 0}.field{height:clamp(520px,calc(100dvh - 325px),850px)}@media(max-width:760px){.course-picker{padding:10px;margin-bottom:12px}.course-tabs button{padding:12px 10px}.course-tabs button strong{font-size:15px}.course-tabs button span{font-size:12px}.level-tabs{gap:6px}.level-tabs button{flex:1;padding:9px 4px;font-size:13px}.course-meta{font-size:12px;gap:5px}.field{height:440px}.faction-filter{flex-wrap:wrap}.faction-filter select{flex-basis:100%}}

.faction-overview{border-top:1px solid #d5dce2;padding-top:10px;margin-top:12px;font-size:14px;color:#536275}.faction-overview p{font-size:13px;margin:10px 0}.faction-overview>div{display:flex;flex-wrap:wrap;gap:7px}.faction-overview button{flex:1 1 125px;border:1px solid #c8d2dc;background:#fff;border-radius:8px;padding:10px;text-align:left;color:#4b6075}.faction-overview button strong,.faction-overview button span{display:block}.faction-overview button strong{font-size:14px}.faction-overview button span{font-size:12px;margin-top:4px;color:#716e64}

/* Questions and their pronunciation live in the battlefield only. */
.field-feedback{position:absolute;z-index:9;left:14px;top:14px;width:min(370px,calc(100% - 190px));min-height:0;margin:0;padding:10px 14px;background:#fbf9eef5;box-shadow:0 4px 14px #1f30401a;pointer-events:none;font-size:14px;line-height:1.5}.field-feedback strong{display:inline;font-size:19px;margin:0 9px 0 0}.field-feedback .pronunciation{display:inline!important;font-size:13px!important;margin:0 8px 0 0}.field-feedback>span:not(.pronunciation){display:block;font-size:14px;margin-top:3px}.field-feedback small{display:none}.field[data-phase=trial] .field-feedback{left:50%;top:123px;transform:translateX(-50%);width:min(380px,90%)}.field[data-phase=trial] .duel-question{top:53%}.field[data-phase=trial] .shield-art{top:36%;left:85%}.answer-panel .command-caption{margin-top:5px}/* Preserve the contact flash; rotate its left-facing crescent toward the target. */
.sword-impact{position:absolute;width:150px;height:150px;transform:translate(-50%,-50%) rotate(var(--impact-angle,0deg));border-radius:50%;overflow:hidden;pointer-events:none}
.sword-impact .lion-effect{filter:brightness(1.25);animation:sword-contact .46s ease-out forwards;transform-origin:center}
@keyframes sword-contact{0%{opacity:0;transform:scale(.45) rotate(-20deg)}25%{opacity:.95}100%{opacity:0;transform:scale(1.15) rotate(15deg)}}
.pose-stack{position:relative;display:block;width:100%;height:100%;transform-origin:50% 94%;transition:transform 240ms cubic-bezier(.22,.65,.35,1)}
.pose-layer{position:absolute;inset:0;display:block;opacity:0;transition:opacity 120ms ease-in-out;pointer-events:none}
.sprite[data-pose="0"] .pose-layer[data-frame="0"],.sprite[data-pose="1"] .pose-layer[data-frame="1"],.sprite[data-pose="2"] .pose-layer[data-frame="2"]{opacity:1}
.hero .sprite[data-pose="1"] .pose-stack{transform:translateX(-2%) rotate(-1deg)}
.hero .sprite[data-pose="2"] .pose-stack{transform:translateX(3%) rotate(1deg);transition-duration:180ms}
/* Reserve the top centre for progress, away from all four enemy approaches. */
.field[data-phase=soldiers] .stage-label{top:12px;left:50%;right:auto;transform:translateX(-50%);width:210px;max-width:calc(100% - 24px);padding:8px 13px;justify-content:space-between;gap:5px 12px;pointer-events:none}
.field[data-phase=soldiers] .stage-label .bar{position:absolute;bottom:3px;left:13px;right:13px;width:auto;height:3px}
.field[data-phase=soldiers] .field-feedback{top:55px;left:50%;transform:translateX(-50%);width:min(360px,calc(100% - 24px));max-width:360px;text-align:center;padding:3px 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:24px;height:30px}
.field[data-phase=soldiers] .field-feedback strong{font-size:16px}
.field[data-phase=soldiers] .field-feedback>span:not(.pronunciation){display:inline;font-size:13px;margin:0}
.field[data-phase=soldiers] .health-card{top:max(96px,calc(74% - 273px))}
@media(min-width:1500px){.field[data-phase=soldiers] .health-card{top:max(96px,calc(74% - 303px))}}
@media(max-width:1100px){.field[data-phase=soldiers] .health-card{top:max(96px,calc(74% - 248px))}}
@media(max-width:760px){.field[data-phase=soldiers] .health-card{top:calc(74% - 196px)}}
@media(max-width:760px){.field-feedback{top:10px;left:10px;padding:8px 10px;width:calc(100% - 160px);max-width:270px}.field-feedback strong{font-size:17px;overflow-wrap:anywhere}.field-feedback>span:not(.pronunciation){font-size:13px}.field-feedback .pronunciation{font-size:12px!important}.field[data-phase=trial] .field-feedback{top:120px;width:88%;max-width:320px}.field[data-phase=trial] .duel-question{top:55%;max-width:72%}.field[data-phase=trial] .shield-art{top:35%;left:86%}.sword-impact{width:110px;height:110px}.duel-question strong{font-size:25px}.bubble b{font-size:20px}}
@media(prefers-reduced-motion:reduce){.pose-stack,.pose-layer{transition:none!important}.sword-impact .lion-effect{animation:none!important;opacity:.65}}

.sprite svg.hero-pose{overflow:visible}.field[data-phase=home] .hero .sprite{overflow:visible}

.faction-overview button[aria-pressed=true]{background:#e7edf3;border-color:#5f7d99;box-shadow:inset 3px 0 #b59a64}.faction-overview button[aria-pressed=true] strong{color:#304c68}#expeditionHint:empty{display:none}#expeditionHint{font-size:12px;line-height:1.6;color:#726650;margin:9px 0}

/* Correct answer → sword contact → visible hit pause → defeated soldier exits. */
.enemy.awaiting-impact{pointer-events:none;opacity:1;cursor:default}
.enemy.awaiting-impact .bubble{visibility:hidden}
.enemy.awaiting-impact.departing{animation:soldier-defeat var(--defeat-duration,320ms) ease-in forwards}
@keyframes soldier-defeat{from{opacity:1;translate:0 0}to{opacity:0;translate:0 8px}}
@media(prefers-reduced-motion:reduce){.enemy.awaiting-impact.departing{animation:none!important;opacity:0;translate:none}}

/* A freely chosen faction owns the arena theme; trial actors face each other. */
.field[data-faction]:not([data-faction=kingdom]){background-image:none}
.field[data-faction=empire]{--arena-wash:#93433130}.field[data-faction=orc]{--arena-wash:#c7853840}.field[data-faction=elf]{--arena-wash:#24624435}.field[data-faction=dwarf]{--arena-wash:#664e4940}.field[data-faction=mage]{--arena-wash:#56548035}.field[data-faction=fairy]{--arena-wash:#b75d8526}
.field[data-faction] .field-shade{background:var(--arena-wash,#f4edcd0a)}
.field[data-phase=trial] .boss .sprite{transform:none}
.field[data-phase=trial] .shield-art{z-index:6;left:71%;top:61%;width:82px;height:82px;pointer-events:none}
.boss-effect-wrap{position:absolute;inset:17% 0 0;pointer-events:none;opacity:0;animation:guardian-burst 760ms ease-out both;transform-origin:65% 85%}
.boss-effect-wrap svg{width:100%;height:100%;overflow:visible}
@keyframes guardian-burst{0%{opacity:0;transform:scale(.68)}18%{opacity:1}60%{opacity:.85}100%{opacity:0;transform:scale(1.08)}}
@media(max-width:760px){.field[data-phase=trial] .shield-art{width:60px;height:60px;left:69%;top:67%}.guardian-panel span{white-space:normal}.field[data-phase=trial] .stage-label{width:125px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.boss-effect-wrap{animation:none;opacity:.65;transform:none}}
/* The existing artwork is clipped at render time: no replacement illustrations. */
.territory-background{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}.territory-background>svg,.territory-background>img{width:100%;height:100%;display:block;object-fit:cover}.field:has(.territory-background:not([hidden])){background-image:none!important;background-color:#dbc696}
.territory-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:16px 0}.territory-heading small{font-size:14px;color:#846e4e}.territory-heading h2{font-size:24px;margin:5px 0}.territory-heading p{font-size:14px;color:#776a55}.territory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:13px;margin-bottom:22px}.territory-card{border:2px solid #dfd2b5;background:#fffaf0;border-radius:14px;overflow:hidden;padding:0;text-align:left;color:#564731;transition:transform .15s}.territory-card:hover{transform:translateY(-3px)}.territory-card[aria-pressed=true]{border-color:#637c5d;box-shadow:0 0 0 3px #bac8a65c}.territory-scene{position:relative;display:block;aspect-ratio:1.5;overflow:hidden}.territory-scene>svg,.territory-scene>img{width:100%;height:100%;object-fit:cover;display:block}.territory-portrait{position:absolute;width:75%;height:92%;bottom:0;right:-4%;mix-blend-mode:multiply}.territory-portrait svg{width:100%;height:100%;overflow:hidden}.territory-copy{display:flex;flex-direction:column;padding:12px;gap:5px}.territory-copy small{font-size:12px;color:#7b7d55}.territory-copy strong{font-size:16px}.territory-copy>span{font-size:14px;color:#837356}
.enemy .sprite:has(.faction-soldier),.boss .sprite:has(.territory-captain){mix-blend-mode:multiply;filter:none}.enemy .sprite svg.faction-soldier{overflow:hidden}.field[data-phase=home] .hero{left:28%;width:290px;top:85%}.field[data-phase=home] .hero .sprite{height:240px}.field[data-phase=home] .boss{left:76%;top:86%;width:310px}.field[data-phase=home] .boss .sprite{height:240px}.field[data-phase=home] .boss .actor-label{display:block}.field[data-phase=home] .hero-nameplate{left:28%;top:84%;padding:7px 14px}.field[data-phase=home] .hero-nameplate span{display:none}
@media(max-width:760px){.territory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.territory-heading{display:block}.territory-heading h2{font-size:21px}.territory-copy{padding:9px}.territory-copy strong{font-size:14px}.territory-copy>span{font-size:13px}.field[data-phase=home] .hero{width:240px}.field[data-phase=home] .hero .sprite{height:180px}.field[data-phase=home] .boss{width:235px}.field[data-phase=home] .boss .sprite{height:185px}.field[data-phase=home] .hero-nameplate strong{font-size:16px}}

/* Transparent character atlases, inward facing steps and a clear current target. */
.enemy .sprite:has(.faction-soldier),.boss .sprite:has(.territory-captain),.territory-portrait{mix-blend-mode:normal}
.soldier-facing,.soldier-step{display:block;width:100%;height:100%;transform-origin:50% 95%}
.soldier-facing{transform:scaleX(var(--soldier-flip,1)) scale(var(--soldier-scale,1))}
.soldier-step{transform:translate(var(--step-sway,0px),var(--step-lift,0px)) rotate(var(--step-lean,0deg))}
.enemy .sprite:has(.faction-soldier){overflow:visible;filter:drop-shadow(0 2px 2px #33281940)}
.enemy.target .sprite:has(.faction-soldier){filter:drop-shadow(2px 0 0 #fff7df) drop-shadow(-2px 0 0 #fff7df) drop-shadow(0 2px 0 #fff7df) drop-shadow(0 -2px 0 #fff7df) drop-shadow(2px 0 0 #a43248) drop-shadow(-2px 0 0 #a43248) drop-shadow(0 2px 0 #a43248) drop-shadow(0 -2px 0 #a43248)}
.enemy.target .ground-shadow{width:84%;height:20px;bottom:-4px;background:#ad344531;border:3px solid #a43248;outline:2px solid #fff3dc;filter:none;box-shadow:0 2px 7px #56252d38}
.enemy.target .bubble{border:3px solid #a43248;background:#fffdf4;box-shadow:0 0 0 3px #fff4da,0 4px 12px #4b253a42}
.target .target-tag{background:#a43248;font-size:12px;line-height:1.4;padding:3px 9px;top:-24px;border:1px solid #fff4da}
.target-line-under{stroke:#fff6df;stroke-width:9;opacity:.95}.target-line{stroke:#a43248;stroke-width:4;opacity:1}
.enemy.awaiting-impact .ground-shadow{border:0;outline:0;background:#58482926;box-shadow:none}
.enemy:focus-visible{outline:3px solid #405d7a;outline-offset:5px;border-radius:12px}
@media(max-width:760px){.target-line-under{stroke-width:8}.target-line{stroke-width:3.5}.target .target-tag{font-size:11px}}
@media(prefers-reduced-motion:reduce){.soldier-step{transform:none}}

.asset-status{position:sticky;top:8px;z-index:30;display:flex;align-items:center;justify-content:center;gap:16px;padding:14px 18px;margin-bottom:14px;background:#fff9e8;border:1px solid #cfb774;border-radius:12px;color:#695531;box-shadow:0 3px 12px #5948291a}.asset-status .quiet{color:#584521;border-color:#baa66d}.preview-pending{display:grid;place-items:center;height:100%;background:#eee8d6;color:#8b7a5b;font-size:13px}.field[data-art-ready=false] .actor{visibility:hidden}.field[data-art-ready=false]::after{content:"캐릭터와 전장을 불러오는 중…";position:absolute;inset:0;display:grid;place-items:center;background:#faf6e9d9;color:#675636;z-index:15;font-size:18px}

.world-atlas{max-width:1640px;margin:0 auto;padding:12px 0 28px;color:#64583f}.wm-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:12px 0 24px}.wm-eyebrow{font:600 10px/1.4 system-ui,sans-serif;letter-spacing:2.5px;color:#a69578}.wm-heading h1{font-size:clamp(23px,2.3vw,34px);font-weight:750;letter-spacing:-1px;line-height:1.4;margin:6px 0 8px;color:#62533b}.wm-heading p{font-size:13px;color:#9b8b70;margin:0;line-height:1.8}.wm-key-counter{display:flex;gap:13px;align-items:center;flex-shrink:0;background:#f1ebd9;border:1px solid #ded4b9;border-radius:16px;padding:15px 24px}.wm-key-counter svg{width:32px;height:32px;stroke:#a1854e;stroke-width:1.6}.wm-key-counter small{display:block;font-size:11px;color:#9c8865}.wm-key-counter strong{font-size:27px;font-weight:650;color:#826f4d}.wm-key-counter strong span{font-size:15px;font-weight:400;color:#aa9a7b}.wm-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}.wm-map-wrap{min-width:0;overflow:hidden;border:1px solid #d4c6a7;border-radius:20px;background:#f2ebd9;box-shadow:0 7px 24px #84745714}.wm-map{position:relative;isolation:isolate;aspect-ratio:3/2;overflow:hidden}.wm-map>img{display:block;width:100%;height:100%;object-fit:cover;user-select:none}.wm-hotspot{position:absolute;transform:translate(-50%,-50%);border:1px solid #c7b793;border-radius:24px;background:#fff9e9f2;color:#65553d;display:flex;align-items:center;gap:6px;padding:5px 11px 5px 5px;box-shadow:0 3px 8px #40301a35;min-height:39px;white-space:nowrap;transition:box-shadow .15s,background .15s;z-index:1}.wm-hotspot:hover,.wm-hotspot:focus-visible{background:#fffdf6;box-shadow:0 0 0 4px #fff8db85,0 4px 12px #40301a45;z-index:2}.wm-pin-mark{display:grid;place-items:center;width:28px;height:28px;flex-shrink:0;background:var(--faction);color:#fffbea;border-radius:50%;font:18px Georgia,serif}.wm-pin-copy strong{display:block;font-size:11px;line-height:1.2;font-weight:750}.wm-pin-copy small{display:block;font-size:9px;line-height:1.5;color:#958569}.wm-hotspot.is-earned{border-color:#a9904b}.wm-map-caption{padding:13px 20px;display:flex;align-items:center;gap:12px;color:#9b8a6a;border-top:1px solid #d9cba9}.wm-map-caption p{font-size:11px;line-height:1.7;margin:0}.wm-compass{color:#b09b70;font-size:24px;line-height:1}.wm-region-panel{padding:4px 0}.wm-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 14px}.wm-panel-title h2{font-size:15px;margin:0;color:#7c6a4b}.wm-panel-title>span{font-size:10px;color:#a69579}.wm-region-list{display:grid;gap:8px}.wm-region-card{width:100%;display:flex;align-items:center;gap:10px;text-align:left;background:#fffdf5;border:1px solid #e1d8c2;border-radius:12px;padding:12px 10px;color:#776649;transition:border-color .15s,background .15s}.wm-region-card:hover{border-color:var(--faction);background:#f9f5e8}.wm-region-mark{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;background:color-mix(in srgb,var(--faction) 12%,#fffdf5);border:1px solid color-mix(in srgb,var(--faction) 30%,#fffdf5);border-radius:11px;color:var(--faction);font:23px Georgia,serif}.wm-region-copy{flex:1;min-width:0}.wm-region-top,.wm-region-status{display:flex;align-items:center;justify-content:space-between;gap:6px}.wm-region-top strong{font-size:12px}.wm-region-top b{font-size:13px;color:var(--faction);font-weight:650}.wm-region-top b small{font-size:9px;margin-left:2px}.wm-trust-track{display:block;height:3px;border-radius:4px;background:#ede6d6;overflow:hidden;margin:7px 0 6px}.wm-trust-track i{display:block;height:100%;border-radius:4px;background:var(--faction)}.wm-region-status{font-size:9px;color:#aa9a7e}.wm-region-status>span:last-child{color:var(--faction)}.wm-card-arrow{font:22px Georgia,serif;color:#bcad8e}.wm-collection{margin-top:27px;padding:23px 25px 18px;background:#f0ebdd;border:1px solid #e0d6c0;border-radius:17px}.wm-collection>header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.wm-collection h2{margin:5px 0 0;font-size:18px;color:#7c694a;font-weight:650}.wm-current{font-size:11px;color:#a29172;line-height:1.8}.wm-current strong{font-weight:650;color:#7b6e52}.wm-current button{font-size:10px;border:1px solid #cfc2a6;background:#fff9e9;color:#8c7956;border-radius:6px;padding:4px 8px;margin-left:9px}.wm-key-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.wm-key{display:flex;flex-direction:column;align-items:center;gap:5px;padding:15px 7px 12px;border:1px solid #ddd3bd;border-radius:12px;background:#f8f4e9;color:#a59a84;min-width:0}.wm-key:disabled{opacity:.8;cursor:default}.wm-key svg{width:30px;height:30px;stroke:currentColor;stroke-width:1.5;margin-bottom:4px}.wm-key strong{font-size:13px;font-weight:650}.wm-key small{font-size:10px;color:#aa9c82}.wm-key>span{font-size:9px;margin-top:5px;line-height:1.5;color:#b0a38c}.wm-key.is-owned{color:var(--faction);border-color:#cfbf9b;background:#fffbee;cursor:pointer}.wm-key.is-owned>span{color:var(--faction)}.wm-key.is-equipped{border-color:#a38c53;box-shadow:inset 0 0 0 1px #a38c53;background:#fffbdf}.wm-tree-note{font-size:11px;line-height:1.9;color:#9b8a6d;text-align:center;margin:17px 0 0}.world-atlas button:focus-visible{outline:3px solid #8d7c52;outline-offset:3px}
@media(min-width:1400px){.wm-layout{grid-template-columns:minmax(0,1fr) 310px}.wm-region-card{padding:15px 13px}.wm-region-list{gap:10px}.wm-region-top strong{font-size:13px}.wm-hotspot{padding:6px 13px 6px 6px}.wm-pin-copy strong{font-size:12px}.wm-pin-copy small{font-size:10px}}
@media(max-width:1050px){.wm-layout{grid-template-columns:minmax(0,1fr)}.wm-region-panel{padding:0}.wm-region-list{grid-template-columns:repeat(3,minmax(0,1fr))}.wm-panel-title{margin:0 0 10px}.wm-region-card{padding:12px}.wm-key-grid{gap:7px}.wm-key{padding:13px 4px}.wm-collection{padding:20px}.wm-key strong{font-size:12px}}
@media(max-width:650px){.world-atlas{padding:4px 0 22px}.wm-heading{gap:10px;margin:6px 0 17px;align-items:flex-start}.wm-heading h1{font-size:22px;letter-spacing:-.8px;margin:5px 0 6px}.wm-eyebrow{font-size:8px;letter-spacing:1.6px}.wm-heading p{font-size:11px;max-width:250px}.wm-key-counter{padding:9px 11px;border-radius:11px;gap:6px}.wm-key-counter svg{width:22px;height:22px}.wm-key-counter small{font-size:8px}.wm-key-counter strong{font-size:23px}.wm-key-counter strong span{font-size:12px}.wm-map-wrap{border-radius:13px}.wm-map{aspect-ratio:3/2}.wm-hotspot{gap:0;padding:4px;min-width:38px;min-height:38px;border-radius:50%;background:#fff9e9e8}.wm-pin-mark{width:28px;height:28px;font-size:17px}.wm-pin-copy{display:none}.wm-map-caption{padding:10px 12px;gap:9px}.wm-map-caption p{font-size:10px}.wm-region-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.wm-region-card{gap:7px;padding:11px 9px}.wm-region-mark{width:28px;height:28px;font-size:20px;border-radius:9px}.wm-region-top strong{font-size:11px}.wm-region-top b{font-size:12px}.wm-region-status{font-size:8px;gap:3px}.wm-card-arrow{display:none}.wm-panel-title h2{font-size:14px}.wm-layout{gap:16px}.wm-collection{margin-top:20px;padding:17px 12px 14px;border-radius:13px}.wm-collection>header{align-items:flex-start;gap:8px}.wm-collection h2{font-size:15px}.wm-current{font-size:10px;text-align:right}.wm-key-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.wm-key{border-radius:9px;padding:12px 3px 10px;gap:4px}.wm-key svg{width:25px;height:25px}.wm-key strong{font-size:11px}.wm-key small{font-size:9px}.wm-key>span{font-size:8px}.wm-tree-note{font-size:10px;margin-top:14px}}
@media(prefers-reduced-motion:reduce){.world-atlas *{transition:none!important}}

.wm-key.is-owned:disabled{opacity:1;cursor:default}.wm-key-note{font-size:10px;color:#a09072;text-align:center;margin:14px 0 0;line-height:1.7}

/* Current playable hero is a live portrait, separate from the selected simplified map. */
.world-atlas{max-width:1320px}
.wm-layout{grid-template-columns:250px minmax(0,1fr);gap:20px 26px;align-items:start}
.wm-player{grid-column:1;grid-row:1 / span 2;text-align:center;padding:16px 10px 18px;background:linear-gradient(#fbf7eeaa,#f0e9d999);border:1px solid #dfd2b9;border-radius:18px;min-width:0}
.wm-player h2{font-size:24px;color:#685139;margin:8px 0 0}
.wm-player .wm-eyebrow{font-size:13px;letter-spacing:.5px}
.wm-player-art{height:310px;width:100%;display:flex;align-items:center;justify-content:center;margin:8px 0 10px;filter:drop-shadow(0 7px 5px #74553218)}
.wm-player-art>img,.wm-player-art>svg{display:block;width:100%;height:100%;object-fit:contain;overflow:visible}
.wm-player-controls{display:grid;text-align:left;gap:8px;padding:0 6px}
.wm-player-controls label{font-size:14px;font-weight:700;color:#65533e}
.wm-player-controls select{width:100%;min-width:0;min-height:44px;padding:9px 8px;border:1px solid #cdbd9f;border-radius:9px;background:#fffdf6;color:#514537;font:inherit;font-size:14px;line-height:1.4}
.wm-character-help{font-size:12px;color:#86755d;line-height:1.5;margin:0 0 6px}
.wm-player-ability{font-size:14px;line-height:1.7;color:#6d5c44;margin:5px 0 0;min-height:3.4em}
.wm-player-ability b{color:#876035}.wm-equip-note{font-size:12px;line-height:1.6;color:#8a7961}
.wm-map-wrap{grid-column:2;border:none;background:transparent;box-shadow:none;border-radius:0}
.wm-map{background:#f8f5ea;aspect-ratio:3/2;border-radius:14px}
.wm-map>img{object-fit:contain}
.wm-map-caption{border-top:none;padding:10px 8px}
.wm-region-panel{grid-column:2;padding:0}
.wm-region-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.wm-region-card{padding:10px 8px}
.wm-region-top strong{font-size:13px}.wm-region-status{font-size:11px;flex-wrap:wrap;gap:4px}
.wm-region-mark{width:28px;height:28px;font-size:20px}.wm-card-arrow{display:none}
@media(max-width:1050px){.wm-layout{grid-template-columns:210px minmax(0,1fr);gap:18px}.wm-player{padding:14px 8px}.wm-player-art{height:265px}.wm-region-list{grid-template-columns:repeat(2,minmax(0,1fr))}.wm-player h2{font-size:22px}.wm-player-controls{padding:0}.wm-pin-copy{display:none}.wm-hotspot{padding:4px;border-radius:50%}}
@media(max-width:650px){.wm-layout{grid-template-columns:minmax(0,1fr);gap:16px}.wm-player{grid-column:1;grid-row:auto;display:grid;grid-template-columns:112px minmax(0,1fr);gap:0 14px;text-align:left;padding:14px}.wm-player>.wm-eyebrow,.wm-player>h2{grid-column:2}.wm-player h2{font-size:21px;margin:4px 0 10px}.wm-player-art{grid-column:1;grid-row:1 / span 3;height:210px;margin:0;align-self:center}.wm-player-controls{grid-column:2;gap:5px}.wm-player-controls select{font-size:14px}.wm-player-ability{font-size:13px;min-height:0}.wm-character-help,.wm-equip-note{font-size:12px}.wm-map-wrap,.wm-region-panel{grid-column:1}.wm-region-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact pins keep the painted landmarks and names visible. */
.wm-hotspot{width:44px;height:44px;min-height:44px;padding:7px;justify-content:center;border-radius:50%}
.wm-pin-copy{display:none;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);padding:8px 11px;background:#fffdf6;border:1px solid #c7b793;border-radius:9px;box-shadow:0 3px 8px #40301a25;pointer-events:none}
.wm-hotspot:hover .wm-pin-copy,.wm-hotspot:focus-visible .wm-pin-copy{display:block}

/* Painted faction badges retain their identity when trust is restored. */
.wm-hotspot .wm-pin-mark.painted-emblem{width:46px;height:42px;min-width:46px;border:0;border-radius:0;background:none;box-shadow:none;display:flex;align-items:center;justify-content:center;overflow:visible}
.wm-hotspot.is-earned .wm-pin-mark.painted-emblem{width:86px;min-width:86px}
.painted-emblem .faction-emblem{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 2px #46382635)}
.wm-region-mark.painted-emblem{width:55px;height:42px;flex:0 0 55px;background:none;border-radius:0}.wm-region-mark.is-restored{width:76px;flex-basis:76px}
.wm-header-actions{display:flex;align-items:center;gap:10px}.wm-dragon-link{color:#5d475b;border:1px solid #bb9a8b;background:#f6efe5;border-radius:9px;padding:10px 13px;text-decoration:none;font-size:14px;white-space:nowrap}
.wm-tree-entrance{position:absolute;left:50%;top:43%;transform:translate(-50%,-50%);padding:9px 14px;border-radius:11px;background:#f9efd9f5;border:2px solid #99734e;box-shadow:0 3px 14px #58432940;color:#604328;text-decoration:none;font-weight:750;font-size:14px;z-index:4;white-space:nowrap}
@media(max-width:760px){.wm-heading{flex-wrap:wrap}.wm-header-actions{width:100%;justify-content:space-between}.wm-hotspot .wm-pin-mark.painted-emblem{width:34px;height:31px;min-width:34px}.wm-hotspot.is-earned .wm-pin-mark.painted-emblem{width:60px;min-width:60px}.wm-tree-entrance{font-size:12px;padding:7px}.wm-dragon-link{font-size:13px}}

.territory-earned-emblem{float:right;width:64px;height:36px;margin-left:4px}.territory-earned-emblem svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 2px #68533125)}

/* Ivory silhouettes and a quiet rim keep the emblems readable on pastel terrain. */
.wm-hotspot{width:58px;height:58px;padding:3px;background:#fff8e8ed;border:2px solid #927749;box-shadow:0 0 0 2px #fffdf2,0 3px 8px #45372735}
.wm-hotspot.is-earned{width:92px;border-radius:18px;background:#fff8e8ed}
.wm-hotspot .wm-pin-mark.painted-emblem{width:54px;min-width:54px;height:50px}
.wm-hotspot.is-earned .wm-pin-mark.painted-emblem{width:86px;min-width:86px;height:50px}
.painted-emblem .faction-emblem,.territory-earned-emblem svg{filter:drop-shadow(1px 0 0 #fff9e8) drop-shadow(-1px 0 0 #fff9e8) drop-shadow(0 1px 0 #fff9e8) drop-shadow(0 -1px 0 #fff9e8) drop-shadow(0 2px 1px #49391b99)}
.wm-region-mark.painted-emblem{height:48px}
.wm-relic-pair{display:flex;align-items:center;justify-content:center;gap:2px;width:100%;height:70px}
.wm-key .wm-relic-pair svg{width:67%;height:65px;stroke:none;stroke-width:0;margin:0}
.wm-key .wm-relic-pair .relic-token{width:33%;height:50px}
.wm-key:not(.is-owned) .wm-relic-pair{filter:grayscale(.8);opacity:.6}
.wm-key .relic-name{font-size:10px;line-height:1.5;text-align:center}
@media(max-width:760px){.wm-hotspot{width:46px;height:46px}.wm-hotspot .wm-pin-mark.painted-emblem{width:40px;min-width:40px;height:38px}.wm-hotspot.is-earned{width:70px}.wm-hotspot.is-earned .wm-pin-mark.painted-emblem{width:64px;min-width:64px;height:38px}.wm-relic-pair{height:58px}.wm-key .wm-relic-pair svg{height:54px}.wm-key .wm-relic-pair .relic-token{height:43px}}

/* Keep faction emblems off the architecture; leader lines locate each territory. */
.wm-hotspot{--pin-w:58px;--pin-h:58px;left:clamp(calc(var(--pin-w)/2 + 5px),var(--pin-x),calc(100% - var(--pin-w)/2 - 5px));top:clamp(calc(var(--pin-h)/2 + 5px),var(--pin-y),calc(100% - var(--pin-h)/2 - 5px))}
.wm-hotspot.is-earned{--pin-w:92px}
.wm-connectors{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.wm-connectors path{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke}.wm-line-halo{stroke:#fff9e5;stroke-width:4;opacity:.85}.wm-line{stroke:#86683f;stroke-width:1.5;opacity:.85}.wm-connectors circle{fill:#86683f;stroke:#fff9e5;stroke-width:1.5;vector-effect:non-scaling-stroke}
@media(max-width:760px){.wm-hotspot{--pin-w:46px;--pin-h:46px}.wm-hotspot.is-earned{--pin-w:70px}}

.wm-hotspot[data-region="orc"] .wm-pin-copy,.wm-hotspot[data-region="dwarf"] .wm-pin-copy{bottom:auto;top:calc(100% + 8px)}

.trial-device{position:absolute;z-index:3;left:51%;top:88%;width:170px;height:170px;transform:translate(-50%,-100%);pointer-events:none;text-align:center;filter:drop-shadow(0 8px 7px #3b291932)}
.trial-device svg{width:100%;height:100%;overflow:hidden}.trial-device span{position:absolute;bottom:-16px;left:50%;transform:translateX(-50%);white-space:nowrap;padding:3px 9px;background:#fff6d9dc;color:#6e5537;border-radius:9px;font-size:11px}
.trial-device[data-faction=orc]{width:220px;height:150px;top:89%}.trial-device[data-faction=kingdom]{width:125px;height:145px;left:64%;top:79%}
.trial-device[data-faction=orc]{width:210px;height:178px;left:50%;top:88%}
.trial-device[data-faction=orc] .rune-state{animation:rune-change 210ms ease-out}
@keyframes rune-change{from{filter:brightness(1.3)}to{filter:brightness(1)}}
.painted-burst{position:absolute;inset:0;pointer-events:none;--effect-color:#e9ad55}
.painted-burst svg{width:100%;height:100%;overflow:hidden}
.painted-wave,.painted-contact,.painted-release{position:absolute;transform-origin:center;animation:painted-impact 1000ms ease-out both}
.painted-wave{left:19%;top:54%;width:61%;height:35%;animation:painted-travel 900ms ease-out both}
.painted-contact{left:8%;top:60%;width:30%;height:32%;animation-delay:150ms}
.painted-release{left:62%;top:53%;width:29%;height:35%}
.painted-burst.guard .painted-release{left:40%;top:66%;width:22%;height:23%;opacity:.75}
.painted-burst.ground .painted-wave{left:17%;top:62%;width:66%;height:32%;animation:ground-wave 950ms ease-out both}
.painted-burst.ground .painted-contact{left:8%;top:59%;width:28%;height:35%}
.painted-burst.lightning .painted-wave{transform:scaleX(-1);animation:lightning-strike 900ms ease-out both}
.painted-burst.petals .painted-contact{left:8%;top:50%;width:34%;height:42%}
.boss-skill-title{position:absolute;top:27%;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap;color:#fff8dc;text-shadow:0 2px 3px #20120c,0 0 18px var(--effect-color);padding:9px 45px;background:linear-gradient(90deg,transparent,#2e2019dd 22%,#2e2019dd 78%,transparent);animation:skill-announcement 1050ms ease-out both}
.boss-skill-title small{display:block;font-size:11px;letter-spacing:.15em;color:var(--effect-color)}.boss-skill-title strong{font-family:Georgia,'Noto Serif KR',serif;font-size:27px;font-weight:900}
@keyframes painted-impact{0%{opacity:0;scale:.55}16%{opacity:1;scale:1.03}65%{opacity:.95}100%{opacity:0;scale:1.15}}
@keyframes painted-travel{0%{opacity:0;translate:22% 0;scale:.75}15%{opacity:1}55%{opacity:1;translate:-12% 0;scale:1}100%{opacity:0;translate:-23% 0;scale:1.08}}
@keyframes ground-wave{0%{opacity:0;scale:.35 .5;translate:24% 0}18%{opacity:1}60%{opacity:1;scale:1.05 1;translate:-8% 0}100%{opacity:0;scale:1.25 1.2;translate:-13% 0}}
@keyframes lightning-strike{0%{opacity:0;scale:.7}12%,35%,55%{opacity:1;scale:1}25%{opacity:.6}100%{opacity:0;scale:1.07}}
@keyframes skill-announcement{0%{opacity:0;translate:0 7px}12%,70%{opacity:1;translate:0 0}100%{opacity:0;translate:0 -5px}}
@media(max-width:760px){.trial-device{width:110px;height:115px;top:91%}.trial-device[data-faction=orc]{width:145px;height:103px;top:92%}.trial-device[data-faction=kingdom]{width:80px;height:100px;top:84%;left:62%}.trial-device span{font-size:9px;bottom:-11px}.boss-skill-title{top:33%;padding:7px 30px}.boss-skill-title strong{font-size:21px}}
@media(prefers-reduced-motion:reduce){.painted-wave,.painted-contact,.painted-release,.boss-skill-title{animation:none!important;translate:none;scale:1;opacity:.9}}
@media(max-width:760px){.trial-device[data-faction=orc]{width:138px;height:117px;top:90%}}
@media(prefers-reduced-motion:reduce){.rune-state{animation:none!important}}
/* Each visible unit is one remaining defense; a cleared lane stays clear until recovery. */
.trial-device .defense-formation{position:absolute;inset:0;display:flex;justify-content:center;align-items:flex-end}
.trial-device .defense-unit{flex:none;width:100px;height:160px;margin:0 -13px;transform-origin:50% 90%;filter:drop-shadow(0 4px 3px #30212633)}
.trial-device[data-faction=empire] .defense-unit{width:112px;height:170px;margin:0 -7px;transform:scaleX(-1)}
.trial-device[data-faction=dwarf] .defense-unit{width:85px;height:130px;margin:0 -5px}
.trial-device[data-faction=mage] .defense-unit{width:86px;height:175px;margin:0 -12px;translate:0 calc((var(--unit-index) * 5px) - 10px)}
.trial-device[data-faction=elf] .defense-unit{width:130px;height:175px;margin:0}
.trial-device[data-faction=fairy] .defense-unit{width:85px;height:125px;margin:0 -16px;rotate:calc((var(--unit-index) - 1.5) * 15deg)}
.trial-device .defense-unit.breaking{position:absolute;left:50%;margin:0;animation:defense-break 240ms ease-out forwards;pointer-events:none}
@keyframes defense-break{from{opacity:1;filter:brightness(1.6);scale:1}to{opacity:0;translate:15px 25px;rotate:18deg;scale:.6;visibility:hidden}}
.trial-device[data-remaining="0"] .defense-label{background:#fff2bedf;border:1px solid #b39252;color:#654714}
.field[data-phase=trial] .boss-skill-title{left:50%;top:auto;bottom:76px;max-width:95%;padding:5px 24px;white-space:normal;width:max-content;min-height:32px;display:flex;align-items:center;gap:10px}
.field[data-phase=trial] .boss-skill-title small{font-size:12px;letter-spacing:0;white-space:nowrap}
.field[data-phase=trial] .boss-skill-title strong{font-size:18px;line-height:1.3}
@media(max-width:760px){.trial-device .defense-unit{width:62px;height:108px;margin:0 -9px}.trial-device[data-faction=empire] .defense-unit{width:72px;height:118px;margin:0 -7px}.trial-device[data-faction=dwarf] .defense-unit{width:60px;height:100px;margin:0 -8px}.trial-device[data-faction=mage] .defense-unit{width:56px;height:120px;margin:0 -9px}.trial-device[data-faction=elf] .defense-unit{width:86px;height:120px}.trial-device[data-faction=fairy] .defense-unit{width:60px;height:90px;margin:0 -13px}.field[data-phase=trial] .boss-skill-title{bottom:86px;padding:4px 16px;gap:6px}.field[data-phase=trial] .boss-skill-title strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){.trial-device .defense-unit.breaking{display:none}}

.status-effect{position:absolute;z-index:8;transform:translate(-50%,-50%);pointer-events:none}.status-effect svg{width:100%;height:100%;display:block}
.status-notice{padding:12px;border-radius:9px;background:#e9e2fa;color:#54327c;font-size:14px;font-weight:700;line-height:1.6}
.answer-panel[data-status=shock] .status-notice{background:#f7e9bb;color:#6b4b1c}
.choices.sleep-hidden button{color:transparent!important;text-shadow:none!important;pointer-events:none;background:#ede5f5!important}
.choices.sleep-hidden button>*{visibility:hidden}.choices button:disabled{cursor:not-allowed}
.mechanic-rule{font-size:14px;line-height:1.65;color:#575368;border-left:3px solid #9889b4;padding-left:10px}
.test-controls{border:1px solid #a99bbe;border-radius:10px;background:#f2edf8;padding:12px;margin-bottom:14px;font-size:14px;color:#534561}.test-controls p{font-size:13px;line-height:1.5}.test-controls>div{display:flex;flex-wrap:wrap;gap:6px}.test-controls .quiet{font-size:13px;padding:7px 9px}
.boss-test-dialog{width:min(820px,94vw);max-width:820px;max-height:90dvh}.boss-test-dialog #testBossList{display:grid;grid-template-columns:1fr 1fr;gap:10px}.boss-test-dialog .trial-button{text-align:left;line-height:1.6}.boss-test-dialog .trial-button strong,.boss-test-dialog .trial-button span{display:block}.boss-test-dialog .trial-button span{font-size:14px;font-weight:400;margin-top:5px}
/* Preparation is the first working surface; the catalog stays one row. */
body[data-phase=home] .region-ribbon{margin-bottom:12px;min-height:55px}
body[data-phase=home] .command-deck{padding:18px}
body[data-phase=home] #start{margin:5px 0 12px}
body[data-phase=home] .kingdom-card{margin:8px 0 14px;padding:11px}
body[data-phase=home] .expedition-summary{margin:12px 0}
.field[data-phase=home]{height:400px;min-height:0}
.field[data-phase=home] .hero,.field[data-phase=home] .hero-nameplate{display:none}
.field[data-phase=home] .boss{left:50%;top:86%;width:350px}
.field[data-phase=home] .boss .sprite{height:280px;transform:none}
#territoryPicker{margin-top:20px;min-width:0}
#territoryPicker .territory-grid{display:flex;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;padding:5px 4px 14px;margin-bottom:10px;scrollbar-width:thin}
#territoryPicker .territory-card{flex:0 0 clamp(190px,22vw,260px);scroll-snap-align:start}
.territory-nav{display:flex;gap:12px;align-items:center;color:#716147;font-size:14px}.territory-nav button{width:42px;height:42px;border:1px solid #b8a688;background:#fffaf0;border-radius:50%;font-size:29px;color:#6e5835}.territory-nav button:disabled{opacity:.3;cursor:default}
#territoryPicker .territory-portrait{left:50%;right:auto;transform:translateX(-50%);width:85%;height:94%;mix-blend-mode:normal}
@media(max-width:760px){.boss-test-dialog #testBossList{grid-template-columns:1fr}.field[data-phase=home]{height:255px}.field[data-phase=home] .boss{width:250px;top:87%}.field[data-phase=home] .boss .sprite{height:205px}#territoryPicker .territory-card{flex-basis:72vw;max-width:275px}.territory-heading{display:flex;align-items:center;gap:8px}.territory-heading small{display:none}.territory-heading h2{font-size:19px}.territory-nav{gap:5px}.territory-nav span{display:none}.territory-nav button{width:36px;height:36px}.test-controls{padding:9px}.mechanic-rule{font-size:13px}body[data-phase=home] .kingdom-card{margin-bottom:10px}}

body[data-phase=home] .setting-row{display:grid;grid-template-columns:82px minmax(0,1fr);gap:8px;align-items:center;margin-bottom:12px}body[data-phase=home] .setting-row .label{margin:0}body[data-phase=home] .setup-tip{font-size:13px;line-height:1.55}body[data-phase=home] .idle-footer{margin-top:12px;padding-top:12px}body[data-phase=home] .idle-footer summary{cursor:pointer;font-size:14px;color:#695c48}body[data-phase=home] .idle-footer details>div{padding-top:10px}body[data-phase=home] .kingdom-card p{margin:7px 0}body[data-phase=home] #territoryPicker{margin-top:14px}body[data-phase=home] .territory-heading{margin:10px 0}
/* Three reserved lanes: question above combat, skill above the answer-feedback rail. */
.field[data-phase=trial]{min-height:680px}
.field[data-phase=trial] .duel-question{top:155px;left:50%;transform:translateX(-50%);width:min(380px,calc(100% - 32px));max-width:none;min-height:94px;padding:8px 16px;gap:2px}
.field[data-phase=trial] .duel-question:empty{visibility:hidden}
.field[data-phase=trial] .duel-question strong{font-size:28px;line-height:1.1}
.field[data-phase=trial] .duel-question .pronunciation{margin:0}
.field[data-phase=trial] .hero,.field[data-phase=trial] .boss{top:auto;bottom:130px;transform:translateX(-50%)}
.field[data-phase=trial] .boss{left:79%}
.field[data-phase=trial]:is([data-encounter=orc],[data-encounter=empire],[data-encounter=mage],[data-encounter=elf]) .boss{width:390px}
.field[data-phase=trial]:is([data-encounter=orc],[data-encounter=empire],[data-encounter=mage],[data-encounter=elf]) .boss .sprite{height:310px}
.field[data-phase=trial] .health-card{left:23%;top:auto;bottom:105px;width:150px}
.field[data-phase=trial] .trial-device{left:53%;top:auto;bottom:137px;width:240px;height:178px;transform:translateX(-50%);z-index:4}
.field[data-phase=trial] .trial-device[data-faction=orc]{width:210px;height:178px;left:51%}
.field[data-phase=trial] .trial-device[data-faction=kingdom]{left:58%}
.field[data-phase=trial] .trial-device .defense-label{font-size:12px;bottom:-20px}
.field[data-phase=trial] .field-feedback{left:12px;top:auto;bottom:10px;transform:none;width:calc(100% - 24px);max-width:none;min-height:56px;max-height:64px;padding:7px 12px;overflow:auto;line-height:1.4;text-align:left;background:#fffaf0f7}
.field[data-phase=trial] .field-feedback>span:not(.pronunciation){display:inline;margin:0 0 0 8px}
.field[data-phase=trial] .field-feedback strong{font-size:19px}
.field[data-phase=trial] .float{top:270px;font-size:19px}
@media(max-width:1100px){.field[data-phase=trial]:is([data-encounter=orc],[data-encounter=empire],[data-encounter=mage],[data-encounter=elf]) .boss{width:315px}.field[data-phase=trial]:is([data-encounter=orc],[data-encounter=empire],[data-encounter=mage],[data-encounter=elf]) .boss .sprite{height:270px}}
@media(max-width:760px){.field[data-phase=trial]{height:580px;min-height:580px}.field[data-phase=trial] .guardian-panel{left:10px;width:calc(100% - 150px);min-width:0}.field[data-phase=trial] .duel-question{top:153px;min-height:88px;padding:7px 12px}.field[data-phase=trial] .duel-question strong{font-size:25px}.field[data-phase=trial] .hero,.field[data-phase=trial] .boss{bottom:137px}.field[data-phase=trial]:is([data-encounter=orc],[data-encounter=empire],[data-encounter=mage],[data-encounter=elf]) .boss{width:242px}.field[data-phase=trial]:is([data-encounter=orc],[data-encounter=empire],[data-encounter=mage],[data-encounter=elf]) .boss .sprite{height:224px}.field[data-phase=trial] .health-card{bottom:111px;width:116px}.field[data-phase=trial] .trial-device{width:145px;height:125px;bottom:143px;left:53%}.field[data-phase=trial] .trial-device[data-faction=orc]{width:138px;height:117px;left:51%;bottom:143px}.field[data-phase=trial] .trial-device .defense-label{font-size:11px;bottom:-18px;padding:3px 5px}.field[data-phase=trial] .field-feedback{max-height:72px;min-height:64px;bottom:8px}.field[data-phase=trial] .float{top:245px;font-size:17px}}

/* Body-bound wards follow their actor's live geometry; painted art supplies the silhouettes. */
.field[data-phase=trial] .trial-device[data-anchor=boss],.field[data-phase=trial] .trial-device[data-anchor=hero]{bottom:auto;transform:translate(-50%,-50%);filter:none}
.trial-device img{display:block;width:100%;height:100%;object-fit:contain}
.field[data-phase=trial] .trial-device[data-faction=kingdom]{width:240px;height:260px;bottom:160px;left:58%}
.lion-guard,.lion-shatter,.mage-shell,.hero-binding{position:absolute;inset:0;transform-origin:50% 75%}
.lion-guard{scale:var(--shield-to);animation:shield-shrink 300ms ease-out both}
.lion-shatter{animation:shield-shatter 520ms ease-out forwards}
@keyframes shield-shrink{from{scale:var(--shield-from);filter:brightness(1.35)}to{scale:var(--shield-to);filter:brightness(1)}}
@keyframes shield-shatter{0%{opacity:0;scale:.35}15%{opacity:1;scale:.7}100%{opacity:0;scale:1.05;visibility:hidden}}
.mage-shell{filter:drop-shadow(0 0 7px #b396ee80)}
.guard-pulse{animation:ward-contact 350ms ease-out}
.guard-dissolve{animation:ward-dissolve 450ms ease-out forwards}
@keyframes ward-contact{0%{filter:brightness(1.8);scale:.95}100%{filter:brightness(1);scale:1}}
@keyframes ward-dissolve{0%{opacity:1;scale:1}100%{opacity:0;scale:1.25;visibility:hidden}}
.barrier-count{position:absolute;top:15%;right:2%;border:1px solid #c4a5ed;border-radius:20px;padding:7px 12px;color:#fff;background:#4f397eea;box-shadow:0 2px 10px #30214735;font:700 14px/1.3 system-ui;white-space:nowrap}
.field[data-phase=trial] .trial-device[data-faction=mage]:not([data-remaining="0"]) .defense-label{display:none}
.field[data-phase=trial] .trial-device[data-anchor=boss] .defense-label{bottom:0;font-size:12px}
.field[data-phase=trial] .trial-device[data-anchor=hero] .defense-label{bottom:-3px;font-size:12px}
.hero-binding .vine-waist{position:absolute;left:0;top:-12%;width:100%;height:78%}
.hero-binding .vine-ankles{position:absolute;left:8%;top:37%;width:84%;height:60%;transform:scaleX(-1)}
.binding-release .vine-waist{animation:vine-unwind-left 500ms ease-out forwards}
.binding-release .vine-ankles{animation:vine-unwind-right 600ms ease-out forwards}
@keyframes vine-unwind-left{0%{opacity:1}100%{opacity:0;translate:-55% 35%;rotate:-20deg;visibility:hidden}}
@keyframes vine-unwind-right{0%{opacity:1}100%{opacity:0;translate:55% 45%;rotate:25deg;visibility:hidden}}
.petal-orbit{position:absolute;inset:0;animation:petal-orbit 12s linear infinite}
.petal-spoke{position:absolute;inset:0;rotate:var(--petal-angle)}
.orbit-petal{position:absolute;left:36%;top:-3%;width:28%;height:37%;rotate:22deg;filter:drop-shadow(0 0 4px #ffe4b973)}
.petal-release{animation:petal-fall 600ms ease-out forwards}
@keyframes petal-orbit{to{rotate:360deg}}
@keyframes petal-fall{0%{opacity:1}100%{opacity:0;translate:35px -35px;rotate:110deg;visibility:hidden}}
@media(max-width:760px){.field[data-phase=trial] .trial-device[data-faction=kingdom]{width:155px;height:175px;bottom:160px;left:57%}.barrier-count{font-size:12px;padding:5px 8px;top:6%;right:0}.field[data-phase=trial] .trial-device[data-anchor=boss] .defense-label,.field[data-phase=trial] .trial-device[data-anchor=hero] .defense-label{font-size:11px}.field[data-phase=trial] .trial-device[data-anchor=hero] .defense-label{bottom:-8px}}
@media(prefers-reduced-motion:reduce){.petal-orbit,.lion-guard,.guard-pulse{animation:none}.lion-guard{scale:var(--shield-to)}.lion-shatter,.guard-dissolve,.binding-release,.petal-release{display:none}}
.field[data-phase=trial] .trial-device[data-faction=dwarf]{width:210px;height:210px;bottom:143px}
.forge-state{animation:forge-cool 260ms ease-out}
@keyframes forge-cool{from{filter:brightness(1.3)}to{filter:brightness(1)}}
@media(max-width:760px){.field[data-phase=trial] .trial-device[data-faction=dwarf]{width:145px;height:145px;bottom:143px}}
@media(prefers-reduced-motion:reduce){.forge-state{animation:none}}
.equipment-card select{width:100%;padding:10px;border:1px solid #bdc6cc;border-radius:8px;background:#fffdf7;color:#40556d;font:inherit}.equipment-art{position:relative;width:150px;height:130px;margin:10px auto}.equipment-art svg{width:100%;height:100%;display:block}.wm-key .key-ability{font-size:12px;line-height:1.55;min-height:3em;color:#696079}

.hero-projectile{position:absolute;width:94px;height:62px;pointer-events:none;transform:translate(-50%,-50%) rotate(var(--projectile-angle,0deg));filter:drop-shadow(0 0 3px #ffefbc80)}
.hero-projectile svg,.ranged-impact svg{width:100%;height:100%;display:block}
.ranged-impact{position:absolute;width:90px;height:90px;pointer-events:none;transform:translate(-50%,-50%) rotate(var(--impact-angle,0deg));animation:ranged-contact 360ms ease-out forwards}
@keyframes ranged-contact{from{opacity:1;filter:brightness(1.6);scale:.85}to{opacity:0;filter:brightness(1);scale:1.3}}
.hero .sprite[data-attack-range=ranged] .pose-stack{transform:none!important}
.result-panel #continueArea{margin-bottom:4px}.result-panel #again.quiet{margin:10px 0}
@media(max-width:700px){.hero-projectile{width:70px;height:46px}.ranged-impact{width:65px;height:65px}}
@media(prefers-reduced-motion:reduce){.ranged-impact{animation:none;opacity:.7}}
/* The corrected consul's blade extends beyond his body frame; the source outline still isolates it. */
.sprite svg.guardian-pose[data-facing=left]{overflow:visible}

/* Home surfaces fit their main task to both the width and height of a desktop. */
@media (min-width: 1024px) and (min-height: 600px) {
  body[data-phase=home] .game-shell { padding-top: 10px; }
  body[data-phase=home] .course-picker {
    display: grid; grid-template-columns: minmax(510px, 1fr) minmax(210px, .6fr);
    align-items: center; gap: 16px; padding: 8px 12px; margin-bottom: 12px;
  }
  body[data-phase=home] .course-tabs button { padding: 9px 12px; }
  body[data-phase=home] .course-tabs button strong { font-size: 14px; }
  body[data-phase=home] .course-tabs button span { display: none; }
  body[data-phase=home] .course-meta { display: block; margin: 0; font-size: 13px; line-height: 1.5; }
  body[data-phase=home] .course-meta span { display: block; }
  .world-atlas { --atlas-height: clamp(350px, calc(100dvh - 234px), 720px); padding-top: 0; }
  .wm-heading { margin: 0 0 12px; gap: 16px; }
  .wm-heading h1 { font-size: 26px; margin: 3px 0; }
  .wm-heading p { font-size: 13px; line-height: 1.5; }
  .wm-key-counter { padding: 8px 16px; }
  .wm-layout { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: var(--atlas-height) auto; gap: 16px 22px; }
  .wm-player { grid-row: 1; align-self: stretch; display: flex; flex-direction: column; padding: 12px; }
  .wm-player h2 { font-size: 22px; margin: 4px 0 0; }
  .wm-player-art { flex: 1 1 0; min-height: 0; height: auto; margin: 6px 0; }
  .wm-player-controls { grid-template-columns: 46px minmax(0, 1fr); align-items: center; padding: 0; gap: 8px; }
  .wm-player-controls label { font-size: 14px; }
  .wm-player-controls select { min-height: 42px; padding: 8px 5px; }
  .wm-character-help, .wm-equip-note { display: none; }
  .wm-player-ability { grid-column: 1 / -1; font-size: 14px; line-height: 1.55; min-height: 0; margin: 2px 0 0; }
  .wm-map-wrap { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .wm-map { flex: 0 0 auto; width: min(100%, calc((var(--atlas-height) - 42px) * 1.5)); }
  .wm-map-caption { width: 100%; min-height: 42px; padding: 6px 8px; }
  .wm-map-caption p { font-size: 12px; }
  .wm-region-panel { grid-column: 1 / -1; }
  .wm-region-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* Reserve space for the full horizontal stage picker below the arena. */
  body[data-phase=home] .region-ribbon { min-height: 48px; margin-bottom: 8px; }
  body[data-phase=home] .region-title h1 { font-size: 21px; }
  body[data-phase=home] #battleLayout { align-items: start; }
  .field[data-phase=home] { height: clamp(120px, calc(100dvh - 500px), 490px); min-height: 0; }
  .field[data-phase=home] .boss { left: 50%; top: 88%; width: min(350px, 42%); }
  .field[data-phase=home] .boss .sprite { height: clamp(80px, calc((100dvh - 500px) * .72), 310px); }
  body[data-phase=home] .field-footer { min-height: 28px; padding: 5px; font-size: 12px; line-height: 1.5; }
  body[data-phase=home] #territoryPicker { margin-top: 6px; }
  body[data-phase=home] .territory-heading { margin: 0 0 6px; min-height: 38px; align-items: center; }
  body[data-phase=home] .territory-heading small { display: none; }
  body[data-phase=home] .territory-heading h2 { font-size: 21px; margin: 0; }
  body[data-phase=home] .territory-nav button { width: 36px; height: 36px; }
  body[data-phase=home] #territoryPicker .territory-grid { padding: 4px 4px 10px; margin-bottom: 0; gap: 10px; }
  body[data-phase=home] #territoryPicker .territory-card { flex-basis: clamp(180px, 18vw, 240px); }
  body[data-phase=home] .territory-scene { height: clamp(72px, 12dvh, 118px); aspect-ratio: auto; }
  body[data-phase=home] .territory-copy { padding: 8px 10px; gap: 3px; }
  body[data-phase=home] .territory-copy strong { font-size: 15px; line-height: 1.4; }
  body[data-phase=home] .territory-copy > span { font-size: 13px; line-height: 1.4; }
  body[data-phase=home] .command-deck { padding: 14px; }
  body[data-phase=home] .window-heading { padding-bottom: 10px; margin-bottom: 10px; }
  body[data-phase=home] .window-body select { padding: 9px; }
  body[data-phase=home] .window-body .label { margin-bottom: 6px; }
  body[data-phase=home] .kingdom-card { padding: 10px; margin: 6px 0 10px; }
  body[data-phase=home] .kingdom-card p { font-size: 13px; line-height: 1.5; margin: 6px 0; }
  body[data-phase=home] .expedition-summary { margin: 8px 0; gap: 5px; }
  body[data-phase=home] .setting-row { margin-bottom: 8px; }
  body[data-phase=home] .segmented button { padding: 8px 6px; }
  body[data-phase=home] .pronunciation-toggle { margin-top: 8px; }
  body[data-phase=home] .pronunciation-help { margin-bottom: 8px; }
  body[data-phase=home] .setup-tip { margin-top: 8px; }
  body[data-phase=home] .asset-status { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 48px); margin: 0; }
}

/* The chronicle is a lazy, optional reading surface in the existing top menu. */
.synopsis-button{color:#76552d;border-color:#bba77e;background:#f0e6ce;white-space:nowrap}
.gamebar nav{min-width:0;overflow-x:auto}.gamebar nav>*{flex-shrink:0}
@media(min-width:761px) and (max-width:1280px){.gamebar{padding-inline:14px;gap:10px}.gamebar .chapter-label,.gamebar-divider{display:none}.gamebar nav{gap:5px}.gamebar .menu-button{padding:8px;font-size:14px}}
@media(max-width:760px){.gamebar nav{width:100%;margin-left:0;overflow:visible}.gamebar .menu-button{font-size:14px}.gamebar .synopsis-button{font-weight:700}}

.music-controls{position:relative;z-index:80;flex-shrink:0;font-size:13px;color:#493c27;text-align:left}.music-controls summary{cursor:pointer;white-space:nowrap;list-style:none;border:1px solid #ae9369;border-radius:9px;padding:8px 11px;background:#fff9e9;font-weight:700}.music-controls summary::-webkit-details-marker{display:none}.music-controls summary:focus-visible{outline:3px solid #658e81;outline-offset:2px}.music-panel{position:absolute;right:0;top:calc(100% + 7px);width:230px;padding:15px;border:1px solid #ad9266;border-radius:12px;background:#fff9ec;box-shadow:0 8px 28px #30261538;display:grid;gap:12px}.music-panel p{margin:0!important;font-size:13px!important;line-height:1.5;color:#493c27!important}.music-panel button{padding:8px;border:1px solid #aa8d62;border-radius:7px;background:#f5e8cc;color:#493c27;cursor:pointer;font:inherit;font-weight:700}.music-panel label{display:block;font-weight:700}.music-panel output{float:right}.music-panel input{display:block;width:100%;margin:9px 0 0;accent-color:#497767}.music-panel [hidden]{display:none!important}#dragonApp>header{flex-wrap:wrap;position:relative;z-index:80}

@media(max-width:760px){.gamebar .music-controls{margin-left:auto}.gamebar nav{order:2}}
