:root{--parchment:#f1e4c3;--parchment-dark:#e2cf9f;--parchment-deep:#cdb67f;--ink:#3a2a16;--ink-soft:#6b5434;--edge:#a98a4f;--correct:#5e8c4a;--present:#d6a22b;--absent:#8a8170;--danger:#a63a2a;--accent:#7a3e1d;color:var(--ink);font-family:Georgia,Palatino Linotype,Book Antiqua,serif;font-size:16px}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{overscroll-behavior:none;background:#cdb67f;height:100%;margin:0}#app{justify-content:center;height:100dvh;display:flex}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.game{background:radial-gradient(circle at 50% 0, #f8edd0, var(--parchment));width:100%;max-width:480px;height:100%;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);flex-direction:column;display:flex;position:relative;box-shadow:0 0 24px #3a2a1659}.topbar{border-bottom:2px solid var(--edge);flex:none;align-items:center;gap:10px;padding:6px 10px;display:flex}.title{letter-spacing:.06em;font-variant:small-caps;color:var(--accent);margin:0;font-size:1.3rem}.puzzle{color:var(--ink-soft);flex:1;font-size:.9rem}.paper{background:var(--parchment-dark);border:1px solid var(--edge);border-radius:999px;align-items:center;gap:4px;padding:2px 10px;font-size:1.15rem;font-weight:700;display:flex}.menu-btn{background:0 0;border:1px solid #0000;border-radius:8px;width:40px;height:40px;font-size:1.2rem}.menu{z-index:5;background:var(--parchment);border:2px solid var(--edge);border-radius:10px;flex-direction:column;display:flex;position:absolute;top:52px;right:8px;overflow:hidden;box-shadow:0 6px 16px #3a2a1666}.menu button{border:0;border-bottom:1px solid var(--parchment-deep);text-align:left;background:0 0;min-height:44px;padding:12px 16px}.menu button:last-child{border-bottom:0}.history{scroll-behavior:auto;flex:1 1 0;min-height:0;padding:10px 8px;overflow-y:auto}.rows{flex-direction:column;justify-content:flex-start;align-items:center;gap:5px;display:flex}.row{align-items:center;gap:8px;display:flex}.tiles{grid-template-columns:repeat(5,46px);gap:5px;display:grid}.tile{border:2px solid var(--edge);background:var(--parchment);text-transform:uppercase;border-radius:6px;justify-content:center;align-items:center;height:46px;font-size:1.6rem;font-weight:700;display:flex}.tile-typed{border-color:var(--ink);background:#fbf3dc}.tile-correct{background:var(--correct);border-color:var(--correct);color:#fff}.tile-present{background:var(--present);border-color:var(--present);color:#2b1d05}.tile-absent{background:var(--absent);border-color:var(--absent);color:#fff}.slot{border-radius:50%;flex-direction:column;justify-content:center;align-items:center;width:46px;height:46px;font-size:1.3rem;line-height:1;display:flex}.slot-empty{border:2px dashed var(--edge)}.slot-modifier{border:2px solid var(--accent);background:#fbf3dc;box-shadow:0 0 0 3px #7a3e1d33}.slot-used{width:56px;color:var(--ink-soft);border-radius:8px;gap:1px;font-size:.95rem}.slot-cost{font-variant-numeric:tabular-nums;font-size:.75rem;font-weight:700}.row-active .tiles{outline:2px solid #0000}.dock{border-top:2px solid var(--edge);background:var(--parchment-dark);flex:none;padding:6px 6px 8px}.costline{text-align:center;flex-wrap:wrap;justify-content:center;align-items:center;gap:2px 10px;min-height:1.7rem;padding-bottom:4px;font-size:.82rem;display:flex}.cost{font-weight:700}.cost-warn{color:var(--danger)}.message{color:var(--accent)}.stuck{color:var(--danger);font-weight:700}.link{color:var(--danger);background:0 0;border:0;min-height:32px;padding:4px 6px;font-weight:700;text-decoration:underline}.keyboard{flex-direction:column;gap:5px;display:flex}.key-row{justify-content:center;gap:4px;display:flex}.key{border:1px solid var(--edge);background:#f8edd0;border-radius:6px;flex-direction:column;flex:1 1 0;justify-content:center;align-items:center;max-width:40px;height:44px;padding:0 0 4px;display:flex;position:relative;overflow:hidden}.key-wide{flex:1.4 1 0;max-width:52px}.key .ch{font-size:1.05rem;font-weight:700;line-height:1.1}.key .price{color:var(--accent);font-variant-numeric:tabular-nums;font-size:.68rem;font-weight:700;line-height:1}.key.owned{background:var(--parchment-deep);box-shadow:inset 0 0 0 1px var(--ink-soft)}.key.owned .price{color:var(--ink-soft)}.key[class*=status-]:after{content:"";height:5px;position:absolute;bottom:0;left:0;right:0}.key.status-correct:after{background:var(--correct)}.key.status-present:after{background:var(--present)}.key.status-absent:after{background:var(--absent)}.key.status-absent .ch{opacity:.4;text-decoration:line-through}.key:disabled{opacity:.6}.controls{gap:10px;margin-top:8px;display:flex}.ctl{border:2px solid var(--ink);border-radius:10px;flex:1;height:52px;font-size:2rem;font-weight:700;line-height:1}.ctl-submit{background:var(--correct);color:#fff;border-color:#3f6330;flex:2}.ctl-clear{color:var(--danger);border-color:var(--danger);background:#f8edd0}.ctl:disabled{opacity:.45}.tray-buttons{gap:6px;margin-top:8px;display:flex}.modifier{border:2px solid var(--edge);background:#f8edd0;border-radius:10px;flex:1 1 0;justify-content:center;align-items:center;gap:5px;min-width:0;min-height:48px;padding:4px 6px;font-size:.8rem;display:flex}.modifier .icon{font-size:1.4rem}img.icon{object-fit:contain;flex:none;width:1.4rem;height:1.4rem}.paper img.icon{width:32px;height:32px}.modifier img.icon{width:40px;height:40px}.slot img.icon{width:32px;height:32px}.help-panel img.icon,.card dd img.icon{vertical-align:middle;width:24px;height:24px}.modifier .mod-count{font-weight:700}.modifier.selected{border-color:var(--accent);background:#fff3c9;box-shadow:0 0 0 3px #7a3e1d59}.modifier.spent{opacity:.4}.help-btn{border:2px solid var(--edge);background:0 0;border-radius:10px;flex:none;width:40px;min-height:48px;font-weight:700}.help-panel{border:1px solid var(--edge);background:#f8edd0;border-radius:8px;margin:8px 0 0;padding:8px 10px 8px 12px;font-size:.8rem;list-style:none}.help-panel li+li{margin-top:4px}.overlay{z-index:10;background:#3a2a1699;justify-content:center;align-items:center;padding:16px;display:flex;position:absolute;inset:0}.card{background:var(--parchment);border:3px solid var(--edge);border-radius:14px;width:100%;max-width:360px;max-height:100%;padding:18px 20px;overflow-y:auto;box-shadow:0 10px 30px #0006}.card h2{text-align:center;color:var(--accent);margin:0}.solved-word{text-align:center;letter-spacing:.15em;margin:4px 0 10px;font-size:1.8rem;font-weight:700}.run-note{text-align:center;color:var(--danger);margin:6px 0 0;font-weight:700}.card dl{grid-template-columns:1fr auto;gap:6px 12px;margin:12px 0;display:grid}.card dt{color:var(--ink-soft)}.card dd{text-align:right;margin:0;font-weight:700}.card-actions{gap:10px;display:flex}.card-actions button{border:2px solid var(--edge);background:#f8edd0;border-radius:10px;flex:1;min-height:48px;font-weight:700}.card-actions .primary{background:var(--correct);color:#fff;border-color:#3f6330}@media (height<=640px){.key,.tile,.slot{height:40px}.tiles{grid-template-columns:repeat(5,40px)}.slot{width:40px}.ctl{height:46px}}@media (width>=481px){#app{padding:12px 0}}.slot-line{align-items:center;gap:2px;display:flex}.slot-line img,.slot-line svg,.slot-line img.icon{width:24px;height:24px}.slot-cost-spent{color:var(--danger)}.slot-cost-reward{color:var(--correct)}.cost-short{color:var(--danger);font-weight:700}@media (height<=620px){.key{height:38px}.ctl{height:44px}.controls{margin-top:5px}}@media (width<=420px){.modifier .mod-name{display:none}}
