/* Fun Room: the hobbies scene (classes start hb-). The shelf is painted (art/scene/shelf-close.webp, Codex batch 37, every shelf empty);
   until it lands a walnut case with brass trim is drawn in CSS. When the painting loads, the case gets .art: the CSS boards hide and the
   three rows sit where --top / --bot (the empty space above the first shelf and below the last) say. Retune those two when the art is in. */
.sc-hobbies{--brass1:#f6dc8e;--brass2:#d3a444;--brass3:#a47822;--ink:#3a2410}

.hb-case{position:relative;margin:4px -16px 0;width:calc(100% + 32px);max-width:calc(70dvh * 700 / 980);margin-left:auto;margin-right:auto;aspect-ratio:700/980;
  background:url(art/scene/shelf-close.webp) center/100% 100% no-repeat;filter:drop-shadow(0 12px 16px rgba(0,0,0,.5))}
.hb-probe{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}

.hb-pages{position:absolute;inset:0;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.hb-pages::-webkit-scrollbar{display:none}
.hb-pg{position:relative;flex:none;width:100%;height:100%;scroll-snap-align:start}
/* one compartment of the painted shelf: a small grid, things sitting at the bottom of their cell */
.hb-cmp{position:absolute;display:grid;padding-bottom:3px;box-sizing:border-box}
.hb-slot{position:relative;display:flex;justify-content:center;align-items:flex-end;min-width:0;min-height:0;padding:0 1px}

.hb-it{position:relative;display:flex;flex-direction:column;align-items:center;width:100%;min-height:44px}
.hb-main{display:flex;align-items:flex-end;justify-content:center;width:100%;padding:0;min-height:44px;-webkit-tap-highlight-color:transparent}
.hb-main:active{transform:scale(.96)}
.hb-pic{display:block;width:84%;max-width:104px;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 5px 5px rgba(0,0,0,.55))}
.hb-it.sel .hb-pic{filter:drop-shadow(0 0 10px rgba(255,217,138,.85)) drop-shadow(0 5px 5px rgba(0,0,0,.55))}
.hb-it.gold .hb-pic{filter:drop-shadow(0 0 12px rgba(255,210,90,.95)) drop-shadow(0 5px 5px rgba(0,0,0,.55))}
.hb-card{display:none}
/* a hobby with no painted item: a small cream card in a thin brass frame */
.hb-it.nopic .hb-card{display:flex;align-items:center;justify-content:center;text-align:center;width:100%;max-width:100px;min-height:48px;padding:0;
  font:700 10px/1.1 var(--display);letter-spacing:.02em;color:var(--ink);overflow-wrap:anywhere;hyphens:none;letter-spacing:0;
  border:6px solid transparent;border-image:url(art/scene/starter-card.webp) 34 fill/6px stretch;border-radius:3px;box-shadow:0 4px 8px rgba(0,0,0,.45)}
.hb-it.nopic.sel .hb-card{box-shadow:0 0 14px rgba(255,217,138,.75),0 4px 8px rgba(0,0,0,.45)}
.hb-it.nopic.gold .hb-card{box-shadow:0 0 0 2px rgba(255,210,90,.55),0 0 18px rgba(255,210,90,.9),0 4px 8px rgba(0,0,0,.45)}
/* a card already shows its own name: only a painted item carries the brass label below it */
.hb-label{display:block;max-width:100%;margin-top:2px;padding:0 4px;border-radius:3px;font:700 8.5px/1.3 var(--display);letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  color:#3a2408;background:linear-gradient(#f6dc8e,#c99a3a 55%,#e8c46a);box-shadow:0 1px 2px rgba(0,0,0,.6),inset 0 0 0 .5px rgba(90,58,16,.7)}
.hb-it.nopic .hb-label{display:none}
.hb-x{position:absolute;top:-2px;right:-1px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;color:#f3ead6;background:rgba(20,10,4,.82);border:1px solid rgba(216,178,92,.6);opacity:.9}
.hb-x::after{content:"";position:absolute;inset:-12px}   /* a 44 px tap target */
.hb-it.new .hb-main{animation:hbDrop .75s cubic-bezier(.3,0,.4,1) both}
@keyframes hbDrop{0%{opacity:0;transform:translateY(-90px)}38%{opacity:1;transform:translateY(0)}55%{transform:translateY(-16px)}72%{transform:translateY(0)}86%{transform:translateY(-5px)}100%{transform:none}}

.hb-dots{display:flex;justify-content:center;gap:2px;margin-top:6px;min-height:24px}
.hb-dots i{width:24px;height:24px;display:grid;place-items:center;cursor:pointer}
.hb-dots i::after{content:"";width:8px;height:8px;border-radius:50%;background:rgba(243,234,214,.3);transition:all .25s}
.hb-dots i.on::after{background:var(--lamp);box-shadow:0 0 8px rgba(255,217,138,.8);transform:scale(1.25)}
.hb-dots b{font:700 13px var(--display);letter-spacing:.1em;color:var(--lamp);padding:4px 10px;border-radius:999px;background:rgba(30,16,8,.7);border:1px solid rgba(216,178,92,.4)}
.hb-both{min-height:0;display:flex;justify-content:center;font:600 13px var(--display);letter-spacing:.04em;color:#ffd25a;text-shadow:0 0 12px rgba(255,210,90,.6)}
.hb-both span{padding-top:6px}
.hb-focus{font:700 14px var(--display);letter-spacing:.06em;color:var(--lamp);text-align:center;padding-top:8px}
.hb-revealwrap .fr-reveal{justify-content:center}
.hb-list .hb-none{padding:16px;text-align:center;color:rgba(243,234,214,.55);font:500 14px var(--sans)}
.hb-list{margin-bottom:10px}
#hbChips{gap:5px}#hbChips button{padding:0 10px;font-size:12px}

/* ---------- Marc's own paintings (fr-fav.js): each hobby stands on the shelf as a small framed picture (the painted item and then the cream card stay as fallbacks) ---------- */
.hb-frame{display:none;position:relative;width:98%;max-width:100px;aspect-ratio:1/1;margin-bottom:1px;padding:3.5px;border-radius:2px;transform:rotate(-1.2deg);
  background:linear-gradient(135deg,#f6dc8e,#a47822 40%,#e0b755 70%,#8a6118);box-shadow:0 0 0 1px #4a300a,0 6px 7px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,236,170,.6);transition:transform .25s}
.hb-cmp.top .hb-frame{aspect-ratio:5/4;width:90%}
.hb-slot:nth-child(2n) .hb-frame{transform:rotate(1deg)}
.hb-frame i{display:block;width:100%;height:100%;background:var(--fav) center/cover no-repeat;border-radius:1px;box-shadow:inset 0 0 0 1px rgba(40,22,2,.7),inset 0 2px 5px rgba(0,0,0,.45)}
.hb-frame.fav-on{display:block}
.hb-it:has(.hb-frame.fav-on) .hb-pic,.hb-it:has(.hb-frame.fav-on) .hb-card{display:none!important}
.hb-it:has(.hb-frame.fav-on) .hb-label{display:block!important}
.hb-it.sel .hb-frame.fav-on{box-shadow:0 0 0 1px #4a300a,0 0 14px rgba(255,217,138,.85),0 6px 7px rgba(0,0,0,.55)}
.hb-it.gold .hb-frame.fav-on{box-shadow:0 0 0 1px #4a300a,0 0 16px rgba(255,210,90,.95),0 6px 7px rgba(0,0,0,.55)}
.hb-main:active .hb-frame{transform:scale(.96)}
.hb-th{flex:none;width:38px;height:38px;margin-left:-6px;border-radius:3px;background:rgba(255,255,255,.06);border:1.5px solid rgba(211,164,68,.5)}
.hb-th.fav-on{background:var(--fav) center/cover no-repeat;border-color:rgba(211,164,68,.95);box-shadow:0 2px 5px rgba(0,0,0,.5)}
.hb-list .fr-row{padding-left:10px}
.hb-x svg{width:11px;height:11px}
