:root{font-family:DM Sans,system-ui,sans-serif;color:#25322e;background:#f4f0e6;color-scheme:light;scroll-padding-block-end:clamp(76px,13vw,125px);font-synthesis:none;--ink: #25322e;--muted: #52645d;--green: #245748;--line: #d5ded3}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-width:240px}button,select{font:inherit}button{touch-action:manipulation}button:focus-visible,select:focus-visible{outline:3px solid #a44c23;outline-offset:3px}.game{max-width:980px;min-height:100svh;margin:0 auto;padding:clamp(12px,3vw,32px);display:flex;flex-direction:column;gap:14px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}h1{margin:0 auto 0 0;color:var(--green);font:700 clamp(30px,6vw,48px)/1.12 Georgia,serif;letter-spacing:-.045em}select,.restart,.dialog-actions button{min-height:44px;border:1px solid #b9c9be;border-radius:9px;padding:8px 12px;color:var(--ink);background:#fffcf4;cursor:pointer}select{min-width:0;max-width:100%}.hud{border:1px solid var(--line);border-radius:14px;padding:10px clamp(10px,3vw,24px);background:#fffcf4;display:grid;grid-template-columns:1fr 1.2fr 1fr;align-items:center;gap:10px;text-align:center}.hud span{display:block;color:var(--muted);font-size:.85rem}.hud strong{font-size:1.2rem;font-variant-numeric:tabular-nums}.combo meter{display:block;width:100%;height:16px;accent-color:var(--green)}.field{display:flex;flex:1 0 auto;align-items:center;justify-content:center;gap:22px;min-height:245px;padding:18px 12px;border-radius:18px;background:radial-gradient(ellipse at 45% 38%,#e5eadc,#c9d8ca);border:1px solid #c2d2c4;isolation:isolate}.field.vertical{flex-direction:column}.board-shell{flex:none;position:relative}.board{position:absolute;transform-origin:top left}.tile{container-type:inline-size;display:grid;place-items:center;color:var(--green);background:linear-gradient(165deg,#fffdf5 5%,#f4ecd8);border:1px solid #c4bca6;border-bottom:4px solid #bfb098;border-radius:12px;box-shadow:0 2px 4px #26393032;font-weight:760;-webkit-user-select:none;user-select:none}.board-tile{position:absolute;width:76px;height:79px;padding:0;font-size:26px}.board-tile[aria-disabled=false]{cursor:pointer}.board-tile[aria-disabled=false]:hover{background:#fff7d6}.board-tile.blocked{background:#d2d6c9;color:#4d5c54;border-color:#9ea99e}.tile-art{display:grid;grid-template:repeat(3,minmax(0,1fr)) / repeat(3,minmax(0,1fr));place-items:center;width:86%;aspect-ratio:1;font-size:32cqi;line-height:1}.tile.ice-start,.tile.ice-end{border:3px solid #3993ac;background:linear-gradient(155deg,#e4f8ff,#addae6)}.tile.ice-start.blocked,.tile.ice-end.blocked{background:#b8d0d6;border-color:#637e90}.ice-start:after,.ice-end:after{content:"";position:absolute;top:42%;width:9px;height:16%;background:#3993ac}.ice-start:after{right:-4px}.ice-end:after{left:-4px}.stack-tile.ice-start:after,.stack-tile.ice-end:after{left:42%;width:16%;height:9px}.stack-tile.ice-start:after{top:auto;bottom:-4px}.stack-tile.ice-end:after{top:-4px}.hand{position:sticky;bottom:0;z-index:2;color:#f1faef;background:#28483e;border:2px solid #28483e;border-radius:14px;padding:9px clamp(6px,2vw,14px) 5px;box-shadow:0 3px 12px #2639302a}.hand-warning{border-color:#f39a7d;background:#623a32}.slots{max-width:650px;margin:auto;display:grid;grid-template-columns:repeat(var(--slots),minmax(0,1fr));gap:clamp(3px,1vw,9px)}.slot{min-width:0;aspect-ratio:1.04;position:relative;border-radius:8px;background:#152e28;box-shadow:inset 0 0 0 1px #fff5}.slot-extra:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border:2px solid #f5c768;border-radius:inherit;pointer-events:none}.hand-tile{width:100%;height:100%;font-size:clamp(13px,3.4vw,25px);border-radius:8px}.concealed{visibility:hidden}.hand p{margin:5px 0 2px;text-align:center;font-size:.85rem}.flight{position:fixed;pointer-events:none;z-index:10;visibility:visible;transform-origin:top left;margin:0}dialog{width:min(calc(100% - 32px),420px);max-height:calc(100% - 24px);padding:clamp(20px,5vw,32px);border:1px solid var(--line);border-radius:18px;color:var(--ink);background:#fffcf4;box-shadow:0 20px 80px #122d2660}dialog::backdrop{background:#152d27a8}dialog h2{color:var(--green);font-family:Georgia,serif;margin:0 0 12px}dialog p{margin:0 0 16px;line-height:1.5}.dialog-actions{display:flex;flex-wrap:wrap;gap:8px}.dialog-actions button{background:var(--green);color:#fff}.dialog-actions .secondary{background:#fffcf4;color:var(--ink)}@media(max-width:520px){.game{gap:9px}.field{min-height:195px;padding:10px;gap:15px}.hand-tile{border-bottom-width:2px}}.game-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.game-controls strong{color:var(--green);font-size:.9rem}.tools{display:flex;flex-wrap:wrap;gap:6px}.tools button{min-height:40px;padding:5px 9px;color:var(--ink);background:#fffcf4;border:1px solid #b9c9be;border-radius:8px;cursor:pointer}.tools button:disabled{opacity:.55;cursor:default}.editor{max-width:1160px;margin:auto;padding:clamp(12px,3vw,32px);display:grid;gap:14px}.editor header{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.editor h1{font:700 clamp(26px,5vw,40px)/1.12 "DM Sans",system-ui,sans-serif}.editor a,.toolbar a,.editor-preview a{color:var(--green);text-underline-offset:4px}.editor-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.editor button,.editor-size input,.editor-preview button{border:1px solid #b9c9be;border-radius:8px;min-height:44px;padding:7px 11px;color:var(--ink);background:#fffcf4;font:inherit}.editor button:enabled,.editor-preview button{cursor:pointer}.editor button:disabled{opacity:.5}.editor button[aria-pressed=true]:not(.editor-cell),.editor button.editor-primary{background:var(--green);color:#fff;border-color:var(--green)}.editor-size{display:flex;gap:6px;align-items:center}.editor-size input{width:64px}.editor-meta{color:var(--muted);font-size:.85rem}.editor-workbench{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:16px}.editor-board,.editor-inspector{min-width:0;border:1px solid #c2d2c4;border-radius:12px;padding:12px;background:#fffcf4}.editor-board{display:grid;align-content:start;gap:8px}.editor-viewport{min-height:145px;max-height:65vh;overflow:auto;background:#e1e7dc;border-radius:8px}.editor-grid{position:relative}.editor button.editor-cell,.editor-ghost{position:absolute;width:44px;height:44px;border-radius:6px}.editor button.editor-cell{padding:3px;font-weight:700;line-height:1}.editor button.editor-cell.empty{background:#f8faf44f;border-style:dashed;border-color:#95a69c}.editor button.editor-cell.secret{background:#f3e3b9;border-color:#aa8745}.editor button.editor-cell.iceFrame{background:#d9eef1;border-color:#527f89}.editor button.editor-cell[aria-pressed=true]{outline:2px solid var(--green);outline-offset:1px}.editor button.editor-cell small{margin-left:2px;font-weight:400}.editor-ghost{pointer-events:none;background:#81a18e55;border:1px solid #81a18e}.editor-inspector{align-self:start;display:grid;gap:10px}.editor-inspector h2,.editor-inspector p,.editor-error{margin:0}.editor-inspector h2{font-size:1.05rem}.editor-inspector label{display:grid;gap:4px}.editor-error{color:#7e3821;padding:10px 12px;background:#fff0dd;border-radius:8px;overflow-wrap:anywhere}.editor-preview .field{flex:0 0 auto}@media(max-width:750px){.editor-workbench{grid-template-columns:minmax(0,1fr)}}.editor button.editor-cell-warning{border-color:#a44c23;border-width:2px}.editor-hint{position:relative;display:inline-flex;max-width:100%}.editor-tooltip{position:absolute;z-index:10;top:calc(100% + 6px);left:0;width:max-content;max-width:min(240px,calc(100vw - 24px));padding:8px 10px;border-radius:6px;background:var(--ink);color:#fff;font-size:.85rem;line-height:1.4;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.editor-hint:nth-of-type(n+4) .editor-tooltip{left:auto;right:0}.editor-hint:hover .editor-tooltip,.editor-hint:has(:focus-visible) .editor-tooltip{opacity:1;visibility:visible}@media(max-width:650px){.editor-hint .editor-tooltip{position:fixed;inset:auto 12px 12px;width:auto;max-width:none}}.editor-fields{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}.editor-field{min-width:0;max-width:100%;border:1px solid var(--line);padding:5px;border-radius:8px}.editor-field:last-child{max-width:min(28vw,180px)}.editor-field-active{border-color:var(--green)}.editor-field h3{margin:2px 4px 6px;font-size:.85rem}.editor-field .editor-viewport{min-height:60px}.editor-name-row{align-items:flex-end}.editor-name-row .editor-meta{align-self:center}.editor-name{display:grid;gap:6px;max-width:100%}.editor-name input{min-height:44px;width:min(240px,100%);border:1px solid #b9c9be;border-radius:8px;padding:7px 11px;color:var(--ink);background:#fffcf4;font:inherit}.editor[hidden]{display:none}.solver{border:1px solid #c2d2c4;border-radius:10px;padding:10px 12px;background:#fffcf4}.solver summary{cursor:pointer;color:var(--green);font-weight:700}.solver p{margin:8px 0}.solver-controls label{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}.solver-controls input[type=number]{width:116px;padding:5px;font:inherit}.solver-results{padding-inline-start:24px;margin-block-end:0}.solver-results li{margin-block:6px}.solver-results button{margin-inline-start:8px}.editor-preview .tile.suggested{outline:3px solid #a44c23;outline-offset:2px}.editor-statistics h3{font-size:.9rem;margin:12px 0 6px}.editor-statistics ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:4px 12px;margin:0;padding:0;list-style:none;font-variant-numeric:tabular-nums}.editor-statistics .stat-invalid{color:#7e3821;background:#fff0dd;border-radius:4px;padding-inline:4px}.editor-layer-workspace{display:grid;grid-template-columns:164px minmax(0,1fr);align-items:start;gap:8px}.editor-layer-sidebar,.editor-layer-group{display:grid;gap:6px}.editor-layer-sidebar{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;padding:7px;border:1px solid #c2d2c4;border-radius:8px;background:#edf2e9}.editor-layer-group{min-width:0}.editor button.editor-layer-field{font-size:.8rem;padding-inline:4px}.editor-layer-list{display:grid;gap:4px;list-style:none;margin:0;padding:0;max-height:310px;overflow:auto}.editor button.editor-layer{position:relative;display:block;min-height:36px;width:100%;padding:4px 12px;font-variant-numeric:tabular-nums}.editor button.editor-layer-match{background:#f4dfaa;border-color:#a4772e;color:#3d301b}.editor button.editor-layer[aria-current=true]{background:var(--green);color:#fff;border-color:var(--green);font-weight:700}.editor-layer-dot{position:absolute;top:50%;right:9px;width:8px;height:8px;border-radius:50%;background:#a4772e;transform:translateY(-50%)}.editor-layer[aria-current=true] .editor-layer-dot{background:#ffda82}.editor-layer-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px}.editor .editor-layer-actions button{padding-inline:4px}.editor button.editor-cell-match{box-shadow:inset 0 0 0 3px #ad7a21}@media(max-width:460px){.editor-layer-workspace{grid-template-columns:136px minmax(0,1fr)}.editor-layer-sidebar{padding:5px}.editor button.editor-layer-field{font-size:.72rem;padding-inline:2px}.editor-layer-dot{right:5px}}.editor-statistics li[aria-current=true]{border-radius:4px;box-shadow:inset 0 0 0 2px #ad7a21;padding-inline:4px}
