:root {
  color-scheme: dark;
  /* ===== PALETTE BRAND ZIPPY ===== */
  --ink: #1b1330;          /* nero-zebra / indaco profondo */
  --paper: #ffffff;        /* bianco-zebra */
  --brand: #7C5CE6;        /* viola Zippy (primario) */
  --brand-2: #9B5DE5;
  --brand-deep: #3a1d7a;
  --accent: #FF8A3D;       /* arancio caldo */
  --accent-2: #FFD166;     /* giallo sole */
  --teal: #06D6A0;
  --coral: #FF6B6B;
  --sky: #00BBF9;
  /* superfici e sfondi */
  --bg-1: #241552;
  --bg-2: #130a2e;
  --surface: rgba(255,255,255,.07);
  --surface-2: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.12);
  --radius: 16px;
}
* { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Baloo 2", "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg-2);
}
.app-bg {
  background:
    radial-gradient(1100px 520px at 50% -8%, var(--brand-deep) 0%, transparent 58%),
    radial-gradient(700px 380px at 85% 12%, rgba(124,92,230,.35) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}

/* INTRO / SPLASH */
.intro {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px 26px; position: relative; overflow: hidden;
}
.intro-notes {
  position: absolute; top: 8%; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,.18); font-size: 30px; letter-spacing: 14px; animation: bob 3.5s ease-in-out infinite;
}
.intro-logo img {
  width: 150px; height: 150px; object-fit: contain; border-radius: 28px;
  background: #fff; padding: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.45);
  animation: bob 3s ease-in-out infinite;
}
.intro-title { color: #fff; font-weight: 900; font-size: 34px; margin: 18px 0 2px; letter-spacing: -.5px; }
.intro-tagline { color: #FFD166; font-weight: 800; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; }
.intro-line { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.6; max-width: 360px; margin: 16px auto 0; }
.intro-btn {
  margin-top: 26px; background: linear-gradient(120deg, #FF6B6B, #FF9F1C); color: #fff; border: none;
  font-weight: 900; font-size: 18px; padding: 16px 34px; border-radius: 999px; box-shadow: 0 10px 30px rgba(255,107,107,.45);
}
.intro-btn:active { transform: scale(.96); }
.intro-pillars { color: rgba(255,255,255,.5); font-size: 12px; margin-top: 22px; }

/* ONBOARDING / REGISTRAZIONE */
.onb { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 22px; }
.onb-dots { display: flex; gap: 8px; margin-bottom: 18px; }
.onb-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); transition: all .2s; }
.onb-dot.on { background: var(--accent-2); width: 22px; border-radius: 99px; }
.onb-card { width: 100%; max-width: 380px; text-align: center; animation: screenIn .3s ease; }
.onb-title { color: #fff; font-weight: 800; font-size: 24px; margin: 12px 0 4px; }
.onb-sub { color: rgba(255,255,255,.7); font-size: 14px; margin-bottom: 16px; }
.onb-roles { display: flex; flex-direction: column; gap: 12px; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; transition: transform .12s;
}
.role-card:active { transform: scale(.97); }
.role-card:hover { border-color: var(--brand-2); background: var(--surface-2); }
.role-label { color: #fff; font-weight: 700; font-size: 16px; }
.role-hint { color: rgba(255,255,255,.5); font-size: 12px; }
.onb-eco { color: rgba(255,255,255,.4); font-size: 12px; margin-top: 22px; }
.eco-link { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.fully-link {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  background: linear-gradient(120deg, rgba(124,93,231,.25), rgba(3,6,17,.4));
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.fully-link:active { transform: scale(.98); }
.fully-mark { width: 40px; height: 40px; border-radius: 12px; background: #030611; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 1px solid rgba(255,255,255,.15); }
.onb-input {
  width: 100%; background: rgba(255,255,255,.1); border: 1px solid var(--line); color: #fff;
  font-size: 16px; padding: 14px 16px; border-radius: 14px; margin-bottom: 12px; outline: none; box-sizing: border-box;
}
.onb-input:focus { border-color: var(--brand-2); background: rgba(255,255,255,.16); }
.onb-input::placeholder { color: rgba(255,255,255,.45); }
.onb-fieldlabel { color: rgba(255,255,255,.7); font-size: 13px; text-align: left; margin: 4px 2px 8px; }
.onb-ages { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.age-chip {
  width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.1);
  border: 1px solid var(--line); color: #fff; font-weight: 800; font-size: 16px;
}
.age-chip.on { background: var(--brand); border-color: #fff; }
.onb-avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-pick {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 2px solid var(--line); border-radius: 16px;
}
.avatar-pick.on { border-color: var(--accent-2); background: rgba(255,209,102,.18); box-shadow: 0 0 16px rgba(255,209,102,.3); }
.onb-nav { display: flex; gap: 10px; margin-top: 20px; }
.onb-back { flex: 1; background: rgba(255,255,255,.1); color: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px; font-weight: 700; }
.onb-next { flex: 2; background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border: none; border-radius: 14px; padding: 13px; font-weight: 800; }
.onb-next:disabled { opacity: .45; }
.onb-back:active, .onb-next:active { transform: scale(.97); }
.onb-note { color: rgba(255,255,255,.45); font-size: 11px; margin-top: 14px; line-height: 1.5; }
.onb-bigavatar { width: 96px; height: 96px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--brand), rgba(0,0,0,.3)); border-radius: 50%; border: 3px solid rgba(255,255,255,.3); }

/* PROFILO in impostazioni + topbar avatar */
.profile-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.profile-avatar { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--brand), rgba(0,0,0,.3)); border: 2px solid rgba(255,255,255,.25); }
.logout-btn { background: rgba(255,61,104,.2); color: #ffb3c4; border: 1px solid rgba(255,61,104,.4); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); border: 1px solid var(--line); }

/* TOP BAR */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; backdrop-filter: blur(10px);
  background: rgba(20,12,48,.7); border-bottom: 1px solid rgba(255,255,255,.08);
}
.chip {
  background: rgba(255,255,255,.12); color: #fff; font-size: 13px;
  padding: 4px 10px; border-radius: 999px; display: flex; gap: 4px; align-items: center;
}

/* ZIPPY bob animation */
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
.zippy-bob { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
@keyframes noteFloat { 0% { transform: translateY(0); opacity: .9; } 100% { transform: translateY(-8px); opacity: .4; } }
.zippy-note { animation: noteFloat 1.1s ease-in-out infinite alternate; }

/* TRANSIZIONE TRA SCHERMATE */
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.screen-anim { animation: screenIn .28s ease; }

/* MAPPA-VIAGGIO (percorso a tappe) */
.stage-block { margin-bottom: 22px; }
.stage-banner {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 14px 6px; padding: 10px 16px; border-radius: 14px;
  background: linear-gradient(120deg, var(--sc), rgba(0,0,0,.28));
  border: 1px solid rgba(255,255,255,.14);
}
.stage-banner-pct { color: #fff; font-weight: 900; font-size: 15px; opacity: .9; }
.trail { position: relative; padding: 6px 0 10px; }
.trail::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 5px; transform: translateX(-50%);
  background: repeating-linear-gradient(rgba(255,255,255,.22) 0 9px, transparent 9px 18px); border-radius: 5px;
}
.trail-node { position: relative; display: flex; flex-direction: column; align-items: center; margin: 12px 0; z-index: 1; }
.node-btn {
  width: 76px; height: 76px; border-radius: 50%; position: relative;
  background: linear-gradient(160deg, var(--wc), rgba(0,0,0,.4));
  border: 3px solid rgba(255,255,255,.28); box-shadow: 0 8px 18px rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
}
.node-btn:active { transform: scale(.92); }
.node-done { box-shadow: 0 0 22px var(--wc); }
.node-cur { border-color: #fff; animation: nodepulse 1.7s ease-out infinite; }
@keyframes nodepulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 70%,100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }
.node-lock { filter: grayscale(1); opacity: .5; }
.node-badge { position: absolute; bottom: -4px; right: -4px; font-size: 18px; }
.node-zippy { position: absolute; top: -50px; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.node-go { background: #fff; color: var(--ink); font-weight: 900; font-size: 9px; padding: 1px 8px; border-radius: 999px; margin-top: -6px; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.node-label { text-align: center; margin-top: 6px; }
.node-name { color: #fff; font-weight: 700; font-size: 11px; line-height: 1.1; }
.node-stars { font-size: 9px; letter-spacing: 1px; }

/* WORLD CARDS */
.world-card {
  background: linear-gradient(160deg, var(--wc), rgba(0,0,0,.35));
  border-radius: 18px; padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12); transition: transform .15s;
}
.world-card:active { transform: scale(.96); }
.world-card:not(:disabled):hover { transform: translateY(-3px); }

/* WORLD HERO */
.world-hero {
  text-align: center; padding: 16px 16px 22px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--wc) 0%, transparent 100%);
}
.world-hero > *:not(.stage-scenery) { position: relative; z-index: 1; }
.stage-scenery { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; z-index: 0; opacity: .55; pointer-events: none; }
.back-btn {
  position: absolute; left: 12px; top: 12px;
  background: rgba(0,0,0,.3); color: #fff; border: none; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.back-btn:active { transform: scale(.94); }
.hero-pill { background: rgba(0,0,0,.3); color: #fff; padding: 3px 10px; border-radius: 999px; }
.song-card {
  margin: 16px auto 0; max-width: 460px; background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 12px 14px; color: #fff;
}

/* TRINITY CARD (funzioni + grammatica del grado) */
.trinity-card { background: rgba(124,93,231,.15); border: 1px solid rgba(124,93,231,.4); border-radius: 16px; padding: 12px 14px; }
.trinity-badge { display: inline-block; background: rgba(255,255,255,.16); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; letter-spacing: .3px; }
.trinity-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.trinity-ico { font-size: 18px; line-height: 1.2; }

/* VOCAB CHIPS */
.vocab-chip {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: #fff; padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.vocab-chip:active { transform: scale(.94); background: rgba(255,255,255,.22); }

/* MISSION ROW */
.mission-row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-left: 5px solid var(--mc); border-radius: 14px; padding: 12px 14px;
}
.mission-row:not(:disabled):active { transform: scale(.985); background: rgba(255,255,255,.12); }
.mission-ico { font-size: 26px; width: 40px; text-align: center; }
.boss-tag { background: #ff3d68; color: #fff; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 6px; letter-spacing: .5px; }

/* GAME SHELL */
.game-shell { padding: 8px 16px 40px; }
.game-head {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, var(--wc), rgba(0,0,0,.3));
  border-radius: 16px; padding: 12px 16px; margin-bottom: 16px;
}
.game-body { max-width: 480px; margin: 0 auto; }

.big-listen {
  width: 100%; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25);
  padding: 14px; border-radius: 14px; font-weight: 800; font-size: 16px;
}
.big-listen:active { transform: scale(.97); }
.big-listen:disabled { opacity: .6; }

.opt-card {
  background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.18);
  border-radius: 18px; padding: 22px 0; display: flex; justify-content: center;
}
.opt-card:active { transform: scale(.93); background: rgba(255,255,255,.2); }

.match-word {
  width: 100%; background: rgba(255,255,255,.12); color: #fff; font-weight: 800;
  border: 2px solid rgba(255,255,255,.2); border-radius: 14px; padding: 14px 8px; font-size: 15px;
}
.match-emoji {
  width: 100%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.18);
  border-radius: 14px; padding: 8px; display: flex; justify-content: center;
}
.match-word:active, .match-emoji:active { transform: scale(.95); }

/* LYRICS */
.lyrics { background: rgba(0,0,0,.25); border-radius: 16px; padding: 14px; }
.lyric-line {
  color: rgba(255,255,255,.6); padding: 8px 10px; border-radius: 10px;
  font-size: 17px; transition: all .2s; margin-bottom: 2px;
}
.lyric-on { background: rgba(255,255,255,.18); color: #fff; transform: scale(1.04); box-shadow: 0 0 18px rgba(255,255,255,.2); }

/* RHYTHM */
.rhythm-stage {
  height: 180px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); border-radius: 16px; border: 1px dashed rgba(255,255,255,.2);
}
.rhythm-word { text-align: center; animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tap-pad {
  width: 100%; background: linear-gradient(160deg, var(--wc), rgba(0,0,0,.4)); color: #fff;
  font-weight: 900; font-size: 22px; padding: 26px; border-radius: 20px; border: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.tap-pad:active { transform: scale(.96); }

/* SENTENCE BUILDER */
.build-line {
  min-height: 56px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: rgba(0,0,0,.25); border: 1px dashed rgba(255,255,255,.25); border-radius: 14px; padding: 12px;
}
.built-word { background: var(--wc); color: #fff; font-weight: 800; font-size: 15px; padding: 6px 12px; border-radius: 10px; animation: pop .2s ease; }
.tile-wrap { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.word-tile {
  background: rgba(255,255,255,.14); color: #fff; font-weight: 800; font-size: 15px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.22);
}
.word-tile:active { transform: scale(.92); background: rgba(255,255,255,.28); }

/* ECHO */
.echo-card {
  text-align: center; background: rgba(0,0,0,.25); border-radius: 18px; padding: 20px;
}
.mic-btn {
  width: 100%; background: linear-gradient(120deg,#ff3d68,#ff8a3d); color: #fff;
  border: none; font-weight: 900; font-size: 17px; padding: 16px; border-radius: 16px;
}
.mic-btn:active { transform: scale(.97); }
.boss-glow { text-shadow: 0 0 14px rgba(255,210,80,.9); }

/* RESULT */
.result-modal {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 70vh; text-align: center; animation: pop .3s ease;
}
.done-btn {
  background: linear-gradient(120deg,#06d6a0,#1b9aaa); color: #fff; border: none;
  font-weight: 900; font-size: 17px; padding: 14px 30px; border-radius: 16px; width: 100%;
}
.done-btn:active { transform: scale(.97); }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 6px;
  background: rgba(18,10,42,.92); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.1);
}
.nav-btn {
  flex: 1; max-width: 130px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: rgba(255,255,255,.55); background: none; border: none; padding: 6px; border-radius: 12px;
}
.nav-on { color: #fff; background: rgba(255,255,255,.12); }
.nav-btn:active { transform: scale(.94); }

/* PROFILE */
.prog-wrap { background: rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; }
.prog-track { height: 12px; background: rgba(0,0,0,.35); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg,#06d6a0,#ffd166,#ff6b6b); border-radius: 999px; transition: width .5s; }
.stat-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  padding: 12px 6px; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.badge-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 10px 4px; display: flex; flex-direction: column; align-items: center; aspect-ratio: 1;
  justify-content: center;
}
.badge-gold { background: linear-gradient(160deg, rgba(255,209,102,.35), rgba(255,140,0,.15)); border-color: rgba(255,209,102,.6); box-shadow: 0 0 16px rgba(255,209,102,.25); }

/* TRINITY LEVEL + STAGE PROGRESS (diario) */
.trinity-level {
  background: linear-gradient(120deg, rgba(124,93,231,.35), rgba(255,209,102,.18));
  border: 1px solid rgba(255,209,102,.4); border-radius: 16px; padding: 12px 14px; text-align: center;
}
.stage-prog { margin-bottom: 10px; }

/* TRINITY MAP (area genitori) */
.trinity-map {
  position: relative; z-index: 2; width: 100%; max-width: 560px; margin: 12px auto;
  background: linear-gradient(180deg, #221450, #160c33); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 16px;
}
.tmap-row { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px 10px; margin: 5px 0; }
.tmap-tag { background: rgba(255,255,255,.14); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }

/* SETTINGS */
.set-sec { color: rgba(255,255,255,.55); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; margin: 18px 0 8px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
}
.toggle { width: 52px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.2); border: none; position: relative; transition: background .2s; }
.toggle-on { background: #06d6a0; }
.knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle-on .knob { left: 25px; }
.info-box { background: rgba(124,93,231,.18); border: 1px solid rgba(124,93,231,.4); border-radius: 14px; padding: 12px 14px; color: #fff; font-size: 13px; line-height: 1.5; }
.ghost-btn { width: 100%; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px; font-weight: 700; }
.warn-btn { width: 100%; background: rgba(255,190,11,.2); color: #ffe08a; border: 1px solid rgba(255,190,11,.5); border-radius: 12px; padding: 12px; font-weight: 800; }
.danger-btn { background: rgba(255,61,104,.25); color: #ffb3c4; border: 1px solid rgba(255,61,104,.5); border-radius: 12px; padding: 12px; font-weight: 800; }
.ghost-btn:active, .warn-btn:active, .danger-btn:active { transform: scale(.98); }

/* CELEBRAZIONI */
.celebrate-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(10,6,26,.82); backdrop-filter: blur(6px); overflow: hidden;
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.world-complete, .certificate {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center;
  text-align: center; max-width: 360px; width: 100%; animation: pop .35s ease;
}
.certificate {
  background: linear-gradient(165deg, #2a1860, #170d36); border: 2px solid rgba(255,209,102,.5);
  border-radius: 22px; padding: 22px 20px; box-shadow: 0 0 40px rgba(255,209,102,.2);
}
.cert-seal { font-size: 40px; }
.cert-rule { height: 2px; width: 70px; background: rgba(255,255,255,.3); margin: 10px auto; border-radius: 2px; }
.badge-big {
  font-size: 56px; margin: 12px 0 6px; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--wc), rgba(0,0,0,.4)); border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3); box-shadow: 0 0 30px var(--wc);
}
/* coriandoli */
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.confetti span {
  position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; opacity: .9;
  animation: fall 2.6s linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: .7; }
}

/* =========================================================
   ZIPPY LIVE · SPEAK FREE — mood "Fully AI" (nero/navy + oro, cinematografico)
   ========================================================= */
:root {
  --gold-a: #FFD75E; --gold-b: #F5A623;         /* oro Fully */
  --ink-1: #0a0b16; --ink-2: #0c1732;           /* nero → navy */
  --glow-blue: #2E7BFF;
}
.zl-gold {
  background: linear-gradient(100deg, var(--gold-a), var(--gold-b));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold-b);
}

/* --- CTA premium nella schermata mondo --- */
.speakfree-cta {
  width: 100%; display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 14px 16px; border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--ink-1), var(--ink-2) 60%, #10203f);
  border: 1px solid rgba(246,196,69,.32);
  box-shadow: 0 10px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(246,196,69,.08) inset, 0 -14px 40px rgba(46,123,255,.12) inset;
}
/* scia di luce animata (oro + blu, come Fully) */
.sf-glow { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.sf-glow::before {
  content: ""; position: absolute; top: -40%; left: -30%; width: 60%; height: 180%;
  background: linear-gradient(75deg, transparent, rgba(255,215,94,.35), rgba(46,123,255,.28), transparent);
  filter: blur(14px); transform: skewX(-18deg); animation: sfSheen 3.6s ease-in-out infinite;
}
.sf-glow::after {
  content: ""; position: absolute; right: -10%; bottom: -60%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(245,166,35,.28), transparent 65%); pointer-events: none;
}
@keyframes sfSheen { 0% { left: -35%; } 55%,100% { left: 130%; } }
.speakfree-cta:active { transform: scale(.985); }
.sf-emoji {
  flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: radial-gradient(circle at 50% 40%, rgba(255,215,94,.22), rgba(0,0,0,.25)); position: relative;
  box-shadow: 0 0 22px rgba(255,215,94,.25);
}
.sf-txt { flex: 1 1 auto; min-width: 0; position: relative; }
.sf-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 1.4px; color: var(--gold-b); text-transform: uppercase; }
.sf-title { color: #fff; font-weight: 900; font-size: 20px; line-height: 1.05; margin-top: 1px; }
.sf-gold { background: linear-gradient(100deg, var(--gold-a), var(--gold-b)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sf-sub { color: rgba(255,255,255,.78); font-size: 12.5px; margin-top: 2px; }
.sf-sub b { color: var(--gold-a); font-weight: 800; }
.sf-stars { color: var(--gold-a); font-weight: 900; font-size: 15px; flex: 0 0 auto; position: relative; letter-spacing: 1px; }
.sf-arrow { font-size: 26px; color: rgba(255,215,94,.9); }

/* --- schermata conversazione --- */
.talk-eyebrow {
  text-align: center; font-size: 10px; font-weight: 800; letter-spacing: 1.6px;
  color: var(--gold-b); text-transform: uppercase; margin-bottom: 8px;
}
.talk-log {
  max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 11px; margin-bottom: 12px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(12,23,50,.72), rgba(10,11,22,.72));
  border: 1px solid rgba(246,196,69,.16);
  box-shadow: 0 8px 26px rgba(0,0,0,.4) inset, 0 0 0 1px rgba(0,0,0,.2);
}
.bubble {
  max-width: 82%; padding: 9px 13px; border-radius: 15px; font-size: 14px; line-height: 1.35;
  display: flex; gap: 7px; align-items: flex-start; animation: pop .22s ease;
}
.b-zippy {
  align-self: flex-start; color: #fff; border-bottom-left-radius: 4px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-left: 2px solid rgba(255,215,94,.6);
}
.b-child {
  align-self: flex-end; color: #1a1204; font-weight: 800; border-bottom-right-radius: 4px;
  background: linear-gradient(120deg, var(--gold-a), var(--gold-b));
  box-shadow: 0 4px 16px rgba(245,166,35,.35);
}
.b-child.b-soft { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.b-face { font-size: 15px; line-height: 1.3; }

.talk-now { text-align: center; position: relative; }
.talk-emoji {
  display: grid; place-items: center; margin-bottom: 6px; position: relative;
}
.talk-emoji::before {
  content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,94,.28), transparent 65%); filter: blur(4px); z-index: 0;
}
.talk-emoji > * { position: relative; z-index: 1; }
.talk-hint {
  color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 10px;
  background: rgba(255,215,94,.1); border: 1px solid rgba(255,215,94,.28);
  padding: 9px 14px; border-radius: 13px; display: inline-block;
}

/* mic: pillola dorata con anello pulsante quando ascolta */
.mic-btn.talk-mic {
  background: linear-gradient(120deg, var(--gold-a), var(--gold-b)); color: #1a1204;
  letter-spacing: .6px; text-transform: uppercase; position: relative;
  box-shadow: 0 8px 26px rgba(245,166,35,.4);
}
.mic-btn.talk-mic.animate-pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 18px;
  border: 2px solid rgba(255,215,94,.7); animation: micRing 1.1s ease-out infinite;
}
@keyframes micRing { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.12); opacity: 0; } }

.say-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.say-chip {
  background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(246,196,69,.28);
  font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 14px;
}
.say-chip:active { transform: scale(.95); background: rgba(255,215,94,.16); }
.say-chip-sm { font-size: 12px; padding: 7px 11px; opacity: .92; }

/* finale cinematografico: la conversazione diventa melodia */
.talk-finale {
  text-align: center; display: flex; flex-direction: column; align-items: center; padding: 14px; position: relative;
}
.talk-finale::before {
  content: ""; position: absolute; top: 4px; width: 240px; height: 200px;
  background: radial-gradient(circle, rgba(255,215,94,.22), rgba(46,123,255,.1) 45%, transparent 70%);
  filter: blur(8px); z-index: 0;
}
.talk-finale > * { position: relative; z-index: 1; }
.melody-dots { display: flex; gap: 9px; justify-content: center; }
.mel-dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: linear-gradient(120deg, var(--gold-a), var(--gold-b));
  box-shadow: 0 0 16px rgba(255,215,94,.85); animation: melPop .5s ease both;
}
@keyframes melPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.4); } 100% { transform: scale(1); opacity: 1; } }

/* =========================================================
   SING LIVE — coach di canto con pitch detection (mood Fully)
   ========================================================= */
.zl-hublabel { text-align: center; font-size: 11px; color: rgba(255,255,255,.75); margin-bottom: 10px; }
.zl-hublabel b { color: var(--gold-a); }
.sing-cta { background: linear-gradient(120deg, #10203f, var(--ink-2) 60%, #1a1030); }

.song-staff { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.note-pill {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px;
  padding: 7px 9px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
}
.np-word { color: #fff; font-weight: 800; font-size: 12px; }
.np-note { font-size: 11px; font-weight: 900; color: rgba(255,255,255,.55); }
.np-todo { opacity: .55; }
.np-cur { border-color: rgba(255,215,94,.7); box-shadow: 0 0 16px rgba(255,215,94,.35); animation: npPulse 1.1s ease-in-out infinite; }
.np-cur .np-note { color: var(--gold-a); }
.np-done { background: linear-gradient(120deg, var(--gold-a), var(--gold-b)); border-color: transparent; }
.np-done .np-word, .np-done .np-note { color: #1a1204; }
@keyframes npPulse { 0%,100% { box-shadow: 0 0 12px rgba(255,215,94,.3); } 50% { box-shadow: 0 0 22px rgba(255,215,94,.6); } }

/* =========================================================
   GRAPHIC OVERHAUL v2 — cinematografico "Fully-grade"
   ========================================================= */
/* --- sfondo vivo + vignetta + strato atmosfera --- */
.app-bg {
  position: relative;
  background:
    radial-gradient(1200px 560px at 50% -10%, #4a2a9e 0%, transparent 60%),
    radial-gradient(760px 440px at 88% 4%, rgba(255,184,84,.12) 0%, transparent 55%),
    radial-gradient(720px 440px at 6% 28%, rgba(46,123,255,.18) 0%, transparent 55%),
    linear-gradient(180deg, #241552 0%, #130a2e 62%, #0b0620 100%);
  min-height: 100vh;
}
.app-bg::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 92% at 50% 38%, transparent 54%, rgba(5,3,15,.6) 100%);
}
.atmosphere { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.app-bg > *:not(.atmosphere) { position: relative; z-index: 2; }

/* --- Zippy: aura pulsante --- */
.zippy-aura { transform-origin: center; animation: zAura 3.2s ease-in-out infinite; }
@keyframes zAura { 0%,100% { opacity: .7; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.05); } }

/* --- HERO cinematografica --- */
.intro-rays {
  position: absolute; top: -10%; left: 50%; width: 150vw; height: 150vw; max-width: 1200px; max-height: 1200px;
  transform: translateX(-50%); pointer-events: none; opacity: .5;
  background: conic-gradient(from 0deg, transparent 0 8deg, rgba(255,215,94,.10) 9deg 12deg, transparent 13deg 26deg,
    rgba(120,170,255,.09) 27deg 30deg, transparent 31deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 72%);
  animation: rays 40s linear infinite;
}
@keyframes rays { to { transform: translateX(-50%) rotate(360deg); } }
.intro-stage { position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.intro-halo {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,215,94,.35), rgba(124,92,230,.10) 55%, transparent 72%);
  filter: blur(6px); animation: haloPulse 3.4s ease-in-out infinite;
}
.intro-halo.halo-2 { inset: -18px; background: radial-gradient(circle, rgba(46,123,255,.18), transparent 68%); animation-delay: 1.2s; }
@keyframes haloPulse { 0%,100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.08); opacity: 1; } }
.intro-logo img {
  width: 150px; height: 150px; object-fit: contain; border-radius: 30px;
  background: #fff; padding: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 40px rgba(255,215,94,.25);
  animation: bob 3s ease-in-out infinite; position: relative; z-index: 1;
}
.intro-orbit {
  position: absolute; font-size: 20px; color: rgba(255,235,180,.85);
  text-shadow: 0 0 10px rgba(255,215,94,.7); animation: orbitFloat 4s ease-in-out infinite;
}
.intro-orbit.o1 { top: 6%; left: 8%; animation-delay: 0s; }
.intro-orbit.o2 { top: 16%; right: 4%; animation-delay: .8s; font-size: 24px; }
.intro-orbit.o3 { bottom: 10%; right: 14%; animation-delay: 1.6s; }
@keyframes orbitFloat { 0%,100% { transform: translateY(0) rotate(-6deg); opacity: .5; } 50% { transform: translateY(-12px) rotate(6deg); opacity: 1; } }
.intro-title { color: #fff; font-weight: 900; font-size: 38px; margin: 22px 0 2px; letter-spacing: -.5px; }
.intro-gold {
  background: linear-gradient(100deg, #FFD75E, #F5A623);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.intro-tagline {
  color: #FFD75E; font-weight: 800; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255,215,94,.4);
}
.intro-btn {
  margin-top: 26px; background: linear-gradient(120deg, #FFD75E, #F5A623); color: #1a1204; border: none;
  font-weight: 900; font-size: 18px; padding: 16px 36px; border-radius: 999px; position: relative; overflow: hidden;
  box-shadow: 0 12px 34px rgba(245,166,35,.5), 0 0 0 1px rgba(255,255,255,.25) inset;
}
.intro-btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg);
  animation: btnSheen 3.2s ease-in-out infinite;
}
@keyframes btnSheen { 0% { left: -60%; } 55%,100% { left: 130%; } }

/* --- Sistema card PREMIUM: profondità + bordo luminoso --- */
.world-hero {
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06) inset,
    0 -20px 60px rgba(255,255,255,.06) inset;
}
.trinity-card, .song-card {
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05) inset;
  backdrop-filter: blur(6px);
}
.mission-row {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  box-shadow: 0 8px 22px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.05) inset;
  border-left: 3px solid var(--mc, #fff);
}
.mission-row:not(:disabled):hover { box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 22px -6px var(--mc, #fff); }
.vocab-chip {
  box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06) inset;
  transition: transform .12s ease, box-shadow .2s ease;
}
.vocab-chip:hover { box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 18px -4px var(--gold-a, #FFD75E); }

/* --- MAPPA: nodi con profondità e percorso luminoso --- */
.node-btn {
  box-shadow: 0 12px 26px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.node-done { box-shadow: 0 0 26px var(--wc), 0 12px 26px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.15) inset; }
.node-cur { border-color: #FFD75E; }
@keyframes nodepulse { 0% { box-shadow: 0 0 0 0 rgba(255,215,94,.6), 0 12px 26px rgba(0,0,0,.4); } 70%,100% { box-shadow: 0 0 0 14px rgba(255,215,94,0), 0 12px 26px rgba(0,0,0,.4); } }
.stage-banner {
  box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.07) inset;
}
.topbar { backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }

@media (prefers-reduced-motion: reduce) {
  .intro-rays, .intro-halo, .intro-orbit, .intro-btn::after, .zippy-aura, .zippy-bob { animation: none !important; }
}

/* --- personaggio Zippy reale nella hero (immagine trasparente, non card) --- */
.intro-logo.hero-char img {
  width: 200px; height: 200px; object-fit: contain; border-radius: 0;
  background: none; padding: 0; box-shadow: none;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.5)) drop-shadow(0 0 26px rgba(255,215,94,.35));
  animation: bob 3s ease-in-out infinite; position: relative; z-index: 1;
}
.intro-stage { width: 220px; height: 220px; }

.sing-intro { text-align: center; display: flex; flex-direction: column; align-items: center; }
.sing-target { text-align: center; margin-bottom: 12px; }
.sing-word { color: #fff; font-size: 20px; display: inline-flex; align-items: center; gap: 8px; }
.sing-note-big {
  font-size: 40px; font-weight: 900; margin-top: 2px; letter-spacing: 1px;
  background: linear-gradient(100deg, var(--gold-a), var(--gold-b));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* PITCH METER: ago che scorre; centrato = intonato */
.pitch-meter { text-align: center; margin-top: 6px; }
.pm-track {
  position: relative; height: 20px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, rgba(46,123,255,.5), rgba(255,255,255,.14) 50%, rgba(239,71,111,.5));
  border: 1px solid rgba(255,255,255,.14);
}
.pm-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.7); transform: translateX(-1px); }
.pm-needle {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%); transition: left .06s linear;
  background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6);
}
.in-tune .pm-needle { background: linear-gradient(120deg, var(--gold-a), var(--gold-b)); box-shadow: 0 0 20px rgba(255,215,94,.95); width: 20px; height: 20px; }
.in-tune .pm-track { box-shadow: 0 0 22px rgba(255,215,94,.5); }
.pm-label { color: #fff; font-weight: 800; font-size: 14px; margin-top: 8px; }
.in-tune .pm-label { color: var(--gold-a); }
.pm-you { color: rgba(255,255,255,.55); font-weight: 600; }
.sing-tap { text-align: center; margin-top: 8px; }

/* ============================================================
   ALLINEAMENTO A FULLY — font Poppins + palette navy + oro Fully
   (design tokens presi da fullyapp.ai / deploy-online/tokens.css)
   ============================================================ */
:root {
  --gold-a: #f7d548; --gold-b: #ffbf00;   /* oro esatto di Fully */
  --fully-blue: #2f8fff;
}
body, .intro, .onb, .game-shell {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* sfondo navy di Fully (con leggeri glow blu/oro) */
.app-bg {
  background:
    radial-gradient(900px 460px at 50% -8%, rgba(47,143,255,.16) 0%, transparent 60%),
    radial-gradient(760px 440px at 88% 4%, rgba(247,213,72,.10) 0%, transparent 55%),
    radial-gradient(720px 440px at 6% 30%, rgba(47,143,255,.12) 0%, transparent 55%),
    linear-gradient(180deg, #030611 0%, #071127 34%, #101b45 72%, #162766 100%);
}
/* titoli Poppins: tracking stretto come Fully */
.intro-title, .sf-title, .onb-title, .intro-tagline { letter-spacing: -.02em; }
.intro-tagline { letter-spacing: 2px; }
/* CTA e testo-oro allineati all'oro Fully (gradiente 135°) */
.intro-btn {
  background: linear-gradient(135deg, #f7d548 0%, #ffbf00 100%);
  box-shadow: 0 12px 34px rgba(255,191,0,.45), 0 0 0 1px rgba(255,255,255,.25) inset;
}
.intro-gold, .sf-gold {
  background: linear-gradient(135deg, #f7d548, #ffbf00);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mic-btn.talk-mic, .np-done, .b-child, .mel-dot, .sing-note-big {
  background: linear-gradient(135deg, #f7d548, #ffbf00);
}

/* ============================================================
   COLORI BRAND ZIPPY — arancione + blu molto scuro + bianco
   (l'ORO è di Fully; Zippy usa l'ARANCIONE come firma)
   ============================================================ */
:root {
  --zippy-orange: #ff8a2a;
  --zippy-orange-lo: #f5721a;
  --zippy-orange-hi: #ffb05a;
  --zippy-navy: #0a1030;      /* blu molto scuro (outline/base) */
  /* riuso i "gold" come accento arancione: così tutto l'accento diventa arancione */
  --gold-a: #ffb05a;
  --gold-b: #f5721a;
}
.intro-btn {
  background: linear-gradient(135deg, #ffb05a 0%, #f5721a 100%);
  box-shadow: 0 12px 34px rgba(245,114,26,.45), 0 0 0 1px rgba(255,255,255,.25) inset;
}
.intro-gold, .sf-gold {
  background: linear-gradient(135deg, #ffb05a, #f5721a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mic-btn.talk-mic, .np-done, .b-child, .mel-dot, .sing-note-big {
  background: linear-gradient(135deg, #ffb05a, #f5721a);
}
.intro-tagline, .sf-eyebrow, .talk-eyebrow, .sf-arrow { color: #ff9a3d; }

/* ============================================================
   BOTTONI "PIASTRA" Brawl-Stars (immagini 9-slice) — art/ui/
   ============================================================ */
.plate {
  -webkit-appearance: none; appearance: none;
  border-style: solid; border-color: transparent;
  border-width: 30px 58px;                 /* frame renderizzato: top/bot, left/right */
  border-image-source: url("art/ui/btn_primary.png?v=1");
  border-image-slice: 150 235 fill;        /* taglio dagli angoli (px del 640x430) */
  border-image-repeat: stretch;
  background: transparent; color: #fff;
  font-family: 'Poppins', system-ui, sans-serif; font-weight: 900; font-size: 17px; letter-spacing: .3px;
  padding: 2px 6px; min-height: 24px; min-width: 130px;
  text-shadow: 0 2px 4px rgba(0,0,0,.55);
  cursor: pointer; transition: transform .08s ease, filter .15s ease;
}
.plate:hover { filter: brightness(1.05); }
.plate:active { transform: translateY(3px) scale(.99); }
.plate.secondary { border-image-source: url("art/ui/btn_secondary.png?v=1"); }
/* neutralizza gli stili pillola quando un bottone usa la piastra */
.intro-btn.plate, .done-btn.plate, .big-listen.plate, .mic-btn.plate {
  border-radius: 0; box-shadow: none; background: transparent;
}

/* bottoni TONDI (icona già dentro l'immagine) */
.rbtn {
  -webkit-appearance: none; appearance: none; border: none; background: transparent;
  width: 76px; height: 76px; background-size: 100% 100%; background-repeat: no-repeat; background-position: center;
  cursor: pointer; transition: transform .08s ease, filter .15s ease; padding: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.4));
}
.rbtn:active { transform: translateY(3px) scale(.96); }
.rbtn-play { background-image: url("art/ui/btn_play.png?v=1"); }
.rbtn-mic  { background-image: url("art/ui/btn_mic.png?v=1"); }

/* tile risposta (giochi a tocco) */
.tile-plate {
  border-style: solid; border-color: transparent; border-width: 44px;
  border-image-source: url("art/ui/tile_answer.png?v=1");
  border-image-slice: 150 fill; border-image-repeat: stretch;
  background: transparent;
}

/* === ROLLOUT piastre su TUTTI i bottoni d'azione (via classi esistenti) === */
.done-btn, .big-listen, .mic-btn.talk-mic, .mic-btn {
  background: transparent !important;
  border-style: solid !important; border-color: transparent !important;
  border-width: 26px 54px !important;
  border-image-source: url("art/ui/btn_primary.png?v=1") !important;
  border-image-slice: 150 235 fill !important;
  border-image-repeat: stretch !important;
  border-radius: 0 !important; box-shadow: none !important;
  color: #fff !important; text-shadow: 0 2px 4px rgba(0,0,0,.55);
  min-height: 22px; padding: 2px 6px !important;
}
.back-btn {
  position: absolute; left: 12px; top: 12px;
  background: transparent !important;
  border-style: solid !important; border-color: transparent !important;
  border-width: 16px 34px !important;
  border-image-source: url("art/ui/btn_secondary.png?v=1") !important;
  border-image-slice: 150 235 fill !important; border-image-repeat: stretch !important;
  border-radius: 0 !important; box-shadow: none !important;
  color: #fff !important; font-weight: 800; padding: 0 2px !important; font-size: 13px;
}

/* ============================================================
   PUSH BRAWL STARS — font grasso con contorno + pannelli bordati
   ============================================================ */
:root { --bs-ol: #0a1030; }   /* contorno navy molto scuro */

/* Titoli e testi-chiave: font chunky "Lilita One" + contorno scuro dietro (paint-order) */
.intro-title, .intro-tagline, .sf-title, .sf-eyebrow, .talk-eyebrow, .onb-title,
.stage-banner div, .stage-banner-pct, .node-name, .cert-seal, .badge-tag,
.mission-row .text-white, .sing-note-big, .pm-label, .trinity-badge {
  font-family: 'Lilita One', 'Poppins', system-ui, sans-serif !important;
  letter-spacing: .4px;
}
.intro-title, .sf-title, .onb-title {
  -webkit-text-stroke: 3px var(--bs-ol); paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0,0,0,.32);
}

/* Testo dei BOTTONI: font chunky + spesso contorno scuro (look Brawl) */
.plate, .intro-btn, .done-btn, .big-listen, .mic-btn, .say-chip, .word-tile, .vocab-chip, .node-go {
  font-family: 'Lilita One', 'Poppins', system-ui, sans-serif !important;
  letter-spacing: .5px;
}
.plate, .intro-btn, .done-btn, .big-listen, .mic-btn {
  -webkit-text-stroke: 2px var(--bs-ol); paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(0,0,0,.35) !important;
}

/* PANNELLI/CARD: bordo scuro spesso + bevel "ciccione" (stile UI Brawl) */
.trinity-card, .song-card, .talk-log, .speakfree-cta, .stage-banner,
.vocab-chip, .say-chip, .note-pill, .world-card, .role-card, .stat-card,
.onb-input, .age-chip, .avatar-pick, .chip, .prog-wrap, .trinity-level {
  border: 3px solid var(--bs-ol) !important;
  box-shadow: 0 6px 0 rgba(0,0,0,.38), inset 0 3px 0 rgba(255,255,255,.16) !important;
}
.mission-row {
  border: 3px solid var(--bs-ol) !important; border-left-width: 8px !important;
  box-shadow: 0 6px 0 rgba(0,0,0,.38), inset 0 3px 0 rgba(255,255,255,.14) !important;
}
.node-btn { border: 4px solid var(--bs-ol) !important; box-shadow: 0 8px 0 rgba(0,0,0,.4), inset 0 4px 0 rgba(255,255,255,.2) !important; }
.age-chip.on, .avatar-pick.on { border-color: var(--zippy-orange, #ff8a2a) !important; }

/* chip vocab più ciccioni */
.vocab-chip { border-radius: 14px !important; padding: 9px 14px !important; font-weight: 900; }

/* ============================================================
   MAPPA DIPINTA per tappa (stile Fully/Royal Match) — nodi sulle piazzole
   ============================================================ */
.stage-map {
  position: relative; width: 100%; max-width: 460px; margin: 6px auto 2px;
  aspect-ratio: 900 / 1599; background-size: cover; background-position: center;
  border-radius: 20px; overflow: hidden;
  border: 3px solid var(--bs-ol); box-shadow: 0 8px 0 rgba(0,0,0,.42), inset 0 3px 0 rgba(255,255,255,.12);
}
.map-node {
  position: absolute; transform: translate(-50%, -50%);
  width: 20%; aspect-ratio: 1; border: none; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .1s ease;
}
.map-node:not(:disabled):active { transform: translate(-50%, -50%) scale(.9); }
.map-node:not(:disabled):hover { transform: translate(-50%, -50%) scale(1.06); }
.map-node .ico-img, .map-node > span:first-child { filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.map-lock { filter: grayscale(.7) brightness(.7); }
.map-cur::before {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  border: 3px solid #fff; animation: mapPulse 1.5s ease-out infinite;
}
@keyframes mapPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 70%,100% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }
.map-badge { position: absolute; top: 0; right: 4%; font-size: 15px; }
.map-go {
  position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,#ffb05a,#f5721a); color: #1a1204;
  font-family: 'Lilita One', sans-serif; font-size: 10px; letter-spacing: .5px;
  padding: 2px 9px; border-radius: 999px; border: 2px solid var(--bs-ol); white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0,0,0,.35);
}
.map-stars { position: absolute; bottom: -2%; left: 50%; transform: translateX(-50%); font-size: 10px; color: #ffcf4d; letter-spacing: 1px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.map-name {
  position: absolute; bottom: -22%; left: 50%; transform: translateX(-50%);
  font-family: 'Lilita One', sans-serif; font-size: 10px; color: #fff; white-space: nowrap;
  background: rgba(10,16,48,.72); border: 2px solid var(--bs-ol); padding: 1px 7px; border-radius: 999px;
  -webkit-text-stroke: 0; text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* Zippy 3D reale sul mondo attuale (sta in piedi sulla piazzola) */
.map-zippy {
  width: 145%; height: auto; position: absolute; bottom: 8%; left: 50%;
  transform: translateX(-50%); pointer-events: none;
  filter: drop-shadow(0 5px 7px rgba(0,0,0,.55));
  animation: bob 2.6s ease-in-out infinite;
}

/* ============================================================
   GAME FEEL — juice: particelle, squash bottoni, transizioni, pop-in
   ============================================================ */
:root { --ease-pop: cubic-bezier(.34,1.56,.64,1); }
.spark-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.spark {
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%,-50%); box-shadow: 0 0 7px currentColor;
  animation: sparkFly .62s cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes sparkFly {
  0% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; }
}
/* squash su tutti i bottoni (bassa specificità: non tocca chi ha già un :active) */
button { transition: transform .09s var(--ease-pop); }
button:active { transform: scale(.94); }
/* transizione schermata più viva */
@keyframes screenIn { 0% { opacity: 0; transform: translateY(16px) scale(.985); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.screen-anim { animation: screenIn .34s var(--ease-pop); }
/* nodi mappa: pop-in a scatti + press */
@keyframes mapPop { 0% { transform: translate(-50%,-50%) scale(0); } 70% { transform: translate(-50%,-50%) scale(1.14); } 100% { transform: translate(-50%,-50%) scale(1); } }
.map-node { animation: mapPop .45s var(--ease-pop) both; }
.map-node:not(:disabled):active { transform: translate(-50%,-50%) scale(.86) !important; }
.map-node:not(:disabled):hover { transform: translate(-50%,-50%) scale(1.08); }
