:root{color-scheme:dark;--bg: #0e1116;--surface: #171b22;--surface-2: #13171d;--surface-empty: #1a1f27;--border: #2a303b;--border-soft: #252b35;--text: #edeef0;--text-muted: #8b93a5;--text-dim: #6b7385;--accent: #3e63dd;--accent-text: #ffffff;--pin-bg: #aeb4be;--pin-exact: #0e1116;--pin-partial-fill: #ffffff;--pin-partial-ring: #0e1116;--pin-none: #6e7582;--radius: 14px;--carry-ring: #edeef0;--carry-badge-bg: #edeef0;--carry-badge-fg: #0e1116;--font: "Space Grotesk", system-ui, sans-serif;--mono: "IBM Plex Mono", ui-monospace, monospace}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.app{height:100%;max-width:480px;margin:0 auto;display:flex;flex-direction:column;padding:max(20px,env(safe-area-inset-top)) 16px max(20px,env(safe-area-inset-bottom));gap:14px}.header{display:flex;align-items:center;justify-content:space-between;gap:12px}.title{font-size:22px;font-weight:700;letter-spacing:-.02em;margin:0}.subtitle{font-family:var(--mono);font-size:12px;color:var(--text-muted);margin-top:2px}.icon-btn{width:44px;height:44px;flex-shrink:0;border-radius:12px;border:1px solid var(--border);background:var(--surface);color:var(--text);display:flex;align-items:center;justify-content:center}.legend{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:12px;color:#a9b0be}.legend-item{display:flex;align-items:center;gap:6px}.legend-chip{width:22px;height:22px;border-radius:6px;background:var(--pin-bg);display:flex;align-items:center;justify-content:center}.board{flex:1;min-height:0;display:flex;flex-direction:column-reverse;gap:6px;overflow-y:auto;overscroll-behavior:contain;border-radius:var(--radius);scrollbar-width:thin}.row{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:var(--radius);background:var(--surface-2);border:1.5px solid transparent;flex-shrink:0}.row--current{background:var(--surface);border-color:var(--accent)}.row-num{width:18px;font-family:var(--mono);font-size:12px;color:var(--text-dim);flex-shrink:0}.pegs{flex:1;min-width:0;display:grid;grid-template-columns:repeat(var(--fields),minmax(0,1fr));gap:var(--peg-gap, 8px);justify-items:center}.peg{width:100%;max-width:var(--peg-max, 40px);aspect-ratio:1;border-radius:50%;border:none;padding:0;display:flex;align-items:center;justify-content:center;font:700 var(--peg-font, 14px) var(--font);box-shadow:inset 0 -3px #0000002e}.peg--empty{background:var(--surface-empty);border:1.5px solid var(--border-soft);box-shadow:none}.peg--slot{background:transparent;border:2px dashed #5b6475;box-shadow:none}.peg--blank{background:transparent;border:2px dashed #c3c8d0;color:#c3c8d0;box-shadow:none}.peg--secret{background:var(--surface);border:1.5px solid var(--border);color:var(--text-dim);box-shadow:none}.pins{display:grid;grid-template-columns:repeat(var(--pin-cols),13px);grid-auto-rows:13px;gap:3px;place-items:center;flex-shrink:0;background:var(--pin-bg);border-radius:10px;padding:5px 6px}.pin{width:12px;height:12px;border-radius:50%}.pin--exact{background:var(--pin-exact)}.pin--partial{background:var(--pin-partial-fill);border:2px solid var(--pin-partial-ring)}.pin--none{width:5px;height:5px;background:var(--pin-none)}.palette{display:grid;grid-template-columns:repeat(var(--palette-cols),minmax(0,1fr));gap:8px}.palette-btn{height:48px;border-radius:12px;border:none;font:700 15px var(--font);box-shadow:inset 0 -3px #0000002e}.palette-btn--blank{background:transparent;border:2px dashed #c3c8d0;color:#c3c8d0;box-shadow:none}.palette-btn:disabled{opacity:.4}.actions{display:flex;gap:10px}.btn{height:52px;border-radius:var(--radius);font-size:16px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-weight:500}.btn--primary{border:none;background:var(--accent);color:var(--accent-text);font-weight:700}.btn--primary:disabled{background:#26304a;color:#7b86a3}.btn--grow1{flex:1}.btn--grow2{flex:2}.settings{overflow-y:auto}.card{background:var(--surface);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:10px}.card-head{display:flex;justify-content:space-between;align-items:baseline}.card-title{font-weight:700}.card-range{font-family:var(--mono);font-size:13px;color:var(--text-muted)}.chips{display:grid;grid-template-columns:repeat(var(--chip-cols),minmax(0,1fr));gap:6px}.chip{height:44px;border-radius:10px;font:700 15px var(--font);background:var(--bg);color:#c9ced8;border:1px solid var(--border)}.chip[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent)}.swatches{display:flex;flex-wrap:wrap;gap:6px}.swatch{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font:700 11px var(--font)}.toggles{padding:4px 14px;gap:0}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;border-bottom:1px solid #222832}.toggle-row:last-child{border-bottom:none}.toggle-label{font-weight:500}.toggle-hint{font-size:12px;color:var(--text-muted);margin-top:2px}.switch{width:52px;height:32px;border-radius:16px;border:none;padding:3px;flex-shrink:0;display:flex;background:var(--border);justify-content:flex-start;transition:background .15s}.switch[aria-checked=true]{background:var(--accent);justify-content:flex-end}.switch:disabled{opacity:.4}.switch-knob{width:26px;height:26px;border-radius:50%;background:#fff}.summary{border:1.5px solid var(--border);border-radius:16px;padding:14px;display:flex;justify-content:space-between;align-items:center;gap:12px}.summary-stats{display:flex;gap:18px}.stat-label{font-size:12px;color:var(--text-muted)}.stat-value{font-family:var(--mono);font-size:18px;margin-top:2px}.level{padding:8px 12px;border-radius:10px;font-weight:700;font-size:14px;color:var(--bg)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#05070ab8;display:flex;align-items:flex-end;justify-content:center;padding:16px;z-index:10}.dialog{width:100%;max-width:448px;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:22px 18px;display:flex;flex-direction:column;gap:16px}.dialog h2{margin:0;font-size:24px}.dialog p{margin:0;color:var(--text-muted)}.secret{display:grid;grid-template-columns:repeat(var(--fields),minmax(0,1fr));gap:6px;justify-items:center}.peg,.palette-btn,.board{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.peg{position:relative;touch-action:manipulation}.peg--carried{outline:2.5px solid var(--carry-ring);outline-offset:2px}.peg--slot.peg--carried{border-style:solid;border-color:var(--carry-ring)}.peg-anchor{position:absolute;top:-5px;right:-5px;width:17px;height:17px;border-radius:50%;background:var(--carry-badge-bg);color:var(--carry-badge-fg);border:1.5px solid var(--bg);display:flex;align-items:center;justify-content:center;pointer-events:none}.legend-anchor{width:22px;height:22px;border-radius:50%;background:var(--carry-badge-bg);color:var(--carry-badge-fg);display:flex;align-items:center;justify-content:center}
