:root{--ink:#171713;--paper:#e7dfc9;--paper2:#cfc4a5;--red:#8f201e;--gold:#b38a3f;--muted:#857d6a;--panel:#24231e;--line:#5b5547}*{box-sizing:border-box}body{margin:0;background:#11110f;color:var(--paper);font-family:"Yu Mincho","Hiragino Mincho ProN",serif;min-width:980px;background-image:radial-gradient(#343129 1px,transparent 1px);background-size:5px 5px}button{font:inherit;color:inherit;background:#2c2a24;border:1px solid #655e4d;padding:10px 18px;cursor:pointer;letter-spacing:.1em}button:hover{border-color:var(--gold);color:#fff}.primary{background:var(--red);border-color:#b14c42;font-size:17px;padding:14px 30px}.secondary{margin-left:12px}.danger{color:#c58e87}header{height:86px;padding:0 34px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #494538;background:rgba(20,20,17,.94)}header>div{display:flex;align-items:center;gap:14px}header h1{margin:0;font-size:27px;letter-spacing:.16em}header small{color:#9d9583;border-left:1px solid #5e5849;padding-left:16px}.crest{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--gold);transform:rotate(45deg);color:var(--gold);font-size:22px}.crest::first-letter{transform:rotate(-45deg)}.screen{display:none;min-height:calc(100vh - 86px)}.screen.active{display:flex}.hero{width:100%;padding:12vh 12%;background:linear-gradient(90deg,rgba(15,15,13,.96) 20%,rgba(15,15,13,.4)),repeating-linear-gradient(120deg,transparent 0 58px,rgba(179,138,63,.06) 60px);position:relative}.hero:after{content:"天下\A将棋";white-space:pre;position:absolute;right:12%;top:12%;font-size:150px;line-height:1.05;color:#ffffff08;font-weight:bold}.title-kicker,.eyebrow{color:var(--gold);font:12px Arial,sans-serif;letter-spacing:.28em}.hero h2{font-size:56px;margin:20px 0}.hero p{width:560px;color:#bcb4a2;line-height:2;margin-bottom:35px}.hidden{display:none!important}#mapScreen{padding:34px;gap:28px}.warrior-card{width:270px;padding:26px;background:linear-gradient(#2a2923,#1b1b18);border:1px solid #4c483d}.portrait{height:150px;display:grid;place-items:center;font-size:80px;color:var(--gold);border:1px solid #494437;background:#151512}.warrior-card h2{font-size:30px;margin:7px 0}.warrior-card>p{color:#aaa28f}.stats{display:flex;border-top:1px solid #4b463b;border-bottom:1px solid #4b463b;margin:22px 0}.stats span{flex:1;padding:15px 3px;color:#928a78;font-size:12px}.stats b{display:block;color:#eee7d6;font-size:20px;margin-top:5px}.skill{line-height:1.7}.campaign{flex:1;max-width:1100px}.section-head{display:flex;justify-content:space-between;align-items:end}.section-head h2{font-size:30px;margin:4px 0}.section-head>p{color:#9b9382}.map{height:525px;margin-top:18px;border:1px solid #4c473b;position:relative;background:radial-gradient(ellipse at 55% 48%,#363328,#1b1b17 68%);overflow:hidden}.map:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(15deg,transparent 0 80px,#ffffff05 81px)}.province{position:absolute;width:112px;height:72px;transform:translate(-50%,-50%);background:#29271f;border:1px solid #756c58;color:#aaa18e;padding:7px;transition:.2s;z-index:1}.province strong{display:block;color:#e4dcc9;font-size:16px}.province small{font-size:11px}.province.owned{background:#642522;border-color:#b65c4d}.province.target{box-shadow:0 0 0 2px var(--gold);animation:pulse 1.8s infinite}.province.target:hover{transform:translate(-50%,-55%);background:#453c26}.province.locked{opacity:.45;cursor:not-allowed}.province.boss strong:after{content:" ★";color:var(--gold)}@keyframes pulse{50%{box-shadow:0 0 16px #c69844}}.province-info{height:74px;border:1px solid #4c473b;border-top:0;padding:10px 20px;background:#22211c;display:flex;align-items:center;justify-content:space-between}.province-info p{margin:0;color:#bbb3a0}.battle-screen{display:none!important;flex-direction:column;padding:24px 32px}.battle-screen.active{display:flex!important}.battle-top{display:flex;justify-content:space-between;align-items:center;max-width:1180px;width:100%;margin:auto}.battle-top h2{margin:5px 0 18px;font-size:26px}.battle-top i{color:var(--red);font-style:normal;padding:0 20px}.battle-layout{display:grid;grid-template-columns:190px 612px 190px;gap:22px;justify-content:center;align-items:center}.general{height:430px;border:1px solid #4a463a;background:#201f1a;padding:18px;text-align:center}.general .mon{height:90px;display:grid;place-items:center;font-size:55px;color:var(--gold);border-bottom:1px solid #4b463a}.general h3{font-size:22px;margin:16px 0 8px}.general p{color:#aaa18e;font-size:13px;line-height:1.6;min-height:60px}.board-wrap{text-align:center}.board{width:612px;height:612px;display:grid;grid-template-columns:repeat(9,1fr);grid-template-rows:repeat(9,1fr);border:5px solid #4d301d;background:#c79b5b;box-shadow:0 18px 45px #000}.cell{border-right:1px solid #4f3823;border-bottom:1px solid #4f3823;display:grid;place-items:center;position:relative;cursor:pointer}.cell:hover{background:#e5bd7a}.cell.selected{background:#e7c98e}.cell.legal:after{content:"";width:15px;height:15px;background:#7f241f99;border-radius:50%;position:absolute}.cell.last{box-shadow:inset 0 0 0 3px #fff3}.piece{width:49px;height:58px;clip-path:polygon(50% 0,95% 18%,88% 100%,12% 100%,5% 18%);background:#e8c27e;color:#18130c;display:grid;place-items:center;font-size:25px;font-weight:bold;filter:drop-shadow(0 2px 1px #3b2917)}.piece.enemy{transform:rotate(180deg);background:#d7ad68}.piece.promoted{color:#9d1715}.board.locked{pointer-events:none;opacity:.88}#turnBanner{margin:auto auto 8px;background:#762522;padding:7px;width:200px;letter-spacing:.12em}#battleMessage{height:20px;color:#c1b9a6}.hand{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;margin-top:14px}.hand-piece{background:#b98c52;color:#17120c;border:1px solid #dfbb7d;padding:5px 7px;font-weight:bold;cursor:pointer}.hand-piece.selected{outline:3px solid var(--red)}.modal{position:fixed;inset:0;background:#000c;display:grid;place-items:center;z-index:10}.modal-card{width:500px;background:#24231e;border:1px solid var(--gold);padding:45px;text-align:center;box-shadow:0 30px 90px #000}.modal-card h2{font-size:36px;margin:12px}.modal-card p{line-height:1.8;color:#bbb19f}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#eee4ce;color:#1b1812;padding:12px 24px;opacity:0;transition:.25s;pointer-events:none;z-index:20}#toast.show{opacity:1}
@media(max-height:800px){.board{width:540px;height:540px}.battle-layout{grid-template-columns:170px 540px 170px}.piece{width:43px;height:51px;font-size:22px}.general{height:390px}.map{height:470px}}
.portrait{height:190px!important;background-position:center 25%!important;background-size:cover!important;background-repeat:no-repeat!important;box-shadow:inset 0 -35px 35px #0008}
.music-start{margin-right:12px;border-color:var(--gold);color:#d7b468;background:#1b1a16cc}.music-start.playing{color:#fff;background:#594520}
.general{height:510px}.general .mon{height:120px;background-position:center 24%;background-size:cover;filter:saturate(.9)}.general p{font-size:12px;line-height:1.5;min-height:38px}.speech{position:relative;background:#e9dfc8;color:#211b13;padding:10px 9px;margin:8px 0;min-height:60px;font-size:12px;line-height:1.55;text-align:left;border-left:3px solid var(--red);transition:.2s}.speech.flash{animation:speak .35s ease}@keyframes speak{50%{transform:scale(1.04);background:#fff2cf}}
body{min-width:0}.battle-layout{--board-size:min(612px,calc(100vh - 175px),calc(100vw - 470px));grid-template-columns:190px var(--board-size) 190px;gap:18px}.battle-layout .board{width:var(--board-size);height:var(--board-size)}.general .speech{font-size:16px;line-height:1.55;font-weight:600;letter-spacing:.02em;min-height:76px}.piece{width:72%;height:85%;font-size:clamp(15px,2.1vw,25px)}
@media(max-width:1050px),(max-height:760px){header{height:70px;padding:0 16px}header small{display:none}.screen{min-height:calc(100vh - 70px)}.battle-screen{padding:10px}.battle-layout{--board-size:min(520px,calc(100vh - 140px),calc(100vw - 350px));grid-template-columns:150px var(--board-size) 150px;gap:10px}.general{height:calc(var(--board-size) - 5px);min-height:390px;padding:8px}.general .mon{height:90px}.general h3{font-size:18px;margin:8px 0 4px}.general p{font-size:10px;min-height:28px;margin:4px 0}.general .speech{font-size:15px;line-height:1.5;min-height:80px;padding:8px 6px}.hand{margin-top:6px}.hand-piece{padding:4px 5px}.battle-top h2{font-size:20px;margin-bottom:8px}#mapScreen{padding:14px;gap:12px}.warrior-card{width:220px;padding:14px}.portrait{height:130px!important}.map{height:calc(100vh - 205px);min-height:360px}.hero{padding:8vh 8%}.hero h2{font-size:clamp(34px,6vw,52px)}}
@media(max-width:760px){header h1{font-size:20px}header nav button{padding:7px 8px;font-size:11px}.crest{width:38px;height:38px}.battle-layout{--board-size:min(430px,calc(100vh - 135px),calc(100vw - 290px));grid-template-columns:130px var(--board-size) 130px;gap:6px}.general{min-height:350px}.general .speech{font-size:14px}.general .mon{height:75px}#mapScreen{padding:8px}.warrior-card{width:180px;padding:9px}.warrior-card h2{font-size:22px}.province{width:92px}.hero p{width:min(520px,90vw)}}
.warrior-card{flex:0 0 270px}.campaign{min-width:0;flex:1 1 auto}.map{isolation:isolate}.japan-map{position:absolute;inset:2% 2.5%;width:95%;height:96%;z-index:0;pointer-events:none;filter:drop-shadow(0 4px 10px #0008)}.japan-map .land{fill:#b38a3f12;stroke:#b79a61;stroke-width:3;vector-effect:non-scaling-stroke}.japan-map .borders{fill:none;stroke:#a78e6055;stroke-width:1.2;vector-effect:non-scaling-stroke}.japan-map .map-marks{fill:#1c1b17;stroke:#c5a56188;stroke-width:2;vector-effect:non-scaling-stroke}.map:after{content:"日本列島・戦国勢力図";position:absolute;right:18px;bottom:12px;color:#ad966b66;font:11px Arial,sans-serif;letter-spacing:.22em;z-index:0}.province{z-index:2}.province-info{position:relative;z-index:3}
@media(max-width:1050px),(max-height:760px){.warrior-card{flex-basis:220px}.campaign{min-width:480px}.japan-map{inset:3% 1%;width:98%;height:94%}}
@media(max-width:760px){.warrior-card{flex-basis:180px}.campaign{min-width:430px}.map:after{font-size:9px;right:8px}.japan-map .land{stroke-width:2}}
#mapScreen{position:relative;display:none;padding:34px}#mapScreen.active{display:block}.campaign{width:100%;max-width:none}.warrior-card{position:absolute;z-index:6;left:52px;top:122px;width:270px;max-height:calc(100vh - 165px);overflow:auto;box-shadow:12px 14px 35px #000b;border-color:#8e7548}.province-info{padding-left:315px}.japan-map-accurate{inset:1% 4% 1% 22%;width:72%;height:98%;object-fit:contain;object-position:center;opacity:.84;filter:sepia(.45) saturate(.7) drop-shadow(0 5px 13px #000b)}
@media(max-width:1050px),(max-height:760px){#mapScreen{padding:14px}.warrior-card{left:26px;top:94px;width:220px;max-height:calc(100vh - 115px)}.province-info{padding-left:245px}.japan-map-accurate{inset:1% 2% 1% 19%;width:79%;height:98%}}
@media(max-width:760px){#mapScreen{padding:8px}.warrior-card{left:16px;top:82px;width:180px;max-height:calc(100vh - 95px)}.province-info{padding-left:195px}.japan-map-accurate{inset:1% 0 1% 15%;width:85%;height:98%}}
.map>.warrior-card{position:absolute;left:clamp(14px,1.4vw,28px);top:clamp(14px,2vh,24px);z-index:6;width:clamp(245px,16vw,310px);height:calc(100% - clamp(28px,4vh,48px));max-height:none;padding:clamp(12px,1.2vw,20px);overflow:hidden;box-shadow:12px 14px 35px #000c;border-color:#8e7548}.map>.warrior-card .portrait{height:clamp(110px,18vh,160px)!important}.map>.warrior-card h2{font-size:clamp(23px,1.7vw,30px);margin:5px 0}.map>.warrior-card>p{margin:7px 0}.map>.warrior-card .stats{margin:12px 0}.map>.warrior-card .stats span{padding:10px 3px}.map>.warrior-card .skill{font-size:clamp(12px,.85vw,15px);line-height:1.55}.province-info{padding-left:20px}
@media(max-width:1050px),(max-height:760px){.map>.warrior-card{left:12px;top:12px;width:clamp(185px,22vw,230px);height:calc(100% - 24px);padding:10px}.map>.warrior-card .portrait{height:clamp(80px,16vh,120px)!important}.map>.warrior-card .stats{margin:7px 0}.map>.warrior-card .stats span{padding:6px 2px}.map>.warrior-card .skill{font-size:12px}}
@media(max-width:760px){.map>.warrior-card{left:8px;top:8px;width:175px;height:calc(100% - 16px);padding:8px}.map>.warrior-card .portrait{height:82px!important}.map>.warrior-card>p{margin:4px 0}.map>.warrior-card .stats{margin:5px 0}.map>.warrior-card .skill{font-size:11px}}
.unification-screen{position:relative;overflow:hidden;align-items:center;justify-content:center;text-align:center;background:radial-gradient(circle at 50% 42%,#69311f 0,#231712 38%,#0e0e0c 74%)}.unification-screen:before,.unification-screen:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at center,transparent 0 24%,#000b 72%);pointer-events:none}.unification-screen:after{background-image:repeating-linear-gradient(90deg,transparent 0 9.5%,#c89a4122 10%,transparent 10.5%);opacity:.5}.unification-rays{position:absolute;width:95vmin;height:95vmin;border-radius:50%;background:repeating-conic-gradient(#cba14a18 0 7deg,transparent 7deg 15deg);animation:unification-spin 50s linear infinite}.unification-content{position:relative;z-index:2;width:min(720px,88vw);padding:35px 50px 42px;border:1px solid #cda652;background:#17130fe8;box-shadow:0 0 0 7px #17130f,0 0 0 8px #76582d,0 30px 100px #000}.unification-mon{width:160px;height:160px;margin:12px auto 0;border-radius:50%;border:3px double #d4ad5c;background-position:center 22%;background-size:cover;box-shadow:0 0 35px #d49b4166}.unification-content h2{margin:10px 0 4px;color:#e4c578;font-size:clamp(48px,7vw,82px);letter-spacing:.18em;text-indent:.18em;text-shadow:0 3px 0 #54231c}.unification-lead{font-size:22px;margin:8px}.unification-record{display:inline-block;padding:8px 25px;border-top:1px solid #77613b;border-bottom:1px solid #77613b;color:#d1bd91}.unification-praise{line-height:2;color:#c8beaa;margin:16px 0 12px}.unification-difficulty{margin:0 0 20px;color:#f0d28a;font-size:18px;line-height:1.6}@keyframes unification-spin{to{transform:rotate(360deg)}}
@media(max-height:720px){
  header{height:58px;padding:0 16px}header .crest{width:34px;height:34px;font-size:16px}header h1{font-size:21px}header nav button{padding:6px 9px;font-size:11px}.screen{min-height:calc(100vh - 58px)}
  .battle-screen{padding:5px 12px}.battle-top{height:48px}.battle-top p{margin:0}.battle-top h2{font-size:18px;margin:2px 0 4px}.battle-top button{padding:6px 11px;font-size:11px}.battle-layout{--board-size:min(485px,calc(100vh - 142px),calc(100vw - 330px));grid-template-columns:142px var(--board-size) 142px;gap:8px;align-items:start}.general{height:var(--board-size);min-height:0;padding:6px}.general .mon{height:72px}.general h3{font-size:16px;margin:4px 0 2px}.general p{font-size:9px;line-height:1.25;min-height:24px;margin:2px 0}.general .speech{font-size:12px;line-height:1.3;min-height:57px;margin:4px 0;padding:5px}.hand{margin-top:3px;gap:2px}.hand-piece{padding:2px 4px;font-size:11px}#turnBanner{margin-bottom:4px;padding:4px;width:170px;font-size:12px}#battleMessage{height:16px;margin:4px 0 0;font-size:12px}
  #mapScreen{padding:8px 14px}.section-head{height:54px}.section-head .eyebrow{margin:0}.section-head h2{font-size:23px;margin:1px 0}.map{height:calc(100vh - 194px);min-height:390px;margin-top:5px}.map>.warrior-card{top:8px;left:8px;height:calc(100% - 16px);width:210px;padding:8px}.map>.warrior-card .portrait{height:82px!important}.map>.warrior-card h2{font-size:20px;margin:2px 0}.map>.warrior-card>p{margin:3px 0}.map>.warrior-card .stats{margin:5px 0}.map>.warrior-card .stats span{padding:4px 2px}.map>.warrior-card .skill{font-size:11px}.province-info{height:58px;padding:6px 14px}
  .hero{padding:5vh 8%}.hero h2{font-size:40px;margin:10px 0}.hero p{line-height:1.55;margin-bottom:16px}.title-credits{bottom:7px}.unification-content{width:min(620px,88vw);padding:14px 38px 18px}.unification-mon{width:105px;height:105px;margin-top:5px}.unification-content h2{font-size:52px;margin:3px 0}.unification-lead{font-size:18px;margin:4px}.unification-record{padding:5px 20px;margin:4px}.unification-praise{line-height:1.55;margin:7px 0 12px}.unification-content .primary{padding:9px 20px;font-size:14px}
}
.title-credits{position:absolute;left:12%;bottom:34px;color:#918a7b;font-family:Arial,"Yu Gothic",sans-serif;font-size:12px;line-height:1.35;letter-spacing:.03em}.title-credits p{width:auto;margin:3px 0;line-height:1.35;color:#aaa18f}.title-credits a{color:#c6a763;text-decoration:none;border-bottom:1px solid #75633e}.title-credits a:hover{color:#f0d596}.title-credits small{font-size:10px;color:#777164}
.credits-button{display:block;margin-top:8px;padding:6px 10px;background:transparent;border-color:#625a49;font-size:11px}.license-modal{z-index:30;overflow:auto;padding:25px}.license-card{position:relative;width:min(760px,94vw);max-height:90vh;overflow:auto;background:#24231e;border:1px solid var(--gold);padding:34px 42px;box-shadow:0 30px 90px #000;text-align:left}.license-card h2{font-size:30px;margin:8px 0 24px}.license-card h3{font-size:16px;color:#d6b369;border-bottom:1px solid #504a3d;padding-bottom:6px;margin:20px 0 8px}.license-card p{color:#c3b9a5;font-size:13px;line-height:1.8}.license-card a{color:#d9b966}.license-card details{color:#a99f8c;font-size:13px}.license-card summary{cursor:pointer;color:#d0b477}.license-close{position:absolute;right:16px;top:14px;border:0;background:transparent;font-size:28px;padding:4px 10px}.license-card>.primary{display:block;margin:25px auto 0}.license-modal:not(.hidden){display:grid}@media(max-width:760px),(max-height:650px){.license-card{padding:24px 25px}.license-card h2{font-size:24px;margin-bottom:14px}.license-card h3{margin-top:13px}.license-card p{line-height:1.55}.title-credits{bottom:12px}}

/* Map and commander card: overlay while roomy, separate tracks when narrow. */
.map-stage{position:relative;margin-top:18px;isolation:isolate}.map-stage>.map{margin-top:0}.map-stage>.warrior-card{position:absolute;z-index:6;left:clamp(14px,1.4vw,28px);top:clamp(14px,2vh,24px);width:clamp(245px,16vw,310px);height:calc(100% - clamp(28px,4vh,48px));max-height:none;padding:clamp(12px,1.2vw,20px);overflow:auto;background:linear-gradient(135deg,rgba(42,41,35,.97),rgba(24,24,20,.92));border-color:#9b7d48;box-shadow:12px 14px 35px #000c,inset 3px 0 #b38a3f55}.map-stage>.warrior-card .portrait{height:clamp(110px,18vh,160px)!important}.map-stage>.warrior-card h2{font-size:clamp(23px,1.7vw,30px);margin:5px 0}.map-stage>.warrior-card>p{margin:7px 0}.map-stage>.warrior-card .stats{margin:12px 0}.map-stage>.warrior-card .stats span{padding:10px 3px}.map-stage>.warrior-card .skill{font-size:clamp(12px,.85vw,15px);line-height:1.55}.japan-map-accurate{inset:0 3% 0 21%;width:75%;height:100%;opacity:.92;filter:sepia(.55) saturate(.9) contrast(1.15) drop-shadow(0 7px 15px #000c)}.map:before{background:radial-gradient(ellipse at 58% 50%,#b38a3f0d,transparent 56%),repeating-linear-gradient(15deg,transparent 0 80px,#ffffff05 81px)}
@media(max-width:1050px){.map-stage{display:grid;grid-template-columns:minmax(190px,24vw) minmax(0,1fr);gap:12px;align-items:stretch}.map-stage>.warrior-card{position:relative;inset:auto;width:auto;height:auto;max-height:none;padding:12px;box-shadow:5px 8px 22px #0009}.map-stage>.warrior-card .portrait{height:120px!important}.map-stage>.map{height:calc(100vh - 205px);min-height:390px}.japan-map-accurate{inset:1%;width:98%;height:98%}.campaign{min-width:0}}
@media(max-width:680px){.map-stage{grid-template-columns:1fr;gap:8px}.map-stage>.warrior-card{display:grid;grid-template-columns:105px minmax(0,1fr) minmax(145px,.85fr);grid-template-rows:auto auto 1fr;column-gap:12px;align-items:start}.map-stage>.warrior-card .portrait{grid-row:1/4;height:118px!important}.map-stage>.warrior-card .eyebrow{margin:2px 0}.map-stage>.warrior-card h2{grid-column:2;font-size:22px;margin:2px 0}.map-stage>.warrior-card>p:not(.eyebrow):not(.skill){grid-column:2;margin:2px 0}.map-stage>.warrior-card .stats{grid-column:3;grid-row:1/3;margin:0}.map-stage>.warrior-card .skill{grid-column:2/4;margin:5px 0 0;font-size:12px}.map-stage>.map{height:390px;min-height:390px}.province{width:88px;height:62px;padding:4px}.province strong{font-size:14px}.campaign{min-width:0}}
@media(max-width:460px){.map-stage>.warrior-card{grid-template-columns:82px minmax(0,1fr) 130px;column-gap:8px;padding:8px}.map-stage>.warrior-card .portrait{height:96px!important}.map-stage>.map{min-width:410px}}

/* Make the latest enemy move unmistakable while keeping the player's move subtle. */
.cell.last-player{box-shadow:inset 0 0 0 3px #fff6}
.cell.last-enemy{background:#d86a5a55;box-shadow:inset 0 0 0 4px #d51f19,inset 0 0 14px #a4000077;z-index:1}
.cell.last-enemy:before{content:"直前";position:absolute;top:2px;left:3px;padding:1px 3px;background:#a5120e;color:#fff;font:700 8px Arial,sans-serif;letter-spacing:.04em;z-index:2}

/* Compact landscape layout: every control remains visible and usable at 800x600. */
@media(max-width:850px) and (max-height:650px){
  header{height:52px;padding:0 10px}header .crest{width:30px;height:30px;font-size:15px}header h1{font-size:17px}header nav button{padding:5px 7px;font-size:10px}.screen{min-height:calc(100vh - 52px)}
  .battle-screen{padding:4px 8px}.battle-top{height:42px}.battle-top .eyebrow{display:none}.battle-top h2{font-size:16px;margin:0}.battle-top i{padding:0 8px}.battle-top button{padding:5px 10px;font-size:11px}
  .battle-layout{--board-size:min(410px,calc(100vh - 178px),calc(100vw - 276px));grid-template-columns:128px var(--board-size) 128px;gap:6px;align-items:start}.general{height:var(--board-size);min-height:0;padding:5px;overflow:auto}.general .mon{height:68px}.general h3{font-size:15px;margin:4px 0}.general p{font-size:9px;line-height:1.25;min-height:0;margin:2px 0}.general .speech{font-size:11px;line-height:1.3;min-height:48px;margin:4px 0;padding:5px}.hand{margin-top:3px;gap:2px}.hand-piece{padding:2px 4px;font-size:11px}
  #turnBanner{margin-bottom:4px;padding:4px;width:170px;font-size:12px}#battleMessage{height:16px;margin:3px 0 0;font-size:11px}.piece{font-size:clamp(13px,2.4vw,20px)}
  #mapScreen{padding:6px 10px}.section-head{height:42px}.section-head .eyebrow{display:none}.section-head h2{font-size:20px;margin:0}.section-head>p{font-size:11px;margin:0}.map-stage{margin-top:4px;grid-template-columns:155px minmax(0,1fr);gap:6px}.map-stage>.warrior-card{padding:6px}.map-stage>.warrior-card .portrait{height:76px!important}.map-stage>.warrior-card h2{font-size:18px}.map-stage>.warrior-card>p{margin:2px 0;font-size:10px}.map-stage>.warrior-card .stats{margin:3px 0}.map-stage>.warrior-card .stats span{padding:3px 1px}.map-stage>.warrior-card .stats b{font-size:14px}.map-stage>.warrior-card .skill{font-size:10px}.map-stage>.map{height:calc(100vh - 157px);min-height:0}.province{width:82px;height:54px;padding:3px}.province strong{font-size:12px}.province-info{height:47px;padding:5px 10px;font-size:11px}
  .hero{padding:5vh 7%}.hero h2{font-size:34px;margin:10px 0}.hero p{line-height:1.55;margin-bottom:14px}.primary{font-size:14px;padding:9px 18px}.title-credits{left:7%;bottom:7px;font-size:10px}.title-credits p{margin:1px 0}.credits-button{display:inline-block;margin-top:3px;padding:3px 7px}
  .modal-card{width:min(460px,92vw);padding:22px}.modal-card h2{font-size:26px}.license-modal{padding:8px}.license-card{max-height:96vh;padding:18px 22px}
}

/* 720p displays in a normal browser window usually expose only 540–650px vertically. */
@media(max-height:650px){
  header{height:52px;padding:0 12px}header .crest{width:30px;height:30px;font-size:15px}header h1{font-size:18px}header small{display:none}header nav button{padding:5px 8px;font-size:10px}.screen{min-height:calc(100vh - 52px)}
  .battle-screen{padding:4px 10px}.battle-top{height:42px}.battle-top .eyebrow{display:none}.battle-top h2{font-size:16px;margin:0}.battle-top i{padding:0 10px}.battle-top button{padding:5px 10px;font-size:10px}.battle-layout{--board-size:min(440px,calc(100vh - 148px),calc(100vw - 310px));grid-template-columns:135px var(--board-size) 135px;gap:7px;align-items:start}.general{height:var(--board-size);min-height:0;padding:5px;overflow:hidden}.general .mon{height:min(64px,15vh)}.general h3{font-size:15px;margin:3px 0}.general p{font-size:9px;line-height:1.2;min-height:0;margin:2px 0}.general .speech{font-size:11px;line-height:1.25;min-height:44px;margin:3px 0;padding:4px}.hand{margin-top:2px;gap:2px}.hand-piece{padding:2px 4px;font-size:10px}#turnBanner{margin-bottom:3px;padding:3px;width:160px;font-size:11px}#battleMessage{height:14px;margin:2px 0 0;font-size:10px}.piece{font-size:clamp(12px,2vw,19px)}
  #mapScreen{padding:5px 10px}.section-head{height:40px}.section-head .eyebrow{display:none}.section-head h2{font-size:20px;margin:0}.section-head>p{font-size:10px;margin:0}.map{height:calc(100vh - 144px);min-height:0;margin-top:2px}.map>.warrior-card{top:5px;left:5px;height:calc(100% - 10px);width:195px;padding:6px}.map>.warrior-card .portrait{height:min(68px,14vh)!important}.map>.warrior-card .eyebrow{display:none}.map>.warrior-card h2{font-size:18px;margin:2px 0}.map>.warrior-card>p{margin:2px 0;font-size:10px}.map>.warrior-card .stats{margin:3px 0}.map>.warrior-card .stats span{padding:3px 1px}.map>.warrior-card .stats b{font-size:14px}.map>.warrior-card .skill{font-size:10px;line-height:1.25}.province{width:84px;height:52px;padding:3px}.province strong{font-size:12px}.province small{font-size:9px}.province-info{height:42px;padding:4px 10px;font-size:10px}
  .hero{padding:4vh 7%}.hero h2{font-size:34px;margin:7px 0}.hero>p{line-height:1.4;margin:7px 0 12px}.hero .primary,.hero .secondary{font-size:13px;padding:7px 15px}.title-credits{left:7%;bottom:5px;font-size:9px;line-height:1.15}.title-credits p{margin:1px 0;line-height:1.15}.title-credits small{font-size:8px}.credits-button{display:inline-block;margin-top:2px;padding:2px 6px;font-size:9px}
  .unification-content{width:min(560px,88vw);padding:9px 28px 12px}.unification-mon{width:78px;height:78px;margin-top:2px}.unification-content h2{font-size:42px;margin:2px 0}.unification-lead{font-size:16px;margin:2px}.unification-record{padding:3px 16px;margin:3px}.unification-praise{font-size:12px;line-height:1.4;margin:5px 0 8px}.unification-content .primary{padding:7px 16px;font-size:12px}
  .modal-card{width:min(450px,92vw);padding:20px}.modal-card h2{font-size:25px}.license-modal{padding:6px}.license-card{max-height:97vh;padding:14px 20px}.license-card h2{font-size:21px;margin:3px 0 8px}.license-card h3{margin:8px 0 4px}.license-card p{font-size:11px;line-height:1.35}
  .map{height:calc(100vh - 148px)}
}

/* 国攻め進捗：地図から外郭を抜け、本丸へ迫る流れを可視化する。 */
.province.under-siege{background:linear-gradient(145deg,#5b3e20,#29251d);border-color:#e0ae50;animation:none}.province.selected-target{transform:translate(-50%,-57%);outline:3px double #f2d27d;box-shadow:0 7px 22px #000,0 0 20px #c99445}.province-gauge{display:block;height:4px;margin:5px 5px 0;background:#0e0d0b;border:1px solid #68573a}.province-gauge i{display:block;height:100%;background:linear-gradient(90deg,#a53028,#e4b557);box-shadow:0 0 6px #dca849}
.province-info:has(.siege-route){height:auto;min-height:106px;padding:9px 12px;gap:12px;background:linear-gradient(180deg,#2a271e,#181713);border-top:1px solid #8a6b37}.siege-summary{flex:0 0 175px}.siege-summary strong{color:#ead59c}.siege-summary p{font-size:11px;line-height:1.35;margin-top:4px}.siege-route{min-width:0;flex:1;overflow-x:auto;padding:3px 6px 5px}.siege-path{position:relative;display:grid;grid-template-columns:repeat(var(--stages),minmax(78px,1fr)) minmax(86px,1.1fr);gap:9px;min-width:calc((var(--stages) + 1)*83px)}.siege-path:before{content:"";position:absolute;left:4%;right:4%;top:22px;height:3px;background:linear-gradient(90deg,#9a2f27,#a7813b 55%,#494437);box-shadow:0 1px #000;z-index:0}.siege-node{position:relative;z-index:1;text-align:center;color:#817a6b}.siege-node span{display:grid;place-items:center;width:45px;height:45px;margin:0 auto 4px;background:#292720;border:2px solid #5d574a;clip-path:polygon(50% 0,92% 18%,88% 82%,50% 100%,12% 82%,8% 18%);font:bold 15px Arial,sans-serif}.siege-node b,.siege-node small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.siege-node b{font-size:11px;color:#b9b09c}.siege-node small{font-size:9px;margin-top:2px}.siege-node.cleared span{background:#762522;border-color:#d26b55;color:#fff}.siege-node.cleared b{color:#d8cbb0}.siege-node.current span{background:#b68a3b;border-color:#f0d28a;color:#17130d;box-shadow:0 0 0 4px #b68a3b33,0 0 14px #d9a84f;animation:current-fort 1.5s ease-in-out infinite}.siege-node.current b{color:#f0d690}.siege-node.keep span{width:55px;background:#171612;border-color:#9b783f;color:#d6b76e;clip-path:polygon(50% 0,94% 20%,89% 100%,11% 100%,6% 20%)}.siege-node.keep b{color:#d8bd78}@keyframes current-fort{50%{filter:brightness(1.25);transform:translateY(-2px)}}.siege-attack{flex:0 0 auto;padding:11px 19px;font-size:14px}
@media(max-width:900px){.province-info:has(.siege-route){display:grid;grid-template-columns:1fr auto}.siege-summary{display:none}.siege-route{grid-column:1}.siege-attack{grid-column:2;grid-row:1;align-self:center}.siege-node b{font-size:10px}}
@media(max-height:650px){.province-info:has(.siege-route){min-height:77px;padding:4px 8px}.siege-node span{width:31px;height:31px;margin-bottom:2px}.siege-node.keep span{width:38px}.siege-path:before{top:15px}.siege-path{grid-template-columns:repeat(var(--stages),minmax(65px,1fr)) minmax(72px,1fr);min-width:calc((var(--stages) + 1)*70px)}.siege-node small{display:none}.siege-attack{padding:7px 10px;font-size:11px}}
.general .mon.retainer-portrait{background-size:600% auto;background-repeat:no-repeat;filter:saturate(.82) contrast(1.08);box-shadow:inset 0 -18px 22px #0008}

/* 遠征システム：地図の軍議、対局HUD、勝利後の選択と撤退確認。 */
.province.expedition-active{outline:2px solid #f0c35f;box-shadow:0 0 0 4px #b42f2738,0 0 22px #e5a83f}.province.unsecured{border-color:#ffd46b;background:linear-gradient(145deg,#803626,#33231b)}.province.unsecured:after{content:"炎";position:absolute;right:-8px;top:-14px;color:#ffd15e;font-size:13px;text-shadow:0 0 8px #f33}
.province-info:has(.expedition-stats){display:grid;grid-template-columns:190px minmax(300px,1fr) auto;grid-template-areas:"summary stats actions" "summary route actions";align-items:center;min-height:138px;gap:5px 12px}.province-info:has(.expedition-stats) .siege-summary{grid-area:summary}.province-info:has(.expedition-stats) .expedition-stats{grid-area:stats}.province-info:has(.expedition-stats) .siege-route{grid-area:route}.expedition-stats{display:flex;gap:7px;min-width:0;overflow-x:auto}.expedition-stats span{white-space:nowrap;padding:5px 8px;border:1px solid #554a35;background:#171612;color:#a99e88;font-size:10px}.expedition-stats b{display:block;margin-top:2px;color:#e6ca82;font-size:11px}.expedition-actions{grid-area:actions;display:grid;gap:6px}.expedition-actions button{padding:8px 12px;white-space:nowrap}.expedition-actions button:disabled{opacity:.45;cursor:not-allowed}
.siege-node.unsecured span{background:#8b471e;border-color:#ffd069;color:#ffe09a;box-shadow:0 0 14px #e85d28}.siege-node.unsecured b{color:#f1bd67}.siege-node.secured span{box-shadow:inset 0 0 0 2px #d6b66066}
.expedition-hud{display:flex;justify-content:center;gap:1px;width:min(820px,96vw);margin:-12px auto 8px;border:1px solid #6f5833;background:#171611;box-shadow:0 5px 14px #0008}.expedition-hud span{padding:6px 11px;border-right:1px solid #4b402d;color:#aaa08b;font-size:11px;white-space:nowrap}.expedition-hud span:last-child{border:0}.expedition-hud b{color:#ebc96f}
.council-card{width:min(760px,92vw)}.council-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:24px}.council-choice{display:flex;min-height:120px;flex-direction:column;justify-content:center;gap:9px;padding:15px;background:linear-gradient(#39352b,#24221c);border-color:#78643e}.council-choice strong{color:#efd48f;font-size:18px}.council-choice small{color:#bcb19a;line-height:1.5}.council-choice:disabled{opacity:.38;cursor:not-allowed}.council-choice:not(:disabled):hover{border-color:#e0b45b;background:#493b28}
.council-advice{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:15px;margin:14px 0 2px;padding:10px 13px;border:1px solid #b88c43;border-left:5px solid #b02f28;background:linear-gradient(105deg,#33291d,#1b1914);text-align:left;box-shadow:0 8px 22px #0007;animation:council-advice-in .35s ease-out}.council-advisor-portrait{width:92px;height:92px;border:1px solid #80683e;background-repeat:no-repeat;background-size:600% auto;box-shadow:inset 0 -18px 20px #0008}.council-advice small{display:block;color:#d9ad59;font:bold 13px Arial,"Yu Gothic",sans-serif;letter-spacing:.12em}.council-advice strong{display:block;margin:3px 0;color:#f2d58c;font-size:20px}.council-advice p{margin:0!important;color:#e1d7c3!important;font-size:15px;line-height:1.55}.council-choice.advised{border-color:#d6a84d;box-shadow:0 0 0 2px #d6a84d55,0 0 18px #d6a84d35}@keyframes council-advice-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.retreat-card{width:min(570px,92vw)}.retreat-card>div>p{color:#e8c987}.retreat-card dl{display:grid;grid-template-columns:105px 1fr;text-align:left;border-top:1px solid #564a35}.retreat-card dt,.retreat-card dd{margin:0;padding:9px;border-bottom:1px solid #40392d}.retreat-card dt{color:#a99b82}.retreat-card dd{color:#e3d7bf}.modal-actions{display:flex;justify-content:center;gap:12px;margin-top:22px}
.scene-overlay{position:fixed;inset:0;z-index:25;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(circle,#241b13e8,#080807f5);text-align:center}.scene-overlay.hidden{display:none}.scene-overlay:before,.scene-overlay:after{content:"";position:absolute;inset:0;pointer-events:none}.scene-overlay:before{background:repeating-linear-gradient(105deg,transparent 0 70px,#d1a34b0a 72px,transparent 74px);animation:scene-pan 1.2s ease-out}.scene-overlay:after{background:radial-gradient(circle,transparent 0 28%,#000c 76%)}.scene-overlay>*{position:relative;z-index:2}.scene-overlay .scene-ink{position:absolute;width:min(800px,85vw);height:260px;background:#07070699;filter:blur(18px);transform:rotate(-2deg)}.scene-overlay h2{margin:8px;color:#ecd190;font-size:clamp(44px,7vw,82px);letter-spacing:.14em;text-shadow:0 4px #6a201b;animation:scene-title .55s cubic-bezier(.2,.8,.2,1)}.scene-overlay>p:not(.eyebrow){color:#d0c1a4;font-size:16px}.scene-overlay button{margin-top:24px;padding:7px 13px;border-color:#66583e;background:#181713aa;color:#aa9e86;font-size:10px}.scene-overlay.pursuit{background:radial-gradient(circle,#4f211ce8,#080807f7)}.scene-overlay.checkpoint{background:radial-gradient(circle,#3d321de8,#080807f7)}.scene-overlay.retreat{background:radial-gradient(circle,#1c2730eb,#070809f8)}.scene-overlay.province-clear h2{color:#ffe39a;text-shadow:0 4px #8c291e,0 0 25px #d89d43}@keyframes scene-title{from{opacity:0;transform:scale(1.7);filter:blur(8px)}to{opacity:1;transform:none;filter:none}}@keyframes scene-pan{from{transform:translateX(-18%)}to{transform:none}}@media(prefers-reduced-motion:reduce){.scene-overlay:before,.scene-overlay h2{animation:none}}
.scene-generals{position:absolute;inset:0;z-index:1!important;pointer-events:none}.scene-general{position:absolute;bottom:7vh;width:clamp(180px,24vw,340px);text-align:center}.scene-general b{display:inline-block;margin-top:8px;padding:7px 18px;background:#111d;border:1px solid #8d7140;color:#f0dbab;font-size:clamp(18px,2vw,27px);letter-spacing:.12em}.scene-player{left:4vw;animation:general-in-left .65s ease-out}.scene-enemy{right:4vw;animation:general-in-right .65s ease-out}.scene-mon{height:min(52vh,470px);border-bottom:3px solid #b68a3b;background-position:center 22%;background-size:cover;background-repeat:no-repeat;filter:saturate(.8) contrast(1.08);box-shadow:inset 0 -70px 55px #090807}.scene-enemy .scene-mon{background-size:600% auto;background-position-y:28%}.scene-overlay:not(.has-generals) .scene-generals,.scene-overlay:not(.has-enemy) .scene-enemy{display:none}.scene-overlay.has-generals h2,.scene-overlay.has-generals>p{z-index:3}.scene-overlay.has-generals>p:not(.eyebrow){max-width:min(700px,58vw);padding:9px 18px;background:#100e0bd9;font-size:clamp(17px,1.5vw,23px);line-height:1.65}.scene-flag{display:none}.scene-overlay.province-clear .scene-flag{display:grid;place-items:center;position:absolute;right:12vw;top:7vh;width:100px;height:150px;background:#8f201e;color:#f0d58f;border:4px double #d9ad58;font-size:46px;font-weight:bold;transform-origin:50% 100%;animation:flag-fall 1.15s ease-in forwards}.scene-overlay.sortie:before{animation:scene-zoom 1.2s ease-out;background:radial-gradient(circle at center,#b8893b22 0 4%,transparent 44%),repeating-linear-gradient(105deg,transparent 0 70px,#d1a34b0a 72px,transparent 74px)}@keyframes general-in-left{from{opacity:0;transform:translateX(-70%)}}@keyframes general-in-right{from{opacity:0;transform:translateX(70%)}}@keyframes flag-fall{0%{transform:rotate(0);filter:brightness(1.3)}65%,100%{transform:rotate(72deg);filter:grayscale(.8) brightness(.55)}}@keyframes scene-zoom{from{transform:scale(1.45);filter:blur(8px)}to{transform:none;filter:none}}
.siege-node.secured span:after{content:"╫╫";position:absolute;bottom:-4px;color:#e1c276;font-size:10px;letter-spacing:-3px}.province.newly-opened{z-index:5;animation:new-route 1.1s ease-in-out infinite}.province.newly-opened:before{content:"新進路";position:absolute;left:50%;top:-27px;transform:translateX(-50%);padding:3px 8px;background:#ead28a;color:#251b0e;font:bold 12px Arial,sans-serif;white-space:nowrap;clip-path:none}@keyframes new-route{50%{box-shadow:0 0 0 5px #f0cf72,0 0 30px #e8a73d;transform:translate(-50%,-55%)}}
@media(max-height:700px){.scene-general{bottom:3vh;width:clamp(150px,20vw,250px)}.scene-mon{height:42vh}.scene-overlay.has-generals>p:not(.eyebrow){font-size:16px}.scene-overlay.province-clear .scene-flag{width:70px;height:105px;font-size:32px}}
@media(prefers-reduced-motion:reduce){.scene-general,.scene-overlay .scene-flag,.scene-overlay.sortie:before,.province.newly-opened{animation:none}}
#modalText{white-space:pre-line;font-size:17px}
.map-camera{position:absolute;inset:0;overflow:hidden;z-index:1}.map-geo{--map-zoom:1.6;--panel-scale:.625;position:absolute;left:50%;top:50%;height:100%;aspect-ratio:1;transform-origin:0 0;transform:scale(var(--map-zoom)) translate(var(--focus-x,-50%),var(--focus-y,-50%));transition:transform .35s ease}.map-geo>.japan-map-accurate{inset:0;width:100%;height:100%;object-fit:contain;object-position:center}.province-marker{position:absolute;width:0;height:0;z-index:4}.province-marker>.province{left:0;top:0;transform-origin:0 0;transform:scale(var(--panel-scale)) translate(-50%,-50%);pointer-events:auto}.province-marker>.province.target:hover{transform:scale(var(--panel-scale)) translate(-50%,-55%)}.province-marker>.province.selected-target{transform:scale(var(--panel-scale)) translate(-50%,-57%)}
.province-link{position:absolute;inset:0;width:100%;height:100%;z-index:3;overflow:visible;pointer-events:none}.province-link line{stroke:#b38a3f;stroke-width:1.5;vector-effect:non-scaling-stroke;opacity:.72}.province-link circle{fill:#171713;stroke:#e1b85e;stroke-width:2;vector-effect:non-scaling-stroke}.province-link.owned line{stroke:#d66a59}.province-link.owned circle{fill:#8f201e;stroke:#efc66a}
@media(max-width:1050px){.map-geo{--map-zoom:1.45;--panel-scale:.689655;height:98%}.map-geo>.japan-map-accurate{inset:0;width:100%;height:100%}}
@media(min-height:721px) and (max-height:850px){.battle-layout{--board-size:min(530px,calc(100vh - 340px),calc(100vw - 470px))}.campaign:has(.expedition-stats) .map{height:calc(100vh - 390px);min-height:220px}.campaign:has(.route-selector) .map{height:calc(100vh - 355px);min-height:260px}}
@media(max-width:900px){.province-info:has(.expedition-stats){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"stats actions" "route actions"}.province-info:has(.expedition-stats) .siege-summary{display:none}.expedition-hud span{padding:5px 6px;font-size:11px}.council-actions{grid-template-columns:1fr}.council-choice{min-height:72px}}
@media(max-height:650px){.campaign:has(.expedition-stats) .map{height:calc(100vh - 217px)}.province-info:has(.expedition-stats){min-height:94px}.expedition-stats span{padding:3px 5px}.expedition-hud{margin:-5px auto 4px}.expedition-hud span{padding:3px 6px}.council-card{padding:18px}.council-card h2{font-size:25px}.council-card p{margin:5px}.council-actions{grid-template-columns:repeat(3,1fr);margin-top:10px}.council-choice{min-height:72px;padding:8px}.council-choice strong{font-size:15px}.council-choice small{font-size:10px}}
@media(max-width:620px){.council-advice{grid-template-columns:72px minmax(0,1fr);gap:10px;padding:8px}.council-advisor-portrait{width:72px;height:78px}.council-advice strong{font-size:18px}.council-advice p{font-size:14px}}

/* Low-resolution map HUD: keep the map fixed and reveal dense information in stages. */
.hero:after{pointer-events:none}.compact-only{display:none}.map-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.section-head .map-actions #strategyBtn{margin-left:0}.map-panel-backdrop{display:none}
@media(max-width:900px),(max-height:720px){
  body:has(#mapScreen.active){overflow:hidden}header{height:58px;padding:0 12px}.screen{min-height:calc(100dvh - 58px)}
  .compact-only{display:inline-flex;align-items:center;justify-content:center}.map-actions{gap:6px}.map-actions button{min-height:38px;padding:7px 12px!important;font-size:14px!important;white-space:nowrap}.section-head #strategyBtn{color:#e8ce8d}
  #mapScreen.active{height:calc(100dvh - 58px);min-height:0;padding:5px 8px!important;overflow:hidden}
  #mapScreen .campaign{display:grid;height:100%;min-height:0;grid-template-rows:48px minmax(0,1fr)}
  #mapScreen .section-head{height:48px!important;min-height:0;align-items:center;gap:8px}.section-head .eyebrow{display:none}.section-head h2{margin:0;font-size:24px}.section-head #campaignHint{max-width:35vw;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
  #mapScreen .map-stage{display:block;height:100%;min-height:0;margin-top:0!important}.map-stage>.map{width:100%;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important}.map:after{bottom:6px}
  .map-stage>.warrior-card{display:none!important}.map-stage>.warrior-card.mobile-open{display:block!important;position:fixed!important;inset:74px auto auto 50%!important;transform:translateX(-50%);z-index:17;width:min(430px,calc(100vw - 24px))!important;height:auto!important;max-height:calc(100dvh - 90px)!important;padding:18px!important;overflow:hidden!important;background:linear-gradient(145deg,#302d24,#171713);box-shadow:0 24px 70px #000!important}
  .warrior-card.mobile-open .portrait{height:150px!important}.warrior-card.mobile-open h2{font-size:28px!important}.warrior-card.mobile-open>p{font-size:16px!important}.warrior-card.mobile-open .stats{margin:14px 0!important}.warrior-card.mobile-open .stats span{font-size:14px!important;padding:10px 4px!important}.warrior-card.mobile-open .stats b{font-size:22px!important}.warrior-card.mobile-open .skill{font-size:16px!important;line-height:1.55!important}
  .province-info{display:none!important}.province-info.mobile-open{position:fixed;left:50%;bottom:10px;transform:translateX(-50%);z-index:17;width:min(780px,calc(100vw - 20px));height:auto!important;max-height:calc(100dvh - 84px);min-height:0!important;padding:48px 16px 16px!important;overflow:hidden;background:linear-gradient(160deg,#302d24,#171713);border:1px solid #a78648;box-shadow:0 24px 70px #000;align-items:stretch}
  .province-info.mobile-open:has(.route-selector){display:block!important}.province-info.mobile-open .route-selector{display:grid;grid-template-columns:1fr;gap:10px}.province-info.mobile-open .route-selector>strong{display:block;font-size:22px}.province-info.mobile-open .route-selector>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;overflow:visible;padding:0}.province-info.mobile-open .route-selector button{min-width:0;padding:10px 13px}.province-info.mobile-open .route-selector button b{font-size:19px}.province-info.mobile-open .route-selector button span{font-size:15px}.province-info.mobile-open .route-selector button small{font-size:14px}
  .province-info.mobile-open:has(.expedition-stats){display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"summary actions" "stats stats" "route route";gap:10px 12px}.province-info.mobile-open .siege-summary{display:block!important;grid-area:summary;min-width:0}.province-info.mobile-open .siege-summary strong{font-size:20px}.province-info.mobile-open .siege-summary p{font-size:14px;line-height:1.45}.province-info.mobile-open .expedition-stats{grid-area:stats;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;overflow:visible}.province-info.mobile-open .expedition-stats span{min-width:0;padding:7px;text-align:center;font-size:13px}.province-info.mobile-open .expedition-stats b{font-size:14px}.province-info.mobile-open .siege-route{grid-area:route;overflow:hidden;padding:2px}.province-info.mobile-open .siege-path{grid-template-columns:repeat(var(--stages),minmax(0,1fr)) minmax(0,1.15fr);min-width:0;gap:5px}.province-info.mobile-open .siege-node span{width:42px;height:42px}.province-info.mobile-open .siege-node.keep span{width:48px}.province-info.mobile-open .siege-node b{font-size:12px}.province-info.mobile-open .siege-node small{font-size:11px}.province-info.mobile-open .expedition-actions{grid-area:actions;display:grid;gap:6px}.province-info.mobile-open .expedition-actions button{padding:10px 14px;font-size:14px}
  .compact-panel-close{position:absolute;right:8px;top:7px;z-index:2;width:40px;height:40px;padding:0!important;border:0;background:#111b;color:#f0d28a;font:30px/1 Arial,sans-serif}.map-panel-backdrop:not(.hidden){display:block;position:fixed;inset:58px 0 0;z-index:15;padding:0;border:0;background:#000a}
  .province{width:104px;height:68px;padding:7px}.province strong{font-size:16px}.province small{font-size:13px}.map-geo{--map-zoom:1.45;--panel-scale:.689655}
}
@media(max-width:520px){
  header{height:54px;padding:0 8px}header>div{gap:8px}header .crest{width:28px;height:28px;font-size:14px}header h1{font-size:17px;letter-spacing:.08em}header nav button{padding:5px 7px;font-size:10px}header #saveBtn,header #resetBtn{display:none}.screen{min-height:calc(100dvh - 54px)}
  #mapScreen.active{height:calc(100dvh - 54px);padding:4px!important}#mapScreen .campaign{grid-template-rows:46px minmax(0,1fr)}#mapScreen .section-head{height:46px!important}.section-head h2{font-size:20px}.section-head #campaignHint{display:none}.map-actions{gap:4px}.map-actions button{min-height:38px;padding:6px 8px!important;font-size:13px!important}.map-panel-backdrop:not(.hidden){inset:54px 0 0}
  .map-stage>.warrior-card.mobile-open{inset:66px auto auto 50%!important;width:calc(100vw - 16px)!important;padding:14px!important}.warrior-card.mobile-open .portrait{height:130px!important}.warrior-card.mobile-open h2{font-size:25px!important}.warrior-card.mobile-open>p,.warrior-card.mobile-open .skill{font-size:15px!important}
  .province-info.mobile-open{bottom:6px;width:calc(100vw - 12px);max-height:calc(100dvh - 68px);padding:45px 10px 11px!important}.province-info.mobile-open .route-selector>div{grid-template-columns:1fr}.province-info.mobile-open .route-selector button{padding:8px 11px}.province-info.mobile-open .route-selector button b{font-size:18px}.province-info.mobile-open .route-selector button span{font-size:14px}.province-info.mobile-open .route-selector button small{font-size:13px}
  .province-info.mobile-open:has(.expedition-stats){grid-template-columns:1fr;grid-template-areas:"summary" "stats" "route" "actions";gap:7px}.province-info.mobile-open .siege-summary strong{font-size:19px}.province-info.mobile-open .siege-summary p{margin:4px 0;font-size:13px}.province-info.mobile-open .expedition-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.province-info.mobile-open .expedition-stats span{padding:5px;font-size:12px}.province-info.mobile-open .siege-node span{width:35px;height:35px}.province-info.mobile-open .siege-node.keep span{width:40px}.province-info.mobile-open .siege-path:before{top:17px}.province-info.mobile-open .siege-node small{display:none}.province-info.mobile-open .expedition-actions{display:flex}.province-info.mobile-open .expedition-actions button{flex:1;min-width:0;padding:9px 6px;font-size:13px}
  .province{width:96px;height:64px}.province strong{font-size:16px}.province small{font-size:12px}
}

/* 評定・進路・音量設定。可読性を優先し、本文と操作文字は14px以上を基本とする。 */
.section-head{gap:18px}.section-head #strategyBtn{margin-left:auto;padding:10px 18px;font-size:15px;color:#e8ce8d;border-color:#8d7140}.section-head #campaignHint{font-size:15px}
.province-info:has(.route-selector){height:auto;min-height:112px;padding:10px 16px}.route-selector{display:grid;grid-template-columns:170px minmax(0,1fr);align-items:center;width:100%;gap:14px}.route-selector>strong{font-size:19px;color:#efd28a}.route-selector>div{display:flex;gap:10px;overflow-x:auto;padding:3px}.route-selector button{display:grid;min-width:205px;gap:3px;padding:10px 14px;text-align:left;background:#211f19;border-color:#6f5d3c}.route-selector button b{font-size:18px;color:#ead092}.route-selector button span{font-size:14px;color:#d0c5ae}.route-selector button small{font-size:13px;color:#a99d84}
.siege-node.fogged{filter:grayscale(.8);opacity:.62}.siege-node.fogged span{background:#34332f;color:#b4b0a7;border-color:#66625a}.scout-report{margin-top:7px!important;padding:6px 8px;background:#17201d;border-left:3px solid #739780;color:#d5dfd5!important;font-size:13px!important}.scout-report b{color:#9fc8a9}
.settings-card{width:min(600px,92vw)}.settings-card label{display:grid;grid-template-columns:1fr auto;gap:10px;margin:24px 0;color:#e8d5a7;font-size:20px;text-align:left}.settings-card output{min-width:52px;text-align:right;color:#fff;font:bold 22px Arial,sans-serif}.settings-card input[type="range"]{grid-column:1/3;width:100%;height:30px;accent-color:#a52e27}.settings-card>.primary{margin-top:12px}
.strategy-card{position:relative;width:min(900px,95vw);max-height:92vh;overflow:auto;padding:34px 40px;text-align:left}.strategy-card>h2{font-size:34px}.strategy-card>h3{margin:25px 0 10px;color:#e6c77f;font-size:21px}.strategy-card>#strategyCloseBottom{display:block;margin:25px auto 0}.merit-balance{margin:8px 0 16px;color:#c8baa0;font-size:20px}.merit-balance b{color:#ffe099;font-size:30px}.strategy-notice{padding:10px 14px;background:#5b241e;color:#f4d0c7!important;font-size:15px}.upgrade-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.upgrade-list article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px;background:#191814;border:1px solid #4f4738}.upgrade-list h3{margin:0 0 5px;color:#ebd193;font-size:19px}.upgrade-list h3 small{color:#9f947f;font-size:13px}.upgrade-list p{margin:0;color:#c8bea9;font-size:14px;line-height:1.5}.upgrade-list button{padding:10px 12px;font-size:14px;white-space:nowrap}.upgrade-list button:disabled{opacity:.45}.effect-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.effect-list span{display:grid;gap:5px;padding:11px;border:1px solid #4c463b;background:#181713;opacity:.5}.effect-list span.active{border-color:#c69a4b;background:#2d2618;opacity:1}.effect-list b{color:#e4ca8b;font-size:15px}.effect-list small{color:#bdb29d;font-size:13px;line-height:1.4}
@media(max-width:900px){header nav button{padding-left:8px;padding-right:8px}.route-selector{grid-template-columns:1fr}.route-selector>strong{display:none}.strategy-card{padding:25px}.upgrade-list{grid-template-columns:1fr}.effect-list{grid-template-columns:repeat(2,1fr)}}
@media(max-height:650px){.campaign:has(.route-selector) .map{height:calc(100vh - 218px)}.province-info:has(.route-selector){min-height:105px}.route-selector button{min-width:190px;padding:7px 10px}.route-selector button b{font-size:16px}.route-selector button span{font-size:14px}.route-selector button small{font-size:13px}.strategy-card{max-height:96vh;padding:18px 28px}.strategy-card>h2{margin:5px 0;font-size:28px}.upgrade-list article{padding:8px}.effect-list span{padding:7px}.settings-card label{margin:14px 0}}

/* Smartphone battle HUD: preserve a large board and reveal commander detail on demand. */
.battle-actions{display:flex;align-items:center;gap:7px}.battle-actions .compact-only,.battle-panel-close{display:none!important}.battle-panel-backdrop{display:none}.expedition-hud small{font:inherit}
@media(max-width:600px){
  body:has(#battleScreen.active){overflow:hidden}#battleScreen.active{display:grid!important;grid-template-rows:42px 36px minmax(0,1fr);height:calc(100dvh - 58px);min-height:0;padding:3px 6px 5px!important;overflow:hidden}
  .battle-top{width:100%;max-width:none;height:42px!important;margin:0;gap:5px}.battle-top>div:first-child{min-width:0}.battle-top .eyebrow{margin:0;color:#dfbd70;font-size:0;letter-spacing:.04em;white-space:nowrap}.battle-top .eyebrow span{font-size:15px}.battle-top h2{display:none}.battle-actions{gap:4px;margin-left:auto}.battle-actions .compact-only{display:inline-flex!important;align-items:center;justify-content:center}.battle-actions button{min-width:54px;min-height:34px;padding:5px 7px!important;font-size:13px!important;letter-spacing:.04em;white-space:nowrap}.battle-actions #retreatBtn{min-width:76px;color:#e7bd9d}
  #battleScreen .expedition-hud{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;height:36px;margin:0;border-color:#81693c;box-shadow:none}.expedition-hud span{display:grid;place-content:center;min-width:0;padding:2px 1px!important;text-align:center;font-size:10px!important;line-height:1.05;overflow:hidden}.expedition-hud small{display:block;color:#bdb39f;font-size:10px;white-space:nowrap}.expedition-hud b{display:block;margin-top:2px;overflow:hidden;color:#f0ce72;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
  .battle-layout{--board-size:min(calc(100vw - 12px),calc(100dvh - 264px));display:grid;width:100%;height:100%;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:34px minmax(0,1fr) 42px;grid-template-areas:"enemy" "board" "player";gap:3px;align-items:center;overflow:hidden}
  .battle-layout>.general{position:relative;width:100%;height:100%!important;min-height:0!important;padding:2px 7px!important;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;overflow:hidden;border-color:#554b39;background:#191814}.battle-layout>.general.enemy{grid-area:enemy}.battle-layout>.general.player{grid-area:player;border-color:#80663c}.battle-layout>.general>.mon,.battle-layout>.general>p,.battle-layout>.general>.speech{display:none}.battle-layout>.general h3{margin:0!important;color:#e8d29c;font-size:14px!important;line-height:1;white-space:nowrap}.battle-layout>.general .hand{display:flex;margin:0!important;gap:4px;justify-content:flex-end;align-items:center;flex-wrap:nowrap;overflow:hidden}.battle-layout>.general .hand:empty:after{content:"持ち駒なし";color:#817866;font-size:12px}.battle-layout>.general.enemy .hand{pointer-events:none}.hand-piece{min-width:32px;min-height:30px;padding:3px 5px!important;font-size:14px!important;line-height:1;letter-spacing:0;white-space:nowrap;touch-action:manipulation}
  .board-wrap{grid-area:board;display:grid;width:100%;height:100%;min-height:0;grid-template-rows:28px var(--board-size) 24px;justify-items:center;align-content:center;overflow:hidden}.battle-layout .board{width:var(--board-size)!important;height:var(--board-size)!important;border-width:4px;box-shadow:0 8px 22px #000;touch-action:manipulation}.cell{touch-action:manipulation}.piece{width:80%!important;height:88%!important;font-size:clamp(18px,5.5vw,26px)!important}.cell.legal:after{width:18px;height:18px}.cell.last-enemy:before{top:1px;left:1px;padding:1px 2px;font-size:7px}
  #turnBanner{align-self:end;width:min(240px,76vw);height:26px;margin:0!important;padding:4px!important;font-size:14px!important;line-height:18px}#battleMessage{align-self:start;width:100%;height:24px!important;margin:0!important;padding:3px 4px;color:#ded3bc;font-size:14px!important;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .battle-layout>.general.mobile-open{display:block;position:fixed;left:8px;right:8px;top:70px;z-index:27;width:auto;height:auto!important;max-height:calc(100dvh - 82px)!important;padding:44px 15px 14px!important;overflow:hidden;border:1px solid #af8b4a;background:linear-gradient(155deg,#302d25,#151512);box-shadow:0 25px 70px #000}.battle-layout>.general.mobile-open>.mon{display:grid;height:clamp(92px,20dvh,140px)!important;background-position:center 24%}.battle-layout>.general.mobile-open h3{margin:8px 0 4px!important;font-size:23px!important}.battle-layout>.general.mobile-open>p{display:block;min-height:0;margin:4px 0;color:#c8bda8;font-size:15px!important;line-height:1.45}.battle-layout>.general.mobile-open>.speech{display:block;min-height:68px;margin:8px 0;padding:9px;font-size:15px!important;line-height:1.45}.battle-layout>.general.mobile-open .hand{justify-content:flex-start;min-height:34px;overflow:visible}.battle-layout>.general.mobile-open .hand:empty:after{font-size:14px}.battle-layout>.general.mobile-open .battle-panel-close{display:grid!important;place-items:center;position:absolute;right:7px;top:7px;z-index:2;width:38px;height:38px;padding:0!important;border:0;background:#111c;color:#f0d28a;font:28px/1 Arial,sans-serif}
  .battle-panel-backdrop:not(.hidden){display:block;position:fixed;inset:58px 0 0;z-index:26;padding:0;border:0;background:#000b}
}
@media(max-width:520px){#battleScreen.active{height:calc(100dvh - 54px)}.battle-panel-backdrop:not(.hidden){inset:54px 0 0}.battle-layout>.general.mobile-open{top:64px;max-height:calc(100dvh - 76px)!important}}

/* Decisive-position dialogue: compact battles surface character reactions briefly. */
.battle-quote{display:none}
@media(max-width:600px){
  .battle-quote:not(.hidden){display:grid;position:fixed;left:8px;right:28px;top:50%;z-index:24;min-height:104px;grid-template-columns:78px minmax(0,1fr) 38px;align-items:stretch;gap:10px;padding:8px;border:1px solid #bd9450;border-left:5px solid #a92e27;background:linear-gradient(105deg,#2d2920f5,#171512fa);box-shadow:0 18px 48px #000d;transform:translateY(-50%);animation:battle-quote-in .2s ease-out}.battle-quote.enemy:not(.hidden){left:28px;right:8px;border-right:5px solid #b78a42;border-left:1px solid #725c36;background:linear-gradient(255deg,#34281ef7,#171512fa)}
  .battle-quote-portrait{min-height:88px;border:1px solid #75613d;background-position:center 24%;background-size:cover;background-repeat:no-repeat;box-shadow:inset 0 -18px 22px #0008}.battle-quote-portrait.retainer-portrait{background-size:600% auto;background-position-y:28%}
  .battle-quote-body{align-self:center;min-width:0}.battle-quote-body small{display:block;margin-bottom:2px;color:#d9ad59;font:bold 12px Arial,"Yu Gothic",sans-serif;letter-spacing:.1em}.battle-quote-body strong{display:block;color:#f0dfb5;font-size:18px}.battle-quote-body p{margin:5px 0 0;color:#f2ead8;font-size:16px;font-weight:600;line-height:1.45}.battle-quote-body p:before{content:"「";color:#d45448}.battle-quote-body p:after{content:"」";color:#d45448}
  #battleQuoteClose{align-self:start;width:36px;height:36px;padding:0;border:0;background:#0e0e0dcf;color:#e7cf98;font:25px/1 Arial,sans-serif;letter-spacing:0}
  @keyframes battle-quote-in{from{opacity:0;transform:translateY(-45%) scale(.96)}to{opacity:1;transform:translateY(-50%) scale(1)}}
}
@media(max-width:360px){.battle-quote:not(.hidden){left:5px;right:15px;grid-template-columns:66px minmax(0,1fr) 34px;gap:7px}.battle-quote.enemy:not(.hidden){left:15px;right:5px}.battle-quote-body strong{font-size:17px}.battle-quote-body p{font-size:15px}}

#saveModal{z-index:35;overflow:auto;padding:12px}.save-card{position:relative;width:min(720px,94vw);padding:34px 38px}.save-card h2{margin:7px 0 8px;font-size:34px}.save-help{margin:0 0 20px;color:#c9bea8;font-size:16px}.save-slots{display:grid;gap:10px;text-align:left}.save-slot{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:14px;min-height:88px;padding:12px 14px;border:1px solid #5d5546;background:#1b1a16}.save-slot-number{display:grid;place-items:center;width:58px;height:58px;border:1px solid #9b793f;color:#e4c678;font:bold 25px Arial,sans-serif}.save-slot-info b,.save-slot-info span{display:block}.save-slot-info b{margin-bottom:5px;color:#eee2c7;font-size:18px}.save-slot-info span{color:#aaa08d;font-size:14px;line-height:1.45}.save-slot.empty .save-slot-info b{color:#9e9583}.save-slot-actions{display:flex;gap:7px}.save-slot-actions button{padding:10px 13px;font-size:14px}.save-slot-actions .slot-delete{padding-inline:10px;color:#c58e87}.save-card>.primary{margin-top:20px}.save-card.load-only .slot-save{display:none}
@media(max-width:620px){.save-card{padding:25px 18px}.save-card h2{font-size:28px}.save-help{font-size:15px}.save-slot{grid-template-columns:52px minmax(0,1fr);gap:10px}.save-slot-number{width:46px;height:46px;font-size:21px}.save-slot-actions{grid-column:1/-1}.save-slot-actions button{flex:1;min-height:42px;font-size:15px}.save-slot-info b{font-size:17px}.save-slot-info span{font-size:13px}}

/* three.jsの着手演出と、WebGL非対応時にも残る立体駒表現 */
.board-wrap{position:relative}.piece{position:relative;isolation:isolate;overflow:visible;background:linear-gradient(105deg,#fffde8 0,#ffe7aa 56%,#f2bd70 100%);box-shadow:inset 2px 2px 4px #fff,inset -3px -4px 4px #b9773038,0 4px 0 #c9813e,0 7px 5px #633a1d52;filter:drop-shadow(0 2px 2px #80502766);transform:perspective(180px) rotateX(13deg) translateY(-2px);transform-style:preserve-3d;transition:transform .15s,filter .15s}.piece.enemy{background:linear-gradient(105deg,#fff5d6 0,#f3d397 56%,#dda95f 100%);transform:rotate(180deg) perspective(180px) rotateX(13deg) translateY(2px)}.piece:before{content:"";position:absolute;inset:5% 6% -7%;z-index:-1;background:#c9813e;clip-path:inherit}.cell:hover .piece,.cell.selected .piece{filter:brightness(1.06) drop-shadow(0 5px 4px #8c582b66);transform:perspective(180px) rotateX(18deg) translateY(-6px) scale(1.04)}.cell:hover .piece.enemy,.cell.selected .piece.enemy{transform:rotate(180deg) perspective(180px) rotateX(18deg) translateY(6px) scale(1.04)}
.battle-fx{position:absolute;inset:0;z-index:9;overflow:visible;pointer-events:none}.battle-fx canvas{position:absolute;filter:drop-shadow(0 8px 8px #0009)}.battle-fx:after{content:"";position:absolute;inset:0;opacity:0;background:radial-gradient(circle,#fff8 0,#ffb52b44 28%,#8e171200 70%);pointer-events:none}.battle-fx.decisive:after{animation:decisive-flash .95s ease-out}.cell.fx-move:after,.cell.fx-capture:after,.cell.fx-check:after,.cell.fx-finish:after{content:"";position:absolute;inset:8%;z-index:4;border:3px solid #ffe09a;border-radius:50%;animation:fallback-impact .52s ease-out}.cell.fx-capture:after,.cell.fx-check:after{border-color:#ff9f45;box-shadow:0 0 20px #ff5a24}.cell.fx-finish:after{border-width:6px;border-color:#fff2a8;box-shadow:0 0 35px #ff281d;animation-duration:.95s}.board.fx-decisive{animation:board-decisive .95s ease-out}@keyframes decisive-flash{0%,100%{opacity:0}18%{opacity:1}45%{opacity:.35}}@keyframes fallback-impact{from{opacity:1;transform:scale(.2)}to{opacity:0;transform:scale(2.2)}}@keyframes board-decisive{20%{filter:brightness(1.8) saturate(1.5);transform:scale(1.018)}55%{filter:brightness(.8)}}
@media(prefers-reduced-motion:reduce){.piece{transition:none}.cell.fx-move:after,.cell.fx-capture:after,.cell.fx-check:after,.cell.fx-finish:after,.board.fx-decisive{animation-duration:.08s}}

/* 対局画面の余白を、対戦する両家の抽象文様で彩る。 */
.battle-screen{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at center,#242018 0,#151512 68%,#0c0c0b 100%)}
.battle-screen:before,.battle-screen:after{position:absolute;top:0;bottom:0;width:50%;z-index:-1;display:grid;place-items:center;overflow:hidden;pointer-events:none;font-size:clamp(150px,22vw,360px);font-weight:900;line-height:1;text-shadow:0 0 38px currentColor;opacity:.58}
.battle-screen:before{content:attr(data-enemy-motif);left:0;color:var(--enemy-motif-color,#c45b45);background-image:var(--enemy-motif-pattern);background-size:var(--enemy-motif-size);mask-image:linear-gradient(90deg,#000 0,#000 58%,transparent 98%)}
.battle-screen:after{content:attr(data-player-motif);right:0;color:var(--player-motif-color,#d2a54e);background-image:var(--player-motif-pattern);background-size:var(--player-motif-size);mask-image:linear-gradient(270deg,#000 0,#000 58%,transparent 98%)}

/* 持ち駒は盤上駒に近い視認性と、従来比およそ二周り大きい操作面を持たせる。 */
#battleScreen .hand{gap:5px}
#battleScreen .hand-piece{display:inline-grid;place-items:center;min-width:45px;min-height:41px;padding:7px 9px!important;border:2px solid #e8bd72;background:linear-gradient(115deg,#fff2c4,#e7b96e 68%,#c98a43);box-shadow:inset 1px 1px 2px #fff8,0 3px 0 #845021,0 5px 8px #0008;color:#17120c;font-size:19px!important;line-height:1;font-weight:800}
#battleScreen .hand-piece:hover{filter:brightness(1.08);transform:translateY(-1px)}
@media(max-width:600px){
  #battleScreen .battle-layout>.general .hand{gap:6px;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
  #battleScreen .hand-piece{flex:0 0 auto;min-width:42px;min-height:38px;padding:5px 8px!important;font-size:18px!important}
  #battleScreen .battle-layout>.general.mobile-open .hand{min-height:46px;overflow-x:auto}
  .battle-screen:before,.battle-screen:after{font-size:34vw;opacity:.45}
}

/* 対局中は共通ヘッダーを畳み、盤・持ち駒・武将情報へ表示領域を集中する。 */
body:has(#battleScreen.active) #app>header{display:none}
#battleScreen.active{display:grid!important;width:100%;height:100dvh;min-height:0;padding:5px 12px 8px;grid-template-rows:48px 34px minmax(0,1fr)}
#battleScreen .battle-top{width:100%;max-width:1500px;height:48px;margin:0 auto;gap:10px}
#battleScreen .battle-top .eyebrow{margin:0;font-size:11px}
#battleScreen .battle-top h2{margin:2px 0 0;font-size:clamp(20px,1.7vw,28px)}
#battleScreen .battle-actions{gap:7px}
#battleScreen #battleSaveBtn{display:inline-flex!important;align-items:center;justify-content:center}
#battleScreen .battle-actions button{min-height:36px;padding:7px 13px;font-size:14px}
#battleScreen .expedition-hud{width:min(900px,100%);height:34px;margin:0 auto;border-color:#81693c;box-shadow:none}
#battleScreen .expedition-hud span{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;padding:3px 10px;font-size:12px}
#battleScreen .battle-layout{display:grid;width:100%;height:100%;min-height:0;grid-template-columns:minmax(180px,1fr) minmax(0,900px) minmax(180px,1fr);gap:12px;align-items:center;justify-content:stretch;overflow:hidden}
#battleScreen .board-wrap{display:grid;width:100%;height:100%;min-height:0;grid-template-rows:30px minmax(0,1fr) 26px;place-items:center;align-content:center}
#battleScreen .battle-layout .board{width:min(100%,calc(100dvh - 152px),900px)!important;height:auto!important;aspect-ratio:1;border-width:5px}
#battleScreen #turnBanner{align-self:end;height:28px;margin:0 0 2px;padding:4px;font-size:15px;line-height:20px}
#battleScreen #battleMessage{align-self:start;width:100%;height:24px;margin:2px 0 0;font-size:15px;line-height:20px}
#battleScreen .general{display:grid;width:min(100%,280px);height:min(100%,900px);min-height:0;padding:10px;grid-template-rows:minmax(120px,1.55fr) auto auto minmax(66px,.52fr) auto;align-content:stretch;overflow:hidden}
#battleScreen .general.enemy{justify-self:end}
#battleScreen .general.player{justify-self:start}
#battleScreen .general .mon{height:auto;min-height:120px;background-position:center 24%;font-size:64px}
#battleScreen .general h3{margin:7px 0 3px;font-size:clamp(19px,1.5vw,25px)}
#battleScreen .general>p{min-height:0;margin:2px 0;font-size:14px;line-height:1.35}
#battleScreen .general .speech{min-height:66px;margin:4px 0;padding:7px 8px;font-size:clamp(15px,1.15vw,18px);line-height:1.4;overflow:auto}
#battleScreen .general .hand{align-content:start;max-height:148px;margin-top:5px;overflow-y:auto}

@media(max-width:900px) and (min-width:601px){
  #battleScreen.active{padding-inline:6px}
  #battleScreen .battle-layout{grid-template-columns:minmax(142px,1fr) minmax(0,680px) minmax(142px,1fr);gap:6px}
  #battleScreen .general{padding:6px;grid-template-rows:minmax(92px,1.35fr) auto auto minmax(58px,.52fr) auto}
  #battleScreen .general .mon{min-height:92px}
  #battleScreen .general>p{font-size:12px}
  #battleScreen .general .speech{min-height:58px;padding:5px 6px;font-size:14px}
}
@media(max-width:600px){
  #battleScreen.active{height:100dvh;min-height:0;grid-template-rows:42px 36px minmax(0,1fr)}
  #battleScreen .battle-layout{--board-size:min(calc(100vw - 12px),calc(100dvh - 220px));grid-template-columns:minmax(0,1fr);grid-template-rows:34px minmax(0,1fr) 42px;gap:3px}
  #battleScreen .battle-layout .board{width:var(--board-size)!important;height:var(--board-size)!important;aspect-ratio:auto}
  #battleScreen .battle-layout>.general{width:100%;height:100%!important;display:grid;grid-template-rows:none}
  #battleScreen .battle-layout>.general.mobile-open{display:block;height:auto!important}
}

/* 兵糧の用途、強化の適用時機、対局中に使える軍略を常時見せる。 */
.supply-rule{margin:6px 0 0!important;padding:6px 9px;background:#302516;border-left:4px solid #d09a3e;color:#e3d5ba!important;font-size:14px!important;line-height:1.45!important}.supply-rule b{color:#f0c766}.expedition-stats .supply-stat{position:relative;background:#332918}.expedition-stats .supply-stat small{display:block;margin-top:2px;color:#d8b969;font-size:12px}.expedition-actions button small{display:block;margin-top:4px;color:#d8c7a4;font-size:12px;line-height:1.3;letter-spacing:0}.expedition-actions .primary small{color:#f3d69a}.supply-hud{background:#302617}.supply-hud b{color:#ffe08a!important}.upgrade-timing{display:block;margin-top:6px;color:#d3ad61!important;font-size:13px!important}
.battle-actions{max-width:75vw;overflow-x:auto;scrollbar-width:thin}.tactic-button{border-color:#9f7a36;background:linear-gradient(#463719,#282116);color:#f1d486;white-space:nowrap}.tactic-button b{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:4px;border-radius:50%;background:#bd8d32;color:#17130c;font:bold 14px Arial,sans-serif}.tactic-button:disabled{opacity:.42}.cell.advice-hint{outline:4px solid #59b9d7;outline-offset:-5px;background:#bfefff55}.cell.advice-hint:before{content:attr(data-hint);position:absolute;left:2px;top:2px;z-index:6;display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:#167e9f;color:#fff;font:bold 13px Arial,sans-serif;box-shadow:0 0 10px #5ee6ff}.cell.danger-square{box-shadow:inset 0 0 0 5px #c92f2f,inset 0 0 22px #ff3c3c99}.cell.risky-move{box-shadow:inset 0 0 0 5px #e38a27,inset 0 0 20px #ffb33c88}.cell.advice-hint.danger-square{outline-color:#65dfff}.retreat-card #defeatRetryText{color:#ded1b8;font-size:17px;line-height:1.7}
.tactic-status{flex:0 0 auto;padding:6px 8px;border:1px solid #665536;background:#1c1913;color:#d8c38f;font-size:13px;white-space:nowrap}
@media(max-width:600px){.battle-actions{max-width:100%;gap:3px!important}.battle-actions .tactic-button{min-width:60px;padding-inline:5px!important}.battle-actions .tactic-button b{min-width:19px;height:19px;font-size:12px}.battle-actions #enemyInfoBtn,.battle-actions #playerInfoBtn{display:none!important}.tactic-status{padding:5px 6px;font-size:11px}.supply-rule{font-size:13px!important}.expedition-stats .supply-stat small{font-size:11px}.cell.advice-hint:before{width:17px;height:17px;font-size:11px}}

/* Mobile baseline: fixed desktop dimensions must never widen or clip the play area. */
html{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body,#app{width:100%;max-width:100%;min-width:0;overflow-x:hidden}

@media(max-width:600px){
  button{min-height:44px;padding:10px 14px;font-size:16px;letter-spacing:.04em;touch-action:manipulation}
  .primary{font-size:18px;padding:13px 20px}
  header{height:58px;padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));gap:6px}
  header>div{min-width:0;gap:8px}header .crest{flex:0 0 30px;width:30px;height:30px;font-size:15px}header h1{font-size:clamp(18px,5vw,22px);letter-spacing:.06em;white-space:nowrap}
  header nav{display:flex;min-width:0;gap:4px;margin-left:auto}header nav button{min-height:40px;padding:6px 8px;font-size:13px;letter-spacing:0;white-space:nowrap}header #saveBtn,header #resetBtn{display:none}
  .screen{min-height:calc(100dvh - 58px)}

  #titleScreen.active{display:block;min-height:calc(100dvh - 58px);overflow:auto}
  .hero{display:flex;min-height:calc(100dvh - 58px);flex-direction:column;justify-content:center;padding:clamp(28px,7dvh,60px) 20px max(24px,env(safe-area-inset-bottom));overflow:hidden}
  .hero:after{right:-20px;top:8%;font-size:clamp(88px,34vw,132px)}
  .title-kicker,.eyebrow{font-size:13px;letter-spacing:.2em}.hero h2{max-width:10em;margin:14px 0;font-size:clamp(36px,11vw,50px);line-height:1.25}.hero>p{width:100%;max-width:34em;margin:0 0 24px;color:#d1c8b5;font-size:17px;line-height:1.8}
  .hero>.primary,.hero>.secondary{position:relative;z-index:1;width:100%;max-width:360px;margin:0 0 10px}.hero>.secondary{margin-left:0}
  .title-credits{position:relative;left:auto;bottom:auto;margin-top:clamp(18px,5dvh,42px);font-size:12px;line-height:1.55}.title-credits p{font-size:12px;line-height:1.55}.title-credits small{font-size:11px}.credits-button{min-height:40px;margin-top:10px;padding:7px 10px;font-size:13px}

  #mapScreen.active{height:calc(100dvh - 58px);padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))!important}
  #mapScreen .campaign{grid-template-rows:50px minmax(0,1fr)}#mapScreen .section-head{height:50px!important;gap:5px}.section-head h2{font-size:22px}.map-actions{min-width:0;gap:3px}.map-actions button{min-width:0;min-height:42px;padding:7px 8px!important;font-size:14px!important;letter-spacing:0}.section-head #strategyBtn{padding-inline:8px!important}
  .map-stage>.map{border-width:1px}.province{width:100px;height:68px;padding:6px}.province strong{font-size:17px}.province small{font-size:13px}.map:after{font-size:10px;letter-spacing:.12em}
  .map-stage>.warrior-card.mobile-open{inset:68px auto auto 50%!important;width:calc(100vw - 14px)!important;max-height:calc(100dvh - 76px)!important;padding:50px 15px 16px!important;overflow-y:auto!important}.warrior-card.mobile-open h2{font-size:28px!important}.warrior-card.mobile-open>p,.warrior-card.mobile-open .skill{font-size:16px!important}.warrior-card.mobile-open .stats span{font-size:14px!important}.warrior-card.mobile-open .stats b{font-size:23px!important}
  .province-info.mobile-open{width:calc(100vw - 10px);max-height:calc(100dvh - 66px);padding:48px 11px max(12px,env(safe-area-inset-bottom))!important;overflow-x:hidden!important;overflow-y:auto!important}.province-info.mobile-open .route-selector>strong{font-size:22px}.province-info.mobile-open .route-selector button{min-height:64px}.province-info.mobile-open .route-selector button b{font-size:19px}.province-info.mobile-open .route-selector button span{font-size:15px}.province-info.mobile-open .route-selector button small{font-size:14px}.province-info.mobile-open .siege-summary strong{font-size:20px}.province-info.mobile-open .siege-summary p{font-size:15px}.province-info.mobile-open .expedition-stats span{font-size:13px}.province-info.mobile-open .expedition-stats b{font-size:15px}.province-info.mobile-open .expedition-actions button{min-height:46px;font-size:15px}
  .compact-panel-close{width:42px;height:42px;font-size:30px}

  .modal,.license-modal{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow-y:auto}
  .modal-card,.license-card,.save-card,.settings-card,.strategy-card,.council-card,.retreat-card{width:100%;max-width:100%;max-height:calc(100dvh - 16px);padding:48px 18px 20px;overflow-y:auto}
  .modal-card h2,.save-card h2,.strategy-card>h2,.license-card h2{margin:7px 0 14px;font-size:clamp(28px,8vw,36px);line-height:1.25}.modal-card p,#modalText,.save-help,.license-card p{font-size:16px;line-height:1.65}.modal-actions{flex-wrap:wrap}.modal-actions button{flex:1 1 150px}.license-card h3,.strategy-card>h3{font-size:20px}.license-card details,.license-card summary{font-size:15px}.save-slot-info b{font-size:18px}.save-slot-info span{font-size:14px}.settings-card label{font-size:19px}.upgrade-list h3{font-size:19px}.upgrade-list p,.effect-list small{font-size:15px}.upgrade-list button{font-size:15px}.effect-list{grid-template-columns:1fr}.council-actions{grid-template-columns:1fr}.council-choice{min-height:86px}.council-choice strong{font-size:20px}.council-choice small{font-size:15px}.retreat-card dt,.retreat-card dd{font-size:15px}

  .unification-screen.active{min-height:calc(100dvh - 58px);padding:12px;overflow-y:auto}.unification-content{width:100%;padding:24px 18px}.unification-mon{width:clamp(100px,30vw,140px);height:clamp(100px,30vw,140px)}.unification-content h2{font-size:clamp(42px,14vw,64px)}.unification-lead{font-size:20px}.unification-record,.unification-praise,.unification-difficulty{font-size:16px;line-height:1.65}

  body:has(#battleScreen.active){overflow:hidden}
  #battleScreen.active{height:100dvh;padding:max(3px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))!important;grid-template-columns:minmax(0,1fr);grid-template-rows:88px 40px minmax(0,1fr)}
  #battleScreen .battle-top,#battleScreen .expedition-hud,#battleScreen .battle-layout,#battleScreen .board-wrap,#battleScreen .general{width:100%;max-width:100%;min-width:0}
  #battleScreen .battle-top{height:88px!important;overflow:visible}.battle-top>div:first-child{display:none}.battle-actions{display:grid;width:100%;height:86px;min-width:0;max-width:none;padding-inline:3px;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:42px 42px;grid-template-areas:"foresight undo save" "status retreat retreat";align-self:center;gap:3px;overflow:visible}.battle-actions::-webkit-scrollbar{display:none}.battle-actions button{width:100%;min-width:0;min-height:42px;padding:6px 4px!important;font-size:14px!important}.battle-actions #foresightBtn{grid-area:foresight}.battle-actions #undoBtn{grid-area:undo}.battle-actions #battleSaveBtn{grid-area:save}.battle-actions #retreatBtn{grid-area:retreat;min-width:0;font-size:15px!important}.battle-actions .tactic-button{min-width:0}.tactic-status{display:grid;grid-area:status;place-items:center;min-width:0;padding:2px 5px;font-size:13px;line-height:17px;text-align:center;overflow:hidden;text-overflow:ellipsis}
  #battleScreen .expedition-hud{height:40px;overflow:hidden}.expedition-hud span{min-width:0;overflow:hidden;font-size:11px!important;line-height:1.1}.expedition-hud small,.expedition-hud b{overflow:hidden;text-overflow:ellipsis}.expedition-hud small{font-size:11px}.expedition-hud b{font-size:13px}
  #battleScreen .battle-layout{--board-size:min(calc(100vw - max(4px,env(safe-area-inset-left)) - max(4px,env(safe-area-inset-right))),calc(100dvh - 272px));grid-template-columns:minmax(0,1fr);grid-template-rows:38px minmax(0,1fr) 44px;gap:3px}
  #battleScreen .board-wrap{grid-template-rows:30px var(--board-size) 26px}.battle-layout .board{border-width:4px}.piece{width:82%!important;height:89%!important;font-size:clamp(18px,6.2vw,28px)!important}.cell.legal:after{width:20px;height:20px}
  #battleScreen #turnBanner{height:28px;font-size:16px!important}#battleScreen #battleMessage{height:26px!important;font-size:16px!important;line-height:20px}
  #battleScreen .battle-layout>.general{padding:3px 7px!important}.battle-layout>.general h3{font-size:16px!important}.battle-layout>.general .hand:empty:after{font-size:14px}#battleScreen .hand-piece{min-width:44px;min-height:40px;font-size:19px!important}
  .battle-layout>.general.mobile-open{left:6px;right:6px;top:8px;max-height:calc(100dvh - 16px)!important;padding:50px 15px 16px!important;overflow-y:auto}.battle-layout>.general.mobile-open h3{font-size:25px!important}.battle-layout>.general.mobile-open>p,.battle-layout>.general.mobile-open>.speech{font-size:16px!important}.battle-panel-backdrop:not(.hidden){inset:0}
  .battle-quote:not(.hidden){left:6px;right:18px}.battle-quote-body small{font-size:13px}.battle-quote-body strong{font-size:19px}.battle-quote-body p{font-size:17px}
  #toast{bottom:max(14px,env(safe-area-inset-bottom));width:calc(100vw - 24px);padding:12px 16px;text-align:center;font-size:16px}
}

/* A rotated phone still uses the compact battle layout even when its CSS width is large. */
@media(max-height:560px) and (max-width:950px){
  #battleScreen.active{height:100dvh;padding:max(2px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left))!important;grid-template-rows:38px 32px minmax(0,1fr)}
  #battleScreen .battle-top{height:38px!important}.battle-top>div:first-child{min-width:0}.battle-top .eyebrow{margin:0;font-size:0}.battle-top .eyebrow span{font-size:14px}.battle-top h2{display:none}.battle-actions{height:36px;max-width:calc(100vw - 64px);overflow-x:auto;overflow-y:hidden}.battle-actions .compact-only{display:inline-flex!important}.battle-actions #enemyInfoBtn,.battle-actions #playerInfoBtn{display:none!important}.battle-actions button{min-height:34px;padding:4px 7px!important;font-size:13px!important}
  #battleScreen .expedition-hud{width:100%;height:32px;margin:0}.expedition-hud span{padding:2px 4px!important;font-size:10px}.expedition-hud b{font-size:12px}
  #battleScreen .battle-layout{--board-size:min(calc(100vw - max(5px,env(safe-area-inset-left)) - max(5px,env(safe-area-inset-right))),calc(100dvh - 184px));grid-template-columns:minmax(0,1fr);grid-template-rows:30px minmax(0,1fr) 34px;grid-template-areas:"enemy" "board" "player";gap:2px}
  #battleScreen .battle-layout>.general{position:relative;display:grid;width:100%;height:100%!important;min-height:0!important;padding:2px 7px!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;overflow:hidden}.battle-layout>.general.enemy{grid-area:enemy}.battle-layout>.general.player{grid-area:player}.battle-layout>.general>.mon,.battle-layout>.general>p,.battle-layout>.general>.speech{display:none}.battle-layout>.general h3{margin:0!important;font-size:14px!important}.battle-layout>.general .hand{display:flex;margin:0!important;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto}
  #battleScreen .board-wrap{grid-area:board;display:grid;width:100%;height:100%;grid-template-rows:24px var(--board-size) 20px;place-items:center;align-content:center;overflow:hidden}#battleScreen .battle-layout .board{width:var(--board-size)!important;height:var(--board-size)!important;aspect-ratio:auto;border-width:3px}#battleScreen #turnBanner{height:23px;padding:2px!important;font-size:13px!important;line-height:18px}#battleScreen #battleMessage{height:20px!important;margin:0!important;padding:1px 3px;font-size:13px!important;line-height:18px}.piece{font-size:clamp(16px,4.5vh,23px)!important}#battleScreen .hand-piece{min-width:38px;min-height:32px;padding:4px 7px!important;font-size:16px!important}
}

/* New campaign: choose any lord before the first march. */
.commander-select-modal{z-index:31;padding:18px;overflow-y:auto}
.commander-select-card{position:relative;width:min(1080px,96vw);max-height:calc(100dvh - 36px);padding:28px 34px 24px;overflow-y:auto;text-align:left}
.commander-select-card h2{margin:6px 0 4px;font-size:clamp(30px,3.5vw,44px)}
.commander-select-lead{margin:0 0 18px!important;font-size:17px}
.commander-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.commander-choice{display:grid;min-height:116px;padding:8px;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:center;text-align:left;letter-spacing:.02em;background:linear-gradient(135deg,#2d2b25,#1c1b18);border:2px solid #554f42}
.commander-choice:hover,.commander-choice:focus-visible{border-color:#d0a34d;outline:none}
.commander-choice.selected{border-color:#edca76;background:linear-gradient(135deg,#55331f,#282018);box-shadow:0 0 0 2px #8f201e,0 7px 24px #0008}
.commander-choice-portrait{display:block;width:96px;height:96px;background-position:center 24%;background-size:cover;border:1px solid #756443}
.commander-choice-copy{display:flex;min-width:0;flex-direction:column;gap:5px}
.commander-choice-copy strong{color:#f0dfb8;font-size:23px;letter-spacing:.08em}
.commander-choice-copy small{color:#c5ad78;font-size:15px}
.commander-choice-copy em{color:#bdb3a0;font-size:14px;line-height:1.45;font-style:normal}
.commander-selection{display:flex;min-height:54px;margin-top:16px;padding:10px 16px;align-items:center;gap:18px;border:1px solid #665a41;background:#191814;color:#bdb29e;font-size:17px}
.commander-selection strong{color:#f0d38c;font-size:23px}.commander-selection span{font-size:16px}
.commander-select-card .modal-actions{margin-top:14px}
.commander-select-card .primary:disabled{cursor:not-allowed;opacity:.4}
@media(max-width:700px){
  .commander-select-modal{padding:6px}
  .commander-select-card{width:100%;max-height:calc(100dvh - 12px);padding:48px 12px 16px}
  .commander-select-card h2{font-size:30px}.commander-select-lead{font-size:16px}
  .commander-choices{grid-template-columns:1fr;gap:8px}
  .commander-choice{min-height:104px;grid-template-columns:84px minmax(0,1fr);gap:11px}
  .commander-choice-portrait{width:84px;height:84px}
  .commander-choice-copy strong{font-size:21px}.commander-choice-copy small{font-size:14px}.commander-choice-copy em{font-size:13px}
  .commander-selection{min-height:58px;flex-wrap:wrap;gap:2px 12px;font-size:16px}.commander-selection strong{font-size:21px}
  .commander-select-card .modal-actions{position:sticky;bottom:-16px;margin-inline:-12px;padding:10px 12px max(10px,env(safe-area-inset-bottom));background:#24231ef5}
}

/* タイトル更新告知：新章の開幕を陣幕・金光・五将の連続参陣で見せる。 */
.title-update-button{position:relative;align-self:flex-start;margin-top:10px;padding:10px 18px;border-color:#b58a3e;background:linear-gradient(100deg,#2c2114,#171512);color:#f2d58c;font-size:15px;font-weight:700;box-shadow:0 0 18px #c88b2730;overflow:hidden}
.title-update-button span{display:inline-block;margin-right:8px;padding:3px 7px;background:#a82e25;color:#fff3d0;font:800 11px Arial,sans-serif;letter-spacing:.12em;animation:update-badge-pulse 1.8s ease-in-out infinite}
.title-update-button:after{content:"";position:absolute;inset:-40% auto -40% -35%;width:24%;background:#fff8;transform:rotate(18deg);animation:update-button-shine 3s ease-in-out infinite}
.update-info-modal{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:18px;background:radial-gradient(circle at 50% 40%,#4b2b1690,#070706f2 64%);overflow:hidden;isolation:isolate}body:has(.update-info-modal:not(.hidden)){overflow:hidden}
.update-info-rays{position:fixed;inset:-55vmax;z-index:-1;background:repeating-conic-gradient(from 0deg,#dba73d20 0deg 5deg,transparent 5deg 13deg);animation:update-rays 26s linear infinite}
.update-info-card{position:relative;width:min(1080px,96vw);max-height:96dvh;padding:30px 38px 24px;overflow:auto;border:2px solid #d0a148;background:linear-gradient(145deg,#251a11f7,#11110ff8 48%,#2b1911f5);box-shadow:0 0 0 5px #2b2115,0 0 65px #db9c3e66,0 32px 90px #000;text-align:center}
.update-info-card:before,.update-info-card:after{content:"";position:absolute;top:0;width:2px;height:100%;background:linear-gradient(transparent,#e5b75d,transparent);opacity:.7}.update-info-card:before{left:14px}.update-info-card:after{right:14px}
.update-info-close{position:absolute;right:14px;top:10px;z-index:2;border:0;background:transparent;color:#d9c59d;font-size:31px;line-height:1;padding:8px 12px}
.update-info-kicker{color:#d8b769;font:700 13px Arial,sans-serif;letter-spacing:.3em}.update-info-kicker span{display:inline-block;margin-right:10px;padding:5px 10px;background:#9d271f;color:#fff0cc;letter-spacing:.18em;box-shadow:0 0 20px #da5b3b55}
.update-info-card h2{margin:13px 0 5px;color:#f5df9a;font-size:clamp(42px,5vw,68px);line-height:1.08;letter-spacing:.08em;text-shadow:0 3px 0 #5b2b18,0 0 26px #e8a74455}.update-info-card h2 small{display:block;margin-bottom:7px;color:#c7bca5;font-size:17px;letter-spacing:.18em;text-shadow:none}
.update-info-lead{margin:7px 0 17px;color:#ded2bb;font-size:18px;line-height:1.7}
.update-commanders{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:0 auto 15px;perspective:800px}
.update-commanders>div{position:relative;min-height:180px;border:1px solid #866b3e;background-image:linear-gradient(transparent 48%,#0c0b09f5 89%),var(--portrait);background-position:center 20%;background-size:cover;box-shadow:inset 0 -30px 45px #000;overflow:hidden}
.update-commanders b,.update-commanders span{position:absolute;z-index:1}.update-commanders b{left:7px;top:7px;padding:4px 7px;background:#9d2b22;color:#ffe8ae;font:800 12px Arial,sans-serif}.update-commanders span{left:0;right:0;bottom:9px;color:#f3dfac;font-size:18px;font-weight:800;text-shadow:0 2px 3px #000}
.update-features{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.update-features article{padding:10px 11px;border-top:3px solid #9c2c24;background:#ffffff08;text-align:left}.update-features strong,.update-features span{display:block}.update-features strong{color:#f0c96f;font-size:18px}.update-features span{margin-top:4px;color:#bfb6a4;font-size:13px;line-height:1.45}
.update-info-actions{display:flex;justify-content:center;gap:12px;margin-top:18px}.update-info-actions button{min-width:230px;min-height:52px}.update-info-actions #updateAutoDisplayBtn[aria-pressed="true"]{border-color:#ab8d52;color:#e8cb83;background:#302616}.update-info-note{margin:8px 0 0;color:#8f8777;font-size:12px}
.update-info-modal.opening .update-info-card{animation:update-card-entry .72s cubic-bezier(.16,.8,.22,1) both}.update-info-modal.opening .update-commanders>div{animation:update-general-entry .62s cubic-bezier(.16,.8,.22,1) both}.update-info-modal.opening .update-commanders>div:nth-child(2){animation-delay:.08s}.update-info-modal.opening .update-commanders>div:nth-child(3){animation-delay:.16s}.update-info-modal.opening .update-commanders>div:nth-child(4){animation-delay:.24s}.update-info-modal.opening .update-commanders>div:nth-child(5){animation-delay:.32s}
@keyframes update-card-entry{0%{opacity:0;transform:scale(.82);filter:brightness(2)}55%{opacity:1;transform:scale(1.025);filter:brightness(1.25)}100%{transform:none;filter:none}}@keyframes update-general-entry{0%{opacity:0;transform:translateY(45px) rotateX(-18deg)}100%{opacity:1;transform:none}}@keyframes update-rays{to{transform:rotate(1turn)}}@keyframes update-badge-pulse{50%{box-shadow:0 0 18px #e7a546;transform:scale(1.06)}}@keyframes update-button-shine{0%,55%{left:-35%}80%,100%{left:125%}}
@media(max-width:700px){.title-update-button{width:100%;max-width:360px;min-height:52px;margin-top:2px}.update-info-modal{padding:6px}.update-info-card{width:100%;max-height:calc(100dvh - 12px);padding:50px 12px 18px}.update-info-card h2{font-size:clamp(34px,10vw,46px)}.update-info-card h2 small{font-size:14px}.update-info-lead{font-size:16px;line-height:1.5}.update-commanders{gap:3px}.update-commanders>div{min-height:132px;background-position:center 20%}.update-commanders b{left:3px;top:3px;padding:3px;font-size:10px}.update-commanders span{bottom:5px;font-size:13px;writing-mode:vertical-rl;left:auto;right:5px}.update-features{grid-template-columns:repeat(2,1fr)}.update-features strong{font-size:17px}.update-features span{font-size:13px}.update-info-actions{display:grid;grid-template-columns:1fr;margin-top:12px}.update-info-actions button{min-width:0;width:100%;min-height:52px}.update-info-note{font-size:11px}}
@media(max-height:700px) and (min-width:701px){.update-info-card{padding-block:18px}.update-info-card h2{font-size:42px}.update-info-card h2 small{font-size:14px}.update-info-lead{margin:5px 0 10px}.update-commanders>div{min-height:128px}.update-features article{padding-block:7px}.update-info-actions{margin-top:10px}}
@media(prefers-reduced-motion:reduce){.update-info-rays,.title-update-button span,.title-update-button:after,.update-info-modal.opening .update-info-card,.update-info-modal.opening .update-commanders>div{animation:none!important}}

/* 報酬更新：勝利の獲得量、強化の差分、発動中の特典を大きく明示する。 */
.update-reward-news{margin:0 0 14px;padding:12px;border:1px solid #d0a148;background:linear-gradient(110deg,#5a241dcc,#251c12);text-align:left;box-shadow:inset 0 0 28px #f0ad4030}.update-reward-news>div:first-child{display:flex;align-items:center;gap:14px;margin-bottom:9px}.update-reward-news small{color:#e8b95c;font:800 12px Arial,sans-serif;letter-spacing:.2em}.update-reward-news h3{margin:0;color:#ffe2a0;font-size:25px}.update-reward-features{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.update-reward-features article{display:grid;min-height:76px;padding:9px 10px;grid-template-columns:52px 1fr;grid-template-rows:auto auto;align-items:center;border:1px solid #8d7042;background:#120f0bd9}.update-reward-features b{grid-row:1/3;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#a72f23;color:#fff0bd;font-size:21px}.update-reward-features strong{color:#f4d183;font-size:17px}.update-reward-features span{color:#c9bea8;font-size:13px;line-height:1.4}
.victory-reward-summary{display:grid;grid-template-columns:repeat(3,1fr) minmax(170px,1.25fr);gap:7px;margin:8px 0 10px;padding:9px;border:1px solid #c4963f;background:linear-gradient(100deg,#3c2615,#17140f);box-shadow:0 0 22px #e9a6382b}.victory-reward-summary span{display:grid;padding:7px;border-right:1px solid #67502d}.victory-reward-summary small{color:#c8b99e;font-size:13px}.victory-reward-summary b{color:#ffe08b;font-size:30px;line-height:1.1;animation:victory-merit-gain .9s ease both}.victory-reward-summary em{color:#d69e57;font-size:11px;font-style:normal}.victory-reward-summary>strong{display:grid;place-items:center;color:#ffe1a0;font-size:16px;text-align:center}
.active-upgrade-chips{display:flex!important;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap}.active-upgrade-chips span{padding:4px 8px!important;border:1px solid #a7813d!important;border-radius:12px;background:#3b2d17;color:#f3d68d!important;font-size:12px!important}.expedition-hud>.active-upgrade-chips{flex:1.2;min-width:150px;padding:2px 5px}.expedition-hud>.active-upgrade-chips span{border-right:1px solid #a7813d!important}
#upgradeActivation{position:fixed;left:50%;top:104px;z-index:80;max-width:min(720px,92vw);padding:14px 24px;border:2px solid #e1b352;background:linear-gradient(#62421b,#2a1c0e);color:#fff0b8;font-size:20px;font-weight:800;letter-spacing:.06em;text-align:center;box-shadow:0 0 35px #eeb84f88,0 12px 35px #000;opacity:0;pointer-events:none;transform:translate(-50%,-20px) scale(.95)}#upgradeActivation.show{animation:upgrade-activation 2.4s ease both}@keyframes upgrade-activation{0%{opacity:0;transform:translate(-50%,-25px) scale(.9)}12%,78%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-8px)}}
.merit-balance{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:12px;padding:12px 16px;border:1px solid #9a773b;background:#211a10}.merit-balance span{font-size:17px}.merit-balance b{font-size:36px}.merit-balance strong{justify-self:end;color:#f3cb73;font-size:17px}.upgrade-list article{transition:.25s}.upgrade-list article.learned{border-left:4px solid #80652f}.upgrade-list article.affordable{border-color:#d0a348;background:linear-gradient(120deg,#392b17,#191814);box-shadow:0 0 18px #d9a74035}.upgrade-list article.affordable button{background:#8f201e;border-color:#d26d57;color:#fff2d0}.upgrade-list article.just-purchased{animation:upgrade-purchased 1.1s ease}.upgrade-list dl{display:grid;grid-template-columns:52px 1fr;gap:3px 8px;margin:8px 0 0;font-size:13px}.upgrade-list dt{color:#aa9b80}.upgrade-list dd{margin:0;color:#e3cf9e;line-height:1.35}@keyframes upgrade-purchased{0%{box-shadow:0 0 0 #ffd66b;transform:scale(.98)}45%{box-shadow:0 0 30px #ffd66b88;transform:scale(1.015)}100%{transform:none}}
.stats #meritCount.merit-gain{position:relative;animation:merit-counter-gain 1.2s ease}.stats #meritCount.merit-gain:after{content:attr(data-gain);position:absolute;left:50%;top:-24px;color:#ffe477;font-size:19px;text-shadow:0 2px 4px #000;transform:translateX(-50%)}@keyframes merit-counter-gain{35%{color:#ffe477;transform:scale(1.28)}}@keyframes victory-merit-gain{0%{opacity:.2;transform:translateY(8px) scale(.85)}55%{color:#fff3ad;transform:translateY(0) scale(1.16)}100%{opacity:1;transform:none}}
@media(max-width:900px){.expedition-hud>.active-upgrade-chips{display:none!important}}
@media(max-width:700px){.update-reward-news{padding:10px}.update-reward-news>div:first-child{display:block}.update-reward-news h3{margin-top:3px;font-size:24px}.update-reward-features{grid-template-columns:1fr}.update-reward-features article{min-height:64px}.victory-reward-summary{grid-template-columns:repeat(3,1fr)}.victory-reward-summary>strong{grid-column:1/-1;min-height:38px}.victory-reward-summary b{font-size:26px}.merit-balance{grid-template-columns:auto auto}.merit-balance strong{grid-column:1/-1;justify-self:start}.upgrade-list dl{font-size:14px}#upgradeActivation{top:12px;padding:12px 15px;font-size:17px}}
@media(max-height:700px) and (min-width:701px){.update-reward-news{padding:8px}.update-reward-features article{min-height:62px}.update-reward-news h3{font-size:21px}.update-reward-features strong{font-size:15px}.update-reward-features span{font-size:12px}.victory-reward-summary{margin-block:4px;padding:5px}.victory-reward-summary b{font-size:24px}}
@media(prefers-reduced-motion:reduce){#upgradeActivation.show,.upgrade-list article.just-purchased,.stats #meritCount.merit-gain,.victory-reward-summary b{animation:none}}

/* 敵国へ入った後は、全国図から国境・合戦地・本丸を結ぶ戦域図へ切り替える。 */
.province-zoom-map{position:absolute;inset:10px 10px 10px clamp(10px,1.5vw,24px);z-index:9;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;border:2px solid #a88447;background:linear-gradient(145deg,#24241e,#11120f);box-shadow:0 18px 55px #000e}
.province-zoom-heading{display:flex;min-height:68px;padding:9px 13px;align-items:center;gap:18px;border-bottom:1px solid #79613b;background:linear-gradient(90deg,#391e19,#211e17 58%,#171713)}
.province-zoom-heading>div{display:flex;min-width:145px;flex-direction:column}.province-zoom-heading small{color:#c69d51;font:10px Arial,sans-serif;letter-spacing:.2em}.province-zoom-heading strong{color:#f0d58f;font-size:25px;letter-spacing:.12em}
.province-zoom-heading p{width:auto;min-width:0;flex:1;margin:0;color:#c9bea7;font-size:15px;line-height:1.45}.province-zoom-heading p>b{color:#fff0b3;font-size:21px}.province-zoom-heading p>strong{color:#efca76;font-size:18px}
.province-zoom-close{flex:0 0 auto;min-width:86px;padding:8px 12px;border-color:#826a41;background:#171612;color:#d7c292;font-size:14px}
.province-zoom-field{position:relative;min-height:0;overflow:hidden;background:radial-gradient(ellipse at 50% 50%,#51513b 0,#292c24 52%,#171a16 78%),repeating-linear-gradient(18deg,transparent 0 28px,#d8c88a08 29px 30px)}
.province-zoom-field:before,.province-zoom-field:after{content:"";position:absolute;pointer-events:none}.province-zoom-field:before{inset:0;background:radial-gradient(circle at 18% 74%,#8ca6ad30 0 8%,transparent 9%),radial-gradient(circle at 78% 20%,#1b211c99 0 13%,transparent 14%)}.province-zoom-field:after{inset:7px;border:1px solid #d7bd7750;box-shadow:inset 0 0 45px #000a}
.province-zoom-land{position:absolute;inset:6% 5%;background:linear-gradient(135deg,#827a54,#514f38 48%,#373a2c);border:3px solid #b7a36b;filter:drop-shadow(0 10px 14px #0009);clip-path:polygon(3% 72%,11% 48%,25% 55%,32% 25%,46% 34%,58% 12%,72% 27%,90% 17%,97% 43%,84% 57%,92% 78%,70% 88%,52% 77%,35% 94%,19% 80%)}
.region-0 .province-zoom-land{clip-path:polygon(2% 65%,14% 41%,25% 52%,38% 24%,50% 38%,66% 13%,82% 25%,96% 44%,84% 63%,90% 83%,65% 88%,48% 74%,30% 94%,16% 79%)}
.region-1 .province-zoom-land,.region-8 .province-zoom-land{clip-path:polygon(2% 71%,13% 45%,27% 53%,35% 22%,52% 32%,65% 9%,81% 23%,97% 39%,87% 60%,94% 76%,74% 91%,54% 78%,35% 94%,17% 82%)}
.region-2 .province-zoom-land,.region-6 .province-zoom-land{clip-path:polygon(2% 77%,12% 51%,25% 62%,34% 32%,49% 39%,61% 15%,76% 28%,94% 17%,98% 46%,85% 61%,91% 84%,70% 91%,51% 76%,34% 95%,16% 84%)}
.region-4 .province-zoom-land,.region-7 .province-zoom-land{clip-path:polygon(3% 63%,16% 44%,27% 57%,38% 28%,52% 36%,65% 12%,82% 28%,97% 46%,84% 58%,91% 81%,72% 91%,54% 75%,36% 93%,17% 78%)}
.terrain-mark{position:absolute;z-index:1;color:#20251d88;pointer-events:none}.terrain-mark.mountain{font-size:clamp(28px,4vw,58px);letter-spacing:-.35em}.terrain-mark.m1{left:31%;top:15%;transform:rotate(-8deg)}.terrain-mark.m2{right:20%;bottom:17%;transform:rotate(12deg)}.terrain-mark.river{left:43%;top:47%;color:#7ca0a488;font:bold clamp(18px,3vw,42px) Arial,sans-serif;transform:rotate(-24deg)}
.invasion-lines{position:absolute;inset:0;z-index:2;width:100%;height:100%;overflow:visible}.invasion-lines polyline{fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.route-all{stroke:#bbb39788;stroke-width:4;stroke-dasharray:3 7}.route-secured{stroke:#d7b95f;stroke-width:6}.route-unsecured{stroke:#d36831;stroke-width:6;stroke-dasharray:7 5;animation:invasion-march 1.2s linear infinite}
.invasion-entry,.invasion-point{position:absolute;z-index:4;transform:translate(-50%,-50%);text-align:center}.invasion-entry span,.invasion-point span{display:grid;place-items:center;width:42px;height:42px;margin:auto;border:3px solid #6e6858;border-radius:50%;background:#292a24;color:#aaa38f;font:bold 14px/1 Arial,sans-serif;box-shadow:0 5px 9px #0008}.invasion-entry span{border-radius:3px;border-color:#b6a16a;color:#e7d59f}.invasion-entry b,.invasion-point b,.invasion-point small{display:block;max-width:145px;padding:2px 5px;overflow:hidden;background:#111d;text-overflow:ellipsis;white-space:nowrap}.invasion-entry b,.invasion-point b{margin-top:3px;color:#ddd0b2;font-size:13px}.invasion-point small{color:#aaa18e;font-size:10px}
.invasion-point.secured span{border-color:#ffe195;background:#6b2520;color:#ffe8aa}.invasion-point.unsecured span{border-color:#ffb45f;background:#8a3e1d;color:#fff0b5;box-shadow:0 0 18px #ef712d}.invasion-point.current span{border-color:#fff0a8;background:#c28b31;color:#1a140b;box-shadow:0 0 0 6px #d59b373d,0 0 22px #ffd064;animation:invasion-current 1.35s ease-in-out infinite}.invasion-point.current b{color:#ffe7a1;font-size:15px}.invasion-point.keep span{width:52px;height:52px;border-radius:3px;border-color:#dfbd6d;background:#251b18;color:#ebd187}.invasion-point.fogged{filter:grayscale(.75);opacity:.68}
.province-zoom-legend{position:absolute;left:13px;bottom:11px;z-index:5;display:flex;gap:10px;padding:7px 10px;border:1px solid #776545;background:#111d;color:#c4b9a2;font-size:12px}.province-zoom-legend span{display:flex;align-items:center;gap:5px}.province-zoom-legend i{width:11px;height:11px;border:2px solid #777164;border-radius:50%;background:#292a24}.province-zoom-legend i.secured{border-color:#ffe195;background:#6b2520}.province-zoom-legend i.unsecured{border-color:#ffb45f;background:#8a3e1d}.province-zoom-legend i.current{border-color:#fff0a8;background:#c28b31}
@keyframes invasion-march{to{stroke-dashoffset:-24}}@keyframes invasion-current{50%{filter:brightness(1.2);transform:translate(-50%,-54%) scale(1.06)}}

/* 対局中も、現在の戦場が国境と本丸の間のどこかを常時示す。 */
#battleScreen .expedition-hud .battle-location-hud{min-width:190px;flex:1.35;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;text-align:left;background:#2b2118}
.battle-location-hud small{color:#d9ad63!important}.battle-location-hud b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.battle-location-hud em{display:flex!important;grid-column:1/3;width:100%;align-items:center;gap:3px;font-style:normal}.battle-location-hud em i{position:relative;width:10px;height:10px;flex:1;border:1px solid #777164;border-radius:50%;background:#292a24}.battle-location-hud em i+ i:before{content:"";position:absolute;right:100%;top:3px;width:5px;height:2px;background:#696252}.battle-location-hud em i.entry{border-radius:2px;border-color:#bfa56b}.battle-location-hud em i.keep{border-radius:2px;border-color:#d5b668}.battle-location-hud em i.secured{border-color:#ffe195;background:#7b2921}.battle-location-hud em i.unsecured{border-color:#ffb45f;background:#963f1c}.battle-location-hud em i.current{border-color:#fff1ae;background:#d59a30;box-shadow:0 0 7px #ffd363}
@media(max-width:900px){
  .province-zoom-map{inset:5px}.province-zoom-heading{min-height:60px;padding:7px 9px}.province-zoom-heading>div{min-width:125px}.province-zoom-heading strong{font-size:21px}.province-zoom-heading p{font-size:13px}.province-zoom-heading p>strong{font-size:15px}.province-zoom-close{min-width:75px}
  .invasion-entry b,.invasion-point b{font-size:11px}.invasion-point small{display:none}.province-zoom-legend{font-size:11px}
}
@media(max-width:600px){
  .province-zoom-map{inset:3px}.province-zoom-heading{min-height:58px;gap:7px}.province-zoom-heading>div{min-width:110px}.province-zoom-heading small{font-size:8px}.province-zoom-heading strong{font-size:18px}.province-zoom-heading p{font-size:12px;line-height:1.25}.province-zoom-heading p>b{font-size:17px}.province-zoom-heading p>strong{display:block;font-size:13px}.province-zoom-close{min-width:62px;min-height:40px;padding:6px;font-size:12px}
  .province-zoom-land{inset:7% 1%}.invasion-entry span,.invasion-point span{width:34px;height:34px;border-width:2px;font-size:11px}.invasion-point.keep span{width:40px;height:40px}.invasion-entry b,.invasion-point b{max-width:76px;padding:1px 3px;font-size:10px}.province-zoom-legend{left:6px;bottom:5px;gap:5px;padding:4px 5px;font-size:9px}.province-zoom-legend i{width:8px;height:8px}
  #battleScreen .expedition-hud .battle-location-hud{min-width:0;flex:1.7}.battle-location-hud em i{height:8px}
  #battleScreen .expedition-hud>span:nth-child(3),#battleScreen .expedition-hud>span:nth-child(4){display:none}
}
@media(prefers-reduced-motion:reduce){.route-unsecured,.invasion-point.current{animation:none}}
.council-card{width:min(920px,95vw);max-height:96dvh;padding:24px 30px;overflow-y:auto}
.council-card>h2{margin:5px 0}.council-card>#councilText{margin:5px 0 10px}
.council-advance-map{height:280px;margin:8px 0 12px}
.council-zoom-map{position:relative;inset:auto;width:100%;height:100%;grid-template-rows:54px minmax(0,1fr);box-shadow:0 9px 25px #000b}
.council-zoom-map .province-zoom-heading{min-height:54px;padding-block:5px}.council-zoom-map .province-zoom-heading strong{font-size:21px}.council-zoom-map .invasion-entry span,.council-zoom-map .invasion-point span{width:34px;height:34px;border-width:2px;font-size:11px}.council-zoom-map .invasion-point.keep span{width:41px;height:41px}.council-zoom-map .invasion-entry b,.council-zoom-map .invasion-point b{font-size:10px}.council-zoom-map .invasion-point small{display:none}
.council-card .council-actions{margin-top:12px}.council-card .council-choice{min-height:92px;padding:10px}
@media(max-height:720px){.council-card{padding:14px 22px}.council-advance-map{height:190px;margin:5px 0}.council-zoom-map{grid-template-rows:46px minmax(0,1fr)}.council-zoom-map .province-zoom-heading{min-height:46px}.council-card .council-choice{min-height:70px}.council-advice{display:none}}
@media(max-width:600px){.council-card{padding:45px 12px 14px}.council-advance-map{height:230px}.council-zoom-map .province-zoom-heading p{display:block}.council-card .council-actions{grid-template-columns:1fr}.council-card .council-choice{min-height:82px}}

/* 主要解像度の最終レイアウト調整。文字を縮めず、使える面積を画面へ還元する。 */
@media(min-width:1400px) and (min-height:800px){
  #titleScreen .hero{display:flex;flex-direction:column;justify-content:center;padding:8vh 12% 14vh}
  #titleScreen .title-kicker{font-size:14px}
  #titleScreen .hero h2{margin:22px 0;font-size:clamp(62px,4vw,76px);line-height:1.25}
  #titleScreen .hero>p{width:min(760px,48vw);margin-bottom:32px;font-size:19px;line-height:1.9}
  #titleScreen .hero>.primary,#titleScreen .hero>.secondary{align-self:flex-start;min-width:160px;font-size:20px}
  #titleScreen .hero>.secondary{margin:10px 0 0}
  #titleScreen .title-credits{font-size:13px}.title-credits p{font-size:13px}.title-credits small{font-size:11px}

  #mapScreen.active{height:calc(100dvh - 86px);padding:22px 34px 28px;overflow:hidden}
  #mapScreen .campaign{display:grid;height:100%;min-height:0;grid-template-rows:118px minmax(0,1fr) auto}
  #mapScreen .section-head{height:118px;align-items:center}
  #mapScreen .section-head h2{font-size:38px}.section-head #campaignHint{font-size:17px}
  #mapScreen .map-stage{height:100%;min-height:0;margin-top:0}
  #mapScreen .map-stage>.map{height:100%;min-height:0;margin-top:0}
  #mapScreen .map-stage>.warrior-card{top:18px;height:calc(100% - 36px);width:300px}
  #mapScreen .map-stage>.warrior-card .portrait{height:clamp(145px,19vh,190px)!important}
  #mapScreen .province-info:has(.route-selector){min-height:122px}
  #mapScreen .province-info:has(.expedition-stats){min-height:150px}
  #mapScreen .siege-summary{flex-basis:220px}#mapScreen .siege-summary>strong{font-size:18px}#mapScreen .siege-summary p{font-size:14px}
  #mapScreen .expedition-stats span{font-size:13px}#mapScreen .expedition-stats b{font-size:14px}#mapScreen .expedition-stats small{font-size:12px}
  #mapScreen .siege-node b{font-size:13px}#mapScreen .siege-node small{font-size:11px}
  .map-stage:has(.province-zoom-map)>.warrior-card{display:none}
  .province-zoom-map{inset:10px}

  #battleScreen .battle-top{max-width:1660px}
  #battleScreen .expedition-hud{width:min(1080px,100%)}
  #battleScreen .battle-layout{grid-template-columns:minmax(240px,1fr) minmax(0,900px) minmax(240px,1fr);gap:18px}
  #battleScreen .general{width:min(100%,310px);padding:13px}
  #battleScreen .general h3{font-size:26px}
  #battleScreen .general>p{font-size:15px}
  #battleScreen .general .speech{font-size:18px}
}

@media(max-width:900px){
  .mobile-invasion-map{display:block!important;grid-area:zoom;width:100%;height:clamp(230px,38dvh,330px)}
  .mobile-invasion-map>.council-zoom-map{height:100%}
  .province-info.mobile-open:has(.mobile-invasion-map){display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"zoom zoom" "summary actions" "stats stats";max-height:calc(100dvh - 72px);overflow-y:auto!important;overscroll-behavior:contain}
  .province-info.mobile-open:has(.mobile-invasion-map)>.siege-route{display:none}
  .province-info.mobile-open:has(.mobile-invasion-map)>.expedition-actions{position:sticky;right:0;bottom:0;z-index:4;align-self:end;padding:6px;background:#242119f2}
  .province-info.mobile-open:has(.mobile-invasion-map)>.compact-panel-close{position:fixed}
  .map-stage:has(.province-zoom-map)>.warrior-card{display:none!important}
}

@media(max-width:600px){
  .hero>.primary,.hero>.secondary{min-height:56px;font-size:18px}
  .commander-select-card .modal-actions{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
  .commander-select-card .modal-actions button{min-width:0;min-height:58px;padding-inline:8px;font-size:16px}
  .province-info.mobile-open:has(.mobile-invasion-map){grid-template-columns:1fr;grid-template-areas:"zoom" "summary" "stats" "actions";padding-top:46px!important}
  .mobile-invasion-map{height:clamp(280px,38dvh,320px)}
  .mobile-invasion-map .province-zoom-heading{display:grid;min-height:82px;grid-template-columns:1fr;align-content:center;gap:2px}
  .mobile-invasion-map .province-zoom-heading>div{min-width:0}
  .mobile-invasion-map .province-zoom-heading p{display:block;font-size:12px;line-height:1.25}
  .mobile-invasion-map .province-zoom-heading p>strong{display:inline;font-size:15px}
  .mobile-invasion-map .invasion-point:not(.current):not(.keep) b{display:none}
  .mobile-invasion-map .invasion-entry b{max-width:70px}
  .province-info.mobile-open:has(.mobile-invasion-map)>.expedition-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;padding:7px 0 0}
  .province-info.mobile-open:has(.mobile-invasion-map)>.expedition-actions button{min-height:52px;font-size:15px}
  .province-info.mobile-open:has(.mobile-invasion-map)>.expedition-actions button:only-child{grid-column:1/-1}
  #battleScreen .expedition-hud>span:nth-child(5),#battleScreen .expedition-hud>span:nth-child(6){display:none}
  #battleScreen .expedition-hud .battle-location-hud{flex:1.3}
  #battleScreen .expedition-hud .supply-hud{flex:1}
  #battleScreen .battle-quote:not(.hidden){top:auto;bottom:8px;transform:none}
}

@media(max-width:380px){
  header{gap:4px}header>div{gap:6px}header h1{font-size:16px}header nav{gap:3px}header nav button{padding-inline:6px;font-size:12px}
  #mapScreen .section-head h2{font-size:19px}.map-actions{gap:2px}.map-actions button{padding-inline:6px!important;font-size:12px!important}
}

@media(max-height:560px) and (orientation:landscape) and (max-width:950px){
  #battleScreen.active{grid-template-rows:34px 28px minmax(0,1fr)}
  #battleScreen .battle-top{height:34px!important}
  #battleScreen .battle-top>div:first-child{display:block;min-width:0}
  #battleScreen .battle-top .eyebrow{display:none}
  #battleScreen .battle-top h2{display:block;margin:0;font-size:15px;white-space:nowrap}
  #battleScreen .battle-actions{height:32px;max-width:62vw}
  #battleScreen .battle-actions button{min-height:32px!important;font-size:12px!important}
  #battleScreen .expedition-hud{height:28px}
  #battleScreen .battle-layout{--board-size:min(calc(100vw - 300px),calc(100dvh - 100px));grid-template-columns:minmax(130px,1fr) var(--board-size) minmax(130px,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"enemy board player";gap:6px}
  #battleScreen .board-wrap{grid-area:board;grid-template-rows:20px var(--board-size) 17px}
  #battleScreen .battle-layout>.general{display:grid;width:min(100%,190px);height:min(100%,var(--board-size))!important;padding:6px!important;align-self:center;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);background:#171713c9;backdrop-filter:blur(1px)}
  #battleScreen .battle-layout>.general.enemy{grid-area:enemy;justify-self:end}.battle-layout>.general.player{grid-area:player;justify-self:start}
  #battleScreen .battle-layout>.general h3{font-size:16px!important}
  #battleScreen .battle-layout>.general .hand{align-content:start;justify-content:center;flex-wrap:wrap;overflow-y:auto}
  #battleScreen .hand-piece{min-height:30px!important}
  #battleScreen #turnBanner{height:19px!important;font-size:12px!important;line-height:15px}
  #battleScreen #battleMessage{height:17px!important;font-size:12px!important;line-height:15px}
}

/* 敵将の戦法を常時明示し、AIが選んだ着手意図をその場で伝える。 */
#battleScreen .general.enemy{grid-template-rows:minmax(110px,1.35fr) auto auto auto minmax(62px,.48fr) auto}
.enemy-doctrine{margin:5px 0;padding:7px 8px;border:1px solid #8e6a35;border-left:4px solid #c49038;background:linear-gradient(105deg,#332718,#191713);text-align:left}
.enemy-doctrine strong,.enemy-doctrine small,.enemy-doctrine em{display:block}.enemy-doctrine strong{color:#f0ce79;font-size:17px;letter-spacing:.08em}.enemy-doctrine small{margin-top:3px;color:#d6cab2;font-size:13px;line-height:1.4}.enemy-doctrine em{margin-top:5px;color:#e5a95c;font-size:12px;line-height:1.35;font-style:normal}
.enemy-doctrine em.flash{animation:doctrine-flash .75s ease-out}
#enemyDoctrineHud{color:#f0c96e!important;font-weight:700}.battle-location-hud #enemyDoctrineHud.flash{animation:doctrine-hud-flash .8s ease-out}
@keyframes doctrine-flash{0%{background:#d69a3d;color:#17120b;transform:translateX(-5px)}100%{background:transparent;transform:none}}@keyframes doctrine-hud-flash{0%,35%{color:#fff!important;text-shadow:0 0 12px #ffb32f;transform:scale(1.08)}100%{transform:none}}
@media(max-width:900px) and (min-width:601px){#battleScreen .general.enemy{grid-template-rows:minmax(82px,1.15fr) auto auto auto minmax(52px,.42fr) auto}.enemy-doctrine{padding:5px}.enemy-doctrine strong{font-size:15px}.enemy-doctrine small{font-size:11px}.enemy-doctrine em{font-size:11px}}
@media(max-width:600px),(max-height:560px) and (max-width:950px){
  #battleScreen .battle-layout>.general.enemy{grid-template-rows:auto!important}
  #battleScreen .battle-layout>.general>.enemy-doctrine{display:none}
  #battleScreen .battle-layout>.general.mobile-open>.enemy-doctrine{display:block;margin:8px 0;padding:9px}
  #battleScreen .battle-layout>.general.mobile-open>.enemy-doctrine strong{font-size:20px}
  #battleScreen .battle-layout>.general.mobile-open>.enemy-doctrine small,#battleScreen .battle-layout>.general.mobile-open>.enemy-doctrine em{font-size:15px;line-height:1.5}
}
@media(max-width:600px){
  #battleScreen.active{grid-template-rows:88px 52px minmax(0,1fr)}
  #battleScreen .expedition-hud{display:flex;height:52px}
  #battleScreen .expedition-hud .battle-location-hud{display:grid!important;grid-template-columns:1fr;grid-template-rows:17px 16px 9px;align-content:center;gap:1px;padding:3px 6px!important;text-align:left}
  #battleScreen .battle-location-hud #enemyDoctrineHud,#battleScreen .battle-location-hud>b,#battleScreen .battle-location-hud>em{grid-column:1;min-width:0}
  #battleScreen .battle-location-hud #enemyDoctrineHud{font-size:12px;line-height:16px;text-overflow:ellipsis;white-space:nowrap}
  #battleScreen .battle-location-hud>b{margin:0;font-size:12px;line-height:15px}
  #battleScreen .battle-location-hud>em{height:9px}
  #battleScreen .expedition-hud .supply-hud{display:grid;place-content:center;padding-inline:5px!important}
}
@media(min-width:1400px) and (min-height:800px){
  #battleScreen .expedition-hud span{font-size:13px}
  #battleScreen .expedition-hud small{font-size:13px}
  #battleScreen .expedition-hud b{font-size:14px}
  .enemy-doctrine strong{font-size:18px}.enemy-doctrine small{font-size:14px}.enemy-doctrine em{font-size:13px}
}

/* 天下周回：継承恩賞、新武将解放、史実由来の武将略歴を大きく見せる。 */
.commander-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
.commander-choice{min-height:148px;grid-template-columns:92px minmax(0,1fr);gap:11px}
.commander-choice-portrait{width:92px;height:112px}
.commander-choice-copy{gap:3px}.commander-choice-copy strong{font-size:21px}.commander-choice-copy em{font-size:13px}
.commander-unlock,.commander-history{display:block;color:#d7b868;font-size:12px;line-height:1.35}
.commander-history{color:#aaa18e}.commander-choice.locked{cursor:not-allowed;opacity:.68;border-style:dashed}
.commander-choice.locked .commander-choice-portrait{display:grid;place-items:center;background:#111;color:#806d48;font-size:50px}
.commander-choice.locked .commander-unlock{color:#e0a966}
.legacy-active{padding:10px 14px;border-left:4px solid #cf9d42;background:#302719;color:#d9c8a7;font-size:15px}.legacy-active b{color:#f0d181}
.unification-content{width:min(1040px,94vw);max-height:96dvh;padding:22px 34px 28px;overflow-y:auto}
.unification-mon{width:112px;height:112px;margin-top:2px}.unification-content h2{font-size:clamp(42px,5vw,64px)}
.unification-lead{margin:5px;font-size:20px}.unification-praise{margin:10px 0;line-height:1.6}.unification-difficulty{margin-bottom:12px}
.legacy-choice{padding:13px 16px;border:1px solid #856a3c;background:#201a14;text-align:left}
.legacy-choice h3{margin:0;color:#f0d187;font-size:24px}.legacy-choice>p{margin:5px 0 10px;color:#c5bba7;font-size:15px}
.legacy-rewards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.legacy-reward{display:flex;min-height:110px;padding:11px 13px;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;background:#181713;border:2px solid #514936;letter-spacing:.02em}
.legacy-reward small{color:#ad9d7d;font-size:13px}.legacy-reward strong{color:#ecd18c;font-size:20px}.legacy-reward span{color:#c7bdac;font-size:14px;line-height:1.45}
.legacy-reward.selected{border-color:#efcf76;background:linear-gradient(135deg,#58301d,#282017);box-shadow:0 0 0 2px #8f201e}
.unification-unlock{padding:9px 11px!important;margin:10px 0 0!important;background:#352616;color:#d8c5a1!important;font-size:16px!important}
.unification-unlock b{color:#f1b95f}.unification-unlock strong{color:#ffe198}
.unification-content>#unificationNewGameBtn{margin-top:13px;min-height:54px}.unification-content>#unificationNewGameBtn:disabled{cursor:not-allowed;opacity:.5}
@media(max-width:980px){.commander-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
  .commander-choices{grid-template-columns:1fr}.commander-choice{min-height:132px;grid-template-columns:84px minmax(0,1fr)}.commander-choice-portrait{width:84px;height:106px}
  .unification-content{width:100%;max-height:calc(100dvh - 12px);padding:18px 12px 20px}.unification-mon{width:88px;height:88px}.unification-content h2{font-size:42px}
  .legacy-choice{padding:11px}.legacy-choice h3{font-size:22px}.legacy-rewards{grid-template-columns:1fr}.legacy-reward{min-height:88px}.unification-unlock{font-size:15px!important}
}
/* LV11+ progression: keep commander silhouettes inside every portrait frame. */
.portrait,.unification-mon,.commander-choice-portrait,.general .mon:not(.retainer-portrait),.scene-player .scene-mon,.battle-quote-portrait:not(.retainer-portrait){background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important;background-color:#151512}
.update-commanders>div{background-position:center,center!important;background-size:100% 100%,contain!important;background-repeat:no-repeat!important;background-color:#151512}
.campaign-status{display:grid;gap:5px;margin-top:10px}.campaign-status span{display:flex;justify-content:space-between;gap:8px;padding:5px 7px;border-left:3px solid #806d48;background:#171612;color:#c7baa0;font-size:13px;line-height:1.35}.campaign-status b{color:#e3bd68}.campaign-status .rival{border-color:#c34439;background:#351b19}.campaign-status .defeated{border-color:#5d8962;color:#aac5aa}
.commander-mastery{color:#d8bc78;font-size:14px}.commander-mastery.rank-3{color:#ffe29a;text-shadow:0 0 10px #d69735}.unification-mastery{padding:7px 12px;margin:7px auto!important;max-width:760px;border:1px solid #83672e;background:#201b12;color:#f0d48b!important;font-size:17px!important}
.edict-choice{margin-top:16px;padding-top:14px;border-top:1px solid #625333}.edict-choice>h3{margin:0 0 4px;font-size:24px}.edict-choice>p{margin:4px 0 10px!important}.edict-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.edict-option{display:flex;min-height:108px;flex-direction:column;justify-content:center;gap:5px;padding:11px;background:#1b1a16;text-align:left}.edict-option small{color:#d2a64f;font-size:13px}.edict-option strong{color:#f1dfb7;font-size:20px}.edict-option span{color:#bdb3a0;font-size:14px;line-height:1.45}.edict-option.selected{border:2px solid #e2bd68;background:#49321d;box-shadow:0 0 0 2px #7e241f}
.province.rival{border-color:#ffbc5b!important;box-shadow:0 0 0 3px #9d201d,0 0 24px #d64b37!important}.rival-badge{position:absolute;right:-7px;top:-13px;padding:2px 6px;background:#a3231f;border:1px solid #ffd177;color:#ffe6a4;font-size:12px;font-style:normal;font-weight:bold}.route-selector button.rival-route{border:2px solid #c3483f;background:linear-gradient(135deg,#4c211e,#241b17)}.route-selector button.rival-route b{color:#ffd889}
@media(max-width:700px){.edict-choices{grid-template-columns:1fr}.edict-option{min-height:90px}.campaign-status span{font-size:14px}.commander-mastery{font-size:14px}}
