/* La Horde V6 — inked adventure-comic interface; no external fonts. */
:root{color-scheme:light;--ink:#27344b;--muted:#586879;--paper:#f7e9c9;--cream:#f7e9c9;--green:#287c70;--gold:#edbd4e;--blue:#508fc1;--coral:#df6856;--purple:#936aad;--line:2px solid var(--ink)}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden}
body{font:14px "Trebuchet MS",system-ui,sans-serif;color:var(--ink);background:radial-gradient(circle at 2px 2px,#fff6da13 1px,transparent 1.5px) 0 0/9px 9px,#304857;display:flex;flex-direction:column}
button,input{font:inherit}
button{cursor:pointer;border:var(--line);border-radius:8px 11px 7px 10px;padding:8px 12px;font-size:12px;font-weight:800;background:#f3db9e;color:var(--ink);box-shadow:0 2px 0 var(--ink);transition:transform .12s,background .12s}
button:hover{background:#ffe9ac;transform:translateY(-1px)}
button:active{transform:translateY(1px);box-shadow:none}
button:disabled{cursor:default;opacity:.55;transform:none}
button:focus-visible,input:focus-visible{outline:3px solid #52c8d3;outline-offset:3px}
.primary{background:var(--coral);color:#fff8dd}.primary:hover{background:#c85347}.primary.is-ready{background:#247d71;color:#fff7d9}
.subtle{background:#446078;color:#fff0ce;border-color:#1e3044}.subtle:hover{background:#52718a}
header{flex:none;min-height:47px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:5px 22px;border-bottom:3px solid #1e3044;background:#344e64}
header a{font-size:14px;letter-spacing:1.5px;color:#fff1d0;text-decoration:none}header button{padding:5px 9px;font-size:11px}
.brand-lockup,.header-actions,#roomInfo{display:flex;align-items:center;gap:9px}.brand-lockup{white-space:nowrap;min-width:0}.brand-divider{color:#79c1c4}
.site-game{font:bold 18px "Trebuchet MS",sans-serif;color:#fff0cb}.site-game em{color:#ffc961;font-style:normal}
.header-actions{margin-left:auto;white-space:nowrap}#roomInfo{gap:5px}#copy{background:#5f9eae;color:#fff8e4}#helpBtn{background:#9c7ab6}
main{flex:1;min-height:0;width:min(1550px,100%);padding:10px 18px 6px;margin:auto;display:flex;flex-direction:column;gap:9px}
.eyebrow{font-size:9px;letter-spacing:1.5px;font-weight:900;color:#655275}h2{font-family:"Trebuchet MS",sans-serif}p{line-height:1.4}
.battle{flex:1;min-height:210px;display:flex;flex-direction:column;overflow:hidden;border:3px solid #25344a;border-radius:16px 22px 14px 20px;background:#82ad74;box-shadow:0 4px 0 #172b3b}
.battle-top{position:relative;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 15px;flex:none;background:#3e6375;border-bottom:3px solid #27394d;color:#fff0d0}
.badge{display:inline-block;background:#efbf4e;border:2px solid var(--ink);padding:5px 9px;border-radius:6px 9px 5px 8px;font-weight:900;font-size:10px;letter-spacing:.7px;color:var(--ink)}
#era{display:block;margin-top:4px;font-size:8px;letter-spacing:1px;color:#c8eee5}
#phase{font-size:11px;min-width:140px;text-align:right;color:#f7df9e;font-weight:800}
#teamHealth{width:clamp(175px,32vw,380px)}#teamHealth>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:9px;margin-bottom:5px}#teamHealth b{letter-spacing:.7px}
.hp{height:11px;background:#263c51;border:2px solid #223248;border-radius:8px;overflow:hidden}
.hp i{display:block;width:100%;height:100%;transform-origin:left;will-change:transform}
.team-hp{height:14px}.team-hp i{background:linear-gradient(180deg,#b8d977 0 42%,#72af6d 42%)}.team-hp.low i{background:#e57665}
.enemy-hp i{background:linear-gradient(180deg,#f4b266 0 42%,#df6a54 42%)}
#arena{position:relative;flex:1;min-height:0;isolation:isolate}#scenery,#map{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#enemy{position:absolute;top:65%;left:50%;transform:translate(-50%,-50%) rotate(-1deg);width:min(220px,36%);padding:8px 11px;text-align:center;pointer-events:none;background:#f8e8bcf5;border:2px solid #3e4650;border-radius:10px 14px 8px 13px;box-shadow:2px 3px 0 #39494b44}
#enemy h2{font-size:17px;line-height:1.1;margin:5px 0 8px;color:#344154}#enemy .eyebrow{font-size:7px;letter-spacing:1px;color:#995441}
#hpText{display:block;font-size:10px;margin-top:4px;color:#3c4857;font-weight:800}
.seat{position:absolute;transform:translate(-50%,-50%);width:136px;padding:7px;border:2px solid #2b3a4b;border-top:5px solid var(--pc);border-radius:9px 13px 7px 12px;background:#f7e9cbed;color:#293d4c;box-shadow:2px 3px 0 #2c434d55;contain:layout style}
.seat.self{outline:3px solid #ffe393;outline-offset:2px}.seat.empty{background:#d2dfbcba;box-shadow:none;border-style:dashed;border-color:#476c586b;color:#4d7057}
.seat-top{display:flex;align-items:center;gap:7px}.avatar{display:grid;place-items:center;flex:none;width:28px;height:31px;border:1.5px solid #293b47;border-radius:6px 9px 5px 7px;background:var(--pc,#648faa);color:#fff6df;font-size:19px}
.seat strong{display:block;font-size:11px;max-width:83px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.seat small{display:block;font-size:9px;color:#566474;margin-top:2px}
.ready-button,.retry-button{width:100%;margin-top:6px;padding:4px;font-size:10px;background:#6ab09c;color:#163d39;box-shadow:0 1px 0 #293f4b}.ready-button.is-ready{background:#2b8074;color:#fff4cb}.retry-button{background:#edbd57}
.ready-mark{display:block;text-align:center;font-size:9px;margin-top:5px;color:#3e7867;font-weight:700}
.battle-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:8px 14px;min-height:33px;background:#354e62;border-top:3px solid #26374b;color:#f4e5c4;font-size:11px}
#status{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.clock{font-variant-numeric:tabular-nums;color:#ffcf68;white-space:nowrap;font-weight:900}
.panel{flex:none;border:var(--line);border-radius:11px 15px 9px 14px;padding:11px 16px;background:#f0dfb8;box-shadow:0 3px 0 #1e3446}
.panel h2{font-size:21px;margin:3px 0}.panel p{font-size:11px;margin:4px 0;color:#65707b}
.lobby-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;border-left:7px solid #e19153}
.form{display:grid;grid-template-columns:140px auto auto;gap:6px;align-items:center}.form label{grid-column:1/-1;font-size:10px;font-weight:700;margin-bottom:-3px}
input{min-width:0;width:100%;padding:8px 10px;border:2px solid #516674;border-radius:7px;background:#fff5da;color:#263b51;font-size:12px}
#joinCode{grid-column:1/3;font-size:11px;letter-spacing:2px}#solo{background:#8bbed0}#join{background:#a998c4}
.waiting-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;border-left:7px solid #64a998}
footer{display:flex;justify-content:space-between;flex:none;color:#c9dedc;font-size:8px;letter-spacing:1px}
#error{margin:0;flex:none;padding:7px 10px;border-radius:7px;background:#f3c6af;color:#663d3a;font-size:11px}
dialog{width:min(850px,94vw);max-height:94dvh;overflow:auto;padding:22px;border:3px solid #25364b;border-radius:17px 25px 16px 23px;background:var(--paper);color:var(--ink);box-shadow:5px 7px 0 #182d4766;text-align:center}
dialog:not([open]){display:none}dialog::backdrop{background:#183346bd}
dialog h2{font-size:29px;line-height:1.12;color:#294861;margin:9px 0}dialog p{font-size:12px;color:#5b6572}
#draw{background:radial-gradient(circle at 3px 3px,#e7c08338 1px,transparent 1.5px) 0 0/8px 8px,#f7e9c9;border-top:8px solid #559cc5}
#draw h2{display:inline-block;font-size:31px;transform:rotate(-1deg)}
#gameCards{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:15px 0}
.game-card{--card:#86b9cd;padding:10px 4px;border:2px solid #43526a;border-radius:7px 11px 6px 10px;background:var(--card);box-shadow:1px 2px 0 #36475733;transition:transform .08s,background .08s}
.game-card:nth-child(5n+2){--card:#edc56d}.game-card:nth-child(5n+3){--card:#e99f86}.game-card:nth-child(5n+4){--card:#b5a0cb}.game-card:nth-child(5n){--card:#94c3a6}
.game-card span{display:block;font-size:25px;margin-bottom:5px}.game-card b{font-size:10px;color:#283c50}
.game-card.selected{background:#ffe995;border:3px solid #b84e45;transform:translateY(-4px) rotate(-2deg);box-shadow:2px 4px 0 #b84e4566}
#assignments{min-height:30px;display:flex;justify-content:center;align-items:center}#assignments span{padding:6px 10px;background:#398780;color:#fff2d1;border:2px solid #2b4a59;border-radius:8px;font-size:12px;font-weight:800}
.draw-progress{margin:5px!important;font-size:10px!important;color:#52616e!important}
.draw-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:2px solid #82917c66;padding-top:9px;margin-top:8px;font-size:10px;font-weight:800}.draw-bottom strong{font-size:27px;color:#b45347}
#transition{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:12px;background:#264f507a;text-align:center;pointer-events:none}
#transition span{padding:6px 12px;background:#f7e6b8;border:2px solid #2a3b49;border-radius:9px 6px;font-size:12px;letter-spacing:1px;font-weight:900}
#transition strong{font:italic 1000 clamp(60px,12vh,120px)/1.05 Impact,"Arial Black",sans-serif;color:#ffcd62;-webkit-text-stroke:2px #344659;text-shadow:4px 4px 0 #aa5448}
#transition small{max-width:90%;padding:5px 10px;color:#fff3d3;background:#294454d9;border-radius:7px;font-size:11px}
#retryLoad{pointer-events:auto;margin-top:6px}.count-pop{animation:count-pop .7s ease-out}.go{color:#a3e2ca!important}
#banner{position:absolute;left:50%;top:6%;transform:translateX(-50%) rotate(-2deg);max-width:82%;border:2px solid #314456;border-radius:10px 16px 8px 13px;background:#ffedbceF;color:#2d4d5d;padding:7px 13px;box-shadow:2px 3px 0 #34475255;font-size:clamp(12px,1.5vw,18px);font-weight:900;text-align:center;pointer-events:none}
.game-layer{position:fixed;inset:6px;z-index:20;display:flex;flex-direction:column;visibility:hidden;pointer-events:none;overflow:hidden;border:3px solid #223c53;border-radius:13px;background:var(--paper)}
.game-layer.active{visibility:visible;pointer-events:auto;box-shadow:0 0 0 12px #304857}
.game-top{height:40px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 14px;background:#3b637b;border-bottom:3px solid #294054;color:#fff0cb;font-size:12px}
.game-top span{background:#efc267;border:2px solid #27394d;border-radius:6px;padding:2px 9px;font-size:17px;color:#27394d;font-weight:900;font-variant-numeric:tabular-nums}.game-top span.urgent{background:#e98e76;animation:pulse .8s infinite}
#gameFrame{flex:1;min-height:0;width:100%;border:0;background:#f5e9cd}
#gameWait{position:absolute;inset:40px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;text-align:center;background:radial-gradient(ellipse at center,#fff0bd,#d4e4d3)}
#gameWait strong{font:900 66px "Trebuchet MS",sans-serif;color:#3f849c}#gameWait b{font-size:22px;margin:12px;color:#9c504c}#gameWait p{font-size:14px;color:#405e64}
.report-title{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.report-title h2{font-size:25px;margin:0}
.report-next{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}#summaryReadyBtn{white-space:nowrap}.report-title span{font-size:11px;color:#766047;font-weight:900;font-variant-numeric:tabular-nums}
dialog#report{width:min(830px,94vw);max-height:82dvh;text-align:left;border-top:8px solid #db9064}
dialog#report[open]{display:flex;flex-direction:column;gap:12px}
.results-wrap{min-height:0;overflow:auto;scrollbar-width:thin;max-height:54dvh;border:2px solid #80928d;border-radius:8px}
table{width:100%;border-collapse:collapse;font-size:12px;background:#fcf0d4}th,td{text-align:left;padding:9px 11px;border-bottom:1px solid #aabbb399}th{font-size:9px;letter-spacing:.6px;text-transform:uppercase;background:#4b7888;color:#fff4d5}
tr:nth-child(even) td{background:#e8e6ce}tr:first-child td{background:#f0d58c;font-weight:900}td:last-child{font-weight:900;color:#a34f4a}
#reportNote{margin:0;font-size:11px}.ready-hint{margin:0;font-size:10px;text-align:right;color:#407665}
.era-break{width:min(660px,94vw);border-top:8px solid #9478b3;background:linear-gradient(145deg,#f7e2b1,#e0ddd0)}
.era-break p{max-width:520px;margin:8px auto 12px;line-height:1.5}
.era-troops{display:flex;justify-content:center;align-items:flex-end;gap:4px;min-height:87px;padding:8px 10px;margin:10px 0 12px;background:#c4d4b3;border:2px solid #536e68;border-bottom:5px solid #507b6f;border-radius:10px 15px 8px 12px;overflow:hidden}
.era-troops canvas{width:72px;height:78px;filter:drop-shadow(1px 3px 0 #45675755);animation:era-troop-in .7s cubic-bezier(.2,.8,.25,1) both}
.era-ready-list{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin:10px 0 14px}.era-ready-list span{font-size:11px;padding:5px 9px;background:#d3c5df;border:2px solid #6a6380;border-radius:8px}.era-ready-list span.is-ready{background:#8ac2af;border-color:#3e7b6b}
#eraReadyBtn{min-width:180px}#eraReadyHint{display:block;font-size:10px;margin-top:12px;color:#596c70}
#help{max-width:690px;text-align:left;border-top:8px solid #5c9e9c}#help button{display:block;margin:15px auto 0}#help p{font-size:13px}
#eraGuide{display:flex;flex-wrap:wrap;gap:6px}#eraGuide span{flex:1;min-width:85px;font-size:10px;text-align:center;border:2px solid #6b8491;background:#c3dae0;border-radius:8px;padding:7px}#eraGuide span:nth-child(even){background:#e5c4aa}#eraGuide canvas{display:block;width:60px;height:68px;margin:auto}
.knockout{position:absolute;z-index:3;left:50%;top:38%;display:flex;flex-direction:column;align-items:center;transform:translate(-50%,-50%) rotate(-7deg);pointer-events:none;animation:ko-enter .5s cubic-bezier(.16,.8,.3,1) both}
.knockout strong{font:italic 1000 clamp(78px,13vw,170px)/.95 Impact,"Arial Black",sans-serif;letter-spacing:-.045em;color:#f4c046;-webkit-text-stroke:3px #2e4054;text-shadow:4px 4px 0 #dd6c51,8px 8px 0 #293b4e}
.knockout span{padding:6px 11px;margin-top:16px;background:#e97d5a;border:2px solid #293b4e;border-radius:6px;color:#fff2cb;font-weight:900;letter-spacing:1px;font-size:clamp(9px,1.2vw,13px);white-space:nowrap}.knockout.team-defeat strong{color:#db92a6}
body.playing main{visibility:hidden}[hidden]{display:none!important}
@keyframes count-pop{0%{transform:scale(1.5);opacity:.3}28%{opacity:1}100%{transform:scale(1)}}
@keyframes pulse{50%{opacity:.7}}
@keyframes ko-enter{0%{opacity:0;transform:translate(-50%,-50%) rotate(-10deg) scale(1.45)}60%{opacity:1;transform:translate(-50%,-50%) rotate(-5deg) scale(.96)}100%{opacity:1;transform:translate(-50%,-50%) rotate(-7deg) scale(1)}}
@keyframes era-troop-in{0%{opacity:0;transform:translateY(45px) rotate(-5deg)}65%{opacity:1;transform:translateY(-5px) rotate(2deg)}100%{transform:translateY(0)}}
@media(max-width:760px){header{padding:5px 9px;gap:7px}.brand-lockup{gap:5px}.site-game{font-size:12px}header a{font-size:11px}header button{padding:4px 6px;font-size:10px}.header-actions{gap:4px}#roomInfo{gap:3px}main{padding:7px 7px 4px;gap:7px}.battle{border-radius:12px;min-height:175px}.battle-top{padding:7px;gap:7px}.badge{font-size:8px;padding:4px 6px}#era{font-size:7px;letter-spacing:.2px}#phase{display:none}#teamHealth{width:50%}#teamHealth>div:first-child{font-size:8px}#teamHealth b{letter-spacing:0}.seat{width:94px;padding:5px;border-top-width:4px}.seat strong{font-size:9px;max-width:55px}.seat small{font-size:7px}.seat-top{gap:4px}.avatar{width:20px;height:23px;font-size:13px}.ready-button,.retry-button{font-size:9px;padding:4px;margin-top:4px}.ready-mark{font-size:8px}#enemy{width:37%;padding:6px;top:63%}#enemy h2{font-size:13px;margin:4px 0}#enemy .eyebrow{font-size:6px}#hpText{font-size:8px}.battle-foot{padding:6px;font-size:9px;min-height:29px}.panel{padding:8px 9px}.lobby-panel>div:first-child{display:none}.form{width:100%;grid-template-columns:1fr auto auto;gap:5px}button,input{font-size:11px;padding:7px}.waiting-panel{font-size:10px}.panel p{font-size:9px}footer span:last-child{display:none}dialog{padding:14px;max-height:96dvh}dialog h2,#draw h2{font-size:24px}#gameCards{grid-template-columns:repeat(3,1fr);gap:5px;margin:10px 0}.game-card{padding:6px 3px}.game-card span{font-size:20px;margin-bottom:3px}.game-card b{font-size:9px}.draw-progress{font-size:9px!important}.draw-bottom{padding-top:7px;margin-top:5px;font-size:9px}#assignments span{font-size:10px}.game-layer{inset:2px}.game-top{padding:5px 8px;font-size:10px}.game-top span{font-size:14px}.report-title h2{font-size:20px}.report-next{gap:6px}.report-title span{font-size:9px}dialog#report{padding:13px 10px}th,td{padding:6px 5px;font-size:9px}th{font-size:8px}.era-troops canvas{width:55px;height:60px}.era-troops{min-height:70px}.era-ready-list span{font-size:10px;padding:4px 7px}.ready-hint{font-size:9px}}
@media(max-width:550px){header{display:grid;grid-template-columns:1fr;gap:5px;padding:6px 9px}.brand-lockup{justify-content:center}.site-game{font-size:13px}.header-actions{justify-content:center;width:100%;margin:0}#leave{font-size:10px}#transition span{font-size:10px}#transition small{font-size:10px}}
@media(max-height:590px){header{min-height:32px}main{padding-top:5px;gap:5px}footer{display:none}.battle-top{padding:4px 8px}.panel{padding:6px 10px}.lobby-panel>div:first-child{display:none}.form{width:100%;grid-template-columns:1fr auto auto 1fr auto}.form label{display:none}#joinCode{grid-column:auto}#gameCards{grid-template-columns:repeat(5,1fr)}.game-card{padding:4px}.game-card span{font-size:18px}#transition strong{font-size:60px}dialog{padding:12px}.seat{padding:4px}.avatar{height:23px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* V8: rules before GO, central clock kept outside the playing surface. */
#draw>.eyebrow{display:block;margin-bottom:8px}
.rules-cloud{position:relative;flex-shrink:1;width:min(560px,92%);padding:15px 24px 20px;background:#fff5d9;border:3px solid #344659;border-radius:44% 38% 42% 35% / 26% 32% 28% 34%;box-shadow:4px 5px 0 #243d5255;color:#2e4255}
.rules-cloud::after{content:"";position:absolute;bottom:-10px;left:62%;width:18px;height:16px;border:2px solid #344659;border-radius:50%;background:#fff5d9}
.rules-cloud b{display:block;font-size:clamp(14px,2vw,20px)}
.rules-cloud p{font-size:clamp(12px,1.6vw,16px);line-height:1.35;margin:6px 0}
.rules-cloud em{font-size:clamp(12px,1.5vw,15px);font-weight:900;color:#a44738}
.game-top{height:58px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding:4px 12px}
#gameTitle{font-size:12px;overflow:hidden;text-overflow:ellipsis;max-height:44px}
#gameTime{grid-column:2;min-width:104px;text-align:center;font-size:30px;padding:2px 14px;box-shadow:2px 3px 0 #233b4c}
#gameWait{top:58px}
@media(max-width:500px){#gameTime{min-width:84px;font-size:26px}#gameTitle{font-size:10px}.rules-cloud{padding:12px 16px 16px}}
@media(max-height:590px){.rules-cloud{padding:8px 18px 12px}.rules-cloud p{margin:3px 0}#transition{gap:4px}#transitionCount{font-size:48px}}

/* V8: one set of illustrated emblems, shared across every challenge. */
#gameCards .game-emblem{display:inline-grid;width:56px;height:56px;margin:0 auto 5px;font-size:inherit}
#gameCards .game-emblem .comic-art{width:48px;height:48px}
#gameTitle{display:flex;align-items:center;gap:8px}#gameTitle .comic-art{width:34px;height:34px}
#gameMode{justify-self:end;font-size:12px;text-align:right;font-weight:800}
#results .comic-art{width:25px;height:25px;margin-right:4px}
#rulesCloud #rulesMode{display:block;margin:0 auto 7px;max-width:100%;padding:4px 10px;background:#e8d9b0;color:#344859;font-size:11px;font-weight:900;letter-spacing:.06em}
#rulesCloud #rulesMode.individual,#drawMode.individual{background:#f5d4ba;color:#842f29;border:2px solid #9b574b;border-radius:8px;padding:5px 10px}
#assignments{max-height:100px;overflow:auto}.individual-note{display:inline-block;background:#fff0dc;color:#384b60;border:1px solid #bd9980;padding:4px 7px;margin:3px;border-radius:7px;font-size:11px}
@media(max-width:550px){#gameCards .game-emblem{width:40px;height:40px}#gameCards .game-emblem .comic-art{width:34px;height:34px}#gameTitle .comic-art{width:25px;height:25px}#gameMode{font-size:10px}}
@media(max-height:590px){#gameCards .game-emblem{width:34px;height:34px;margin-bottom:2px}#gameCards .game-emblem .comic-art{width:29px;height:29px}}

/* V9: team progress, illustrated rescue and small achievement ribbons. */
.team-progress{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);display:flex;gap:5px;justify-content:center;max-width:96%;flex-wrap:wrap;pointer-events:none;z-index:6}.team-progress span{font:700 11px system-ui;color:#314657;background:#fff0cb;border:2px solid #314657;border-radius:12px;padding:3px 7px;box-shadow:0 2px #314657}.team-progress span.done{background:#b9e4c2}.game-layer iframe{height:calc(100% - 54px);padding-bottom:27px;box-sizing:border-box}.medals{display:flex;flex-wrap:wrap;gap:3px;margin-top:4px}.medal{background:#ffdc8e;color:#513c28;border:1px solid #b59059;border-radius:8px;padding:2px 5px;font:750 10px system-ui}.rescue-panel{width:min(690px,94vw);max-height:94dvh;overflow:auto;text-align:center;background:#fff0d0;color:#294256;border:5px solid #294256;border-radius:36px 22px 34px 27px;box-shadow:8px 9px 0 #243d52,0 18px 50px #102c43aa;padding:20px 24px}.rescue-panel h2{font:900 clamp(23px,4vw,34px) Georgia;margin:8px 0}.rescue-panel p{line-height:1.5}.rescue-clock{display:inline-block;min-width:68px;font:900 35px system-ui;color:#ac5333}.rescue-recipe{display:flex;justify-content:center;gap:12px;margin:15px auto;min-height:85px}.recipe-cell{display:grid;place-items:center;width:80px;height:80px;border:3px solid #34576b;border-radius:18px;background:#dcebe0;font:900 36px Georgia;box-shadow:0 4px #34576b}.recipe-cell .comic-art{width:67px;height:67px}.recipe-cell.empty{background:#faf6de;color:#5d6c72}.rescue-choices{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.rescue-choices button{background:#f7d898;color:#294256;padding:7px 3px;border:3px solid #294256;display:flex;align-items:center;flex-direction:column;gap:3px;border-radius:15px;touch-action:manipulation}.rescue-choices .comic-art{width:49px;height:49px}.rescue-choices span{font:bold 12px system-ui}.rescue-choices button:disabled{opacity:.5}.rescue-recipe>.comic-art{height:110px;width:110px}.rescue-panel.revived .rescue-recipe{animation:potion-pop .55s ease-out}.rescue-panel.revived{background:#ddf0c8}@keyframes potion-pop{0%{transform:scale(.5) rotate(-10deg)}70%{transform:scale(1.15) rotate(5deg)}100%{transform:scale(1)}}@media(max-width:600px){.rescue-panel{padding:14px 10px}.rescue-choices{grid-template-columns:repeat(3,1fr)}.recipe-cell{width:60px;height:65px}.recipe-cell .comic-art{width:54px;height:54px}.team-progress span{font-size:9px;padding:2px 5px}.team-progress{gap:3px}.game-layer iframe{padding-bottom:40px}#gameCards{grid-template-columns:repeat(4,1fr)}.game-card{padding:7px 4px}.game-card .game-emblem{width:40px;height:40px}.game-card b{font-size:11px}}@media(prefers-reduced-motion:reduce){.rescue-panel.revived .rescue-recipe{animation:none}}

.victory-panel{position:relative;width:min(790px,94vw);max-height:94dvh;padding:0!important;overflow:auto;background:#294960;color:#fff0d0;border:5px solid #263d50;border-radius:30px;box-shadow:7px 8px #172d43}.victory-panel::backdrop{background:#172d43bf}#victorySky{display:block;width:100%;height:clamp(150px,32vh,280px)}.victory-message{position:relative;padding:5px 24px 24px;text-align:center}.victory-message h2{font:900 clamp(25px,4vw,39px) Georgia;color:#ffe4a1;margin:4px 0 9px}.victory-message p{color:#e3efdd;line-height:1.5}.victory-message .eyebrow{color:#a9e3c0}.victory-message strong{display:block;color:#ffdc91}.victory-message button{margin-top:6px}.victory-message #victoryDetails{font-size:12px}@media(max-height:650px){#victorySky{height:145px}.victory-message{padding-bottom:14px}.victory-message h2{font-size:27px}.victory-message p{margin:7px 0}}

/* The 21 illustrated challenges fit in three rows on a desktop. */
@media(min-width:761px){#draw{width:min(1000px,94vw)}#gameCards{grid-template-columns:repeat(7,1fr)}.game-card .game-emblem{width:50px;height:50px}.game-card{padding:8px 4px}.game-card b{line-height:1.15;display:block;min-height:24px}}
@media(max-width:760px) and (min-width:500px){#gameCards{grid-template-columns:repeat(5,1fr)}.game-card .game-emblem{width:38px;height:38px}}
@media(max-height:590px) and (min-width:761px){#gameCards{margin:8px 0;gap:6px}.game-card .game-emblem{width:34px;height:34px}.game-card{padding:4px}.game-card b{font-size:9px;min-height:20px}}
.game-card.selected{border-width:2px;outline:2px solid #b84e45;outline-offset:1px}
.game-card.landed{background:#ffe995;outline:3px solid #986030;animation:draw-land .38s ease-out both}
@keyframes draw-land{0%{transform:translateY(-4px) scale(1)}55%{transform:translateY(-4px) scale(1.06)}100%{transform:translateY(-4px) scale(1.02)}}
@media(prefers-reduced-motion:reduce){.game-card.landed{animation:none;transform:none}}

/* V12: the village bard, a generous lesson and legible team results. */
@font-face{font-family:Village;src:url('fonts/BalsamiqSans-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Village;src:url('fonts/BalsamiqSans-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
.team-heart{display:inline-block;color:#f15d63;font-size:18px;line-height:.8;vertical-align:-2px;margin-right:4px;text-shadow:0 1px 0 #772d39}
#teamHealth{position:relative;transform-origin:center}.team-impact{position:absolute;top:100%;left:50%;z-index:10;white-space:nowrap;transform:translateX(-50%);padding:5px 12px;border:3px solid #5a3440;border-radius:12px;background:#ffe3cc;color:#9b303b;font:700 24px Village,system-ui;box-shadow:2px 3px #283c4b55;pointer-events:none}.team-impact.is-heal{background:#d9f0bd;border-color:#427155;color:#25613a}
#effects{position:absolute;inset:0;width:100%;height:100%;z-index:9;pointer-events:none}
#enemy{z-index:6}
#seats{position:absolute;inset:0;z-index:4}
#transition{z-index:15}#banner,#knockout{z-index:12}.countdown-meta{display:flex;flex-direction:column;align-items:center;gap:10px}
/* The lesson pops over the village; only the bubble carries the instructions. */
#transition.is-lesson{padding:18px 24px;background:transparent;gap:18px;overflow:visible}
.rules-layout{display:flex;align-items:center;justify-content:center;width:min(860px,90%);height:auto;min-height:0;gap:20px;isolation:isolate}
.rules-layout .rules-cloud{flex:1 1 410px;width:auto;min-width:0;padding:24px 28px 22px;border-radius:35% 28% 32% 26% / 18% 24% 20% 26%;box-sizing:border-box;box-shadow:5px 7px 0 #243d5244}
.rules-layout .rules-cloud::after{display:block;bottom:-15px;left:65%;width:19px;height:17px;transform:rotate(-18deg);box-shadow:8px 17px 0 -4px #fff5d9,8px 17px 0 -2px #344659}
.rules-cloud b{font:700 clamp(22px,2.4vw,29px)/1.1 Village,system-ui}
#rulesCloud #rulesMode{display:inline-block;font-size:10px;margin:0 0 9px;padding:3px 8px;border-radius:6px;max-width:100%;background:#d7e7c2;color:#304650}
#rulesCloud #rulesMode.individual{background:#efd2a6;color:#794327}
#rulesCloud #demoCaption{margin:12px 0 0;font:700 clamp(19px,2.1vw,24px)/1.3 Village,system-ui;max-width:100%}
#rulesVoiceToggle{position:absolute;right:0;bottom:-15px;box-shadow:2px 3px #243d5233}
.rules-demo{flex:0 1 385px;width:45%;min-width:0;margin:0;border:3px solid #344659;border-radius:16px 21px 15px 19px;overflow:hidden;background:#fff2d2;color:#304650;box-shadow:5px 7px 0 #243d5255;transform:rotate(1deg)}
.rules-demo canvas{display:block;width:100%;height:auto;object-fit:contain;background:#afc89b;aspect-ratio:2/1}
.demo-label{display:block;padding:6px 10px;border-bottom:2px solid #344659;font:700 13px Village,system-ui;letter-spacing:1px;background:#f4ca6b}
#transition.is-lesson .rules-cloud{animation:lesson-pop .4s cubic-bezier(.16,.9,.32,1.2) both}
#transition.is-lesson .rules-demo{animation:lesson-preview .45s .08s cubic-bezier(.16,.9,.32,1.1) both}
#transition.is-lesson .countdown-meta{position:static;width:auto;height:82px;justify-content:center;pointer-events:none}
#transition.is-lesson #transitionLabel,#transition.is-lesson #transitionHint{display:none}
#transition.is-lesson #transitionCount{font-size:82px;line-height:1;text-shadow:3px 4px #aa5448;-webkit-text-stroke:2px #344659}
#transition.is-lesson #transitionCount.go{font-size:70px}
@keyframes lesson-pop{from{opacity:0;transform:translateY(14px) scale(.87)}70%{opacity:1;transform:translateY(-3px) scale(1.025)}to{opacity:1;transform:none}}
@keyframes lesson-preview{from{opacity:0;transform:translateY(12px) rotate(3deg) scale(.94)}to{opacity:1;transform:rotate(1deg)}}
.voice-toggle{display:inline-grid;place-items:center;flex:none;padding:5px!important;min-width:35px;min-height:32px;background:#b1d5ba!important;color:#304b50!important;pointer-events:auto}
.voice-toggle svg{display:block;width:24px;height:24px;fill:currentColor;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.voice-toggle.is-muted{background:#e9d5b1!important}.voice-toggle.needs-gesture{outline:3px solid #efa355}.voice-toggle:disabled{opacity:.5;cursor:default}#rulesVoiceToggle{width:46px;height:44px}
.report-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}.report-stat{border:2px solid;border-radius:12px;padding:10px 13px}.report-stat>div{display:flex;align-items:center;gap:7px;font-weight:800}.report-stat strong{margin-left:auto;font-size:23px;white-space:nowrap}.report-stat p{font-size:14px;line-height:1.4;margin:7px 0 0}.report-heal{background:#e0f0cf;color:#2e5f42;border-color:#73a47a}.report-heal>div>span{color:#389057;font-size:23px}.report-damage{background:#f8ddd1;color:#853d3e;border-color:#c88279}.report-damage.no-damage{background:#eee7d3;color:#516455;border-color:#b2baa2}
dialog#report{width:min(1050px,95vw);max-height:94dvh}#report .results-wrap{max-height:58dvh}.report-title h2{font-family:Village,system-ui;font-size:30px}.report-title span{font-size:14px}.report-next button{font-size:15px;padding:8px 15px}
#results{font-size:17px}#report th{font-size:13px}#report td{padding:9px 13px}#report td:nth-child(2){font-size:16px}#results .comic-art{width:32px;height:32px}#reportNote,.ready-hint{font-size:13px;line-height:1.4}.result-name{display:flex;align-items:center;gap:7px}.result-name b{overflow-wrap:anywhere}.medal{font-size:12px;padding:3px 6px}
.ready-icon{display:inline-grid;place-items:center;width:20px;height:20px;border:1.5px solid #a39272;border-radius:50%;font:800 14px system-ui;background:#ece1c5;color:#705e43;vertical-align:middle;flex:none}.ready-icon.ready{background:#bce0b5;border-color:#4e8860;color:#245335}.ready-icon.away{color:#87423c;background:#f5d7c5}.seat .ready-icon{position:absolute;right:5px;top:5px;width:16px;height:16px;font-size:12px}.seat{width:158px}.seat strong{font-size:16px;max-width:98px;padding-right:5px}.seat small{font-size:11px}.seat-top>div{min-width:0}.ready-mark{font-size:11px}.ready-button,.retry-button{font-size:13px}
.guide-bubble{position:fixed;z-index:30;display:flex;gap:10px;width:min(355px,calc(100vw - 16px));padding:15px;background:#fff2ca;color:#304858;border:3px solid #304858;border-radius:24px 28px 20px 30px;box-shadow:5px 6px #142b4666;box-sizing:border-box}.guide-bubble::before{content:"";position:absolute;top:-10px;left:var(--guide-arrow,50%);width:14px;height:14px;background:#fff2ca;border-left:3px solid #304858;border-top:3px solid #304858;transform:translateX(-50%) rotate(45deg)}.guide-bubble.above::before{top:auto;bottom:-10px;transform:translateX(-50%) rotate(225deg)}#guideMascot{flex:none;width:60px;align-self:center}#guideMascot svg{width:60px;height:68px}.guide-bubble b{font:700 21px Village,system-ui}.guide-bubble p{font:400 17px/1.3 Village,system-ui;margin:5px 0 10px}.guide-bubble button{font-size:11px;padding:5px 8px}.gaul-attention{outline:4px solid #f8d875!important;outline-offset:4px;animation:gaul-wink 1.2s ease-in-out infinite!important;position:relative}
@keyframes gaul-wink{0%,100%{outline-color:#f8d875;box-shadow:0 0 0 7px #f8d87522}50%{outline-color:#ef9553;box-shadow:0 0 0 9px #efa35a44}}
@media(max-width:760px){.seat{width:113px}.seat strong{font-size:13px;max-width:70px;padding-right:8px}.seat small{font-size:10px}.ready-button,.retry-button{font-size:11px}.ready-mark{font-size:10px}.seat .ready-icon{width:13px;height:13px;font-size:10px;right:3px;top:3px}#report td{padding:8px 7px;font-size:14px}#report td:nth-child(2){font-size:14px}#report th{font-size:11px}#results .comic-art{width:24px;height:24px}.report-title h2{font-size:25px}.report-stat{padding:9px}.report-stat>div{flex-wrap:wrap;font-size:13px}.report-stat strong{font-size:20px}.report-stat p{font-size:13px}.medal{font-size:10px}.report-stats{gap:8px}.voice-toggle svg{width:21px;height:21px}.voice-toggle{min-height:27px;min-width:29px}}
@media(max-width:480px){.report-stats{grid-template-columns:1fr}.report-stat p{margin-top:4px}.report-title h2{font-size:23px}#results .comic-art{display:none}#report td,#report td:nth-child(2){font-size:13px;padding:7px 4px}#report th{font-size:10px}.result-name{gap:4px}.seat{width:105px}.seat strong{font-size:12px}.seat small{font-size:9px}.team-progress span{font-size:11px}}
@media(max-height:590px){.guide-bubble{padding:10px}.guide-bubble p{font-size:15px}.report-stat p{font-size:12px}dialog#report[open]{gap:8px}#report td{padding-top:7px;padding-bottom:7px}}
@media(prefers-reduced-motion:reduce){.gaul-attention{animation:none!important}}

@media(max-width:760px){#transition.is-lesson{gap:12px;padding:14px 12px}.rules-layout{width:min(560px,94%);flex-direction:column;gap:18px}.rules-layout .rules-cloud{flex:none;width:100%;padding:17px 24px 19px}.rules-demo{flex:none;width:min(350px,87%)}#rulesCloud #demoCaption{font-size:20px;margin-top:8px}.rules-cloud b{font-size:24px}#rulesCloud #rulesMode{font-size:9px;margin-bottom:6px}#transition.is-lesson .countdown-meta{height:66px}#transition.is-lesson #transitionCount{font-size:66px}#transition.is-lesson #transitionCount.go{font-size:58px}}
@media(max-height:650px) and (min-width:600px){#transition.is-lesson{padding:12px 20px;gap:8px}.rules-layout{flex-direction:row;width:min(820px,96%);gap:18px}.rules-layout .rules-cloud{flex:1 1 390px;width:auto;padding:17px 22px}.rules-demo{flex:0 1 350px;width:44%}#rulesCloud #demoCaption{font-size:20px;margin-top:7px}.rules-cloud b{font-size:24px}#transition.is-lesson .countdown-meta{height:58px}#transition.is-lesson #transitionCount{font-size:58px}#transition.is-lesson #transitionCount.go{font-size:50px}#rulesVoiceToggle{width:36px;height:34px}}
@media(max-height:440px){#transition.is-lesson{padding:4px 12px;gap:3px}.rules-layout{gap:16px}.rules-layout .rules-cloud{padding:12px 20px}.rules-cloud b{font-size:21px}#rulesCloud #demoCaption{font-size:18px;margin-top:6px}#rulesCloud #rulesMode{font-size:8px;margin-bottom:3px}.rules-demo{flex-basis:270px}.demo-label{font-size:10px;padding:4px}#transition.is-lesson .countdown-meta{height:42px}#transition.is-lesson #transitionCount{font-size:42px}#transition.is-lesson #transitionCount.go{font-size:36px}}
@media(prefers-reduced-motion:reduce){#transition.is-lesson .rules-cloud,#transition.is-lesson .rules-demo{animation:none}}

.lesson-visible #enemy{visibility:hidden}

/* Static camp ornaments. Empty slots have no camp; controls retain their area. */
.seat.has-camp::before,.seat.has-camp::after{content:"";position:absolute;pointer-events:none;background-repeat:no-repeat;background-position:center;background-size:100% 100%;z-index:-1}
.seat.has-camp::before{left:-29px;right:-29px;top:-43px;height:52px;background-image:url("player-camp-roof.svg?v=17.35")}
.seat.has-camp::after{left:-21px;right:-21px;bottom:-26px;height:29px;background-image:url("player-camp-fence.svg?v=17.35")}
.seat.has-camp.camp-north::before{height:34px;top:-26px}
@media(max-width:760px){.seat.has-camp::before{left:-19px;right:-19px;height:39px;top:-33px}.seat.has-camp::after{left:-14px;right:-14px;height:23px;bottom:-21px}.seat.has-camp.camp-north::before{height:26px;top:-22px}}
@media(max-height:480px){.seat.has-camp::before{height:27px;top:-23px}.seat.has-camp::after{height:16px;bottom:-15px}.seat.has-camp.camp-north::before{height:18px;top:-15px}}
/* The board is an interface, not a text field: prevent accidental selection
   while preserving copy/paste for the nickname, code and audio controls. */
body{user-select:none;-webkit-user-select:none}.arena-shell input,.arena-shell textarea,.arena-shell select,.arena-shell [contenteditable=true],dialog input,dialog textarea,dialog select{user-select:text;-webkit-user-select:text}
#drawProgress{display:none!important}.report-title span:empty{display:none}
.lobby-panel{padding:8px 12px;min-height:0;background:#f2dfb7e8}.battle{min-height:0}
.ready-icon{display:inline-flex;align-items:center;justify-content:center;min-width:1.2em;color:#b56737;font-weight:900}.ready-icon.ready{color:#2d8659}
.report-actionbar{min-height:58px}.report-actionbar #summaryReadyBtn{order:0;flex:1 1 auto}.report-actionbar #reportClock:empty{display:none}
.battle #enemy.boss{border-color:#a94e3f;background:#f8d39f;box-shadow:0 0 0 4px #d07b4c55,3px 5px 0 #39494b55;animation:boss-pulse 1.9s ease-in-out infinite}.battle #enemy.boss h2{font-size:20px;color:#8d3f35}.battle #enemy.boss .eyebrow{color:#9f342d;font-weight:1000}.battle #enemy.boss .enemy-hp{height:16px;box-shadow:0 0 0 2px #8c403866}.team-health-hit{animation:team-hit .42s ease-out}.damage-pop{animation:damage-pop .55s cubic-bezier(.2,.8,.3,1)}
@keyframes boss-pulse{0%,100%{filter:saturate(1)}50%{filter:saturate(1.25) brightness(1.04)}}@keyframes team-hit{0%{transform:translateX(0)}25%{transform:translateX(-5px)}50%{transform:translateX(5px)}75%{transform:translateX(-3px)}100%{transform:translateX(0)}}@keyframes damage-pop{0%{transform:scale(.88);opacity:.3}45%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:1}}
.rescue-panel #rescueReadyBtn{display:block;width:min(360px,100%);margin:12px auto 8px;font-size:20px}.rescue-panel #rescueReadyBtn.is-ready{background:#93cda3;color:#204b3c}.rescue-panel #rescueReadyBtn[hidden]{display:none}

/* V17.5: compact controls, persistent toolbar, manual ready screens. */
header{position:relative;z-index:100}.game-layer{inset:calc(var(--header-h,47px) + 5px) 6px 6px}.game-layer.active{box-shadow:0 0 0 5px #304857}
#workflowShade{position:fixed;inset:var(--header-h,47px) 0 0;z-index:70;background:#183346ac}#workflowShade[hidden]{display:none}
dialog.workflow-panel{position:fixed;inset:auto;top:calc(50% + var(--header-h,47px)/2);left:50%;transform:translate(-50%,-50%);margin:0;z-index:80;max-height:calc(100dvh - var(--header-h,47px) - 20px)}
.lobby-panel>div:first-child{display:none}.lobby-panel .form{width:100%;grid-template-columns:minmax(195px,1.7fr) minmax(110px,1fr) auto auto minmax(105px,.8fr) auto;gap:8px}.lobby-panel label,.lobby-panel #modeHint{display:none}.lobby-panel #partyMode{grid-column:1}.lobby-panel #joinCode{grid-column:5}.lobby-panel input,.lobby-panel select{height:38px}.lobby-panel{padding:8px 12px}
#help #eraGuide{display:none}#help{width:min(650px,94vw)}#help p{font:400 21px/1.5 Village,system-ui}#help h2{font-family:Village,system-ui}
#rulesReadyBtn{pointer-events:auto;min-height:50px;padding:10px 28px;font:700 23px Village,system-ui;box-shadow:0 4px #273b4b}#rulesReadyBtn[hidden],#rulesReadyList[hidden]{display:none!important}
.rules-ready-list{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;max-width:100%;pointer-events:none}#transition .rules-ready-list span{padding:4px 9px;font:700 14px Village,system-ui;letter-spacing:0;background:#f1deb3}.rules-ready-list .is-ready{background:#bfdfa5!important;color:#245940}
#transition.is-lesson .countdown-meta{height:auto;min-height:50px;gap:9px}#transition.is-lesson #transitionHint{display:block;background:transparent;color:#294454;font:700 14px Village,system-ui}#transition.is-lesson #transitionLabel{display:none}
.campaign-recap{padding:10px 12px;border:2px solid #74957d;border-radius:12px;background:#dfebc9}.campaign-recap h3{font:700 24px Village,system-ui;margin:0 0 8px}.campaign-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.campaign-grid>span{padding:6px;background:#fff0d1;border-radius:8px;font-size:12px}.campaign-grid strong,.campaign-grid b{display:block;font:700 21px Village,system-ui}
.team-health-hit{animation:team-hit .42s ease-out}.damage-pop{animation:damage-flash .5s ease-out}@keyframes damage-flash{0%{filter:brightness(1.8)}100%{filter:brightness(1)}}
input,textarea,[contenteditable=true]{user-select:text;-webkit-user-select:text}
@media(max-width:900px){.lobby-panel .form{grid-template-columns:minmax(150px,1.3fr) minmax(100px,1fr) auto}.lobby-panel #partyMode{grid-column:1}.lobby-panel #nickname{grid-column:2}.lobby-panel #create{grid-column:3}.lobby-panel #solo{grid-column:1}.lobby-panel #joinCode{grid-column:2}.lobby-panel #join{grid-column:3}.campaign-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-height:600px){#rulesReadyBtn{font-size:18px;min-height:38px;padding:6px 18px}.rules-ready-list{gap:3px}#transition .rules-ready-list span{font-size:11px;padding:2px 5px}#transition.is-lesson #transitionHint{font-size:11px}.rules-layout .rules-cloud{padding:13px 22px}}
@media(prefers-reduced-motion:reduce){.battle #enemy.boss,.team-health-hit,.damage-pop{animation:none}}

#report th{color:#304858;background:#dfc992}
.ready-icon .comic-art,#transition .rules-ready-list .comic-art{display:inline-block;width:18px;height:18px;vertical-align:middle;flex:none}.seat .ready-icon .comic-art{width:14px;height:14px}
/* Original gilt elite frame and a compact, numbered round guide. */
.battle #enemy.boss h2{position:relative;margin:9px 1px 8px;padding:9px 15px;border:5px double #e5bc68;border-radius:12px 12px 17px 17px;background:linear-gradient(#3d5962,#273e4d);box-shadow:0 3px #533e26,inset 0 0 0 2px #755b34;color:#fff0c5;font:700 23px/1.12 Village,system-ui;text-shadow:0 2px #142934}
.battle #enemy.boss h2::before,.battle #enemy.boss h2::after{content:"";position:absolute;top:50%;width:32px;height:68px;transform:translateY(-50%);background:url('elite-ornament.svg?v=17.35') center/contain no-repeat;pointer-events:none}.battle #enemy.boss h2::before{left:-25px}.battle #enemy.boss h2::after{right:-25px;transform:translateY(-50%) scaleX(-1)}
#rulesCloud .perfect-tip{font:400 14px/1.3 Village,system-ui;margin:10px 0 0;padding:8px 10px;border:2px solid #bd9450;border-radius:10px;background:#f9df9e;color:#5b472b}#rulesCloud .perfect-tip b{font:700 14px Village,system-ui}
#help .help-steps{list-style:none;counter-reset:steps;padding:0;margin:15px 0;display:grid;gap:12px}#help .help-steps li{position:relative;padding:1px 0 1px 46px;counter-increment:steps}#help .help-steps li::before{content:counter(steps);position:absolute;left:0;top:1px;display:grid;place-items:center;width:32px;height:32px;border:2px solid #405862;border-radius:50%;background:#e6b764;color:#304650;font:700 21px Village,system-ui}#help .help-steps b{display:block;font:700 23px Village,system-ui}#help .help-steps span{display:block;font:400 18px/1.3 Village,system-ui;margin-top:3px}#help .help-versus{font:400 15px/1.35 Village,system-ui;border-top:1px solid #a08c68;padding-top:9px}
@media(max-height:650px){#rulesCloud .perfect-tip{font-size:12px;padding:5px 8px;margin-top:6px}#rulesCloud .perfect-tip b{font-size:12px}#help .help-steps{gap:8px}#help .help-steps b{font-size:20px}#help .help-steps span{font-size:16px}}
.victory-panel{width:min(860px,94vw);border:4px solid #e0b262;border-radius:26px;background:#304e53;box-shadow:0 0 0 4px #223c48,9px 12px 0 #162e46aa}.victory-hero{position:relative;border-bottom:3px solid #c8a965;background:#26475b}.victory-hero #victorySky{height:clamp(145px,25vh,220px)}.victory-crest{position:absolute;left:50%;bottom:13px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:5px;pointer-events:none}.victory-crest #victoryWarrior{display:grid;place-items:center;width:89px;height:89px;border:5px double #f1cd7e;border-radius:50%;background:#476b70;box-shadow:0 4px #152d39,0 0 0 9px #c49a4a33}.victory-crest .comic-art{width:77px;height:77px}.victory-crest>b{white-space:nowrap;padding:5px 18px;border:2px solid #503e2a;border-radius:5px;background:#f0c06d;color:#304650;font:700 15px Village,system-ui;box-shadow:0 3px #192f3d}
.victory-message{padding:14px 26px 21px}.victory-message .eyebrow{font-size:11px;letter-spacing:1.6px;color:#bddfcb}.victory-message h2{font:700 clamp(27px,3.5vw,41px)/1.04 Village,system-ui;margin:9px 0 12px;color:#ffdf8c;text-shadow:2px 3px #1d3442}.victory-message .victory-story{font:400 19px/1.3 Village,system-ui;margin:8px 0 13px;color:#f3edcf}.victory-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px auto;max-width:640px}.victory-stats>div{padding:8px 5px;background:#203d48;border:1px solid #9b9f7d;border-radius:12px}.victory-stats b{display:block;color:#f4d084;font:700 29px/1.1 Village,system-ui}.victory-stats small{display:block;color:#d3e2d3;font-size:12px;margin-top:3px}.victory-message #victoryNames{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin:14px 0 6px}.victory-message #victoryNames span{display:block;padding:4px 13px;border:1px solid #c7b371;border-radius:20px;background:#47645f;color:#fff0bf;font:700 18px Village,system-ui}.victory-message #victoryDetails{font-size:12px;margin:4px 0;color:#c0d5ca}.victory-message .victory-toast{font:700 20px/1.2 Village,system-ui;color:#f6d886;margin:12px 0 8px}.victory-message button{font:700 20px Village,system-ui;padding:10px 23px;background:#e9b961;color:#273f50;border-color:#182e3b;box-shadow:0 4px #172d3d}
@media(max-height:760px){.victory-hero #victorySky{height:140px}.victory-crest #victoryWarrior{width:70px;height:70px}.victory-crest .comic-art{width:62px;height:62px}.victory-message{padding:10px 22px 15px}.victory-message h2{font-size:29px;margin:6px 0}.victory-message .victory-story{font-size:17px;margin:6px 0}.victory-stats{margin:8px auto}.victory-stats b{font-size:24px}.victory-message .victory-toast{font-size:18px;margin:8px 0}.victory-message #victoryNames{margin-top:8px}}
@media(max-width:600px){.victory-message{padding:12px}.victory-message h2{font-size:29px}.victory-stats{gap:5px}.victory-stats small{font-size:10px}.victory-stats b{font-size:23px}.victory-message #victoryNames span{font-size:16px}.battle #enemy.boss h2{font-size:18px;padding:7px 5px}.battle #enemy.boss h2::before,.battle #enemy.boss h2::after{width:25px;height:55px}.battle #enemy.boss h2::before{left:-20px}.battle #enemy.boss h2::after{right:-20px}}

#rulesCloud .perfect-tip b{display:inline}#gameWait.fallen-tower>b{color:#ffc691}
.battle #enemy.boss #enemyType .boss-label{display:block;font:italic 900 clamp(23px,3vw,32px)/1 Impact,"Arial Black",sans-serif;letter-spacing:.08em;color:#9a332c;text-shadow:1px 2px #f7e1a5}
.battle #enemy.boss #enemyType>span{display:block;font:700 10px/1.4 Village,system-ui;letter-spacing:.14em;margin:3px 0}
.finish-burst{position:fixed;z-index:110;left:50%;top:49%;transform:translate(-50%,-50%) rotate(-5deg);display:flex;align-items:center;flex-direction:column;gap:8px;width:max-content;max-width:94vw;pointer-events:none;text-align:center}
.finish-burst[hidden]{display:none!important}.finish-burst>strong{font:italic 1000 clamp(78px,15vw,160px)/1 Impact,"Arial Black",sans-serif;color:#ffcf59;-webkit-text-stroke:3px #2d4352;text-shadow:4px 5px #d66e4e,8px 9px #243b4d;white-space:nowrap}
.finish-burst>span,.finish-burst>b{background:#fbebbf;color:#284b48;border:3px solid #2d4352;border-radius:12px;padding:7px 16px;font:700 clamp(14px,2.8vw,23px)/1.1 Village,system-ui;box-shadow:3px 3px #273e4e;white-space:nowrap}.finish-burst>b{background:#c4dfa5;font-size:clamp(12px,2.3vw,19px)}
.showing-finish #transition:not(.is-lesson){visibility:hidden}
.game-start{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#233e55b8;touch-action:none;user-select:none}.game-start[hidden]{display:none!important}.game-start>span{padding:8px 17px;border:3px solid #2d4352;border-radius:12px;background:#f9e5b5;color:#304858;font:700 clamp(18px,3vw,27px) Village,system-ui}.game-start>strong{font:italic 1000 clamp(100px,22vw,210px)/1 Impact,"Arial Black",sans-serif;color:#ffce55;-webkit-text-stroke:3px #293d51;text-shadow:5px 6px #d87652,9px 10px #253b4e}.game-start.is-go{background:transparent}
.game-layer.is-counting #gameFrame{filter:blur(12px);pointer-events:none}.game-start.is-go>strong{color:#bfe6a6}
.report-panel.is-campaign .report-stats,.report-panel.is-campaign #bonusNotice{display:none!important}.personal-recap{padding:12px 16px;border:2px solid #6e9565;border-radius:13px;background:#dcecc5;color:#284f3b;font:700 20px/1.3 Village,system-ui;margin:12px 0}.campaign-self td{background:#e4f0ce!important}.self-tag{font:700 11px Village,system-ui;padding:3px 6px;border-radius:7px;background:#537b4c;color:#fff5db}.campaign-medals{display:block;font:400 12px/1.3 Village,system-ui;color:#486752;margin-top:4px}.is-campaign #results td:nth-child(4){white-space:nowrap}.is-campaign .campaign-recap h3{font-size:19px}
#report.is-campaign .report-actionbar{bottom:0;flex-shrink:0}#report.is-campaign td:first-child{min-width:145px}#report.is-campaign .result-name b{overflow-wrap:normal}

/* V17.32 — a clear, isolated finish and a clickable card in the rules. */
#rulesBonus{pointer-events:auto;display:block;margin:12px auto 0;font-size:17px;border-width:3px}#rulesBonus[hidden]{display:none!important}#rulesBonus:disabled{background:#c2e0ac;color:#2d5941;opacity:1}
dialog#finishBurst{margin:0;padding:24px;border:0;background:transparent;overflow:visible;max-height:80dvh;outline:0;box-shadow:none}dialog#finishBurst::backdrop{background:#294b5b}dialog#finishBurst>strong{font-size:clamp(105px,20vw,215px)}

/* Team duel and clearly separated reward rows. */
#report .report-actionbar{bottom:0;flex-shrink:0}#bonusNotice{display:grid;gap:8px;padding:10px;border:2px solid #b5995a;background:#f3e6c7}#bonusNotice[hidden]{display:none!important}.bonus-recap-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border:2px solid #b9b18c;border-radius:11px;background:#fff0d6;color:#637267}.bonus-recap-row.earned{background:#dcecc4;border-color:#67966e;color:#2d5d42}.bonus-recap-row b{font:700 19px Village,system-ui}.bonus-recap-row small{display:block;font:14px/1.35 system-ui;margin-top:3px}.bonus-check{font-size:30px;line-height:1;min-width:29px}
.duel-health{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(580px,58%)}.duel-team{--clan:#437f9b;padding:8px 12px;border:2px solid var(--clan);border-radius:12px;background:#fff1d4;color:#29485a;min-width:0}.team-1{--clan:#ad6644}.duel-team>b{display:block;font:700 16px Village,system-ui}.duel-team>strong{display:block;font:700 24px Village,system-ui;margin:3px 0}.duel-team strong small{font-size:12px;font-weight:500}.duel-hp{height:13px;background:#b9b9a8;border:2px solid #2c4a58;border-radius:7px;overflow:hidden}.duel-hp i{display:block;height:100%;background:var(--clan);transform-origin:left;transition:transform .55s ease-out}.duel-team.my-team{box-shadow:0 0 0 2px #f2c961}.duel-team p{font:14px/1.4 system-ui;margin:6px 0}.duel-arena{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:20px;width:58%;text-align:center;pointer-events:none}.duel-clan{flex:1;min-width:0;padding:14px 9px;border:3px solid #426581;border-radius:20px;background:#f6e8cceF;color:#2d4d5d;box-shadow:4px 5px #27465244}.duel-clan.team-1{border-color:#a66b46}.duel-emblem{display:block}.duel-emblem .comic-art{width:82px;height:82px}.duel-clan>b{font:700 24px Village,system-ui}.duel-clan p{font:700 15px/1.5 Village,system-ui;overflow-wrap:anywhere}.duel-vs{font:italic 900 32px Impact,system-ui;color:#29475a}.versus-mode #enemy,.versus-mode #campaignRecap{display:none!important}.duel-health[hidden],.duel-arena[hidden]{display:none!important}.duel-report{display:grid;grid-template-columns:1fr 1fr;gap:12px}#versusBoard{margin:0 0 8px}#versusBoard h3{font:700 21px Village,system-ui;margin:0 0 12px;color:#2d5260}.duel-rule{font:14px/1.4 system-ui;margin:10px 0}.seat-team{display:block;margin:2px 0;padding:2px 5px;border-radius:5px;background:#376982;color:#fff1cd;font:700 10px system-ui}.seat-team.team-1{background:#975536}
@media(max-width:760px){.duel-health{width:68%;gap:5px}.duel-team{padding:5px 7px}.duel-team>b{font-size:12px}.duel-team>strong{font-size:20px}.duel-team strong small{font-size:10px}.duel-arena{width:63%;gap:6px;top:45%}.duel-clan{padding:7px 5px}.duel-emblem .comic-art{width:48px;height:48px}.duel-clan>b{font-size:17px}.duel-clan p{font-size:11px}.duel-vs{font-size:19px}.duel-report{gap:7px}.bonus-recap-row b{font-size:17px}.bonus-recap-row small{font-size:12px}.bonus-recap-row{padding:7px;gap:7px}}
@media(max-width:600px){.duel-arena{width:42%;gap:6px}.duel-clan{padding:9px 4px;border-radius:13px}.duel-clan>b,.duel-clan p{display:none}.duel-emblem .comic-art{width:36px;height:40px}.duel-health .duel-team>b{min-height:28px;font-size:11px;line-height:1.2}.duel-health .duel-team>strong{font-size:19px;line-height:1.1}.duel-health .duel-team strong small{display:block;white-space:nowrap;font-size:10px;margin:3px 0}}

/* Reconnect remains available above all non-modal game panels. */
#connectionStatus{display:flex;align-items:center;gap:7px;padding:4px 8px;border:2px solid #f1bc66;border-radius:9px;background:#634f35;color:#fff3d5;font:700 12px Village,system-ui}#connectionStatus[hidden],#resumePanel[hidden]{display:none!important}#connectionStatus button{background:#f2cd80;color:#2d4352;font-size:12px;padding:5px 7px}.resume-panel{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;border-color:#acaa71;background:#dce9c6;color:#2d4f45}.resume-panel b{font:700 18px Village,system-ui}@media(max-width:760px){#connectionStatus{order:10;width:100%;justify-content:center}.header-actions{flex-wrap:wrap}.resume-panel b{font-size:15px}}

/* V17.32: compact enemy banner and readable waiting badges. */
#transition #rulesAuto{display:block;background:#fff0bf;color:#334e52;border:2px solid #b89550;border-radius:18px;padding:5px 14px;font:700 16px Village,system-ui;font-variant-numeric:tabular-nums}
#transition #rulesAuto.urgent{background:#f5c59c;border-color:#af5e41;color:#7b382b}
#transition #rulesAuto[hidden]{display:none!important}
.ready-icon{width:28px;height:28px;min-width:28px;border-width:2px;line-height:1}
.ready-icon .comic-art{width:18px;height:18px;display:block}
.seat .ready-icon{width:24px;height:24px;min-width:24px;top:4px;right:4px}
.seat .ready-icon .comic-art{width:16px;height:16px}
.seat strong{padding-right:21px}
.battle #enemy{top:66%;width:min(470px,56%);padding:9px 16px;display:grid;grid-template-columns:minmax(65px,auto) minmax(0,1fr);grid-template-rows:auto 14px auto;column-gap:15px;row-gap:5px;align-items:center;border-radius:15px 23px 13px 20px;transform:translate(-50%,-50%) rotate(-.5deg)}
.battle #enemy #enemyType{grid-column:1;grid-row:1/4;max-width:110px;font-size:9px;line-height:1.4}
.battle #enemy h2{grid-column:2;grid-row:1;margin:0;font:700 23px/1.08 Village,system-ui;overflow-wrap:anywhere}
.battle #enemy .enemy-hp{grid-column:2;grid-row:2;width:100%;height:14px}
.battle #enemy #hpText{grid-column:2;grid-row:3;margin:0;font-size:11px;line-height:1.1}
.battle #enemy.boss h2{margin:0;padding:5px 12px;border-width:3px;border-radius:8px 11px;font-size:24px}
.battle #enemy.boss h2::before,.battle #enemy.boss h2::after{width:23px;height:42px}
.battle #enemy.boss h2::before{left:-17px}.battle #enemy.boss h2::after{right:-17px}
.battle #enemy.boss #enemyType .boss-label{font-size:29px;letter-spacing:.02em}
.battle #enemy.boss #enemyType>span{font-size:9px;letter-spacing:.04em}
@media(max-width:760px){.seat .ready-icon{width:22px;height:22px;min-width:22px}.seat .ready-icon .comic-art{width:14px;height:14px}.battle #enemy{width:64%;padding:7px 9px;column-gap:9px;row-gap:4px;grid-template-columns:50px minmax(0,1fr);grid-template-rows:auto 11px auto}.battle #enemy #enemyType{font-size:7px}.battle #enemy h2,.battle #enemy.boss h2{font-size:16px;padding:3px 4px}.battle #enemy .enemy-hp{height:11px}.battle #enemy #hpText{font-size:9px}.battle #enemy.boss #enemyType .boss-label{font-size:20px}.battle #enemy.boss #enemyType>span{font-size:7px}.battle #enemy.boss h2::before,.battle #enemy.boss h2::after{width:14px;height:29px}.battle #enemy.boss h2::before{left:-11px}.battle #enemy.boss h2::after{right:-11px}}
@media(max-height:600px){#transition #rulesAuto{font-size:13px;padding:3px 10px}.battle #enemy{top:69%;row-gap:3px;padding-top:6px;padding-bottom:6px}.battle #enemy.boss h2{font-size:19px}}
#transition #rulesAuto{white-space:nowrap;max-width:none}
.battle #enemy{top:69%}
/* A single wide nameplate; the boss crest straddles its upper-left edge. */
.battle #enemy{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto 14px auto;column-gap:10px;row-gap:5px}
.battle #enemy h2{grid-column:1/-1;grid-row:1}
.battle #enemy .enemy-hp{grid-column:1/-1;grid-row:2}
.battle #enemy #enemyType{grid-column:1;grid-row:3;max-width:none;justify-self:start;font:800 9px/1.3 system-ui;letter-spacing:.06em;color:#596f71;padding:2px 6px;border:1px solid #85918a;border-radius:5px;background:#e7e6cd}
.battle #enemy #hpText{grid-column:2;grid-row:3;justify-self:end}
.battle #enemy.boss h2{padding:8px 18px 8px 34px;color:#fff2ca}
.battle #enemy.boss #enemyType{color:#385c85;border-color:#7099b4;background:#dce9eb}
.battle #enemy.boss h2::before{display:none}
.enemy-badge{position:absolute;z-index:2;left:-19px;top:-23px;width:76px;height:76px;pointer-events:none;filter:drop-shadow(0 3px 1px #253c5277);transform:rotate(-10deg)}
.enemy-badge svg{display:block;width:100%;height:100%}
.enemy-badge b{position:absolute;left:5px;right:5px;top:31px;padding:3px 0;background:#a5473c;color:#fff5d3;border:2px solid #ebc879;border-radius:4px;font:italic 900 19px/1 Impact,"Arial Black",sans-serif;letter-spacing:.04em;text-shadow:1px 2px #4f343c}
@media(max-width:760px){.battle #enemy{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto 11px auto;column-gap:4px}.battle #enemy h2{font-size:17px}.battle #enemy.boss h2{font-size:17px;padding:6px 7px 6px 30px}.battle #enemy #enemyType{font-size:7px;letter-spacing:0;padding:1px 3px}.enemy-badge{width:54px;height:54px;left:-18px;top:-28px}.enemy-badge b{top:23px;left:2px;right:2px;font-size:14px;padding:2px 0}}
@media(max-height:600px) and (min-width:761px){.battle #enemy.boss h2{font-size:19px;padding-top:5px;padding-bottom:5px}.enemy-badge{width:64px;height:64px;top:-21px}.enemy-badge b{top:28px;font-size:16px}}
.seat:not(.has-camp) strong{padding-right:0}

/* Monthly village guests; badges stay readable during the draw. */
#gameCards .monthly-game{position:relative;background:linear-gradient(135deg,#fff4c8,#f4ce76);border-color:#ad7725}
.monthly-badge{display:block;margin:4px auto 0;color:#644016;font:900 9px/1.3 system-ui;letter-spacing:.04em}
#draw.monthly-selected #drawText,.monthly-title{color:#805215;text-shadow:0 1px #fff6d0}
#draw.monthly-selected .game-card.landed{outline:3px solid #b77b1f;box-shadow:0 0 0 5px #ffe5a6,0 0 24px #f7bf43;animation:monthly-celebrate .65s ease-out both}
@keyframes monthly-celebrate{0%{transform:scale(.94) rotate(-2deg)}55%{transform:scale(1.08) rotate(2deg)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){#draw.monthly-selected .game-card.landed{animation:none}}

/* Spotlight around the actual controls, without moving the toolbar. */
#guideShade{position:fixed;inset:0;z-index:1000;pointer-events:none}#guideShade[hidden]{display:none}
#guideShade i{position:absolute;background:#102238c9;backdrop-filter:blur(2px)}#guideShade span{position:absolute;border:3px solid #ffe392;border-radius:10px;box-shadow:0 0 16px #ffe39288}
#guideBubble{z-index:1001;max-height:calc(100dvh - 20px);overflow:auto}#guideBubble[hidden]{display:none}#guideBubble .guide-skip{margin-left:8px;background:transparent;box-shadow:none;color:#43576b;border-color:transparent}
@media(max-width:500px){#guideBubble{padding:10px;gap:6px}#guideMascot,#guideMascot svg{width:40px}#guideBubble b{font-size:18px}#guideBubble p{font-size:16px}}
