select{min-width:0;padding:8px 10px;border:2px solid #516674;border-radius:8px;background:#fff5da;color:#263b51;font:700 14px system-ui}#partyMode,.form .mode-hint{grid-column:1/-1}.form .mode-hint{font-size:12px;line-height:1.4;margin:0 0 4px}.form label{font-size:12px}
#lobbyReadyBtn,#summaryReadyBtn,#eraReadyBtn,#reportRetry{font:700 clamp(20px,2.3vw,26px) Village,system-ui;min-height:56px;min-width:250px;padding:12px 24px;border:3px solid #294557;border-radius:14px 20px 12px 17px;box-shadow:0 4px #294557}#lobbyReadyBtn.is-ready,#summaryReadyBtn.is-ready,#eraReadyBtn.is-ready{background:#93cda3;color:#204b3c}
#waiting{flex-direction:column;padding:10px 16px;gap:8px;text-align:center}#waitingTitle{font-size:18px}#waiting p{font-size:14px}.ready-mark{font-size:13px}
.report-actionbar{position:sticky;bottom:-22px;z-index:2;display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;background:#f2e4c8;border-top:2px solid #b29f7b;padding:14px 8px 10px;margin-top:auto}.report-actionbar span{font:700 15px system-ui;color:#435568}.ready-hint{text-align:center;font-size:16px}#report .results-wrap{flex-shrink:0;max-height:45dvh;overflow:auto}#report th{position:sticky;top:0;background:#e7d4ad}#report td{font-size:18px}#report td:nth-child(4){font-variant-numeric:tabular-nums;white-space:nowrap}#reportNote{font-size:14px}#bonusNotice{margin:0;padding:10px 12px;border:2px solid #a08737;border-radius:12px;background:#f9e5a4;color:#4d481f;font-size:16px;font-weight:700}
.era-break{width:min(820px,95vw)}.era-break h2{font:700 clamp(28px,3.5vw,38px) Village,system-ui}.era-break #eraBreakText{max-width:720px;font:700 clamp(19px,2.3vw,25px)/1.5 Village,system-ui;color:#34465a}.era-ready-list span{font-size:17px}.era-break #eraReadyHint{display:block;font-size:16px;line-height:1.45;margin-top:14px}
#drawMode,#rulesCloud #rulesMode,#gameMode{display:block;letter-spacing:.4px;font:800 14px/1.35 system-ui;padding:7px 12px;border:2px solid #386450;border-radius:11px;background:#daebc2;color:#274d39}#drawMode.individual,#rulesCloud #rulesMode.individual,#gameMode.individual{background:#edcff0;border-color:#8b4f85;color:#663163}#drawMode{width:fit-content;margin:auto;font-size:18px}#rulesCloud #rulesMode{font-size:15px;margin-bottom:12px}
.game-right{display:flex;justify-content:flex-end;align-items:center;gap:8px;min-width:0}.game-right small{font-size:11px!important;padding:4px 7px!important;text-align:center}.game-top{height:62px}.game-top #gameTitle span{font-size:15px;background:none;padding:0;border:0;color:inherit}.game-top #gameTime{font-size:29px;min-width:78px;text-align:center}.objective-strip{flex:none;display:flex;align-items:center;justify-content:center;gap:16px;min-height:35px;padding:4px 12px;border-bottom:2px solid #3c5c69;background:#f4dc9f;color:#304559;box-sizing:border-box;font:800 17px system-ui;z-index:1}.objective-strip progress{width:min(30vw,240px);height:13px;accent-color:#438671}
.game-layer>#gameFrame{flex:1 1 0;min-height:0;height:0;width:100%;padding-bottom:0}.team-progress{position:static;transform:none;flex:none;max-width:none;padding:5px 8px;background:#e5dfc5;min-height:30px;box-sizing:border-box}.team-progress span{font-size:14px;padding:4px 10px}.team-progress span.done{background:#a7dfae;border-color:#2f714b;font-weight:900}#gameWait{top:97px;bottom:46px;z-index:2}#gameWait strong{font-size:76px}#gameWait strong small{font:700 24px system-ui}#gameWait b{font-size:clamp(23px,3vw,35px);color:#35794f}#gameWait p{font-size:21px;margin:7px}#gameWait .finished-count{font-size:clamp(25px,3vw,36px);font-weight:900;color:#294d61}#gameWait>small{font-size:16px}
.bonus-button{background:#f6d379;border:2px solid #7b673c;color:#403c27;font:800 14px system-ui;border-radius:12px;padding:9px 12px;box-shadow:0 2px #7b673c}.rules-cloud .bonus-button{margin-top:12px}
.rules-layout{width:min(1080px,94%);gap:20px}.rules-layout .rules-cloud{flex:1 1 380px}.rules-demo{flex:1 1 570px;width:54%;transform:none}.demo-window{position:relative;width:100%;aspect-ratio:8/5;background:#c4dbb9;overflow:hidden}.demo-window iframe{position:absolute;left:50%;top:50%;width:960px;height:600px;max-width:none;border:0;transform-origin:center center;pointer-events:none}.demo-label{font-size:12px;text-align:center}
.versus-mode #teamHealth,.versus-mode #enemy .hp,.versus-mode #hpText,.versus-mode .report-stats,.versus-mode #report th:nth-child(5),.versus-mode #report td:nth-child(5){display:none}#versusBoard h3{font:700 25px Village,system-ui;margin:6px 0}#versusRanking{list-style:none;padding:0;margin:0;display:grid;gap:6px}#versusRanking li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:10px 14px;border:2px solid #c2b997;border-radius:10px;font:700 18px system-ui;background:#eee8d3}#versusRanking li.leader{background:#f5d985;border-color:#a28433}#versusRanking li b{overflow-wrap:anywhere}#versusRanking li span{font-size:14px;font-variant-numeric:tabular-nums}
@media(max-width:760px){header{flex-wrap:wrap}.header-actions{margin-left:auto}#waiting p{font-size:12px}.game-top{height:64px;padding:4px 7px;gap:6px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.game-top #gameTitle span{font-size:12px}.game-top #gameTime{font-size:25px;min-width:62px}.game-right{flex-direction:column;gap:3px}.game-right small{font-size:9px!important;line-height:1.1}.game-right .bonus-button{font-size:10px;padding:4px 5px}.objective-strip{font-size:15px;gap:9px}.team-progress{gap:4px;min-height:31px;padding:4px}.team-progress span{font-size:12px;padding:3px 6px}#gameWait{top:99px;bottom:68px;padding:12px}#gameWait p{font-size:17px}.rules-layout{width:95%;gap:12px}.rules-layout .rules-cloud{flex:none}.rules-demo{flex:none;width:min(520px,94%)}#rulesCloud #rulesMode{font-size:12px;padding:5px 7px}.rules-layout .rules-cloud{padding:14px 20px}#rulesCloud #demoCaption{font-size:19px}.rules-cloud b{font-size:23px}.demo-window{max-height:31dvh}.report-actionbar{bottom:-14px;gap:10px}#report td,#report td:nth-child(2){font-size:14px;padding:8px 5px}#report th{font-size:11px}#bonusNotice{font-size:14px}.era-ready-list span{font-size:14px}#versusRanking li{font-size:15px;gap:8px;padding:9px}#versusRanking li span{font-size:12px}}
@media(max-height:650px) and (min-width:600px){.form{grid-template-columns:minmax(130px,1fr) auto auto}.form label{display:none}.lobby-panel{padding:6px 10px}#partyMode{grid-column:1/3}.form .mode-hint{grid-column:3;grid-row:1;font-size:10px;max-width:220px}#joinCode{grid-column:1/3}.rules-layout{flex-direction:row;width:min(960px,97%);gap:15px}.rules-layout .rules-cloud{flex:1 1 360px}.rules-demo{flex:0 1 48%;width:48%}.demo-window{max-height:38dvh}#rulesCloud #demoCaption{font-size:20px}.rules-cloud b{font-size:24px}#rulesCloud #rulesMode{font-size:12px;margin-bottom:7px}#lobbyReadyBtn,#summaryReadyBtn,#eraReadyBtn,#reportRetry{min-height:48px;padding:8px 18px;font-size:22px}#waiting{padding:7px;gap:5px}#waiting p{margin:2px;font-size:12px}.report-actionbar{padding:9px}.era-break #eraBreakText{font-size:21px;line-height:1.4}.era-troops{min-height:60px}.era-troops canvas{width:52px;height:58px}}
@media(max-width:430px){#waitingTitle{font-size:16px}#lobbyReadyBtn,#summaryReadyBtn,#eraReadyBtn,#reportRetry{min-width:220px}.form .mode-hint{font-size:11px}.form select{font-size:12px}#results .comic-art{display:none}#report td,#report td:nth-child(2){font-size:13px}.report-actionbar{gap:8px}.report-actionbar span{font-size:13px}}
/* Keep the full demo and its timed Ready controls inside the board. */
#transition.is-lesson{gap:14px}
#transition.is-lesson .rules-layout{flex:1 1 auto;min-height:0;max-height:calc(100% - 162px)}
#transition.is-lesson .rules-demo{max-height:100%;flex-shrink:1}
#transition.is-lesson .demo-window{max-height:40dvh}
#transition.is-lesson .countdown-meta{flex:none;gap:7px}
@media(max-width:760px){#transition.is-lesson{gap:10px;padding:10px}#transition.is-lesson .rules-layout{flex:none;max-height:none;gap:11px}#transition.is-lesson .demo-window{max-height:22dvh}#transition.is-lesson .rules-cloud{padding:12px 19px}#rulesCloud #demoCaption{font-size:18px;margin-top:7px}#rulesCloud #rulesMode{margin-bottom:6px}#transition.is-lesson .countdown-meta{gap:5px}#transition.is-lesson #rulesReadyBtn{min-height:43px;font-size:20px;padding:7px 17px}}
@media(max-height:650px) and (min-width:761px){#transition.is-lesson .demo-window{max-height:32dvh}#transition.is-lesson .rules-layout{max-height:calc(100% - 140px)}#transition.is-lesson .countdown-meta{gap:4px}}


/* V17.32 : bandeau unique ; aucun placement de grille hérité. */
#lobby.lobby-panel{padding:8px 12px;overflow:visible}
#lobby .form{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:100%;min-width:0}
#lobby .form>label,#lobby #modeHint{display:none}
#lobby .mode-select-row{display:flex;flex-flow:row nowrap;align-items:center;gap:6px;flex:0 1 260px;min-width:120px;grid-column:auto;grid-row:auto}
#lobby .mode-select-row #partyMode{flex:1 1 120px;width:120px;min-width:95px;grid-column:auto}
#lobby .mode-select-row #versusDifficulty{flex:1 1 110px;width:110px;min-width:95px;grid-column:auto;padding:8px}
#lobby .nickname-field{position:relative;flex:1 1 160px;min-width:95px;padding:0;margin:0;align-self:center}
#lobby #nickname{width:100%;min-width:0;box-sizing:border-box}
#lobby #joinCode{flex:1 1 140px;width:140px;min-width:105px;grid-column:auto}
#lobby .form button{flex:0 0 auto;align-self:center;white-space:nowrap;padding:8px 13px}
#lobby .form input,#lobby .form select,#lobby .form button{height:38px;box-sizing:border-box;border-radius:9px;font-size:13px;margin:0}
#lobby .nickname-error{position:absolute;top:calc(100% + 4px);left:0;z-index:15;background:#fff0ed;border:1px solid #b52c2c;border-radius:5px;padding:3px 6px;font-size:11px;line-height:14px;white-space:nowrap;box-shadow:0 2px 5px #0002}
#nickname.nickname-invalid{border-width:2px!important}
@media(max-width:760px){
 #lobby.lobby-panel{padding:6px}
 #lobby .form{gap:5px;overflow-x:auto;overflow-y:hidden;padding:2px 0 23px;margin-bottom:-19px;scrollbar-width:thin}
 #lobby .mode-select-row{flex:0 0 auto;min-width:0;gap:4px}
 #lobby .mode-select-row #partyMode{flex:0 0 98px;width:98px;min-width:0}
 #lobby .mode-select-row #versusDifficulty{flex:0 0 92px;width:92px;min-width:0}
 #lobby .nickname-field{flex:1 0 94px;min-width:94px}
 #lobby #joinCode{flex:1 0 108px;min-width:108px;width:108px}
 #lobby .form button{padding:6px 9px}
 #lobby .form input,#lobby .form select,#lobby .form button{font-size:12px}
}

/* V17.32 : sélection intégrée entre le titre et les outils. */
body>header{display:flex;flex-flow:row nowrap;align-items:center;gap:10px;padding:6px 12px}
body>header .brand-lockup{flex:0 0 auto;justify-content:flex-start;gap:6px}
body>header .header-actions{flex:0 0 auto;width:auto;margin-left:auto;flex-wrap:nowrap;gap:5px}
header #lobby.lobby-panel{flex:1 1 auto;min-width:0;margin:0;padding:0;border:0;background:none;box-shadow:none;border-radius:0}
header #lobby .form{justify-content:center;gap:5px;padding:3px 0 22px;margin:0 0 -19px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
header #lobby .mode-select-row{flex:0 0 auto;min-width:0;gap:4px}
header #lobby .mode-select-row #partyMode{flex:0 0 94px;width:94px;min-width:94px}
header #lobby .mode-select-row #versusDifficulty{flex:0 0 94px;width:94px;min-width:94px}
header #lobby .nickname-field{flex:0 0 90px;width:90px;min-width:90px}
header #lobby #joinCode{flex:0 0 110px;width:110px;min-width:110px}
header #lobby .form button{padding:5px 9px}
header #lobby .form input,header #lobby .form select,header #lobby .form button{height:34px;font-size:12px;padding-left:7px;padding-right:7px}
header #lobby .nickname-error{font-size:10px;padding:1px 4px}
@media(max-width:1250px){body>header .site-game{font-size:14px}body>header .brand-lockup>a{font-size:12px;letter-spacing:.5px}header #lobby .form{justify-content:flex-start}}
@media(max-width:760px){body>header{gap:6px;padding:5px 7px}body>header .site-game{font-size:11px}body>header .brand-lockup>a{font-size:10px}body>header .header-actions{gap:3px}body>header .brand-divider{display:none}body>header .brand-lockup{gap:4px}header #lobby .form{justify-content:flex-start}}

#bossAnnouncement{position:fixed;z-index:85;inset:var(--header-h,47px) 0 0;display:grid;place-items:center;background:#17313ccc;pointer-events:auto}
.boss-announcement-card{text-align:center;width:min(650px,90vw);max-height:90%;padding:20px;box-sizing:border-box;border:4px solid #e6bd62;border-radius:24px;background:radial-gradient(ellipse at center,#587779,#243f4b);color:#fff1cb;box-shadow:0 10px 40px #0006;animation:boss-arrive .5s ease-out}
.boss-announcement-card small{font:bold 22px Village,system-ui;color:#ffdb79;letter-spacing:.08em}
#bossPortrait{display:block;margin:5px auto;max-height:32dvh;width:auto;animation:boss-float 1.2s ease-in-out infinite alternate}
.boss-announcement-card h2{font:700 clamp(22px,3vw,34px) Village,system-ui;margin:8px 0}
.boss-announcement-card p{font:18px/1.4 Village,system-ui;margin:8px 0}
@keyframes boss-arrive{from{opacity:0;transform:scale(.7) rotate(-4deg)}to{opacity:1;transform:none}}
@keyframes boss-float{to{transform:translateY(-7px)}}
@media(prefers-reduced-motion:reduce){.boss-announcement-card,#bossPortrait{animation:none}}

/* Full report, including eight players, with no page/table scrollbar. */
html.report-open,html.report-open body{overflow:hidden}
dialog#report{box-sizing:border-box;max-height:calc(100dvh - var(--header-h,47px) - 24px);overflow:hidden;width:min(1050px,calc(100vw - 24px));padding:12px}
#report .report-content{flex:none;min-width:0;display:flex;flex-direction:column;gap:7px;transform-origin:top left}
#report .results-wrap{max-height:none;overflow:visible;flex-shrink:0}
#report table{width:100%;min-width:0;table-layout:fixed}
#report th,#report td{overflow-wrap:anywhere;padding:5px 7px;font-size:14px}
#report td:nth-child(2){font-size:13px}#report th:first-child{width:22%}#report th:nth-child(2){width:27%}
#report .report-title h2{margin:0;font-size:clamp(21px,3vw,29px)}
#report .medals{margin-top:2px}#report .medal{font-size:9px;padding:1px 4px}
#report .report-actionbar{position:static;flex:none;margin:0;padding:8px 0 2px;gap:6px 16px;min-width:0}
#reportClock{font-variant-numeric:tabular-nums}#summaryReadyHint{margin:0}
#report .report-stat{padding:6px 10px}#report .bonus-recap-row{padding:4px 6px}#report #bonusNotice{padding:5px 8px}
#report.is-campaign td:first-child{min-width:0}
@media(max-width:600px){#report th,#report td,#report td:nth-child(2){font-size:11px;padding:4px 3px}#report .report-actionbar{flex-direction:column}#report .report-actionbar button{min-height:44px;padding:7px 16px;font-size:20px}#report .report-actionbar span{font-size:12px}#report td:nth-child(4){white-space:normal}}

/* Small screens keep the menu controls on one scrollable row of their own. */
@media(max-width:760px){header{flex-wrap:wrap;gap:4px 8px}header #lobby{order:3;flex:1 0 100%;width:100%;min-width:0;max-width:100%;margin:0}header #lobby .form{justify-content:flex-start}header .brand-lockup{flex:1;min-width:0}header .site-game{font-size:11px}header .brand-lockup>a{font-size:10px}header .header-actions{gap:4px}header .brand-divider{display:none}}
