/* A compact configuration sheet: choose first, launch once. */
#modal:has(.custom-game){width:calc(100% - 32px);max-width:850px;max-height:calc(100dvh - 32px);padding:30px 32px 24px;overflow-y:auto;border-radius:28px;box-sizing:border-box}
.custom-game{color:var(--text);text-align:left}
.custom-game .custom-game-heading{gap:19px;margin:0 28px 26px 0}
.custom-game .custom-game-heading>.club-cat-art{width:84px;height:84px}
.custom-game .custom-game-heading h2{font-family:var(--club-title-font);font-size:clamp(24px,3.4vw,32px);letter-spacing:-.8px;margin:6px 0 8px;line-height:1.15}
.custom-game .custom-game-heading p{font-size:13px;color:var(--sub);line-height:1.5}
.custom-game-options{display:grid;grid-template-columns:1fr 1.15fr;gap:30px}
.custom-game fieldset{padding:0;margin:0;min-width:0;border:0}
.custom-game legend{display:flex;align-items:center;gap:10px;width:100%;font-size:14px;font-weight:700;padding:0;margin-bottom:14px}
.custom-game legend>span{font-size:11px;color:var(--sub);font-weight:400;margin-left:auto}
.custom-sizes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.custom-size,.custom-mode{position:relative;display:block;cursor:pointer}
.custom-size input,.custom-mode input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.custom-size>span{position:relative;display:grid;place-items:center;height:59px;border:1px solid var(--club-line);border-radius:14px;background:var(--club-bg);transition:background .16s,border-color .16s,box-shadow .16s}
.custom-size:last-child{grid-column:span 2}
.custom-size b{font-size:17px;font-weight:750;white-space:nowrap}
.custom-size b i{font-style:normal;font-size:12px;opacity:.5}
.custom-size svg{position:absolute;top:5px;right:5px;width:11px;height:11px;fill:none;stroke:var(--mint);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.custom-size input:checked+span{background:color-mix(in srgb,var(--mint) 13%,var(--surface));border-color:var(--mint);box-shadow:inset 0 0 0 1px var(--mint)}
.custom-size input:checked+span svg{opacity:1}
.custom-size:hover>span,.custom-mode:hover>.custom-mode-body{border-color:var(--mint)}
.custom-size input:focus-visible+span,.custom-mode input:focus-visible+.custom-mode-body{outline:3px solid var(--mint);outline-offset:3px}
.custom-format-preview{display:flex;gap:17px;align-items:center;margin-top:19px;min-height:78px}
.custom-mini-grid{width:74px;height:74px;flex:none;display:grid;grid-template-columns:repeat(var(--preview-size),1fr);gap:2px;padding:4px;box-sizing:border-box;border-radius:12px;background:var(--surface);border:1px solid var(--club-line);transform:rotate(-5deg);box-shadow:0 4px 0 color-mix(in srgb,var(--club-line) 65%,transparent)}
.custom-mini-grid i{border-radius:2px;background:color-mix(in srgb,var(--mint) 52%,var(--surface))}
.custom-mini-grid i:nth-child(3n){background:color-mix(in srgb,var(--orange) 70%,var(--surface))}
.custom-mini-grid i:nth-child(5n){background:#b6a3d5}
.custom-format-preview>div:last-child{display:grid;gap:7px}
.custom-format-preview b{font-size:16px}.custom-format-preview span{font-size:12px;color:var(--sub)}
.custom-game .custom-format-note{margin:14px 0 0;font-size:11px;color:var(--sub);line-height:1.5}
.custom-modes{display:grid;gap:9px}
.custom-mode-body{display:flex;gap:12px;align-items:center;min-height:67px;box-sizing:border-box;padding:10px 12px;border:1px solid var(--club-line);background:var(--club-bg);border-radius:16px;transition:border-color .16s,background .16s}
.custom-mode input:checked+.custom-mode-body{border-color:var(--mint);background:color-mix(in srgb,var(--mint) 8%,var(--surface));box-shadow:inset 0 0 0 1px var(--mint)}
.custom-mode-symbol{display:grid;place-items:center;flex:none;width:36px;height:36px;background:color-mix(in srgb,var(--mint) 12%,var(--surface));border-radius:12px;font-family:var(--club-title-font);font-size:23px;color:var(--mint)}
.custom-mode:nth-child(2) .custom-mode-symbol{color:#bc7850;background:color-mix(in srgb,var(--orange) 17%,var(--surface))}
.custom-mode:nth-child(3) .custom-mode-symbol{color:#ac7fbb;background:color-mix(in srgb,#b6a3d5 17%,var(--surface))}
.custom-mode-copy{display:grid;gap:6px;min-width:0}.custom-mode-copy b{font-size:14px}.custom-mode-copy small{color:var(--sub);font-size:11px;line-height:1.35}
.custom-choice-dot{margin-left:auto;width:15px;height:15px;border:1px solid var(--club-line);border-radius:50%;flex:none;box-sizing:border-box}
.custom-mode input:checked+.custom-mode-body .custom-choice-dot{border:4px solid var(--mint);background:var(--surface)}
.custom-game .custom-help-note{font-size:12px;line-height:1.6;min-height:20px;margin:19px 0 20px;padding:10px 14px;border-radius:12px;background:var(--club-bg);color:var(--sub)}
.custom-game-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;width:auto;max-width:none;margin:0;padding:19px 0 0;border-top:1px solid var(--club-line);letter-spacing:normal}
.custom-game-footer>div{display:grid;gap:6px}.custom-game-footer>div>span{font-size:11px;color:var(--sub)}
.custom-game-footer output{font-size:15px;font-weight:700}
.custom-game-footer .custom-start{min-height:52px;margin:0;padding:14px 23px;font-size:14px;display:flex;align-items:center;justify-content:center;gap:25px;border-radius:16px}
@media(max-width:600px){
 #modal:has(.custom-game){padding:23px 19px 20px;width:calc(100% - 20px);max-height:calc(100dvh - 20px);border-radius:23px}
 .custom-game .custom-game-heading{gap:10px;margin:0 14px 20px 0}.custom-game .custom-game-heading>.club-cat-art{width:58px;height:67px}
 .custom-game .custom-game-heading h2{font-size:23px;letter-spacing:-.7px;margin:6px 0}.custom-game .custom-game-heading small{font-size:7px;letter-spacing:1.1px}.custom-game .custom-game-heading p{font-size:11px}
 .custom-game-options{grid-template-columns:1fr;gap:19px}.custom-game legend{font-size:13px;margin-bottom:10px}
 .custom-size>span{height:48px;border-radius:12px}.custom-size b{font-size:17px}
 .custom-format-preview{display:none}.custom-game .custom-format-note{margin-top:9px;font-size:11px}
 .custom-modes{gap:7px}.custom-mode-body{min-height:59px;padding:8px 11px;gap:11px}.custom-mode-symbol{width:32px;height:32px;font-size:22px}.custom-mode-copy{gap:4px}
 .custom-game .custom-help-note{margin:13px 0;padding:9px 11px;font-size:11px;min-height:34px;box-sizing:border-box}
 .custom-game-footer{display:grid;grid-template-columns:minmax(0,1fr);justify-content:normal;gap:13px;padding-top:13px}.custom-game-footer>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.custom-game-footer output{font-size:13px}
 .custom-game-footer .custom-start{width:100%;min-height:50px}
}
@media(max-width:600px) and (max-height:720px){
 #modal:has(.custom-game){padding:18px}
 .custom-game .custom-game-heading{margin-bottom:14px}.custom-game .custom-game-heading p,.custom-game .custom-format-note{display:none}
 .custom-game-options{gap:14px}.custom-game legend{margin-bottom:8px}
 .custom-game .custom-help-note{margin:11px 0}
}
@media(prefers-reduced-motion:reduce){.custom-game *{transition:none!important}}
:root[data-motion='reduced'] .custom-game *{transition:none!important}
