:root{font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;color:#243643;background:#fff9ec;font-size:18px}*{box-sizing:border-box}body{margin:0}header{background:#fff;border-bottom:2px solid #e9dfc8;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.6rem max(1rem,env(safe-area-inset-right)) .6rem max(1rem,env(safe-area-inset-left));flex-wrap:wrap}.brand{display:flex;gap:.5rem;align-items:center}.brand>span{font-size:2rem}.brand strong,.brand div>span{display:block}.brand div>span{font-size:.76rem;color:#526470}nav,.actions{display:flex;flex-wrap:wrap;gap:.5rem}main{max-width:1120px;margin:auto;padding:1rem max(1rem,env(safe-area-inset-right)) 4rem max(1rem,env(safe-area-inset-left))}h1{font-size:clamp(1.6rem,4vw,2.7rem);line-height:1.1;margin:.25rem 0 .65rem}h2{font-size:1.15rem;margin:.2rem 0 .5rem}p{line-height:1.45}button,summary{font:inherit}button{cursor:pointer;color:#243643;background:white;border:2px solid #596d78;border-radius:13px;min-height:48px;padding:.55rem .9rem;font-weight:700}button:hover{background:#edf7f5}button:focus-visible,summary:focus-visible{outline:4px solid #7433b6;outline-offset:3px}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:#167863;color:white;border-color:#126754}.primary:hover{background:#10614f}.eyebrow{font-size:.8rem;letter-spacing:.07em;text-transform:uppercase;font-weight:800;color:#596d78}.hero{display:grid;grid-template-columns:2fr 1fr;gap:1rem;align-items:center;padding:2rem;border-radius:24px;background:#e4f4eb}.hero-art{display:flex;align-items:center;justify-content:center;gap:.3rem;font-size:clamp(2rem,7vw,5rem);color:#cf5774}.hero-art span:nth-child(2){color:#e6a62e}.hero-art span:nth-child(3){color:#4788b8}#extra-modes{margin-top:1rem}#save-status:empty{display:none}.notice,.feedback{border-radius:12px;background:#fff2c9;padding:.7rem 1rem;margin:.7rem 0}.feedback:empty{display:none}.game-head{display:flex;align-items:start;justify-content:space-between;gap:1rem;flex-wrap:wrap}.board{display:grid;grid-template-columns:minmax(220px,1fr) minmax(340px,2fr);gap:1rem}.tray-panel,.groups{background:#fff;border:2px solid #d7e2dc;padding:1rem;border-radius:18px}.tokens{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}.token{min-width:0;min-height:86px;padding:.15rem;display:grid;place-items:center;background:#fbfdf9;border:2px solid #8b9d9c}.token svg{width:min(100%,76px);height:76px}.token.selected{outline:4px solid #6833aa;outline-offset:1px;background:#eee6fc}.token.problem{border:4px dashed #aa4733}.bins{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.bin{border:2px solid #a6c7c0;border-radius:16px;background:#eff9f5;padding:.6rem;min-width:0}.bin-target{width:100%;background:#d9eee5;border-color:#347b70;min-height:72px;overflow-wrap:anywhere}.bin .tokens{margin-top:.5rem;grid-template-columns:repeat(auto-fit,minmax(48px,1fr))}.bin .token{min-height:66px}.bin .token svg{height:58px}.game-actions{margin-top:1rem}details{margin-top:1.5rem}summary{cursor:pointer;min-height:48px;padding:.5rem}#saved>div{border:2px solid #d7e2dc;padding:.7rem;margin:.5rem 0;border-radius:12px}.small{font-size:.85rem}.token-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(max-width:650px){.hero{grid-template-columns:1fr;padding:1.2rem}.hero-art{display:none}.board{grid-template-columns:1fr}.bin .tokens{grid-template-columns:repeat(auto-fit,minmax(48px,1fr))}header{gap:.4rem}nav button{font-size:.85rem;padding:.45rem}.bins{grid-template-columns:1fr 1fr}}@media(max-width:370px){.bins{grid-template-columns:1fr}.token svg{height:64px}.token{min-height:72px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.rule-icon{display:inline-flex;vertical-align:middle;width:42px;height:42px;margin-right:.3rem}.rule-icon svg{width:42px;height:42px}.previous-row{display:flex;flex-wrap:wrap;gap:.25rem}.previous-row svg{width:42px;height:42px}

.example-tag{display:block;font-size:.62rem;line-height:1;color:#254f45}.example-row{display:flex;gap:1rem}.example-row span{display:flex;align-items:center;gap:.3rem;font-weight:700}.example-row svg{width:55px;height:55px}

.tokens{grid-template-columns:repeat(auto-fit,minmax(48px,1fr))}#mascot{width:96px;height:78px;object-fit:contain;display:block}.bin .rule-icon{width:38px;height:38px}
/* A small collection desk: property pictures carry meaning before text. */
:root{--ink:#263c4a;--teal:#216e62;--paper:#fffaf0;--gold:#f1bb55;color:var(--ink);background:var(--paper)}body{background:radial-gradient(ellipse at 85% 15%,#f5edd9 0,transparent 48%),var(--paper)}header{border-bottom:0;box-shadow:0 2px 0 #e9dfc8;padding:.65rem 1rem}.brand>span{font-size:1.7rem}nav button{font-size:.8rem;padding:.35rem .65rem;min-height:44px}.hero{background:#e2f0e9;border:2px solid #b6d2c3;box-shadow:0 7px 0 #cddfd3;min-height:335px}.hero .actions{margin-top:1.2rem}.hero .actions button{display:flex;align-items:center;gap:.5rem}.hero .actions button>span{font-size:1.5rem}.hero-art{display:block!important;min-width:0}.desk-art{position:relative;min-height:220px;padding-top:30px;transform:rotate(-5deg)}.art-tray{display:flex;gap:.4rem;background:#cfac79;border:8px solid #e4c696;border-radius:24px;padding:.9rem;box-shadow:0 8px 0 #af8c5e}.art-tray svg{width:30%;height:auto;filter:drop-shadow(0 4px 1px #896e46)}.magnifier{position:absolute;z-index:1;right:5%;top:0;border:8px solid #356c74;width:80px;height:80px;border-radius:50%;background:#e5f8ffb3;box-shadow:inset 0 0 0 3px #fff}.magnifier:after{content:"";position:absolute;width:19px;height:64px;top:58px;left:59px;background:#356c74;border-radius:8px;transform:rotate(-35deg)}.art-note{display:block;font-size:1rem;color:#284c48;text-align:center;font-weight:800;margin-top:1.1rem}.home-note{padding:1.5rem .5rem}.home-note p{margin:.3rem 0}.rule-card{background:#fff;border:2px solid #cfdfd8;border-radius:18px;padding:.8rem 1rem;margin:.5rem 0 1rem;box-shadow:0 4px 0 #e0e9e2}.rule-lead{display:flex;align-items:center;gap:.65rem}.rule-lead>.rule-icon{background:#f2dda2;border-radius:50%;width:68px;height:68px;padding:10px;flex-shrink:0}.rule-lead .rule-icon svg{width:48px;height:48px}.rule-lead strong{font-size:1.2rem}.rule-lead p{margin:.2rem 0;font-size:.9rem}.how-to{display:flex;gap:1rem;list-style:none;padding:0;margin:.65rem 0 0;flex-wrap:wrap;font-size:.8rem;font-weight:700}.how-to span{font-size:1.15rem;color:#216e62}.bin{background:#f1f6f1;border:2px solid #b8c9ba;padding:.5rem;box-shadow:inset 0 -5px 0 #e2eadd}.bin-target{background:#e4eee4;display:flex;align-items:center;justify-content:center;gap:.2rem;flex-direction:column;padding:.3rem .2rem;border-color:#5d8d7b;min-height:84px;font-size:.9rem;line-height:1.15}.bin-pictures{display:flex;justify-content:center;align-items:center;gap:.25rem}.not-icon{display:inline-flex;position:relative;vertical-align:middle}.not-icon>span:last-child{position:absolute;inset:0;text-align:center;line-height:40px;color:#993d49;font-size:3rem;font-family:system-ui;font-weight:900;text-shadow:1px 0 white,-1px 0 white}.not-icon .rule-icon{opacity:.75}.bin.ready .bin-target{background:#fff1c9;border-color:#9b6a19;box-shadow:0 0 0 2px #f1d58e}.drop-label{font-size:.65rem;color:#75511e}.groups{background:#f5eee1;border-color:#d4c5a8}.tray-panel{background:#fffcf4;border-color:#dacaa8}.tokens{gap:.45rem;grid-template-columns:repeat(3,minmax(52px,1fr))}.token{border-radius:13px;border:2px solid #9daba6;background:#fffef7;box-shadow:0 3px 0 #d3dad2}.token.selected{background:#f2eafa}.bin .tokens{grid-template-columns:repeat(auto-fit,minmax(52px,1fr))}.token.problem,.clue-tile.problem{outline:3px dashed #b44b37;outline-offset:1px}.example-tag{font-size:.57rem;line-height:1.2;padding:.15rem}.empty-tray{font-size:.85rem;grid-column:1/-1;margin:.35rem 0}.inspector{display:flex;gap:.8rem;background:#efe7f7;border:2px solid #b79acc;border-radius:16px;padding:.8rem;margin:.6rem 0}.inspector-picture{width:96px;min-width:96px;display:grid;place-items:center}.inspector svg{width:96px;height:96px}.property-list{display:flex;gap:.4rem;flex-wrap:wrap;margin:.4rem 0}.property-list span{font-size:.8rem;background:white;border:1px solid #c5b5d2;border-radius:10px;padding:.35rem}.property-list .active-property{border:2px solid #7535a2;font-weight:800}.inspector p{font-size:.8rem;margin:.3rem 0}.truth-examples{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin-top:.6rem}.truth-examples>div{background:#fffdf4;border:1px solid #d8c79b;border-radius:12px;padding:.3rem;display:flex;flex-direction:column;align-items:center;font-size:.75rem;text-align:center;font-weight:700}.truth-examples svg{width:56px;height:56px}.truth-examples+p{font-size:.85rem;margin-bottom:0}.two-hoops{display:flex;padding:.4rem 0}.two-hoops>span{width:68px;height:68px;border:4px solid #468c80;border-radius:50%;display:grid;place-items:center;background:#d4ede365}.two-hoops>span+span{margin-left:-17px;border-color:#b676a5;background:#eedde965}.two-hoops .rule-icon{margin:0;width:30px;height:30px}.two-hoops .rule-icon svg{width:30px;height:30px}.past-groups{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.past-group{background:#fffaf0;border:1px solid #dacb9d;border-radius:12px;padding:.5rem;font-size:.8rem}.past-group>span{display:flex;align-items:center}.past-group>div{display:flex;flex-wrap:wrap;gap:.15rem}.past-group svg{width:42px;height:42px}.comparison{display:grid;grid-template-columns:1fr 1fr;gap:.65rem;margin-top:.75rem}.comparison>div{background:#fff;border:1px solid #b5cfc3;border-radius:12px;text-align:center;padding:.5rem}.comparison svg{width:68px;height:68px;display:block;margin:auto}.comparison strong{font-size:.9rem}.comparison p{font-size:.75rem;margin:.35rem 0}.rule-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.rule-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:.85rem;padding:.4rem;min-height:88px;line-height:1.2}.rule-choices [aria-pressed=true]{background:#e8dff5;border:3px solid #7535a2}.rule-choices .rule-icon{margin:0}.clue-board{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.clue-board section{background:#f7f0df;border:2px solid #baa782;border-radius:18px;padding:.75rem}.clue-board section:first-child{background:#e5f2e9;border-color:#86b89b}.clue-board h2{font-size:1rem}.clue-tiles{display:flex;flex-wrap:wrap;gap:.4rem;min-height:75px}.clue-tile{border:2px solid #9eaca3;background:white;border-radius:12px;padding:.2rem}.clue-tile svg{width:64px;height:64px}.clue-board+.rule-choices{margin-top:.8rem}#clue-more{margin-top:.75rem}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;margin:1rem 0}.saved-card{background:#fff;border:2px solid #c7d9cc;border-radius:18px;padding:1rem}.saved-preview{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.saved-preview>div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;background:#edf4ec;border:1px solid #afc7b5;padding:.4rem;border-radius:12px;min-height:78px}.saved-preview>div>span{display:block;flex-basis:100%;text-align:center;font-size:.7rem;color:#547366}.saved-preview svg{width:42px;height:42px}.large-spark,.group-symbol{font-size:2rem;color:#9c6b20}#saved{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}#saved>div{border:none}.game-actions{background:#fff9ec;position:relative;padding:.65rem 0}#make-rule{margin-top:1rem}#make-rule .rule-choices{grid-template-columns:repeat(auto-fit,minmax(95px,1fr))}#rule-options button{display:flex;align-items:center;min-width:150px}#rule-options{gap:.75rem}#previous details{margin:0}#previous p{margin:.4rem 0}.feedback{border:2px solid #dab86a;font-size:.9rem}#mascot{position:absolute;right:1rem;width:90px;height:70px;pointer-events:none}button{touch-action:manipulation}.game-head p{margin:.3rem 0 .5rem}main{padding-top:1.2rem}.eyebrow{letter-spacing:.03em}
@media(max-width:650px){main{padding:1rem .75rem 3rem}.hero{padding:1.1rem;grid-template-columns:1fr;min-height:0}.hero h1{font-size:2.2rem}.hero-art{max-width:280px;margin:0 auto;width:100%;order:-1}.desk-art{min-height:160px;padding-top:15px;transform:rotate(-3deg)}.art-tray{border-width:6px;padding:.6rem}.magnifier{width:60px;height:60px;border-width:6px;right:8%}.magnifier:after{width:15px;height:46px;top:42px;left:43px}.art-note{font-size:.85rem;margin-top:.8rem}.hero .eyebrow{font-size:.65rem}.hero .actions{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.hero .actions button{font-size:.9rem;justify-content:center;padding:.4rem;min-height:54px}.hero #extra-modes button{min-height:48px}.game-head{gap:.3rem;display:block}.game-head h1{font-size:1.6rem;margin:.2rem 0}.game-head .eyebrow{font-size:.65rem}.game-head #intro{font-size:.85rem;margin:.3rem 0}.game-head .actions{gap:.35rem;margin:.5rem 0}.game-head .actions button{font-size:.7rem;min-height:44px;padding:.4rem .6rem}.rule-card{padding:.55rem .65rem;margin:.4rem 0 .8rem}.rule-lead>.rule-icon{width:50px;height:50px;padding:4px}.rule-lead .rule-icon svg{width:40px;height:40px}.rule-lead strong{font-size:1rem}.rule-lead p{font-size:.73rem}.how-to{font-size:.67rem;gap:.6rem;margin:.35rem 0 0}.how-to span{font-size:1rem}.board{gap:.65rem}.tray-panel,.groups{padding:.65rem}.tray-panel h2,.groups h2{font-size:.9rem}.tray-panel p{font-size:.7rem;margin:.2rem 0 .4rem}.token{min-height:76px}.token svg{height:65px}.bin .token svg{height:50px}.bin .token{min-height:60px}.bin-target{min-height:78px;font-size:.75rem}.bin .rule-icon,.bin .rule-icon svg{width:32px;height:32px}.not-icon>span:last-child{line-height:32px;font-size:2.3rem}.bins{gap:.5rem;grid-template-columns:1fr 1fr}.bin .tokens{gap:.35rem}.game-actions{gap:.4rem;margin-top:.35rem}.game-actions button{font-size:.75rem;padding:.45rem .65rem;min-height:44px}.inspector-picture{width:66px;min-width:66px}.inspector svg{width:66px;height:66px}.inspector{padding:.5rem}.property-list span{font-size:.7rem}.inspector strong{font-size:.85rem}.clue-board section{padding:.5rem}.clue-board h2{font-size:.85rem}.rule-choices button{font-size:.75rem}.clue-tile svg{width:56px;height:56px}.truth-examples{grid-template-columns:1fr 1fr}.truth-examples>div{flex-direction:row;font-size:.7rem}.truth-examples svg{width:44px;height:44px}.truth-examples+p{font-size:.75rem}.comparison p{font-size:.65rem}.bin .tokens{grid-template-columns:repeat(auto-fit,minmax(48px,1fr))}.tokens{grid-template-columns:repeat(3,minmax(48px,1fr))}}
@media(max-width:370px){.bins{grid-template-columns:1fr 1fr}.bin .tokens{grid-template-columns:1fr}.token svg{height:60px}.rule-choices{grid-template-columns:1fr 1fr}.bin-target{overflow-wrap:normal}.how-to{gap:.4rem}.game-head .actions button{font-size:.65rem}.brand div>span{font-size:.7rem}nav{gap:.3rem}nav button{font-size:.7rem;padding:.3rem .5rem}.hero h1{font-size:1.85rem}}
@media(prefers-reduced-motion:no-preference){.bin.ready .bin-target{transition:background .15s ease}.token.selected{transition:background .12s ease}}
.show-move{margin:.45rem 0 0;font-size:.78rem;min-height:44px;padding:.3rem .7rem;background:#f1f6e9}.rule-card{position:relative}.how-to{margin-top:.4rem}@media(min-width:651px){.show-move{position:absolute;right:1rem;top:.8rem}.rule-lead{padding-right:5rem}}
@media(max-width:650px){#tray{grid-template-columns:repeat(4,minmax(48px,1fr))}#tray[data-count="6"],#tray[data-count="5"]{grid-template-columns:repeat(3,minmax(48px,1fr))}.show-move{float:right;margin-top:-.4rem}.how-to{clear:none;gap:.45rem}.game-actions{position:fixed;bottom:0;left:0;right:0;max-width:650px;margin:0 auto;padding:.5rem .75rem;background:#fffcf1f5;border-top:2px solid #d9cfb9;box-shadow:0 -4px 15px #68593815;z-index:10;padding-bottom:max(.5rem,env(safe-area-inset-bottom))}#game{padding-bottom:120px}}
@media(max-height:450px){.game-actions{position:relative}#game{padding-bottom:0}}
.choice-card{background:#fffdf7;border:2px solid #b8cbbf;border-radius:14px;overflow:hidden}.choice-card button{border:0;border-radius:0;width:100%;min-height:82px}.choice-card .hear-rule{border-top:1px solid #d0ddd4;font-size:.65rem;min-height:44px;background:#edf4ed;padding:.35rem}.choice-card button:focus-visible{outline-offset:-4px}
/* Keep only the completion action within thumb reach, leaving trays clear. */
@media(max-width:650px){.game-actions{position:relative;max-width:none;padding:.5rem 0;border:0;box-shadow:none;background:transparent}#check,#save-groups{position:fixed;right:max(.75rem,env(safe-area-inset-right));bottom:max(.75rem,env(safe-area-inset-bottom));z-index:10;box-shadow:0 4px 15px #263c4a44;border:3px solid #fff;min-height:48px;padding:.55rem .95rem}#save-groups{background:#216e62;color:white}#next-rule{position:fixed;left:.75rem;bottom:max(.75rem,env(safe-area-inset-bottom));z-index:10;background:#fff0c0;box-shadow:0 4px 15px #263c4a44;border:3px solid white;min-height:48px}#game{padding-bottom:70px}.rule-card .show-move{float:none;position:absolute;right:.5rem;top:.55rem;margin:0;font-size:.65rem;padding:.3rem .4rem}.rule-card .rule-lead{padding-right:68px}.rule-card .how-to{gap:.7rem;font-size:.65rem}.rule-card .rule-lead p{max-width:190px}.rule-lead strong{font-size:.95rem}}
@media(max-height:450px){#check,#save-groups,#next-rule{position:static;box-shadow:none;border:2px solid #596d78}}
/* Replaced token lists must not move the page's scroll anchor during a tap. */
html{overflow-anchor:none}
/* Every result stays in the document flow; help never pushes the targets away. */
@media(max-width:650px){#check,#save-groups,#next-rule{position:static;box-shadow:none;border:2px solid #596d78;min-height:48px}#check{border-color:#126754}#game{padding-bottom:0}.rule-card .how-to{flex-wrap:nowrap;font-size:.62rem;gap:.55rem}}
[data-token],.bin-target{scroll-margin:1rem}
/* A short held-out example keeps the rule visible and the original groups intact. */
.transfer{border:2px solid #b7cdbf;background:#eef7ee;max-width:680px;scroll-margin-top:1rem}.transfer-heading{display:flex;align-items:start;justify-content:space-between;gap:.6rem;flex-wrap:wrap}.transfer-heading h2{font-size:1.2rem;margin:.2rem 0}.transfer-heading p{margin:.3rem 0;font-size:.9rem}.transfer-pair{display:flex;align-items:center;justify-content:center;gap:1.5rem;margin:1rem 0}.transfer-token{width:125px;max-width:45%;flex-shrink:0}.transfer-token>svg{display:block;width:100%;height:auto}.transfer-rule{display:flex;flex-direction:column;align-items:center;gap:.35rem;max-width:45%;font-size:1rem;text-align:center}.transfer-rule .rule-icon,.transfer-rule .rule-icon svg{width:58px;height:58px}.transfer-answers{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}.transfer-answers button,.transfer-features button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;min-height:90px;min-width:0;padding:.45rem;overflow-wrap:anywhere}.transfer-answers [aria-pressed=true],.transfer-features [aria-pressed=true]{outline:3px solid #7433b6;outline-offset:1px;background:#f2eafa}.transfer-feedback{font-size:.9rem;line-height:1.45;min-height:2.8em}.transfer-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin:.65rem 0}.transfer-features button{font-size:.85rem}.transfer .rule-icon{margin-right:0}.transfer h3{font-size:1rem;margin:.8rem 0 .2rem}.transfer .small{font-size:.8rem}.transfer #transfer-look,.transfer #transfer-close{min-height:48px}.transfer-heading button{flex-shrink:0}#together-listen{margin-right:.4rem}
@media(max-width:650px){.transfer{padding:.65rem}.transfer-heading h2{font-size:1rem}.transfer-heading p{font-size:.8rem}.transfer-heading button{font-size:.75rem;padding:.4rem .6rem}.transfer-rule{font-size:.9rem}.transfer-features button{font-size:.75rem}.transfer-answers button{font-size:.8rem}.transfer .rule-icon,.transfer .rule-icon svg{width:38px;height:38px}.transfer .not-icon>span:last-child{line-height:38px;font-size:2.5rem}}
/* Enlarged text must reflow the welcome desk as well as the activity. */
.hero>div{min-width:0}.hero h1{overflow-wrap:anywhere}.art-tray svg{min-width:0}.hero .actions button{min-width:0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:650px){.hero{grid-template-columns:minmax(0,1fr)}.hero .actions{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-art{max-width:100%}.hero .eyebrow{overflow-wrap:anywhere}}
.transfer-answers button>span:last-child,.transfer-features button>span:last-child{max-width:100%;overflow-wrap:anywhere}.transfer .not-icon>span:last-child{font-size:48px;line-height:40px}
@media(max-width:650px){.hero .actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,7rem),1fr))}.hero .actions button{flex-wrap:wrap}}

/* Tiles own drag gestures; the surrounding page remains scrollable. */
#board [data-token]{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
#board .drag-source{opacity:.35;cursor:grabbing}
.drag-ghost{position:fixed;z-index:1000;width:80px;height:80px;transform:translate(-50%,-50%);pointer-events:none;filter:drop-shadow(0 5px 5px #263c4a66)}
.drag-ghost svg{display:block;width:100%;height:100%}
#board .drop-hover{outline:4px solid #7433b6;outline-offset:2px;background:#eee6fc}

/* Preserve reading width when text is enlarged on a narrow welcome screen. */
@media(max-width:650px){
 main:has(>#welcome:not([hidden])){padding-inline:min(.75rem,14px)}
 #welcome .hero{padding:min(1.1rem,20px)}
 #welcome .hero h1{overflow-wrap:normal;word-break:normal}
}

/* Persistent navigation shares the header controls' accessible target size. */
nav .back-to-games{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:.35rem .65rem;font-size:.8rem;font-weight:700;text-decoration:underline;text-underline-offset:.15em;overflow-wrap:anywhere}
@media(max-width:370px){nav .back-to-games{font-size:.7rem;padding:.3rem .5rem}}

/* Premium detective desk: Telegram 4474. Keep model art and gesture geometry intact. */
:root{--desk:#172e40;--desk-deep:#102332;--desk-paper:#fff8e9;--desk-brass:#e9bd70;--desk-coral:#b64432;--desk-line:#cab99a;--desk-ink:#213b49}
body{min-height:100vh;background:radial-gradient(ellipse at 15% 0%,#31566a 0,transparent 58%),repeating-linear-gradient(110deg,transparent 0 100px,#ffffff02 101px 102px),var(--desk-deep);color:var(--desk-ink)}
.suite-header{background:#102332;color:#fff4dc;border-bottom:1px solid #ffffff20;padding:16px 28px;gap:18px}.suite-header .brand,.suite-header a{color:#fff4dc}.brand>span{display:grid;place-items:center;background:#e9bd70;border:2px solid #ffe1a6;border-radius:14px;width:48px;height:48px;font-size:29px;box-shadow:0 3px 0 #070f18}.brand strong{font-size:1.2rem;letter-spacing:.01em}.brand div>span{color:#c5d7de;font-size:.75rem;margin-top:3px}.suite-header nav{gap:8px}.suite-header .suite-control{background:#203e51;color:#fff4dc;border-color:#567181;box-shadow:0 3px 0 #071824;border-radius:11px;min-height:44px}.suite-header .suite-control:hover{background:#33576b;color:white;border-color:#b4d0d9}
main{max-width:1200px;padding-top:32px;padding-bottom:60px}#welcome .hero{position:relative;isolation:isolate;overflow:hidden;background:var(--desk-paper);border:2px solid #e2cfaa;border-radius:28px;box-shadow:0 10px 0 #071b28,0 22px 45px #0003;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:36px;padding:52px 44px;min-height:440px}#welcome .hero:before{content:'';position:absolute;inset:12px;border:1px dashed #d6c5a4;border-radius:19px;z-index:-1;pointer-events:none}.hero .eyebrow{color:#876132;letter-spacing:.12em;font-size:.7rem}.hero h1{font-size:clamp(2.4rem,5vw,4rem);line-height:1.04;max-width:12ch;color:#1c394a;margin:20px 0}.hero p:not(.eyebrow){max-width:34ch;color:#49616a}.hero .actions{gap:12px;margin-top:28px}.hero .actions button{min-height:56px;border-radius:13px}.hero .suite-action{background:#b64432;border:2px solid #de8370;color:#fffaf0;box-shadow:0 5px 0 #722b23;font-size:1.1rem}.hero .suite-action:hover{background:#963726;color:white}.hero .actions button:not(.suite-action){background:#fffdf5;border-color:#b4a287;box-shadow:0 4px 0 #d8c8aa;color:#304b56}.hero-art{width:100%;padding:18px}.desk-art{min-height:250px;transform:rotate(-7deg)}.art-tray{background:#b88d58;border-color:#e1bc83;box-shadow:0 10px 0 #87633b,0 24px 30px #553c2530;padding:22px 12px;gap:12px}.magnifier{width:100px;height:100px;border-color:#244e62;right:1%;top:-8px}.magnifier:after{background:#244e62;top:77px;left:73px;height:75px}.art-note{color:#496270;font-size:1rem;transform:rotate(7deg);margin-top:28px}.home-note{color:#e4e9df;padding:30px 16px;display:flex;gap:24px;align-items:baseline;flex-wrap:wrap}.home-note strong{color:#f2ca82}.home-note p{margin:0;color:#c6d7dd}
button{border-radius:12px;box-shadow:0 3px 0 #c9c0aa;border-color:#7b9297}button:hover:not(:disabled){background:#eef5ed}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.6;box-shadow:none}.primary{background:#b64432;border-color:#873324;color:#fffdf4;box-shadow:0 4px 0 #702c24}.primary:hover:not(:disabled){background:#963726}.eyebrow{letter-spacing:.1em}#game{background:#f6eddb;border:2px solid #dfcba4;border-radius:25px;padding:28px;box-shadow:0 9px 0 #071b28,0 20px 40px #0003}.game-head{gap:20px;align-items:center;border-bottom:1px solid #cfbea0;padding-bottom:18px}.game-head h1{font-size:clamp(1.6rem,3vw,2.3rem);color:#213b49}.game-head .eyebrow{color:#80603b;font-size:.65rem}.game-head #intro{font-size:.88rem;max-width:47ch}.game-head .suite-control{background:#fffbef;border-color:#b6a787;box-shadow:0 3px 0 #cbb993;color:#304e58;border-radius:10px;font-size:.75rem;min-height:44px}.case-progress{display:flex;align-items:center;gap:10px;min-height:48px;margin:10px 0;color:#5b503e;font-size:.75rem;font-weight:700;flex-wrap:wrap}.case-seal{display:grid;place-items:center;background:#ead19b;color:#5d4727;border:1px solid #b59a62;border-radius:50%;width:28px;height:28px}.placement-track{height:8px;flex:1;min-width:60px;max-width:220px;margin-left:auto;background:#d9cbb2;border-radius:8px;overflow:hidden}.placement-track>span{display:block;height:100%;background:#337869;border-radius:inherit}#game[data-result=complete] .case-seal{background:#256656;color:#fff5d9}.rule-card{background:#fffdf6;border:1px solid #c9b99c;border-left:5px solid #b88739;border-radius:13px;box-shadow:0 3px 0 #dfd1b6;padding:14px 18px;margin:0 0 20px}.rule-lead>.rule-icon{background:#f3deaa;border:1px solid #dfc180}.rule-lead strong{font-size:1.05rem}.how-to{color:#546464;font-size:.7rem;gap:20px}.how-to span{color:#38786b}.board{grid-template-columns:minmax(220px,.8fr) minmax(0,1.65fr);gap:20px;align-items:stretch}.tray-panel,.groups{border-radius:17px;padding:18px}.tray-panel{background:#e8deca;border:2px solid #c1aa83;box-shadow:inset 0 3px 8px #60471d12}.groups{background:#e4e9df;border:2px solid #b0bca8;box-shadow:inset 0 3px 8px #28492e0d}.tray-panel h2,.groups h2{font-size:1.05rem;color:#304e58}.tray-panel p{font-size:.75rem;color:#53605b}.tokens{gap:12px}.token{min-height:88px;background:linear-gradient(#fffdf5,#f3ecd9);border:2px solid #9ca99d;box-shadow:0 5px 0 #b4bba9,0 7px 8px #30432e14;border-radius:14px}.token svg{filter:drop-shadow(0 2px 0 #162d3920)}.token:hover:not(:disabled){background:#fffdf6;border-color:#497965}.token.selected{background:#eee5ff;border-color:#7754a9;outline-color:#7754a9}.bin{border:2px solid #8cae9d;background:#f6faf1;border-radius:14px;box-shadow:0 4px 0 #b1bfac;min-height:205px;padding:10px}.bin:nth-child(2){border-color:#a7a6bb;background:#f7f5fb;box-shadow:0 4px 0 #c0bace}.bin-target{background:#dbece0;border:1px solid #739883;border-bottom:3px solid #739883;border-radius:10px;min-height:88px;color:#274d42;box-shadow:none;font-size:.85rem}.bin:nth-child(2) .bin-target{background:#e6e2f0;border-color:#9a91b2;color:#4c4165}.bin .tokens{margin-top:12px;gap:10px}.bin .token{min-height:72px}.example-tag{color:#4d6454;font-size:.56rem}.bin.ready .bin-target{background:#fff1be;border-color:#a77928}.drop-hover{outline-color:#7854aa!important}.empty-tray{padding:20px 0;color:#576c60}.game-actions{background:transparent;border-top:1px solid #cfbea0;padding-top:18px;gap:10px;margin-top:22px}.game-actions button{font-size:.8rem;min-height:48px;background:#fffcf3}.game-actions .primary{background:#b64432;color:white;border-color:#873324;min-width:112px}.feedback{background:#fff4d5;border:2px solid #bd903a;border-radius:13px;padding:16px;color:#5c4523}.feedback:empty{display:none}#game[data-result=complete] .feedback{background:#e0f1df;border-color:#49866a;color:#285b44}#game[data-result=review] .token.problem{outline:3px dashed #ac4936;border-color:#ac4936}.suite-coplay{background:#eae0c9;border-color:#cbbd9b;margin-top:24px;color:#435d52}.suite-coplay summary{padding:12px;min-height:48px}.suite-coplay>p,.suite-coplay>button{margin:10px 14px}.notice{background:#fff4d8;color:#394f53}#save-status:not(:empty){background:#fff4d8;border-radius:12px;padding:14px}#rule-picker,#gallery,#parent{background:var(--desk-paper);border:2px solid #e0cba6;border-radius:24px;padding:28px;box-shadow:0 8px 0 #071b28}.saved-card{border-color:#c9b89a;background:#fffdf6}.choice-card{border-color:#a9b6aa}.show-move{background:#fff3ce;border-color:#ac9561;box-shadow:0 3px 0 #d7c695;min-height:44px}
@media(max-width:800px){.suite-header{padding:14px 18px}.suite-header nav{gap:6px}main{padding:22px 16px 40px}#welcome .hero{gap:20px;padding:34px 28px}.hero-art{padding:0}.board{gap:12px;grid-template-columns:minmax(180px,.8fr) minmax(0,1.4fr)}#game{padding:20px}.tokens{gap:8px}.tray-panel,.groups{padding:12px}}
@media(max-width:650px){.suite-header{padding:12px 14px;gap:12px}.brand>span{width:40px;height:40px;border-radius:11px;font-size:25px}.brand strong{font-size:1.05rem}.brand div>span{font-size:.68rem}.suite-header nav{display:grid;grid-template-columns:1.35fr .7fr 1fr 1.05fr;width:100%;gap:6px}.suite-header nav .suite-control,.suite-header nav .back-to-games{padding:6px 4px;font-size:.64rem;min-height:44px;line-height:1.2;text-align:center;border-radius:9px}main{padding:18px 10px 32px}#welcome .hero{grid-template-columns:minmax(0,1fr);padding:28px 24px;gap:8px;min-height:0;border-radius:22px}.hero-art{max-width:250px;order:0;margin:20px auto 0}.desk-art{min-height:165px;padding-top:14px}.art-tray{padding:14px 8px;border-width:6px;gap:8px}.magnifier{width:65px;height:65px;border-width:6px;top:-3px;right:0}.magnifier:after{top:45px;left:46px;height:48px;width:15px}.art-note{font-size:.8rem;margin-top:22px}.hero h1{font-size:2.6rem;max-width:12ch;margin:14px 0}.hero .eyebrow{font-size:.61rem;letter-spacing:.08em}.hero p:not(.eyebrow){font-size:.9rem}.hero .actions{margin-top:22px;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hero .actions button{font-size:.8rem;min-height:48px;padding:8px}.hero .actions .suite-action{grid-column:1/-1;font-size:1.05rem;min-height:56px}.home-note{padding:24px 12px;gap:8px;font-size:.85rem}.home-note p{font-size:.8rem}#game{padding:15px 12px;border-radius:19px}.game-head{padding-bottom:10px;display:block}.game-head h1{font-size:1.7rem}.game-head #intro{font-size:.77rem}.game-head .actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:12px 0 2px}.game-head .actions button{font-size:.63rem;padding:6px 3px;min-height:44px}.case-progress{font-size:.65rem;gap:7px;min-height:38px;margin:8px 0}.case-seal{width:24px;height:24px}.placement-track{max-width:90px}.rule-card{padding:10px 12px;margin-bottom:14px}.rule-lead strong{font-size:.95rem}.rule-lead p{font-size:.7rem}.rule-card .rule-lead{padding-right:64px}.rule-card .show-move{right:8px;top:10px;font-size:.6rem;padding:4px;min-height:44px}.rule-card .how-to{flex-wrap:wrap;gap:8px;font-size:.58rem;margin-top:8px}.board{grid-template-columns:minmax(0,1fr);gap:12px}.tray-panel,.groups{padding:10px;border-radius:13px}.tray-panel h2,.groups h2{font-size:.85rem}.tray-panel p{font-size:.65rem;margin:3px 0 8px}#tray{gap:8px;grid-template-columns:repeat(4,minmax(0,1fr))}#tray[data-count='6'],#tray[data-count='5']{grid-template-columns:repeat(3,minmax(0,1fr))}.token{min-height:68px;border-radius:11px}.token svg{height:56px}.bins{gap:9px}.bin{padding:7px;min-height:174px;border-radius:12px}.bin-target{min-height:72px;font-size:.73rem}.bin .tokens{gap:7px;margin-top:10px;grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}.bin .token{min-height:62px}.bin .token svg{height:46px}.bin .rule-icon,.bin .rule-icon svg{width:29px;height:29px}.example-tag{font-size:.5rem}.game-actions{margin-top:17px;padding-top:14px;gap:8px}.game-actions button{font-size:.68rem;padding:7px 9px;min-height:44px}.game-actions .primary{min-width:88px;min-height:48px}.suite-coplay{margin-top:18px;font-size:.85rem}.feedback{font-size:.78rem;padding:12px}#rule-picker,#gallery,#parent{padding:20px 14px}.home-note strong{width:100%}}
@media(max-width:370px){.suite-header nav .suite-control,.suite-header nav .back-to-games{font-size:.56rem}.hero h1{font-size:2.2rem}#welcome .hero{padding:24px 20px}#game{padding:12px 9px}.bin .tokens{grid-template-columns:1fr}.bin .token svg{height:48px}.placement-track{max-width:65px}.case-progress{font-size:.6rem}.game-head .actions button{font-size:.57rem}.how-to li{max-width:100%}}
@media(prefers-reduced-motion:no-preference){.token,.bin-target{transition:background .12s ease,border-color .12s ease}.placement-track>span{transition:width .18s ease}#game[data-result=complete] .case-seal{animation:case-stamp .25s ease-out}@keyframes case-stamp{from{transform:scale(1.18)}to{transform:scale(1)}}}
@media(prefers-reduced-motion:reduce){button:active:not(:disabled){transform:none}}

/* R3: reserve real layout space for help and enlarged labels. */
.rule-card{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px}
.rule-card .rule-lead{flex:1 1 16rem;min-width:0;padding-right:0;flex-wrap:wrap}
.rule-card .rule-lead>div{min-width:0;flex:1 1 8rem}
.rule-card .rule-lead p{max-width:none}
.rule-card .show-move{position:static;float:none;flex:0 0 auto;max-width:100%;margin:0;padding:.4rem .7rem;font-size:.78rem;white-space:normal}
.rule-card .how-to{flex:1 0 100%;min-width:0;margin:0;flex-wrap:wrap}
@media(max-width:650px){
 .suite-header nav{grid-template-columns:repeat(auto-fit,minmax(min(100%,7rem),1fr))}
 .suite-header nav .suite-control,.suite-header nav .back-to-games{overflow-wrap:normal;word-break:normal}
 .game-head .actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,6rem),1fr))}
 .game-head .actions button{overflow-wrap:normal;word-break:normal}
 .transfer-answers,.transfer-features{grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr))}
 .transfer-answers button>span:last-child,.transfer-features button>span:last-child{overflow-wrap:normal;word-break:normal}
}
