/* ==========================================================================
   BTV Teoria Musical v2 — design system
   Tema escuro por defeito. Para o tema claro: data-tema="claro" (ou tema="claro" no shortcode).
   ========================================================================== */

.btv-ex {
  /* Cores */
  --btv-bg: #0B0F19;
  --btv-card: #161D2B;
  --btv-card-2: #1C2537;
  --btv-card-3: #243047;
  --btv-line: rgba(148, 163, 184, .14);
  --btv-line-2: rgba(148, 163, 184, .26);
  --btv-fg: #F5F7FA;
  --btv-muted: #94A3B8;
  --btv-accent: #FF7043;
  --btv-accent-2: #FF8A65;
  --btv-accent-soft: rgba(255, 112, 67, .14);
  --btv-ink: #0B0F19;              /* texto sobre botões de cor (contraste AA) */
  --btv-ok: #22C55E;
  --btv-ok-soft: rgba(34, 197, 94, .14);
  --btv-bad: #EF4444;
  --btv-bad-soft: rgba(239, 68, 68, .14);
  --btv-gold: #FBBF24;
  --btv-third: #38BDF8;
  --btv-fifth: #A78BFA;
  /* Forma */
  --btv-r-sm: 10px;
  --btv-r: 14px;
  --btv-r-lg: 18px;
  --btv-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .28);
  --btv-ease: cubic-bezier(.2, .8, .2, 1);
  --btv-font: Inter, "InterVariable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  font-family: var(--btv-font);
  text-align: left;
  font-size: 16px;
  line-height: 1.5;
  color: var(--btv-fg);
  background: var(--btv-bg);
  border-radius: 20px;
  padding: 28px;
  margin: 28px 0;
  max-width: 1080px;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  isolation: isolate;
}
.btv-ex *, .btv-ex *::before, .btv-ex *::after { box-sizing: border-box; }
.btv-ex [hidden] { display: none !important; }
.btv-ex h2, .btv-ex h3, .btv-ex p { margin: 0; color: inherit; font-family: inherit; letter-spacing: -.01em; }
.btv-ex .btv-icon { width: 1.1em; height: 1.1em; flex: none; }

/* Tema claro opcional */
.btv-ex.btv-theme-light {
  --btv-bg: #F4F6FB;
  --btv-card: #FFFFFF;
  --btv-card-2: #F1F4F9;
  --btv-card-3: #E6EBF3;
  --btv-line: rgba(15, 23, 42, .09);
  --btv-line-2: rgba(15, 23, 42, .18);
  --btv-fg: #0F172A;
  --btv-muted: #526077;
  --btv-accent-soft: rgba(255, 112, 67, .12);
  --btv-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}

/* --------------------------------------------------------------------------
   Reset de botões e formulários (os temas WordPress costumam estilizar tudo)
   -------------------------------------------------------------------------- */
.btv-ex button {
  font: inherit; color: inherit; letter-spacing: normal; text-transform: none; text-shadow: none;
  margin: 0; min-height: 0; min-width: 0; line-height: 1.2; box-shadow: none; background-image: none;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.btv-ex button:disabled { cursor: default; }
.btv-ex :focus { outline: none; }
.btv-ex :focus-visible { outline: 2px solid var(--btv-accent); outline-offset: 3px; border-radius: 8px; }
.btv-ex select {
  font: inherit; font-size: .92em; color: var(--btv-fg); background: var(--btv-card-2);
  border: 1px solid var(--btv-line-2); border-radius: var(--btv-r-sm); padding: 9px 36px 9px 12px; min-width: 170px; margin: 0;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.btv-ex select:hover { border-color: var(--btv-accent); }
.btv-ex input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--btv-line-2); border-radius: 6px; background: var(--btv-card-2);
  display: inline-grid; place-content: center; transition: background .15s, border-color .15s;
}
.btv-ex input[type="checkbox"]::after {
  content: ""; width: 10px; height: 6px; border: 2px solid var(--btv-ink); border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--btv-ease);
}
.btv-ex input[type="checkbox"]:checked { background: var(--btv-accent); border-color: var(--btv-accent); }
.btv-ex input[type="checkbox"]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btv-ex .btv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: .95em;
  background: var(--btv-card-2); color: var(--btv-fg);
  transition: transform .12s var(--btv-ease), background-color .15s, border-color .15s, box-shadow .15s, filter .15s;
}
.btv-ex .btv-btn:hover:not(:disabled) { background: var(--btv-card-3); }
.btv-ex .btv-btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btv-ex .btv-btn--primary {
  background: var(--btv-accent); color: var(--btv-ink);
  box-shadow: 0 4px 0 #C2502C, 0 8px 20px rgba(255, 112, 67, .25);
}
.btv-ex .btv-btn--primary:hover:not(:disabled) { background: var(--btv-accent-2); }
.btv-ex .btv-btn--primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #C2502C; }
.btv-ex .btv-btn--ghost { background: transparent; border-color: var(--btv-line-2); }
.btv-ex .btv-btn--ghost:hover:not(:disabled) { background: var(--btv-card-2); border-color: var(--btv-muted); }
.btv-ex .btv-btn--small { padding: 7px 12px; font-size: .85em; border-radius: 10px; }
.btv-ex .btv-btn--levelup { background: var(--btv-ok); color: var(--btv-ink); box-shadow: 0 4px 0 #15803D, 0 8px 20px rgba(34, 197, 94, .25); }
.btv-ex .btv-btn--levelup:hover:not(:disabled) { background: #34D46C; }
.btv-ex .btv-btn--start { padding: 15px 34px; font-size: 1.05em; }
.btv-ex .btv-btn .btv-icon { width: 18px; height: 18px; }

.btv-ex .btv-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: .85em; font-weight: 600;
  border: 1px solid var(--btv-line-2); background: var(--btv-card-2); color: var(--btv-fg); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.btv-ex button.btv-chip:hover, .btv-ex .btv-chip.is-on { border-color: var(--btv-accent); }
.btv-ex .btv-chip--icon { padding: 7px 10px; }
.btv-ex .btv-chip--flame { color: #FDBA74; }
.btv-ex .btv-chip--flame .btv-icon { color: #FB923C; }
.btv-ex .btv-chip--flame.is-zero { color: var(--btv-muted); filter: grayscale(1); }
.btv-ex .btv-link { background: none; border: 0; padding: 4px 2px; color: var(--btv-accent); font-weight: 600; font-size: .9em; }
.btv-ex .btv-link:hover { text-decoration: underline; }
.btv-ex .btv-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .8em; font-weight: 600;
  background: var(--btv-card-3); color: var(--btv-muted);
}
.btv-ex .btv-tag--gold { color: var(--btv-gold); background: rgba(251, 191, 36, .1); }

/* --------------------------------------------------------------------------
   Estrutura do exercício
   -------------------------------------------------------------------------- */
.btv-ex .btv-exercise { display: block; }
.btv-ex .btv-ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 20px; }
.btv-ex .btv-ex-titles { flex: 1 1 260px; min-width: 0; }
.btv-ex .btv-title { font-size: 1.6em; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.btv-ex .btv-title:focus { outline: none; }
.btv-ex .btv-intro { margin-top: 4px; color: var(--btv-muted); font-size: .95em; }
.btv-ex .btv-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 10px; border-radius: 999px;
  border: 1px solid var(--btv-line-2); background: var(--btv-card); color: var(--btv-fg); font-weight: 600; font-size: .88em;
  transition: border-color .15s, transform .15s var(--btv-ease);
}
.btv-ex .btv-back:hover { border-color: var(--btv-accent); transform: translateX(-2px); }
.btv-ex .btv-back .btv-icon { width: 18px; height: 18px; }

/* Estatísticas compactas */
.btv-ex .btv-statbar { display: flex; gap: 8px; }
.btv-ex .btv-stat {
  min-width: 82px; padding: 8px 14px; border-radius: var(--btv-r-sm); background: var(--btv-card); border: 1px solid var(--btv-line);
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15;
}
.btv-ex .btv-stat-v { font-size: 1.15em; font-weight: 800; font-variant-numeric: tabular-nums; }
.btv-ex .btv-stat-l { font-size: .72em; color: var(--btv-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: 2px; }
.btv-ex .btv-stat.is-hot .btv-stat-v { color: #FDBA74; }
.btv-ex .btv-stat.is-hot .btv-stat-v::after { content: " 🔥"; font-size: .8em; }

/* Painel de definições recolhido */
.btv-ex .btv-settings { margin-bottom: 18px; border: 1px solid var(--btv-line); border-radius: var(--btv-r); background: var(--btv-card); }
.btv-ex .btv-settings summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  font-weight: 600; font-size: .92em; color: var(--btv-muted); border-radius: var(--btv-r);
}
.btv-ex .btv-settings summary::-webkit-details-marker { display: none; }
.btv-ex .btv-settings summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--btv-ease); }
.btv-ex .btv-settings[open] summary::after { transform: rotate(-135deg); }
.btv-ex .btv-settings summary:hover { color: var(--btv-fg); }
.btv-ex .btv-settings summary .btv-icon { width: 18px; height: 18px; }
.btv-ex .btv-settings-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 22px; padding: 4px 16px 16px; border-top: 1px solid var(--btv-line); padding-top: 16px; }
.btv-ex .btv-field { display: flex; flex-direction: column; gap: 6px; font-size: .88em; color: var(--btv-muted); margin: 0; }
.btv-ex .btv-field > span { font-weight: 600; }
.btv-ex .btv-field--wide { flex-basis: 100%; }
.btv-ex .btv-check { display: inline-flex; align-items: center; gap: 10px; color: var(--btv-fg); font-size: 1em; cursor: pointer; margin: 0; }
.btv-ex .btv-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.btv-ex .btv-pill {
  padding: 8px 14px; border-radius: 999px; font-size: .9em; font-weight: 600;
  border: 1px solid var(--btv-line-2); background: var(--btv-card-2); color: var(--btv-fg);
  transition: background .15s, border-color .15s, color .15s, transform .12s var(--btv-ease);
}
.btv-ex .btv-pill:hover { border-color: var(--btv-accent); }
.btv-ex .btv-pill:active { transform: scale(.97); }
.btv-ex .btv-pill.is-on { background: var(--btv-accent); border-color: var(--btv-accent); color: var(--btv-ink); }
.btv-ex .btv-custom {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 22px; flex-basis: 100%;
  padding: 16px; border: 1px dashed var(--btv-line-2); border-radius: var(--btv-r); background: var(--btv-card-2);
}
.btv-ex .btv-custom-note { margin: 0 0 14px; font-size: .9em; color: var(--btv-muted); padding: 10px 14px; border-radius: var(--btv-r-sm); background: var(--btv-card); border: 1px solid var(--btv-line); }

/* Palco, pergunta e respostas */
.btv-ex .btv-stage { margin: 0; }
.btv-ex .btv-question { font-size: 1.25em; font-weight: 700; margin: 22px 0 14px; min-height: 0; letter-spacing: -.01em; }
.btv-ex .btv-question:empty { margin: 8px 0 0; }
.btv-ex .btv-answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.btv-ex .btv-answers:focus { outline: none; }
.btv-ex .btv-answers.is-few { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.btv-ex .btv-ans {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 64px; padding: 14px 16px; border-radius: var(--btv-r);
  background: var(--btv-card); color: var(--btv-fg); border: 2px solid var(--btv-line-2);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35); font-weight: 700; font-size: 1.05em;
  transition: transform .12s var(--btv-ease), border-color .15s, background-color .15s, box-shadow .15s, opacity .2s;
}
.btv-ex .btv-ans:hover:not(:disabled) { border-color: var(--btv-accent); transform: translateY(-2px); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.btv-ex .btv-ans:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btv-ex .btv-ans:disabled { cursor: default; }
.btv-ex .btv-ans-k {
  position: absolute; top: 7px; left: 9px; font-size: .62em; font-weight: 700; color: var(--btv-muted);
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; border: 1px solid var(--btv-line-2);
  display: inline-grid; place-items: center; opacity: .8;
}
.btv-ex .btv-ans.is-correct {
  background: var(--btv-ok-soft); border-color: var(--btv-ok); color: #BBF7D0; box-shadow: 0 3px 0 #15803D, 0 0 0 4px rgba(34, 197, 94, .15);
  animation: btv-pop .4s var(--btv-ease);
}
.btv-ex .btv-ans.is-correct::after { content: "✓"; position: absolute; top: 6px; right: 10px; font-size: .85em; color: var(--btv-ok); }
.btv-ex .btv-ans.is-wrong {
  background: var(--btv-bad-soft); border-color: var(--btv-bad); color: #FECACA; box-shadow: 0 3px 0 #B91C1C;
  animation: btv-shake .4s var(--btv-ease);
}
.btv-ex .btv-ans.is-wrong::after { content: "✕"; position: absolute; top: 6px; right: 10px; font-size: .85em; color: var(--btv-bad); }
.btv-ex .btv-ans.is-dim { opacity: .45; }
.btv-ex.btv-theme-light .btv-ans.is-correct { color: #166534; }
.btv-ex.btv-theme-light .btv-ans.is-wrong { color: #991B1B; }

/* Ecrã «Pronto?» */
.btv-ex .btv-ready {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 30px 20px; border-radius: var(--btv-r-lg); background: radial-gradient(120% 140% at 50% 0%, var(--btv-accent-soft), transparent 60%), var(--btv-card);
  border: 1px solid var(--btv-line);
}
.btv-ex .btv-ready-icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px;
  background: var(--btv-accent-soft); color: var(--btv-accent);
}
.btv-ex .btv-ready-icon .btv-icon { width: 26px; height: 26px; margin-left: 3px; }
.btv-ex .btv-ready strong { font-size: 1.3em; }
.btv-ex .btv-ready p { color: var(--btv-muted); margin-bottom: 10px; }

/* Barra de feedback (estilo Duolingo) */
.btv-ex .btv-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; padding: 14px 16px;
  border-radius: var(--btv-r); border: 1px solid var(--btv-line); background: var(--btv-card);
  transition: background-color .2s, border-color .2s;
}
.btv-ex .btv-footer-icon { display: none; width: 34px; height: 34px; border-radius: 50%; place-items: center; flex: none; }
.btv-ex .btv-footer-icon .btv-icon { width: 20px; height: 20px; }
.btv-ex .btv-footer.is-ok { background: var(--btv-ok-soft); border-color: rgba(34, 197, 94, .45); }
.btv-ex .btv-footer.is-bad { background: var(--btv-bad-soft); border-color: rgba(239, 68, 68, .45); }
.btv-ex .btv-footer.is-ok .btv-footer-icon { display: grid; background: var(--btv-ok); color: var(--btv-ink); animation: btv-pop .35s var(--btv-ease); }
.btv-ex .btv-footer.is-bad .btv-footer-icon { display: grid; background: var(--btv-bad); color: #fff; animation: btv-pop .35s var(--btv-ease); }
.btv-ex .btv-feedback { flex: 1 1 220px; margin: 0; font-weight: 700; min-height: 1.4em; }
.btv-ex .btv-feedback:empty::before { content: "\00a0"; }
.btv-ex .btv-feedback.is-ok { color: #86EFAC; }
.btv-ex .btv-feedback.is-bad { color: #FCA5A5; }
.btv-ex.btv-theme-light .btv-feedback.is-ok { color: #15803D; }
.btv-ex.btv-theme-light .btv-feedback.is-bad { color: #B91C1C; }
.btv-ex .btv-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.btv-exercise:not(.is-started) .btv-footer { display: none; }
.btv-ex .btv-kbd-hint { margin-top: 12px; font-size: .78em; color: var(--btv-muted); text-align: center; }
@media (hover: none) { .btv-ex .btv-kbd-hint, .btv-ex .btv-ans-k { display: none; } }

.btv-ex .btv-xp-float {
  display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 999px; vertical-align: middle;
  background: var(--btv-ok); color: var(--btv-ink); font-size: .8em; font-weight: 800;
  animation: btv-float 1.1s var(--btv-ease) both;
}
.btv-ex .btv-xp-float.is-combo { background: linear-gradient(90deg, var(--btv-gold), #FB923C); }

/* --------------------------------------------------------------------------
   Barra de jogador (exercícios isolados e [btv_jogador])
   -------------------------------------------------------------------------- */
.btv-ex .btv-player {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; margin: 0 0 16px;
  border-radius: var(--btv-r); background: linear-gradient(120deg, rgba(255, 112, 67, .12), rgba(251, 191, 36, .05) 60%, transparent), var(--btv-card);
  border: 1px solid var(--btv-line);
}
.btv-ex .btv-avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #FF8A65, #F4511E); color: var(--btv-ink); line-height: 1;
  box-shadow: 0 4px 0 #BF360C, 0 8px 18px rgba(255, 112, 67, .3);
}
.btv-ex .btv-avatar small { font-size: .55em; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; opacity: .8; }
.btv-ex .btv-avatar strong { font-size: 1.35em; font-weight: 900; }
.btv-ex .btv-avatar--sm { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 3px 0 #BF360C; }
.btv-ex .btv-avatar--sm strong { font-size: 1.05em; }
.btv-ex .btv-player-main { flex: 1 1 200px; min-width: 0; }
.btv-ex .btv-player-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: .92em; }
.btv-ex .btv-player-xp { color: var(--btv-muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.btv-ex .btv-xpbar { height: 10px; border-radius: 999px; background: var(--btv-card-3); overflow: hidden; }
.btv-ex .btv-xpbar span {
  display: block; height: 100%; border-radius: inherit; min-width: 6px;
  background: linear-gradient(90deg, var(--btv-accent), var(--btv-gold)); transition: width .6s var(--btv-ease);
  box-shadow: 0 0 12px rgba(255, 112, 67, .5);
}
.btv-ex .btv-player-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btv-ex .btv-medals { flex-basis: 100%; padding-top: 8px; }
.btv-ex .btv-medals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.btv-ex .btv-medal {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--btv-r);
  border: 1px solid var(--btv-line); background: var(--btv-card);
}
.btv-ex .btv-medal .btv-medal-i {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 1.35em;
  background: var(--btv-card-3); filter: grayscale(1); opacity: .45;
}
.btv-ex .btv-medal strong { display: block; font-size: .9em; }
.btv-ex .btv-medal small { display: block; color: var(--btv-muted); font-size: .78em; line-height: 1.35; }
.btv-ex .btv-medal:not(.is-got) strong { color: var(--btv-muted); }
.btv-ex .btv-medal.is-got { border-color: rgba(251, 191, 36, .35); background: linear-gradient(135deg, rgba(251, 191, 36, .08), transparent 60%), var(--btv-card); }
.btv-ex .btv-medal.is-got .btv-medal-i { filter: none; opacity: 1; background: rgba(251, 191, 36, .15); box-shadow: 0 0 0 1px rgba(251, 191, 36, .35) inset; }

/* --------------------------------------------------------------------------
   Mapa de níveis e progresso do nível
   -------------------------------------------------------------------------- */
.btv-ex .btv-map {
  margin: 0 0 18px; padding: 16px; border-radius: var(--btv-r-lg); background: var(--btv-card); border: 1px solid var(--btv-line);
}
.btv-ex .btv-map-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.btv-ex .btv-node {
  position: relative; width: 50px; height: 56px; padding: 0; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px solid var(--btv-line-2); background: var(--btv-card-2); color: var(--btv-fg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
  transition: transform .15s var(--btv-ease), border-color .15s, background-color .15s;
}
.btv-ex .btv-node:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--btv-accent); }
.btv-ex .btv-node-n { font-weight: 800; font-size: 1.05em; line-height: 1; }
.btv-ex .btv-node-s { display: flex; gap: 2px; }
.btv-ex .btv-node-s i { width: 7px; height: 7px; border-radius: 50%; background: var(--btv-card-3); display: block; }
.btv-ex .btv-node-s i.is-on { background: var(--btv-gold); box-shadow: 0 0 6px rgba(251, 191, 36, .7); }
.btv-ex .btv-node.has-stars { border-color: rgba(251, 191, 36, .45); }
.btv-ex .btv-node.is-perfect { background: linear-gradient(160deg, rgba(251, 191, 36, .22), var(--btv-card-2)); border-color: var(--btv-gold); }
.btv-ex .btv-node.is-current {
  background: var(--btv-accent); border-color: var(--btv-accent); color: var(--btv-ink);
  box-shadow: 0 3px 0 #C2502C, 0 0 0 4px rgba(255, 112, 67, .2), 0 0 24px rgba(255, 112, 67, .35);
}
.btv-ex .btv-node.is-current .btv-node-s i { background: rgba(11, 15, 25, .35); }
.btv-ex .btv-node.is-current .btv-node-s i.is-on { background: #FFF7D6; box-shadow: none; }
.btv-ex .btv-node.is-locked { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btv-ex .btv-node.is-locked .btv-node-n { font-size: .85em; }

.btv-ex .btv-lvl { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--btv-line); }
.btv-ex .btv-lvl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.btv-ex .btv-lvl-tag { font-size: .72em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--btv-accent); }
.btv-ex .btv-lvl-name { font-size: 1em; font-weight: 700; }
.btv-ex .btv-lvl-stars { margin-left: auto; display: flex; gap: 2px; font-size: 1.05em; }
.btv-ex .btv-lvl-stars i { font-style: normal; color: var(--btv-card-3); }
.btv-ex .btv-lvl-stars i.is-on { color: var(--btv-gold); text-shadow: 0 0 10px rgba(251, 191, 36, .6); }
.btv-ex .btv-lvl-bar { position: relative; height: 10px; border-radius: 999px; background: var(--btv-card-3); }
.btv-ex .btv-lvl-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--btv-accent); transition: width .5s var(--btv-ease); }
.btv-ex .btv-lvl-fill.is-good { background: linear-gradient(90deg, var(--btv-ok), #4ADE80); }
.btv-ex .btv-lvl-fill.is-early { opacity: .45; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.btv-ex .btv-lvl-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--btv-gold); opacity: .8; }
.btv-ex .btv-lvl-meta { display: block; margin-top: 8px; color: var(--btv-muted); font-size: .8em; }

/* --------------------------------------------------------------------------
   Braço da guitarra
   -------------------------------------------------------------------------- */
.btv-ex .btv-fb-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--btv-r-lg); padding: 18px 14px 6px;
  background: radial-gradient(100% 120% at 50% 0%, rgba(255, 112, 67, .07), transparent 60%), var(--btv-card); border: 1px solid var(--btv-line);
  scrollbar-width: thin;
}
.btv-ex .btv-fb { display: block; width: 100%; min-width: 640px; height: auto; user-select: none; -webkit-user-select: none; overflow: visible; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45)); }
.btv-ex .btv-fb-num { fill: var(--btv-muted); font-size: 15px; font-weight: 600; text-anchor: middle; font-family: var(--btv-font); }
.btv-ex .btv-fb-string { transition: opacity .25s; }
.btv-ex .btv-fb-string.is-off { opacity: .22; }
.btv-ex .btv-fb-string.is-active rect:first-child { fill: var(--btv-accent); filter: drop-shadow(0 0 6px rgba(255, 112, 67, .9)); }
.btv-ex .btv-fb-string.is-ringing { animation: btv-ring .9s ease-out; transform-box: fill-box; transform-origin: center; }
.btv-ex .btv-fb-off { fill: var(--btv-bg); opacity: .62; pointer-events: none; transition: opacity .25s; }
.btv-ex .btv-dot { transform-box: fill-box; transform-origin: center; animation: btv-dot-in .35s var(--btv-ease) both; pointer-events: none; }
.btv-ex .btv-dot-core { fill: var(--btv-accent); stroke: rgba(255, 255, 255, .85); stroke-width: 2; }
.btv-ex .btv-dot-glow { fill: var(--btv-accent); opacity: .65; }
.btv-ex .btv-dot-shine { fill: #fff; opacity: .35; }
.btv-ex .btv-dot.is-ok .btv-dot-core, .btv-ex .btv-dot.is-ok .btv-dot-glow { fill: var(--btv-ok); }
.btv-ex .btv-dot.is-bad .btv-dot-core, .btv-ex .btv-dot.is-bad .btv-dot-glow { fill: var(--btv-bad); }
.btv-ex .btv-dot.is-bad { animation: btv-dot-in .35s var(--btv-ease) both, btv-shake-svg .4s .1s; }
.btv-ex .btv-dot:not(.is-ok):not(.is-bad) .btv-dot-glow { animation: btv-glow 1.6s ease-in-out infinite; }
.btv-ex .btv-dot-label { fill: var(--btv-ink); font-size: 12.5px; font-weight: 800; text-anchor: middle; dominant-baseline: central; font-family: var(--btv-font); }
.btv-ex .btv-fb-hits rect { fill: transparent; }
.btv-ex .btv-fb:not(.is-clickable) .btv-fb-hits { pointer-events: none; }
.btv-ex .btv-fb.is-clickable .btv-fb-hits rect { cursor: pointer; }
.btv-ex .btv-fb.is-clickable .btv-fb-hits rect:hover { fill: rgba(255, 255, 255, .08); }

/* --------------------------------------------------------------------------
   Botão central de reprodução
   -------------------------------------------------------------------------- */
.btv-ex .btv-play-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 6px; }
.btv-ex .btv-play {
  position: relative; width: 128px; height: 128px; border-radius: 50%; border: 0; padding: 0; background: transparent;
  display: grid; place-items: center;
}
.btv-ex .btv-play:focus-visible { outline-offset: 6px; border-radius: 50%; }
.btv-ex .btv-play-core {
  position: relative; z-index: 2; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFA182, var(--btv-accent) 55%, #E6532A); color: var(--btv-ink);
  box-shadow: 0 6px 0 #BF360C, 0 14px 40px rgba(255, 112, 67, .45);
  transition: transform .15s var(--btv-ease), box-shadow .15s;
}
.btv-ex .btv-play:hover .btv-play-core { transform: scale(1.04); }
.btv-ex .btv-play:active .btv-play-core { transform: translateY(4px) scale(.98); box-shadow: 0 2px 0 #BF360C, 0 8px 24px rgba(255, 112, 67, .4); }
.btv-ex .btv-play-icon { width: 40px; height: 40px; margin-left: 6px; transition: opacity .2s, transform .2s; }
.btv-ex .btv-play-ring {
  position: absolute; inset: 12px; border-radius: 50%; border: 2px solid var(--btv-accent); opacity: 0; z-index: 1; pointer-events: none;
}
.btv-ex .btv-eq { position: absolute; display: flex; align-items: flex-end; gap: 4px; height: 34px; opacity: 0; transition: opacity .2s; }
.btv-ex .btv-eq i { width: 6px; height: 100%; border-radius: 3px; background: var(--btv-ink); transform-origin: bottom; transform: scaleY(.3); }
.btv-ex .btv-play.is-playing .btv-play-icon { opacity: 0; transform: scale(.6); }
.btv-ex .btv-play.is-playing .btv-eq { opacity: 1; }
.btv-ex .btv-play.is-playing .btv-eq i { animation: btv-eq .8s ease-in-out infinite; }
.btv-ex .btv-play.is-playing .btv-eq i:nth-child(2) { animation-delay: .15s; }
.btv-ex .btv-play.is-playing .btv-eq i:nth-child(3) { animation-delay: .3s; }
.btv-ex .btv-play.is-playing .btv-eq i:nth-child(4) { animation-delay: .45s; }
.btv-ex .btv-play.is-playing .btv-play-ring { animation: btv-ripple 1.4s ease-out infinite; }
.btv-ex .btv-play.is-playing .btv-play-ring--2 { animation-delay: .7s; }
.btv-ex .btv-play-label { font-size: .82em; font-weight: 600; color: var(--btv-muted); letter-spacing: .02em; }

/* --------------------------------------------------------------------------
   Tríades: cifra, fundamental / 3ª / 5ª e teclado
   -------------------------------------------------------------------------- */
.btv-ex .btv-chord {
  margin-top: 14px; padding: 20px; border-radius: var(--btv-r-lg); background: var(--btv-card); border: 1px solid var(--btv-line);
}
.btv-ex .btv-chord-top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 18px; }
.btv-ex .btv-chord-sym {
  min-width: 112px; height: 92px; padding: 0 18px; border-radius: var(--btv-r); display: grid; place-items: center;
  font-size: 2.6em; font-weight: 900; letter-spacing: -.03em; background: var(--btv-card-2); border: 1px solid var(--btv-line-2);
  transition: color .2s, background-color .2s, border-color .2s;
}
.btv-ex .btv-chord-sym.is-hidden { color: var(--btv-muted); border-style: dashed; }
.btv-ex .btv-chord.is-revealed .btv-chord-sym { color: var(--btv-accent); border-color: rgba(255, 112, 67, .5); animation: btv-pop .4s var(--btv-ease); }
.btv-ex .btv-tones { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 300px; }
.btv-ex .btv-tone {
  --tone: var(--btv-accent);
  flex: 1 1 90px; min-width: 90px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 10px;
  border-radius: var(--btv-r); background: var(--btv-card-2); border: 2px solid color-mix(in srgb, var(--tone) 45%, transparent);
  color: var(--btv-fg); position: relative; overflow: hidden;
  transition: transform .15s var(--btv-ease), box-shadow .2s, border-color .2s;
}
.btv-ex .btv-tone::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tone); }
.btv-ex .btv-tone:hover { transform: translateY(-2px); border-color: var(--tone); }
.btv-ex .btv-tone--root { --tone: var(--btv-accent); }
.btv-ex .btv-tone--third { --tone: var(--btv-third); }
.btv-ex .btv-tone--fifth { --tone: var(--btv-fifth); }
.btv-ex .btv-tone-note { font-size: 1.6em; font-weight: 900; line-height: 1.1; color: var(--tone); }
.btv-ex .btv-tone-role { font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--btv-muted); }
.btv-ex .btv-tone.is-sounding { animation: btv-tone .5s var(--btv-ease); }
.btv-ex .btv-piano-wrap { overflow-x: auto; padding-bottom: 2px; }
.btv-ex .btv-piano { display: block; width: 100%; max-width: 560px; min-width: 360px; margin: 0 auto; height: auto; }
.btv-ex .btv-key { cursor: pointer; transition: fill .15s, transform .1s; }
.btv-ex .btv-key--w { fill: #E8ECF2; stroke: #0B0F19; stroke-width: 1; }
.btv-ex .btv-key--b { fill: #1E2433; stroke: #0B0F19; stroke-width: 1; }
.btv-ex .btv-key--w:hover { fill: #fff; }
.btv-ex .btv-key--b:hover { fill: #2C3446; }
.btv-ex .btv-key.is-root { fill: var(--btv-accent); }
.btv-ex .btv-key.is-third { fill: var(--btv-third); }
.btv-ex .btv-key.is-fifth { fill: var(--btv-fifth); }
.btv-ex .btv-key.is-down { filter: brightness(1.25) drop-shadow(0 0 8px rgba(255, 255, 255, .6)); }
.btv-ex .btv-key-label { fill: var(--btv-ink); font-size: 11px; font-weight: 800; text-anchor: middle; pointer-events: none; font-family: var(--btv-font); }
.btv-ex .btv-piano-hint { display: block; text-align: center; margin-top: 10px; color: var(--btv-muted); font-size: .78em; }

/* --------------------------------------------------------------------------
   App: cabeçalho, painel e cartões
   -------------------------------------------------------------------------- */
.btv-ex.btv-app { padding: 0; overflow: hidden; background: radial-gradient(90% 60% at 100% 0%, rgba(255, 112, 67, .08), transparent 60%), var(--btv-bg); }
.btv-ex .btv-app-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 14px 24px;
  border-bottom: 1px solid var(--btv-line); background: rgba(11, 15, 25, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btv-ex.btv-theme-light .btv-app-head { background: rgba(244, 246, 251, .85); }
.btv-ex .btv-brand { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; color: var(--btv-fg); }
.btv-ex .btv-brand-mark {
  padding: 6px 9px; border-radius: 10px; font-weight: 900; font-size: .85em; letter-spacing: .04em;
  background: linear-gradient(145deg, #FF8A65, #F4511E); color: var(--btv-ink);
}
.btv-ex .btv-brand-name { font-weight: 800; font-size: 1.05em; letter-spacing: -.01em; }
.btv-ex .btv-head-player { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; max-width: 360px; margin-left: auto; min-width: 0; }
.btv-ex .btv-head-xp { flex: 1; min-width: 0; }
.btv-ex .btv-head-xp-top { display: flex; justify-content: space-between; gap: 8px; font-size: .8em; margin-bottom: 6px; }
.btv-ex .btv-head-xp-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btv-ex .btv-head-xp-top span { color: var(--btv-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.btv-ex .btv-head-xp .btv-xpbar { height: 8px; }
.btv-ex .btv-head-actions { display: flex; gap: 6px; }
.btv-ex .btv-app-main { padding: 28px 24px 32px; }
.btv-ex .btv-view { animation: btv-view-in .35s var(--btv-ease); }

.btv-ex .btv-hero { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 18px; margin-bottom: 30px; }
.btv-ex .btv-hero-text {
  padding: 26px; border-radius: var(--btv-r-lg); border: 1px solid var(--btv-line);
  background: radial-gradient(120% 120% at 0% 0%, rgba(255, 112, 67, .16), transparent 55%), var(--btv-card);
}
.btv-ex .btv-eyebrow { font-size: .78em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--btv-accent); }
.btv-ex .btv-hero-title { font-size: 2em; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 8px; }
.btv-ex .btv-hero-sub { color: var(--btv-muted); max-width: 46ch; }
.btv-ex .btv-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btv-ex .btv-goal {
  display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--btv-r-lg); border: 1px solid var(--btv-line); background: var(--btv-card);
}
.btv-ex .btv-goal.is-done { border-color: rgba(34, 197, 94, .45); background: linear-gradient(135deg, rgba(34, 197, 94, .1), transparent 60%), var(--btv-card); }
.btv-ex .btv-goal-ring { position: relative; width: 84px; height: 84px; flex: none; }
.btv-ex .btv-ring { width: 100%; height: 100%; }
.btv-ex .btv-ring-track { fill: none; stroke: var(--btv-card-3); stroke-width: 8; }
.btv-ex .btv-ring-fill { fill: none; stroke: var(--btv-accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .8s var(--btv-ease); filter: drop-shadow(0 0 6px rgba(255, 112, 67, .6)); }
.btv-ex .btv-goal.is-done .btv-ring-fill { stroke: var(--btv-ok); filter: drop-shadow(0 0 6px rgba(34, 197, 94, .6)); }
.btv-ex .btv-goal-pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 1.05em; font-variant-numeric: tabular-nums; }
.btv-ex .btv-goal-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.btv-ex .btv-goal-text > span { color: var(--btv-muted); font-size: .9em; }
.btv-ex .btv-goal-days { display: flex; align-items: center; gap: 6px; color: #FDBA74; font-size: .8em; font-weight: 600; margin: 2px 0 6px; }
.btv-ex .btv-goal-days .btv-icon { color: #FB923C; width: 15px; height: 15px; }
.btv-ex .btv-goal select { min-width: 0; width: 100%; padding-top: 7px; padding-bottom: 7px; font-size: .82em; }

.btv-ex .btv-section-title { font-size: 1.15em; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
.btv-ex .btv-section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 32px; }
.btv-ex .btv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.btv-ex .btv-card-ex {
  display: flex; flex-direction: column; border-radius: var(--btv-r-lg); overflow: hidden; background: var(--btv-card); border: 1px solid var(--btv-line);
  box-shadow: var(--btv-shadow); transition: transform .2s var(--btv-ease), border-color .2s, box-shadow .2s;
}
.btv-ex .btv-card-ex:hover { transform: translateY(-4px); border-color: rgba(255, 112, 67, .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.btv-ex .btv-card-art {
  height: 132px; display: grid; place-items: center; padding: 10px 16px;
  background: radial-gradient(90% 120% at 50% 0%, rgba(255, 112, 67, .2), transparent 70%), var(--btv-card-2); border-bottom: 1px solid var(--btv-line);
}
.btv-ex .btv-card-ex--intervalos .btv-card-art { background: radial-gradient(90% 120% at 50% 0%, rgba(56, 189, 248, .18), transparent 70%), var(--btv-card-2); }
.btv-ex .btv-card-ex--triades .btv-card-art { background: radial-gradient(90% 120% at 50% 0%, rgba(167, 139, 250, .2), transparent 70%), var(--btv-card-2); }
.btv-ex .btv-art { width: 100%; max-width: 230px; height: auto; }
.btv-ex .btv-art-wood { fill: #3b2618; }
.btv-ex .btv-art-fret { fill: #cbd5e1; }
.btv-ex .btv-art-string { fill: #d6c7a6; opacity: .85; }
.btv-ex .btv-art-dot { stroke: #fff; stroke-width: 2; }
.btv-ex .btv-art-dot--a { fill: var(--btv-accent); filter: drop-shadow(0 0 6px rgba(255, 112, 67, .9)); }
.btv-ex .btv-art-dot--b { fill: var(--btv-ok); filter: drop-shadow(0 0 6px rgba(34, 197, 94, .9)); }
.btv-ex .btv-art-dot--c { fill: var(--btv-gold); filter: drop-shadow(0 0 6px rgba(251, 191, 36, .9)); }
.btv-ex .btv-art-bar { fill: var(--btv-third); transform-box: fill-box; transform-origin: center; animation: btv-bars 1.6s ease-in-out infinite; }
.btv-ex .btv-art-bar:nth-child(3n) { fill: var(--btv-accent); }
.btv-ex .btv-art-staff { fill: var(--btv-line-2); }
.btv-ex .btv-art-note--root { fill: var(--btv-accent); }
.btv-ex .btv-art-note--third { fill: var(--btv-third); }
.btv-ex .btv-art-note--fifth { fill: var(--btv-fifth); }
.btv-ex .btv-art-stem { fill: var(--btv-fg); opacity: .8; }
.btv-ex .btv-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.btv-ex .btv-card-title { font-size: 1.15em; font-weight: 800; }
.btv-ex .btv-card-text { color: var(--btv-muted); font-size: .9em; }
.btv-ex .btv-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.btv-ex .btv-card-progress { height: 8px; border-radius: 999px; background: var(--btv-card-3); overflow: hidden; margin: 4px 0 6px; }
.btv-ex .btv-card-progress span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--btv-gold), #FB923C); }
.btv-ex .btv-card-cta { margin-top: auto; width: 100%; }

/* Exercício dentro da app */
.btv-ex .btv-app-main .btv-ex-head { margin-bottom: 22px; }

/* --------------------------------------------------------------------------
   Notificações e confetti (fora do cartão)
   -------------------------------------------------------------------------- */
.btv-toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.btv-toast {
  display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 340px; padding: 12px 16px; border-radius: 14px;
  background: #161D2B; color: #F5F7FA; border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: btv-toast-in .35s cubic-bezier(.2, .8, .2, 1) both; transition: opacity .4s, transform .4s;
}
.btv-toast.is-out { opacity: 0; transform: translateY(10px) scale(.98); }
.btv-toast-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 1.35em; background: rgba(255, 112, 67, .14); }
.btv-toast strong { display: block; font-size: .95em; }
.btv-toast small { display: block; color: #94A3B8; font-size: .82em; }
.btv-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99998; }

/* --------------------------------------------------------------------------
   Animações
   -------------------------------------------------------------------------- */
@keyframes btv-pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes btv-shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes btv-shake-svg { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes btv-float { 0% { opacity: 0; transform: translateY(8px) scale(.85); } 25% { opacity: 1; transform: translateY(-2px) scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes btv-toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes btv-dot-in { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes btv-glow { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }
@keyframes btv-ring { 0% { transform: translateY(0); } 10% { transform: translateY(-1.6px); } 20% { transform: translateY(1.4px); } 30% { transform: translateY(-1.1px); } 45% { transform: translateY(.8px); } 60% { transform: translateY(-.5px); } 80% { transform: translateY(.2px); } 100% { transform: translateY(0); } }
@keyframes btv-ripple { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes btv-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes btv-bars { 0%, 100% { transform: scaleY(.75); } 50% { transform: scaleY(1); } }
@keyframes btv-tone { 0% { transform: scale(1); box-shadow: 0 0 0 0 var(--tone); } 40% { transform: scale(1.06); box-shadow: 0 0 22px 2px color-mix(in srgb, var(--tone) 60%, transparent); } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
@keyframes btv-view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .btv-ex *, .btv-ex *::before, .btv-ex *::after, .btv-toast { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .btv-ex .btv-cards { grid-template-columns: 1fr; }
  .btv-ex .btv-card-ex { flex-direction: row; }
  .btv-ex .btv-card-art { width: 38%; height: auto; border-bottom: 0; border-right: 1px solid var(--btv-line); }
  .btv-ex .btv-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .btv-ex { padding: 18px 14px; border-radius: 16px; font-size: 15px; }
  .btv-ex.btv-app { padding: 0; }
  .btv-ex .btv-app-head { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .btv-ex .btv-brand-name { display: none; }
  .btv-ex .btv-head-player { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .btv-ex .btv-head-actions { margin-left: auto; }
  .btv-ex .btv-app-main { padding: 18px 14px 24px; }
  .btv-ex .btv-hero-text { padding: 20px; }
  .btv-ex .btv-hero-title { font-size: 1.6em; }
  .btv-ex .btv-card-ex { flex-direction: column; }
  .btv-ex .btv-card-art { width: auto; height: 110px; border-right: 0; border-bottom: 1px solid var(--btv-line); }
  .btv-ex .btv-title { font-size: 1.35em; }
  .btv-ex .btv-statbar { width: 100%; }
  .btv-ex .btv-stat { flex: 1; min-width: 0; }
  .btv-ex .btv-answers { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
  .btv-ex .btv-answers.is-few { grid-template-columns: 1fr 1fr; }
  .btv-ex .btv-ans { min-height: 58px; font-size: 1em; }
  .btv-ex .btv-node { width: 44px; height: 50px; flex: none; }
  .btv-ex .btv-map-nodes { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 8px; margin: -4px -2px 0; scrollbar-width: none; scroll-snap-type: x proximity; }
  .btv-ex .btv-map-nodes::-webkit-scrollbar { display: none; }
  .btv-ex .btv-node { scroll-snap-align: center; }
  .btv-ex .btv-map { padding: 12px; }
  .btv-ex .btv-fb-wrap { padding: 12px 8px 4px; margin: 0 -4px; }
  .btv-ex .btv-play { width: 112px; height: 112px; }
  .btv-ex .btv-play-core { width: 92px; height: 92px; }
  .btv-ex .btv-chord { padding: 14px; }
  .btv-ex .btv-chord-sym { min-width: 88px; height: 76px; font-size: 2.1em; }
  .btv-ex .btv-footer { position: sticky; bottom: 8px; z-index: 4; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); background-color: var(--btv-card); }
  .btv-ex .btv-footer.is-ok { background: color-mix(in srgb, var(--btv-ok) 16%, var(--btv-card)); }
  .btv-ex .btv-footer.is-bad { background: color-mix(in srgb, var(--btv-bad) 16%, var(--btv-card)); }
  .btv-ex .btv-controls { width: 100%; margin-left: 0; }
  .btv-ex .btv-controls .btv-btn { flex: 1; }
  .btv-ex select { min-width: 0; width: 100%; }
  .btv-ex .btv-settings-body > .btv-field { flex: 1 1 140px; }
  .btv-toasts { left: 12px; right: 12px; bottom: 12px; }
  .btv-toast { max-width: none; }
}

/* --------------------------------------------------------------------------
   Pontuação (geral e por jogo)
   -------------------------------------------------------------------------- */
.btv-ex .btv-stat.is-score .btv-stat-v { color: var(--btv-accent); }
.btv-ex .btv-tag--score { color: var(--btv-accent); background: var(--btv-accent-soft); }
.btv-ex .btv-section-title--gap { margin-top: 32px; }
.btv-ex .btv-score {
  display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 14px 28px; align-items: center;
  padding: 22px; border-radius: var(--btv-r-lg); border: 1px solid var(--btv-line);
  background: radial-gradient(80% 140% at 0% 50%, rgba(255, 112, 67, .12), transparent 60%), var(--btv-card);
}
.btv-ex .btv-score-total { display: flex; flex-direction: column; }
.btv-ex .btv-score-l { font-size: .75em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--btv-muted); }
.btv-ex .btv-score-v {
  font-size: 2.8em; font-weight: 900; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--btv-accent), var(--btv-gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btv-ex .btv-score-u { font-size: .85em; color: var(--btv-muted); font-weight: 600; }
.btv-ex .btv-score-list { display: flex; flex-direction: column; gap: 12px; }
.btv-ex .btv-score-row { --c: var(--btv-accent); display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 12px; font-size: .9em; }
.btv-ex .btv-score-row--intervalos { --c: var(--btv-third); }
.btv-ex .btv-score-row--triades { --c: var(--btv-fifth); }
.btv-ex .btv-score-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btv-ex .btv-score-bar { height: 10px; border-radius: 999px; background: var(--btv-card-3); overflow: hidden; }
.btv-ex .btv-score-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); transition: width .6s var(--btv-ease); }
.btv-ex .btv-score-pts { font-variant-numeric: tabular-nums; color: var(--c); min-width: 70px; text-align: right; }
.btv-ex .btv-score-hint { grid-column: 1 / -1; color: var(--btv-muted); font-size: .78em; }
.btv-ex .btv-medals .btv-score { margin-bottom: 12px; }
@media (max-width: 640px) {
  .btv-ex .btv-score { grid-template-columns: 1fr; padding: 18px; }
  .btv-ex .btv-score-row { grid-template-columns: 1fr auto; }
  .btv-ex .btv-score-bar { grid-column: 1 / -1; order: 3; }
  .btv-ex .btv-statbar { flex-wrap: wrap; }
  .btv-ex .btv-stat { flex: 1 1 40%; }
}

/* --------------------------------------------------------------------------
   Cenário do nível do jogador (fundo do cartão de boas-vindas)
   -------------------------------------------------------------------------- */
.btv-ex .btv-scene {
  position: relative; overflow: hidden; min-height: 230px; display: flex; flex-direction: column; justify-content: center;
  background-color: #0B0F19;
  background-image:
    linear-gradient(90deg, rgba(11, 15, 25, .94) 0%, rgba(11, 15, 25, .82) 34%, rgba(11, 15, 25, .35) 62%, rgba(11, 15, 25, 0) 85%),
    var(--btv-scene, none);
  background-size: cover, cover;
  background-position: center, right center;
  border-color: rgba(255, 255, 255, .08);
}
.btv-ex .btv-scene .btv-hero-title { color: #F5F7FA; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.btv-ex .btv-scene .btv-hero-sub { color: #CBD5E1; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); max-width: 40ch; }
.btv-ex .btv-scene .btv-tag { background: rgba(11, 15, 25, .7); color: #CBD5E1; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btv-ex .btv-scene .btv-tag--gold { color: var(--btv-gold); }
.btv-ex .btv-scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -40px 60px -30px rgba(11, 15, 25, .8);
}
.btv-ex .btv-scene > * { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .btv-ex .btv-scene {
    min-height: 260px; justify-content: flex-end;
    background-image:
      linear-gradient(180deg, rgba(11, 15, 25, .05) 0%, rgba(11, 15, 25, .55) 45%, rgba(11, 15, 25, .95) 80%),
      var(--btv-scene, none);
    background-position: center, 72% center;
  }
}

/* --------------------------------------------------------------------------
   Coleção de equipamento (prémios diários)
   -------------------------------------------------------------------------- */
.btv-ex .btv-section-sub { color: var(--btv-muted); font-size: .88em; margin-top: -8px; }
.btv-ex .btv-panel-title { font-size: 1em; font-weight: 800; margin: 18px 0 12px; }
.btv-ex .btv-gear { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; }
.btv-ex .btv-prize {
  display: flex; align-items: center; gap: 22px; padding: 18px 22px; border-radius: var(--btv-r-lg);
  border: 1px solid var(--btv-line); background: radial-gradient(70% 140% at 0% 50%, rgba(251, 191, 36, .12), transparent 65%), var(--btv-card);
}
.btv-ex .btv-prize.is-won { border-color: rgba(251, 191, 36, .5); background: radial-gradient(70% 140% at 0% 50%, rgba(251, 191, 36, .22), transparent 65%), var(--btv-card); }
.btv-ex .btv-prize-art {
  width: 120px; height: 120px; flex: none; display: grid; place-items: center; border-radius: 16px;
  background: radial-gradient(circle, rgba(255, 255, 255, .06), transparent 70%), var(--btv-card-2); border: 1px dashed var(--btv-line-2);
}
.btv-ex .btv-prize.is-won .btv-prize-art { border-style: solid; border-color: rgba(251, 191, 36, .45); }
.btv-ex .btv-prize-art { padding: 8px; }
.btv-ex .btv-prize-art .btv-gear-img { max-width: 100%; max-height: 104px; }
.btv-ex .btv-prize-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.btv-ex .btv-prize-name { font-size: 1.25em; font-weight: 800; }
.btv-ex .btv-prize-status { color: var(--btv-muted); font-size: .9em; }
.btv-ex .btv-prize .btv-card-progress { max-width: 320px; margin-top: 6px; }

.btv-ex .btv-gear-group { padding: 16px; border-radius: var(--btv-r-lg); border: 1px solid var(--btv-line); background: var(--btv-card); }
.btv-ex .btv-gear-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.btv-ex .btv-gear-head span { color: var(--btv-muted); font-size: .85em; font-weight: 700; font-variant-numeric: tabular-nums; }
.btv-ex .btv-gear-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.btv-ex .btv-gear-grid--a, .btv-ex .btv-gear-grid--p { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
@media (min-width: 901px) {
  .btv-ex .btv-gear-grid--g { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .btv-ex .btv-gear-grid--a, .btv-ex .btv-gear-grid--p { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.btv-ex .btv-gear-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.btv-ex .btv-gear-slot {
  width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; padding: 10px 8px; border-radius: 12px; overflow: hidden;
  background: var(--btv-card-2); border: 1px solid var(--btv-line); transition: transform .2s var(--btv-ease), border-color .2s, box-shadow .2s;
}
.btv-ex .btv-gear-grid--a .btv-gear-slot, .btv-ex .btv-gear-grid--p .btv-gear-slot { height: 104px; }
.btv-ex .btv-gear-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.btv-ex .btv-gear-img.is-silhouette { filter: brightness(0) invert(.32); opacity: .6; }
.btv-ex .btv-gear-name { font-size: .72em; font-weight: 600; line-height: 1.25; color: var(--btv-muted); }
.btv-ex .btv-gear-item.is-got .btv-gear-slot {
  border-color: rgba(251, 191, 36, .45);
  background: radial-gradient(circle at 50% 40%, rgba(251, 191, 36, .16), transparent 70%), var(--btv-card-2);
}
.btv-ex .btv-gear-item.is-got .btv-gear-name { color: var(--btv-fg); }
.btv-ex .btv-gear-item.is-got:hover .btv-gear-slot { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.btv-ex .btv-gear-item.is-next .btv-gear-slot { border: 1px dashed var(--btv-accent); animation: btv-next 2s ease-in-out infinite; }
.btv-ex .btv-gear-item.is-next .btv-gear-name { color: var(--btv-accent); }
@keyframes btv-next { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 112, 67, 0); } 50% { box-shadow: 0 0 0 4px rgba(255, 112, 67, .18); } }
.btv-toast-i--img { background: rgba(251, 191, 36, .16) !important; padding: 4px; }
.btv-toast-i--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.btv-ex.btv-theme-light .btv-gear-img.is-silhouette { filter: brightness(0); opacity: .25; }
@media (max-width: 640px) {
  .btv-ex .btv-prize { flex-direction: column; text-align: center; padding: 18px; }
  .btv-ex .btv-prize .btv-card-progress { margin: 6px auto 0; width: 100%; }
  .btv-ex .btv-gear-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .btv-ex .btv-gear-grid--a, .btv-ex .btv-gear-grid--p { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btv-ex .btv-gear-group { padding: 12px; }
  .btv-ex .btv-gear-slot { height: 110px; padding: 8px 4px; }
  .btv-ex .btv-gear-grid--a .btv-gear-slot, .btv-ex .btv-gear-grid--p .btv-gear-slot { height: 80px; }
  .btv-ex .btv-gear-name { font-size: .66em; }
}

/* --------------------------------------------------------------------------
   Conta (guardar conquistas com login)
   -------------------------------------------------------------------------- */
.btv-ex .btv-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 220px; color: var(--btv-muted); font-weight: 600; }
.btv-ex .btv-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--btv-card-3); border-top-color: var(--btv-accent); animation: btv-spin .8s linear infinite; }
@keyframes btv-spin { to { transform: rotate(360deg); } }
.btv-ex a.btv-chip, .btv-ex a.btv-btn { text-decoration: none; }
.btv-ex .btv-chip--login { color: var(--btv-ink); background: var(--btv-accent); border-color: var(--btv-accent); }
.btv-ex .btv-chip--login:hover { background: var(--btv-accent-2); }
.btv-ex .btv-acct { max-width: 180px; }
.btv-ex .btv-acct-name { overflow: hidden; text-overflow: ellipsis; }
.btv-ex .btv-acct-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--btv-ok); box-shadow: 0 0 8px rgba(34, 197, 94, .7); }
.btv-ex .btv-acct[data-sync="saving"] .btv-acct-dot, .btv-ex .btv-acct[data-sync="loading"] .btv-acct-dot { background: var(--btv-gold); box-shadow: 0 0 8px rgba(251, 191, 36, .7); animation: btv-glow 1s ease-in-out infinite; }
.btv-ex .btv-acct[data-sync="error"] .btv-acct-dot { background: var(--btv-bad); box-shadow: 0 0 8px rgba(239, 68, 68, .7); }
.btv-ex .btv-acct-card {
  display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; margin: -12px 0 30px; padding: 18px 20px;
  border-radius: var(--btv-r-lg); border: 1px solid rgba(255, 112, 67, .35);
  background: linear-gradient(120deg, rgba(255, 112, 67, .14), transparent 60%), var(--btv-card);
}
.btv-ex .btv-acct-card-i { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5em; background: var(--btv-accent-soft); flex: none; }
.btv-ex .btv-acct-card-text { flex: 1 1 300px; }
.btv-ex .btv-acct-card-text p { color: var(--btv-muted); font-size: .9em; margin-top: 2px; }
.btv-ex .btv-acct-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btv-ex .btv-acct-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: -14px 0 26px; color: var(--btv-muted); font-size: .88em; }
@media (max-width: 640px) {
  .btv-ex .btv-acct-card { margin-top: -10px; }
  .btv-ex .btv-acct-card-actions { width: 100%; }
  .btv-ex .btv-acct-card-actions .btv-btn { flex: 1; }
  .btv-ex .btv-head-actions .btv-acct-name { display: none; }
  .btv-ex .btv-head-actions .btv-chip--login span:last-child { display: none; }
}

/* Botão «Continuar com Google» (segue as regras de marca da Google: fundo claro, logótipo G) */
.btv-ex .btv-btn--google {
  background: #FFFFFF; color: #1F1F1F; border: 1px solid #747775; font-weight: 600; gap: 10px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}
.btv-ex .btv-btn--google:hover:not(:disabled) { background: #F2F2F2; }
.btv-ex .btv-google-g { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------------------
   Proteção contra estilos do tema WordPress (alinhamentos, fundos, margens)
   -------------------------------------------------------------------------- */
.btv-ex :is(div, p, span, small, strong, h1, h2, h3, h4, h5, h6, label, ul, li) { text-align: inherit; }
.btv-ex :is(h1, h2, h3, h4, h5, h6) { text-transform: none; font-family: var(--btv-font); line-height: 1.2; }
.btv-ex :is(p, h1, h2, h3, h4, h5, h6) { margin-top: 0; margin-bottom: 0; }
.btv-ex .btv-app-main, .btv-ex .btv-view, .btv-ex .btv-dash { background: transparent; background-image: none; min-height: 0; max-width: none; padding-left: 0; padding-right: 0; }
.btv-ex .btv-app-main { padding: 28px 24px 32px; }
.btv-ex img { box-shadow: none; border-radius: 0; margin: 0; }

/* Seletor de língua */
.btv-ex .btv-lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--btv-line-2); background: var(--btv-card-2); }
.btv-ex .btv-lang-btn {
  padding: 4px 9px; border: 0; border-radius: 999px; background: transparent; color: var(--btv-muted);
  font-size: .78em; font-weight: 800; letter-spacing: .04em;
}
.btv-ex .btv-lang-btn:hover { color: var(--btv-fg); }
.btv-ex .btv-lang-btn.is-on { background: var(--btv-accent); color: var(--btv-ink); }
@media (max-width: 640px) { .btv-ex .btv-app-main { padding: 18px 14px 24px; } }

/* --------------------------------------------------------------------------
   Ecrã inteiro (página da app sem o tema à volta)
   -------------------------------------------------------------------------- */
html:has(body.btv-fullscreen), body.btv-fullscreen { background: #0B0F19; }
body.btv-fullscreen { margin: 0; padding: 0; min-height: 100vh; min-height: 100dvh; }
body.btv-fullscreen .btv-fullscreen-main { display: block; margin: 0; padding: 0; max-width: none; }
body.btv-fullscreen .btv-ex.btv-app {
  margin: 0; max-width: none; width: 100%; border-radius: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(70% 50% at 100% 0%, rgba(255, 112, 67, .09), transparent 60%), radial-gradient(60% 40% at 0% 100%, rgba(167, 139, 250, .06), transparent 60%), var(--btv-bg);
}
body.btv-fullscreen .btv-ex.btv-theme-light.btv-app { background: var(--btv-bg); }
body.btv-fullscreen .btv-ex .btv-app-head { padding-left: max(24px, calc((100% - 1132px) / 2)); padding-right: max(24px, calc((100% - 1132px) / 2)); padding-top: max(14px, env(safe-area-inset-top)); }
body.btv-fullscreen .btv-ex .btv-app-main { max-width: 1180px; margin: 0 auto; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
body.btv-fullscreen.admin-bar .btv-ex .btv-app-head { top: 32px; }
@media (max-width: 782px) { body.btv-fullscreen.admin-bar .btv-ex .btv-app-head { top: 0; } }
.btv-ex .btv-home {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 6px; border-radius: 999px; text-decoration: none;
  color: var(--btv-muted); font-size: .82em; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.btv-ex .btv-home:hover { color: var(--btv-fg); border-color: var(--btv-line-2); }
.btv-ex .btv-home .btv-icon { width: 16px; height: 16px; }
@media (max-width: 900px) { .btv-ex .btv-home-name { display: none; } }
@media (max-width: 640px) {
  /* telemóvel: cabeçalho numa só linha (as medalhas e os dias seguidos já aparecem no painel) */
  .btv-ex .btv-head-actions > span.btv-chip:not(.btv-acct) { display: none; }
  .btv-ex .btv-app-head { row-gap: 10px; }
  .btv-ex .btv-head-actions { gap: 5px; }
}
