/* Council artwork reuses the home landscape and heraldry already loaded by the game. */
.game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']){width:min(94vw,640px);max-height:94dvh}
.game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) #modal-content{position:relative;padding:24px}
.game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) .modal-close{position:absolute;float:none;right:5px;top:5px;z-index:3;width:58px;height:58px;min-width:58px;border:0;padding:0;border-radius:0;box-shadow:none;color:#f7d796;background:transparent url('./art-web/governor-regalia-v1-d5b7eac8bf.webp') right center/200% 100% no-repeat;filter:drop-shadow(0 2px 2px #28160780)}
.game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) .modal-close .icon{width:27px;height:27px}
.game-modal:is([data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick']){width:min(94vw,440px)}
.game-modal[data-variant='new-room']{width:min(94vw,820px)}
.game-modal[data-variant='new-room'] #modal-content{padding:0}
.campaign-hero{position:relative;isolation:isolate;min-height:310px;display:flex;align-items:flex-start;justify-content:center;padding:27px 75px 116px 128px;border-bottom:3px double #9b7947;background:linear-gradient(180deg,#f3eddff5 0%,#f3eddfeb calc(100% - 105px),#f3eddf00 calc(100% - 35px)),url('./art-web/title-reinos-v1-4b2303ab92.webp') center 55%/cover no-repeat}
.campaign-hero::after,.council-heading::after{content:'◆';position:absolute;bottom:-8px;left:calc(50% - 7px);font:14px/14px var(--serif);color:#8a642d;text-shadow:0 1px #fff1c1;pointer-events:none}
.campaign-standard,.council-heading::before{position:absolute;left:3px;top:-5px;width:124px;height:181px;pointer-events:none;background:url('./art-web/governor-regalia-v1-d5b7eac8bf.webp') left center/200% 100% no-repeat;filter:drop-shadow(1px 3px 2px #24180966)}
.campaign-hero-copy{text-align:center;max-width:530px}
.campaign-hero-symbol{display:block;color:#785326;height:48px;margin-bottom:8px}
.campaign-hero-symbol .icon{width:48px;height:48px;stroke-width:1.55}
.campaign-hero h2{font:700 clamp(36px,4.8vw,56px)/1.05 var(--serif);color:#4a291c;margin:8px 0 12px;text-wrap:balance}
.game-modal .campaign-hero-copy p{font:500 23px/1.2 var(--serif);color:#413521;margin:0;text-wrap:balance}
.game-modal .campaign-motto{position:absolute;bottom:18px;left:32px;margin:0;padding:8px 14px;border-left:1px solid #d5b575;font:600 20px/1.2 var(--serif);color:#fff0c7;text-shadow:0 2px 3px #07110b;background:linear-gradient(90deg,#102b20bf,#102b2000)}
.campaign-body{padding:12px 26px 26px}
.campaign-field{display:grid;grid-template-columns:64px minmax(155px,.95fr) minmax(0,1.1fr);align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid #96744255}
.campaign-field-crest,.council-participant-crest{position:relative;isolation:isolate;display:grid;place-items:center;width:64px;height:78px;color:#ead095;clip-path:polygon(50% 0,94% 17%,98% 65%,83% 82%,50% 100%,17% 82%,2% 65%,6% 17%);background:linear-gradient(130deg,#edcf82,#684b24 37%,#dab764 62%,#805c27);filter:drop-shadow(0 2px 1px #37291780)}
.campaign-field-crest::before,.council-participant-crest::before{content:'';position:absolute;inset:3px;z-index:-1;clip-path:inherit;background:radial-gradient(ellipse at 25% 0,#284d37,#0c251c 70%);border:2px solid #ba9752}
.campaign-field-crest .icon{width:35px;height:35px;stroke-width:1.5}
.campaign-field-copy{min-width:0}
.campaign-field-copy label{display:block;font:700 25px/1.1 var(--serif);color:#342a20}
.game-modal .campaign-field-copy p{font:14px/1.4 var(--sans);color:var(--antique-muted);margin:7px 0 0}
.campaign-field-control{min-width:0}
.campaign-field-control :is(input,select){display:block;width:100%;min-width:0;min-height:52px;padding:11px 13px;border:1px solid #977447;border-radius:2px;background:linear-gradient(110deg,#f9f2e4,#e8d7b5);box-shadow:inset 0 1px 5px #73552126,0 1px #fff9e3;color:#342a20;font:600 20px/1.2 var(--serif)}
.campaign-field-control select{padding-right:6px}
.campaign-faction-bonus,.campaign-guidance{display:flex;align-items:center;gap:16px;padding:16px 18px;border:1px solid #9b7b4866;box-shadow:inset 0 0 0 3px #f6eddb90;background:linear-gradient(110deg,#ebdfc65c,#ffffff26);margin:10px 0 0}
.campaign-faction-bonus>span{display:grid;place-items:center;flex:none;width:44px;height:44px;color:#80612c}
.campaign-faction-bonus .icon{width:37px;height:37px}
.game-modal .campaign-faction-bonus p{font:600 21px/1.25 var(--serif);margin:0}
.campaign-guidance{margin:18px 0 24px;gap:14px}
.campaign-guidance>.icon{width:28px;height:28px;flex:none;color:#826436}
.game-modal .campaign-guidance p{margin:0;font:13px/1.5 var(--sans);color:var(--antique-muted)}
.campaign-actions{display:grid;justify-items:center;gap:27px;margin:28px 0 12px}
.game-modal .campaign-actions .primary-button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:64px;font:700 32px/1.1 var(--serif);padding:12px 35px}
.campaign-actions .primary-button .icon{width:30px;height:30px;flex:none}
.game-modal .campaign-actions .secondary-button{display:flex;align-items:center;justify-content:center;gap:20px;width:78%;min-height:48px;font:600 25px/1.1 var(--serif)}
.council-heading{position:relative;isolation:isolate;min-height:165px;margin:-24px -24px 23px;padding:30px 67px 38px 94px;border-bottom:1px solid #9b794780;background:linear-gradient(180deg,#f3eddfeb 0%,#f3eddfef 45%,#f3eddf9c 100%),url('./art-web/title-reinos-v1-4b2303ab92.webp') center 50%/cover no-repeat}
.council-heading::before{content:'';width:88px;height:130px}
.game-modal[data-variant='room'] .room-heading{position:sticky;top:0;z-index:4;margin:-24px -24px 23px;background:#f3eddf}
.game-modal[data-variant='room'] .room-heading .council-heading{margin:0}
.game-modal .council-heading .modal-title{font:700 34px/1.1 var(--serif);margin:0 0 10px;text-wrap:balance;color:#4a291c}
.game-modal .council-heading .modal-subtitle{font:500 17px/1.3 var(--serif);margin:0!important;text-wrap:balance}
.council-participant-crest{width:34px;height:42px;flex:none}
.council-participant-crest .icon{width:21px;height:21px}
.game-modal[data-variant='room'] .room-participant{border:1px solid #96744266;background:linear-gradient(110deg,#ebe0c96b,#ffffff0d)}
.game-modal:is([data-variant='join'],[data-variant='profile']) .room-form label{font:600 20px/1.2 var(--serif);gap:9px}
.game-modal:is([data-variant='join'],[data-variant='profile']) .room-form :is(input,select){background:linear-gradient(110deg,#f9f2e4,#e8d7b5);box-shadow:inset 0 1px 4px #7355211a;min-height:48px}
.game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) :is(button,input,select):focus-visible{outline:3px solid #976c2a;outline-offset:3px}
/* Group each campaign control with its explanation using the settings separators. */
.game-modal[data-variant='settings'] .settings-control-group{padding-bottom:16px;border-bottom:1px solid #8e713340}
.game-modal[data-variant='settings'] .settings-control-group>.settings-row{border-bottom:0}
.game-modal[data-variant='settings'] .settings-control-group>.muted{margin:0}
.game-modal[data-variant='settings'] .settings-pause-control{display:grid;gap:8px;padding-top:16px}
.game-modal[data-variant='settings'] .button-row>button:only-child{grid-column:1/-1;width:100%;min-width:0}
@media(max-width:560px){
 .game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']){width:calc(100% - 20px);max-height:calc(100dvh - 24px);border-width:12px;border-image-width:12px}
 .game-modal:is([data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) #modal-content{padding:18px}
 .game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) .modal-close{width:48px;height:48px;min-width:48px;right:0;top:2px}
 .campaign-hero{min-height:255px;padding:24px 38px 105px 65px;background-position:center,62% center}
 .campaign-standard{width:66px;height:111px;left:0;top:-3px}
 .campaign-hero-symbol{height:32px;margin-bottom:6px}.campaign-hero-symbol .icon{width:32px;height:32px}
 .campaign-hero h2{font-size:34px;margin:7px 0 10px}
 .game-modal .campaign-hero-copy p{font-size:18px}
 .game-modal .campaign-motto{font-size:17px;left:17px;bottom:12px;padding:6px 10px}
 .campaign-body{padding:9px 17px 23px}
 .campaign-field{grid-template-columns:46px minmax(0,1fr);gap:10px 12px;padding:16px 0}
 .campaign-field-crest{width:46px;height:58px}.campaign-field-crest .icon{width:28px;height:28px}
 .campaign-field-copy label{font-size:23px}.game-modal .campaign-field-copy p{font-size:12px;margin-top:4px}
 .campaign-field-control{grid-column:1/-1}.campaign-field-control :is(input,select){font-size:18px;min-height:48px}
 .campaign-faction-bonus,.campaign-guidance{padding:13px 12px;gap:12px}.game-modal .campaign-faction-bonus p{font-size:19px}
 .game-modal .campaign-actions .primary-button{font-size:28px;min-height:54px;padding:10px 23px}.campaign-actions .primary-button .icon{width:25px;height:25px}
 .game-modal .campaign-actions .secondary-button{font-size:23px;width:86%}
 .council-heading{margin:-18px -18px 20px;padding:30px 45px 32px 65px;min-height:160px}.council-heading::before{width:63px;height:107px}
 .game-modal[data-variant='room'] .room-heading{margin:-18px -18px 20px}
 .game-modal .council-heading .modal-title{font-size:29px}.game-modal .council-heading .modal-subtitle{font-size:16px}
}
@media(forced-colors:active){
 .campaign-hero,.council-heading{background:Canvas;border-color:CanvasText}
 .campaign-standard,.council-heading::before{display:none}
 .game-modal .campaign-motto{background:Canvas;color:CanvasText;text-shadow:none}
 .campaign-field-crest,.council-participant-crest{clip-path:none;background:Canvas;color:CanvasText;border:1px solid CanvasText}
 .campaign-field-crest::before,.council-participant-crest::before{display:none}
 .game-modal:is([data-variant='new-room'],[data-variant='join'],[data-variant='room'],[data-variant='profile'],[data-variant='settings'],[data-variant='abandon-campaign'],[data-variant='tutorial-reset'],[data-variant='protection-upgrade'],[data-variant='governor-appearance'],[data-variant='lobby-name'],[data-variant='lobby-kick'],[data-variant='lobby-chat']) .modal-close{background:ButtonFace;color:ButtonText;border:1px solid ButtonText;filter:none}
 .campaign-field-control :is(input,select){background:Field;color:FieldText;border-color:ButtonText}
}

.game-modal .campaign-feedback{padding:13px 15px;border:1px solid #8d422f;background:#fff5e8;color:#743323;font:600 14px/1.45 var(--sans);scroll-margin:20px}
.campaign-feedback:focus{outline:2px solid #8d422f;outline-offset:3px}

.game-modal .campaign-mode{margin:18px 0;font:13px/1.5 var(--sans)}
.game-modal .campaign-mode.is-replacement{border-left-color:#87452f;color:#683c2b;background:#f7eddf80}

/* Lobby conversation uses the approved flat parchment conversation layout. */
.game-modal[data-variant='lobby-chat']{height:min(860px,94dvh);overflow:hidden}
.game-modal[data-variant='lobby-chat'] #modal-content{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
.lobby-chat-heading{flex:none;padding-right:44px;margin-bottom:18px}
.lobby-chat-heading .modal-title{font:700 30px/1.1 var(--serif);color:#4a291c;margin:18px 0 10px}
.lobby-chat-heading .modal-subtitle{margin:0;font:500 16px/1.4 var(--serif)}
.lobby-chat-content{display:flex;flex-direction:column;flex:1;min-height:0}
.game-modal[data-variant='lobby-chat'] .chat-messages{flex:1;min-height:80px;max-height:none;margin:0 0 14px}
.game-modal[data-variant='lobby-chat'] .chat-form{flex:none}
.game-modal[data-variant='lobby-chat'] .chat-message{padding:12px 0;background:none}
.game-modal[data-variant='lobby-chat'] .chat-message p{font-size:15px;line-height:1.5;margin:0}
.game-modal[data-variant='lobby-chat'] .chat-message header{flex-wrap:wrap;gap:7px}
.game-modal[data-variant='lobby-chat'] .chat-message header strong{font-size:15px;overflow-wrap:anywhere}
.game-modal[data-variant='lobby-chat'] .chat-form textarea{background:#f1e2bfc9;border:1px solid #a58755;border-radius:2px}
@media(max-width:560px){.game-modal[data-variant='lobby-chat']{height:calc(100dvh - 24px)}.lobby-chat-heading .modal-title{font-size:26px}}

.game-modal[data-variant='lobby-chat'] .lobby-chat-heading{padding-right:0}
.game-modal[data-variant='lobby-chat'] .council-heading{min-height:0;margin:14px 0 0;padding:0 0 18px;background:none}
.game-modal[data-variant='lobby-chat'] .council-heading::before{content:none}
.game-modal[data-variant='lobby-chat'] .council-heading .modal-title{font-size:30px;margin:0 0 10px}
@media(max-width:560px){.game-modal[data-variant='lobby-chat'] .council-heading .modal-title{font-size:26px}}
.room-bot-controls{padding-block:calc(var(--space)*2);border-block:1px solid var(--line);margin-block:calc(var(--space)*2)}
.room-bot-controls h3{margin:0 0 var(--space)}

/* Level-based protection uses the council parchment and original closing seal. */
.game-modal[data-variant='protection-upgrade']{width:min(94vw,500px)}
.game-modal[data-variant='protection-upgrade'] .modal-close{right:12px;top:10px}
.game-modal[data-variant='protection-upgrade'] .council-heading{padding-right:78px}
@media(max-width:560px){
 .game-modal[data-variant='protection-upgrade']{width:calc(100% - 24px)}
 .game-modal[data-variant='protection-upgrade'] .modal-close{right:8px;top:8px}
 .game-modal[data-variant='protection-upgrade'] .council-heading{padding-right:64px}
}