/*
 * assets/ui/candy-room.css - THE CANDY STORE's look (js/candy-room.js): the painted stage with its glowing counters,
 * the arrival (doors, a glide in, the lanterns lit one by one, the Hushling Hustle truck pulling away), the living room
 * (lantern flicker, sugar sparkles, the orb's swirl, the Hushling crew), the counters' picture bar and each counter.
 * Goliath 2026-11-09 04:48Z and 04:54Z; plan https://claude.ai/artifact/FeQhtHCKy5QViuHkxdCeWR.
 *
 * LAYOUT: the room's main is the size container. Narrow (a phone, an upright tablet): the stage on top at 16:9, the
 * picture bar under it (three a row), then the counter. Wide (900 px of main or more: a PC, a tablet sideways): the
 * stage and its bar the left column, kept in view while the counter scrolls in the right one (Goliath's PC rule,
 * lesson PH-18). Words never under 16 px (lesson UI-5, the room kit's --rui-min), every target --rui-tap (44 px, 48 on
 * touch), nothing moves under prefers-reduced-motion. Colours are the room kit's (js/room-ui.css), the Horde's under
 * [data-side="horde"]. Lesson UI-164.
 */
.cr-main { container-type: inline-size; padding-left: calc(var(--rui-edge-l) + var(--rui-tabs) + 8px); padding-right: calc(var(--rui-edge-r) + var(--rui-tabs) + 8px); }
.cr-wrap { display: grid; gap: 16px; max-width: 1500px; margin: 0 auto; }
.cr-left, .cr-right { min-width: 0; display: grid; gap: 12px; align-content: start; }
@container (min-width: 900px) {
  .cr-wrap { grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); align-items: start; }
  .cr-left { position: sticky; top: 0; }
}

/* ---- the stage: the painting, its layers and its counters ------------------------------------------------------- */
.cr-stage { container: cr-stage / inline-size; position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 16px; overflow: hidden; border: 2px solid var(--rui-gold);
  box-shadow: 0 0 0 5px rgba(245, 194, 66, 0.08), 0 16px 40px rgba(0, 0, 0, 0.55); background: #0b0814; isolation: isolate; }
.cr-stage[data-side="horde"] { border-color: #7FE0D6; }
.cr-stage__paint { position: absolute; inset: 0; transform-origin: 50% 60%; }
/* the painting and every glow are drawn by a ::before (the element itself paints nothing), so the overlap scan
   (tools/overlap-scan.mjs) reads them as the backdrop they are, never as a box under a counter's button (UI-166) */
.cr-stage__paint::before { content: ""; position: absolute; inset: 0; background: var(--cr-paint, none) center / cover no-repeat; }
.cr-lamp::before, .cr-swirl::before, .cr-mote::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--cr-glow); box-shadow: var(--cr-halo, none); }
.cr-stage__paint::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, transparent 42%, rgba(11, 8, 20, 0.5)); }
.cr-stage__layers, .cr-stage__spots { position: absolute; inset: 0; }
.cr-stage__layers { pointer-events: none; }
.cr-stage__layers > * { position: absolute; }

/* the lanterns: a warm glow on each painted lamp (green on the Horde's), breathing */
.cr-lamp { width: 10%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); mix-blend-mode: screen;
  --cr-glow: radial-gradient(circle, rgba(255, 214, 140, 0.55), transparent 65%); animation: cr-flicker 4s ease-in-out var(--f, 0s) infinite; }
.cr-stage[data-side="horde"] .cr-lamp { --cr-glow: radial-gradient(circle, rgba(140, 255, 170, 0.5), transparent 65%); }
@keyframes cr-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.8; } 50% { opacity: 0.95; } 53% { opacity: 0.76; } }

/* the look by Village level (js/candy-room.js model.look): a lantern the shop has not earned yet is shaded dark over
   the painted one, still and unlit, so the room warms lantern by lantern as the Village grows */
.cr-lamp.is-out, .cr-stage[data-side="horde"] .cr-lamp.is-out { mix-blend-mode: multiply; --cr-glow: radial-gradient(circle, rgba(14, 6, 22, 0.92) 20%, transparent 62%); animation: none; }
.cr-stage.is-arriving .cr-lamp.is-out { animation: none; }

/* the Gobstopper's swirl over the painted orb (the Horde's cauldron bubbles green instead) */
.cr-swirl { width: 10%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; filter: blur(14px); opacity: 0.55; mix-blend-mode: screen;
  --cr-glow: conic-gradient(#FF8FC7, #C79BFF, #8FB8FF, #7FE0D6, #F5C242, #FF8FC7); animation: cr-spin 6s linear infinite; }
.cr-stage[data-side="horde"] .cr-swirl { --cr-glow: radial-gradient(circle, #8dff6b, transparent 70%); animation: cr-bubble 2.4s ease-in-out infinite; }
@keyframes cr-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes cr-bubble { 50% { transform: translate(-50%, -56%) scale(1.15); opacity: 0.8; } }

/* sugar in the air */
.cr-mote { width: 4px; height: 4px; border-radius: 50%; --cr-glow: var(--c); --cr-halo: 0 0 6px var(--c); opacity: 0; animation: cr-mote linear infinite; }
@keyframes cr-mote { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 0.9; } 100% { opacity: 0; transform: translate(14px, -120px); } }

/* the Hushling Hustle crew and its truck (their own painted art, hustle/art/) */
.cr-crew { filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.55)); }
.cr-truck { width: 22%; bottom: 2%; left: -26%; }
.cr-porter { width: 9%; bottom: 7%; left: 36%; opacity: 0; }
.cr-tea { width: 7%; transform: translate(-50%, -50%); animation: cr-sip 5s ease-in-out infinite; }
@keyframes cr-sip { 0%, 80%, 100% { transform: translate(-50%, -50%) rotate(0); } 88% { transform: translate(-50%, -53%) rotate(-6deg); } }
.cr-sneak { width: 8%; left: 70%; top: 64%; opacity: 0; }
.cr-sneak.is-peek { animation: cr-peek 3.2s ease-in-out both; }
@keyframes cr-peek { 0% { opacity: 0; left: 70%; } 15% { opacity: 1; } 60% { opacity: 1; left: 58%; } 100% { opacity: 0; left: 44%; } }
.cr-porter.is-going { animation: cr-porter 3.4s linear both; }

/* the doors, open only during the arrival */
.cr-doors { inset: 0; display: flex; z-index: 4; perspective: 900px; visibility: hidden; }
.cr-doors i { flex: 1; position: relative; }
.cr-doors i::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #2a1838, #3b2450 50%, #2a1838); border: 3px solid #5a3a72; box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.25); }
.cr-doors i:first-child { transform-origin: left center; }
.cr-doors i:last-child { transform-origin: right center; }

/* THE ARRIVAL: everything keyed off .is-arriving, so the room at rest is the open, lit shop (a thumbnail, a slow load) */
.cr-stage.is-arriving .cr-stage__paint { animation: cr-dolly 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes cr-dolly { 0% { transform: scale(1.22); filter: brightness(0.25) saturate(0.6); } 45% { filter: brightness(0.55); } 100% { transform: scale(1); filter: none; } }
.cr-stage.is-arriving .cr-doors { animation: cr-doors-up 1.3s step-end both; }
/* the doors are there only while they swing: shown at once, gone the moment they are open */
@keyframes cr-doors-up { 0% { visibility: visible; } 100% { visibility: hidden; } }
.cr-stage.is-arriving .cr-doors i:first-child { animation: cr-swing-l 1.1s ease-in 0.15s both; }
.cr-stage.is-arriving .cr-doors i:last-child { animation: cr-swing-r 1.1s ease-in 0.15s both; }
@keyframes cr-swing-l { to { transform: rotateY(-100deg); opacity: 0; } }
@keyframes cr-swing-r { to { transform: rotateY(100deg); opacity: 0; } }
.cr-stage.is-arriving .cr-lamp { animation: cr-lamp-on 0.5s ease var(--d, 0s) both, cr-flicker 4s ease-in-out var(--f, 0s) infinite; }
@keyframes cr-lamp-on { 0% { opacity: 0; } 60% { opacity: 1; } 75% { opacity: 0.4; } 100% { opacity: 1; } }
.cr-stage.is-arriving .cr-truck { animation: cr-truck 4.2s ease-in-out 1.2s both; }
@keyframes cr-truck { 0% { left: -26%; } 35%, 60% { left: 28%; } 100% { left: 110%; } }
.cr-stage.is-arriving .cr-porter { animation: cr-porter 3.4s linear 2.2s both; }
@keyframes cr-porter { 0% { left: 36%; opacity: 0; transform: translateY(0); } 8% { opacity: 1; } 20% { transform: translateY(-4%); } 30% { transform: translateY(0); }
  45% { transform: translateY(-4%); } 85% { left: 18%; opacity: 1; } 100% { left: 16%; opacity: 0; } }

/* the counters in the painting: a soft glow that breathes; its name shows on hover, on focus and while open */
.cr-spot { position: absolute; transform: translate(-50%, -50%); min-width: var(--rui-tap); min-height: var(--rui-tap); margin: 0; padding: 0; cursor: pointer; z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.28); border-radius: 16px; background: rgba(20, 13, 30, 0.18); color: var(--rui-ink);
  display: grid; place-items: end center; animation: cr-breathe 3.2s ease-in-out infinite; }
.cr-spot__word { transform: translateY(calc(100% + 6px)); background: rgba(20, 13, 30, 0.9); border: 1px solid var(--rui-line); border-radius: 999px; padding: 2px 12px;
  font: bold var(--rui-min)/1.3 inherit; white-space: nowrap; visibility: hidden; }
.cr-spot:hover, .cr-spot:focus-visible, .cr-spot.is-on { border-color: var(--rui-accent); background: rgba(255, 143, 199, 0.12); box-shadow: 0 0 22px 3px rgba(255, 143, 199, 0.45); animation: none; outline: none; }
.cr-stage[data-side="horde"] .cr-spot:hover, .cr-stage[data-side="horde"] .cr-spot:focus-visible, .cr-stage[data-side="horde"] .cr-spot.is-on { background: rgba(127, 224, 214, 0.12); box-shadow: 0 0 22px 3px rgba(127, 224, 214, 0.45); }
.cr-spot:hover .cr-spot__word, .cr-spot:focus-visible .cr-spot__word { visibility: visible; }
.cr-spot:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }
@keyframes cr-breathe { 50% { border-color: rgba(255, 143, 199, 0.7); } }

/* the poster of the works on the back wall: Hushling Hustle's own door painting, framed */
.cr-poster { position: absolute; transform: translate(-50%, -50%) rotate(-2deg); margin: 0; padding: 0; cursor: pointer; z-index: 2; min-height: var(--rui-tap); background: #000;
  border: 4px solid #8a6a2a; border-radius: 4px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), 0 0 0 2px #2a1a08; }
.cr-poster__art { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.88; }
.cr-poster__word { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; background: rgba(20, 13, 30, 0.9); color: var(--rui-gold);
  border: 1px solid var(--rui-line); border-radius: 999px; padding: 2px 12px; font: bold var(--rui-min)/1.3 var(--rui-title-font); letter-spacing: 0.04em; visibility: hidden; }
.cr-poster:hover, .cr-poster:focus-visible, .cr-poster.is-on { box-shadow: 0 0 24px 5px rgba(245, 194, 66, 0.5), 0 0 0 2px #2a1a08; outline: none; }
.cr-poster:hover .cr-poster__word, .cr-poster:focus-visible .cr-poster__word { visibility: visible; }
.cr-poster:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 3px; }

.cr-toast { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 24px); padding: 6px 14px; border-radius: 999px;
  background: var(--rui-gold); color: #1a1226; font: bold var(--rui-min)/1.3 inherit; text-align: center; }
.cr-toast.is-on { animation: cr-toast 2.6s ease both; }
@keyframes cr-toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 12%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.cr-replay { position: absolute; right: 10px; bottom: 10px; z-index: 5; min-height: var(--rui-tap); padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--rui-line); background: rgba(20, 13, 30, 0.82); color: var(--rui-ink); font: bold var(--rui-min)/1.2 inherit; }
.cr-replay:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }

/* ---- the counters' picture bar (always on: a phone's way round the room, and names for the painting on a PC) ---- */
.cr-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
/* the narrowest room (an upright phone between the game's side tabs): two to a row, so every name fits whole */
@container (max-width: 359px) { .cr-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 620px) { .cr-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* a stage too small for a line over the painting: the arrival's toast and the replay button stay off it (the arrival
   still plays; its toast is a nicety) */
@container (max-width: 479px) { .cr-toast, .cr-replay { display: none; } }
.cr-bar__btn { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: calc(var(--rui-tap) + 20px); margin: 0; padding: 6px 4px; cursor: pointer;
  border: 1.5px solid var(--rui-line); border-radius: 12px; background: var(--rui-panel); color: var(--rui-soft); font: bold var(--rui-min)/1.2 inherit; text-align: center; }
.cr-bar__btn span { overflow-wrap: anywhere; hyphens: manual; }
.cr-bar__art { width: 34px; height: 34px; object-fit: contain; }
.cr-bar__btn.is-on { border-color: var(--rui-accent); color: var(--rui-ink); background: var(--rui-panel-2); box-shadow: 0 0 12px rgba(255, 143, 199, 0.3); }
.cr-bar__btn:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }

/* ---- a counter ------------------------------------------------------------------------------------------------- */
.cr-counter { display: grid; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(20, 13, 30, 0.92); border: 1.5px solid var(--rui-line); border-top: 3px solid var(--rui-accent); min-width: 0; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cr-head__title { margin: 0 auto 0 0; font: bold var(--rui-h2)/1.25 var(--rui-title-font); color: var(--rui-gold); letter-spacing: 0.03em; }
.cr-head__hint { flex-basis: 100%; margin: 0; color: var(--rui-soft); font-size: var(--rui-min); line-height: 1.45; }
.cr-why, .cr-note, .cr-count { margin: 0; font-size: var(--rui-min); line-height: 1.4; }
.cr-why { color: var(--rui-warn); }
.cr-note, .cr-count, .cr-muted { color: var(--rui-soft); }
.cr-empty { margin: 0; color: var(--rui-soft); font-size: var(--rui-body); }
.cr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--rui-tap); min-width: var(--rui-tap); margin: 0; padding: 8px 16px;
  border-radius: 12px; border: 0; cursor: pointer; font: bold var(--rui-min)/1.2 inherit; }
.cr-btn.is-buy { background: var(--rui-accent); color: #1a1226; }
.cr-btn.is-gold { background: var(--rui-gold); color: #1a1226; }
.cr-btn.is-quiet { background: transparent; color: var(--rui-ink); border: 1.5px dashed var(--rui-line); }
.cr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cr-btn:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }
.cr-chip { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--rui-gold); }
.cr-btn.is-buy .cr-chip, .cr-btn.is-gold .cr-chip { color: #1a1226; }
.cr-chip.is-short { color: #ff6b6b; }
.cr-btn.is-buy .cr-chip.is-short, .cr-btn.is-gold .cr-chip.is-short { color: #8a0010; }
.cr-chip__art { width: 22px; height: 22px; object-fit: contain; }

/* the jar wall */
.cr-jars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container (min-width: 1100px) { .cr-jars { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cr-jar { position: relative; display: grid; justify-items: center; gap: 4px; margin: 0; padding: 10px 8px; cursor: pointer; text-align: center; color: var(--rui-ink); font: inherit;
  border: 2px solid color-mix(in srgb, var(--cr-r, #9C93B8) 55%, transparent); border-radius: 16px; background: var(--rui-panel); transition: transform 0.2s, box-shadow 0.2s; }
.cr-jar__art { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.5)); }
.cr-jar__name { font-weight: bold; font-size: var(--rui-min); line-height: 1.2; }
.cr-jar__fx { font-size: var(--rui-min); color: var(--rui-soft); line-height: 1.3; }
.cr-jar__count { position: absolute; top: 6px; right: 6px; padding: 0 8px; border-radius: 999px; background: #7FE0D6; color: #102; font-weight: bold; font-size: var(--rui-min); }
.cr-jar[aria-pressed="true"] { transform: translateY(-6px); border-color: var(--rui-accent); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 143, 199, 0.4); }
.cr-jar:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }
.cr-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 14px; border-radius: 14px; background: var(--rui-panel-2); }
.cr-pick__art { width: 64px; height: 64px; object-fit: contain; flex: none; }
.cr-pick__art--big { width: 80px; height: 80px; }
.cr-pick__words { flex: 1 1 180px; min-width: 0; display: grid; gap: 2px; }
.cr-pick__words b { font-size: var(--rui-body); }
.cr-pick__words span { color: var(--rui-soft); font-size: var(--rui-min); }
.cr-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-belt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-belt__word { color: var(--rui-soft); font-size: var(--rui-min); margin-right: 4px; }
.cr-belt__slot { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; border: 1.5px dashed var(--rui-line); }
.cr-belt__slot.is-full { border: 2px solid var(--rui-gold); }
.cr-belt__art { width: 36px; height: 36px; object-fit: contain; }
.cr-belt__slot b { position: absolute; right: -6px; bottom: -6px; padding: 0 6px; border-radius: 999px; background: var(--rui-gold); color: #1a1226; font-size: var(--rui-min); line-height: 1.3; }
.cr-fly { position: fixed; z-index: 90; width: 56px; height: 56px; pointer-events: none; }

/* boosters: the gear bench (assets/ui/gear-bench.css) and the unicorn picker */
.cr-bench { min-width: 0; }
.cr-picker { display: grid; gap: 10px; }
.cr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-search { flex: 1 1 220px; min-height: var(--rui-tap); padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--rui-line); background: var(--rui-panel); color: var(--rui-ink); font: var(--rui-min) inherit; font-size: max(16px, var(--rui-min)); }
.cr-label { display: inline-flex; align-items: center; gap: 8px; font-size: var(--rui-min); }
.cr-select { min-height: var(--rui-tap); padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--rui-line); background: var(--rui-panel); color: var(--rui-ink); font-size: max(16px, var(--rui-min)); }
.cr-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.cr-picks__item { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.cr-unicorn { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 64px; margin: 0; padding: 6px 10px; cursor: pointer; text-align: left; color: var(--rui-ink); font: inherit;
  border: 2px solid color-mix(in srgb, var(--cr-r, #9C93B8) 50%, transparent); border-radius: 12px; background: var(--rui-panel); }
.cr-unicorn.is-on { border-color: var(--rui-gold); box-shadow: 0 0 12px rgba(245, 194, 66, 0.35); }
.cr-unicorn__art { width: 48px; height: 48px; object-fit: contain; flex: none; }
.cr-unicorn__words { min-width: 0; display: grid; }
.cr-unicorn__words b { font-size: var(--rui-min); overflow-wrap: anywhere; }
.cr-unicorn__words small { font-size: var(--rui-min); color: var(--rui-soft); }
.cr-unicorn__badge { position: absolute; top: -8px; right: 6px; padding: 0 8px; border-radius: 999px; background: var(--rui-accent); color: #1a1226; font-weight: bold; font-size: var(--rui-min); }
.cr-unicorn:focus-visible, .cr-star:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }
.cr-star { width: var(--rui-tap); min-height: var(--rui-tap); margin: 0; padding: 0; flex: none; cursor: pointer; border-radius: 50%; border: 1.5px solid var(--rui-line); background: var(--rui-panel); color: var(--rui-soft); font-size: 22px; align-self: center; }
.cr-star.is-on { color: var(--rui-gold); border-color: var(--rui-gold); }
.cr-pager { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: var(--rui-min); }

/* the Gobstopper */
.cr-gob { display: grid; gap: 16px; align-items: center; }
@container (min-width: 1250px) { .cr-gob { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cr-gob__orb { display: grid; justify-items: center; gap: 12px; }
.cr-gob__side { display: grid; gap: 12px; min-width: 0; }
.cr-orb { position: relative; width: min(220px, 60vw); aspect-ratio: 1; border-radius: 50%; border: 0; margin: 0; padding: 0; cursor: pointer; touch-action: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 6%, transparent 7%), conic-gradient(from 0deg, #FF8FC7, #C79BFF, #8FB8FF, #7FE0D6, #F5C242, #FF8FC7);
  box-shadow: 0 0 40px rgba(199, 155, 255, 0.55), inset -18px -24px 40px rgba(0, 0, 0, 0.45); animation: cr-glow 3s ease-in-out infinite; }
.cr-counter[data-station="orb"] .cr-orb:disabled { cursor: not-allowed; filter: saturate(0.5) brightness(0.8); }
.cr-orb.is-spin { animation: cr-orb-spin 0.5s linear infinite; filter: none; }
@keyframes cr-orb-spin { to { transform: rotate(360deg); filter: hue-rotate(360deg); } }
@keyframes cr-glow { 50% { box-shadow: 0 0 60px rgba(255, 143, 199, 0.7), inset -18px -24px 40px rgba(0, 0, 0, 0.45); } }
.cr-orb__ring { position: absolute; inset: -10px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--rui-gold) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%); mask: radial-gradient(circle, transparent 66%, #000 67%); }
.cr-orb:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 14px; }
.cr-odds { display: flex; width: 100%; max-width: 360px; height: 16px; border-radius: 999px; overflow: hidden; }
.cr-odds i { height: 100%; }
.cr-oddrows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: var(--rui-min); }
.cr-oddrows li { display: flex; align-items: center; gap: 8px; }
.cr-oddrows li i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.cr-oddrows li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.cr-reveal { position: relative; display: grid; gap: 6px; align-content: center; min-height: 120px; padding: 14px; border-radius: 14px; background: var(--rui-panel-2); border: 2px solid transparent; }
.cr-reveal.is-lit { border-color: var(--cr-o, var(--rui-gold)); animation: cr-lit 0.8s ease; }
.cr-reveal b { font: bold var(--rui-num)/1.2 var(--rui-title-font); color: var(--cr-o, var(--rui-gold)); }
.cr-reveal span { font-size: var(--rui-min); }
@keyframes cr-lit { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cr-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; }

/* the bell's eggs */
.cr-eggs { display: grid; gap: 8px; }
.cr-egg { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--rui-panel); }
.cr-egg__art { width: 48px; height: 48px; object-fit: contain; flex: none; }
.cr-egg__words { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: var(--rui-min); }
.cr-egg__meta { color: var(--rui-soft); }
.cr-egg__track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cr-egg__track i { display: block; height: 100%; background: var(--rui-accent); }

/* the works' crates */
.cr-crate { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; border: 2px solid #8a6a2a; background: linear-gradient(135deg, #3b2a1a, #2a1d12); }
.cr-crate__art { width: 72px; height: 72px; object-fit: contain; flex: none; }
.cr-crate__words { flex: 1 1 200px; min-width: 0; display: grid; gap: 4px; font-size: var(--rui-min); }
.cr-crate__words b { font-size: var(--rui-body); }
.cr-crate__stamp { font: bold var(--rui-min)/1.2 var(--rui-title-font); letter-spacing: 0.08em; color: #FFB347; text-transform: uppercase; }
.cr-pic--none { display: inline-block; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }

/* a standing price perk from the Village path, over every counter */
.cr-perk { margin: 0; padding: 6px 12px; border-radius: 999px; justify-self: start; font-size: var(--rui-min); font-weight: bold; color: #1a1226; background: var(--rui-gold); }

/* a counter the Village has not reached: dim in the painting with its level showing, a plain card at the counter */
.cr-spot.is-locked { border-style: dashed; filter: saturate(0.4); animation: none; }
.cr-bar__btn.is-locked { opacity: 0.75; }
.cr-bar__btn.is-locked .cr-bar__art { filter: grayscale(1) brightness(0.7); }
.cr-bar__lock { font-size: var(--rui-min); color: var(--rui-soft); }
.cr-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px; border-radius: 14px; border: 2px dashed var(--rui-line); background: var(--rui-panel-2); }
.cr-locked__art { width: 72px; height: 72px; object-fit: contain; flex: none; filter: grayscale(1) brightness(0.75); }
.cr-locked__words { flex: 1 1 220px; min-width: 0; display: grid; gap: 4px; font-size: var(--rui-body); }
.cr-locked__words b { color: var(--rui-gold); }

/* a painting under 600 px wide has no room for six 44 px counters side by side: the picture bar under it is the
   menu there, and the poster stays as the way to the works (UI-166) */
@container cr-stage (max-width: 599px) { .cr-spot { display: none; } }
.cr-poster { min-width: var(--rui-tap); }

/* ---- the day's special (lesson GM-163): a ribbon over a counter whose item is on special today */
.cr-special { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--rui-gold); background: linear-gradient(100deg, rgba(245, 194, 66, 0.22), rgba(255, 143, 199, 0.14)); }
.cr-special::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%);
  transform: translateX(-100%); animation: cr-special-shine 4s ease-in-out infinite; }
@keyframes cr-special-shine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cr-special__tag { padding: 2px 12px; border-radius: 999px; background: var(--rui-gold); color: #1a1226; font-weight: 700; font-size: var(--rui-min); text-transform: uppercase; letter-spacing: 0.06em; }
.cr-special.is-weekend .cr-special__tag { background: #FF8FC7; }
.cr-special__line { font-size: var(--rui-body); color: var(--rui-ink); }
.cr-stage[data-side="horde"] ~ * .cr-special, [data-side="horde"] .cr-special { border-color: #7FE0D6; background: linear-gradient(100deg, rgba(127, 224, 214, 0.2), rgba(141, 255, 107, 0.1)); }
[data-side="horde"] .cr-special__tag { background: #7FE0D6; }

/* ---- the shelf's spotlight under the counters (lesson UI-236): a PC's left column only, so it fills the space the
   painting leaves; today's free treat or the rarest jar on the player's own shelf, a press opens it on the Sweet Shelf */
.cr-feature { display: none; }
@container (min-width: 900px) {
  .cr-feature:not([hidden]) { display: block; }
}
.cr-feature__card { position: relative; overflow: hidden; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%;
  min-height: 120px; margin: 0; padding: 14px 20px; cursor: pointer; text-align: left; color: var(--rui-ink); font: inherit; border-radius: 16px;
  border: 2px solid color-mix(in srgb, var(--cr-r, #F5C242) 70%, transparent);
  background: radial-gradient(ellipse at 12% 50%, color-mix(in srgb, var(--cr-r, #F5C242) 28%, transparent), transparent 60%), var(--rui-panel); transition: transform 0.2s, box-shadow 0.2s; }
.cr-feature__card:hover { transform: translateY(-2px); box-shadow: 0 0 24px 3px color-mix(in srgb, var(--cr-r, #F5C242) 40%, transparent); }
.cr-feature__card:focus-visible { outline: 3px solid var(--rui-gold); outline-offset: 2px; }
.cr-feature__glow { position: absolute; left: -10%; top: 0; bottom: 0; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.12), transparent); animation: cr-feature-shine 5s ease-in-out infinite; }
@keyframes cr-feature-shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(380%); } }
.cr-feature__art { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); animation: cr-feature-bob 3.2s ease-in-out infinite; }
@keyframes cr-feature-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.cr-feature__words { display: grid; gap: 2px; min-width: 0; }
.cr-feature__eye { font-size: var(--rui-min); color: var(--cr-r, var(--rui-gold)); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.cr-feature__name { font-size: 1.3em; font-family: var(--rui-display, inherit); }
.cr-feature__fx { font-size: var(--rui-body); color: var(--rui-soft); }
.cr-feature__card .cr-chip { font-size: 1.2em; }
.cr-feature__free { padding: 4px 14px; border-radius: 999px; background: var(--rui-gold); color: #1a1226; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .cr-stage *, .cr-counter *, .cr-spot, .cr-fly, .cr-feature *, .cr-special::after { animation: none !important; transition: none !important; }
  .cr-doors, .cr-truck, .cr-porter, .cr-sneak, .cr-mote { display: none; }
}
