:root{--paper:#f7f5ed;--ink:#233d37;--muted:#646c61;--line:#d6d8c9;--coral:#b64631;--red:#d65d45;--teal:#1c544e;--sans:"DM Sans",-apple-system,BlinkMacSystemFont,sans-serif;--mono:"IBM Plex Mono",ui-monospace,"SFMono-Regular",Consolas,monospace}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 10% 30%,#f9f8f1,transparent 61%),var(--paper);color:var(--ink);font:16px/1.5 var(--sans);-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible,canvas:focus-visible{outline:3px solid #ca6937;outline-offset:3px}button:disabled{cursor:default;opacity:.5}
.mast{border-bottom:1px solid #cdd1c3;background:#f9f8f1}.mast-inner,main{width:min(1216px,calc(100% - 96px));margin-inline:auto}.mast-inner{height:78px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.identity{display:flex;gap:13px;align-items:center;font-size:21px;font-weight:800;letter-spacing:-.035em}.mark{position:relative;display:inline-block;flex:none;width:42px;height:34px}
.mark i{position:absolute;bottom:3px;width:10px;height:25px;border-radius:2.5px;background:var(--teal);transform-origin:center bottom}.mark i:before,.mark i:after{content:"";position:absolute;left:4px;width:2.8px;height:2.8px;border-radius:50%;background:#fcf6de}.mark i:before{top:5px}.mark i:after{bottom:5px}.mark i:nth-child(1){left:1px;transform:rotate(-23deg);height:24px;background:var(--red)}.mark i:nth-child(2){left:15px;transform:rotate(-11deg);height:27px}.mark i:nth-child(3){left:29px;height:28px}
.utility{display:flex;align-items:center;gap:10px}.utility button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d6d9cb;border-radius:10px;background:transparent;padding:0 14px;min-height:42px;font-size:14px;font-weight:600}.utility button:hover,.sq:hover:not(:disabled){background:#eaece0}
[data-icon]{display:inline-flex;align-items:center;justify-content:center;flex:none}[data-icon] svg{width:19px;height:19px;display:block}
main{padding:36px 0 32px}.intro{margin-bottom:23px}.eyebrow{display:flex;align-items:center;gap:9px;color:#a34230;font:700 13px/1.2 var(--mono);letter-spacing:.115em}.dash{width:25px;height:2px;background:#b9523e}
h1,h2,p{margin:0}
.game-heading{font:inherit;line-height:1.15}
.game-heading span{display:block;margin-top:3px;color:#536356;font:550 13px/1.2 var(--sans);letter-spacing:0}
.intro h2{font-size:clamp(39px,4vw,58px);line-height:1.24;letter-spacing:-.035em;font-weight:850;margin:7px 0 6px}.intro p{color:#536356;font-size:16px;letter-spacing:.02em}.red-word{color:#a94030;font-weight:700}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:27px;align-items:start}.play{min-width:0}.tray{padding:7px;border:1px solid #a9885c;border-radius:19px;background:linear-gradient(115deg,#d2b285,#bfa077 48%,#d6b78d 72%,#baa077);box-shadow:0 4px 0 #a58a68,0 8px 16px -9px #5b584979,inset 0 1px 1px #ffedcd}
.felt{position:relative;isolation:isolate;overflow:hidden;height:clamp(320px,30.6vw,445px);border-radius:12px;background:radial-gradient(ellipse at 39% 28%,#397468 0%,#2a6259 45%,#204e48 100%);box-shadow:inset 0 2px 5px #123f36aa}
.felt:before{content:"";position:absolute;inset:0;z-index:-1;opacity:.52;background-image:radial-gradient(circle,rgba(215,237,201,.4) .85px,transparent 1px);background-size:18px 18px;background-position:center}
canvas#board{display:block;height:100%;width:100%;touch-action:none;user-select:none;cursor:crosshair}canvas#board:focus-visible{outline-offset:-4px}
.corner{position:absolute;pointer-events:none;width:13px;height:13px;border-color:#cbdbbb70;border-style:solid}.tl{left:9px;top:9px;border-width:1px 0 0 1px}.tr{right:9px;top:9px;border-width:1px 1px 0 0}.bl{left:9px;bottom:9px;border-width:0 0 1px 1px}.br{right:9px;bottom:9px;border-width:0 1px 1px 0}
.state-badge,.bell-badge{pointer-events:none;position:absolute;top:17px;font:600 13px/1 var(--sans);letter-spacing:.05em;display:flex;align-items:center;gap:8px;color:#f7f4df;background:#194b45d9;border:1px solid #7f9c896e;border-radius:7px;height:32px;padding:0 10px}.state-badge{left:19px}.state-badge i{width:7px;height:7px;border-radius:50%;background:#bad9ac}.state-badge[data-mode=miss] i{background:#ffb98b}.state-badge[data-mode=win] i{background:#f5cd6b}.bell-badge{right:19px;color:#ffdb8c}.bell-badge b{font:650 14px var(--mono)}.bell-badge svg{width:17px;height:17px}
.control-panel{padding:17px 1px 0}.tools-row,.rotation,.push,#status{display:flex;align-items:center}.tools-row{justify-content:space-between;gap:12px}.rotation{gap:5px}.rot-label{font-size:14px;letter-spacing:.05em;font-weight:650;color:#556258;margin-right:8px}.sq{width:44px;height:44px;border:1px solid #c7cdbc;border-radius:10px;background:#faf9f2;display:inline-grid;place-items:center;box-shadow:0 2px 0 #dbdecf}.rotation output{width:43px;text-align:center;font:650 16px var(--mono);font-variant-numeric:tabular-nums}
.push{justify-content:center;gap:10px;border:1px solid #a34230;border-radius:10px;min-height:46px;padding:0 25px;background:linear-gradient(#c96149,#ba4e38);color:#fff9ee;font-weight:750;box-shadow:0 3px 0 #943e2f;letter-spacing:.04em}.push:hover:not(:disabled){background:#ae4533}.push:active:not(:disabled),.sq:active:not(:disabled){transform:translateY(2px);box-shadow:none}.push [data-icon] svg{width:16px;height:16px}
#status{gap:8px;color:#59675e;font-size:14px;padding:15px 0 0;min-height:36px}#status svg{width:17px;height:17px}#status[data-mode=miss]{color:#95422c}#status[data-mode=win]{color:#2c6252}
.book{padding:0 0 0 0;min-width:0}.book-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 13px}.book h2{font-size:21px;display:flex;gap:9px;align-items:center;font-weight:800;letter-spacing:.015em}.book h2 svg{width:20px;height:20px}.book-head>span{font:500 12px/1.5 var(--mono);color:#667164}nav{display:grid;gap:9px}
.card{width:100%;display:flex;align-items:center;gap:12px;position:relative;border-radius:12px;border:1px solid #d2d5c7;background:#fbfaf4;padding:8px;text-align:left;min-height:73px;transition:background 120ms,border-color 120ms}.card:hover{border-color:#abae9d;background:#f0f1e7}.card[aria-current=true]{background:#fbede3;border-color:#bf735c;box-shadow:0 0 0 1px #cd8b7240}.card canvas{border-radius:6px;flex:0 0 auto;width:68px;height:53px;background:#e8ecdf}.card[aria-current=true] canvas{background:#eee3cf}.card-text{flex:1;min-width:0;line-height:1.3}.card small{display:block;text-transform:uppercase;font:600 11px var(--mono);color:#677466;letter-spacing:.09em;margin-bottom:4px}.card strong{font-size:16px;font-weight:750}.card[aria-current=true] small,.card[aria-current=true] .card-arrow{color:#a84631}.card-arrow{padding:0 4px;color:#7f887c}.card-arrow svg{width:16px;height:16px}
.legend{display:flex;justify-content:space-between;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid #d5d7ca;font-size:12px;color:#606e61}.legend span{display:inline-flex;align-items:center;gap:7px}.tile-key{display:inline-block;width:9px;height:15px;border-radius:2px;transform:rotate(-15deg);background:#e7ddbd;border:1px solid #9f977d}.tile-key.red{background:#da6e54;border-color:#ac4d39}.bell-key{width:13px;height:10px;border-radius:7px 7px 2px 2px;background:#e9ba5e;box-shadow:inset 0 0 0 1px #ab813e;border-bottom:2px solid #886036}
dialog{width:min(420px,calc(100% - 36px));border:1px solid #a7ab98;border-radius:16px;background:var(--paper);color:var(--ink);padding:0;box-shadow:0 20px 60px #172b2455}dialog::backdrop{background:#173d36a3}.dialog-inner{padding:23px}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{font-size:24px}dialog ol{padding-left:25px;line-height:1.7}dialog li{padding:4px 0}.key-help{font-size:14px;color:#5d6a61;margin:0 0 18px}dialog .push{width:100%}
@media(min-width:1450px){main{padding-top:45px}.intro{margin-bottom:28px}}
@media(max-width:1050px){.mast-inner,main{width:calc(100% - 48px)}.layout{grid-template-columns:minmax(0,1fr) 232px;gap:18px}.card{gap:9px}.card canvas{width:56px}.felt{height:350px}}
@media(max-width:800px){.mast-inner,main{width:calc(100% - 32px)}.mast-inner{height:60px}.layout{display:block}.felt{height:clamp(290px,70vw,435px)}main{padding-top:22px}.intro{margin-bottom:15px}.book{margin-top:24px;border-top:1px solid var(--line);padding:16px 0 0}nav{grid-template-columns:repeat(2,minmax(0,1fr))}.legend{justify-content:flex-start;gap:22px}.book-head{margin-bottom:10px}.card{min-height:61px}.card canvas{width:51px;height:43px}.card-arrow{display:none}.card strong{font-size:15px}.card small{font-size:10px;margin-bottom:2px}}
@media(max-width:520px){
  .mast-inner{gap:8px;height:auto;min-height:60px;padding-block:3px}
  .game-heading span{font-size:12px;font-weight:500;letter-spacing:-.015em;text-wrap:balance}
  .mast-inner,main{width:calc(100% - 26px)}.identity{font-size:18px;gap:7px}.utility{gap:6px}.utility button{min-height:44px;padding:0 10px;font-size:13px}.utility #audio{width:44px;padding:0}.sound-text{display:none}.mark{transform:scale(.88);transform-origin:left center;width:37px}.intro p{font-size:14px;letter-spacing:0}.intro h2{font-size:36px;margin:5px 0}.eyebrow{font-size:12px}.tray{border-radius:16px;padding:5px}.felt{height:clamp(290px,86vw,375px);border-radius:10px}.state-badge,.bell-badge{top:12px;height:29px}.state-badge{left:13px}.bell-badge{right:13px}.control-panel{padding-top:13px}.rot-label{margin-right:3px}.rotation{gap:2px}.rotation output{width:40px;font-size:14px}.push{padding:0 11px;font-size:14px;letter-spacing:.01em;gap:6px;white-space:nowrap}#status{font-size:13px;padding-top:12px}.book{margin-top:17px}.book h2{font-size:18px}.card{gap:8px;padding:6px}.card-feature{display:none}.card-number:before{content:"LEVEL "}.card canvas{width:44px}}
@media(max-width:355px){
  .utility #help{width:44px;padding:0}
  .utility #help span:last-child{display:none}
  .rot-label{display:none}.intro p{font-size:13px}.card canvas{width:40px}.card strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.book-sets{display:flex;align-items:center;gap:10px;margin:0 0 12px}
.book-sets>span{font:650 13px var(--sans);color:#536356}
#book-pages{min-width:0;flex:1;min-height:42px;padding:0 9px;border:1px solid #cbd0c1;border-radius:8px;background:#fbfaf4;color:var(--ink);font:650 14px var(--sans);cursor:pointer}
#book-pages:focus-visible{outline:3px solid #ca6937;outline-offset:2px}
.card[hidden],.push.has-preview>[data-icon],#next-preview[hidden]{display:none}
#next-preview{width:61px;height:33px;background:#f0e5ce;border-radius:5px;flex:none}
.push.has-preview{padding-inline:8px 16px}
@media(max-width:520px){#book-pages{min-height:44px}#next-preview{width:45px;height:30px}.push.has-preview{padding-inline:5px 9px}}

@media(max-width:800px){
  .card[data-cleared="true"] .card-arrow{display:grid;place-items:center;position:absolute;left:4px;top:4px;width:17px;height:17px;padding:0;border:1px solid #faf9ef;border-radius:50%;background:#326752;color:white}
  .card[data-cleared="true"] .card-arrow svg{width:11px;height:11px;stroke-width:2.5}
}

.field-guide{max-width:53rem;margin:clamp(2.5rem,6vw,5rem) auto 1.5rem}
.field-guide h2{font-size:clamp(1.4rem,3vw,1.85rem);line-height:1.25;letter-spacing:-.025em}
.guide-intro{margin:.65rem 0 1.35rem;max-width:70ch;color:var(--muted)}
.field-guide details{border-top:1px solid var(--line)}
.field-guide details:last-child{border-bottom:1px solid var(--line)}
.field-guide summary{padding:1rem .25rem;font-weight:700;cursor:pointer}
.field-guide summary::marker{color:var(--teal)}
.field-guide summary:focus-visible,.field-guide a:focus-visible{outline:3px solid #ca6937;outline-offset:2px}
.guide-copy{max-width:70ch;padding:0 .25rem 1.15rem;line-height:1.65}
.guide-copy p+p,.guide-copy dt{margin-top:1rem}
.guide-copy dt{font-weight:700}
.guide-copy dd{margin:.25rem 0 0}
.guide-copy figure,.guide-copy dl{margin:0}
.guide-copy figure{margin-bottom:1rem}
.guide-copy img{display:block;width:100%;height:auto;border-radius:10px}
.guide-copy figcaption{margin-top:.4rem;font-size:.9rem;color:var(--muted)}
.guide-copy a{color:var(--teal);text-underline-offset:.18em;text-decoration-thickness:.1em}

.site-footer{width:min(1216px,calc(100% - 32px));margin:0 auto;padding:1.25rem 0 2.25rem;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;justify-content:space-between;gap:.75rem 1.5rem;font-size:.9rem}
.site-footer nav{display:flex;flex-wrap:wrap;gap:.4rem 1rem}
.site-footer a,.site-article a{color:var(--teal);text-underline-offset:.2em}
.page-brand{display:inline-flex;align-items:center;gap:.75rem;color:var(--ink);font-weight:800;text-decoration:none}
.site-article{max-width:65ch;margin:0 auto;padding-bottom:2rem}
.site-article h1{font-size:clamp(1.9rem,5vw,3rem);line-height:1.2}
.site-article h2{margin-top:1.5rem;font-size:1.25rem}
.site-article p{margin-top:.8rem}
.site-footer a:focus-visible,.page-brand:focus-visible,.site-article a:focus-visible{outline:3px solid #ca6937;outline-offset:2px}