/* Shelves (v0.197 prototype, live from v2.0). Tokens, .card, .btn and the colour-scheme rules come
   from /public.css; the layout follows /games/games.css so it can move into the hub. */
main{max-width:720px;margin:0 auto;padding:max(24px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 56px max(16px,env(safe-area-inset-left))}
.brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15px;color:var(--label);margin:0 0 20px}
h1{font-size:30px;line-height:1.15;letter-spacing:-.02em;margin:0 0 10px}
h3{font-size:17px;margin:18px 0 6px}
.lede{color:var(--label2);margin:0 0 6px}
.card{padding:18px 16px 16px}
.app-back{display:inline-flex;align-items:center;min-height:44px;margin-bottom:12px;color:var(--blue);font-size:15px}
.hub-foot a{color:var(--blue)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}

/* v0.199 (Legal BLOCK-49 S-1): one teal ramp from the brand colour, pale to deep, with
   the room's name on every shelf; never a yellow-to-purple ramp */
:root{--sh-yellow:#D6EFE4;--sh-green:#9FD3BF;--sh-blue:#4FA88A;--sh-purple:#0F6E56;--sh-ink:#10231C}
.shelf.purple{color:#fff}
.shelf.purple.missed{outline-color:#fff}

/* the 4x4 board: square-ish buttons; long names wrap and hyphenate */
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 12px}
/* font-size is the starting size; shelves.js shrinks a tile's text until its longest
   part fits (fit()), so no name is ever broken anywhere but its one soft hyphen */
.tile{min-height:64px;padding:6px 3px;border:0;border-radius:9px;background:var(--fill2);color:var(--label);
  font:inherit;font-weight:700;font-size:15px;line-height:1.15;text-align:center;letter-spacing:-.01em;
  hyphens:manual;overflow-wrap:normal;overflow:hidden;cursor:pointer;touch-action:manipulation;transition:background .12s,transform .12s}
@media (min-width:560px){.tile{min-height:76px}}
.tile:hover{background:var(--fill3)}
.tile[aria-pressed="true"]{background:var(--label);color:var(--bg)}
.tile:disabled{cursor:default}

/* a solved shelf spans the board's width */
.shelf{border-radius:9px;padding:10px 12px;margin:0 0 6px;color:var(--sh-ink);text-align:center}
.shelf.yellow{background:var(--sh-yellow)}.shelf.green{background:var(--sh-green)}
.shelf.blue{background:var(--sh-blue)}.shelf.purple{background:var(--sh-purple)}
.shelf .eye{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;opacity:.75}
.shelf .theme{font-weight:800;font-size:16px;margin:2px 0}
.shelf .members{font-size:15px}
.shelf .why{font-size:14px;margin-top:6px;opacity:.9}
.shelf .src{font-size:13px;margin-top:6px;opacity:.9;overflow-wrap:anywhere}
.shelf .src a{color:inherit;text-decoration:underline}
.shelf.missed{opacity:.8;outline:2px dashed var(--sh-ink);outline-offset:-4px}

.mistakes{text-align:center;color:var(--label2);font-size:15px;margin:0 0 6px}
.mistakes .pip{display:inline-block;width:12px;height:12px;border-radius:6px;background:var(--label2);margin:0 3px;vertical-align:-1px}
.mistakes .pip.used{background:transparent;box-shadow:inset 0 0 0 2px var(--sep)}
.status{min-height:24px;text-align:center;font-weight:600;margin:0 0 12px;color:var(--label)}
.controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:0 0 6px}
.btn.small{min-height:44px;padding:9px 16px;font-size:15px}
.btn:disabled{opacity:.45;cursor:default}
.after{margin:12px 0 0;text-align:center}
.share{display:inline-block;margin:0 0 10px;font:20px/1.25 system-ui,sans-serif;letter-spacing:2px;text-align:left}
.hub-foot{font-size:14px;color:var(--label2);margin-top:28px}

/* motion: a wrong guess shakes, a solved shelf settles in. Off with reduced motion. */
:root{--ease:cubic-bezier(.2,.7,.2,1)}
.tile.shake{animation:shake .32s var(--ease)}
@keyframes shake{20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(3px)}}
.shelf.new{animation:settle .36s var(--ease)}
@keyframes settle{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.tile.shake,.shelf.new{animation:none}}
