/* ============================================================
   SzólMi / SingATone v1.1 — „Kréta-opera” design
   Kézzel rajzolt, zsírkréta-stílusú arculat Daniel Mia-rajzaihoz.
   ============================================================ */
:root {
  --paper: #fdf5e2;          /* vajszín papír */
  --paper-card: #fffdf4;
  --ink: #4a3a85;            /* sötét kréta-lila tinta */
  --ink-soft: #8a7bb5;
  --primary: #7c5fd3;
  --primary-dark: #5b4a9e;
  --pink: #e4577e;
  --orange: #e8a23d;
  --green: #67b558;
  --teal: #4aa8a0;
  --blue: #5a9bd8;
  --crayon-border: 3px solid rgba(91, 74, 158, 0.55);
  --wobble-r: 26px 22px 28px 20px / 22px 28px 20px 26px;
  --wobble-r2: 20px 26px 22px 28px / 28px 20px 26px 22px;
  --shadow: 0 6px 18px rgba(120, 90, 60, 0.14);
  /* Egységes, letisztult betűtípus mindenhol (opening_design gomb betűje) */
  --font-head: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

/* nagy display-címek extra vastagon, másodlagos szövegek könnyedebben */
.brand-name, .game-head h1, .hero-title, .intro-title, .game-name,
.result-panel h2, .card h3, .assess-part, .stat-value, .big-instruction { font-weight: 900; }
.game-desc, .hint-line, .hint-line.small, .setting-value, .trial-when,
.stat-label, .brand-tagline, .reward-pill .reward-lbl, .game-icon + .game-body .game-desc { font-weight: 600; }

body {
  margin: 0;
  min-height: 100vh;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
/* papírszemcse */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* elszórt kréta-firkák a háttérben */
.bg-decor { overflow: hidden; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-note { position: absolute; font-size: 30px; opacity: 0.35; animation: bgFloat 12s ease-in-out infinite; filter: saturate(0.9); }
.bg-note.n1 { left: 3%; top: 20%; }
.bg-note.n2 { left: 93%; top: 26%; animation-delay: 2s; }
.bg-note.n3 { left: 10%; top: 76%; animation-delay: 4s; font-size: 24px; }
.bg-note.n4 { left: 86%; top: 74%; animation-delay: 6s; }
.bg-note.n5 { left: 46%; top: 10%; animation-delay: 3s; font-size: 22px; }
.bg-note.n6 { left: 64%; top: 90%; animation-delay: 8s; }
@keyframes bgFloat {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50% { transform: translateY(-22px) rotate(9deg); }
}

/* ---------- fejléc ---------- */
.app-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 16px 26px 6px;
}
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-logo-btn {
  background: none; border: none; padding: 0; margin: 0;
  cursor: pointer; display: block; line-height: 0;
}
.brand-logo-img {
  height: 92px; width: auto; display: block;
  filter: drop-shadow(2px 3px 0 rgba(120, 90, 60, 0.14));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-logo-btn:hover .brand-logo-img { transform: rotate(-2deg) scale(1.05); }
.brand-logo-btn:active .brand-logo-img { transform: scale(0.96); }
@media (max-width: 560px) { .brand-logo-img { height: 68px; } }

/* nyitáskor a főoldal maradjon rejtve, amíg a loader+intró lejátszódik */
.app-header, main#screen { transition: opacity 0.45s ease 0.05s; }
body.booting .app-header, body.booting main#screen { opacity: 0; pointer-events: none; }
.brand-tagline { font-family: var(--font-head); font-size: 15px; color: var(--ink-soft); }
.app-nav { display: flex; gap: 8px; flex-wrap: wrap; }

main#screen { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 4px 18px 70px; }

/* ---------- gombok: kréta-kontúros pirulák ---------- */
.btn {
  font-family: var(--font-head);
  font-size: 19px; font-weight: 400; letter-spacing: 0.4px;
  color: var(--ink);
  background: #fff;
  border: var(--crayon-border);
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.14s;
  box-shadow: 0 3px 0 rgba(91, 74, 158, 0.35), var(--shadow);
}
.btn:hover:not(:disabled) { transform: translateY(-2px) rotate(-0.6deg) scale(1.03); }
.btn:active:not(:disabled) { transform: translateY(2px) scale(0.98); box-shadow: 0 1px 0 rgba(91, 74, 158, 0.35); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary {
  background: linear-gradient(180deg, #8d70e2, #6b4fc0);
  color: #fff;
  border-color: rgba(74, 58, 133, 0.8);
  box-shadow: 0 4px 0 #4a3a85, var(--shadow);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-primary.big { font-size: 23px; padding: 13px 32px; }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-soft); }
.btn-nav { padding: 7px 15px; font-size: 17px; }
.btn-small { padding: 4px 13px; font-size: 15px; margin-left: 10px; }
.btn-danger { border-color: rgba(200, 80, 80, 0.6); color: #b8474f; box-shadow: 0 3px 0 rgba(200, 80, 80, 0.4); }
.btn-answer { font-size: 22px; padding: 13px 26px; }
.track-btn.active {
  background: linear-gradient(180deg, #8d70e2, #6b4fc0);
  color: #fff; border-color: rgba(74, 58, 133, 0.8);
}

/* ---------- kártyák: papírlapok kréta-kerettel ---------- */
.card {
  position: relative;
  background: var(--paper-card);
  border: var(--crayon-border);
  border-radius: var(--wobble-r);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 16px 0;
  overflow: hidden;
}
.card:nth-child(even) { border-radius: var(--wobble-r2); }
.stage-card { text-align: center; }

.screen-in { animation: screenIn 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(16px) rotate(-0.4deg); } }
.pop-in { animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes popIn { from { opacity: 0; transform: scale(0.82) rotate(1.5deg); } }

.game-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.game-head h1 {
  font-family: var(--font-head);
  font-size: 34px; font-weight: 400; margin: 0; flex: 1;
  color: var(--primary-dark);
  text-shadow: 2px 2px 0 #fff;
}
.scorebar { display: flex; gap: 8px; flex-wrap: wrap; }
.scorechip {
  font-family: var(--font-head);
  background: #fff; border: 2.5px solid rgba(91, 74, 158, 0.4);
  border-radius: 999px; padding: 5px 15px;
  font-size: 16px; color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.scorechip b { color: var(--ink); font-size: 18px; }
.hint-line { font-family: var(--font-head); color: var(--ink-soft); text-align: center; font-size: 18px; }
.hint-line.small { font-size: 15px; }
.action-row { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.big-instruction { font-family: var(--font-head); font-size: 25px; min-height: 60px; color: var(--ink); }
.progressbar {
  height: 16px; border-radius: 999px;
  background: #f3e8cd;
  border: 2.5px solid rgba(91, 74, 158, 0.35);
  overflow: hidden; margin: 14px auto 4px; max-width: 480px;
}
.progressbar > div {
  height: 100%; width: 0%; border-radius: 999px;
  background: repeating-linear-gradient(45deg, var(--green), var(--green) 12px, #7cc46e 12px, #7cc46e 24px);
  transition: width 0.15s linear;
}
.badge-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.badge {
  font-family: var(--font-head);
  background: #f6eefe; border: 2.5px dashed rgba(124, 95, 211, 0.5);
  border-radius: 16px; padding: 8px 16px; font-size: 17px;
}
.badge.small { font-size: 12px; padding: 2px 8px; border-width: 1.5px; color: var(--primary-dark); }
.result-panel h2 { font-family: var(--font-head); margin: 10px 0 4px; font-size: 28px; }
.stars-big { font-size: 44px; animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* képernyő-témák: a stage-kártya felső kréta-sávja */
.game-screen .stage-card { border-top: 8px solid var(--theme, var(--primary)); }
.theme-violet { --theme: #7c5fd3; }
.theme-pink { --theme: #e4577e; }
.theme-sky { --theme: #5a9bd8; }
.theme-amber { --theme: #e8a23d; }
.theme-green { --theme: #67b558; }
.theme-plum { --theme: #9b6fdf; }

/* ============================================================
   MIA — Daniel rajzolt képkockái, áttűnéses animációval
   ============================================================ */
.mia-wrap {
  position: relative; display: inline-block;
  user-select: none; cursor: pointer;
}
.mia-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0; transition: opacity 0.14s ease;
  -webkit-user-drag: none;
  filter: drop-shadow(0 8px 10px rgba(120, 90, 60, 0.25));
}
.mia-img.on { opacity: 1; }

/* mozgás-osztályok az egész karakteren */
.mia-wrap.mia-idle { animation: miaBob 3.4s ease-in-out infinite; }
@keyframes miaBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5px) rotate(-1deg); } }
.mia-wrap.mia-focus { animation: miaLean 2.4s ease-in-out infinite; }
@keyframes miaLean { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-3px); } }
.mia-wrap.mia-singing { animation: miaSway 1.4s ease-in-out infinite; }
@keyframes miaSway { 0%, 100% { transform: rotate(-2.5deg) scale(1.02); } 50% { transform: rotate(2.5deg) scale(1.05); } }
.mia-wrap.mia-happy { animation: miaJump 0.55s ease-in-out infinite; }
@keyframes miaJump { 0%, 100% { transform: translateY(0) rotate(-2deg); } 40% { transform: translateY(-16px) rotate(2deg) scale(1.04); } }
.mia-wrap.mia-oops { animation: miaSad 2.6s ease-in-out infinite; filter: saturate(0.75); }
@keyframes miaSad { 0%, 100% { transform: rotate(3deg) translateY(3px); } 50% { transform: rotate(1deg) translateY(5px); } }

/* kirepülő hangjegyek */
.mia-note {
  position: absolute; top: 16%; z-index: 3;
  font-size: 26px; font-weight: 700;
  pointer-events: none;
  text-shadow: 1.5px 1.5px 0 #fff;
  animation: noteFloat 1.5s ease-out forwards;
}
@keyframes noteFloat {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6) rotate(-10deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift, 20px), -95px) scale(1.3) rotate(12deg); }
}

/* ---------- főoldal (design.png sablon) ---------- */
.hero-card {
  position: relative;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 24px 34px;
  background:
    radial-gradient(340px 200px at 6% 118%, rgba(155, 130, 225, 0.28), transparent 70%),
    radial-gradient(360px 220px at 99% 120%, rgba(180, 150, 230, 0.26), transparent 70%),
    var(--paper-card);
  border: var(--crayon-border);
  border-radius: 34px 30px 36px 28px / 28px 36px 30px 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 16px 0;
}
.hero-card::before {
  content: ''; position: absolute; top: 14px; right: 24px;
  width: 92px; height: 26px; opacity: 0.6;
  background: url('../assets/voicecheck/dec_sparkles.webp') center/contain no-repeat;
}
.hero-staff {
  position: absolute; right: 24px; top: 34%; width: 62px; height: auto; opacity: 0.16;
  transform: rotate(-6deg); pointer-events: none;
}
.hero-cat { flex-shrink: 0; height: 220px; display: flex; align-items: center; z-index: 1; }
.hero-text { z-index: 1; flex: 1; min-width: 260px; }
.hero-title {
  font-family: var(--font-head);
  margin: 10px 0 2px; font-size: 44px; font-weight: 900; line-height: 1.05;
  background: linear-gradient(100deg, #3f57b5, #7c5fd3 55%, #b14b9c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 0.2px;
}
.hero-flourish { margin: 4px 0 12px; line-height: 0; }
.hero-flourish img { width: 84px; height: auto; opacity: 0.75; }

.reward-row { display: flex; gap: 12px; flex-wrap: wrap; }
.reward-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 2.5px solid rgba(232, 162, 61, 0.5);
  border-radius: 999px; padding: 7px 18px 7px 12px;
  box-shadow: var(--shadow);
}
.reward-pill .reward-ico { font-size: 24px; }
.reward-pill b { font-family: var(--font-head); font-size: 22px; color: var(--ink); }
.reward-pill .reward-lbl { font-family: var(--font-head); font-size: 14px; color: var(--ink-soft); }
.reward-pill.streak { border-color: rgba(228, 118, 87, 0.5); }

.speech-bubble {
  display: inline-block; position: relative;
  font-family: var(--font-head);
  background: #fff;
  border: 2.5px dashed rgba(124, 95, 211, 0.55);
  border-radius: 18px 22px 20px 24px / 24px 18px 22px 20px;
  padding: 10px 18px;
  font-size: 19px;
  box-shadow: var(--shadow);
  max-width: 460px;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.speech-bubble.small { font-size: 17px; padding: 8px 14px; }
.bubble-heart { color: var(--pink); }

/* min(320px, 100%): keskeny telefonon a kártya sose lógjon ki a képernyőből */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 18px; margin: 6px 0; }
.game-card {
  position: relative;
  min-width: 0;                 /* grid-elem: ne feszítse ki a hosszú szöveg */
  font-family: var(--font-body);
  text-align: left;
  background: var(--paper-card);
  border: 2.5px solid rgba(91, 74, 158, 0.18);
  border-left: 8px solid var(--theme, var(--primary));
  border-radius: 24px 20px 26px 22px / 20px 26px 22px 24px;
  box-shadow: var(--shadow);
  padding: 16px 60px 16px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 16px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s;
  animation: cardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(20px); } }
.game-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 16px 34px rgba(120, 90, 60, 0.24); }
.game-card:hover .game-arrow { transform: scale(1.12) translateX(2px); }
.game-icon { flex-shrink: 0; width: 84px; height: 84px; }
.game-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(120, 90, 60, 0.18)); }
.game-body { display: flex; flex-direction: column; gap: 3px; }
.game-name { font-family: var(--font-head); font-size: 25px; color: var(--theme, var(--primary-dark)); line-height: 1; }
.game-desc { font-size: 14.5px; color: var(--ink-soft); }
.game-body { min-width: 0; }
.game-title, .game-desc { overflow-wrap: anywhere; }
.game-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--theme, var(--primary)); color: #fff;
  font-size: 24px; font-weight: 700; line-height: 1;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.octave-ctl { display: inline-flex; gap: 6px; align-items: center; }
.octave-btn { font-size: 15px; padding: 7px 14px; }

.tip-pill {
  font-family: var(--font-head);
  text-align: center; margin: 16px auto 0; max-width: 720px;
  color: var(--ink-soft); font-size: 17px;
  background: #faf3ff;
  border: 2.5px dashed rgba(124, 95, 211, 0.4);
  border-radius: 999px; padding: 10px 24px;
}

/* onboarding */
.onboard-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(74, 58, 133, 0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.onboard-card {
  background: var(--paper-card);
  border: var(--crayon-border);
  border-radius: 30px 26px 32px 24px / 26px 32px 24px 30px;
  box-shadow: 0 24px 70px rgba(40, 25, 80, 0.35);
  padding: 28px 34px; text-align: center; max-width: 480px;
}
.onboard-card h2 { font-family: var(--font-head); margin: 8px 0; font-size: 28px; color: var(--primary-dark); }
.onboard-card p { color: var(--ink-soft); font-size: 17px; }
.onboard-cat { display: flex; justify-content: center; height: 170px; }
.onboard-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ---------- mikrofon-kapu ---------- */
.mic-gate {
  position: absolute; inset: 8px; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  margin: 0; text-align: center;
}
.mic-gate h2 { font-family: var(--font-head); font-size: 26px; margin: 4px; }
.mic-gate-icon { font-size: 56px; animation: bgFloat 3s ease-in-out infinite; }
.mic-error { color: #b8474f; font-weight: 700; }

/* ---------- kalibráció ---------- */
.level-meter {
  max-width: 420px; margin: 12px auto 4px;
  background: #f3e8cd;
  border: 2.5px solid rgba(91, 74, 158, 0.35);
  border-radius: 999px; padding: 4px;
}
.level-bar {
  height: 24px; border-radius: 999px; width: 0%;
  background: var(--orange);
  transition: width 0.1s linear, background 0.2s;
}
.level-bar[data-state="good"] { background: var(--green); }
.level-bar[data-state="loud"] { background: var(--pink); }
.level-label { font-family: var(--font-head); margin-top: 6px; font-size: 22px; }

/* ---------- dallamlétra ---------- */
.ladder-wrap { width: 94px; height: 265px; }
.ladder {
  position: relative; width: 100%; height: 100%;
  background: linear-gradient(180deg, #f8f0fb, #fdeef2);
  border: var(--crayon-border);
  border-radius: 22px 18px 24px 20px / 18px 24px 20px 22px;
  box-shadow: var(--shadow);
  transition: opacity 0.3s;
}
.ladder-zone {
  position: absolute; left: 7%; width: 86%;
  background: rgba(103, 181, 88, 0.3);
  border: 2.5px dashed rgba(80, 150, 70, 0.6);
  border-radius: 14px;
  top: 40%; height: 20%;
  transition: height 0.3s, top 0.3s, background 0.2s;
}
.ladder.zone-hot .ladder-zone { background: rgba(103, 181, 88, 0.55); box-shadow: 0 0 16px rgba(103, 181, 88, 0.55); }
.ladder-marker {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  transition: top 0.08s linear, opacity 0.2s;
  filter: drop-shadow(1.5px 1.5px 0 #fff) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.ladder-marker.in-zone { animation: markerPulse 0.5s ease-in-out infinite; }
@keyframes markerPulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.3) rotate(14deg); } }
.ladder-hint { position: absolute; left: 50%; transform: translateX(-50%); font-size: 24px; opacity: 0; transition: opacity 0.2s; }
.ladder-hint-up { top: 5px; }
.ladder-hint-down { bottom: 5px; }
.ladder-hint.on { opacity: 1; animation: hintBlink 0.8s infinite; }
@keyframes hintBlink { 50% { opacity: 0.3; } }

/* ---------- hold ring ---------- */
.ring-wrap { display: flex; align-items: center; justify-content: center; }
.ring-wrap.center { margin: 10px auto; }
.hold-ring .ring-bg { fill: none; stroke: rgba(91, 74, 158, 0.2); stroke-width: 10; stroke-dasharray: 4 7; stroke-linecap: round; }
.hold-ring .ring-fill { fill: none; stroke: var(--green); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.08s linear; }
.hold-ring .ring-fill.ring-full { stroke: var(--orange); }
.hold-ring .ring-emoji { font-size: 28px; }

/* ---------- lufik ---------- */
/* ---------- Lufipukkantás: dupla-rétegű keret + felhős ég + designolt lufik ---------- */
.card.stage-card.balloon-stage {
  position: relative;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(180deg, #fdf5fb 0%, #f4edfb 60%, #eef0fc 100%);
  border: 6px solid #f7a6bf;                       /* vékony korall-rózsaszín külső perem */
  box-shadow:
    0 20px 44px rgba(150, 120, 185, 0.30),         /* lágy külső árnyék */
    inset 0 0 0 4px #fff9f0,                        /* krémfehér csík a rétegek között */
    inset 0 0 0 11px #cdb8f0,                       /* lágy levendula belső perem */
    inset 0 6px 10px rgba(255, 255, 255, 0.85),     /* finom belső fénykiemelés (bevel) */
    inset 0 -10px 18px rgba(150, 120, 185, 0.10);
}
.balloon-stage .balloon-sky {
  position: relative;
  background: url('../assets/balloons/sky.webp') center 22% / cover no-repeat, linear-gradient(180deg, #bfe2f6, #eef6ec);
  border: none;
  border-radius: 30px;
  padding: 26px 12px 16px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), inset 0 -20px 26px rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.balloon-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; min-height: 120px; }
.balloon {
  position: relative;
  display: flex; align-items: flex-start; justify-content: center;
  animation: balloonBob 2.4s ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
}
@keyframes balloonBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
.balloon-img {
  width: 76px; height: auto; display: block;
  transform-origin: center bottom;
  transform: scale(var(--grow, 1));
  transition: transform 0.12s ease, filter 0.2s ease;
  filter: drop-shadow(0 6px 8px rgba(90, 70, 130, 0.25));
  will-change: transform;
}
.balloon.target { z-index: 3; animation-duration: 1.5s; }
.balloon.target .balloon-img {
  filter: drop-shadow(0 0 10px var(--balloon-color, #e4577e)) drop-shadow(0 6px 8px rgba(90, 70, 130, 0.3));
}
/* kitartott hangnál: a lebegés megáll, a lufi rezeg és nő */
.balloon.holding { animation-play-state: paused; }
.balloon.holding .balloon-img { animation: balloonShake 0.1s linear infinite; }
@keyframes balloonShake {
  0%   { transform: translate(-2px, 0)  rotate(-1.6deg) scale(var(--grow, 1)); }
  50%  { transform: translate(2px, -1px) rotate(1.6deg) scale(var(--grow, 1)); }
  100% { transform: translate(-2px, 0)  rotate(-1.6deg) scale(var(--grow, 1)); }
}
/* durranás pillanata → utána kipukkadva marad */
.balloon.popping { animation-play-state: paused; }
.balloon.popping .balloon-img { animation: balloonBurst 0.62s ease-out both; }
@keyframes balloonBurst {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1.3); }
}
.balloon.popped { animation: none; }
.balloon.popped .balloon-img {
  transform: scale(1.05);
  opacity: 0.97;
  filter: drop-shadow(0 5px 7px rgba(90, 70, 130, 0.22));
}

.stage-mid { display: flex; align-items: center; justify-content: center; gap: 36px; margin: 14px 0; flex-wrap: wrap; }
.stage-cat { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stage-cat.center { margin: 0 auto; }
.stage-cat .mia-wrap, #gameCat .mia-wrap { height: 160px; }

/* ---------- konfetti + dekor + toast ---------- */
.confetti {
  position: absolute; top: -12px; z-index: 20;
  animation: confettiFall 2s ease-in forwards;
  pointer-events: none;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(68vh) rotate(420deg); opacity: 0; }
}
.decor-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.decor { position: absolute; font-size: 22px; opacity: 0.3; animation: bgFloat ease-in-out infinite; }

.ach-toast {
  position: fixed; top: 18px; left: 50%; z-index: 80;
  transform: translate(-50%, -130%);
  background: #fff9e6;
  border: 3px solid rgba(232, 162, 61, 0.7);
  border-radius: 20px 24px 18px 26px / 24px 18px 26px 20px;
  box-shadow: 0 14px 40px rgba(120, 90, 60, 0.35);
  padding: 12px 28px; text-align: center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ach-toast.show { transform: translate(-50%, 0) rotate(-1deg); }
.ach-toast-title { font-family: var(--font-head); font-size: 15px; color: var(--ink-soft); }
.ach-toast-body { font-family: var(--font-head); font-size: 23px; }

.badge-wall { display: flex; gap: 10px 4px; flex-wrap: wrap; justify-content: center; }
.sticker {
  width: 152px; max-width: 30%;
  filter: grayscale(1) opacity(0.5);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
}
.sticker img { width: 100%; height: auto; display: block; }
.sticker.earned { filter: none; }
.sticker.earned:hover { transform: scale(1.06) rotate(-2deg); }

/* ---------- hullámvasút ---------- */
.track-picker { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
#coasterCanvas {
  width: 100%; height: auto;
  border: var(--crayon-border);
  border-radius: 20px 24px 18px 26px / 24px 18px 26px 20px;
  box-shadow: var(--shadow);
}

/* ---------- fülelő ---------- */
.ear-orbs { display: flex; justify-content: center; gap: 32px; margin: 18px 0; }
.ear-orb {
  width: 80px; height: 80px; border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 30px; color: #fff;
  text-shadow: 1.5px 1.5px 0 rgba(74, 58, 133, 0.5);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5), transparent 44%), var(--orange);
  border: 3px solid rgba(74, 58, 133, 0.5);
  box-shadow: var(--shadow);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s;
}
.ear-orb.lit { transform: scale(1.25) rotate(-4deg); box-shadow: 0 0 0 5px rgba(245, 198, 35, 0.5), 0 0 26px rgba(232, 162, 61, 0.8); }
.ear-answers { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 14px 0; }

/* ---------- visszhang ---------- */
.echo-chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; min-height: 56px; }
.echo-chip {
  font-family: var(--font-head);
  padding: 10px 18px;
  border-radius: 16px 20px 14px 22px / 20px 14px 22px 16px;
  background: var(--chip-color, var(--primary));
  border: 3px solid rgba(74, 58, 133, 0.45);
  color: #fff; font-size: 19px;
  text-shadow: 1.5px 1.5px 0 rgba(74, 58, 133, 0.5);
  opacity: 0.4;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.echo-chip.active { opacity: 1; transform: scale(1.2) translateY(-4px) rotate(-2deg); box-shadow: 0 0 0 4px var(--paper-card), 0 0 0 7px var(--chip-color), var(--shadow); }
.echo-chip.done { opacity: 1; }
.echo-chip.done::after { content: ' ✓'; }

/* ---------- felmérő ---------- */
.assess-part { font-family: var(--font-head); color: var(--primary-dark); font-size: 23px; min-height: 28px; margin: 8px 0; }

/* ---------- fejlődés ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat-card { text-align: center; margin: 0; padding: 16px; }
.stat-label { font-size: 13px; color: var(--ink-soft); }
.stat-value { font-family: var(--font-head); font-size: 34px; color: var(--primary-dark); }
#trendCanvas { width: 100%; height: auto; }
.trial-list { display: flex; flex-direction: column; gap: 6px; }
.trial-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  align-items: center; gap: 8px;
  background: #faf4e4;
  border: 1.5px solid rgba(91, 74, 158, 0.18);
  border-radius: 14px; padding: 8px 14px; font-size: 14px;
}
.trial-when { color: var(--ink-soft); text-align: right; }
.progress-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.card h3 { font-family: var(--font-head); font-size: 24px; margin: 4px 0 12px; color: var(--primary-dark); }

/* ---------- beállítások ---------- */
.settings-card { display: flex; flex-direction: column; gap: 4px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 4px;
  border-bottom: 2px dashed rgba(124, 95, 211, 0.22);
  font-family: var(--font-head); font-size: 19px;
}
.setting-row select, .setting-row input[type="text"] {
  font-family: var(--font-body); font-size: 16px; padding: 8px 14px;
  border-radius: 14px; border: 2.5px solid rgba(124, 95, 211, 0.4);
  background: #fff; color: var(--ink);
}
.setting-row input[type="range"] { width: 180px; accent-color: var(--primary); }
.setting-value { font-size: 16px; color: var(--ink-soft); }

/* ---------- Mia zenei utazása (térkép) ---------- */
.journey-scroll {
  overflow-x: auto; overflow-y: hidden;
  border-radius: 26px;
  border: var(--crayon-border);
  box-shadow: var(--shadow);
  margin: 10px 0;
  -webkit-overflow-scrolling: touch;
}
.journey-map {
  position: relative;
  background:
    radial-gradient(600px 300px at 20% 120%, rgba(155,130,225,0.18), transparent 70%),
    linear-gradient(180deg, #eaf6ff 0%, #f4f0e0 60%, #eef7e6 100%);
}
.journey-road { position: absolute; inset: 0; }
.jworld {
  position: absolute; transform: translate(-50%, -50%);
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-body);
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1);
}
.jworld:hover { transform: translate(-50%, -50%) scale(1.06); }
.jbadge {
  position: relative;
  width: 96px; height: 96px; border-radius: 50%;
  background: #fffdf4;
  border: 4px solid #cbb9f2;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.jbadge img { width: 84%; height: 84%; object-fit: contain; }
.jbadge svg { width: 66%; height: 66%; }
.jcheck {
  position: absolute; right: -4px; top: -4px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #5bbf67; color: #fff; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fffdf4; font-size: 15px;
}
.jlabel { text-align: center; background: rgba(255,253,244,0.9); border-radius: 12px; padding: 3px 10px; box-shadow: var(--shadow); }
.jname { display: block; font-weight: 900; font-size: 16px; color: var(--primary-dark); line-height: 1.05; }
.jtag { display: block; font-size: 12px; color: var(--ink-soft); }

.jworld.st-completed .jbadge { border-color: #7fcf88; }
.jworld.st-current .jbadge { border-color: #e8a23d; animation: jpulse 1.4s ease-in-out infinite; }
@keyframes jpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,162,61,0.5), var(--shadow); } 50% { box-shadow: 0 0 0 10px rgba(232,162,61,0), var(--shadow); } }
.jworld.st-current .jname { color: #d98a1e; }
.jworld.st-locked { filter: grayscale(0.6) opacity(0.75); }
.jworld.st-locked .jbadge { border-color: #c9c3d8; }
.jworld.st-future { filter: grayscale(1) opacity(0.5); }
.jworld.st-future .jbadge { border-style: dashed; }

.jcar {
  position: absolute; transform: translate(-50%, -50%);
  width: 92px; pointer-events: none; z-index: 5;
  animation: jcarBob 1.8s ease-in-out infinite;
}
.jcar-svg { width: 100%; height: auto; filter: drop-shadow(0 4px 5px rgba(120,90,60,0.25)); }
@keyframes jcarBob { 0%,100% { transform: translate(-50%, -50%) rotate(-1.5deg); } 50% { transform: translate(-50%, -58%) rotate(1.5deg); } }

.journey-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 140%);
  background: #fff; border: 3px solid rgba(124,95,211,0.4);
  border-radius: 16px; padding: 10px 22px; font-weight: 800; color: var(--ink);
  box-shadow: 0 12px 30px rgba(120,90,60,0.25); z-index: 90;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.journey-toast.show { transform: translate(-50%, 0); }

/* főoldali utazás-banner */
.journey-banner {
  display: flex; align-items: center; gap: 16px;
  width: 100%; text-align: left;
  background: linear-gradient(100deg, #8d70e2, #6b4fc0);
  color: #fff; border: none; cursor: pointer;
  border-radius: 24px; padding: 16px 22px; margin: 4px 0 6px;
  box-shadow: 0 6px 0 #4a3a85, var(--shadow);
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1);
  font-family: var(--font-body);
}
.journey-banner:hover { transform: translateY(-3px); }
.journey-banner .jb-emoji { font-size: 40px; }
.journey-banner .jb-title { font-weight: 900; font-size: 24px; }
.journey-banner .jb-sub { font-size: 14px; opacity: 0.92; }
.journey-banner .jb-go { margin-left: auto; font-size: 30px; }

/* ---------- márka-loader ---------- */
.loader-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: #0e0a1c;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.5s ease;
  cursor: pointer;
}
.loader-overlay.loader-out { opacity: 0; }
.loader-img { width: min(72vw, 460px); height: auto; }

/* ---------- intró ---------- */
.intro-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.6s ease;
}
.intro-overlay::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.intro-overlay.intro-out { opacity: 0; }
.intro-overlay.intro-out-fast { opacity: 0; transition-duration: 0.2s; }

.intro-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(92vw, 640px);
  padding: 30px 10px 40px;
  text-align: center;
  overflow: visible;
}
/* reflektorfény Mia mögött */
.intro-spot {
  position: absolute; top: 4%; left: 50%; transform: translateX(-50%);
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 170, 0.85), rgba(255, 232, 170, 0) 68%);
  transition: transform 0.6s ease, opacity 0.6s;
  opacity: 0.55;
}
.intro-playing .intro-spot { opacity: 1; transform: translateX(-50%) scale(1.18); }

.intro-cat { position: relative; z-index: 2; height: 235px; }

.intro-title {
  position: relative; z-index: 2;
  font-family: var(--font-head);
  font-size: 62px; font-weight: 400; margin: 4px 0 0;
  color: var(--primary-dark);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(228, 87, 126, 0.35);
  letter-spacing: 2px;
  opacity: 0; transform: translateY(16px) scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.intro-title.on { opacity: 1; transform: translateY(0) scale(1); }
.intro-title.bounce { animation: introTitleBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes introTitleBounce {
  0% { transform: scale(1); }
  45% { transform: scale(1.16) rotate(-2deg); }
  100% { transform: scale(1); }
}
.intro-tagline {
  z-index: 2;
  font-family: var(--font-head);
  font-size: 22px; color: var(--ink-soft);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}
.intro-tagline.on { opacity: 1; transform: translateY(0); }

/* belépés gomb: kivágott mancs-kép, lüktet, kattintásra „belecsapós" */
.intro-enter {
  position: relative; z-index: 2; margin-top: 6px;
  background: none; border: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  animation: introPulse 1.7s ease-in-out infinite;
  transform-origin: center 70%;
}
@keyframes introPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05) rotate(-1deg); } }
.intro-enter-img {
  width: min(51vw, 264px); height: auto; display: block;
  filter: drop-shadow(0 10px 18px rgba(90, 60, 140, 0.35));
  pointer-events: none;
}
.intro-enter:hover { animation-play-state: paused; }
.intro-enter:hover .intro-enter-img { transform: scale(1.03); }
/* lökéshullám-gyűrű a becsapódáskor */
.intro-enter-ring {
  position: absolute; left: 50%; top: 60%; width: 40px; height: 40px;
  border-radius: 50%; border: 6px solid rgba(255, 214, 90, 0.9);
  transform: translate(-50%, -50%) scale(0.2); opacity: 0; pointer-events: none;
}
/* „belecsapás": a mancs gyorsan behúzódik, majd visszapattan + gyűrű robban */
.intro-enter.slap { animation: introSlap 0.42s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes introSlap {
  0% { transform: scale(1); }
  22% { transform: scale(0.82) rotate(2deg); }
  55% { transform: scale(1.12) rotate(-1deg); }
  100% { transform: scale(1); }
}
.intro-enter.slap .intro-enter-ring { animation: introRing 0.5s ease-out both; }
@keyframes introRing {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
}
.intro-enter.gone { opacity: 0; transform: scale(0.6); pointer-events: none; transition: opacity 0.4s ease, transform 0.4s ease; animation: none; }
.intro-skip { position: absolute; right: 6px; bottom: 4px; z-index: 3; font-size: 16px; }

/* letisztult nyitókép (opening_design): nincs függöny, halkabb reflektor */
.intro-curtain { display: none; }
.intro-spot { opacity: 0.35 !important; }
.intro-title { font-weight: 900; }
.intro-curtain-legacy {
  position: fixed; top: 0; bottom: 0; width: 14vw; max-width: 150px; z-index: 1;
  background:
    repeating-linear-gradient(90deg,
      #8d70e2 0, #8d70e2 18px,
      #7a5cd0 18px, #7a5cd0 36px);
  border-bottom: 10px solid #e8a23d;
  opacity: 0.92;
  transition: transform 0.8s cubic-bezier(0.5, 0, 0.4, 1);
}
.intro-curtain-l { left: 0; border-radius: 0 22px 26px 0 / 0 30px 24px 0; }
.intro-curtain-r { right: 0; border-radius: 22px 0 0 26px / 30px 0 0 24px; }
.intro-playing .intro-curtain-l { transform: translateX(-108%); }
.intro-playing .intro-curtain-r { transform: translateX(108%); }

@media (max-width: 660px) {
  .intro-title { font-size: 42px; }
  .intro-cat { height: 180px; }
  .intro-curtain { width: 9vw; }
}

/* ---------- mobil + hozzáférhetőség ---------- */
@media (max-width: 660px) {
  .game-head h1 { font-size: 26px; }
  .hero-card { padding: 18px; gap: 14px; }
  .hero-cat { height: 150px; }
  .hero-title { font-size: 32px; }
  .game-grid { grid-template-columns: 1fr; }
  .ladder-wrap { height: 205px; width: 74px; }
  .btn-answer { font-size: 18px; padding: 12px 16px; }
  .trial-row { grid-template-columns: 1fr 1fr; }
  .trial-when { text-align: left; }
  .stage-mid { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ================= Hangpróba / Voice Check ================= */
.vc { position: relative; padding-top: 4px; }
.vc-head { display: flex; align-items: center; gap: 18px; max-width: 1100px; margin: 0 auto 4px; position: relative; z-index: 1; }
.vc-title { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-head); font-weight: 900; font-size: clamp(23px, 3vw, 33px); color: var(--primary-dark); }
.vc-title-ico { width: 34px; height: auto; object-fit: contain; }
.vc-head-spacer { flex: 1; }

.vc-card {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 30px; align-items: center;
  max-width: 1100px; margin: 6px auto 0;
  background: linear-gradient(180deg, #fffdf8, #fdf7ef);
  border: 1.5px solid rgba(180, 160, 225, 0.32);
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(150, 120, 185, 0.18);
  padding: 30px 38px;
}
.vc-left { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vc-mascot {
  width: clamp(190px, 22vw, 280px); height: auto; object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(120, 90, 150, 0.22));
  animation: vcMascotIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes vcMascotIn { 0% { transform: scale(0.82) translateY(10px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.vc-bubble-slot { min-height: 8px; display: flex; justify-content: center; }
.vc-bubble-img { width: clamp(165px, 20vw, 235px); height: auto; object-fit: contain; margin-top: -4px; animation: vcMascotIn 0.55s ease both 0.1s; }
.vc-bubble {
  position: relative; background: #fff; border: 2px solid rgba(180, 160, 225, 0.5);
  border-radius: 16px; padding: 10px 16px; margin-top: 6px;
  font-family: var(--font-head); font-weight: 700; color: var(--primary-dark); box-shadow: var(--shadow);
}
.vc-bubble::after { content: ''; position: absolute; top: -9px; left: 34px; border: 8px solid transparent; border-bottom-color: #fff; }

.vc-right { min-width: 0; }
.vc-instr { font-family: var(--font-head); font-weight: 800; font-size: clamp(18px, 2.2vw, 22px); color: var(--ink); margin: 0 0 6px; max-width: 470px; line-height: 1.35; }
.vc-h2 { font-family: var(--font-head); font-weight: 900; font-size: clamp(19px, 2.3vw, 24px); color: var(--primary-dark); margin: 0 0 6px; max-width: 470px; }
.vc-sub { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 4px; max-width: 450px; line-height: 1.42; }

/* lépésjelző */
.vc-stepper { display: flex; align-items: flex-start; max-width: 380px; margin: 18px 0 6px; }
.vc-step { width: 78px; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.vc-step-dot {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 20px;
  background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 2.5px #d9ccf2;
  transition: all 0.2s ease;
}
.vc-step-label { font-size: 13px; color: var(--ink-soft); font-weight: 600; text-align: center; }
.vc-step.active .vc-step-dot { background: linear-gradient(180deg, #8a6ff0, #6f55d3); color: #fff; box-shadow: 0 6px 14px rgba(124, 95, 211, 0.4), 0 0 0 5px rgba(124, 95, 211, 0.14); }
.vc-step.active .vc-step-label { color: var(--ink); font-weight: 800; }
.vc-step.done .vc-step-dot { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(124, 95, 211, 0.3); }
.vc-step.done .vc-step-label { color: var(--ink-soft); }
.vc-step-line { flex: 1; height: 4px; border-radius: 2px; background: #e6ddf6; margin-top: 21px; transition: background 0.25s; }
.vc-step-line.done { background: var(--primary); }

/* akciók / CTA */
.vc-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.vc .btn.vc-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(180deg, #8a6ff0, #6f55d3); border: none; border-radius: 999px;
  padding: 12px 26px; box-shadow: 0 8px 18px rgba(111, 85, 211, 0.38);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s; cursor: pointer;
}
.vc .btn.vc-cta:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(111, 85, 211, 0.45); }
.vc .btn.vc-cta:active { transform: translateY(0) scale(0.97); box-shadow: 0 5px 12px rgba(111, 85, 211, 0.35); }
.vc .btn.vc-cta:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: 0 5px 12px rgba(111, 85, 211, 0.2); }
.vc-cta-paw { width: 26px; height: auto; object-fit: contain; }
.vc-link { background: none; border: none; color: var(--primary); font-family: var(--font-head); font-weight: 700; font-size: 16px; text-decoration: underline; cursor: pointer; padding: 6px; }
.vc-link:hover { color: var(--primary-dark); }
.vc-status { font-family: var(--font-head); font-weight: 700; color: var(--ink); min-height: 24px; margin: 10px 0 2px; }

/* mikrofon vizuál */
.vc-mic-visual { position: relative; width: 172px; height: 172px; margin: 10px auto 2px; display: grid; place-items: center; }
.vc-mic-img { width: 74px; height: auto; position: relative; z-index: 2; animation: vcMicPulse 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(90, 70, 130, 0.25)); }
@keyframes vcMicPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.vc-mic-ring {
  position: absolute; left: 50%; top: 50%; width: 122px; height: 122px; border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(1 + var(--amp, 0) * 0.7));
  background: radial-gradient(circle, rgba(124, 95, 211, 0.16), rgba(124, 95, 211, 0) 70%);
  border: 3px solid rgba(124, 95, 211, 0.35); transition: transform 0.09s ease, border-color 0.3s;
}
.vc-mic-ring2 { width: 152px; height: 152px; border-color: rgba(228, 87, 126, 0.26); background: radial-gradient(circle, rgba(228, 87, 126, 0.1), transparent 70%); }
.vc-mic-visual.is-detected .vc-mic-ring { border-color: rgba(103, 181, 88, 0.65); background: radial-gradient(circle, rgba(103, 181, 88, 0.18), transparent 70%); }
.vc-mic-visual.is-detected .vc-mic-ring2 { border-color: rgba(103, 181, 88, 0.4); }
.vc-mic-visual.is-error .vc-mic-img { animation: none; opacity: 0.6; }
.vc-mic-visual.is-error .vc-mic-ring { border-color: rgba(228, 87, 126, 0.5); border-style: dashed; }

/* hangterjedelem vizuál */
.vc-range-visual { margin: 8px 0 2px; max-width: 470px; }
.vc-range-track { position: relative; height: 26px; border-radius: 999px; background: linear-gradient(90deg, #eaf4ff, #f3ecfb 50%, #ffe9f1); box-shadow: inset 0 2px 5px rgba(90, 70, 130, 0.12); }
.vc-range-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(124, 95, 211, 0.4), rgba(228, 87, 126, 0.4)); transition: left 0.25s, width 0.25s; }
.vc-range-marker { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%); background: #fff; box-shadow: 0 0 0 3px var(--primary); transition: left 0.2s; z-index: 2; }
.vc-range-marker.hi { box-shadow: 0 0 0 3px var(--pink); }
.vc-range-dot { position: absolute; top: 50%; width: 34px; height: auto; transform: translate(-50%, -62%); transition: left 0.12s ease; z-index: 3; filter: drop-shadow(0 3px 4px rgba(90, 70, 130, 0.3)); }
.vc-range-note { text-align: center; font-family: var(--font-head); font-weight: 900; font-size: 24px; color: var(--primary-dark); min-height: 30px; margin-top: 12px; }

/* eredmény */
.vc-result-range { display: flex; align-items: center; gap: 14px; margin: 12px 0; max-width: 460px; }
.vc-rr-note { font-family: var(--font-head); font-weight: 900; font-size: clamp(24px, 4vw, 30px); color: var(--primary-dark); background: #fff; border-radius: 16px; padding: 6px 18px; box-shadow: var(--shadow); }
.vc-rr-line { flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--pink)); position: relative; }
.vc-result-ok { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; color: #5a8f3a; margin: 4px 0 2px; }
.vc-result-ok img { width: 26px; height: auto; }

/* háttérdísz */
.vc-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.vc-d { position: absolute; opacity: 0.5; width: 50px; height: auto; object-fit: contain; animation: vcFloat 6s ease-in-out infinite; }
.vc-d1 { left: 2%; top: 120px; width: 44px; animation-delay: 0s; }
.vc-d2 { right: 4%; top: 84px; width: 66px; animation-delay: 0.8s; }
.vc-d3 { left: 4%; top: 58%; width: 42px; animation-delay: 1.4s; }
.vc-d4 { right: 3%; bottom: 7%; width: 54px; animation-delay: 0.5s; }
.vc-d5 { left: 1%; bottom: 4%; width: 92px; opacity: 0.42; animation-delay: 1.1s; }
.vc-d6 { right: 8%; top: 30%; width: 40px; animation-delay: 1.9s; }
.vc-d7 { right: 11%; bottom: 26%; width: 42px; animation-delay: 0.3s; }
@keyframes vcFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(5deg); } }

/* reszponzív */
@media (max-width: 820px) {
  .vc-card { grid-template-columns: 1fr; gap: 14px; padding: 24px 22px; text-align: center; }
  .vc-instr, .vc-h2, .vc-sub, .vc-range-visual, .vc-result-range { max-width: none; margin-left: auto; margin-right: auto; }
  .vc-stepper { margin-left: auto; margin-right: auto; }
  .vc-actions { justify-content: center; }
  .vc-mic-visual { margin-left: auto; margin-right: auto; }
  .vc-mascot { width: clamp(160px, 46vw, 220px); }
}
@media (max-width: 480px) {
  .vc-card { margin: 6px 10px 0; padding: 18px 16px; border-radius: 22px; }
  .vc-decor { display: none; }
  .vc .btn.vc-cta { font-size: 18px; padding: 11px 22px; }
}

   SzólMi — Hullámvasút v1.2 visual refactor
   Ezt az app.css VÉGÉRE lehet illeszteni.
   ============================================================ */

.coaster-screen {
  --coaster-purple: #6848bf;
  --coaster-purple-dark: #4a358e;
  --coaster-yellow: #ffd85a;
  --coaster-green: #72c67b;
  --coaster-cream: rgba(255, 253, 244, 0.94);
}

.coaster-head { gap: 10px; }
.coaster-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}
.coaster-title-wrap h1 { margin: 0; }
.coaster-title-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(77, 52, 128, 0.16));
}
.coaster-scorebar .scorechip {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(7px);
}

.coaster-card {
  padding: 16px;
  border-top: 0 !important;
  overflow: visible;
  background: rgba(255, 253, 244, 0.97);
}

.coaster-track-picker {
  margin: 0 0 12px;
  gap: 8px;
}
.coaster-course-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 15px;
  border-width: 2px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(91,74,158,0.28), 0 5px 14px rgba(83,65,121,0.08);
}
.coaster-course-btn.active {
  background: linear-gradient(180deg, #8d70e2, #6b4fc0);
  color: #fff;
  border-color: rgba(74,58,133,0.75);
}

.coaster-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 330px;
  overflow: hidden;
  border: 3px solid rgba(91, 74, 158, 0.45);
  border-radius: 28px 24px 30px 22px / 24px 30px 22px 28px;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,253,244,0.06)),
    url('../assets/game/coaster/rollercoaster_bg.png');
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), 0 10px 25px rgba(88,61,122,0.14);
  isolation: isolate;
}
.coaster-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(246,252,255,0.04) 45%, rgba(49,40,97,0.10));
}

#coasterCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.coaster-cart {
  position: absolute;
  z-index: 5;
  width: clamp(104px, 13.5vw, 158px);
  height: auto;
  transform: translate(-50%, -86%);
  transform-origin: 50% 92%;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 7px rgba(54,42,90,0.22));
  transition: filter 0.2s ease;
  will-change: left, top, transform;
}
.coaster-cart-hop { animation: coasterCartHop 0.5s cubic-bezier(.34,1.56,.64,1); }
@keyframes coasterCartHop {
  0%,100% { transform: translate(-50%, -86%) rotate(0deg) scale(1); }
  45% { transform: translate(-50%, -100%) rotate(-4deg) scale(1.08); }
}
.coaster-cart-finish { animation: coasterCartFinish 1.2s cubic-bezier(.34,1.56,.64,1); }
@keyframes coasterCartFinish {
  0%,100% { transform: translate(-50%, -86%) scale(1); }
  35% { transform: translate(-50%, -98%) rotate(-6deg) scale(1.15); }
  65% { transform: translate(-50%, -92%) rotate(4deg) scale(1.08); }
}

.coaster-stage-topbar {
  position: absolute;
  z-index: 7;
  left: 14px;
  right: 14px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.coaster-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid rgba(92,72,148,0.28);
  border-radius: 999px;
  background: rgba(255,253,244,0.88);
  backdrop-filter: blur(7px);
  padding: 6px 12px;
  color: var(--coaster-purple-dark);
  font: 800 14px var(--font-body);
  box-shadow: 0 4px 12px rgba(72,52,103,0.10);
}

.coaster-target-card {
  position: absolute;
  z-index: 8;
  right: 18px;
  bottom: 16px;
  width: min(240px, 34%);
  min-width: 175px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'label feedback'
    'note feedback'
    'hold hold';
  column-gap: 10px;
  align-items: center;
  text-align: left;
  background: rgba(255,253,244,0.92);
  border: 2.5px solid rgba(91,74,158,0.40);
  border-radius: 22px 18px 24px 20px / 18px 24px 20px 22px;
  padding: 10px 12px 11px;
  box-shadow: 0 10px 24px rgba(61,43,96,0.16);
  backdrop-filter: blur(8px);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.coaster-target-card.is-locking {
  transform: scale(1.02);
  border-color: rgba(232,162,61,0.72);
  box-shadow: 0 10px 26px rgba(61,43,96,0.18), 0 0 0 4px rgba(255,216,90,0.20);
}
.coaster-target-card.is-ready {
  border-color: rgba(88,174,98,0.72);
  box-shadow: 0 10px 26px rgba(61,43,96,0.18), 0 0 0 5px rgba(114,198,123,0.22);
}
.coaster-target-label {
  grid-area: label;
  color: #7c70a3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}
.coaster-target-note {
  grid-area: note;
  color: var(--coaster-purple-dark);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  margin-top: 2px;
}
.coaster-pitch-feedback {
  grid-area: feedback;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eee8f8;
  border: 2px solid rgba(91,74,158,0.24);
  color: #8a7bb5;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.coaster-pitch-feedback.is-high,
.coaster-pitch-feedback.is-low {
  background: #fff0d8;
  color: #cf7c23;
  transform: scale(1.05);
}
.coaster-pitch-feedback.is-good {
  background: #e8f7e8;
  color: #4d9f59;
  transform: scale(1.08);
}
.coaster-pitch-feedback.is-listen {
  background: #eee8ff;
  color: #7053c2;
}
.coaster-hold-track {
  grid-area: hold;
  height: 9px;
  margin-top: 8px;
  background: #ebe4f2;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(61,43,96,0.09);
}
.coaster-hold-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f1b747, #ffd85a 55%, #72c67b);
  transition: width .07s linear;
}

.coaster-bottom-row {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}
.coaster-coach {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.coaster-coach #gameCat {
  width: 105px;
  height: 105px;
  flex: 0 0 105px;
}
.coaster-coach .speech-bubble {
  margin: 0;
  max-width: 320px;
  text-align: left;
}
.coaster-controls { min-width: 0; }
.coaster-main-actions {
  justify-content: flex-end;
  margin-top: 0;
}
.coaster-octave-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.coaster-octave-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}
.coaster-octave-row .octave-btn {
  padding: 5px 10px;
  font-size: 13px;
  box-shadow: 0 2px 0 rgba(91,74,158,0.25);
}

.coaster-result {
  position: relative;
  min-height: 140px;
  margin: 14px 0 0;
  padding: 18px 170px 14px 18px;
  overflow: hidden;
  background: linear-gradient(110deg, #fff8df, #f5efff);
  border: 2.5px solid rgba(232,162,61,0.48);
  border-radius: 22px;
}
.coaster-result h2 { margin-top: 0; }
.coaster-result .stars-big { font-size: 34px; }
.coaster-result p { margin-bottom: 0; }
.coaster-finish-mia {
  position: absolute;
  right: 4px;
  bottom: -28px;
  width: 170px;
  height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 7px 7px rgba(74,58,133,0.16));
}

@media (max-width: 820px) {
  .coaster-stage { aspect-ratio: 4 / 3; min-height: 380px; }
  .coaster-target-card { width: 210px; right: 10px; bottom: 10px; }
  .coaster-bottom-row { grid-template-columns: 1fr; }
  .coaster-main-actions, .coaster-octave-row { justify-content: center; }
  .coaster-coach { justify-content: center; }
}

@media (max-width: 560px) {
  .coaster-card { padding: 10px; }
  .coaster-title-icon { width: 42px; height: 42px; }
  .coaster-title-wrap { min-width: 210px; }
  .coaster-stage { min-height: 355px; border-radius: 22px; }
  .coaster-cart { width: 92px; }
  .coaster-stage-topbar { left: 8px; right: 8px; top: 8px; }
  .coaster-mini-pill { font-size: 11px; padding: 5px 8px; }
  .coaster-target-card {
    left: 9px;
    right: 9px;
    bottom: 9px;
    width: auto;
    min-width: 0;
  }
  .coaster-track-picker {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .coaster-course-btn { flex: 0 0 auto; }
  .coaster-coach #gameCat { width: 86px; height: 86px; flex-basis: 86px; }
  .coaster-result { padding-right: 105px; }
  .coaster-finish-mia { width: 115px; height: 115px; bottom: -12px; }
}

/* ============================================================
   SZOLMI DESIGN SYSTEM v1 — egységes alapréteg (globális)
   UI primary = LILA (márka). Korall/teal/arany = akcentus + jutalom/állapot.
   Illusztráció (Mia, táj) és UI külön réteg. Konkrét tokenek a spec szerint.
   ============================================================ */
:root {
  /* — Lekerekítés — */
  --r-sm: 14px;      /* kis elemek */
  --r-btn: 26px;     /* gombok (24–28) */
  --r-card: 28px;    /* kártyák */
  --r-panel: 36px;   /* nagy játékpanelek */
  --r-badge: 999px;  /* chip / badge */

  /* — Spacing rendszer (8px alap) — */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-6: 48px; --sp-8: 64px;

  /* — Felületek / háttér — */
  --surface: #fffdf8;
  --surface-2: #fdf7ef;
  --sky: #ddf4ff;

  /* — Akcentus + állapot (funkcióhoz kötve) — */
  --coral: #ff8a65;   --coral-soft: #ffe7de;   /* másodlagos CTA-akcentus */
  --teal:  #67c7c5;   --teal-soft:  #e0f4f3;   /* másodlagos info */
  --reward: #ffd65a;                            /* csillag / arany */
  --success: #63c174; --success-soft: #e6f6e8;  /* siker */
  --almost:  #e8a23d; --almost-soft:  #fcefd6;  /* majdnem */
  --retry:   #f28b82; --retry-soft:   #fde7e5;  /* próbáld újra (nincs piros ERROR) */
  --active:  #5a9bd8; --active-soft:  #e4f0fb;  /* aktív / hallgatás */
  --text-slate: #334155;

  /* — Árnyékok (nincs kemény fekete) — */
  --shadow-soft: 0 6px 18px rgba(55, 65, 81, 0.12);
  --shadow-hover: 0 10px 24px rgba(55, 65, 81, 0.16);
  --shadow-btn: 0 6px 16px rgba(111, 85, 211, 0.20);

  /* — Mozgás — */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-hover: 0.2s; --t-press: 0.12s; --t-pop: 0.28s; --t-page: 0.35s;

  /* — Betűk: cím = Baloo 2, törzs = Nunito — */
  --font-head: 'Baloo 2', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --focus-ring: 0 0 0 3px rgba(90, 155, 216, 0.55);
}

/* — Tartalom szélesség / mobil margó — */
main#screen { max-width: 1200px; padding-left: 20px; padding-right: 20px; }

/* — Típusskála (Baloo 2 címek, Nunito törzs) — */
.hero-title, .intro-title { font-family: var(--font-head); font-weight: 700; }
.game-head h1, .vc-title, .brand-name { font-family: var(--font-head); font-weight: 700; }
.card h3, .game-name, .vc-h2 { font-size: 22px; line-height: 28px; }

/* — Kártyák: lágy, egységes lekerekítés (nincs zsírkréta-hullám) — */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1.5px solid rgba(51, 65, 81, 0.10);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}
.card:nth-child(even) { border-radius: var(--r-card); }

/* — Gombok: puha, ruganyos, egységes; min. 44px érintés — */
.btn {
  border-radius: var(--r-btn);
  border: 1.5px solid rgba(51, 65, 81, 0.10);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-body);
  font-weight: 700; font-size: 18px; line-height: 22px;
  min-height: 44px; padding: 10px 24px;
  transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
.btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-hover); }
.btn:active:not(:disabled) { transform: scale(0.96); box-shadow: var(--shadow-soft); transition-duration: var(--t-press); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary {
  background: linear-gradient(180deg, #8a6ff0, #6b4fc0);
  border-color: rgba(107, 79, 192, 0.45);
  box-shadow: var(--shadow-btn);
  color: #fff; text-shadow: none;
  min-height: 56px; padding: 15px 30px;
}
.btn-primary.big { min-height: 56px; font-size: 20px; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-soft); min-height: 44px; }
.btn-nav { min-height: 40px; padding: 8px 16px; border-color: rgba(51, 65, 81, 0.08); }
/* korall másodlagos CTA-akcentus (nem a primary) */
.btn-accent { background: linear-gradient(180deg, #ff9d7d, #ff7a52); border-color: rgba(224, 110, 70, 0.4); color: #fff; box-shadow: 0 6px 16px rgba(255, 122, 82, 0.28); }

/* — Fókusz ring mindenre — */
.btn, a, [tabindex] { }
:focus-visible { outline: none; }
button:focus-visible, a:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-btn); }

/* — Egységes mikrofon-állapot jelző (17. pont) — */
.mic-indicator { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; padding: 6px 14px; border-radius: var(--r-badge); font-size: 15px; }
.mic-indicator::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #b8afce; }
.mic-indicator.is-idle { background: #efeaf7; color: var(--ink-soft); }
.mic-indicator.is-listening { background: var(--active-soft); color: #3f7bb0; }
.mic-indicator.is-listening::before { background: var(--active); animation: micDotPulse 1.1s ease-in-out infinite; }
.mic-indicator.is-detected { background: var(--success-soft); color: var(--success); }
.mic-indicator.is-detected::before { background: var(--success); }
@keyframes micDotPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.55; } }

/* — Saját ikon-alaposztály: egységes fény, lágy árnyék — */
.sg-ico { display: inline-block; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 2px 3px rgba(90, 70, 130, 0.18)); }
.sg-ico-24 { width: 24px; height: 24px; }
.sg-ico-40 { width: 40px; height: 40px; }
.sg-ico-64 { width: 64px; height: 64px; }

/* ============================================================
   Kezdő-hub (home) + Felfedezés (explore) + saját ikonos háttérdísz
   ============================================================ */
/* háttérdísz: saját ikonok emoji helyett */
.bg-note { width: 34px; height: auto; opacity: 0.30; }
.bg-note.n3 { width: 30px; }
.bg-note.n5 { width: 28px; }
.bg-note.n6 { width: 30px; }

/* jutalom-ikonok (saját kép) */
.reward-ico-img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 2px; }

/* — HUB — */
.home-hub { position: relative; max-width: 760px; margin: 0 auto; padding-top: 6px; }
.hub-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hub-d { position: absolute; width: 46px; height: auto; opacity: 0.45; animation: hubFloat 6s ease-in-out infinite; }
.hd1 { left: -2%; top: 40px; width: 56px; }
.hd2 { right: 2%; top: 20px; animation-delay: 0.8s; }
.hd3 { right: 8%; bottom: 12%; animation-delay: 1.4s; }
.hd4 { left: 0%; bottom: 6%; width: 84px; opacity: 0.4; animation-delay: 0.5s; }
@keyframes hubFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-13px) rotate(5deg); } }

.hub-hero { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 22px; margin: 10px 0 26px; flex-wrap: wrap; }
.hub-cat { flex: 0 0 auto; cursor: pointer; }
.hub-hello { text-align: left; }
.hub-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; color: var(--primary-dark); margin: 0 0 12px; }

.hub-grid { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; }
.hub-card {
  display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1.5px solid rgba(51, 65, 81, 0.10); border-radius: var(--r-card);
  padding: 20px 24px; box-shadow: var(--shadow-soft); cursor: pointer;
  font-family: var(--font-body);
  transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
.hub-card:hover { transform: translateY(-3px) scale(1.01); box-shadow: var(--shadow-hover); }
.hub-card:active { transform: scale(0.98); transition-duration: var(--t-press); }
.hub-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.hub-card-ico { width: 64px; height: 64px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 3px 4px rgba(90, 70, 130, 0.2)); }
.hub-card-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.hub-card-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 28px; color: var(--ink); }
.hub-card-sub { font-size: 15px; color: var(--ink-soft); }
.hub-card-go { font-size: 32px; color: var(--primary); font-weight: 800; flex: 0 0 auto; }

.hub-card.featured {
  background: linear-gradient(180deg, #efe8ff, #e6dbff);
  border-color: rgba(124, 95, 211, 0.32);
  box-shadow: 0 14px 30px rgba(124, 95, 211, 0.22);
  padding: 26px 28px;
}
.hub-card.featured .hub-card-ico { width: 80px; height: 80px; }
.hub-card.featured .hub-card-name { color: var(--primary-dark); font-size: clamp(23px, 3vw, 27px); }

.hub-grid-row { display: flex; gap: 16px; }
.hub-grid-row .hub-card { flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; }
.hub-grid-row .hub-card-body { flex: 0 1 auto; }

@media (max-width: 620px) {
  .hub-hero { flex-direction: column; gap: 6px; }
  .hub-hello { text-align: center; }
  .hub-grid-row { flex-direction: column; }
}

/* — EXPLORE (Felfedezés) — */
.explore-head { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.explore-titles h1 { font-family: var(--font-head); font-weight: 700; margin: 0; color: var(--primary-dark); font-size: clamp(26px, 3.4vw, 34px); }
.explore-sub { color: var(--ink-soft); margin: 2px 0 0; font-size: 15px; }

/* ============================================================
   Sárkányrepülő (glider) + Horgászás (fishing) — közös coaster-osztályokat újrahasznosít
   ============================================================ */
.gl-title-wrap, .coaster-title-wrap { display: inline-flex; align-items: center; gap: 10px; }
.gl-title-ico { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(90,70,130,.25)); }
.gl-title-wrap h1 { margin: 0; font-family: var(--font-head); font-weight: 700; color: var(--primary-dark); }

.glider-card, .fishing-card { padding-top: 16px; }
.gl-stage, .fish-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 7; min-height: 300px; overflow: hidden;
  border: 1.5px solid rgba(51,65,81,0.10); border-radius: var(--r-panel);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5), var(--shadow-soft); isolation: isolate; margin-bottom: 14px;
}
#glCanvas, #fishCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* glider jármű: Mia + vitorla */
.gl-craft { position: absolute; z-index: 4; transform: translate(-50%, -50%); transition: top 0.08s linear; pointer-events: none; will-change: left, top; }
.gl-mia { width: clamp(56px, 8vw, 78px); height: auto; display: block; filter: drop-shadow(0 6px 6px rgba(54,42,90,0.25)); }
.gl-sail { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); width: 92px; height: 30px;
  background: linear-gradient(180deg, #a68bf0 0%, #8a6ff0 60%, #6b4fc0 100%);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%); border-radius: 10px 10px 6px 6px;
  box-shadow: 0 3px 6px rgba(90,70,130,0.25); }

/* haladás sáv + mikrofon-jelző a színpadon */
.gl-progress { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.55); z-index: 5; overflow: hidden; }
.gl-progress-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--reward)); transition: width 0.12s linear; }
.gl-mic, .fish-mic { position: absolute; left: 14px; top: 12px; z-index: 5; }

/* horgászás: Mia + hal */
.fish-mia { position: absolute; z-index: 4; width: clamp(90px, 13vw, 128px); height: auto; transform: translate(-50%, -70%); filter: drop-shadow(0 8px 7px rgba(54,42,90,0.22)); pointer-events: none; }
.fish-fish { position: absolute; z-index: 3; width: clamp(42px, 6vw, 58px); height: auto; transform: translate(-50%, -50%); transition: left 0.14s, top 0.14s, opacity 0.2s; filter: drop-shadow(0 4px 5px rgba(30,60,80,0.3)); pointer-events: none; }
.fish-fish.fish-slip { animation: fishSlip 0.5s ease; }
@keyframes fishSlip { 0% { transform: translate(-50%,-50%) scale(1); } 40% { transform: translate(-50%,10%) scale(0.9) rotate(20deg); } 100% { transform: translate(-50%,-50%) scale(1); } }
.fish-fish.fish-caught { animation: fishCaught 0.9s cubic-bezier(0.34,1.56,0.64,1) forwards; }
@keyframes fishCaught { 0% { transform: translate(-50%,-50%) scale(1); } 100% { transform: translate(-380%,-320%) scale(0.7) rotate(-25deg); } }
.fish-reward-img { width: 60px; height: auto; margin: 4px 0; }

/* horgászás célkártya (coaster-stílus) */
.fish-target { position: absolute; right: 14px; bottom: 30px; z-index: 5; width: min(230px, 40%);
  background: rgba(255,253,244,0.94); border: 1.5px solid rgba(51,65,81,0.10); border-radius: 20px;
  padding: 12px 16px; box-shadow: var(--shadow-soft); text-align: center; }
.fish-target-label { display: block; font-size: 14px; color: var(--ink-soft); font-weight: 700; min-height: 18px; }
.fish-target-note { display: block; font-family: var(--font-head); font-weight: 800; font-size: 30px; color: var(--primary-dark); line-height: 1.1; }

@media (max-width: 620px) {
  .fish-target { width: 46%; right: 8px; }
  .gl-mic, .fish-mic { font-size: 13px; padding: 4px 10px; }
}

/* ============================================================
   Saját ikonok a korábbi rendszer-emojik helyén (P1/5)
   ============================================================ */
/* játékcím-ikon a fejlécben */
.game-head h1 { display: inline-flex; align-items: center; gap: 10px; }
.head-ico { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(90,70,130,.25)); }
/* kis ikon chipben / címkében / listában */
.pill-ico { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 6px; flex: 0 0 auto; }
.scorechip, .reward-chip, .stat-label, .coaster-mini-pill { display: inline-flex; align-items: center; gap: 4px; }
.course-ico { width: 26px; height: 26px; object-fit: contain; margin-right: 6px; }
.track-btn { display: inline-flex; align-items: center; }

/* csillagsor saját ikonokból */
.stars-big { display: flex; justify-content: center; gap: 8px; font-size: 0; }
.stars-big .star-img { width: 44px; height: 44px; object-fit: contain; animation: starPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both; filter: drop-shadow(0 3px 4px rgba(90,70,130,.28)); }
.coaster-result .stars-big .star-img, .result-panel .stars-big .star-img { width: 36px; height: 36px; }
@keyframes starPop { from { opacity: 0; transform: scale(0.4) rotate(-25deg); } }

/* létra-jelölő = csillag kép */
.ladder-marker { font-size: 0; }
.ladder-marker img { width: 34px; height: 34px; object-fit: contain; display: block; }
.ladder-hint { font-size: 20px; }

/* HoldRing ikon */
.hold-ring .ring-icon { pointer-events: none; }

/* mikrofon-kapu ikon */
.mic-gate-icon { font-size: 0; animation: bgFloat 3s ease-in-out infinite; }
.mic-gate-icon img { width: 62px; height: auto; object-fit: contain; }

/* konfetti + dekor most képek */
.confetti { width: 24px; height: auto; object-fit: contain; }
.decor { width: 26px; height: auto; object-fit: contain; opacity: 0.3; }

/* achievement toast ikonnal */
.ach-toast { display: flex; align-items: center; gap: 12px; }
.ach-toast-ico { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }

/* oktáv-gombok: min. 44px érintés, egységes */
.octave-btn { min-width: 44px; }

@media (max-width: 620px) {
  .head-ico { width: 32px; height: 32px; }
  .stars-big .star-img { width: 34px; height: 34px; }
}

/* játékbeli mikrofon-jelző elhelyezése */
.game-mic { position: absolute; left: 12px; top: 10px; z-index: 6; }
.game-mic-inline { align-self: center; margin: 4px auto; }
.balloon-sky { position: relative; }

/* --- nyitólap csempék: új témák + lapos (nem Mia-illusztrációs) ikonok --- */
.theme-teal { --theme: #4aa8a0; }
.theme-gold { --theme: #e8a23d; }
.game-card.is-flat .game-icon { width: 64px; height: 64px; display: grid; place-items: center; }
.game-card.is-flat .game-icon img { width: 52px; height: 52px; }

/* ============================================================
   Fejléc-elkülönítés + „teljes képernyős lényeg" (auto-görgetés)
   ============================================================ */
/* A fejléc saját, kissé világosabb felületen ül, finom elválasztó vonallal. */
.app-header {
  background: linear-gradient(180deg, #fffdf8 0%, #fdf8ee 100%);
  border-bottom: 1.5px solid rgba(51, 65, 81, 0.09);
  box-shadow: 0 3px 12px rgba(55, 65, 81, 0.06);
  padding: 12px 26px 12px;
  margin-bottom: 6px;
}

/* Játék/aloldal: a tartalom kitölti a képernyőt, így a fejléc kigördülhet. */
body.immersive main#screen { min-height: calc(100vh - 6px); }
/* a görgetés ne vágja le a tartalom tetejét */
body.immersive main#screen > * { scroll-margin-top: 0; }

/* mikrofon-jelző saját ikonnal */
.mic-indicator { gap: 7px; }
.mic-indicator::before { display: none; }
.mic-ind-ico { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.mic-indicator.is-listening .mic-ind-ico { animation: micIcoPulse 1.2s ease-in-out infinite; }
@keyframes micIcoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }

/* háttérdísz: halvány fekete-fehér ikonok */
.bg-note { width: 40px; opacity: 0.16; }
.bg-note.n3, .bg-note.n5 { width: 44px; }

/* lufi szólmizációs felirata (a rajzon nincs rásütve szöveg) */
.balloon { position: relative; }
.balloon-label {
  /* a rajzolt lufi csomója kissé balra van, ezért a szó 5 px-el jobbra tolva ül középen */
  position: absolute; left: 50%; top: 44%;
  transform: translate(calc(-50% + 5px), -50%);
  font-family: var(--font-head); font-weight: 800; font-size: 21px;
  color: #fff; pointer-events: none; z-index: 2;
  text-shadow: 0 2px 3px rgba(40,30,70,0.45), 0 0 2px rgba(40,30,70,0.5);
  transition: opacity 0.15s ease;
}
.balloon.popping .balloon-label, .balloon.popped .balloon-label { opacity: 0; }

/* ============================================================
   LUFIPUKKASZTÁS v3 — a Hullámvasút elrendezésével
   ============================================================ */
.bp-card { padding-top: 16px; }

/* — szint-gombok (kidolgozott, zárolható) — */
.bp-levels { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.bp-level-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 8px; border-radius: var(--r-badge);
  background: #fff; border: 1.5px solid rgba(51, 65, 81, 0.10);
  box-shadow: var(--shadow-soft); cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--ink-soft);
  transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease), background 0.2s;
}
.bp-lvl-badge {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 800; font-size: 16px;
  background: #f1ecfb; color: var(--primary-dark);
}
.bp-lvl-name { white-space: nowrap; }
.bp-level-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.bp-level-btn:active:not(:disabled) { transform: scale(0.97); }
.bp-level-btn.done .bp-lvl-badge { background: var(--success-soft); color: var(--success); }
.bp-level-btn.active {
  background: linear-gradient(180deg, #8a6ff0, #6b4fc0); color: #fff;
  border-color: rgba(107, 79, 192, 0.45);
  box-shadow: 0 7px 16px rgba(111, 85, 211, 0.34);
}
.bp-level-btn.active .bp-lvl-badge { background: rgba(255,255,255,0.9); color: var(--primary-dark); }
.bp-level-btn.locked { opacity: 0.5; cursor: default; box-shadow: none; }
.bp-level-btn.locked .bp-lvl-badge { background: #eee9f4; font-size: 13px; }

/* — nagyobb lufi-mező — */
.bp-stage {
  aspect-ratio: 16 / 7.6; min-height: 400px;
  background: url('../assets/balloons/sky.webp') center 26% / cover no-repeat,
              linear-gradient(180deg, #cfeaf9, #eef6ec);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 62px 18px 18px;
}
.bp-stage .balloon-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; width: 100%;
}
.bp-stage .balloon-img { width: 134px; height: auto; }
.bp-stage .balloon-row.mid { gap: 30px; }
.bp-stage .balloon-row.mid .balloon-img { width: 158px; }
.bp-stage .balloon-row.few { gap: 60px; }
.bp-stage .balloon-row.few .balloon-img { width: 198px; }
/* 2) a szólmizációs szó a lufi TESTÉNEK optikai közepén (a rajz szerint 44%) */
.bp-stage .balloon-label { font-size: 30px; top: 44%; }
.bp-stage .balloon-row.mid .balloon-label { font-size: 34px; }
.bp-stage .balloon-row.few .balloon-label { font-size: 42px; }

/* szint-pirula a színpad tetején */
.bp-lvl-pill { display: inline-flex; align-items: center; gap: 8px; }
.bp-lvl-dots { letter-spacing: 2px; color: var(--reward); font-size: 12px; }

/* — függőleges hangmagasság-mutató a színpad bal szélén — */
.bp-meter { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 5; }
.bp-meter-track {
  position: relative; width: 62px; height: 210px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.40);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(3px);
  box-shadow: inset 0 2px 6px rgba(90, 70, 130, 0.10), 0 3px 10px rgba(55,65,81,0.07);
  overflow: hidden;
}
.bp-zone {
  position: absolute; left: 6px; right: 6px; border-radius: 999px;
  background: rgba(99, 193, 116, 0.26);
  box-shadow: inset 0 0 0 2px rgba(99, 193, 116, 0.5);
  transition: height 0.3s var(--ease), top 0.3s var(--ease);
}
.bp-needle {
  position: absolute; left: 50%; width: 46px; height: 12px; border-radius: 999px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #8a6ff0, #6b4fc0);
  box-shadow: 0 2px 6px rgba(90, 70, 130, 0.4);
  opacity: 0; transition: top 0.08s linear, opacity 0.2s, background 0.2s;
}
.bp-needle.on { opacity: 1; }
.bp-needle.good { background: linear-gradient(180deg, #7ed48d, #4faa5e); box-shadow: 0 0 12px rgba(99, 193, 116, 0.85); }

/* — célkártya a gyűrűvel (hullámvasút-stílus) — */
.bp-target-card {
  display: grid;
  grid-template-columns: auto;
  grid-template-areas: 'feedback' 'hold';
  align-items: center; justify-items: center;
  row-gap: 8px;
  width: auto; min-width: 160px;
  padding: 12px 14px;
  text-align: center;
}
.bp-target-card .coaster-pitch-feedback { grid-area: feedback; width: 54px; height: 54px; font-size: 30px; }
.bp-target-card .coaster-hold-track { grid-area: hold; width: 100%; margin-top: 0; height: 11px; }

@media (max-width: 760px) {
  .bp-stage { min-height: 320px; padding: 50px 10px 12px; }
  .bp-meter { left: 8px; }
  .bp-meter-track { width: 48px; height: 160px; }
  .bp-needle { width: 34px; height: 10px; }
  .bp-stage .balloon-img { width: 96px; }
  .bp-stage .balloon-row.mid .balloon-img { width: 116px; }
  .bp-stage .balloon-row.few .balloon-img { width: 142px; }
  .bp-stage .balloon-label { font-size: 22px; }
  .bp-stage .balloon-row.mid .balloon-label { font-size: 25px; }
  .bp-stage .balloon-row.few .balloon-label { font-size: 31px; }
  .bp-target-card { padding: 9px 10px; min-width: 128px; }
  .bp-target-card .coaster-pitch-feedback { width: 44px; height: 44px; font-size: 25px; }
  .bp-level-btn .bp-lvl-name { display: none; }
  .bp-level-btn { padding: 6px; }
}


/* ============================================================
   Játék végi eredmény-ablak (felugró) — 5 csillag + két gomb
   ============================================================ */
.result-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(60, 48, 92, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.24s var(--ease);
}
.result-overlay.show { opacity: 1; }

.result-modal {
  position: relative;
  width: min(520px, 94vw);
  padding: 30px 34px 26px;
  text-align: center;
  background:
    radial-gradient(300px 180px at 4% 110%, rgba(255, 214, 90, 0.30), transparent 70%),
    radial-gradient(320px 200px at 100% 112%, rgba(155, 130, 225, 0.28), transparent 70%),
    var(--paper-card);
  border: 2px solid rgba(232, 162, 61, 0.45);
  border-radius: var(--r-panel);
  box-shadow: 0 24px 60px rgba(55, 65, 81, 0.30);
}
.rm-title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(27px, 4vw, 34px); color: var(--primary-dark);
  margin: 0 0 12px;
}
.rm-stars { display: flex; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.rs-star {
  width: 46px; height: 46px; object-fit: contain;
  animation: starPop 0.46s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rs-star.on { filter: drop-shadow(0 3px 6px rgba(224, 169, 47, 0.5)); }
.rm-line { margin: 4px 0; color: var(--ink); font-size: 16.5px; }
.rm-line:first-of-type { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--primary-dark); }

.rm-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.rm-repeat {
  width: 60px; height: 60px; min-height: 60px; padding: 0; flex: 0 0 auto;
  border-radius: 50%; background: #fff;
  font-size: 30px; line-height: 1; color: var(--primary);
  display: grid; place-items: center;
}
.rm-repeat:hover:not(:disabled) { color: var(--primary-dark); transform: translateY(-2px) rotate(-25deg) scale(1.04); }
.rm-next { min-height: 60px; font-size: 21px; padding: 0 34px; }
.rm-mia {
  position: absolute; right: -14px; bottom: -10px;
  width: clamp(96px, 22%, 136px); height: auto; pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(54, 42, 90, 0.22));
  animation: rmMia 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.15s;
}
@keyframes rmMia { from { opacity: 0; transform: translateY(24px) scale(0.8); } }

@media (max-width: 520px) {
  .result-modal { padding: 24px 18px 20px; }
  .rs-star { width: 36px; height: 36px; }
  .rm-mia { width: 88px; right: -8px; }
  .rm-next { font-size: 18px; padding: 0 24px; }
}

/* ---------- indulás: csak a mancs, belecsapásra jön Mia + az intró ---------- */
.intro-overlay.intro-await .intro-cat,
.intro-overlay.intro-await .intro-title,
.intro-overlay.intro-await .intro-tagline,
.intro-overlay.intro-await .intro-skip,
.intro-overlay.intro-await .intro-spot,
.intro-overlay.intro-await .intro-curtain { opacity: 0 !important; pointer-events: none; }
.intro-overlay.intro-await .intro-stage,
.intro-overlay.paw-center .intro-stage { position: relative; }
/* a mancs középen marad, amíg a lenyomás-animáció le nem megy */
.intro-overlay.paw-center .intro-enter {
  position: absolute; left: 50%; top: 50%; margin: 0;
}
.intro-overlay.intro-await .intro-enter { animation: pawWait 2.4s ease-in-out infinite; }
.intro-overlay.paw-center .intro-enter-img { width: min(58vw, 300px); }
/* középre igazítva a scale-es „slap" animáció elrontaná a translate-et:
   a lenyomást maguk a képkockák mutatják, itt csak a gyors elhalványulás kell */
.intro-overlay.paw-center .intro-enter.slap {
  animation: none;
  transform: translate(-50%, -50%);
}
.intro-overlay.paw-center .intro-enter.gone {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
  animation: none;
}
@keyframes pawWait {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  50%      { transform: translate(-50%, -50%) scale(1.06) rotate(2deg); }
}
/* a Mia/cím visszaúszása a csapás után */
.intro-overlay .intro-cat,
.intro-overlay .intro-title,
.intro-overlay .intro-tagline,
.intro-overlay .intro-spot { transition: opacity 0.45s var(--ease); }

/* ============================================================
   „Milyen hang ez?" — hallási megkülönböztetés
   ============================================================ */
.sm-stage {
  aspect-ratio: 16 / 7.4; min-height: 380px;
  background: linear-gradient(180deg, #e6f7ea 0%, #f3f9ec 55%, #fdf7ef 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 62px 20px 20px;
}
.sm-choices { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; width: 100%; }
.sm-choices.two { gap: 64px; }

.sm-choice {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(51, 65, 81, 0.10);
  border-radius: var(--r-card);
  padding: 14px 16px 12px; cursor: pointer;
  box-shadow: var(--shadow-soft);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease), border-color 0.2s;
}
.sm-choice:hover { transform: translateY(-4px) scale(1.03); box-shadow: var(--shadow-hover); }
.sm-choice:active { transform: scale(0.97); }
.sm-choice:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sm-img { width: clamp(96px, 15vw, 168px); height: auto; object-fit: contain; display: block; transition: transform 0.25s var(--ease); }
.sm-choices.two .sm-img { width: clamp(120px, 19vw, 210px); }
.sm-label { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink-soft); }

.sm-choice.is-right { border-color: rgba(99, 193, 116, 0.7); background: var(--success-soft); }
.sm-choice.is-right .sm-img { animation: smRight 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sm-choice.is-right .sm-label { color: var(--success); }
@keyframes smRight { 0% { transform: scale(1); } 40% { transform: scale(1.16) rotate(-4deg); } 100% { transform: scale(1); } }

.sm-choice.is-wrong { border-color: rgba(242, 139, 130, 0.7); background: var(--retry-soft); }
.sm-choice.is-wrong .sm-img { animation: smWrong 0.5s ease; }
@keyframes smWrong { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.sm-replay { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 760px) {
  .sm-stage { min-height: 300px; padding: 56px 10px 14px; }
  .sm-choices { gap: 14px; }
  .sm-choices.two { gap: 28px; }
  .sm-label { font-size: 15px; }
}

/* ============================================================
   FÜLELŐ v2 — „magas vagy mély?”
   Nyugodt képernyő: egyszerre EGY kérdés van a gyerek előtt.
   Minden mozgás finom; a hibás válasznak nincs büntető jellege.
   ============================================================ */
.ear2-screen {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-2);
  padding: 6px 16px 28px;
  max-width: 1100px; margin: 0 auto;
}

/* — fejléc — */
.ear2-head {
  width: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: var(--sp-2);
}
.ear2-head .btn-ghost { justify-self: start; white-space: nowrap; }
.ear2-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ear2-title-ico { width: 40px; height: 40px; object-fit: contain; }
.ear2-title-wrap h1 {
  margin: 0; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(26px, 3.6vw, 36px); color: var(--primary-dark);
  min-width: 0;
}
/* halk szintjelző: szám + pöttyök, szöveg nélkül */
.ear2-dots { justify-self: end; display: flex; align-items: center; gap: 6px; }
.ear2-dots .ear2-lvl {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--primary-dark);
  background: rgba(124, 95, 211, 0.12);
  border-radius: var(--r-badge); padding: 2px 10px; margin-right: 4px;
}
.ear2-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(124, 95, 211, 0.2);
  transition: background var(--t-pop) var(--ease), transform var(--t-pop) var(--ease);
}
.ear2-dots i.on { background: var(--primary); transform: scale(1.18); }

/* — instrukció: egyetlen sor, mindig ugyanott — */
.ear2-instruction {
  margin: 0; min-height: 34px;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(19px, 2.6vw, 26px);
  color: var(--text-slate); text-align: center;
  transition: opacity var(--t-pop) var(--ease);
}

/* — fülelő Mia + hanghullám — */
.ear2-stage { display: flex; justify-content: center; width: 100%; }
.ear2-cat { position: relative; display: flex; align-items: center; justify-content: center; }
.ear2-mia {
  width: clamp(150px, 21vh, 230px); height: auto; display: block;
  filter: drop-shadow(0 10px 20px rgba(90, 70, 150, 0.16));
}
.ear2-wave {
  position: absolute; top: 46%; transform: translateY(-50%);
  width: clamp(52px, 7vw, 88px); height: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.ear2-wave.right { left: 100%; margin-left: -6px; }
.ear2-wave.left  { right: 100%; margin-right: -6px; transform: translateY(-50%) scaleX(-1); }
.ear2-cat.sounding .ear2-wave { opacity: 0.92; animation: ear2Wave 1.1s var(--ease) infinite; }
.ear2-cat.sounding .ear2-wave.left { animation-name: ear2WaveL; }
@keyframes ear2Wave {
  0%, 100% { transform: translateY(-50%) scale(0.9); opacity: 0.55; }
  50%      { transform: translateY(-50%) scale(1.06); opacity: 0.95; }
}
@keyframes ear2WaveL {
  0%, 100% { transform: translateY(-50%) scaleX(-1) scale(0.9); opacity: 0.55; }
  50%      { transform: translateY(-50%) scaleX(-1) scale(1.06); opacity: 0.95; }
}

/* — a két egyenrangú választókártya — */
.ear2-choices {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.4vw, 28px);
  width: 100%; max-width: 640px;
}
.ear2-card {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 2px solid rgba(124, 95, 211, 0.16);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: clamp(12px, 2vw, 22px);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease),
              border-color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.ear2-card:disabled { cursor: default; opacity: 0.62; }
.ear2-choices.ready .ear2-card:not(:disabled):hover { transform: scale(1.025); box-shadow: var(--shadow-hover); }
.ear2-choices.ready .ear2-card:not(:disabled):active { transform: translateY(3px) scale(0.985); transition-duration: 0.13s; }
.ear2-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* a hangszerkép mérete szándékosan különbözik: a bőgő nagyobb testű */
.ear2-instr-img {
  width: auto; height: clamp(168px, 30vh, 280px);
  object-fit: contain; display: block;
  filter: drop-shadow(0 8px 16px rgba(90, 70, 150, 0.14));
  transition: transform 0.3s var(--ease);
}

/* pipa — csak találatkor */
.ear2-tick {
  position: absolute; top: 12px; right: 14px;
  width: 46px; height: 46px; object-fit: contain;
  opacity: 0; transform: scale(0.4) rotate(-14deg);
  transition: opacity 0.2s var(--ease), transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

/* helyes válasz: 5 px emelkedés, lágy glow, kis bounce */
.ear2-card.is-right {
  transform: translateY(-5px);
  border-color: rgba(99, 193, 116, 0.55);
  background: linear-gradient(180deg, #f4fbf4, var(--success-soft));
  box-shadow: 0 12px 26px rgba(99, 193, 116, 0.28), 0 0 0 6px rgba(99, 193, 116, 0.12);
}
.ear2-card.is-right .ear2-instr-img { animation: ear2Bounce 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ear2-card.is-right .ear2-tick { opacity: 1; transform: scale(1) rotate(0deg); }
@keyframes ear2Bounce {
  0% { transform: scale(1); } 45% { transform: scale(1.07) translateY(-4px); } 100% { transform: scale(1); }
}

/* hibás válasz: nagyon finom oldalmozgás, se piros X, se büntetőhang */
.ear2-card.is-wrong { animation: ear2Nudge 0.6s var(--ease); }
@keyframes ear2Nudge {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-9px); }
  55% { transform: translateX(7px); }
  80% { transform: translateX(-3px); }
}

/* demonstráció: a helyes kártya finoman megemelkedik / pulzál */
.ear2-card.is-hint {
  border-color: rgba(124, 95, 211, 0.5);
  box-shadow: 0 12px 26px rgba(124, 95, 211, 0.22), 0 0 0 6px rgba(124, 95, 211, 0.10);
  animation: ear2Hint 1.5s var(--ease) infinite;
}
@keyframes ear2Hint {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.012); }
}
/* vezetett szakaszban a másik kártya csak halványul, nem tűnik el */
.ear2-choices.guided .ear2-card:disabled { opacity: 0.5; }

/* nyugodt képernyő: a globális háttérfirkák halkítása */
body:has(.ear2-screen) .bg-decor { opacity: 0.35; }

/* — indítógomb — */
.ear2-footer { display: flex; justify-content: center; min-height: 8px; transition: opacity 0.3s var(--ease); }
.ear2-footer.gone { opacity: 0; pointer-events: none; height: 0; min-height: 0; overflow: hidden; }
.ear2-start { display: inline-flex; align-items: center; gap: 6px; }
.ear2-start .pill-ico { width: 26px; height: 26px; }

@media (max-width: 720px) {
  .ear2-screen { gap: 12px; padding: 4px 12px 24px; }
  /* mobilon két sor: vissza + cím, alatta középen a szintjelző */
  .ear2-head {
    grid-template-columns: auto 1fr; grid-template-rows: auto auto;
    gap: 6px 8px; justify-items: center;
  }
  .ear2-title-wrap { grid-column: 2; }
  .ear2-dots { grid-column: 1 / -1; justify-self: center; }
  .ear2-title-ico { width: 30px; height: 30px; flex: 0 0 auto; }
  .ear2-title-wrap h1 { font-size: clamp(17px, 4.6vw, 24px); line-height: 1.15; white-space: nowrap; }
  /* a hosszú címek (pl. „Hullámvasút expressz”) inkább törjenek, mint lógjanak ki */
  .ear2-title-wrap { min-width: 0; }
  .xp-screen .ear2-title-wrap h1 { white-space: normal; text-wrap: balance; font-size: clamp(15px, 4vw, 22px); }
  .ear2-dots .ear2-lvl { padding: 2px 8px; font-size: 13px; }
  .ear2-dots i { width: 7px; height: 7px; }
  .ear2-mia { width: clamp(130px, 26vw, 180px); }
  .ear2-instr-img { height: clamp(140px, 24vh, 200px); }
  .ear2-card { padding: 10px; }
  .ear2-tick { width: 36px; height: 36px; top: 8px; right: 10px; }
}
/* csak a legkeskenyebb kijelzőn kerülnek egymás alá a kártyák */
@media (max-width: 360px) {
  .ear2-choices { grid-template-columns: 1fr; gap: 12px; }
  .ear2-instr-img { height: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .ear2-card, .ear2-card.is-right .ear2-instr-img, .ear2-card.is-wrong,
  .ear2-card.is-hint, .ear2-cat.sounding .ear2-wave { animation: none !important; }
  .ear2-card { transition: none; }
}

/* ============================================================
   APP-FEJLÉC — a szülői nyitólap fejlécének mintájára:
   cica-fej + mellette a szlogen, halvány üveg-háttér, finom vonal.
   Nem sticky: aloldalon továbbra is kigördül a képből, hogy a
   játéktér töltse ki a képernyőt.
   ============================================================ */
.app-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: var(--sp-2);
  max-width: 1200px; margin: 0 auto;
  padding: 12px 20px;
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(10px);
  border-bottom-left-radius: var(--r-card);
  border-bottom-right-radius: var(--r-card);
}
@supports not (backdrop-filter: blur(4px)) { .app-header { background: rgba(255, 253, 248, 0.97); } }
.app-header::after {
  content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 95, 211, 0.22), transparent);
}
.brand-block { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo-img {
  height: 84px; width: auto; display: block;
  filter: none;
  transition: transform var(--t-hover) var(--ease);
}
.brand-logo-btn:hover .brand-logo-img { transform: scale(1.05) rotate(-2deg); }
.brand-logo-btn:active .brand-logo-img { transform: scale(0.96); }
.brand-tagline {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(19px, 2.4vw, 26px);
  color: var(--pink); white-space: nowrap;
}
.app-nav { display: flex; align-items: center; gap: var(--sp-1); flex: 0 0 auto; }
.app-nav .btn-nav { min-height: 40px; padding: 8px 16px; font-size: 17px; }

@media (max-width: 720px) {
  .app-header { padding: 10px 14px; }
  .brand-block { gap: 10px; }
  .brand-logo-img { height: 60px; }
  .brand-tagline { font-size: 17px; }
  .app-nav .btn-nav { padding: 7px 12px; font-size: 15px; }
}
@media (max-width: 430px) {
  .brand-tagline { display: none; }   /* keskeny kijelzőn csak a cica fér el */
  .brand-logo-img { height: 54px; }
}

/* ============================================================
   DALLAMFELISMERŐ — „melyik sorrend volt?”
   A fejlécet, az instrukciót és Miát a Fülelővel közösen használja
   (.ear2-* osztályok); itt csak a képsoros választókártyák jönnek.
   A magasságot MÉRET és MAGASSÁG jelöli: az egér fele akkora,
   mint a medve, és feljebb is áll.
   ============================================================ */
.mel-title-ico { width: 44px; height: 44px; }
.mel-stage { flex-direction: column; align-items: center; gap: 10px; }

.mel-replay {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 18px; font-size: 16px;
}
.mel-replay .pill-ico { width: 20px; height: 20px; }
.mel-replay:disabled { opacity: 0.4; }

.mel-choices {
  display: grid; gap: clamp(12px, 2vw, 20px);
  width: 100%; max-width: 760px;
  grid-template-columns: 1fr 1fr;
  /* az alakok mérete a dallamhosszhoz és a választékhoz igazodik,
     hogy a képsor MINDIG kiférjen a kártyán */
  --mel-bear: clamp(96px, 17vh, 150px);
}
.mel-choices[data-n="3"] { grid-template-columns: 1fr 1fr 1fr; max-width: 960px; }
.mel-choices[data-n="3"][data-len="2"] { --mel-bear: clamp(88px, 15vh, 140px); }
.mel-choices[data-n="2"][data-len="3"] { --mel-bear: clamp(78px, 13vh, 126px); }
.mel-choices[data-n="3"][data-len="3"] { --mel-bear: clamp(64px, 11vh, 102px); }
/* négyhangos dallamnál a kártyák egymás alá kerülnek, teljes szélességben */
.mel-choices[data-len="4"] { grid-template-columns: 1fr; max-width: 720px; --mel-bear: clamp(84px, 15vh, 136px); }

.mel-card {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 2px solid rgba(124, 95, 211, 0.16);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: 14px 20px 12px;
  cursor: pointer;
  animation: melCardIn 0.35s var(--ease) both;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease),
              border-color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}
@keyframes melCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mel-card:disabled { cursor: default; opacity: 0.62; }
.mel-choices.ready .mel-card:not(:disabled):hover { transform: scale(1.025); box-shadow: var(--shadow-hover); }
.mel-choices.ready .mel-card:not(:disabled):active { transform: translateY(3px) scale(0.985); transition-duration: 0.13s; }
.mel-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mel-choices.guided .mel-card:disabled { opacity: 0.5; }

/* a képsor: közös alapvonal, az egér magasabban „lebeg” */
.mel-row {
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(6px, 1.2vw, 14px);
  height: calc(var(--mel-bear) * 1.28);   /* fejtér az egérnek, ami feljebb áll */
  width: 100%;
}
.mel-fig { display: block; line-height: 0; transition: transform 0.2s var(--ease), filter 0.2s var(--ease); }
.mel-fig img { width: auto; display: block; filter: drop-shadow(0 6px 12px rgba(90, 70, 150, 0.16)); }
/* a medve a teljes magasság, az egér PONTOSAN a fele — és feljebb áll */
.mel-fig.bear  img { height: var(--mel-bear); }
.mel-fig.mouse img { height: calc(var(--mel-bear) / 2); }
/* az egér nemcsak kisebb, hanem MAGASABBAN is áll — ez a „magas hang" */
.mel-fig.mouse { margin-bottom: calc(var(--mel-bear) * 0.62); }

/* a vezetett körben ütemre világítanak az alakok */
.mel-fig.lit { transform: translateY(-6px) scale(1.08); filter: drop-shadow(0 0 12px rgba(124, 95, 211, 0.55)); }

.mel-card.is-hint {
  border-color: rgba(124, 95, 211, 0.5);
  box-shadow: 0 12px 26px rgba(124, 95, 211, 0.22), 0 0 0 6px rgba(124, 95, 211, 0.10);
  animation: ear2Hint 1.5s var(--ease) infinite;
}
.mel-card.is-right {
  transform: translateY(-5px);
  border-color: rgba(99, 193, 116, 0.55);
  background: linear-gradient(180deg, #f4fbf4, var(--success-soft));
  box-shadow: 0 12px 26px rgba(99, 193, 116, 0.28), 0 0 0 6px rgba(99, 193, 116, 0.12);
}
.mel-card.is-right .mel-row { animation: ear2Bounce 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }
.mel-card.is-right .ear2-tick { opacity: 1; transform: scale(1) rotate(0deg); }
.mel-card.is-wrong { animation: ear2Nudge 0.6s var(--ease); }

@media (max-width: 720px) {
  .mel-title-ico { width: 32px; height: 32px; }
  .mel-choices { gap: 10px; }
  .mel-card { padding: 10px 12px 8px; border-radius: var(--r-card); }
  .mel-row { gap: 4px; }
  .mel-choices { --mel-bear: clamp(76px, 13vh, 116px); }
  .mel-choices[data-n="3"][data-len="2"] { --mel-bear: clamp(58px, 10vh, 92px); }
  .mel-choices[data-n="2"][data-len="3"] { --mel-bear: clamp(58px, 10vh, 92px); }
  .mel-choices[data-n="3"][data-len="3"] { --mel-bear: clamp(46px, 8vh, 72px); }
  .mel-choices[data-len="4"] { --mel-bear: clamp(62px, 11vh, 96px); }
  .mel-replay { min-height: 36px; padding: 6px 14px; font-size: 15px; }
}
/* keskeny kijelzőn minden kártya egymás alá kerül, így nagyok maradhatnak */
@media (max-width: 480px) {
  .mel-choices, .mel-choices[data-n="3"], .mel-choices[data-len="4"] {
    grid-template-columns: 1fr; max-width: 100%; gap: 10px;
  }
  .mel-choices, .mel-choices[data-n="3"][data-len="2"],
  .mel-choices[data-n="2"][data-len="3"], .mel-choices[data-n="3"][data-len="3"] { --mel-bear: 92px; }
  .mel-choices[data-len="4"] { --mel-bear: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .mel-card, .mel-card.is-hint, .mel-card.is-wrong, .mel-card.is-right .mel-row { animation: none !important; }
  .mel-fig { transition: none; }
}

/* ============================================================
   HANGMAGASSÁG BEÁLLÍTÁSA (első indítás) + PROFILVÁLASZTÓ
   ============================================================ */
.setup-screen, .pf-screen {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  padding: 6px 16px 32px; max-width: 900px; margin: 0 auto;
}

.setup-pick[hidden], .setup-manual[hidden] { display: none !important; }
.setup-pick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); width: 100%; max-width: 720px; }
.setup-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 2px solid rgba(124, 95, 211, 0.16);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-3) var(--sp-2);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.2s var(--ease);
}
.setup-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(124, 95, 211, 0.4); }
.setup-card:active { transform: scale(0.985); }
.setup-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.setup-ico { width: 76px; height: 76px; object-fit: contain; }
.setup-card h3 { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 21px; color: var(--primary-dark); }
.setup-card p { margin: 0; font-size: 15.5px; color: var(--ink-soft); line-height: 1.5; }

.setup-manual { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); width: 100%; }
.setup-cat { display: flex; justify-content: center; }

/* az oktáv fokai — a lejátszás közben sorban felvillannak */
.setup-scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.setup-deg {
  min-width: 52px; padding: 8px 10px; border-radius: var(--r-sm);
  background: #fff; border: 2px solid var(--deg);
  color: var(--deg); font-family: var(--font-head); font-weight: 700; font-size: 15px;
  text-align: center;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.setup-deg.lit { background: var(--deg); color: #fff; transform: translateY(-6px) scale(1.08); }

.setup-pitch-row { display: flex; align-items: center; gap: var(--sp-2); }
.setup-step { min-width: 62px; min-height: 52px; font-size: 22px; padding: 8px 16px; }
.setup-note {
  min-width: 112px; text-align: center;
  font-family: var(--font-head); font-weight: 700; font-size: 30px;
  color: var(--primary-dark);
  background: rgba(124, 95, 211, 0.09); border-radius: var(--r-badge); padding: 6px 20px;
}
.setup-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.setup-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.setup-back, .setup-skip { font-size: 16px; }
.setup-skip { margin-top: var(--sp-2); }

/* — profilválasztó — */
.pf-grid {
  display: grid; gap: var(--sp-2);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  width: 100%; max-width: 760px;
}
.pf-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 2px solid rgba(124, 95, 211, 0.16);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-3) var(--sp-2);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.2s var(--ease);
}
.pf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pf-card:active { transform: scale(0.985); }
.pf-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pf-card.active { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(124, 95, 211, 0.12), var(--shadow-soft); }
.pf-ico { width: 84px; height: 84px; object-fit: contain; }
.pf-name { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--primary-dark); }
.pf-stats { display: flex; gap: 12px; font-size: 15px; color: var(--ink-soft); font-weight: 700; }
.pf-stats span { display: inline-flex; align-items: center; gap: 4px; }
.pf-stats img { width: 18px; height: 18px; object-fit: contain; }
.pf-new { border-style: dashed; }
.pf-plus { font-family: var(--font-head); font-weight: 700; font-size: 54px; line-height: 84px; color: rgba(124, 95, 211, 0.5); }
.pf-parents { text-decoration: none; margin-top: var(--sp-2); font-size: 16px; }

/* — a főoldal profil-jelvénye — */
.home-profile {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid rgba(124, 95, 211, 0.22);
  border-radius: var(--r-badge); box-shadow: var(--shadow-soft);
  padding: 5px 14px 5px 6px; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--primary-dark);
  transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
.home-profile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.home-profile img { width: 30px; height: 30px; object-fit: contain; }

@media (max-width: 640px) {
  .setup-pick { grid-template-columns: 1fr; gap: var(--sp-2); }
  .setup-ico { width: 58px; height: 58px; }
  .setup-note { font-size: 24px; min-width: 92px; }
  .setup-step { min-width: 54px; min-height: 48px; }
  .setup-deg { min-width: 42px; font-size: 13px; padding: 6px 8px; }
  .pf-grid { grid-template-columns: 1fr 1fr; }
  .pf-ico { width: 64px; height: 64px; }
  .pf-plus { font-size: 42px; line-height: 64px; }
}

/* ============================================================
   GOMBOLYAG — hangkitartás. A jelenet MAGA a haladásjelző:
   nincs szám, nincs sáv, csak az, hogy gurul-e a gombolyag.
   ============================================================ */
.yarn-screen { max-width: 1040px; }
.yarn-title-ico { width: 42px; height: 42px; }

.yarn-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 230px;
  max-height: 46vh;
  border-radius: var(--r-panel);
  border: 1.5px solid rgba(124, 95, 211, 0.14);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  isolation: isolate;
}
.yarn-sky {
  position: absolute; inset: 0 0 34% 0;
  background: linear-gradient(180deg, #eaf6ff 0%, #f6fbff 100%);
}
.yarn-ground {
  position: absolute; inset: 66% 0 0 0;
  background: linear-gradient(180deg, #d9edc4 0%, #c6e2ad 100%);
}
/* puha, kézzel húzott ösvény a fűben */
.yarn-path {
  position: absolute; left: 4%; right: 4%; top: 71%; height: 15%;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3e6cd, #e6d3b2);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 2px 0 rgba(120, 95, 60, 0.10);
}
.yarn-thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.yarn-cat {
  position: absolute; left: 3%; bottom: 6%;
  width: clamp(96px, 15%, 168px);
  display: flex; align-items: flex-end;
}
.yarn-cat .mia-wrap { width: 100% !important; aspect-ratio: 1 / 1; height: auto !important; }

/* — a gombolyag — */
.yarn-ball {
  position: absolute; left: 0; bottom: 9%;
  width: clamp(52px, 8.5%, 96px);
  will-change: transform;
}
.yarn-ball-img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 5px 8px rgba(90, 70, 150, 0.22));
  will-change: transform;
}
/* nagyon pontos, egyenletes hangnál finom csillogás — semmi harsány */
.yarn-spark {
  position: absolute; width: 42%; height: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.yarn-spark.s1 { left: -34%; top: 4%; }
.yarn-spark.s2 { left: -22%; bottom: -4%; width: 30%; }
.yarn-ball.great .yarn-spark { opacity: 0.9; animation: yarnSpark 1.1s var(--ease) infinite; }
.yarn-ball.great .yarn-spark.s2 { animation-delay: 0.4s; }
@keyframes yarnSpark {
  0%   { transform: scale(0.7) translateX(4px); opacity: 0; }
  40%  { transform: scale(1) translateX(0); opacity: 0.9; }
  100% { transform: scale(0.85) translateX(10px); opacity: 0; }
}

/* — a kutyus — */
.yarn-dog {
  position: absolute; right: 4%; bottom: 6%;
  width: clamp(84px, 13%, 150px);
  transform-origin: 50% 100%;
  animation: dogIdle 4.2s ease-in-out infinite;
}
.yarn-dog img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(90, 70, 150, 0.18)); }
@keyframes dogIdle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-3px) rotate(-1.2deg); }
}
/* ahogy közeledik a gombolyag, a kutyus érdeklődőbb lesz és előrehajol */
.yarn-dog.near { animation: dogNear 1.5s var(--ease) infinite; }
@keyframes dogNear {
  0%, 100% { transform: translateY(0) rotate(-3deg) scale(1.01); }
  50%      { transform: translateY(-5px) rotate(-6deg) scale(1.03); }
}
.yarn-dog.happy { animation: dogHappy 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 3; }
@keyframes dogHappy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%      { transform: translateY(-16px) rotate(-8deg); }
  60%      { transform: translateY(0) rotate(4deg); }
}

.yarn-mic { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); font-size: 14px; }

.yarn-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-1); }
.yarn-controls .btn { display: inline-flex; align-items: center; gap: 6px; }
.yarn-cue { min-height: 44px; padding: 9px 20px; font-size: 16px; }

@media (max-width: 720px) {
  .yarn-title-ico { width: 32px; height: 32px; }
  .yarn-scene { aspect-ratio: 4 / 3; max-height: 42vh; }
  .yarn-cat { width: clamp(80px, 22%, 120px); }
  .yarn-ball { width: clamp(46px, 13%, 76px); }
  .yarn-dog { width: clamp(70px, 20%, 110px); }
  .yarn-mic { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .yarn-dog, .yarn-dog.near, .yarn-dog.happy, .yarn-ball.great .yarn-spark { animation: none !important; }
  .yarn-spark { display: none; }
}

/* ============================================================
   SZINT- ÉS FELADATLÉPTETŐ — minden játék tetején ugyanaz.
   A korábbi hosszú gombsorok helyett két kompakt léptető.
   ============================================================ */
.lvl-stepper {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(8px, 1.6vw, 20px);
  margin: 0 0 14px;
}
.ls-group {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  border: 1.5px solid rgba(124, 95, 211, 0.18);
  border-radius: var(--r-badge);
  box-shadow: var(--shadow-soft);
  padding: 5px 8px 5px 14px;
}
.ls-label {
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  color: var(--ink-soft); margin-right: 2px; white-space: nowrap;
}
.ls-value {
  font-family: var(--font-head); font-weight: 700;
  color: var(--primary-dark); text-align: center;
  padding: 0 4px; white-space: nowrap;
}
.ls-num { font-size: 22px; min-width: 26px; }
.ls-name { font-size: 17px; min-width: 92px; }
.ls-btn {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: #fff; border: 1.5px solid rgba(124, 95, 211, 0.28);
  color: var(--primary-dark);
  font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1;
  transition: transform var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.ls-btn:hover:not(:disabled) { transform: scale(1.1); background: rgba(124, 95, 211, 0.10); }
.ls-btn:active:not(:disabled) { transform: scale(0.94); }
.ls-btn:disabled { opacity: 0.3; cursor: default; }
.ls-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* haladás az aktuális szinten belül */
.ls-dots { display: inline-flex; align-items: center; gap: 5px; }
.ls-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(124, 95, 211, 0.22);
  transition: background var(--t-pop) var(--ease), transform var(--t-pop) var(--ease);
}
.ls-dots i.on { background: var(--primary); transform: scale(1.18); }
/* játék közben nem lehet szintet váltani */
.lvl-stepper.is-frozen { opacity: 0.6; }

@media (max-width: 720px) {
  .lvl-stepper { gap: 8px; margin-bottom: 10px; }
  .ls-group { padding: 4px 6px 4px 10px; gap: 4px; }
  .ls-label { font-size: 13px; }
  .ls-num { font-size: 19px; min-width: 22px; }
  .ls-name { font-size: 15px; min-width: 70px; }
  .ls-btn { width: 30px; height: 30px; font-size: 19px; }
}
@media (max-width: 430px) {
  .ls-task .ls-label { display: none; }
  .ls-name { min-width: 62px; font-size: 14px; }
}

/* ============================================================
   „Milyen hang ez?” — a Fülelő kártyás elrendezése (nincs doboz)
   ============================================================ */
.sm-screen .sm-mia { display: block; }
.sm-screen .sm-mia .mia-wrap {
  width: clamp(130px, 20vh, 200px) !important;
  aspect-ratio: 1 / 1; height: auto !important;
}
.sm-screen .sm-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(14px, 2.4vw, 26px);
  width: 100%; max-width: 820px; margin: 0 auto;
}
.sm-screen .sm-choices.two { grid-template-columns: 1fr 1fr; max-width: 620px; }
.sm-screen .sm-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 2px solid rgba(124, 95, 211, 0.16);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: clamp(12px, 2vw, 20px);
  cursor: pointer;
  animation: melCardIn 0.35s var(--ease) both;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease),
              border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.sm-screen .sm-choice:hover { transform: scale(1.025); box-shadow: var(--shadow-hover); }
.sm-screen .sm-choice:active { transform: translateY(3px) scale(0.985); transition-duration: 0.13s; }
.sm-screen .sm-img { width: clamp(96px, 15vw, 170px); }
.sm-screen .sm-choices.two .sm-img { width: clamp(120px, 19vw, 200px); }
.sm-screen .sm-label { font-size: 19px; color: var(--primary-dark); }
.sm-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.sm-footer .sm-replay { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 20px; }

@media (max-width: 720px) {
  .sm-screen .sm-mia .mia-wrap { width: clamp(110px, 26vw, 160px) !important; }
  .sm-screen .sm-label { font-size: 16px; }
}

/* — homokóra: időre menő mód a „Milyen hang ez?"-ben — */
.sm-hourglass {
  position: relative; justify-self: end;
  width: 54px; height: 54px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #fff; border: 1.5px solid rgba(124, 95, 211, 0.22);
  border-radius: 50%; cursor: pointer; box-shadow: var(--shadow-soft);
  transition: transform var(--t-hover) var(--ease), border-color 0.2s var(--ease);
}
.sm-hourglass img { width: 34px; height: 34px; object-fit: contain; opacity: 0.8; }
.sm-hourglass:hover { transform: scale(1.07); }
.sm-hourglass:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sm-hourglass.is-on { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124, 95, 211, 0.16); }
.sm-hourglass.is-on img { opacity: 1; animation: hgTurn 3s var(--ease) infinite; }
@keyframes hgTurn { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(8deg); } }
.sm-clock {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  border-radius: var(--r-badge); padding: 1px 9px; min-width: 30px; text-align: center;
}
.sm-hourglass.is-low .sm-clock { background: var(--retry); animation: hgPulse 1s ease-in-out infinite; }
@keyframes hgPulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.14); } }

@media (max-width: 720px) {
  .sm-hourglass { width: 44px; height: 44px; }
  .sm-hourglass img { width: 27px; height: 27px; }
  .sm-clock { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-hourglass.is-on img, .sm-hourglass.is-low .sm-clock { animation: none !important; }
}

/* — memória mód: a kártyák lefordulnak, és emlékezetből kell választani — */
.sm-modes { display: inline-flex; align-items: center; gap: 8px; justify-self: end; }

.sm-choice { perspective: 900px; }
.sm-flip {
  position: relative; display: block; width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.42s var(--ease);
}
.sm-choice.flipped .sm-flip { transform: rotateY(180deg); }
.sm-face, .sm-back {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.sm-back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  background: linear-gradient(150deg, #efe6ff, #ded0fb);
  border-radius: var(--r-card);
  box-shadow: inset 0 0 0 3px rgba(124, 95, 211, 0.22);
}
.sm-back img { width: 46%; max-width: 92px; height: auto; opacity: 0.55; }
/* memóriamódban egyforma magasak legyenek a kártyák, hogy ne áruljanak el semmit */
.sm-choices.memory .sm-choice { min-height: clamp(180px, 26vh, 260px); }

@media (prefers-reduced-motion: reduce) {
  .sm-flip { transition: none; }
}

/* ============================================================
   MANCSDALLAM — dallammemória színes cicamancsokkal.
   A mancsok enyhe ívben, a képernyő alsó harmadában.
   ============================================================ */
.pm-screen { max-width: 1100px; }
.pm-stage {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(8px, 2vw, 28px);
  width: 100%;
  /* a mancsok a képernyő alsó harmadában üljenek */
  min-height: clamp(250px, 40vh, 400px);
  padding-bottom: 12px;
}
/* Mia: két rajzolt póz egymásra fektetve, keresztfade-del váltva */
/* Mia a pálya bal szélén áll, a mancssor pedig a színpad TELJES szélességéhez
   igazodva középen — így a sor mindig középen marad, akárhány mancs van. */
.pm-cat {
  position: absolute; left: 0; bottom: 10px; z-index: 2;
  width: clamp(104px, 13vw, 164px);
  aspect-ratio: 362 / 560;
}
.pm-mia {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: bottom center;
  opacity: 0; transform: translateY(2px) scale(0.98);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  filter: drop-shadow(0 8px 14px rgba(90, 70, 150, 0.18));
  pointer-events: none;
}
.pm-mia.is-on { opacity: 1; transform: none; }
/* lejátszás közben finoman ring, mintha fülelne */
.pm-cat.is-listening .pm-mia.is-on { animation: pmSway 2.1s ease-in-out infinite; }
@keyframes pmSway {
  0%, 100% { transform: rotate(-1.6deg) translateY(0); }
  50%      { transform: rotate(1.6deg) translateY(-3px); }
}
.pm-cat.is-happy .pm-mia.is-on { animation: pmHop 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) 2; }
@keyframes pmHop {
  0%, 100% { transform: translateY(0) scale(1); }
  40%      { transform: translateY(-13px) scale(1.04); }
}

/* apró hangjegyek, amik csak fülelés közben szállnak fel Mia mellett */
.pm-note {
  position: absolute; left: 76%; bottom: 58%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand, #7c5fd3);
  opacity: 0;
}
.pm-note::after {
  content: ''; position: absolute; right: -1px; bottom: 4px;
  width: 2px; height: 13px; border-radius: 2px; background: inherit;
}
.pm-cat.is-listening .pm-note { animation: pmNote 2.4s ease-out infinite; }
.pm-cat.is-listening .pm-note.n2 { animation-delay: 0.8s; background: #f2a03d; }
.pm-cat.is-listening .pm-note.n3 { animation-delay: 1.6s; background: #4fc3c7; }
@keyframes pmNote {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.7); }
  18%  { opacity: 0.85; }
  70%  { opacity: 0.5; }
  100% { opacity: 0; transform: translate(20px, -54px) scale(1.05); }
}

.pm-paws {
  display: flex; align-items: flex-end; justify-content: center;
  flex-wrap: wrap;
  gap: clamp(6px, 1.6vw, 22px);
  padding: 34px 0 8px;
  width: 100%;
}
.pm-paw {
  --pop: 1.06; --glow: 1; --lift: 0px; --tilt: 0deg;
  flex: 0 0 auto; line-height: 0; cursor: pointer;
  background: none; border: none; padding: 0;
  border-radius: 26px;
  /* az ív külön translate/rotate tulajdonságon ül, hogy a belépő
     animáció `transform`-ja ne írja felül */
  translate: 0 calc(var(--lift) * -1);
  rotate: var(--tilt);
  animation: pmPawIn 0.35s var(--ease) both;
}
@keyframes pmPawIn {
  from { opacity: 0; transform: translateY(14px) scale(0.9); }
  to   { opacity: 1; transform: none; }
}
.pm-paw img {
  width: clamp(72px, 11vw, 128px); height: auto; display: block;
  filter: drop-shadow(0 5px 9px rgba(90, 70, 150, 0.20));
  transition: transform 0.16s var(--ease), filter 0.2s var(--ease);
}
.pm-paws[data-n="5"] img, .pm-paws[data-n="6"] img { width: clamp(66px, 9vw, 106px); }
.pm-paws[data-n="7"] img { width: clamp(64px, 7.4vw, 92px); }
/* nyolc mancs: nagy képernyőn maradjon egy sorban, ne törjön át a másodikba */
@media (min-width: 821px) {
  .pm-paws[data-n="8"] { flex-wrap: nowrap; gap: clamp(4px, 1vw, 12px); }
  .pm-paws[data-n="8"] img { width: clamp(56px, 6.2vw, 80px); }
}
.pm-paw:disabled { cursor: default; }
.pm-paws.ready .pm-paw:hover img { transform: scale(1.05); }
.pm-paw:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* a dallam lejátszásakor felvillanó mancs — az erőssége szintenként csökken */
.pm-paw.lit img {
  transform: scale(var(--pop)) translateY(-4px);
  filter: drop-shadow(0 0 calc(14px * var(--glow)) rgba(255, 226, 140, calc(0.95 * var(--glow))))
          drop-shadow(0 6px 10px rgba(90, 70, 150, 0.22));
}
/* a gyerek koppintása: rövid lenyomás, semmilyen jó/rossz jelzés nélkül */
.pm-paw.tap img { animation: pmTap 0.26s var(--ease); }
@keyframes pmTap {
  0% { transform: scale(1); }
  35% { transform: scale(0.92) translateY(4px); }
  100% { transform: scale(1); }
}

.pm-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.pm-replay { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 20px; }

@media (max-width: 820px) {
  /* mobilon Mia visszakerül a sorba, a mancsok alá */
  .pm-stage { flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
  /* FONTOS: relative, nem static — a két Mia-kép `inset: 0`-ja
     különben a színpadhoz igazodna, és Mia kitöltené az egész pályát */
  .pm-cat { position: relative; z-index: 0; width: clamp(88px, 22vw, 126px); }
  .pm-paws { padding-top: 22px; }
}
@media (max-width: 520px) {
  /* mobilon minden mancs maradjon kényelmesen megnyomható (min. 64 px) */
  .pm-paws img, .pm-paws[data-n="5"] img, .pm-paws[data-n="6"] img,
  .pm-paws[data-n="7"] img, .pm-paws[data-n="8"] img { width: 68px; }
  .pm-paw { --lift: 0px !important; --tilt: 0deg !important; }
  .pm-paws { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-paw, .pm-paw img, .pm-paw.tap img { animation: none !important; transition: none; }
  .pm-mia, .pm-note { animation: none !important; }
  .pm-note { display: none; }
}

/* ============================================================
   POHÁRTÖRŐ HANG — rezonancia-felfedező játék.
   Semmilyen mérőműszer: a visszajelzés maga a pohár remegése,
   fénye, szikrázása és a rajta kirajzolódó repedések.
   ============================================================ */
.gl2-screen { max-width: 1000px; }
.gl2-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 300px; max-height: 52vh;
  border-radius: var(--r-panel);
  border: 1.5px solid rgba(124, 95, 211, 0.14);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* Daniel festett szobája és az asztal — a fókusz a poháron marad */
.gl2-room {
  position: absolute; inset: 0;
  background: url('../assets/glass/room2.webp') center bottom / cover no-repeat, #efe7fb;
}
.gl2-room::after {          /* enyhe elmosás: a háttér ne vonja el a figyelmet */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(253,245,226,0.22), rgba(253,245,226,0.05));
  pointer-events: none;
}
/* Az új háttérkép már tartalmazza az asztalt is, ezért a külön
   asztal-elem üres marad — a poharak közvetlenül a festett asztallapra
   kerülnek. */
.gl2-tablewrap {
  position: absolute; left: 50%; bottom: 0;
  width: 100%; transform: translateX(-50%);
  height: 100%;
  z-index: 2; pointer-events: none;
}
.gl2-table { display: none; }
.gl2-cat { position: absolute; left: 2%; bottom: 5%; z-index: 4; }
.gl2-cat .mia-wrap { width: clamp(94px, 15vw, 158px) !important; aspect-ratio: 1 / 1; height: auto !important; }

.gl2-glasses {
  /* a festett asztallap síkja: a pohár talpa ide kerül */
  position: absolute; left: 16%; right: 10%; bottom: 24%;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: clamp(4px, 1.6vw, 20px);
  z-index: 3; pointer-events: auto;
}
/* a sorozat helyei: pohár → törés → csillag */
.gl2-slot {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: flex-end; justify-content: center;
  min-height: 40px;
}
.gl2-star {
  width: clamp(30px, 4.6vw, 54px); height: auto;
  filter: drop-shadow(0 3px 6px rgba(90, 70, 150, 0.25));
  animation: gl2StarPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes gl2StarPop {
  0% { transform: scale(0.2) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.gl2-glass.appear { animation: gl2GlassIn 0.4s var(--ease); }
@keyframes gl2GlassIn {
  from { transform: translateY(10px) scale(0.8); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
/* a törés végén a szilánkok kihalványulnak, mielőtt a csillag a helyükre kerül */
.gl2-glass.clearing { opacity: 0; transform: scale(0.94); transition: opacity 0.36s ease, transform 0.36s ease; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .gl2-glass.clearing { transition: opacity 0.2s linear; transform: none; }
}
/* homokórás visszaszámláló + poharszámláló */
.gl2-timer, .gl2-count {
  position: absolute; z-index: 6;
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 6px 13px; border-radius: var(--r-badge);
  background: rgba(255, 255, 255, 0.92);
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--primary-dark, #4b3a86);
  box-shadow: 0 3px 8px rgba(70, 55, 120, 0.18);
}
.gl2-timer { right: 12px; top: 12px; }
.gl2-timer img { width: 20px; height: auto; align-self: center; transform: rotate(12deg); }
.gl2-timer b { font-size: 19px; min-width: 24px; text-align: right; }
.gl2-count { right: 12px; top: 56px; }
.gl2-count img { width: 18px; height: 18px; align-self: center; }
.gl2-count b { font-size: 18px; }
.gl2-glass {
  --shake: 0; --glow: 0; --w: 1; --h: 1;
  position: relative;
  width: calc(86% * var(--w));
  max-width: 120px;
  aspect-ratio: 513 / 560;
  transform-origin: 50% 92%;
}
/* a rajzolt képkockák egymáson: mindig csak egy látszik */
.gl2-stack { position: absolute; inset: 0; }
.gl2-fr {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center top;
  opacity: 0; transition: opacity 0.13s linear;
  filter: drop-shadow(0 6px 12px rgba(80, 64, 140, 0.20));
}
.gl2-fr.is-on { opacity: 1; }

/* effektrétegek — mind Daniel rajzai */
.gl2-fx {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  width: 150%; height: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.gl2-fx-glow { width: 168%; opacity: calc(var(--glow) * 0.85); }
.gl2-glass.sparkling .gl2-fx-sparkle { opacity: 0.9; animation: glSpark 1.1s ease-in-out infinite; }
@keyframes glSpark { 0%,100% { opacity: 0.25; transform: translate(-50%,-50%) scale(0.94); }
                     50%     { opacity: 0.95; transform: translate(-50%,-50%) scale(1.06); } }

/* remegés: az erőssége folyamatosan követi a rezonanciát */
.gl2-glass.resonating .gl2-stack { animation: glShake 0.09s linear infinite; }
@keyframes glShake {
  0%, 100% { transform: translateX(calc(-2.6px * var(--shake))) rotate(calc(-0.55deg * var(--shake))); }
  50%      { transform: translateX(calc(2.6px * var(--shake))) rotate(calc(0.55deg * var(--shake))); }
}

/* törés: a rajzolt törött kocka marad, körülötte szétrepülnek a szilánkok
   és felvillan az ünneplő robbanás */
.gl2-glass.broken .gl2-fx-burst { opacity: 1; animation: glBurst 1.1s var(--ease) forwards; }
@keyframes glBurst {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.5); }
  25%  { opacity: 1; transform: translate(-50%,-50%) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.3); }
}
.gl2-glass.broken .gl2-fx-shards { opacity: 1; animation: glShards 1.25s cubic-bezier(0.18,0.7,0.3,1) forwards; }
@keyframes glShards {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.72) rotate(-6deg); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-34%) scale(1.5) rotate(10deg); }
}

.gl2-mic { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4; font-size: 14px; }
.gl2-footer { display: flex; justify-content: center; }

@media (max-width: 720px) {
  .gl2-scene { aspect-ratio: 4 / 3; max-height: 46vh; }
  .gl2-cat { left: 2%; bottom: 18%; }
  .gl2-cat .mia-wrap { width: clamp(72px, 20vw, 110px) !important; }
  .gl2-glasses { left: 18%; right: 6%; bottom: 25%; gap: 5px; }
  .gl2-glass { max-width: 86px; }
  .gl2-timer { right: 8px; top: 8px; }
  .gl2-count { right: 8px; top: 48px; }
  .gl2-cat { left: 0.5%; bottom: 4%; }
  .gl2-cat .mia-wrap { width: clamp(72px, 20vw, 112px) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .gl2-glass.resonating .gl2-stack, .gl2-glass.sparkling .gl2-fx-sparkle { animation: none !important; }
  .gl2-fr { transition: none; }
}

/* ============================================================
   SÁRKÁNYREPÜLŐ v2 — festett éggel és Mia 4 képkockás repülésével.
   ============================================================ */
.gl-screen { max-width: 1060px; }
.gl-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 280px; max-height: 52vh;
  border-radius: var(--r-panel);
  border: 1.5px solid rgba(124, 95, 211, 0.14);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* az ég két példánya váltakozva tükrözve — így a görgetés varrat nélküli */
.gl-sky { position: absolute; inset: 0; display: flex; width: 400%; will-change: transform; }
.gl-sky span {
  flex: 1 1 25%;
  background: url('../assets/glider/sky.webp') center/cover no-repeat;
}
.gl-sky .gl-sky-b { transform: scaleX(-1); }
/* fűsáv az alján — ide száll le Mia, ha elfogy a hang */
/* halvány zöld repülési övezet — iránymutatás, nem tiltás */
.gl-lane {
  position: absolute; left: 0; right: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(126, 200, 138, 0.00) 0%,
    rgba(118, 202, 132, 0.24) 18%,
    rgba(118, 202, 132, 0.24) 82%,
    rgba(126, 200, 138, 0.00) 100%);
  border-top: 2px dashed rgba(88, 168, 106, 0.55);
  border-bottom: 2px dashed rgba(88, 168, 106, 0.55);
  pointer-events: none;
}
.gl-craft.in-lane img {
  filter: drop-shadow(0 0 12px rgba(140, 220, 150, 0.75)) drop-shadow(0 8px 12px rgba(54,42,90,0.22));
}

/* indítás: a kezdőhangot fél másodpercig kell tartani */
.gl-start {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: clamp(92px, 13vw, 128px); aspect-ratio: 1;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  pointer-events: none; z-index: 6;
}
.gl-start.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.gl-start svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.gl-start circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.gl-start .gs-bg { stroke: rgba(255, 255, 255, 0.78); }
.gl-start .gs-fg {
  stroke: #7c5fd3;
  stroke-dasharray: 276.5;
  stroke-dashoffset: calc(276.5 - 276.5 * var(--k, 0));
  transition: stroke-dashoffset 0.08s linear;
}
.gl-start.near .gs-fg { stroke: #5fbf76; }
.gl-start-lbl {
  position: relative; z-index: 1;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(14px, 1.9vw, 17px);
  color: var(--primary-dark, #4b3a86);
  text-shadow: 0 1px 0 rgba(255,255,255,0.9);
}

.gl-grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 7%;
  background: linear-gradient(180deg, #b6dd9c, #97c97c);
  box-shadow: inset 0 4px 0 rgba(255,255,255,0.35);
}

/* akadályok: a rajzolt sziklák — a felső és az alsó szélhez illesztve.
   A magasságuk a szint „band" értéke, így a nehézség pontosan azt a sávot
   zárja el, amit a hangmagassággal ki kell kerülni. */
.gl-gates { position: absolute; inset: 0; overflow: hidden; }
.gl-gate {
  position: absolute; left: 0;
  height: 40%;                          /* a JS pontos px-értékre írja felül */
  will-change: transform;
  line-height: 0;
}
.gl-gate img {
  height: 100%; width: auto; display: block;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 12px rgba(70, 55, 120, 0.22));
}
.gl-gate.top { top: 0; }
.gl-gate.bottom { bottom: 7%; }         /* a fűsáv tetejéről indul */
.gl-gate.near img { filter: drop-shadow(0 0 14px rgba(124, 95, 211, 0.35)) drop-shadow(0 6px 12px rgba(70, 55, 120, 0.24)); }
.gl-gate.bump img { animation: glBump 0.34s var(--ease) infinite; }
@keyframes glBump {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(1.025); }
}

/* a cél: üres jelölőpont — a jutalom maga a leszállás és Mia ünneplése */
.gl-goal { position: absolute; left: 0; bottom: 6%; width: 2px; height: 2px; will-change: transform; }

/* a menet végén Mia puhán leereszkedik a fűre… */
.gl-craft.touchdown { transition: top 0.95s cubic-bezier(0.33, 1, 0.5, 1), transform 0.3s var(--ease); }
/* …és a győzelmi pózban ugrál örömében */
.gl-craft.celebrating { --tilt: 0deg; }
.gl-craft.celebrating img { animation: glCelebrate 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 4 alternate; }
@keyframes glCelebrate {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-16px) scale(1.05); }
}

/* Mia a sárkányrepülőn */
.gl-craft {
  --tilt: 0deg;
  position: absolute; z-index: 4;
  width: clamp(77px, 12vw, 134px);   /* 20%-kal kisebb, mint korábban */
  transform: translate(-50%, -50%) rotate(var(--tilt));
  transition: transform 0.18s var(--ease);
  will-change: left, top, transform;
  pointer-events: none;
}
.gl-craft img { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 12px rgba(54,42,90,0.22)); }
.gl-craft.gliding img { filter: drop-shadow(0 0 12px rgba(255,226,140,0.55)) drop-shadow(0 8px 12px rgba(54,42,90,0.22)); }
.gl-craft.sinking { animation: glSink 0.9s ease-in-out infinite; }
@keyframes glSink {
  0%,100% { transform: translate(-50%, -50%) rotate(calc(var(--tilt) + 2deg)); }
  50%     { transform: translate(-50%, -50%) rotate(calc(var(--tilt) - 2deg)); }
}
.gl-craft.landed img { filter: drop-shadow(0 4px 6px rgba(54,42,90,0.25)); opacity: 0.92; }

.gl-progress {
  position: absolute; left: 14px; right: 14px; bottom: 10px; height: 8px;
  border-radius: 999px; background: rgba(255,255,255,0.5); z-index: 5; overflow: hidden;
}
.gl-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--reward));
  transition: width 0.12s linear;
}
.gl-mic { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5; font-size: 14px; }
.gl-footer { display: flex; justify-content: center; }

@media (max-width: 720px) {
  .gl-scene { aspect-ratio: 4 / 3; max-height: 46vh; }
  .gl-craft { width: clamp(67px, 21vw, 104px); }
  .gl-goal { width: 78px; }

}
@media (prefers-reduced-motion: reduce) {
  .gl-craft.sinking, .gl-gate.bump, .gl-goal.happy { animation: none !important; }
}

/* ============================================================
   HANGERŐ-SÍELÉS — dinamika- és hangerőkontroll.
   A pálya Daniel rajzolt havas terepelemeiből épül, a hófelszín
   görbéje EGYBEN a kért hangerőprofil. Semmilyen technikai kijelző,
   csak a rajzolt hangszóró-ikonok és egy diszkrét sáv.
   ============================================================ */
.ski-screen { max-width: 1100px; }
.ski-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(58vh, 540px);
  border-radius: var(--r-panel);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #cfe6f7;
}
/* festett havas panoráma, lassú parallaxissal */
.ski-sky {
  position: absolute; inset: -6% -2% -2%;
  background: url('../assets/ski/mountains.webp') repeat-x center top / auto 118%;
  will-change: background-position;
}
/* a háttér kapjon enyhe fátylat: a pálya és Mia maradjon a fókusz */
.ski-sky::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(226,240,253,0.30), rgba(226,240,253,0.52));
}
/* a világ: a terepelemek egyszer kerülnek ki, utána csak ez mozog */
.ski-world { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.ski-tile {
  position: absolute;
  display: block;
  image-rendering: auto;
  filter: drop-shadow(0 5px 10px rgba(90, 110, 150, 0.16));
}
.ski-sign { position: absolute; width: auto; z-index: 1; }
.ski-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }

/* Mia rajzolt sí-képkockái */
.ski-mia {
  position: absolute; left: 0; top: 0;
  width: clamp(66px, 9.5vw, 122px);
  transform-origin: 50% 88%;
  will-change: transform;
  pointer-events: none;
  z-index: 4;
}
.ski-mia img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 6px 9px rgba(70, 60, 120, 0.22));
}

/* diszkrét hangerő-visszajelzés: a rajzolt hangszóró + egy lekerekített sáv */
.ski-vol {
  position: absolute; right: 16px; top: 10px; bottom: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 5;
}
.ski-vol-ico { width: clamp(26px, 3.4vw, 40px); height: auto; display: block; }
.ski-vol-track {
  position: relative; width: 17px; flex: 1 1 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 2px rgba(124, 152, 196, 0.30);
  overflow: hidden;
}
.ski-vol-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  border-radius: 999px;
  /* egyszínű, hogy a zöld sáv jól elváljon tőle */
  background: linear-gradient(180deg, #9b83e0, #7c5fd3);
  transition: height 0.09s linear;
}
.ski-vol-fill.is-shout { background: linear-gradient(180deg, #f08a8a, #e07070); }
/* a kért TÓL–IG hangerősáv: ebben kell tartani a hangot */
.ski-vol-band {
  position: absolute; left: -4px; right: -4px;
  border-radius: 8px;
  /* keret, nem kitöltés: így a mögötte lévő hangerő-oszlop is látszik */
  background: transparent;
  box-shadow: inset 0 0 0 3px rgba(56, 156, 82, 0.95), 0 0 0 1px rgba(255,255,255,0.65);
  transition: bottom 0.12s linear, height 0.12s linear,
              background 0.18s var(--ease), box-shadow 0.18s var(--ease);
  z-index: 2; pointer-events: none;
}
.ski-vol.in-band .ski-vol-band {
  background: rgba(126, 214, 140, 0.30);
  box-shadow: inset 0 0 0 3px rgba(46, 140, 70, 1), 0 0 16px rgba(126, 214, 140, 0.9);
}

/* nagyon finom hangmagasság-jel — Daniel nyilai, csak ha tényleg elcsúszott */
.ski-pitch {
  position: absolute; left: calc(30% + 36px); top: 40%;
  width: clamp(30px, 4vw, 46px); height: auto;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none; z-index: 6;
}
.ski-pitch.show { opacity: 1; transform: scale(1); animation: skiNudge 1.1s ease-in-out infinite; }
@keyframes skiNudge { 0%,100% { margin-top: 0; } 50% { margin-top: -7px; } }

/* „Készülj!” tábla a sánc előtt */
.ski-flag {
  position: absolute; left: 50%; top: 12%;
  transform: translateX(-50%) translateY(-8px);
  padding: 7px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink, #3b2f5c);
  font-family: var(--font-head); font-size: clamp(14px, 2vw, 17px);
  box-shadow: 0 4px 10px rgba(70, 55, 120, 0.18);
  opacity: 0; transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  pointer-events: none; z-index: 6;
}
.ski-flag.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.ski-progress {
  position: absolute; left: 12px; right: 56px; bottom: 8px; height: 7px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.66); z-index: 5; overflow: hidden;
}
.ski-progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #7fd0d4, #a892e6);
  transition: width 0.12s linear;
}
.ski-mic { position: absolute; left: 12px; top: 12px; z-index: 6; }
.ski-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.ski-cal { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 20px; }

@media (max-width: 720px) {
  .ski-scene { aspect-ratio: 4 / 3; max-height: 48vh; }
  .ski-mia { width: clamp(58px, 16vw, 86px); }
  .ski-vol { right: 9px; }
  .ski-vol-track { width: 12px; }
  .ski-pitch { left: calc(30% + 28px); }
}
@media (prefers-reduced-motion: reduce) {
  .ski-pitch.show { animation: none !important; }
  .ski-vol-fill, .ski-vol-band, .ski-progress-fill { transition: none; }
}

/* ============================================================
   HULLÁMVASÚT EXPRESSZ — a pálya jobbról balra fut, a hangot
   akkor kell megszólaltatni, amikor a hangjegy a jelzőhöz ér.
   Ugyanaz a háttér és pályadesign, mint a Hullámvasútnál.
   ============================================================ */
.xp-screen { max-width: 1100px; }
.xp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: min(54vh, 480px);
  overflow: hidden;
  border: 3px solid rgba(91, 74, 158, 0.45);
  border-radius: 28px 24px 30px 22px / 24px 30px 22px 28px;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,253,244,0.08)),
    url('../assets/game/coaster/rollercoaster_bg.png');
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), 0 10px 25px rgba(88,61,122,0.14);
  isolation: isolate;
}
.xp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.xp-cart {
  position: absolute; left: 0; top: 0;
  width: clamp(64px, 9vw, 108px); height: auto;
  will-change: transform;
  pointer-events: none; z-index: 3;
  filter: drop-shadow(0 6px 10px rgba(54,42,90,0.26));
}
.xp-cart.boost { animation: xpBoost 0.4s var(--ease); }
@keyframes xpBoost {
  0%   { filter: drop-shadow(0 6px 10px rgba(54,42,90,0.26)); }
  35%  { filter: drop-shadow(0 0 16px rgba(255,216,90,0.95)) drop-shadow(0 6px 10px rgba(54,42,90,0.26)); }
  100% { filter: drop-shadow(0 6px 10px rgba(54,42,90,0.26)); }
}

/* visszaszámlálás az indulás előtt */
.xp-count {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(52px, 9vw, 90px);
  color: #fff; opacity: 0;
  text-shadow: 0 4px 0 rgba(107,79,192,0.55), 0 8px 18px rgba(54,42,90,0.35);
  pointer-events: none; z-index: 5;
}
.xp-count.show { animation: xpCount 0.56s var(--ease); }
@keyframes xpCount {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
  25%  { opacity: 1; transform: translate(-50%,-50%) scale(1.08); }
  75%  { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(0.94); }
}

.xp-score {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  display: inline-flex; align-items: baseline; gap: 3px;
  padding: 6px 14px; border-radius: var(--r-badge);
  background: rgba(255,255,255,0.88);
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--primary-dark, #4b3a86);
  box-shadow: 0 3px 8px rgba(70,55,120,0.16);
}
.xp-score b { font-size: 19px; }
.xp-score span { opacity: 0.65; }
.xp-mic { position: absolute; left: 12px; top: 12px; z-index: 5; }
.xp-footer { display: flex; justify-content: center; }

@media (max-width: 720px) {
  .xp-stage { aspect-ratio: 4 / 3; max-height: 46vh; }
  .xp-cart { width: clamp(56px, 17vw, 88px); }
  .xp-score { right: 9px; top: 9px; padding: 5px 11px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .xp-cart.boost, .xp-count.show { animation: none !important; }
}

/* ============================================================
   CSILLAGGYŰJTŐ + DALLAMÉNEKLŐ — a repülő maga a hangmagasság-
   indikátor: pontosan oda száll, ahová a gyerek hangja.
   ============================================================ */
.fl-screen { max-width: 1100px; }
.fl-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: min(54vh, 480px);
  overflow: hidden;
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  background: url('../assets/glider/sky.webp') center / cover no-repeat, #cfe2f5;
}
.fl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fl-plane {
  position: absolute; left: 0; top: 0;
  width: clamp(64px, 9vw, 104px);
  will-change: transform;
  pointer-events: none; z-index: 3;
}
.fl-plane img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 6px 10px rgba(54,42,90,0.26));
}
.fl-mic { position: absolute; left: 12px; top: 12px; z-index: 5; }
.fl-footer { display: flex; justify-content: center; }
.fl-screen .xp-score { z-index: 5; }
@media (max-width: 720px) {
  .fl-stage { aspect-ratio: 4 / 3; max-height: 46vh; }
  .fl-plane { width: clamp(56px, 16vw, 84px); }
}

/* ============================================================
   SZOLMI FELMÉRŐ — játékos hangpróba-varázsló (#/assessment)
   Nem vizsga: nincs százalék, nincs piros, nincs osztályzat.
   ============================================================ */
.aw-screen { max-width: 860px; }
.aw-progress {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; margin-bottom: var(--sp-2);
}
.aw-count {
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  color: var(--ink-soft); margin-right: 8px;
}
.aw-paw { width: 26px; height: 26px; object-fit: contain; opacity: 0.35; transition: opacity 0.3s, transform 0.3s; }
.aw-paw.done { opacity: 1; }
.aw-paw.now { opacity: 0.85; transform: scale(1.18); }

.aw-card {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3);
  align-items: start;
  background: var(--paper-card);
  border: 2px solid rgba(124, 95, 211, 0.16);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-4);
  min-height: 340px;
}
.aw-cat { align-self: end; }
.aw-body { min-width: 0; }
.aw-say { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--primary-dark); margin: 0 0 var(--sp-2); }
.aw-say.big { font-size: 27px; }
.aw-note { color: var(--text-slate); font-size: 16.5px; margin: 0 0 var(--sp-3); max-width: 52ch; }
.aw-mins { color: var(--ink-soft); font-size: 14.5px; margin: var(--sp-2) 0 0; }
.aw-q { font-family: var(--font-head); font-weight: 700; font-size: 17.5px; color: var(--ink); margin: var(--sp-3) 0 var(--sp-1); }
.aw-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.aw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aw-chip {
  padding: 9px 16px; border-radius: var(--r-badge);
  border: 2px solid rgba(124, 95, 211, 0.28);
  background: #fff; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  color: var(--ink);
  transition: transform 0.14s var(--ease), border-color 0.14s, background 0.14s;
}
.aw-chip:hover { transform: translateY(-2px); }
.aw-chip.on { background: var(--primary); border-color: var(--primary-dark); color: #fff; }

.aw-meter {
  height: 20px; border-radius: 999px;
  background: rgba(124, 95, 211, 0.10);
  box-shadow: inset 0 0 0 2px rgba(124, 95, 211, 0.22);
  overflow: hidden; margin: var(--sp-2) 0;
}
.aw-meter-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7fd0d4, #a892e6);
  transition: width 0.09s linear;
}
.aw-mic-msg { min-height: 22px; color: var(--primary-dark); font-weight: 700; }
.aw-pulse {
  width: 52px; height: 52px; border-radius: 50%;
  margin: var(--sp-2) 0;
  background: radial-gradient(circle, rgba(124,95,211,0.5), rgba(124,95,211,0.12) 70%);
  animation: awPulse 1.1s ease-in-out infinite;
}
@keyframes awPulse { 0%,100% { transform: scale(0.85); } 50% { transform: scale(1.1); } }
.aw-list { margin: 0 0 var(--sp-2); padding-left: 22px; color: var(--text-slate); font-size: 16.5px; }
.aw-list li { margin: 3px 0; }
.aw-answer { min-width: 140px; }

.aw-overlay[hidden] { display: none !important; }
.aw-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(60, 45, 100, 0.35);
  display: grid; place-items: center;
}
.aw-modal {
  background: var(--paper-card); border-radius: var(--r-panel);
  box-shadow: var(--shadow-hover);
  padding: var(--sp-4); max-width: 380px; text-align: center;
}
.aw-modal p { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--primary-dark); margin: 0 0 var(--sp-2); }

/* — a kezdőképernyő felmérő-kártyája — */
.assess-banner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-2);
  background: linear-gradient(120deg, #f6efff, #fdf6e8);
  border: 2px solid rgba(124, 95, 211, 0.22);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-3) var(--sp-3);
  margin: var(--sp-3) 0;
}
.aw-banner-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aw-banner-title { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--primary-dark); }
.aw-banner-sub { font-weight: 700; color: var(--ink); font-size: 15.5px; }
.aw-banner-desc { color: var(--ink-soft); font-size: 14.5px; }
.aw-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.aw-banner-mins { color: var(--ink-soft); font-size: 13.5px; font-weight: 700; }

@media (max-width: 720px) {
  .aw-card { grid-template-columns: 1fr; padding: var(--sp-3); }
  .aw-cat { display: flex; justify-content: center; order: 2; }
  .aw-say { font-size: 19px; }
  .assess-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .aw-banner-actions { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .aw-pulse { animation: none; }
}

/* ============================================================
   MILYEN HANG EZ? 2.0 — 10 szint × 8 feladat.
   Feladatsor-csíkok, csillag-összesítő, körpirulák, nagy táblák,
   róka-felvevő ablak.
   ============================================================ */
.sm2-total {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(180deg, #fff7e0, #ffedb8);
  border: 2px solid rgba(240, 177, 42, 0.45);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-head); font-weight: 800; font-size: 16px;
  color: #8a6410;
  white-space: nowrap;
}
.sm2-total img { width: 20px; height: 20px; }
.sm2-total i { font-style: normal; font-weight: 700; opacity: 0.6; font-size: 13px; }

/* --- feladat-csíkok (1–8) --- */
.sm2-tasks {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin: 4px auto 2px;
}
.sm2-task {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0;
  min-width: 46px; padding: 5px 8px 3px;
  background: var(--surface);
  border: 2px solid rgba(124, 95, 211, 0.18);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.14s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.sm2-task b { font-family: var(--font-head); font-size: 16px; color: var(--primary-dark); line-height: 1.1; }
.sm2-task span { font-size: 12px; letter-spacing: 1px; color: rgba(138, 100, 16, 0.4); line-height: 1.2; }
.sm2-task.has span { color: #f0b12a; }
.sm2-task:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.sm2-task.on {
  border-color: var(--primary);
  background: linear-gradient(180deg, #f4eeff, #e9ddff);
  box-shadow: 0 0 0 4px rgba(124, 95, 211, 0.14);
}
.sm2-task:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* --- pirulák: kör / idő / kombó --- */
.sm2-pills { display: flex; justify-content: center; gap: 10px; min-height: 4px; }
.sm2-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 2px solid rgba(124, 95, 211, 0.2);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
  color: var(--primary-dark);
}
.sm2-pill img { width: 18px; height: 18px; }
.sm2-pill[hidden] { display: none; }

/* --- kompakt színpad: Mia kisebb, hogy a nagy tábláknak legyen hely --- */
.sm2-stagerow { min-height: 0; }
.sm-screen .sm2-stagerow .sm-mia .mia-wrap { width: clamp(96px, 13vh, 150px) !important; }

/* --- nagy párostáblák: 8–20 kártya --- */
.sm-screen .sm-choices.sm2-board {
  grid-template-columns: repeat(4, 1fr);
  max-width: 760px;
  gap: clamp(8px, 1.6vw, 16px);
}
.sm-screen .sm-choices.sm2-board .sm-choice { padding: clamp(8px, 1.4vw, 14px); }
.sm-screen .sm-choices.sm2-board .sm-img { width: clamp(56px, 9vw, 110px); }
.sm-screen .sm-choices.sm2-board .sm-back img { width: 40%; max-width: 64px; }
.sm-screen .sm-choices.sm2-board .sm-choice { min-height: clamp(96px, 15vh, 160px); }
.sm-screen .sm-choices.sm2-board[data-n="12"] { max-width: 820px; }
.sm-screen .sm-choices.sm2-board[data-n="16"] { grid-template-columns: repeat(4, 1fr); max-width: 860px; }
.sm-screen .sm-choices.sm2-board[data-n="20"] { grid-template-columns: repeat(5, 1fr); max-width: 980px; }
.sm-screen .sm-choices.sm2-board[data-n="16"] .sm-img,
.sm-screen .sm-choices.sm2-board[data-n="20"] .sm-img { width: clamp(48px, 7.5vw, 92px); }
.sm-screen .sm-choices.sm2-board[data-n="16"] .sm-choice,
.sm-screen .sm-choices.sm2-board[data-n="20"] .sm-choice { min-height: clamp(84px, 12vh, 132px); }

/* megtalált pár: halvány, zöldes, nem kattintható tovább */
.sm-choice.matched {
  border-color: rgba(99, 193, 116, 0.55);
  background: var(--success-soft);
  opacity: 0.82;
  cursor: default;
}
.sm-choice.matched:hover { transform: none; box-shadow: var(--shadow-soft); }

/* --- róka-felvevő ablak --- */
.sm2-fox { text-align: center; }
.sm2-fox .sm2-fox-img { width: clamp(110px, 20vw, 170px); height: auto; margin: 0 auto 8px; display: block; }
.sm2-fox p { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--primary-dark); margin: 4px 0; }
.sm2-fox .sm2-fox-sub { font-family: var(--font-body); font-weight: 600; font-size: 15.5px; color: var(--ink-soft); max-width: 420px; margin: 6px auto 4px; line-height: 1.45; }
.sm2-fox .sm2-fox-count { font-size: 54px; line-height: 1; color: var(--primary); animation: sm2Count 0.6s var(--ease); }
@keyframes sm2Count { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 700px) {
  .sm2-total { font-size: 14px; padding: 5px 10px; }
  .sm2-total img { width: 16px; height: 16px; }
  .sm2-task { min-width: 40px; padding: 4px 6px 2px; border-radius: 12px; }
  .sm2-task b { font-size: 14px; }
  .sm2-task span { font-size: 10px; }
  .sm-screen .sm-choices.sm2-board,
  .sm-screen .sm-choices.sm2-board[data-n="16"] { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .sm-screen .sm-choices.sm2-board[data-n="20"] { grid-template-columns: repeat(4, 1fr); }
  .sm-screen .sm-choices.sm2-board .sm-img { width: clamp(44px, 16vw, 72px); }
  .sm-screen .sm-choices.sm2-board .sm-choice { min-height: 76px; padding: 6px; }
  .sm2-fox p { font-size: 18px; }
  .sm2-fox .sm2-fox-sub { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sm2-fox .sm2-fox-count { animation: none; }
}

/* ============================================================
   MESEKALANDOK — élő mesekönyv (story.js).
   Az illusztráció a fő elem; a UI tétlenségkor elhalványul.
   ============================================================ */
.story-screen {
  position: relative;
  display: flex; flex-direction: column;
  min-height: min(88vh, 760px);
  gap: 10px;
  --story-ink: #4b3a86;
}
.story-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 2px 4px;
  transition: opacity 0.5s var(--ease);
}
.story-toptitle { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--story-ink); opacity: 0.85; }
.story-exit { white-space: nowrap; }
.story-topspace { width: 60px; }

.story-stagewrap { position: relative; flex: 1; display: flex; }
.story-stage {
  position: relative; width: 100%; margin: 0 auto;
  aspect-ratio: 4 / 3; max-height: 62vh;
  border-radius: 26px; overflow: hidden;
  background: #efe7f6;
  box-shadow: 0 18px 46px rgba(70, 55, 120, 0.22), inset 0 0 0 3px rgba(255,255,255,0.5);
}
.story-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 0.8s var(--ease);
  transform-origin: 50% 50%;
}
.story-img.is-front { opacity: 1; }
/* finom Ken Burns — két irány, alig észrevehető */
.story-img.kb-a { animation: kbA 26s ease-out forwards; }
.story-img.kb-b { animation: kbB 26s ease-out forwards; }
@keyframes kbA { from { transform: scale(1) translate(0,0); } to { transform: scale(1.05) translate(-1.4%, -1%); } }
@keyframes kbB { from { transform: scale(1.05) translate(1.4%, 1%); } to { transform: scale(1) translate(0,0); } }
.story-vignette { position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 90px rgba(40, 30, 70, 0.18); border-radius: 26px; }
.story-screen.is-paused .story-img { animation-play-state: paused; }

/* Mormogó narrátor — a színpad bal alsó sarkában */
.story-narrator {
  position: absolute; left: 14px; bottom: 12px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.story-mormogo {
  width: clamp(74px, 12vw, 120px); aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  filter: drop-shadow(0 6px 12px rgba(60,45,110,0.3));
}
.story-mormogo-fr, .story-mormogo-ph img { width: 100%; height: 100%; object-fit: contain; }
.story-mormogo-ph {
  width: 78%; height: 78%; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #efe3d0, #d8c2a0);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5), 0 5px 12px rgba(90,70,40,0.28);
}
.story-mormogo-ph img { width: 46%; height: 46%; opacity: 0.7; }
.story-mormogo.is-talking { animation: mormogoBob 0.9s ease-in-out infinite; }
@keyframes mormogoBob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
.story-narrator-name { font-family: var(--font-head); font-weight: 800; font-size: 13px; color: #fff;
  background: rgba(75,58,134,0.72); padding: 2px 10px; border-radius: 999px; }

/* felirat */
.story-caption {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 5; max-width: min(86%, 640px);
  padding: 12px 20px; border-radius: 18px;
  background: rgba(30, 22, 55, 0.6); color: #fff;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(16px, 2.1vw, 22px); line-height: 1.4; text-align: center;
  backdrop-filter: blur(3px);
}

/* alsó sáv: haladás + vezérlők */
.story-bottom { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 6px;
  transition: opacity 0.5s var(--ease); }
.story-progress { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.story-count { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--story-ink); opacity: 0.75; }
.story-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 320px; }
.story-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(124,95,211,0.22); transition: background 0.3s; }
.story-dots i.on { background: var(--primary, #7c5fd3); }

.story-controls { display: flex; align-items: center; gap: 10px; }
.story-ctrl {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(124,95,211,0.2); background: var(--surface, #fff);
  color: var(--story-ink); font-size: 18px; font-weight: 800; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--shadow-soft); transition: transform 0.14s var(--ease), box-shadow 0.16s var(--ease), background 0.2s;
}
.story-ctrl img { width: 22px; height: 22px; }
.story-ctrl:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.story-ctrl:active { transform: scale(0.95); }
.story-ctrl:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.story-ctrl-main { width: 60px; height: 60px; font-size: 24px; background: linear-gradient(180deg, var(--primary,#7c5fd3), var(--primary-dark,#5a46a0)); color: #fff; border-color: transparent; }
.story-ctrl-sep { width: 1px; height: 30px; background: rgba(124,95,211,0.2); margin: 0 2px; }
.story-cc { font-size: 14px; letter-spacing: 0.5px; }
.story-cc.is-on { background: var(--primary,#7c5fd3); color: #fff; border-color: transparent; }
.story-ctrl.is-off { opacity: 0.5; }

/* tétlenségkor a UI elhalványul */
.story-screen.ui-hidden .story-top,
.story-screen.ui-hidden .story-bottom,
.story-screen.ui-hidden .story-narrator { opacity: 0; pointer-events: none; }
.story-screen.ui-hidden .story-narrator { transform: translateY(6px); }

/* intró */
.story-intro { position: absolute; inset: 0; z-index: 20; border-radius: 26px; overflow: hidden;
  display: grid; place-items: center; background: #1c1533; }
.story-intro[hidden] { display: none; }
.story-intro-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.42;
  animation: kbA 20s ease-out forwards; }
.story-intro-inner { position: relative; text-align: center; color: #fff; padding: 20px; }
.story-intro-title { font-family: var(--font-head); font-weight: 900; font-size: clamp(28px, 5vw, 52px);
  margin: 0 0 10px; opacity: 0; animation: introFade 1s ease forwards 0.4s; text-shadow: 0 3px 18px rgba(0,0,0,0.4); }
.story-intro-sub { font-family: var(--font-head); font-size: clamp(16px, 2.4vw, 24px); margin: 0 0 18px;
  opacity: 0; animation: introFade 1s ease forwards 1.8s; }
.story-intro-nar { font-family: var(--font-body); font-size: clamp(14px, 1.8vw, 18px); opacity: 0;
  animation: introFade 1s ease forwards 3.4s; }
@keyframes introFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 0.96; transform: none; } }
.story-intro.is-out { opacity: 0; transition: opacity 0.9s var(--ease); }
.story-intro-skip { position: absolute; right: 16px; bottom: 14px; z-index: 2;
  border: none; background: rgba(255,255,255,0.16); color: #fff; font-family: var(--font-head); font-weight: 700;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.story-intro-skip:hover { background: rgba(255,255,255,0.28); }

/* kilépés / záró ablakok */
.story-modal, .story-end { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center;
  background: rgba(28, 20, 52, 0.55); border-radius: 26px; backdrop-filter: blur(3px); }
.story-modal[hidden], .story-end[hidden] { display: none; }
.story-modal-card, .story-end-card {
  background: var(--surface, #fff); border-radius: 24px; padding: 26px 30px; text-align: center;
  max-width: 440px; box-shadow: 0 20px 50px rgba(40,30,80,0.35); animation: pop-in 0.4s var(--ease);
}
.story-modal-q { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--story-ink); margin: 0 0 6px; }
.story-modal-sub { font-family: var(--font-body); color: var(--ink-soft); margin: 0 0 18px; }
.story-modal-actions, .story-end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.story-end-card h2 { font-family: var(--font-head); font-weight: 900; font-size: 30px; color: var(--story-ink); margin: 0 0 6px; }
.story-end-mia { width: min(320px, 70%); border-radius: 18px; margin: 12px auto; display: block;
  box-shadow: 0 10px 26px rgba(60,45,110,0.28); }
.story-end-title { font-family: var(--font-head); font-weight: 700; color: var(--ink-soft); margin: 0; }
.story-end-vege { letter-spacing: 2px; }
.story-end-next { font-family: var(--font-head); font-style: italic; color: var(--story-ink); opacity: 0.8; }
.story-reward { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin: 8px auto;
  background: linear-gradient(180deg, #fff7e0, #ffedb8); border: 2px solid rgba(240,177,42,0.45);
  border-radius: 16px; padding: 8px 18px; }
.story-reward b { font-family: var(--font-head); color: #8a6410; }
.story-teaser { position: absolute; right: 8%; top: 8%; animation: teaserFly 6s ease-in-out infinite; }
.story-teaser img { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(90,150,240,0.8)); }
@keyframes teaserFly { 0% { transform: translate(0,0); opacity: 0.5; } 50% { transform: translate(30px,-26px); opacity: 1; } 100% { transform: translate(60px,-52px); opacity: 0; } }

/* főoldali Mesekalandok-blokk */
.tale-block { margin: 6px 0 18px; }
.tale-heading { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.tale-heading img { width: 26px; height: 26px; }
.tale-heading h2 { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--story-ink, #4b3a86); margin: 0; }
.tale-card {
  position: relative; display: flex; gap: 16px; align-items: stretch;
  text-align: left; width: 100%; cursor: pointer;
  background: linear-gradient(135deg, #fff, #f3ecff);
  border: 2px solid rgba(124,95,211,0.18); border-radius: 24px;
  padding: 14px; box-shadow: var(--shadow-soft);
  transition: transform 0.16s var(--ease), box-shadow 0.18s var(--ease);
  overflow: hidden;
}
.tale-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tale-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.tale-cover { position: relative; flex: 0 0 auto; width: clamp(150px, 34%, 300px); aspect-ratio: 4/3;
  border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4); }
.tale-cover img { width: 100%; height: 100%; object-fit: cover; }
.tale-body { display: flex; flex-direction: column; justify-content: center; gap: 6px; flex: 1; min-width: 0; }
.tale-title { font-family: var(--font-head); font-weight: 900; font-size: clamp(20px, 3vw, 28px); color: var(--story-ink,#4b3a86); }
.tale-sub { font-family: var(--font-body); color: var(--ink-soft); font-size: 15px; }
.tale-go { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 6px;
  background: linear-gradient(180deg, var(--primary,#7c5fd3), var(--primary-dark,#5a46a0)); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 16px;
  padding: 9px 20px; border-radius: 999px; box-shadow: 0 6px 16px rgba(90,70,160,0.3); }
.tale-progress { margin-top: 8px; }
.tale-progress-bar { height: 7px; border-radius: 999px; background: rgba(124,95,211,0.16); overflow: hidden; max-width: 320px; }
.tale-progress-bar > i { display: block; height: 100%; background: var(--primary,#7c5fd3); border-radius: 999px; }
.tale-progress-lbl { font-family: var(--font-head); font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.tale-soon { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tale-soon-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-family: var(--font-head); font-weight: 700;
  color: var(--ink-soft); background: rgba(124,95,211,0.08); border-radius: 999px; padding: 4px 10px; opacity: 0.75; }

@media (max-width: 640px) {
  .story-stage { aspect-ratio: 4/3; max-height: 46vh; }
  .story-mormogo { width: clamp(56px, 20vw, 84px); }
  .story-caption { font-size: 16px; bottom: 10px; padding: 9px 14px; }
  .story-ctrl { width: 44px; height: 44px; }
  .story-ctrl-main { width: 54px; height: 54px; }
  .story-toptitle { display: none; }
  .tale-card { flex-direction: column; }
  .tale-cover { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .story-img.kb-a, .story-img.kb-b, .story-intro-bg { animation: none !important; }
  .story-mormogo.is-talking { animation: none; }
  .story-teaser { animation: none; }
}

/* ============================================================
   AUDIT-JAVÍTÁSOK (v48) — érintőterület, safe-area, dvh, ultra-kis kijelző.
   Eszközfüggetlen, additív szabályok; a meglévő layoutot nem írják felül.
   ============================================================ */

/* — érintés: nincs 300ms/ghost-click, dupla koppintás nem zoomol — */
button, a, [role="button"], .game-card, .sm-choice, .sm2-task,
.tale-card, .ls-btn, .story-ctrl, .sticker { touch-action: manipulation; }

/* — szintléptető nyilai: a látvány marad kicsi, a TAP-terület ≥44px — */
.ls-btn { position: relative; }
.ls-btn::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
}
/* — kis szöveges gombok minimum tapintható magassága — */
.vc-link { min-height: 44px; }
.story-intro-skip { min-height: 44px; display: inline-flex; align-items: center; }
.sm2-task { min-height: 44px; justify-content: center; }

/* — 100vh → dinamikus viewport, hogy a mobil Safari címsora ne vágjon le — */
@supports (height: 100dvh) {
  body { min-height: 100dvh; }
  body.immersive main#screen { min-height: calc(100dvh - 6px); }
}

/* — safe-area: iPhone/iPad notch + home-indikátor + fekvő oldalsáv — */
.ear2-footer, .sm-footer, .gl2-footer { padding-bottom: env(safe-area-inset-bottom); }
.story-bottom { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
@media (orientation: landscape) {
  .app-header {
    padding-left: max(26px, env(safe-area-inset-left));
    padding-right: max(26px, env(safe-area-inset-right));
  }
  .game-screen, .ear2-screen, .story-screen {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .story-top { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
}

/* — a kisebb szöveges gombok is legyenek ≥44px magasak — */
@media (max-width: 720px) { .mel-replay { min-height: 44px; } }
.card input[type="text"], .card input:not([type]) { min-height: 44px; }

/* — a repülős játék világa ne lógjon ki a színpadból (game-world clip) — */
.gl-stage, .gl-scene, .gl-sky { overflow: hidden; }

/* — ultra-kis kijelző (≤360px): a jobb szélső dísz-hangjegyek és a hosszú
     címek/gombok ne okozzanak vízszintes túlcsordulást (a dísz aria-hidden) — */
@media (max-width: 360px) {
  .bg-note.n2, .bg-note.n4, .bg-note.n6 { display: none; }
  /* a fejlécben a dekoratív cím-ikon elrejtésével fér ki a cím a vissza gomb mellett */
  .ear2-title-ico, .vc-title-ico { display: none; }
  .ear2-title-wrap h1 { font-size: clamp(15px, 4.4vw, 20px); }
  .vc-title { font-size: clamp(17px, 5.2vw, 22px); }
  .story-top .story-exit {
    font-size: 13px; padding: 6px 10px; max-width: 64vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

/* — hover-effektek csak valódi egérnél (érintőn ne „ragadjanak be") — */
@media (hover: none) {
  .game-card:hover, .tale-card:hover, .sm-choice:hover, .ls-btn:hover:not(:disabled),
  .story-ctrl:hover, .sticker:hover { transform: none; }
}

/* ============================================================
   RÖVID / FEKVŐ NÉZET (v48b) — telefon-fekvő és alacsony ablak:
   a magas játékszínpadok ne tolják le a vezérlőket a képernyőről.
   Csak magasság/orientáció-alapú; a portré és desktop változatlan.
   ============================================================ */
@media (orientation: landscape) and (max-height: 600px) {
  /* kompakt fejléc: a nagy logó fekvőben sok magasságot enne */
  .app-header { padding-top: max(3px, env(safe-area-inset-top)); padding-bottom: 2px; }
  .brand-logo-img { height: 40px; }
  /* a játékképernyő TÖLTSE KI a látható magasságot, a footer a képen maradjon;
     a színpad rugalmasan zsugorodik (aspect megmarad, csak levélszekrényez) */
  main#screen { min-height: auto; }
  .game-screen, .ear2-screen, .gl-screen, .gl2-screen, .story-screen,
  .coaster-screen, .bp-screen, .fl-screen, .ski-screen, .pm-screen,
  .yarn-screen, .fishing-screen, .mel-screen, .sm-screen {
    display: flex; flex-direction: column;
    min-height: calc(100dvh - 50px); min-height: calc(100vh - 50px);
    box-sizing: border-box; padding-top: 2px; gap: 6px;
  }
  .bp-stage, .coaster-stage, .ear2-stage, .fish-stage, .fl-stage,
  .gl-scene, .gl2-scene, .pm-stage, .ski-scene, .story-stage, .yarn-scene {
    flex: 1 1 auto; min-height: 0; max-height: none;
  }
  /* a footer/vezérlő ne zsugorodjon el */
  .ear2-footer, .sm-footer, .gl2-footer, .story-bottom, .game-footer { flex: 0 0 auto; }
  /* az EGYSZERŰ énekes játékok (cím + színpad + vezérlő) FÉRJENEK KI görgetés
     nélkül: a képernyőt a látható magasságra korlátozzuk, a színpad zsugorodik.
     A kártyás/tartalmas képernyőket (soundmatch, matricák) NEM érinti. */
  .gl2-screen, .ski-screen, .gl-screen, .bp-screen, .coaster-screen,
  .fl-screen, .fishing-screen, .pm-screen, .yarn-screen, .story-screen {
    height: calc(100vh - 48px); height: calc(100dvh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto; overflow-x: hidden;   /* zsugorodik; ha marad, GÖRGET (nem VÁG) */
  }
}
/* nagyon lapos ablak (pl. telefon fekvő + Safari sávok): még kompaktabb */
@media (orientation: landscape) and (max-height: 430px) {
  .brand-logo-img { height: 38px; }
  .bp-stage, .coaster-stage, .ear2-stage, .fish-stage, .fl-stage,
  .gl-scene, .gl2-scene, .pm-stage, .ski-scene, .sm2-stagerow,
  .story-stage, .yarn-scene { max-height: 56vh; max-height: 56dvh; }
}

/* ============================================================
   JÁTÉKMIX — véletlen játékgenerátor (csempe, sáv, átmenet, összefoglaló)
   ============================================================ */
.theme-mix { --theme: #a25fd0; }

/* Kiemelt csempe: pasztell színátmenet, hogy „különleges mód"-ként kitűnjön. */
.game-card-mix {
  background: linear-gradient(135deg, #fdeef6 0%, #eef5ff 52%, #f1fbec 100%);
  border-left-color: #a25fd0;
}
.game-card-mix .game-name { color: #8a4fbf; }
.game-card-mix .game-icon { animation: gmIconWobble 3.2s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes gmIconWobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .game-card-mix .game-icon { animation: none; } }

/* Perzisztens sáv — minden játék-képernyő tetején, kilépés-gombbal. */
body.gamemix-active main#screen { padding-top: 54px; }
.gm-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 55;
  height: 50px; display: flex; align-items: center; gap: 12px;
  padding: 0 12px; padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: linear-gradient(90deg, #fce7f0, #e8f2ff);
  border-bottom: 2px solid rgba(120, 90, 60, 0.14);
  box-shadow: 0 3px 10px rgba(120, 90, 60, 0.12);
  font-family: var(--font-body);
}
.gm-bar-brand { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); color: #8a4fbf; font-size: 17px; flex-shrink: 0; }
.gm-bar-brand img { width: 30px; height: 30px; }
.gm-bar-now { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.gm-bar-game { font-weight: 700; color: #4a3a2a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-dots { display: flex; gap: 5px; flex-shrink: 0; }
.gm-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(138, 79, 191, 0.28); transition: background 0.2s, transform 0.2s; }
.gm-dot.on { background: #a25fd0; transform: scale(1.15); }
.gm-bar-exit {
  flex-shrink: 0; border: none; cursor: pointer;
  background: #fff; color: #8a4fbf; font-family: var(--font-body); font-weight: 700;
  font-size: 14px; padding: 8px 14px; border-radius: 14px;
  box-shadow: 0 2px 6px rgba(120, 90, 60, 0.16);
}
.gm-bar-exit:hover { background: #8a4fbf; color: #fff; }
@media (max-width: 480px) {
  .gm-bar-brand b { display: none; }
  .gm-bar-exit { font-size: 13px; padding: 7px 11px; }
}

/* Dobókocka-átmenet két játék között. */
.gm-transition {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, rgba(255, 250, 240, 0.96), rgba(248, 235, 246, 0.98));
  opacity: 0; transition: opacity 0.24s ease;
}
.gm-transition.show { opacity: 1; }
.gm-trans-inner { text-align: center; }
.gm-trans-dice { width: 128px; height: 128px; animation: gmDiceRoll 1.1s cubic-bezier(0.5, 0, 0.5, 1); filter: drop-shadow(0 8px 12px rgba(120, 90, 60, 0.22)); }
@keyframes gmDiceRoll {
  0% { transform: rotate(-30deg) scale(0.6); opacity: 0; }
  35% { transform: rotate(200deg) scale(1.12); opacity: 1; }
  70% { transform: rotate(340deg) scale(0.96); }
  100% { transform: rotate(360deg) scale(1); }
}
.gm-trans-msg { margin-top: 18px; font-family: var(--font-head); font-size: 24px; color: #8a4fbf; }
@media (prefers-reduced-motion: reduce) { .gm-trans-dice { animation: none; } }

/* Összefoglaló ablak (a közös result-overlay-t használja). */
.gm-summary .gm-sum-dice { width: 84px; height: 84px; display: block; margin: 0 auto 6px; }
.gm-summary .gm-sum-actions { flex-wrap: wrap; gap: 10px; }

/* ============================================================
   TANULÁSI ÚT — „Keressük meg a hangom!" (állomás-számok, Mia utazó,
   választó, haladássáv, főoldali belépő)
   ============================================================ */
/* állomás-sorszám a jelvényen */
.jnum {
  position: absolute; left: -6px; top: -6px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #9b6fdf; color: #fff; font-weight: 900; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fffdf4; box-shadow: 0 2px 5px rgba(120,90,60,0.22);
  z-index: 2;
}
.jworld.st-completed .jnum { background: #5bbf67; }
.jworld.st-current .jnum { background: #e8a23d; }

/* Mia utazó képe (autó helyett) */
.jmia {
  position: absolute; transform: translate(-50%, -100%);
  width: 92px; height: auto; pointer-events: none; z-index: 5;
  filter: drop-shadow(0 5px 6px rgba(120,90,60,0.28));
  animation: jmiaBob 1.9s ease-in-out infinite;
}
@keyframes jmiaBob {
  0%,100% { transform: translate(-50%, -100%) rotate(-2deg); }
  50% { transform: translate(-50%, -108%) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) { .jmia { animation: none; } }

/* haladássáv az út fölött */
.journey-progress { display: flex; align-items: center; gap: 12px; margin: 4px 2px 2px; }
.jp-bar { flex: 1; height: 12px; border-radius: 999px; background: rgba(155,111,223,0.18); overflow: hidden; max-width: 420px; }
.jp-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,#8d70e2,#5bbf67); transition: width 0.4s ease; }
.jp-lbl { font-family: var(--font-body); font-weight: 800; color: var(--ink-soft); font-size: 14px; }

/* több-játékos állomás választója */
.jchoose-modal { max-width: 440px; }
.jchoose-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 8px 0 4px; }
.jchoose-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px; }
.jchoose-btn img { width: 56px; height: 56px; object-fit: contain; }

/* — főoldali belépő: „Keressük meg a hangom!" (elsődleges, felül) — */
.path-hero { margin: 2px 0 8px; }
.path-hero-card {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: linear-gradient(105deg, #8d70e2 0%, #6b4fc0 60%, #5b8fd8 100%);
  color: #fff; border: none; cursor: pointer;
  border-radius: 26px; padding: 16px 22px;
  box-shadow: 0 7px 0 #4a3a85, var(--shadow);
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1);
  font-family: var(--font-body);
}
.path-hero-card:hover { transform: translateY(-3px); }
.path-hero-card:active { transform: translateY(1px); box-shadow: 0 4px 0 #4a3a85, var(--shadow); }
.ph-art { flex-shrink: 0; width: 92px; height: 92px; display: grid; place-items: center; }
.ph-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(40,20,60,0.3)); }
.ph-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.ph-title { font-family: var(--font-head); font-size: 27px; line-height: 1.02; }
.ph-sub { font-size: 14.5px; opacity: 0.94; }
.ph-progress { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.ph-bar { flex: 1; max-width: 260px; height: 11px; border-radius: 999px; background: rgba(255,255,255,0.28); overflow: hidden; }
.ph-bar i { display: block; height: 100%; border-radius: 999px; background: #ffe08a; transition: width 0.4s ease; }
.ph-lbl { font-size: 13px; font-weight: 800; opacity: 0.96; white-space: nowrap; }
.ph-go { flex-shrink: 0; align-self: center; font-family: var(--font-head); font-size: 20px; background: rgba(255,255,255,0.18); padding: 9px 16px; border-radius: 16px; }
@media (max-width: 560px) {
  .path-hero-card { flex-wrap: wrap; }
  .ph-art { width: 68px; height: 68px; }
  .ph-title { font-size: 23px; }
  .ph-go { width: 100%; text-align: center; margin-top: 4px; }
}

/* ============================================================
   FÜLELŐ — szolmizációs kézjel-játék
   ============================================================ */
.hs { max-width: 860px; margin: 0 auto; padding: 0 12px; }
.hs-picker { margin: 6px 0 2px; }
.hs-instr { text-align: center; min-height: 1.4em; font-weight: 800; color: var(--primary-dark); }
.hs-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 10px; }
.hs-coach { width: 150px; height: 150px; }
.hs-replay { background: #fff; border: 2.5px solid rgba(124,95,211,0.35); color: var(--primary-dark); font-weight: 800; border-radius: 16px; padding: 8px 16px; }
.hs-replay:hover { background: #f3eeff; }

.hs-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 6px auto 14px; max-width: 620px; position: relative; }
.hs-cards[data-n="3"] { grid-template-columns: repeat(3, 1fr); max-width: 760px; }
.hs-card {
  position: relative; cursor: pointer; background: var(--paper-card);
  border: 3px solid rgba(91, 74, 158, 0.16);
  border-radius: 26px 22px 28px 22px / 22px 28px 22px 26px;
  box-shadow: var(--shadow); padding: 14px;
  display: grid; place-items: center; min-height: 150px;
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.16s, border-color 0.16s;
}
.hs-cards.ready .hs-card:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 16px 34px rgba(120,90,60,0.24); }
.hs-card:disabled { cursor: default; }
.hs-card img { width: 100%; height: auto; max-height: 190px; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(120,90,60,0.18)); -webkit-user-drag: none; }
/* Mia „énekli" — a jel világít */
.hs-card.lit { border-color: #e8a23d; box-shadow: 0 0 0 5px rgba(232,162,61,0.28), var(--shadow); transform: translateY(-3px) scale(1.04); }
.hs-card.lit img { animation: hsPulse 0.6s ease-in-out infinite alternate; }
@keyframes hsPulse { from { transform: scale(1); } to { transform: scale(1.05); } }
.hs-card.is-right { border-color: #5bbf67; box-shadow: 0 0 0 5px rgba(91,191,103,0.3), var(--shadow); }
.hs-card.is-wrong { animation: hsShake 0.5s; border-color: #e88; }
@keyframes hsShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
.hs-start { display: block; margin: 4px auto 20px; font-size: 20px; padding: 12px 34px; }
@media (prefers-reduced-motion: reduce) { .hs-card.lit img { animation: none; } }
@media (max-width: 520px) {
  .hs-card { min-height: 120px; border-radius: 20px; }
  .hs-card img { max-height: 140px; }
  .hs-cards[data-n="3"] { gap: 10px; }
}

/* ============================================================
   SÍUGRÓ — hangtávolság (intervallum) éneklés
   ============================================================ */
.sj-stage { position: relative; width: 100%; aspect-ratio: 960 / 420; border-radius: 20px; overflow: hidden; background: #eaf6ff; box-shadow: inset 0 0 0 2px rgba(120,90,60,0.06); }
.sj-stage canvas { width: 100%; height: 100%; display: block; }
.sj-skier { position: absolute; width: 12%; transform: translate(-50%, -82%); pointer-events: none; filter: drop-shadow(0 4px 5px rgba(120,90,60,0.28)); }
.sj-splash { position: absolute; width: 13%; transform: translate(-50%, -55%); pointer-events: none; }
.sj-target { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,253,244,0.94); border-radius: 16px; padding: 8px 14px; box-shadow: var(--shadow); }
.sj-target-row { display: flex; align-items: center; gap: 10px; }
.sj-target .coaster-hold-track { width: 200px; }
.sj-interval { font-family: var(--font-head); font-size: 21px; color: var(--primary-dark); white-space: nowrap; }
.sj-mic { position: absolute; left: 10px; bottom: 10px; }
.sj-reward-img { width: 92px; height: auto; }
@media (max-width: 520px) { .sj-interval { font-size: 17px; } .sj-skier { width: 15%; } }

/* Síugró — élő távolság + stamina-töltés + rekord */
.sj-dist { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-family: var(--font-head); font-size: 26px; color: #2b6db0;
  background: rgba(255,255,255,0.9); border-radius: 14px; padding: 3px 16px; box-shadow: var(--shadow); }
.coaster-hold-fill.is-charging { background: linear-gradient(90deg, #ffcf5a, #ff9a3d); }
.result-panel h2.sj-record { color: #e8631e; animation: sjRecPop 0.6s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes sjRecPop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
