/* Dino Truck Adventure — all layout happens on a fixed 1920x1200 "stage"
   that is scaled to fit the screen (see fitStage in js/core/ui.js). */
:root { --ol: #2b2d42; --sun: #ffd166; --go: #06d6a0; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #1d3557;
  /* No pull-to-refresh, no scrolling, no pinch zoom, no selection, no long-press menu */
  overscroll-behavior: none;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-family: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--ol);
}
img, svg { -webkit-user-drag: none; pointer-events: none; }

#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1200px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  overflow: hidden;
  background: #8fd3ff;
  contain: layout paint;
}
.screen { position: absolute; inset: 0; }
.bg { position: absolute; inset: 0; }
.bg > svg { width: 100%; height: 100%; display: block; }
.layer { position: absolute; inset: 0; }

button {
  font: inherit; color: inherit; border: none; background: none;
  cursor: pointer; touch-action: manipulation; outline: none;
}

/* ---------- Generic round buttons (130 logical px ≈ 87 CSS px on the tablet) ---------- */
.btn {
  position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: #fff; border: 6px solid var(--ol);
  box-shadow: 0 8px 0 rgba(0,0,0,.25);
  display: grid; place-items: center;
  transition: transform .1s, box-shadow .1s;
  z-index: 20;
}
.btn:active { transform: translateY(5px) scale(.95); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.btn svg { width: 66%; height: 66%; }
.btn-home { left: 30px; top: 30px; background-color: #ffd166; }
.btn-speak { left: 190px; top: 30px; background-color: #a0e7ff; }

.star-pill {
  position: absolute; right: 30px; top: 34px; height: 120px; min-width: 230px;
  padding: 0 34px 0 18px; border-radius: 60px; background: #fff;
  border: 6px solid var(--ol); box-shadow: 0 8px 0 rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 12px;
  font-size: 68px; font-weight: 900; z-index: 20;
}
.star-pill svg { width: 90px; height: 90px; }
.star-pill.bump { animation: bump .4s ease-out; }

.progress {
  position: absolute; left: 50%; top: 52px; transform: translateX(-50%);
  display: flex; gap: 22px; z-index: 20;
  background: rgba(255,255,255,.75); padding: 16px 26px; border-radius: 50px;
}
.progress i {
  width: 56px; height: 56px; border-radius: 50%;
  border: 5px solid var(--ol); background: #fff; display: block;
  transition: background .3s, transform .3s;
}
.progress i.done { background: var(--sun); transform: scale(1.12); }

/* Big number answer buttons */
.choices {
  position: absolute; left: 0; right: 0; bottom: 50px;
  display: flex; justify-content: center; gap: 70px; z-index: 15;
}
.num-btn {
  width: 230px; height: 230px; border-radius: 50%;
  border: 8px solid var(--ol); box-shadow: 0 12px 0 rgba(0,0,0,.25);
  font-size: 150px; font-weight: 900; line-height: 1;
  display: grid; place-items: center; color: #fff;
  -webkit-text-stroke: 5px var(--ol); paint-order: stroke fill;
  transition: transform .12s, opacity .3s;
  animation: pop-in .45s cubic-bezier(.3,1.6,.5,1) both;
}
.num-btn:nth-child(1) { background-color: #ef476f; }
.num-btn:nth-child(2) { background-color: #118ab2; animation-delay: .08s; }
.num-btn:nth-child(3) { background-color: #8338ec; animation-delay: .16s; }
.num-btn:active { transform: scale(.93); }
.num-btn.dim { opacity: .35; pointer-events: none; }
.num-btn.dim:not(.shake), .num-btn.right { animation: none; }
.num-btn.right { background-color: var(--go) !important; transform: scale(1.15); }

/* Number sign with dots (target amount) */
.num-sign {
  position: absolute; width: 300px; height: 300px; border-radius: 40px;
  background: #fff; border: 8px solid var(--ol); box-shadow: 0 10px 0 rgba(0,0,0,.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 12;
}
.num-sign b { font-size: 170px; line-height: .95; font-weight: 900; color: #ef476f; -webkit-text-stroke: 5px var(--ol); paint-order: stroke fill; }
.num-sign .dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 240px; margin-top: 6px; }
.num-sign .dots i { width: 30px; height: 30px; border-radius: 50%; background: var(--ol); display: block; }
.num-sign .dots i.on { background: var(--go); }

/* Draggable / tappable items */
.item { position: absolute; transform-origin: center center; z-index: 10; will-change: transform; }
.item svg { width: 100%; height: 100%; display: block; }
.item.dragging { z-index: 50; transition: none !important; }
.item.counted { animation: bump .4s ease-out; }
.count-badge {
  position: absolute; left: 50%; top: -18px; transform: translateX(-50%);
  min-width: 70px; height: 70px; border-radius: 35px; padding: 0 12px;
  background: var(--sun); border: 5px solid var(--ol);
  font-size: 46px; font-weight: 900; display: grid; place-items: center;
  animation: pop-in .3s cubic-bezier(.3,1.6,.5,1) both; pointer-events: none;
}
.hint-glow { animation: glow 0.6s ease-in-out 2; }

/* ---------- Overlays ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 100;
  background: rgba(29,53,87,.55);
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .3s both;
}
.card {
  position: relative; background: #fff; border: 10px solid var(--ol); border-radius: 60px;
  padding: 60px 80px; display: flex; flex-direction: column; align-items: center; gap: 30px;
  box-shadow: 0 20px 0 rgba(0,0,0,.25);
  animation: pop-in .5s cubic-bezier(.3,1.5,.5,1) both;
}
.card .row { display: flex; gap: 60px; align-items: center; justify-content: center; }
.card .big-btn { position: relative; width: 200px; height: 200px; }
.card .big-btn svg { width: 64%; height: 64%; }
.reward-stars { display: flex; gap: 14px; }
.reward-stars svg { width: 120px; height: 120px; animation: pop-in .4s cubic-bezier(.3,1.6,.5,1) both; }

/* ---------- Confetti ---------- */
.confetti { position: absolute; top: -40px; width: 26px; height: 40px; z-index: 200; pointer-events: none;
  animation: confetti-fall var(--d) cubic-bezier(.3,.6,.6,1) forwards; }

/* ---------- Animations (transforms + opacity only) ---------- */
@keyframes pop-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-18px); } 40%,80% { transform: translateX(18px); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes glow { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3) rotate(-6deg); } }
@keyframes jump { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-60px); } 70% { transform: translateY(0) scaleY(.9); } }
@keyframes chomp { 0%,100% { transform: scale(1,1); } 25% { transform: scale(1.06,.92); } 50% { transform: scale(.96,1.05); } 75% { transform: scale(1.04,.95); } }
@keyframes confetti-fall { to { transform: translate(var(--x), 1300px) rotate(var(--r)); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes smoke { 0% { transform: translate(0,0) scale(.6); opacity: .9; } 100% { transform: translate(40px,-160px) scale(1.6); opacity: 0; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-1deg); } }

.wiggle { animation: wiggle .6s ease-in-out; }
.shake { animation: shake .45s ease-in-out; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
.float { animation: float 2.4s ease-in-out infinite; }
.jump { animation: jump .6s ease-out; }
.chomp { animation: chomp .5s ease-in-out; }
.bob { animation: bob .5s ease-in-out infinite; }

/* SVG sub-parts */
.wheel { transform-box: fill-box; transform-origin: center; }
.driving .wheel { animation: spin .5s linear infinite; }
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.smoke-puff { transform-box: fill-box; transform-origin: center; animation: smoke 4s ease-out infinite; }

/* Portrait warning (only shows if orientation lock is unavailable) */
#rotate { display: none; position: fixed; inset: 0; z-index: 999; background: #1d3557;
  align-items: center; justify-content: center; }
.rotate-tablet { transform-origin: 100px 100px; animation: rot 2s ease-in-out infinite; }
@keyframes rot { 0%,30% { transform: rotate(0); } 60%,100% { transform: rotate(90deg); } }
@media (orientation: portrait) { #rotate { display: flex; } }

@media (prefers-reduced-motion: reduce) {
  .eye, .smoke-puff, .pulse, .float { animation: none; }
}

/* ---------- Home map ---------- */
.area-banner {
  position: absolute; top: 230px; height: 96px; padding: 0 40px; border-radius: 26px;
  border: 6px solid var(--ol); box-shadow: 0 8px 0 rgba(0,0,0,.25);
  color: #fff; font-size: 56px; font-weight: 900; z-index: 6;
  -webkit-text-stroke: 3px var(--ol); paint-order: stroke fill;
}
.hotspot { position: absolute; z-index: 4; border-radius: 40%; }
.zone { position: absolute; z-index: 8; border-radius: 50%; }
.zone-face {
  position: absolute; inset: 0; border-radius: 50%; background: #fff;
  border: 8px solid var(--ol); box-shadow: 0 10px 0 rgba(0,0,0,.25);
  display: grid; place-items: center;
}
.zone-face svg { width: 74%; height: 74%; }
.zone.active .zone-face { background-color: #fffbe6; }
.zone-ring {
  position: absolute; inset: -22px; border-radius: 50%; border: 10px solid var(--sun);
  animation: pulse 1.6s ease-in-out infinite; pointer-events: none;
}
.zone.soon .zone-face { opacity: .62; background-color: #e9ecef; }
.zone-barrier {
  position: absolute; left: -14px; right: -14px; top: 50%; height: 42px; margin-top: -21px;
  border: 5px solid var(--ol); border-radius: 10px; transform: rotate(-14deg);
  background: repeating-linear-gradient(45deg, #fb8500 0 22px, #fff 22px 44px);
  pointer-events: none;
}
.zone:active .zone-face { transform: scale(.94); }
.map-truck { position: absolute; left: 0; top: 0; z-index: 9; will-change: transform; }
.map-truck .flip { width: 100%; height: 100%; transition: transform .2s; }
.map-truck svg { width: 100%; height: 100%; }
.map-dino { z-index: 7; }
.parent-corner {
  position: absolute; left: 18px; top: 18px; width: 110px; height: 110px; z-index: 30;
  border-radius: 50%; background: rgba(255,255,255,.55); display: grid; place-items: center;
  touch-action: none;
}
.parent-corner > svg:first-child { width: 58%; height: 58%; opacity: .55; }
.parent-corner .hold-ring { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Zone menu ---------- */
.act-card {
  position: absolute; top: 300px; width: 700px; height: 640px; border-radius: 60px;
  background: #fff; border: 10px solid var(--ol); box-shadow: 0 16px 0 rgba(0,0,0,.25);
  display: grid; place-items: center; z-index: 10;
  animation: pop-in .5s cubic-bezier(.3,1.5,.5,1) both;
}
.act-card:active { transform: scale(.96); }
.act-card .pic { width: 600px; height: 480px; position: relative; }
.act-card .pic > * { position: absolute; }
.act-card .stars-earned { position: absolute; bottom: 24px; display: flex; gap: 6px; }
.act-card .stars-earned svg { width: 56px; height: 56px; }

/* ---------- Collection ---------- */
.shelf { position: absolute; display: grid; gap: 40px 30px; z-index: 5; }
.slot {
  position: relative; width: 280px; height: 320px; border-radius: 36px;
  background: #fff; border: 7px solid var(--ol); box-shadow: 0 8px 0 rgba(0,0,0,.2);
  display: grid; place-items: center;
}
.slot svg.art { width: 92%; height: 80%; }
.slot.locked svg.art { filter: brightness(0) opacity(.18); }
.slot.selected { background-color: #fff3b0; border-color: #ef476f; }
.slot .cost {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 5px solid var(--ol); border-radius: 30px; padding: 2px 16px 2px 6px;
  display: flex; align-items: center; gap: 4px; font-size: 38px; font-weight: 900;
}
.slot .cost svg { width: 46px; height: 46px; }
.slot .lock { position: absolute; width: 90px; height: 90px; }

/* ---------- Parent Corner (grown-up UI, text is fine here) ---------- */
.parent-bg { position: absolute; inset: 0; background: #edf2f4; }
.gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; }
.gate-q { font-size: 64px; font-weight: 800; }
.gate-entry { min-width: 300px; height: 120px; border-radius: 24px; background: #fff; border: 5px solid var(--ol); font-size: 80px; font-weight: 900; text-align: center; line-height: 110px; }
.keypad { display: grid; grid-template-columns: repeat(3, 150px); gap: 20px; }
.keypad button { height: 120px; border-radius: 24px; background: #fff; border: 5px solid var(--ol); font-size: 56px; font-weight: 800; }
.keypad button:active { background: #ffd166; }
.parent-panel {
  position: absolute; inset: 0; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain;
  padding: 50px 90px 120px; font-size: 34px; line-height: 1.35;
}
.parent-panel h1 { font-size: 72px; }
.parent-panel h2 { font-size: 46px; margin: 46px 0 18px; }
.p-head { display: flex; justify-content: space-between; align-items: center; }
.p-btn { padding: 20px 36px; min-height: 96px; border-radius: 22px; background: #fff; border: 4px solid var(--ol); font-size: 34px; font-weight: 700; }
.p-btn:active { background: #ffd166; }
.p-btn.danger { border-color: #d62828; color: #d62828; }
.p-cards { display: flex; gap: 30px; margin-top: 30px; }
.p-stat { flex: 1; background: #fff; border-radius: 26px; border: 4px solid var(--ol); padding: 26px; display: flex; flex-direction: column; }
.p-stat b { font-size: 70px; }
.p-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 20px; overflow: hidden; font-size: 30px; }
.p-table th, .p-table td { padding: 18px 16px; text-align: left; border-bottom: 2px solid #dee2e6; }
.p-table th { background: #2b2d42; color: #fff; font-weight: 700; }
.p-note { font-size: 28px; color: #5c677d; margin-top: 12px; }
.p-row { display: flex; align-items: center; gap: 26px; margin: 16px 0; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 12px; }
.seg button { min-height: 96px; padding: 16px 30px; border-radius: 22px; background: #fff; border: 4px solid #adb5bd; font-size: 32px; font-weight: 700; }
.seg button.on { border-color: var(--ol); background: #ffd166; }
.sleepy .eye { animation: none; transform: scaleY(.12); }
.p-select { min-height: 96px; max-width: 900px; padding: 0 20px; font-size: 32px; border-radius: 22px; border: 4px solid var(--ol); background: #fff; color: var(--ol); }

/* ---------- Ambient life (own layers, transform/opacity only) ---------- */
.ambient { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.amb { position: absolute; will-change: transform; }
.amb svg { width: 100%; height: 100%; display: block; }
.drift { left: 0; animation: drift 100s linear infinite; }
@keyframes drift { from { transform: translateX(-320px); } to { transform: translateX(2240px); } }
.birds { animation-name: drift-birds; }
@keyframes drift-birds { 0% { transform: translate(-80px, 0); } 50% { transform: translate(1000px, -40px); } 100% { transform: translate(2100px, 10px); } }
.sway { transform-origin: 50% 100%; animation: sway 4.5s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.puff { animation: puff 4.2s ease-out infinite; opacity: 0; }
@keyframes puff { 0% { transform: translate(0,0) scale(.5); opacity: .95; } 100% { transform: translate(60px,-190px) scale(1.9); opacity: 0; } }
.flutter { animation: flutter 9s ease-in-out infinite; }
@keyframes flutter {
  0% { transform: translate(0,0) rotate(-8deg); } 25% { transform: translate(120px,-70px) rotate(10deg); }
  50% { transform: translate(40px,-140px) rotate(-6deg); } 75% { transform: translate(-90px,-60px) rotate(8deg); } 100% { transform: translate(0,0) rotate(-8deg); }
}
.flutter .wings { transform-box: fill-box; transform-origin: center; animation: flap .25s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.35); } }
.twinkle { animation: twinkle 2.6s ease-in-out infinite; opacity: 0; }
@keyframes twinkle { 0%,100% { opacity: 0; transform: scale(.4); } 50% { opacity: .95; transform: scale(1); } }

/* Characters breathe a little while idle */
.idle { animation: idle 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes idle { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.015,.985); } }

@media (prefers-reduced-motion: reduce) { .amb, .idle { animation: none !important; } }

/* ---------- Soft 3D toy finish for UI ---------- */
.btn, .num-btn, .star-pill, .num-sign, .zone-face, .card, .act-card, .slot, .area-banner, .progress, .count-badge {
  background-image: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.12) 38%, rgba(255,255,255,0) 52%, rgba(20,10,50,.10) 100%);
}
.btn, .num-btn, .star-pill, .zone-face, .area-banner {
  box-shadow: inset 0 -10px 0 rgba(20,10,50,.14), inset 0 6px 0 rgba(255,255,255,.55), 0 10px 0 rgba(30,20,60,.28), 0 18px 24px rgba(30,20,60,.18);
  border-color: #2f2a45;
}
.btn:active { box-shadow: inset 0 -4px 0 rgba(20,10,50,.14), inset 0 4px 0 rgba(255,255,255,.5), 0 3px 0 rgba(30,20,60,.28); }
.num-btn { border-width: 7px; }
.num-btn:active { box-shadow: inset 0 -4px 0 rgba(20,10,50,.15), 0 4px 0 rgba(30,20,60,.28); }
.card, .act-card, .slot, .num-sign {
  border-color: #2f2a45;
  box-shadow: inset 0 -12px 0 rgba(20,10,50,.07), inset 0 8px 0 rgba(255,255,255,.8), 0 14px 0 rgba(30,20,60,.22), 0 26px 40px rgba(30,20,60,.18);
}
.zone.active .zone-face { background-color: #fff6d6; }
.zone::after { /* soft ground shadow under each sign */
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -34px; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(30,20,60,.32), rgba(30,20,60,0)); z-index: -1;
}
.overlay { background: radial-gradient(circle at 50% 45%, rgba(29,53,87,.35), rgba(20,30,60,.72)); }
.confetti { box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), inset 0 4px 0 rgba(255,255,255,.4); }
.num-sign b, .num-btn { text-shadow: 0 6px 0 rgba(30,20,60,.18); }

/* Calm motion (Parent Corner): stop background life to save battery / frame rate */
body.calm .ambient { display: none; }
body.calm .eye, body.calm .idle, body.calm .zone-ring { animation: none; }

/* ---------- Letter games ---------- */
.letter-block { border-radius: 48px; border: 8px solid #2f2a45; display: grid; place-items: center;
  box-shadow: inset 0 -12px 0 rgba(20,10,50,.18), inset 0 8px 0 rgba(255,255,255,.45), 0 12px 0 rgba(30,20,60,.28), 0 22px 30px rgba(30,20,60,.2);
  background-image: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.1) 40%, rgba(255,255,255,0) 55%, rgba(20,10,50,.12) 100%); }
.letter-block .glyph { width: 74%; height: 80%; }
.letter-block .glyph svg { width: 100%; height: 100%; }
.letter-block.dim { opacity: .35; }
.trace-area { position: absolute; z-index: 10; touch-action: none; }
.start-dot { transform-box: fill-box; transform-origin: center; animation: pulse 1.2s ease-in-out infinite; }
.picture-card { border-radius: 60px; background-color: #fff; border: 10px solid #2f2a45; padding: 50px;
  box-shadow: inset 0 -14px 0 rgba(20,10,50,.07), inset 0 8px 0 rgba(255,255,255,.8), 0 14px 0 rgba(30,20,60,.22), 0 26px 40px rgba(30,20,60,.18); }
.dig-site .fossil, .dig-site .sand { position: absolute; inset: 0; }
.dig-site .fossil { opacity: 0; transform: translateY(40px) scale(.85); transition: opacity .3s, transform .4s cubic-bezier(.3,1.6,.5,1); }
.dig-site.open .fossil { opacity: 1; transform: none; }
.dig-site .sand { top: 10%; transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.3,1.5,.5,1), opacity .3s; }
.dig-site.found .fossil svg { filter: drop-shadow(0 0 18px #fff3a0); }
.dirt { position: absolute; left: 50%; top: 55%; width: 26px; height: 22px; border-radius: 50%; background: #b9824c;
  animation: dirt .7s ease-out forwards; pointer-events: none; }
@keyframes dirt { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }

.act-card.three { width: 560px; height: 600px; }
.act-card.three .pic { transform: scale(.86); }

.math-sign { width: 460px; height: 220px; }
.math-sign b { font-size: 130px; white-space: nowrap; }
.num-btn:nth-child(4) { background-color: #fb8500; animation-delay: .24s; }
.choices.four { gap: 50px; }
.choices.four .num-btn { width: 210px; height: 210px; font-size: 130px; }
.abc-sign { position: absolute; width: 640px; height: 260px; flex-direction: row; gap: 20px; }
.abc-box { width: 170px; height: 200px; border-radius: 30px; border: 6px dashed #c9c2d6; display: grid; place-items: center; padding: 14px; }
.abc-box svg { width: 100%; height: 100%; }
.abc-box b { font-size: 140px; font-weight: 900; color: #8338ec; }
.abc-arrow { width: 120px; height: 72px; }
.pic-card { border-radius: 50px; background-color: #fff; border: 9px solid #2f2a45; padding: 28px;
  box-shadow: inset 0 -12px 0 rgba(20,10,50,.07), inset 0 8px 0 rgba(255,255,255,.8), 0 12px 0 rgba(30,20,60,.22), 0 22px 34px rgba(30,20,60,.18);
  background-image: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 50%, rgba(20,10,50,.06)); }
.pic-card.dim { opacity: .35; }
.pic-card.dark { background-color: #22305a; }
.pic-card.shadow svg { filter: brightness(0); opacity: .85; }

.comet { animation: comet 9s linear infinite; }
@keyframes comet { 0% { transform: translate(-200px, 120px) rotate(14deg); opacity: 0; } 5% { opacity: 1; } 30% { transform: translate(2100px, 640px) rotate(14deg); opacity: 1; } 31%, 100% { opacity: 0; transform: translate(2100px, 640px) rotate(14deg); } }
/* Dino Chomp */
.chomp-side { width: 500px; height: 520px; border-radius: 60px; background-color: #fff; border: 10px solid #2f2a45; display: grid; place-items: center; padding: 30px;
  box-shadow: inset 0 -14px 0 rgba(20,10,50,.07), 0 14px 0 rgba(30,20,60,.22), 0 26px 40px rgba(30,20,60,.18); }
.chomp-side b { font-size: 260px; font-weight: 900; color: #ef476f; -webkit-text-stroke: 7px #2f2a45; paint-order: stroke fill; line-height: 1; }
.chomp-side b.sum { font-size: 150px; color: #118ab2; white-space: nowrap; }
.chomp-group { display: grid; gap: 8px; width: 100%; }
.chomp-group div { aspect-ratio: 1; }
.chomp-group svg { width: 100%; height: 100%; }
.chomp-head { transform-origin: 50% 50%; }
.chomp-symbol { width: 100%; height: 100%; display: grid; place-items: center; font-size: 220px; font-weight: 900; color: #06d6a0; -webkit-text-stroke: 7px #2f2a45; paint-order: stroke fill; }
/* Steer */
.steer-btn { width: 220px; height: 220px; }
.steer-btn svg { width: 60%; height: 60%; }
.steer-plan { position: absolute; left: 50%; top: 190px; transform: translateX(-50%); display: flex; gap: 20px; z-index: 20; background: rgba(255,255,255,.8); padding: 14px 24px; border-radius: 40px; }
.steer-plan i { width: 60px; height: 60px; border-radius: 50%; border: 6px solid #2f2a45; background: #fff; display: block; }
.steer-plan i.done { background: #06d6a0; }
/* Ordering games */
.order-slot { position: absolute; border-radius: 40px; border: 7px dashed rgba(255,255,255,.85); background: rgba(255,255,255,.18); z-index: 4; }
.order-slot .ghost { width: 100%; height: 100%; opacity: .25; filter: grayscale(1); }
.order-slot .ghost > * , .order-slot .ghost svg { width: 100%; height: 100%; }
.order-item.placed { z-index: 6; }
.orbit-line { position: absolute; height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.5) 0 24px, transparent 24px 40px); z-index: 2; }
.lineup-truck { width: 100%; height: 100%; position: relative; border-radius: 40px; background: #fff; border: 7px solid #2f2a45; box-shadow: 0 10px 0 rgba(30,20,60,.25); }
.lineup-truck .tr { position: absolute; left: 6%; right: 6%; bottom: 4%; height: 55%; }
.lineup-truck b { position: absolute; top: 2%; left: 0; right: 0; text-align: center; font-size: 110px; font-weight: 900; color: #ef476f; -webkit-text-stroke: 5px #2f2a45; paint-order: stroke fill; line-height: 1.1; }
/* Animal Homes */
.home-zone { position: absolute; border-radius: 40px; border: 8px solid #2f2a45; z-index: 3; overflow: hidden;
  box-shadow: inset 0 -12px 0 rgba(20,10,50,.1), 0 12px 0 rgba(30,20,60,.22); }
.home-zone > svg { width: 100%; height: 70%; }
.home-pen { display: none; }
/* Pattern Train */
.train { position: absolute; display: flex; align-items: flex-end; gap: 10px; z-index: 5; }
.engine svg { width: 100%; height: 100%; }
.wagon { position: relative; width: 100%; }
.cargo { aspect-ratio: 1; background: #fff3d6; border: 6px solid #2f2a45; border-radius: 22px; padding: 10px; box-shadow: inset 0 -8px 0 rgba(20,10,50,.08); }
.cargo svg { width: 100%; height: 100%; }
.wheels { width: 100%; height: auto; margin-top: -6px; }
.mystery { width: 100%; height: 100%; display: grid; place-items: center; font-size: 120px; font-weight: 900; color: #8338ec; animation: pulse 1.4s infinite; }
/* Sudoku */
.sudoku { position: absolute; display: grid; gap: 10px; padding: 14px; background: #2f2a45; border-radius: 34px; z-index: 5; box-shadow: 0 14px 0 rgba(30,20,60,.25); }
.sd-cell { background: #fff3d6; border-radius: 22px; padding: 10px; }
.sd-cell svg { width: 100%; height: 100%; }
.sd-cell.hole { background: #fffaf0; border: 6px dashed #d9a066; }
.sudoku.four .sd-cell.box-r { margin-right: 14px; }
.sudoku.four .sd-cell.box-b { margin-bottom: 14px; }
.sd-palette { position: absolute; right: 60px; top: 230px; display: grid; gap: 22px; z-index: 6; }
.sd-chip { width: 210px; height: 190px; border-radius: 36px; background: #fff; border: 8px solid #2f2a45; padding: 10px; box-shadow: 0 10px 0 rgba(30,20,60,.25); }
.sd-chip svg { width: 100%; height: 100%; }
.sd-chip.sel { background: #ffd166; transform: scale(1.08); border-color: #ef476f; }
/* Jigsaw */
.jig-board { position: absolute; border-radius: 8px; outline: 8px solid #2f2a45; background: rgba(255,255,255,.55); z-index: 3; overflow: hidden; }
.jig-ghost { position: absolute; inset: 0; opacity: .22; filter: grayscale(.4); }
.jig-lines { position: absolute; inset: 0; background-image: linear-gradient(90deg, rgba(47,42,69,.5) 3px, transparent 3px), linear-gradient(rgba(47,42,69,.5) 3px, transparent 3px); }
.jig-piece { overflow: hidden; border-radius: 10px; outline: 4px solid #2f2a45; box-shadow: 0 10px 18px rgba(30,20,60,.3); transform-origin: top left; }
.jig-piece.fitted { outline: none; box-shadow: none; border-radius: 0; z-index: 4; }
.jig-art { position: absolute; width: 900px; height: 600px; }
.item .jig-art svg, .jig-ghost svg { width: 900px; height: 600px; }
