.create-page{max-width:1460px}.create-page .lede{margin-bottom:32px}.setup-panels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.setup-panel{min-width:0;padding:28px;border:1px solid #3a5151;border-radius:16px;background:linear-gradient(155deg,#1d3235,#132326);box-shadow:0 14px 32px #0002;animation:panel-arrive .65s both cubic-bezier(.2,.7,.2,1)}.setup-panel:nth-child(2){animation-delay:.16s}.setup-panel:nth-child(3){animation-delay:.32s}.panel-step{font-size:11px;letter-spacing:.16em;color:#bdd894;font-weight:700;margin-bottom:12px}.setup-panel h2{margin-bottom:24px}.setup-panel label{font-size:14px}.setup-panel .map-image{margin-bottom:18px}.settings-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}.setting-note{font-size:13px;margin-top:-10px}.invite-preview{border-top:1px solid #3a5151;padding-top:20px;margin-top:26px}.invite-preview input{font-size:12px}.setup-roster{min-height:250px}.setup-roster .unit-row{display:flex;gap:12px;align-items:center;border-bottom:1px solid #304541;padding:12px 0;font-size:14px}.setup-roster img{width:72px;height:78px;object-fit:contain}.setup-total{color:#cbe997;font-weight:700}.create-bottom{display:flex;align-items:center;justify-content:flex-end;gap:18px;margin-top:26px}.create-bottom p{margin-right:auto;font-size:14px}.setup-panel input:disabled,.setup-panel select:disabled{opacity:.55;cursor:not-allowed}@keyframes panel-arrive{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.setup-panel{animation:none}}@media(max-width:1000px){.setup-panels{grid-template-columns:1fr}.setup-panel{padding:24px}.setup-roster{min-height:0}.create-bottom{flex-wrap:wrap}.setup-panel .map-image{max-height:300px}}

/* Overlapping source-card fan in library previews. */
.setup-roster{overflow:hidden}.setup-roster .army-miniatures{display:block;position:relative;height:235px;margin:22px -6px 8px;isolation:isolate}.setup-roster .army-miniature{display:block;position:absolute;left:50%;top:10px;width:58%;margin:0;transform:translateX(calc(-50% + var(--fan-x))) translateY(var(--fan-y)) rotate(var(--fan-angle));transform-origin:50% 90%;filter:drop-shadow(0 8px 7px #0009);transition:transform .2s ease}.army-miniature img{display:block;width:100%;height:182px;object-fit:contain}.setup-roster .army-miniature>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.setup-roster .army-miniature:not(:has(img)){height:150px;border:1px solid #526549;border-radius:10px;background:#21352e}.setup-roster .army-miniature:not(:has(img))>span{position:static;width:auto;height:auto;clip-path:none;padding:18px;display:block}.setup-roster:hover .army-miniature{transform:translateX(calc(-50% + var(--fan-x))) translateY(calc(var(--fan-y) - 4px)) rotate(var(--fan-angle))}@media(prefers-reduced-motion:reduce){.setup-roster .army-miniature{transition:none}}

.setup-roster .army-miniature img{height:auto;max-height:182px;object-fit:contain}.setup-roster .army-miniature{display:flex;justify-content:center;align-items:flex-start}.setup-roster:hover .army-miniature,.setup-roster:focus-visible .army-miniature{transform:translateX(calc(-50% + var(--fan-open-x))) translateY(calc(var(--fan-y) - 8px)) rotate(var(--fan-open-angle))}.setup-roster .army-miniature{transition:transform .26s ease}.setup-roster .army-miniature img{max-width:100%;width:auto}@media(prefers-reduced-motion:reduce){.setup-roster .army-miniature{transition:none}}
/* Raise only the card under the pointer above its neighboring cards. */
.setup-roster .army-miniature.fan-front{z-index:100!important;transform:translateX(calc(-50% + var(--fan-open-x))) translateY(calc(var(--fan-y) - 19px)) rotate(var(--fan-open-angle)) scale(1.06)}

.setup-roster .army-miniatures{pointer-events:auto}.setup-roster .army-miniature{pointer-events:none}

.setup-roster{overflow:visible}.setup-roster details{margin-bottom:24px;font-size:14px}.setup-roster summary{cursor:pointer;color:var(--accent)}.setup-roster .army-miniatures{margin:22px 0 8px}

.embedded-setup>header,.embedded-setup>footer{display:none}.embedded-setup main{padding-top:30px}.embedded-setup h1{font-size:32px}.embedded-setup .lede{margin-bottom:24px}

.create-page .setup-title{font-size:14px;line-height:1.4;font-weight:700;letter-spacing:.15em;text-transform:uppercase;color:var(--accent);margin:0 40px 28px 0}.setup-panel h2.panel-step{font-size:11px;line-height:1.5;text-transform:uppercase;margin:0 0 24px}

.create-auth-dialog{position:fixed;width:min(460px,calc(100% - 32px));max-height:85vh;overflow:auto;padding:32px;color:var(--text);background:#15272a;border:1px solid #5e755b;border-radius:16px;box-shadow:0 24px 70px #0009}.create-auth-dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}.create-auth-dialog h2{padding-right:24px}.create-auth-dialog p{font-size:14px;color:var(--muted)}.create-auth-dialog .auth-close{position:absolute;right:10px;top:8px;border:0;background:none;font-size:24px;padding:0 8px}.create-auth-dialog #auth-hint>a{display:block;padding:12px 16px;text-align:center;background:var(--accent);color:#193023;border-radius:7px;font-weight:700;text-decoration:none;margin:24px 0}.create-auth-dialog form{border-top:1px solid var(--line);padding-top:22px}.create-auth-dialog form button{width:100%}



/* Optional terrain treatment; classic layout remains available for comparison. */
.setup-style-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 40px 26px 0}.create-page .setup-style-heading .setup-title{margin:0}.setup-style-heading button{padding:6px 12px;font-size:12px;border-radius:20px;color:#d5dfbd;background:#17241d;border-color:#526048}.terrain-setup{--bg:#111a16;--surface:#202b23;--line:#43503b;--accent:#bfd393;--muted:#aeb8aa}.terrain-setup.embedded-setup{background:transparent}.terrain-setup .setup-panel{position:relative;border-radius:3px 18px 3px 18px;border-color:#536044;background:linear-gradient(135deg,#33403255,transparent 42%),linear-gradient(#263028,#19221d);box-shadow:0 7px 0 #101710,0 8px 0 #43503b,0 19px 22px #0008,inset 0 1px #adbd7933}.terrain-setup .setup-panel::before{content:'';position:absolute;left:25px;right:25px;top:0;height:1px;background:linear-gradient(90deg,transparent,#aab87577,transparent)}.terrain-setup input,.terrain-setup select{background:#101812;border-color:#55604c;border-radius:3px;box-shadow:inset 0 2px 4px #0004}.terrain-setup .map-image{background:#121b16}.terrain-setup .primary{background:linear-gradient(#d5b673,#b88a42);border-color:#e0be7a;color:#241b0f;border-radius:3px 12px 3px 12px;box-shadow:0 4px 0 #654626,0 9px 16px #0005}.terrain-setup .create-bottom{margin-top:36px}.terrain-setup .create-bottom>p{background:#101811bb;padding:8px 12px;border-radius:4px}.terrain-setup .setup-title{text-shadow:0 2px 6px #000}.terrain-setup .invite-preview{border-color:#46503e}.terrain-setup .create-auth-dialog{background:#1c271f;border-color:#66734d}@media(max-width:600px){.setup-style-heading{align-items:flex-start}.setup-style-heading button{white-space:nowrap}}

body.embedded-setup{background:transparent}

/* Searchable saved-army gallery, bounded to keep setup panels compact. */
#setup-army-list{display:grid;gap:16px;max-height:510px;overflow-y:auto;overflow-x:hidden;padding:5px 8px 12px;margin:14px -8px 0;scrollbar-width:thin}
#setup-army-list .saved-army{padding:16px;min-width:0}
#setup-army-list .tile-heading strong,#setup-army-list .tile-points{font-size:18px}
#setup-army-list .saved-army[aria-pressed=true]{outline:2px solid var(--army-faction);outline-offset:2px}
#setup-army-list .saved-army[aria-pressed=true] .tile-footer::after{content:' · Selected'}
#setup-army-preview.setup-roster{min-height:0}
.setup-selection{font-size:14px;color:var(--accent)}
.army-picker-order,#setup-army-count{font-size:12px;margin:0 0 12px;color:var(--muted)}
#setup-army-later{padding:8px 12px;font-size:13px}
#setup-army-later[aria-pressed=true]{border-color:var(--accent)}

/* Compact two-column previews, sized to the army panel rather than the page. */
#setup-army-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}
#setup-army-list .saved-army{padding:10px;overflow:hidden;container-type:inline-size}
#setup-army-list .tile-heading{gap:6px;padding-bottom:10px;align-items:flex-start;min-height:38px}
#setup-army-list .tile-heading strong{font-size:13px;line-height:1.3}
#setup-army-list .tile-points{font-size:14px;line-height:1.3}
#setup-army-list .army-miniatures{height:130px;height:105cqi;margin:12px 0 8px}
#setup-army-list .army-miniature{top:0;width:64%}
#setup-army-list .army-miniature img{max-height:130px;max-height:90cqi}
#setup-army-list .tile-footer{font-size:10px;line-height:1.5;padding-top:9px;margin-top:0}
@media(max-width:380px){#setup-army-list{grid-template-columns:1fr}}

/* Keep the gallery inside the original compact setup panel footprint. */
.setup-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.army-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:24px;min-height:17px}
.setup-panel .army-panel-heading h2.panel-step{margin:0}
.army-panel-heading #setup-army-later{font-size:10px;padding:4px 7px;white-space:nowrap;line-height:1.3}
#setup-army-list{max-height:330px;margin-top:0}
#setup-army-list .army-miniatures{height:115px;height:85cqi}
#setup-army-count{margin-top:6px}
#setup-army-preview:empty{display:none}

#setup-map-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start;max-height:330px;overflow-y:auto;overflow-x:hidden;padding:5px 8px 12px;margin:0 -8px;scrollbar-width:thin}
#setup-map-list .setup-map-tile{padding:10px;overflow:hidden;--army-faction:rgb(139 164 109)}
#setup-map-list .tile-heading{gap:6px;padding-bottom:10px;min-height:38px}
#setup-map-list .tile-heading strong{font-size:13px;line-height:1.3}
#setup-map-list .setup-map-tile>img{display:block;width:100%;height:130px;object-fit:contain;margin:12px 0;background:#172022;border-radius:4px}
#setup-map-list .tile-footer{font-size:10px;line-height:1.5;padding-top:9px;margin-top:0}
#setup-map-list .setup-map-tile[aria-pressed=true]{outline:2px solid var(--army-faction);outline-offset:2px}
#setup-map-list .setup-map-tile[aria-pressed=true] .tile-footer::after{content:' · Selected'}
#setup-map-count{font-size:12px;margin:6px 0 12px;color:var(--muted)}
.map-preview-empty{height:130px;padding-top:20px}
@media(max-width:380px){#setup-map-list{grid-template-columns:1fr}}

#setup-army-list .saved-army{position:relative}#setup-army-list .army-unavailable .army-miniatures{opacity:.45}#setup-army-list .army-limit-banner{position:absolute;top:48%;left:0;right:0;padding:7px 3px;margin:0;background:#8b2529f2;color:#fff2ee;font-size:11px;font-weight:700;text-align:center;pointer-events:none;z-index:110}


.setup-panel>#create-submit{display:block;width:100%;box-sizing:border-box;margin-top:22px}
.friend-invite-note{margin:0 0 16px;padding:10px 12px;border:1px solid #718952;border-radius:7px;background:#26372a;color:#d4eca9;font-size:14px;line-height:1.5}

/* Owner-only scenario picker */
.scenario-picker{margin:0 0 16px;padding:12px 14px;border:1px dashed #6f8f5c;border-radius:10px;background:rgba(111,143,92,.08)}
.scenario-heading{margin:0 0 4px;font-size:15px}
.scenario-note{margin:0 0 10px;color:#93a9ad;font-size:13px}
.scenario-buttons{display:flex;flex-wrap:wrap;gap:8px}
.scenario-button{padding:8px 12px;border:1px solid #496168;border-radius:8px;background:#1b2b30;color:#dce9ec;font:600 13px system-ui,sans-serif;cursor:pointer}
.scenario-button[aria-pressed=true]{outline:2px solid #c8e896;outline-offset:2px;background:#26393f}
.scenario-detail{margin-top:10px;font-size:13px;line-height:1.45}.scenario-detail p{margin:4px 0}
.scenario-warn{color:#e8c56b}

.settings-pair{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-pair>label{min-width:0}.settings-pair select{width:100%;min-width:0;padding-inline:8px}

/* Show more choices before the map and army lists scroll. */
#setup-map-list,#setup-army-list{max-height:620px}

/* Keep the home-page setup panels and their bases inside the dialog. */
@media(min-width:1001px){.embedded-setup #setup-map-list,.embedded-setup #setup-army-list{max-height:clamp(180px,calc(100dvh - 455px),620px)}}

.setting-picker{position:relative}.setting-picker-trigger{width:100%;text-align:left;padding:12px 28px 12px 8px;font:inherit;position:relative}.setting-picker-trigger::after{content:'⌄';position:absolute;right:10px}.setting-picker-menu{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:200;background:#17251d;border:1px solid #6d8055;border-radius:5px;padding:4px;box-shadow:0 10px 24px #0008}.setting-picker-menu[hidden]{display:none}.setting-picker-option{display:block;position:relative;width:100%;text-align:left;font:inherit;padding:10px 8px;border:0;background:transparent}.setting-picker-option:hover,.setting-picker-option:focus-visible,.setting-picker-option[aria-selected=true]{background:#35472b;color:#e3efca}.setting-picker-hint,.setting-option-hint{display:none;position:absolute;z-index:210;padding:10px 12px;width:240px;max-width:70vw;border:1px solid #8d9e6a;border-radius:6px;background:#18251e;color:#e3eccf;font-size:13px;line-height:1.5;box-shadow:0 5px 18px #0008;pointer-events:none;text-align:left;white-space:normal}.setting-picker-hint{top:calc(100% + 8px);right:0}.setting-option-hint{right:calc(100% + 10px);top:0}.setting-picker-trigger:hover+.setting-picker-hint,.setting-picker-trigger:focus-visible+.setting-picker-hint,.setting-picker-option:hover .setting-option-hint,.setting-picker-option:focus-visible .setting-option-hint{display:block}.setting-picker:has(.setting-picker-menu:not([hidden]))>.setting-picker-hint{display:none}

/* Hex army boxes in the army picker: two across, in a wider army column. */
@media(min-width:1001px){.setup-panels{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,.65fr)}}
.setup-panel:has(#setup-army-list){padding-left:18px;padding-right:18px}
.setup-panels .scenario-picker{grid-column:1/-1;margin:0}
#setup-army-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:640px;align-items:start}
#setup-army-list .saved-army{padding:0;overflow:hidden}
#setup-army-list .saved-army .tile-heading{gap:16px;padding:14px 16px 10px;min-height:0;align-items:baseline}
#setup-army-list .tile-heading strong,#setup-army-list .tile-points{font-size:18px;line-height:1.3}
.create-page{max-width:1760px}
.army-panel-heading{gap:8px}

/* Keep narrow-phone army tiles readable after the shared picker overrides. */
@media(max-width:380px){#setup-army-list{grid-template-columns:1fr}}
