/* style.css · War drawn-map presentation · v0.12.1
CHANGES IN THIS VERSION: SECTION 10 adds large army counters, viewport-fitting battles, public action cues, help and victory. */
/* SECTION 1 — Layout. Keep actions beneath the fixed-size map and private details alongside it. */
:root{color-scheme:light;--paper:#f1e8d4;--ink:#25313a;--gold:#b98936;--line:#c6bba5}*{box-sizing:border-box}body{margin:0;background:#ddd4bf;color:var(--ink);font-family:Segoe UI,Arial,sans-serif;background-image:radial-gradient(#7c70551b .7px,transparent .7px);background-size:6px 6px}header{display:flex;justify-content:space-between;align-items:center;padding:20px 30px;border-bottom:2px solid var(--ink);background:#efe5cf}.eyebrow{font-size:10px;letter-spacing:2.5px;font-weight:700;color:#7a613e}h1{font:700 40px Georgia,serif;margin:4px 0 0}h1 span{font:12px Segoe UI,sans-serif;letter-spacing:1px;margin-left:22px;color:#645e52}.header-tools{display:flex;gap:20px;align-items:center;font-size:12px;letter-spacing:2px}.prototype{padding:9px 30px;color:#645c4e;font-size:10px;letter-spacing:1.5px}main{display:grid;grid-template-columns:minmax(0,1000px) 310px;gap:20px;padding:8px 24px 24px;max-width:1380px;margin:auto;align-items:start}.map-wrap,aside{background:var(--paper);border:2px solid var(--ink);border-radius:10px 5px 9px 4px;box-shadow:4px 5px 0 #25313a25;overflow:hidden}.map-heading,.board-footer{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px;letter-spacing:1.4px}.map-heading>span{font-weight:700}.lobby-controls{display:flex;align-items:center;gap:6px}.lobby-controls button{padding:7px 9px;font-size:10px}.lobby-controls span{font-size:9px;letter-spacing:.4px}aside{padding:22px}h2{font:700 24px Georgia,serif;margin:10px 0}p{color:#696252;font-size:12px;line-height:1.6}button,select,input{font:inherit}button{cursor:pointer;border:2px solid var(--ink);color:var(--ink);background:#faf0dc;border-radius:5px 3px 6px 4px;padding:10px 13px;font-weight:600;box-shadow:2px 2px 0 #25313a25}button:hover:not(:disabled){background:#f3d48d;transform:translateY(-1px)}button:disabled{opacity:.43;cursor:not-allowed}button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #206c98;outline-offset:3px}label{display:block;font-size:11px;color:#62583e;margin:12px 0 5px}select,input{display:block;width:100%;background:#fff8e8;color:var(--ink);border:1px solid #88795e;border-radius:4px;padding:8px}input[type=color]{height:34px;padding:3px}small{display:block;color:#736953;font-size:10px;line-height:1.6}.actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:12px 14px 15px;background:#e9ddc4;border-top:2px solid var(--ink)}.actions button{text-align:center;font-size:13px;padding:13px 5px;background:#f9efd9}.actions button:first-child{background:#f1c18d}.actions button small{margin-top:5px;font-size:9px;font-weight:400;color:#5a503b}details{border-top:1px solid var(--line);padding:14px 0;margin-top:12px;font-size:12px}summary{cursor:pointer;color:#715424;font-weight:600}.demo{width:100%;font-size:11px;margin:12px 0 7px;border-color:#933b3b}.log-heading{color:#715424;letter-spacing:2px;font-size:10px;margin-top:20px;font-weight:700}#log{padding:0;list-style:none;max-height:160px;overflow:auto}#log li{font-size:11px;line-height:1.6;padding:8px 0;border-bottom:1px solid var(--line);color:#655c49}.bonus{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:11px}.bonus strong{color:#725424;text-align:right}.board-footer{font-size:9px;letter-spacing:.2px;background:#eadfc7}.board-footer i{display:inline-block;background:#c4882e;width:8px;height:8px;border-radius:50%;margin-right:5px}dialog{max-width:420px;background:var(--paper);color:var(--ink);border:3px solid var(--ink);border-radius:10px;padding:30px;box-shadow:8px 8px 0 #0005}dialog::backdrop{background:#18202bf7}body.sealed #bonuses,body.sealed #player-name{visibility:hidden}
/* SECTION 2 — Countries and tokens. Render five-player-sized labels and tokens at every count. */
#map{position:relative;aspect-ratio:1000/680;background:#9aafb3;background-image:radial-gradient(#4a647b26 1px,transparent 1px);background-size:9px 9px;overflow:hidden}svg{width:100%;height:100%;display:block}.land{stroke:#26303a;stroke-width:4;stroke-linejoin:round;filter:saturate(.75) contrast(.86) brightness(1.12);transition:fill .3s}.land.active{stroke:#ffd986;stroke-width:7;filter:saturate(.8) contrast(.88) brightness(1.1) drop-shadow(0 0 5px #25313a)}.land.dead{filter:grayscale(1) brightness(.65)}.country{position:absolute;transform:translate(-50%,-50%);width:150px;text-align:center;color:#f9f2de;background:none;border:none;padding:3px;box-shadow:none}.country:hover:not(:disabled){background:#19283620;border:none;transform:translate(-50%,-50%)}.country:disabled{opacity:1;cursor:default}.country .banner{display:block;margin:auto auto 4px;width:28px;height:33px;background:var(--color);clip-path:polygon(0 0,100% 0,100% 100%,50% 82%,0 100%);border:2px solid #272f39;animation:flag 4s ease-in-out infinite;object-fit:cover}.country .name{display:block;background:#f5ead7ed;color:#202d33;border:2px solid #293239;border-radius:4px 2px 5px 2px;padding:5px 3px;font:700 12px Georgia,serif;white-space:normal;overflow-wrap:anywhere}.country .owner{display:block;font-size:10px;color:#fff7e4;text-shadow:0 1px 3px #14202e,0 0 4px #14202e;margin:3px 0;overflow-wrap:anywhere}.country .count{display:inline-block;font-size:10px;color:#f9f2df;background:#26313be8;padding:3px 6px;border-radius:3px}.troops{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;max-width:135px;margin:5px auto 0;height:35px;overflow:hidden}.unit{width:22px;height:32px;display:inline-block;animation:idle 3s ease-in-out infinite;animation-delay:var(--delay);filter:drop-shadow(1px 2px 1px #172a36)}.unit svg{overflow:visible}.country.dead{filter:grayscale(1);opacity:.8}.country.active .name{background:#fff0bd;border-color:#503b1c}.badge{font-size:9px;background:#203141d9;display:inline-block;border-radius:3px;color:#ffdf8e;letter-spacing:1px;margin:3px;padding:2px 5px}.badge:empty{display:none}.compass{position:absolute;bottom:12px;left:14px;font:38px Georgia;color:#334759;display:grid;place-items:center}.compass span{font:9px Segoe UI}.route-line{stroke:#e7a453;stroke-width:5;stroke-dasharray:12 8;fill:none;animation:march .7s linear infinite;filter:drop-shadow(0 1px 2px #283441)}.busy .banner{animation:busy .6s ease-in-out infinite}
/* SECTION 3 — Combat beats. Individual rolls and modifiers build a readable drawn battle panel. */
#combat{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(410px,90%);max-height:95%;overflow:auto;background:#fff0d8fa;border:3px solid #222f38;border-radius:8px 3px 9px 4px;padding:22px;text-align:center;box-shadow:7px 8px 0 #17232d66;z-index:5}#combat h3{margin:10px 0 16px;font:700 21px Georgia,serif}.roll-row{padding:12px 0;border-bottom:1px solid #9a8c72;font-size:17px;font-weight:700;min-height:45px}.modifier-chip{display:block;border:1px solid #9c8053;background:#e5d7b7;padding:6px;margin-top:8px;font-size:13px;font-weight:600;animation:pop .3s ease-out}.sabotage{color:#fff0eb!important;background:#89182a!important;border:2px solid #35121c!important;box-shadow:3px 3px 0 #4c0e20;padding:10px!important;letter-spacing:.6px;animation:scare .55s ease-out!important}.totals{font-size:12px;line-height:1.8;font-weight:bold;margin-top:16px;color:#514634}.result{font:700 21px Georgia,serif;color:#722f20;margin:16px 0}.reveal-controls{display:flex;justify-content:center;gap:8px;margin:14px 0}.reveal-controls button{font-size:11px;padding:8px 10px}.result:empty{display:none}@keyframes pop{from{transform:translateY(9px);opacity:0}to{transform:none;opacity:1}}@keyframes scare{0%{transform:scale(1.3) rotate(-3deg);opacity:0}65%{transform:scale(.96)}100%{transform:scale(1);opacity:1}}@keyframes flag{50%{transform:skewY(5deg)}}@keyframes idle{50%{transform:translateY(-2px)}}@keyframes busy{50%{filter:brightness(1.7)}}@keyframes march{to{stroke-dashoffset:-20}}
@media(max-width:1000px){main{grid-template-columns:1fr;padding:8px 12px;max-width:820px}header{padding:15px}h1 span{display:none}.prototype{padding:9px 15px}.map-heading{flex-wrap:wrap}.country{width:118px}.country .name{font-size:11px}.country .owner{font-size:9px}aside{padding:20px}.actions button{font-size:12px}.board-footer span:last-child{display:none}}
@media(max-width:550px){#map{aspect-ratio:1000/850}.country{width:94px}.country .banner{width:21px;height:26px}.country .name{font-size:10px;padding:3px}.country .count{font-size:9px}.unit{width:18px;height:27px}.troops{height:30px;gap:1px}.actions{grid-template-columns:repeat(3,minmax(0,1fr))}.header-tools{gap:8px;font-size:10px}.lobby-controls button{padding:6px}.country .owner{font-size:8px}#combat{padding:12px;max-height:97%}.roll-row{font-size:13px;padding:6px}.modifier-chip{padding:5px;font-size:11px}#combat h3{font-size:16px}.totals{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* SECTION 4 — Entry and legibility. Keep every control readable and save country drafts before joining. */
[hidden]{display:none!important}
button{font-size:15px;min-height:42px;color:#1d2831}
button:disabled{opacity:1;color:#4a4d4e;background:#e2dfd6;box-shadow:none;border-color:#7a7d77}
.actions button{font-size:17px;font-weight:700;min-height:82px;color:#17232c;padding:14px 7px}
.actions button small{font-size:12px;color:#3f433d;line-height:1.5}
.actions button:disabled{background:#e4dfd0;color:#424641;border-color:#83877d}
.actions button:disabled small{color:#4a4e46}
.lobby-controls button{font-size:13px;padding:8px 11px}
.lobby-controls span{font-size:11px}
#edit-country{width:100%;margin:18px 0 4px}
#setup{width:min(700px,94vw);max-width:700px;max-height:90vh;overflow:auto;padding:28px}
#setup h2{font-size:30px}
#setup p{font-size:14px}
.setup-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px;align-items:start}
#setup label{font-size:14px;font-weight:600;margin-top:15px}
#setup input,#setup select{font-size:16px;min-height:43px}
#setup small{font-size:12px}
.setup-preview{border:2px solid #7e6c4e;padding:28px 15px;background:#e9dfc7;text-align:center;margin-top:15px;border-radius:7px}
.setup-preview h3{font:700 23px Georgia,serif;overflow-wrap:anywhere}
#flag-preview{width:110px;height:125px;margin:20px auto;background:#48b5d0;clip-path:polygon(0 0,100% 0,100% 100%,50% 83%,0 100%);font-size:46px;display:grid;place-items:center;color:white}
#flag-preview img{width:100%;height:100%;object-fit:cover}
.setup-footer{display:flex;justify-content:flex-end;gap:12px;padding-top:23px;border-top:1px solid #b5a78d;margin-top:22px}
#save-setup{background:#edd08a;border:2px solid #47321b;min-width:160px}
#name-note{color:#973225;font-weight:600}
#setup-form{margin:0}
@media(max-width:550px){.setup-grid{grid-template-columns:1fr}.setup-preview{padding:14px}#flag-preview{width:60px;height:75px;margin:10px auto}.setup-preview h3{font-size:20px;margin:8px 0}.actions button{font-size:15px}.actions button small{font-size:11px}.lobby-controls button{font-size:12px;padding:6px 8px}#setup{padding:18px}}

/* SECTION 5 — Forces readability. Make private details and army tokens legible over busy terrain. */
main{grid-template-columns:minmax(0,1000px) 360px;max-width:1440px}
aside{padding:24px;background:#f6eedc;color:#202b34}
aside .eyebrow,aside .log-heading{font-size:12px;letter-spacing:1.5px;color:#4b3c27}
aside h2{font-size:28px}
aside p{font-size:16px;line-height:1.6;color:#3c4240}
aside label{font-size:15px;font-weight:600;color:#303933;margin-top:18px}
aside select{font-size:16px;min-height:46px;color:#202b34}
aside select:disabled{opacity:1;color:#454a43;background:#e6e2d8}
aside small{font-size:14px;color:#494d43;line-height:1.6}
.bonus{font-size:15px;padding:12px 0;gap:14px;align-items:baseline;border-color:#b8ad95}
.bonus>span{color:#303933;flex:1}
.bonus strong{color:#25313a;font-weight:700;max-width:170px;line-height:1.5}
aside .demo{font-size:15px;padding:12px;margin-top:14px}
#log{max-height:240px}
#log li{font-size:15px;line-height:1.65;color:#303933;padding:12px 0;border-color:#b8ad95}
.country .owner{background:#f7efdedf;color:#1e2b33;text-shadow:none;border:1px solid #4b4b3b;border-radius:3px;padding:3px 6px;font-size:11px;display:inline-block;max-width:100%;margin:3px 0}
.troops{background:#fff5df;border:2px solid #28343c;border-radius:8px 4px 9px 5px;box-shadow:0 3px 0 #25313a80,inset 0 -3px 0 #dacbac;padding:7px 8px;gap:5px;min-width:104px;max-width:142px;width:max-content;height:auto;min-height:52px;max-height:100px;margin:7px auto 3px;align-items:center}
.unit{width:26px;height:36px;filter:drop-shadow(1px 1px 0 #25313a)}
.country:disabled{background:transparent;border:none;box-shadow:none;color:#f9f2de}
@media(max-width:1000px){main{grid-template-columns:1fr;max-width:820px}.bonus strong{max-width:55%}}
@media(max-width:550px){aside{padding:20px}.bonus{font-size:15px}.troops{min-width:82px;max-width:94px;padding:5px 4px;gap:2px;min-height:40px;max-height:82px}.unit{width:22px;height:30px}.country .owner{font-size:10px;padding:2px 3px}}

/* SECTION 6 — Comic color and scale. Bright paper, bold ink and enlarged markers keep the drawn map readable. */
:root{--paper:#fffdf5;--ink:#18283e;--line:#afbdcc}
body{background-color:#d6e9fa;background-image:radial-gradient(#568bb92b 1px,transparent 1px);background-size:7px 7px}
header{background:#fff;border-top:7px solid #ffcf32;box-shadow:0 5px 0 #18283e}
h1{font-family:Impact,'Arial Black',sans-serif;font-size:52px;letter-spacing:2px;text-shadow:3px 3px 0 #ffcf32}h1 span{text-shadow:none;color:#18283e}
.eyebrow,.prototype{color:#263f62}.map-wrap,aside{border:3px solid #18283e;box-shadow:6px 6px 0 #18283e;border-radius:5px}
.map-heading{background:#ffcf32;font-size:13px}.board-footer{background:#eef5ff;color:#243955}aside{background:#fff}.bonus strong{color:#164c84}.log-heading{background:#c9e5ff;padding:10px;border:2px solid #18283e}
#map{background-color:#82cde8;background-image:radial-gradient(#2265852b 1px,transparent 1px);background-size:7px 7px}
.land{filter:saturate(1.25) contrast(1.06);stroke:#18283e;stroke-width:5}.land.active{filter:saturate(1.3) contrast(1.06) drop-shadow(0 0 4px #18283e);stroke:#ffcf32;stroke-width:8}.land.dead{filter:grayscale(1) brightness(.65)}
.country{width:190px}.country .banner{width:66px;height:76px;border:3px solid #18283e;margin-bottom:6px}.country .name{background:#fff;border:3px solid #18283e;font:800 17px 'Segoe UI',sans-serif;box-shadow:3px 3px 0 #18283e;padding:6px}.country.active .name{background:#ffe773;border-color:#18283e}.country .owner{background:#fff;font-size:14px;font-weight:700;border:2px solid #18283e;margin-top:6px}
.troops{background:#fff;border:3px solid #18283e;min-width:138px;max-width:184px;min-height:66px;max-height:none;gap:6px;padding:8px;box-shadow:3px 3px 0 #18283e}.unit{width:34px;height:46px}.army-total{flex-basis:100%;font-size:12px;color:#18283e;font-weight:700}.badge{font-size:11px;background:#18283e;color:#ffe773}
.actions{background:#c9e5ff}.actions button{background:#fff}.actions button:first-child{background:#ffb5a5}.actions button:nth-child(2){background:#ffe773}.actions button:nth-child(3){background:#b7e6b3}.actions button:nth-child(4){background:#d9c7ff}.actions button:nth-child(5){background:#aee4f8}.actions button:disabled{background:#e6ebf1;color:#414f62}
button{background:#fff;border-color:#18283e;box-shadow:3px 3px 0 #18283e}button:hover:not(:disabled){background:#ffe773}#initiative{width:100%;margin-top:16px;background:#ffe773}.initiative-order{padding:12px 16px;background:#fff;font-size:14px;line-height:1.6;border-bottom:3px solid #18283e}
#combat{background:#fff;border:4px solid #18283e;box-shadow:8px 8px 0 #18283e}#combat h3,.result{font-family:'Arial Black','Segoe UI',sans-serif}.modifier-chip{background:#ffe773;color:#18283e;border:2px solid #18283e}.totals{color:#18283e;font-size:14px}.setup-preview{background:#c9e5ff;border-color:#18283e}#setup,#handoff{background:#fff}#save-setup{background:#ffe773;border-color:#18283e}
@media(max-width:1000px){.country{width:166px}.country .name{font-size:15px}.country .owner{font-size:12px}.country .banner{width:56px;height:64px}.unit{width:30px;height:41px}.troops{min-width:124px;max-width:160px}}
@media(max-width:550px){.country{width:106px}.country .banner{width:40px;height:46px}.country .name{font-size:12px;padding:4px}.country .owner{font-size:10px;padding:2px}.unit{width:23px;height:32px}.troops{min-width:88px;max-width:104px;gap:2px;padding:5px;min-height:46px}.badge{font-size:9px}.initiative-order{font-size:12px}.map-heading{font-size:11px}}

/* SECTION 7 — Public status. Make initiative, host start, active turns and resolution waits unmistakable. */
#game-status{background:#ffe773;color:#18283e;border-bottom:3px solid #18283e;padding:17px 30px;font-size:20px;font-weight:800;line-height:1.45;overflow-wrap:anywhere}
@media(max-width:550px){#game-status{font-size:16px;padding:13px 15px}}

/* SECTION 8 — Comic action and turn cues. Keep outcome bursts brief and readable status persistent. */
.header-tools{flex-wrap:wrap;justify-content:flex-end;max-width:650px;letter-spacing:0;gap:12px}.sound-choice{display:flex;align-items:center;gap:6px;margin:0;font-size:14px;color:#18283e}.sound-choice input{width:18px;height:18px;min-height:0}.header-tools button{font-size:13px}#alert-note:not(:empty){display:block;background:#fff;padding:8px 30px;font-size:14px;color:#293a50}
body.my-turn #game-status{background:var(--turn-color);color:#101b2b;font-size:25px;border:4px solid #18283e;text-shadow:0 1px #fff8}body.my-turn .action-dock{outline:5px solid var(--turn-color);outline-offset:-5px;animation:turn-pulse 1.1s ease-in-out 3}.my-country-turn .name{animation:turn-pulse 1.1s ease-in-out 3;border-color:#18283e;outline:4px solid var(--color)}
#combat{width:min(560px,94%);padding:18px;background:#fff;background-image:radial-gradient(#25313a12 1px,transparent 1px);background-size:6px 6px}#combat .eyebrow{background:#ffe773;border:2px solid #18283e;display:inline-block;padding:6px 12px;transform:rotate(-2deg)}#combat h3{font-size:22px}.battle-flags{display:flex;justify-content:space-around;align-items:center;margin:12px 0}.battle-flag{background:var(--color);width:65px;height:76px;border:3px solid #18283e;box-shadow:3px 3px 0 #18283e;display:grid;place-items:center;clip-path:polygon(0 0,100% 0,100% 100%,50% 85%,0 100%);font-size:30px;color:white}.battle-flag img{width:100%;height:100%;object-fit:cover}
.roll-row{border:3px solid #18283e;background:#eef5ff;padding:14px 9px;margin:10px 0;box-shadow:3px 3px 0 #18283e;font-size:20px}.roll-row:nth-of-type(even){background:#fff2ac}.modifier-chip{font-size:15px;transform:rotate(-1deg)}.totals{font-size:15px}.result{font-size:24px;background:#ffe773;border:3px solid #18283e;padding:12px;color:#18283e}.result:empty{display:none}
.country-effect{position:absolute;z-index:12;transform:translate(-50%,-50%) rotate(-8deg);width:230px;min-height:155px;display:grid;place-items:center;text-align:center;padding:35px 22px;background:#ffe529;color:#14263a;font:900 40px Impact,'Arial Black',sans-serif;letter-spacing:2px;clip-path:polygon(50% 0,59% 20%,76% 3%,77% 29%,100% 22%,85% 44%,100% 57%,79% 63%,88% 88%,65% 79%,55% 100%,44% 80%,20% 96%,24% 73%,0 78%,15% 55%,0 38%,23% 34%,15% 10%,39% 23%);filter:drop-shadow(4px 4px 0 #18283e);animation:comic-impact .4s ease-out}.country-effect.miss{background:#b7edff}.country-effect.tie{background:#eddbff}.country-effect.secret{clip-path:none;border:4px solid #18283e;border-radius:45% 40% 45% 35%;background:#293149;color:#fff;min-height:100px;font-size:24px;letter-spacing:0;padding:20px;width:200px;animation:sneak 1.2s ease-in-out}
.flying-arrows{position:absolute;z-index:11;font-size:38px;color:#18283e;text-shadow:2px 2px white;white-space:nowrap;animation:arrow-flight .7s ease-in forwards}.flying-arrows.miss{--miss:55px}.fallen-division{position:absolute;z-index:13;transform:translate(-50%,35px);animation:division-fall 1.2s forwards}.custom-unit{position:relative;border-bottom:5px solid var(--color);border-radius:4px}.custom-unit img{width:100%;height:100%;object-fit:contain}#army-preview .unit{width:68px;height:92px}#army-preview{margin:12px auto}.setup-preview{background:#eaf5ff}#invite{font-size:15px;border:2px solid #18283e;padding:12px}
@keyframes comic-impact{from{transform:translate(-50%,-50%) rotate(-15deg) scale(.4);opacity:0}70%{transform:translate(-50%,-50%) rotate(-6deg) scale(1.15)}to{transform:translate(-50%,-50%) rotate(-8deg)}}
@keyframes arrow-flight{from{transform:translate(0,0);opacity:0}20%{opacity:1}to{transform:translate(var(--dx),calc(var(--dy) + var(--miss,0px)));opacity:0}}
@keyframes division-fall{from{opacity:1}to{transform:translate(-50%,85px) rotate(30deg);opacity:0}}
@keyframes sneak{0%{opacity:0;transform:translate(-50%,-35%)}25%,75%{opacity:1}100%{opacity:0;transform:translate(-50%,-65%)}}
@keyframes turn-pulse{50%{box-shadow:0 0 0 6px var(--turn-color),0 0 20px #18283e50}}
@media(max-width:550px){body.my-turn #game-status{font-size:18px}.header-tools{max-width:220px;gap:6px}#combat h3{font-size:17px}.roll-row{font-size:15px;padding:9px}.battle-flag{width:45px;height:52px}.country-effect{width:170px;min-height:115px;font-size:30px}.country-effect.secret{width:150px;min-height:80px;font-size:18px}.result{font-size:19px}}

.roll-name{display:block}.die-face{display:inline-grid;place-items:center;min-width:70px;height:64px;margin:8px auto 0;border:3px solid #18283e;border-radius:8px;background:#fff;font:900 38px Impact,sans-serif;box-shadow:4px 4px 0 #18283e;transform:rotate(-3deg)}
@media(max-width:550px){.die-face{height:44px;min-width:50px;font-size:29px}}

/* SECTION 9 — Personal choices. Keep uploaded flags framed and the sound picker readable. */
.country .banner.custom-flag,.battle-flag.custom-flag,#flag-preview.custom-flag{clip-path:none;border:0;background:none!important;box-shadow:none;overflow:visible}
.custom-flag svg{width:100%;height:100%;display:block;overflow:visible}
.notification-choice{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;font-weight:600;color:#18283e}
#notification-sound{width:125px;min-height:36px;font-size:14px;margin:0;padding:5px;background:#fff;color:#18283e;border:2px solid #18283e}
.header-tools{max-width:860px}
@media(max-width:550px){.header-tools{max-width:240px}.notification-choice{flex-wrap:wrap;gap:3px;font-size:12px}}

/* SECTION 10 — Army counters, battle fit and victory. Enlarge the figure and keep controls in the viewport. */
.troops{min-width:0;max-width:160px;min-height:112px;gap:10px;padding:8px 12px;flex-wrap:nowrap;overflow:visible}.troops .unit{width:64px;height:88px;flex-shrink:0}.division-counter{font:900 28px 'Segoe UI',sans-serif;color:#18283e;white-space:nowrap}
#combat{position:fixed;width:min(760px,96vw);max-height:calc(100dvh - 28px);overflow:auto;z-index:40;padding:12px 18px}
#combat h3{font-size:20px;margin:6px 0 10px}.battle-flags{margin:4px 0}.battle-flag{width:43px;height:50px;font-size:23px}.battle-rolls{display:grid;grid-template-columns:1fr 1fr;gap:12px}.roll-row{font-size:16px;margin:4px 0;padding:9px;min-height:0}.die-face{height:50px;min-width:57px;font-size:31px;margin:6px 0}.modifier-chip{font-size:14px;padding:5px;margin-top:5px}.totals{margin-top:8px;font-size:14px;line-height:1.45}.result{font-size:21px;margin:9px 0;padding:9px}.reveal-controls{margin:8px 0}#beat-hint{display:block;margin:5px 0;font-size:12px}
.country-effect.secret{animation:sneak-long 4s ease-in-out}.country-effect.conscript{background:#b7e6b3;font-size:25px}.country-effect.backfire{background:#ff8468;font-size:30px}
@keyframes sneak-long{0%{opacity:0;transform:translate(-50%,-35%)}10%,90%{opacity:1}100%{opacity:0;transform:translate(-50%,-65%)}}
#tutorial{width:min(700px,94vw);max-height:88dvh;overflow:auto;background:#fff;padding:24px;color:#18283e;line-height:1.6;border:4px solid #18283e}#tutorial dt{font-weight:800;margin-top:12px}#tutorial dd{margin-left:0}#tutorial button{position:sticky;bottom:0;background:#ffe773}
#victory{width:min(680px,94vw);max-height:92dvh;overflow:auto;text-align:center;background:#ffe773;border:6px solid #18283e;padding:25px;box-shadow:12px 12px 0 #18283e}#victory::backdrop{background:#10213de0}#victory h2{font:900 64px Impact,sans-serif;margin:12px 0;color:#18283e}#victory-name{font-size:24px;font-weight:800}#victory-flag{height:230px;width:205px;margin:auto;animation:victory-pop .6s ease-out}#victory-flag .battle-flag{height:100%;width:100%}
@keyframes victory-pop{from{transform:scale(.4) rotate(-15deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}
@media(max-width:550px){.troops{min-height:84px;max-width:110px;padding:6px;gap:5px}.troops .unit{width:43px;height:62px}.division-counter{font-size:21px}#combat{padding:9px;max-height:calc(100dvh - 16px)}#combat h3{font-size:16px}.battle-rolls{gap:6px}.roll-row{font-size:13px;padding:6px}.modifier-chip{font-size:12px;padding:4px}.die-face{height:43px;font-size:28px}.totals{font-size:12px}.result{font-size:17px}#victory h2{font-size:48px}#victory-flag{height:180px;width:160px}}
@media(prefers-reduced-motion:reduce){#victory-flag,.country-effect.secret{animation:none}}

.battle-rolls>*{min-width:0}.roll-name,#combat h3,.result{overflow-wrap:anywhere}

/* SECTION 11 — Solo testing. Make isolated match controls readable and easy to reach. */
.solo-link{display:inline-block;background:#ffdf39;color:#182b45;border:2px solid #182b45;padding:10px 14px;font-weight:800;text-decoration:none;border-radius:4px;margin:4px}
.test-panel{margin:16px auto;padding:18px;max-width:1300px;background:#fff;border:3px solid #182b45;box-shadow:5px 5px #182b45;color:#182b45}
.test-panel h2{font-size:24px;margin:0 0 8px}.test-panel p{font-size:16px;line-height:1.4}.test-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:12px 0}.test-controls label{font-size:16px;font-weight:700;display:flex;flex-direction:column;gap:6px}.test-controls select,.test-controls input,.test-controls button{font-size:16px;padding:10px;color:#182b45;background:#fff;border:2px solid #182b45;min-height:44px}.test-controls input{width:110px}.test-controls button{background:#ffdf39;font-weight:700}

/* SECTION 12 — Comic kingdom cards and setup. Trade stacked labels for larger army artwork and two focused pages. */
h1,h2,h3,.country-identity,.actions button,#setup-step,.terrain-choices span,.emblem-choices span{font-family:'Comic Sans MS','Comic Sans',cursive;font-weight:900}
.country{width:220px}.country-heading{display:flex;align-items:center;justify-content:center;gap:8px}.country .banner{flex:0 0 62px;width:62px;height:72px;margin:0}.country-identity{flex:1;min-width:0;background:white;border:3px solid #18283e;box-shadow:3px 3px #18283e;padding:5px}.country .owner,.country .name{background:none!important;border:0!important;box-shadow:none;font-size:16px;color:#18283e;text-shadow:none;margin:0;padding:3px;outline:0!important}.country.active .country-identity{background:#ffe773}.troops{max-width:205px;min-height:164px}.troops .unit{width:104px;height:144px}.division-counter{font-size:34px}
#setup{width:min(880px,95vw);background:white;border:4px solid #18283e;max-height:92dvh;overflow:auto}#setup-step{background:#ffe773;border:2px solid #18283e;padding:10px;font-size:19px}.setup-grid{grid-template-columns:1fr 1fr;gap:24px}.setup-preview{min-width:0;align-self:start}.terrain-choices,.emblem-choices{border:0;padding:0;margin:12px 0;display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.terrain-choices legend,.emblem-choices legend{font-weight:800;margin-bottom:12px}.terrain-choices label,.emblem-choices label{display:flex;align-items:center;gap:8px;margin:0;background:#fff;border:2px solid #18283e;border-radius:4px;padding:12px;color:#18283e;cursor:pointer;font-size:17px}.terrain-choices input,.emblem-choices input{width:18px;min-height:18px;margin:0}.terrain-choices label:has(:checked),.emblem-choices label:has(:checked){background:#ffe773;box-shadow:3px 3px #18283e}#terrain-preview{height:280px;background-size:300% 200%;border:3px solid #18283e;display:grid;place-items:center;color:#18283e;font-weight:800;background-color:#fff}#army-preview .unit{width:132px;height:182px}#flag-preview{width:100px;height:116px}#setup-next{background:#ffe773}.setup-footer{flex-wrap:wrap;gap:12px}[hidden]{display:none!important}
@media(max-width:1000px){.country{width:180px}.country .banner{flex-basis:48px;width:48px;height:58px}.country .owner,.country .name{font-size:13px}.troops .unit{width:86px;height:120px}.troops{min-height:138px;max-width:170px}}
@media(max-width:550px){.country{width:128px}.country-heading{gap:4px}.country .banner{flex-basis:33px;width:33px;height:40px}.country .owner,.country .name{font-size:10px;padding:1px}.country-identity{padding:3px;border-width:2px}.troops .unit{width:64px;height:90px}.troops{min-height:104px;max-width:126px;gap:5px}.division-counter{font-size:22px}.setup-grid{grid-template-columns:1fr}.setup-preview{padding:12px}#terrain-preview{height:180px}.terrain-choices label,.emblem-choices label{font-size:15px;padding:9px}}

.emblem-choices{grid-template-columns:repeat(3,1fr);gap:7px}.emblem-choices label{padding:9px 5px;font-size:14px;gap:4px}.setup-preview{position:sticky;top:8px}#setup .setup-footer{padding-top:12px}@media(max-width:550px){.setup-preview{position:static}}

/* SECTION 13 — Ink water and initiative. Keep the ocean monochrome and emphasize only the ruler who must roll. */
#map{background:#fff url('assets/water-ink.svg') repeat;background-size:180px 100px}
main{grid-template-columns:minmax(0,1fr) 265px;max-width:1440px}aside{padding:18px}aside .bonus{font-size:15px}aside h2{font-size:24px}
#initiative.needs-initiative{background:#ffe773;animation:initiative-flash 1.3s ease-in-out infinite;border:3px solid #18283e}
@keyframes initiative-flash{50%{background:#ffb449;box-shadow:0 0 0 5px #ffcf3266;transform:translateY(-2px)}}
@media(max-width:1000px){main{grid-template-columns:1fr;max-width:820px}}
@media(prefers-reduced-motion:reduce){#initiative.needs-initiative{animation:none;outline:4px solid #ffb449}}

/* SECTION 14 — Two-page comic spread. Use local comic fonts, illustrated water and horizontal battle knockouts. */
@font-face{font-family:WarPunch;src:url('assets/fonts/Bangers-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:WarCaption;src:url('assets/fonts/ComicNeue-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
:root{--comic-ocean:url('assets/ocean-comic-v1.png')}
main{max-width:1800px;width:calc(100% - 40px);padding:18px;grid-template-columns:minmax(0,1fr) 255px;gap:20px;background:#fff;border:5px solid #18283e;box-shadow:9px 9px #18283e;margin:24px auto;position:relative}
.map-wrap{background:#fff var(--comic-ocean) center/cover;border:3px solid #18283e;box-shadow:none;min-width:0}.map-heading{font-family:WarCaption,sans-serif;font-size:17px}.map-wrap #map{background:#fff var(--comic-ocean) center/cover}.board-footer{background:#ffffffdf;border:0;font-size:12px}.action-dock{background:transparent;border:0;gap:15px;padding:20px 18px 25px}.actions button{border:4px solid #18283e;border-radius:0;box-shadow:5px 5px #18283e;font:400 27px WarPunch,Impact,sans-serif;letter-spacing:1px;min-height:94px;transform:rotate(-1.5deg);padding:10px}.actions button:nth-child(even){transform:rotate(1.3deg)}.actions button small{font:700 15px WarCaption,sans-serif;letter-spacing:0;margin-top:6px}.actions button:hover:not(:disabled){transform:translateY(-4px) rotate(0)}
h1,h2,h3,#combat h3,.result,.country-effect,.actions button{font-family:WarPunch,Impact,sans-serif;font-weight:400;letter-spacing:1px}h1{font-size:70px}.country .owner,.country .name,.eyebrow,#setup-step,.terrain-choices span,.emblem-choices span,.country-identity{font-family:WarCaption,sans-serif;font-weight:700}.country .owner,.country .name{font-size:18px}.division-counter{font-family:WarPunch,sans-serif;font-size:38px}.country-identity{border-radius:0}aside{border-radius:0;box-shadow:5px 5px #18283e;align-self:stretch;background:#fff}aside h2{font-size:33px}.log-heading{font-family:WarCaption,sans-serif}.test-panel{max-width:1760px}
.country-effect.secret{width:255px;min-height:150px;border:0;border-radius:0;background:#fc42bc;color:#ffe941;clip-path:polygon(2% 25%,24% 24%,17% 0,42% 15%,60% 0,63% 20%,96% 8%,86% 35%,100% 51%,85% 63%,95% 89%,68% 81%,59% 100%,44% 81%,19% 98%,22% 74%,0 78%,12% 52%);font:400 32px WarPunch,Impact,sans-serif;letter-spacing:2px;text-shadow:2px 2px #18283e,-1px -1px #18283e;filter:drop-shadow(4px 4px #18283e);animation:sneak-comic 4s both;padding:30px}
@keyframes sneak-comic{0%{opacity:0;transform:translate(-130%,-50%) rotate(-10deg) scale(.5)}12%,88%{opacity:1;transform:translate(-50%,-50%) rotate(-7deg) scale(1)}100%{opacity:0;transform:translate(20%,-50%) rotate(4deg)}}
#combat{width:min(1100px,96vw);padding:18px 24px;overflow-x:hidden;background:#fff;background-image:radial-gradient(#18283e16 1px,transparent 1px);background-size:5px 5px;border:5px solid #18283e;animation:combat-enter .45s both}#combat h3{font-size:32px;background:#ffe773;border:3px solid #18283e;padding:12px;transform:rotate(-1deg);line-height:1.2}.battle-rolls{gap:22px}.roll-row{border:4px solid #18283e;background:#91ddff;font:700 20px WarCaption,sans-serif;box-shadow:5px 5px #18283e;padding:13px}.roll-row:empty{visibility:hidden}.roll-row:nth-child(2){background:#ffd878}.die-face{font-family:WarPunch,sans-serif;font-size:48px;height:64px;min-width:74px}.modifier-chip{font-family:WarCaption,sans-serif;font-size:18px;border:3px solid #18283e;box-shadow:3px 3px #18283e;background:#ed94ff}.modifier-chip.sabotage{background:#e82b50;color:#fff}.fly-left{animation:fly-left .5s both}.fly-right{animation:fly-right .5s both}.result{font:700 20px WarCaption,sans-serif;background:#fff;border:0;padding:4px;margin:8px 0}.battle-knockout{display:inline-block;background:#ffe92d;color:#ee3a54;-webkit-text-stroke:1.5px #18283e;text-shadow:4px 4px #18283e;font:400 64px WarPunch,sans-serif;letter-spacing:3px;line-height:1.1;clip-path:polygon(0 30%,20% 25%,14% 0,40% 17%,63% 0,68% 20%,100% 5%,87% 39%,100% 66%,81% 67%,92% 100%,61% 80%,40% 100%,35% 79%,0 91%,12% 62%);padding:24px 50px;animation:fly-left .55s both}.battle-knockout.miss{background:#8ee3ff;color:#ffe92d}.battle-knockout.backfire{background:#ff58af;color:#ffe92d}.battle-knockout.tie{background:#c39aff;color:#fff}#combat>button:last-child{min-width:150px;background:#ffe773;font:400 26px WarPunch,sans-serif}#combat .reveal-controls button{font:700 17px WarCaption,sans-serif}
@keyframes fly-left{from{opacity:0;transform:translateX(-400px) rotate(-10deg)}to{opacity:1;transform:translateX(0) rotate(0)}}
@keyframes fly-right{from{opacity:0;transform:translateX(400px) rotate(10deg)}to{opacity:1;transform:translateX(0) rotate(0)}}
@keyframes combat-enter{from{opacity:0;margin-left:-150px}to{opacity:1;margin-left:0}}
@media(max-width:1100px){main{width:calc(100% - 24px);padding:10px;grid-template-columns:minmax(0,1fr) 220px;gap:12px}.actions button{font-size:22px}.actions button small{font-size:12px}.action-dock{gap:9px;padding:15px 10px}.country .owner,.country .name{font-size:14px}}
@media(max-width:800px){main{width:calc(100% - 16px);grid-template-columns:1fr;padding:6px;margin:12px auto;gap:12px}.map-wrap{min-width:0}aside{align-self:start}.actions{position:sticky;bottom:0;z-index:15;grid-template-columns:repeat(3,minmax(0,1fr));background:#fff var(--comic-ocean) center/cover}.actions button{min-height:64px;font-size:21px;box-shadow:3px 3px #18283e;transform:none!important}.actions button small{font-size:11px}.action-dock{padding:10px;gap:8px}#combat h3{font-size:23px}.roll-row{font-size:15px;padding:8px}.modifier-chip{font-size:14px}.battle-knockout{font-size:44px;padding:18px 30px}.battle-rolls{gap:10px}#combat{padding:12px}.country-effect.secret{width:190px;min-height:120px;font-size:25px}.country .owner,.country .name{font-size:11px}h1{font-size:48px}}
@media(prefers-reduced-motion:reduce){.fly-left,.fly-right,#combat,.battle-knockout,.country-effect.secret{animation:none!important}}

/* SECTION 15 — Werewolf scale. Give the wide male silhouette more space without cropping its tail or claws. */
.troops:has(img[data-army="werewolf-male"]){max-width:245px}.troops .unit:has(img[data-army="werewolf-male"]){width:140px}
#army-preview .unit:has(img[data-army="werewolf-male"]){width:180px}
@media(max-width:1000px){.troops:has(img[data-army="werewolf-male"]){max-width:210px}.troops .unit:has(img[data-army="werewolf-male"]){width:115px}}
@media(max-width:550px){.troops:has(img[data-army="werewolf-male"]){max-width:140px}.troops .unit:has(img[data-army="werewolf-male"]){width:80px}}
