.settings-dialog{width:min(480px,calc(100% - 36px));max-height:calc(100dvh - 32px);padding:24px;overflow-y:auto;overscroll-behavior:contain}.settings-dialog .dialog-heading{margin-bottom:18px}.settings-dialog h2{display:flex;align-items:center;gap:9px}.settings-dialog h2 svg{width:19px;height:19px}
.settings-theme-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px;font-size:12px}.settings-theme{display:flex;gap:4px}.settings-theme button{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:5px;font-size:12px}.settings-theme button svg{width:16px;height:16px}.settings-theme button[aria-pressed=true]{background:var(--green-soft);color:var(--green)}
.settings-theme-row{flex-wrap:wrap}.settings-theme{max-width:100%}.settings-theme button{justify-content:center;white-space:nowrap}
.settings-racing-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;padding-bottom:18px;margin-bottom:22px;border-bottom:1px solid var(--line);font-size:12px;cursor:pointer}.settings-racing-toggle input{width:16px;height:16px;flex-shrink:0;accent-color:var(--green);margin:0}
.settings-combo{border:0;border-bottom:1px solid var(--line);padding:0 0 20px;margin:0 0 22px;min-width:0}.settings-combo legend{font-size:12px;font-weight:550;margin-bottom:10px;padding:0}.settings-combo-toggle{display:flex;align-items:center;justify-content:space-between;font-size:12px;min-height:32px;gap:12px}.settings-combo-toggle input{width:16px;height:16px;accent-color:var(--green);margin:0}.settings-combo-label{display:flex;align-items:center;gap:8px;font-size:12px;min-height:32px}.settings-combo-label output{margin-left:auto;min-width:65px;text-align:right;font-variant-numeric:tabular-nums}.settings-combo-label .icon-button{width:30px;height:30px;flex-shrink:0}.settings-combo-label svg{width:15px;height:15px}.settings-combo input[type=range]{display:block;width:100%;margin:8px 0;accent-color:var(--green)}.settings-combo-scale{display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}
.palette-group{border:0;padding:0;margin:0 0 22px;min-width:0}.palette-group legend{font-size:12px;font-weight:550;padding:0;margin-bottom:14px}.palette-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.palette-choices[data-palette=hover]{grid-template-columns:repeat(6,minmax(0,1fr))}
.swatch-choice{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;cursor:pointer;font-size:11px;color:var(--muted)}.swatch-choice input{position:absolute;width:1px;height:1px;opacity:0;clip-path:inset(50%)}.palette-swatch{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;border:1px solid #00000010;flex-shrink:0}.swatch-choice input:checked+.palette-swatch{outline:2px solid var(--green);outline-offset:3px}.swatch-choice:has(input:checked){color:var(--text);font-weight:550}.swatch-choice input:focus-visible+.palette-swatch{outline:3px solid #609eec;outline-offset:3px}.swatch-choice:hover .palette-swatch{filter:brightness(.95)}.palette-swatch svg{width:17px;height:17px}
.hover-swatch{background:var(--hover-swatch)}.tile-swatch{background:var(--covered);box-shadow:inset 0 -3px 0 var(--tile-border)}.flag-swatch{background:var(--covered);color:var(--flag-color)}.flag-swatch svg{fill:var(--flag-color);stroke-width:1.6}.none-swatch{color:var(--muted);background:var(--tile-open)}
.settings-preview{border-top:1px solid var(--line);padding-top:18px;margin-top:4px}.settings-preview h3{font-size:12px;font-weight:550;margin:0 0 12px}.settings-preview .board{--cols:7;--cell:36px;--gap:3px}.settings-preview .cell{font-size:18px;cursor:default;transform:none!important}.settings-preview .cell:not(.open):hover{background:var(--covered)}
.settings-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);padding-top:18px;margin-top:20px}.settings-reset{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;padding:9px 0}.settings-reset:hover{color:var(--text)}.settings-reset svg{width:15px;height:15px}
@media(max-width:620px){.masthead .header-actions{gap:2px}.masthead .header-actions .icon-button{width:32px;height:36px}}
@media(max-width:400px){.settings-dialog{padding:20px 16px}.settings-dialog .dialog-heading{margin-bottom:14px}.settings-dialog .dialog-heading h2{font-size:18px}.settings-theme-row{margin-bottom:20px}.settings-theme button{padding:8px 10px}.palette-choices{gap:6px}.palette-swatch{width:28px;height:28px}.swatch-choice{font-size:10px;gap:8px}.settings-preview .board{--cell:30px}.settings-preview{padding-top:16px}.settings-actions{margin-top:18px;padding-top:16px}}
