:root{--bg:#164552;--surface:#193b46;--glow:#215560;--text:#fff;--muted:#b9cdd1;--line:#4d7079;--chip:#214650;--chip-active:#2c5965;--chip-line:#73939b;--key:#335c68;--key-hover:#406f7c;--key-border:#73939b;--key-shadow:#0d2a33;--placed:#28663f;--placed-border:#83c69b;--elsewhere:#a12d43;--elsewhere-border:#f3909f;--absent:#46545c;--absent-border:#9aabb3}:root[data-theme=night]{--bg:#102b33;--surface:#17353e;--glow:#1b3e48;--text:#fff;--muted:#b6cace;--line:#49646e;--chip:#1c3a44;--chip-active:#2b4c57;--chip-line:#68828d;--key:#294b58;--key-hover:#365f6e;--key-border:#69848e;--key-shadow:#081e25}:root[data-theme=contrast]{--bg:#081b22;--surface:#102b34;--glow:#102b34;--text:#fff;--muted:#dfebef;--line:#bbd0d8;--chip:#13333f;--chip-active:#244d60;--chip-line:#bbd0d8;--key:#163b48;--key-hover:#27566a;--key-border:#bbd0d8;--key-shadow:#030c11;--placed:#17522f;--placed-border:#a3e1b3;--elsewhere:#8c1833;--elsewhere-border:#ffb3c2;--absent:#384650;--absent-border:#d1e0e9}*{box-sizing:border-box}html{min-width:280px;background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;line-height:1.5;color-scheme:dark}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 50% 10%,var(--glow),transparent 75%)}button,select,input,textarea{font:inherit}button,a,select,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;background:var(--key);border:1px solid var(--key-border);color:var(--text);border-radius:9px;min-height:44px;touch-action:manipulation}button:disabled{cursor:default;opacity:.6}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,.board:focus-visible{outline:3px solid white;outline-offset:4px}button:hover{background:var(--key-hover);border-color:var(--text)}button:active{transform:translateY(3px) scale(.95)}h1,h2,h3,p{margin:0}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.site-wrap{width:min(680px,100%);padding:0 24px;margin:auto}.masthead{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:105px;gap:12px}.masthead h1{grid-column:2;font-size:2.75rem;font-weight:750;letter-spacing:-1.8px;line-height:1.2;text-align:center}.masthead a{color:#fff;text-decoration:none}.masthead nav{grid-column:3;display:flex;justify-content:flex-end;gap:2px}nav button{display:grid;place-items:center;width:44px;height:44px;background:transparent;border:1px solid transparent;font-size:1.25rem}main{padding-top:10px}.game-shell{max-width:570px;margin:auto}.challenge-heading{display:flex;align-items:baseline;justify-content:center;gap:18px;color:var(--muted);font-size:.8rem}.challenge-heading h2{font-size:.8rem;font-weight:500}.puzzle-number{font-variant-numeric:tabular-nums;color:var(--text)}.length-badge strong{font-weight:500}.game-meta{text-align:center;font-size:.65rem;color:var(--muted);margin:5px 0 21px}.board{width:100%;outline:none;border-radius:8px;display:flex;flex-direction:column;gap:8px}.guess-row{width:100%;min-width:0}.chips{display:flex;justify-content:center;gap:7px;margin:auto;perspective:700px}.chip{--result:var(--chip);display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 1 54px;min-width:0;aspect-ratio:1/1.06;min-height:38px;border:1px solid var(--chip-line);border-radius:8px;background:var(--chip);font-size:1.65rem;font-weight:700;line-height:1;transform-origin:center;backface-visibility:hidden}.chip:not(.filled){opacity:.37}.chip.filled{border-color:var(--muted)}.active .chip.filled{border-color:var(--text);background:var(--chip-active)}.chip small{font-size:.6rem;margin-top:6px;line-height:1}.chip.placed,.key.placed,.legend-symbol.placed{--result:var(--placed);background:var(--placed);border-color:var(--placed-border);color:#fff}.chip.elsewhere,.key.elsewhere,.legend-symbol.elsewhere{--result:var(--elsewhere);background:var(--elsewhere);border-color:var(--elsewhere-border);color:#fff}.chip.absent,.key.absent,.legend-symbol.absent{--result:var(--absent);background:var(--absent);border-color:var(--absent-border);color:#fff}.mini-legend{display:flex;justify-content:center;align-items:center;gap:16px;flex-wrap:wrap;color:var(--muted);font-size:.65rem;margin:17px 0 0}.mini-legend>span{display:flex;align-items:center;gap:6px}.legend-symbol{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:18px;border:1px solid transparent;border-radius:5px;font-size:.65rem}.notice{min-height:43px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.75rem;padding:8px 0;color:var(--text)}.storage-notice{text-align:center;font-size:.75rem;margin:0 0 14px;color:var(--muted)}.keyboard{width:100%;margin:0 auto;max-width:560px}.key-row{display:flex;justify-content:center;gap:5px;margin:0 auto 6px}.key-row:nth-child(2){width:90%}.key-row:nth-child(3){width:70%}.key{flex:1;min-width:0;max-width:51px;height:49px;padding:0;border-radius:9px;background:var(--key);border-color:var(--key-border);box-shadow:0 3px 0 var(--key-shadow);font-size:.9rem;font-weight:650;display:flex;align-items:center;justify-content:center}.keycap{display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}.keycap small{font-size:.5rem;margin-top:5px}.key:hover{filter:brightness(1.15)}.action-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:8px;margin-top:12px}.action-row button{min-width:0;min-height:46px;padding:10px 8px;font-size:.8rem;font-weight:650;overflow-wrap:anywhere;box-shadow:0 3px 0 var(--key-shadow)}.action-row button span{display:inline-block}.primary{background:#fff;color:#14353d;border-color:#fff;padding:10px 20px;font-weight:650}.primary:hover{background:#fff;color:#14353d;filter:brightness(.94)}footer{text-align:center;color:var(--muted);font-size:.6rem;padding:25px 0 max(22px,env(safe-area-inset-bottom));margin-top:5px}.result{text-align:center;margin-top:3px;min-width:0}.result h2{font-size:1rem;font-weight:500}.result .answer{font-size:1.9rem;font-weight:700;letter-spacing:-.6px;color:#fff;margin:5px 0}.result p{font-size:.75rem;color:var(--muted)}.result .reset{margin:16px 0;font-variant-numeric:tabular-nums}.share-fallback{display:block;text-align:left;margin-top:18px;font-size:.75rem}textarea{display:block;width:100%;min-height:150px;background:var(--bg);color:var(--text);padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:8px}dialog{width:min(480px,calc(100% - 28px));max-height:calc(100dvh - 32px);overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:16px;padding:0;box-shadow:0 25px 90px #0007}dialog::backdrop{background:#061e28c9;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.dialog-content{padding:24px}.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.dialog-header h2{font-size:1.4rem;letter-spacing:-.5px;font-weight:650;min-width:0;overflow-wrap:anywhere}.dialog-header button{border:0;width:44px;font-size:1.6rem;background:transparent;flex-shrink:0}.help-copy{font-size:.8rem;line-height:1.8}.help-copy>p+p{margin-top:16px}.help-legend{background:var(--bg);padding:12px;border-radius:10px;margin:18px 0}.help-legend p{margin:8px 0}.help-legend .legend-symbol{margin-right:8px}.settings-form{display:flex;flex-direction:column;gap:24px;font-size:.85rem}.settings-form>label:not(.toggle-label){display:flex;flex-direction:column;gap:8px}select{background:var(--bg);color:var(--text);border:1px solid var(--key-border);padding:12px;border-radius:8px;min-height:46px;max-width:100%}.toggle-label{display:flex;gap:16px;align-items:center;justify-content:space-between}.toggle-label small{display:block;font-size:.7rem;color:var(--muted);margin-top:6px}.toggle-label input{width:22px;height:22px;accent-color:var(--placed);flex-shrink:0;margin:11px}.muted{color:var(--muted);font-size:.8rem}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:25px 0}.stat-grid div{display:flex;flex-direction:column;text-align:center}.stat-grid strong{font-size:1.7rem;color:#fff}.stat-grid span{font-size:.65rem;color:var(--muted);overflow-wrap:anywhere}.dialog-content h3{font-size:.85rem;font-weight:600;margin-bottom:14px}.distribution>div{display:flex;gap:12px;align-items:center;margin:8px 0;font-size:.75rem}.distribution meter{flex:1;min-width:0;height:22px;accent-color:var(--placed)}.distribution b{min-width:18px}.text-button{padding:8px 15px;margin-top:24px;font-size:.75rem}.reset-confirm{padding:15px 0;font-size:.8rem}.reset-confirm button{margin:14px 8px 0 0;padding:8px}.recovery{padding:40px}.chips-9,.chips-10,.chips-11,.chips-12{gap:4px}.chips-9 .chip,.chips-10 .chip,.chips-11 .chip,.chips-12 .chip{font-size:1.2rem}@keyframes type-jiggle{0%{transform:scale(.9) rotate(-5deg)}45%{transform:scale(1.13) rotate(3deg)}75%{transform:scale(.98) rotate(-2deg)}to{transform:scale(1) rotate(0)}}@keyframes tile-flip{0%{transform:rotateX(0);background:var(--chip-active);border-color:var(--muted)}46%{transform:rotateX(90deg);background:var(--chip-active)}54%{transform:rotateX(90deg);background:var(--result)}83%{transform:rotateX(-12deg)}to{transform:rotateX(0);background:var(--result)}}@keyframes key-bounce{0%{transform:translateY(0) scale(1)}25%{transform:translateY(3px) scale(.8)}60%{transform:translateY(-4px) scale(1.17)}85%{transform:translateY(1px) scale(.97)}to{transform:translateY(0) scale(1)}}@keyframes reject-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-5px)}40%,80%{transform:translate(5px)}}@media(prefers-reduced-motion:no-preference){html:not([data-motion=reduce]) button{transition:background .15s,transform .18s cubic-bezier(.2,.8,.2,1.4),border-color .15s}html:not([data-motion=reduce]) .pop{animation:type-jiggle .25s ease-out}html:not([data-motion=reduce]) .reveal{animation:tile-flip .46s ease-in-out both}html:not([data-motion=reduce]) .reveal:nth-child(2){animation-delay:80ms}html:not([data-motion=reduce]) .reveal:nth-child(3){animation-delay:.16s}html:not([data-motion=reduce]) .reveal:nth-child(4){animation-delay:.24s}html:not([data-motion=reduce]) .reveal:nth-child(5){animation-delay:.32s}html:not([data-motion=reduce]) .reveal:nth-child(6){animation-delay:.4s}html:not([data-motion=reduce]) .reveal:nth-child(7){animation-delay:.48s}html:not([data-motion=reduce]) .reveal:nth-child(8){animation-delay:.56s}html:not([data-motion=reduce]) .reveal:nth-child(9){animation-delay:.64s}html:not([data-motion=reduce]) .reveal:nth-child(10){animation-delay:.72s}html:not([data-motion=reduce]) .reveal:nth-child(11){animation-delay:.8s}html:not([data-motion=reduce]) .reveal:nth-child(12){animation-delay:.88s}html:not([data-motion=reduce]) .bounce{animation:key-bounce .3s cubic-bezier(.2,.7,.3,1.3)}html:not([data-motion=reduce]) .shake{animation:reject-shake .28s ease}}@media(prefers-reduced-motion:reduce){button:active{transform:none}}html[data-motion=reduce] button:active{transform:none}@media(max-width:620px){.site-wrap{padding:0 14px}.masthead{grid-template-columns:1fr;justify-items:center;gap:7px;padding:20px 0 8px}.masthead h1{grid-column:1;font-size:2.5rem}.masthead nav{grid-column:1;justify-content:center}main{padding-top:7px}.game-meta{margin-bottom:17px}.chip{flex-basis:49px;font-size:1.45rem}.chips{gap:5px}.key-row{gap:4px}.key{font-size:.8rem;min-height:46px;height:46px}.mini-legend{font-size:.6rem;gap:12px}footer{font-size:.55rem}.chips-9,.chips-10,.chips-11,.chips-12{gap:3px}.chips-9 .chip,.chips-10 .chip,.chips-11 .chip,.chips-12 .chip{font-size:.95rem}.dialog-content{padding:20px}}@media(max-width:360px){.site-wrap{padding:0 12px}.masthead{padding-top:15px}.masthead h1{font-size:2.2rem}.chips{gap:4px}.chip{font-size:1.3rem}.key{font-size:.75rem;min-width:24px}.key-row{gap:3px}.action-row button{font-size:.75rem}.mini-legend{gap:9px;font-size:.55rem}.chips-9,.chips-10,.chips-11,.chips-12{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;width:100%}.chips-9 .chip,.chips-10 .chip,.chips-11 .chip,.chips-12 .chip{font-size:1rem;aspect-ratio:1/1.06}.stat-grid strong{font-size:1.4rem}}@media(forced-colors:active){.chip,.key,.legend-symbol{border:1px solid CanvasText}.chip:not(.filled){opacity:1}}
