/* Room objects use generated raster cutouts, aligned with the supplied scene. */
.story-radio, .story-matches { position:absolute; padding:0; z-index:2; touch-action:manipulation; }
.story-radio { left:22.8%; top:44.5%; width:10%; height:13%; }
.story-radio img { width:100%; height:100%; object-fit:contain; filter:brightness(.85) drop-shadow(3px 5px 3px #0008); }
.story-radio:hover img { filter:brightness(1.08) drop-shadow(3px 5px 3px #0008); }
.radio-indicator { position:absolute; width:5px; height:5px; left:47%; top:72%; border-radius:50%; background:#735431; pointer-events:none; }
[aria-pressed="true"] > .radio-indicator { background:#ffe3a2; box-shadow:0 0 10px 3px #e6a35470; }
/* The shelf stick is picked up directly; only its own hit area captures touch. */
.story-matches { left:4.2%; top:31%; width:9%; height:5.4%; min-height:32px; cursor:grab; touch-action:none; user-select:none; }
.story-matches:active { cursor:grabbing; }
.story-matches img { width:100%; height:100%; object-fit:contain; filter:brightness(.95) drop-shadow(2px 3px 2px #0007); pointer-events:none; }
.match-label { position:absolute; top:96%; left:50%; transform:translateX(-50%); white-space:nowrap; padding:5px 9px; background:#141511ba; border:1px solid #b99b6b66; font-size:.75rem; color:#e4c99b; border-radius:3px; }
.story-matches:hover img { filter:brightness(1.15) drop-shadow(2px 3px 3px #0007); }
.match-held .story-matches img { opacity:.35; }
.fire-burning .story-matches { visibility:hidden; }
.carried-match { position:fixed; z-index:45; width:140px; height:auto; transform:translate(-90%,-50%) rotate(-14deg); transform-origin:90% 50%; filter:drop-shadow(2px 4px 3px #0008); pointer-events:none; user-select:none; }
.carried-match[hidden], .fire-hint[hidden] { display:none!important; }
.fire-hint { position:absolute; z-index:9; right:var(--gutter); bottom:207px; max-width:37%; font-size:.8125rem; line-height:1.7; color:#e2c89f; text-align:right; pointer-events:none; text-shadow:0 2px 5px #000; }
.hearth-target { position:absolute; left:3.1%; top:58.5%; width:6.3%; height:7.8%; z-index:2; padding:0; cursor:default; touch-action:manipulation; border-radius:50%; }
.hearth-target-glow { position:absolute; inset:-12%; border:1px solid transparent; border-radius:50%; transition:background .2s,border-color .2s,box-shadow .2s; pointer-events:none; }
.match-held .hearth-target { cursor:copy; }
.match-held .hearth-target-glow { border-color:#d9bc7966; background:#dda3500a; box-shadow:0 0 20px #f0ba5430; }
.hearth-target.drop-ready .hearth-target-glow { border-color:#ffdfa8; background:#edbd6230; box-shadow:0 0 28px #f2bd6460; }
.hearth-target:focus-visible { outline:2px solid #f6d590; outline-offset:4px; }
.fire-burning .hearth-target { cursor:pointer; }
.hearth-bed { position:absolute; left:1.4%; top:43%; width:9.5%; height:25%; pointer-events:none; z-index:1; }
.hearth-unlit { position:absolute; inset:0; background:radial-gradient(ellipse,#100b08bc 0%,#0b090950 45%,transparent 73%); opacity:.8; transition:opacity 1.6s; }
.hearth-flames { position:absolute; inset:0; opacity:0; transition:opacity 1.3s; }
.fire-frame { position:absolute; inset:0; background-image:url('assets/room-fire.webp'); background-size:300% 100%; background-repeat:no-repeat; transform-origin:50% 87%; opacity:0; }
.fire-frame-a { background-position:0% 50%; }
.fire-frame-b { background-position:50% 50%; }
.fire-frame-c { background-position:100% 50%; }
.hearth-glow { position:absolute; inset:-15% -45% -15%; background:radial-gradient(ellipse,#ffbd6528,#ed701014 38%,transparent 73%); mix-blend-mode:screen; opacity:0; transition:opacity 1.6s; }
.hearth-logs.fire-frame { background-position:0% 50%; opacity:1; filter:saturate(.35) brightness(.48); clip-path:polygon(18% 77%,24% 70%,37% 63%,47% 66%,49% 76%,54% 73%,59% 65%,68% 64%,78% 72%,82% 86%,74% 90%,24% 91%); transition:opacity .6s; }
.fire-burning .hearth-logs.fire-frame { opacity:0; animation:none!important; }
.hearth-foreground { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:1; clip-path:polygon(1.9% 49%,3.7% 49%,4.1% 75%,5.8% 77%,5.8% 80%,.9% 80%,.9% 77%,2.2% 75%); }
.fire-burning .hearth-flames, .fire-burning .hearth-glow { opacity:1; }
.fire-burning .hearth-unlit { opacity:0; }
.fire-burning .hearth-flames .fire-frame { animation:hearth-flame 1.85s linear infinite; }
.fire-burning .hearth-flames .fire-frame-b { animation-delay:-.6167s; }
.fire-burning .hearth-flames .fire-frame-c { animation-delay:-1.2334s; }
.story:not([data-current="2"]) .fire-frame, .story-offscreen .fire-frame, .page-hidden .fire-frame { animation-play-state:paused!important; }
@keyframes hearth-flame { 0%,100% { opacity:.15; transform:scale(.99,1.02); } 18%,40% { opacity:.85; transform:scale(1.015,.985); } 64%,83% { opacity:.08; transform:scale(.99,1.015); } }
.motion-paused .fire-frame-a, .is-still .fire-frame-a { opacity:1; animation:none!important; transform:none; }
.motion-paused .fire-frame-b,.motion-paused .fire-frame-c,.is-still .fire-frame-b,.is-still .fire-frame-c { opacity:0; animation:none!important; }
.music-dock { display:flex; align-items:center; gap:10px; }
.ambience-toggle { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 14px; border:1px solid #b99c6c66; border-radius:24px; background:#111310e8; color:#c0b6a2; font-size:.875rem; backdrop-filter:blur(12px); }
.ambience-toggle[aria-pressed="true"] { color:#f0d3a2; border-color:#d7b478; background:#29271d; }
.ambience-symbol { font-size:19px; line-height:1; }
@media(max-width:760px), (max-aspect-ratio:4/5) {
  .story[data-current="2"] .story-actions .story-next { display:none; }
  .music-dock { gap:6px; }
  .music-toggle, .ambience-toggle { padding:9px 10px; gap:6px; font-size:.875rem; letter-spacing:0; }
  .music-bars { gap:2px; }
  .music-bars i { width:2px; }
  .story .motion-toggle { max-width:calc(100vw - 235px); text-align:left; gap:5px; }
  .match-label { display:none; }
  .story-matches { min-width:44px; min-height:44px; top:27.5%; left:3.5%; }
  .fire-hint { bottom:184px; left:24px; right:24px; max-width:none; text-align:left; font-size:.75rem; }
  .story-radio { min-width:36px; min-height:36px; }
  .radio-indicator { width:3px; height:3px; }
}
@media(prefers-reduced-motion:reduce) { .fire-frame-a { opacity:1; } .fire-frame-b,.fire-frame-c { opacity:0; } .hearth-flames,.hearth-glow,.hearth-unlit { transition:none; } }
