:root{--ink:#243c36;--paper:#f5f2e9;--panel:#fffdf7;--green:#365f50;--gold:#c79950;--line:#d8ddd2;--red:#a63e32;--tile-size:86px;font-family:system-ui,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}header{height:60px;display:flex;align-items:center;gap:24px;padding:0 28px;border-bottom:1px solid var(--line)}header span{font-size:11px;letter-spacing:1.4px;margin-left:auto}.brand{font-size:20px;color:inherit;text-decoration:none;font-weight:650}button{font:inherit;color:inherit;background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:9px 13px;cursor:pointer}button:hover{border-color:var(--green)}button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}button:disabled{opacity:.4;cursor:default}.primary{background:var(--green);color:white;border-color:var(--green)}main{display:grid;grid-template-columns:minmax(0,1fr) 265px;gap:22px;padding:20px 28px;max-width:1600px;margin:auto;height:calc(100dvh - 60px)}.workspace{min-height:0;display:flex;flex-direction:column;gap:10px}h1,h2,p{margin:0}h1{font-size:25px}h2{font-size:14px;font-weight:650}.eyebrow,.small{font-size:11px;color:#62766b}.eyebrow{letter-spacing:1px;margin-bottom:3px}.heading,.section-heading,.tray-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#conditions{font-size:14px;min-height:36px;line-height:1.45}.pattern-stage{display:flex;gap:18px;min-height:0;flex:1;align-items:center;justify-content:space-around}.board-column,.preview-column{width:calc(50% - 9px);max-width:520px;min-width:0;display:flex;flex-direction:column;gap:7px}.pattern-stage svg{width:100%;height:auto;aspect-ratio:1;max-height:calc(100dvh - 360px);overflow:hidden;background:#e6e8de;border:1px solid var(--line)}.tile-polygon{fill:#e1e5d9}.slot{cursor:pointer;touch-action:none}.slot.fixed{cursor:default}.slot.selected .slot-outline,.slot.target .slot-outline{stroke:var(--gold);stroke-width:5}.slot.error .slot-outline{stroke:var(--red);stroke-width:5}.slot.hint .slot-outline{stroke:#237fc6;stroke-width:5}.slot-outline{fill:none;stroke:#526352;stroke-width:.6;pointer-events:none}.given-dot{fill:#fff;stroke:#324b3f;stroke-width:1.3;pointer-events:none}.guides{pointer-events:none}.guide-line{stroke:#2783b3;stroke-width:4;opacity:.9}.guide-label{fill:#183e55;font-size:18px;font-weight:bold;paint-order:stroke;stroke:#fff;stroke-width:4}.rotation-marker{fill:#ffdc66;stroke:#243c36;stroke-width:2}.materials{padding:9px 12px;background:var(--panel);border:1px solid var(--line);border-radius:12px;flex-shrink:0}.tray-heading span{font-size:11px;color:#62766b}#tray{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px;align-items:center}.tile-choice{padding:0;position:relative;width:var(--tile-size);height:var(--tile-size);border-radius:5px;border:2px solid transparent;touch-action:none;background:transparent}.tile-choice svg{width:100%;height:100%;display:block}.tile-choice.selected{border-color:var(--gold)}.tile-choice .pose-label{position:absolute;right:2px;bottom:1px;background:#fff9;color:#243c36;padding:0 2px;font-size:10px;pointer-events:none}.materials.return-target{outline:3px solid var(--gold)}.actions{display:flex;gap:8px;flex-wrap:wrap}#feedback{font-size:13px;min-height:32px;line-height:1.4}#feedback.success{color:var(--green);font-weight:600}aside{display:flex;flex-direction:column;min-height:0;gap:14px}.level-panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px;flex:1;min-height:0;overflow:auto}#progress{font-size:12px}.level-group{margin-top:12px}.level-group h3{font-size:11px;color:#62766b;margin:0 0 5px}.level-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.level-buttons button{padding:8px 0;font-size:12px}.level-buttons button.active{background:var(--green);color:white}.level-buttons button.done:after{content:' ✓'}.motif-panel{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);display:flex;flex-direction:column;gap:8px}#motifSummary{font-size:13px}#motifDetails{font-size:11px;line-height:1.5}.ghost,.return-animation{position:fixed;z-index:10000;pointer-events:none;width:86px;height:86px;filter:drop-shadow(0 5px 8px #0004)}.ghost svg,.return-animation svg{width:100%;height:100%}dialog{border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink);padding:0;max-width:min(720px,92vw);width:720px;max-height:85dvh;overflow:auto}dialog::backdrop{background:#172e2670}.dialog-close{position:sticky;top:12px;float:right;margin:12px 12px 0 0;z-index:10;background:var(--panel);box-shadow:0 2px 8px #0002}#sourceContent,#helpDialog>h2,#helpDialog>ol,#helpDialog>p{margin:24px}#sourceContent{padding-top:18px}.source-item{margin:22px 0}.source-item img{width:180px;height:180px;object-fit:contain;display:block;margin:10px 0}.source-item p{font-size:13px;line-height:1.5;margin:6px 0}.source-item a{color:var(--green)}@media(max-height:760px) and (min-width:900px){header{height:48px}main{height:calc(100dvh - 48px);padding:12px 22px;gap:16px}.workspace{gap:7px}:root{--tile-size:76px}.pattern-stage svg{max-height:calc(100dvh - 325px)}h1{font-size:22px}.materials{padding:7px 10px}}@media(max-width:900px){main{grid-template-columns:minmax(0,1fr) 190px;padding:12px;gap:12px}header{padding:0 14px}header span{display:none}:root{--tile-size:68px}.tray-heading span{max-width:170px}.level-buttons{grid-template-columns:repeat(3,1fr)}}@media(max-width:620px){main{height:auto;display:flex;flex-direction:column}.pattern-stage svg{max-height:none}.pattern-stage{gap:8px}h1{font-size:20px}.tile-choice{width:64px;height:64px}aside{display:grid;grid-template-columns:1fr 1fr}.level-panel{overflow:visible}.tray-heading{align-items:flex-start}#conditions{font-size:13px}header{gap:12px}.brand{font-size:18px}}
:root{scrollbar-gutter:stable}
.pattern-stage{align-items:stretch}
.board-column,.preview-column{height:100%;max-width:none}
.pattern-stage svg{height:100%;min-height:0;flex:1;aspect-ratio:auto;max-height:none}
@media(max-height:760px) and (min-width:900px){.pattern-stage svg{max-height:none}}
@media(max-width:620px){.board-column,.preview-column{height:auto}.pattern-stage svg{height:auto;aspect-ratio:1;flex:none}}
