.custom-editor{display:grid;gap:22px;color:#d0e3e6;font:inherit;text-align:left}
.custom-section{margin:0;padding:0;border:0}
.custom-section h3{font-size:12px;text-transform:uppercase;letter-spacing:.13em;color:#a4d6ce;margin:0 0 12px;font-weight:500}
.custom-map-card{display:flex;align-items:center;gap:20px;width:100%;padding:12px;text-align:left;background:#122331;border:1px solid #85c4bd;color:inherit;cursor:pointer}
.custom-map-card img{width:42%;height:130px;object-fit:contain;background:#09131e;pointer-events:none}
.custom-map-card strong,.custom-map-card small,.custom-rule strong,.custom-rule small{display:block}
.custom-map-card strong{font-size:19px;font-weight:500}.custom-map-card small{margin-top:8px;color:#9cb2be;font-size:12px}
.custom-section>label{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px}
.custom-section input[type=number]{width:76px;padding:8px;background:#101e29;border:1px solid #405966;color:#dfedee;font:inherit}
.custom-difficulties{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.custom-difficulties button{font:inherit;font-size:12px;padding:11px 8px;border:1px solid #354c59;background:#101e29;color:#b8cbd3;cursor:pointer}
.custom-difficulties button[aria-pressed=true]{border-color:#99d8c9;color:#c7eee4;background:#1c3c3e}
.custom-rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.custom-rule{display:flex;align-items:flex-start;gap:10px;padding:14px 12px;background:#101e29;border:1px solid #304450;cursor:pointer}
.custom-rule:has(input:checked){border-color:#689e93;background:#132e32}.custom-rule input{accent-color:#a4dcca;margin:2px 0 0;flex:none}
.custom-rule strong{font-size:13px;font-weight:500}.custom-rule small{font-size:11px;line-height:1.6;color:#9fb4bf;margin-top:6px}
.custom-editor :focus-visible{outline:2px solid #e5c883;outline-offset:3px}
.custom-editor :disabled{cursor:default}.custom-editor:has(input:disabled) .custom-rule{cursor:default}
#custom-game-dialog{width:min(650px,94vw);max-width:650px;max-height:90vh;padding:26px;background:#0b1822;color:#d0e3e6;border:1px solid #49646b;text-align:left}
#custom-game-dialog h2{margin:6px 0 22px;font-size:25px;font-weight:400}#custom-game-dialog::backdrop{background:#030a10c9}
.custom-actions{display:flex;gap:10px;justify-content:flex-end;position:sticky;bottom:-26px;margin:22px -26px -26px;padding:16px 26px;background:#0b1822;border-top:1px solid #304450;z-index:2}
.custom-actions button{padding:11px 20px;font:inherit;border:1px solid #598376;background:#183c38;color:#caeee4;cursor:pointer}
.custom-actions button:first-child{margin-right:auto;background:#10212b;border-color:#354c59}
@media(max-width:500px){.custom-rule-grid{grid-template-columns:1fr}.custom-map-card{gap:12px}.custom-map-card strong{font-size:16px}}

.custom-mode>button{width:50%;padding:12px;background:#122331;border:1px solid #49646b;color:inherit}.custom-mode button[aria-pressed=true]{background:#1c3c3e;border-color:#99d8c9}.custom-difficulties[hidden]{display:none}

/* Compact shared setup. Selection groups retain their nodes during lobby updates. */
.custom-editor{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
.custom-map-section,.custom-options-section{grid-column:1/-1}
.custom-map-card{padding:10px;gap:18px;min-height:96px;cursor:default}
.custom-map-card img{width:130px;height:80px}.custom-map-card small{font-size:14px}
.custom-map-card caption{min-width:0}
.custom-mode-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.custom-mode-choices button,.custom-difficulties button{min-height:44px;font:inherit;font-size:14px;padding:10px 6px;border:1px solid #45616c;background:#101e29;color:#c5d8de;cursor:pointer}
.custom-editor button[aria-checked=true]{background:#1c3c3e;border-color:#99d8c9;color:#d6f5ec}
.custom-editor button[aria-checked=true]::before{content:'✓ ';font-weight:bold}
.custom-section>label{font-size:14px}.custom-section input[type=number]{min-height:44px}
.custom-rule{align-items:center;min-height:52px;padding:12px}.custom-rule strong{font-size:14px}
.custom-rule-grid .custom-rule:first-child{grid-column:1/-1}
.custom-rule input{width:18px;height:18px;margin:0}.custom-rule span{flex:1}
.custom-rule:after{content:'Off';font-size:12px;color:#b1c3cd}.custom-rule:has(input:checked):after{content:'On';color:#c0ebdd}
#custom-game-dialog{width:min(850px,94vw);max-width:850px;overflow:hidden;max-height:90vh;box-sizing:border-box}
#custom-game-dialog[open]{display:flex;flex-direction:column}
#custom-game-dialog h2{flex:none;margin:0 0 20px}
#solo-custom-editor{overflow:auto;padding:4px;min-height:0}
.custom-actions{position:static;flex:none;margin-top:20px;bottom:auto}
@media(max-width:600px){.custom-editor{grid-template-columns:1fr;gap:20px}.custom-rule-grid{grid-template-columns:1fr}.custom-map-card img{width:100px}.custom-map-card strong{font-size:18px}#custom-game-dialog{padding:20px}.custom-actions{margin:18px -20px -20px;padding:14px 20px}}
