:root {
  --bg: #0c0b09;
  --bg-2: #12110e;
  --surface: #171512;
  --surface-2: #1e1b16;
  --surface-3: #26221b;
  --line: rgba(255, 236, 204, 0.08);
  --line-strong: rgba(255, 236, 204, 0.16);
  --text: #f4efe6;
  --muted: #9a9184;
  --faint: #6d665b;
  --amber: #e8a317;
  --amber-2: #ffc857;
  --amber-dim: rgba(232, 163, 23, 0.14);
  --teal: #5eead4;
  --teal-dim: rgba(94, 234, 212, 0.12);
  --rose: #fb7185;
  --rose-dim: rgba(251, 113, 133, 0.12);
  --mint: #86efac;
  --mint-dim: rgba(134, 239, 172, 0.12);
  --sky: #93c5fd;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Outfit", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }

.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(232, 163, 23, 0.09), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(94, 234, 212, 0.06), transparent 50%),
    radial-gradient(600px 400px at 50% 120%, rgba(232, 163, 23, 0.04), transparent 50%);
}

#app { position: relative; z-index: 1; min-height: 100%; }

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(12, 11, 9, 0.72);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1f1b14, #14120f);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark svg, .logo-bird { width: 46px; height: 46px; display: block; }
.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  transition: 0.18s ease;
}
.nav-btn:hover { background: var(--surface); color: var(--text); }
.nav-btn.active {
  background: var(--amber-dim);
  color: var(--amber-2);
}
.nav-ico { width: 18px; opacity: 0.9; }
.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.sidebar-foot .k { color: var(--muted); font-size: 0.78rem; }
.sidebar-foot .v { font-weight: 600; }
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 0 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.who:hover .v { color: var(--amber-2); }
.who-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--amber-dim);
  color: var(--amber-2);
  font-weight: 700;
  font-size: 0.95rem;
}
.profile-list { display: grid; gap: 8px; }
.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.profile-row:hover:not(:disabled) { border-color: var(--line-strong); }
.profile-row.active { border-color: var(--amber); background: var(--amber-dim); }
.profile-row:disabled { cursor: default; }
.profile-meta { flex: 1; display: grid; gap: 2px; min-width: 0; }
.profile-meta strong { display: block; }
.row .input { width: auto; flex: 1; min-width: 140px; }

.main {
  padding: 28px 36px 96px;
  max-width: 1120px;
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h2.page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 600;
}
.lede { color: var(--muted); max-width: 52ch; margin: 10px 0 0; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
}
.pill strong { color: var(--text); font-weight: 600; }
.pill.amber { background: var(--amber-dim); border-color: transparent; color: var(--amber-2); }
.pill.teal { background: var(--teal-dim); border-color: transparent; color: var(--teal); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card.soft { box-shadow: none; }
.card.hero {
  background:
    linear-gradient(180deg, rgba(232,163,23,0.08), transparent 50%),
    var(--surface);
  padding: 26px;
}
.card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 0.86rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.16s ease;
}
.btn-primary {
  background: var(--amber);
  color: #1a1204;
}
.btn-primary:hover { background: var(--amber-2); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-3); }
.btn-teal { background: var(--teal); color: #04221d; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

.progress {
  height: 8px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  border-radius: inherit;
}

.unit {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  width: 100%;
  transition: 0.16s ease;
}
.unit:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.unit.locked { opacity: 0.5; }
.unit-num {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.3rem;
  background: var(--amber-dim);
  color: var(--amber-2);
}
.unit.done .unit-num { background: var(--mint-dim); color: var(--mint); }
.unit h4 { margin: 0; font-size: 1.05rem; }
.lessons { display: grid; gap: 10px; }

.lesson-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: left;
  width: 100%;
}
.lesson-item:hover { border-color: var(--line-strong); }
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: 0 0 0 4px var(--bg-2);
}
.lesson-item.done .dot { background: var(--mint); }
.lesson-item.current .dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-dim); }

.teach {
  display: grid;
  gap: 16px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pair > div {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.pair .lang {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.pair .pt { border-color: rgba(94, 234, 212, 0.18); }
.pair .en { border-color: rgba(232, 163, 23, 0.22); }
.note {
  font-size: 0.92rem;
  color: var(--muted);
  padding: 12px 14px;
  border-left: 3px solid var(--amber);
  background: var(--amber-dim);
  border-radius: 0 12px 12px 0;
}

.choices { display: grid; gap: 10px; }
.choice {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: 0.14s ease;
}
.choice:hover { border-color: var(--line-strong); }
.choice.ok { background: var(--mint-dim); border-color: rgba(134, 239, 172, 0.35); }
.choice.bad { background: var(--rose-dim); border-color: rgba(251, 113, 133, 0.35); }
.choice.selected { border-color: var(--amber); background: var(--amber-dim); }

.tokens { display: flex; flex-wrap: wrap; gap: 8px; }
.token {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.token:hover { border-color: var(--amber); }
.slot-row {
  min-height: 56px;
  padding: 8px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flash {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}
.flash .from {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.flash .word {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 10px 0 6px;
  letter-spacing: -0.03em;
}
.tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}
.tag.cognate { background: var(--teal-dim); color: var(--teal); }
.tag.trap { background: var(--rose-dim); color: var(--rose); }
.tag.pattern { background: var(--amber-dim); color: var(--amber-2); }

.read-text {
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 62ch;
}
.read-text .cg {
  color: var(--teal);
  border-bottom: 1px dashed rgba(94, 234, 212, 0.5);
  cursor: pointer;
}
.read-text .ff {
  color: var(--rose);
  border-bottom: 1px dashed rgba(251, 113, 133, 0.55);
  cursor: pointer;
}
.legend { display: flex; gap: 14px; font-size: 0.82rem; color: var(--muted); }

.wave {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 28px;
}
.wave i {
  width: 4px;
  background: var(--amber);
  border-radius: 99px;
  animation: pulse 1s ease-in-out infinite;
}
.wave i:nth-child(2) { animation-delay: 0.1s; }
.wave i:nth-child(3) { animation-delay: 0.2s; }
.wave i:nth-child(4) { animation-delay: 0.3s; }
@keyframes pulse {
  0%, 100% { height: 8px; opacity: 0.5; }
  50% { height: 26px; opacity: 1; }
}

.input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.input:focus { border-color: var(--amber); }

.tabs { display: flex; gap: 6px; background: var(--surface); padding: 5px; border-radius: 14px; border: 1px solid var(--line); }
.tab {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
}
.tab.active { background: var(--surface-3); color: var(--text); }

.mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 8px 10px calc(8px + var(--safe-b));
  background: rgba(12, 11, 9, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 20;
  justify-content: space-around;
}
.mobile-nav button {
  color: var(--muted);
  font-size: 0.68rem;
  display: grid;
  gap: 3px;
  place-items: center;
  min-width: 56px;
}
.mobile-nav button.active { color: var(--amber-2); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 40;
  box-shadow: var(--shadow);
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 20px;
}
.modal {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}

.onboard { max-width: 560px; margin: 8vh auto; }
.level-card {
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 100%;
}
.level-card.active { border-color: var(--amber); background: var(--amber-dim); }

.kbd {
  font-size: 0.72rem;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--faint);
}

.stat { text-align: left; }
.stat .n {
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}
.week { display: flex; gap: 8px; }
.week b {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-3);
}
.week b.on { background: var(--amber); }

.bridge-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.arrow { color: var(--amber); font-size: 1.2rem; }

.speak-box {
  text-align: center;
  padding: 36px 16px;
}
.mic {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1204;
  font-size: 1.6rem;
  margin: 0 auto;
}
.mic.live { animation: glow 1s infinite; }
@keyframes glow {
  50% { box-shadow: 0 0 0 14px var(--amber-dim); }
}

.chip-hint {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- vida: animações ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(232,163,23,0.45); } 100% { box-shadow: 0 0 0 14px rgba(232,163,23,0); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.9); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -50px) scale(1); } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
@keyframes badgeIn { 0% { transform: scale(0.4) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.1) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }

.fade-in { animation: fadeIn 0.25s ease both; }
.rise { animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise.d1 { animation-delay: 0.06s; }
.rise.d2 { animation-delay: 0.12s; }
.rise.d3 { animation-delay: 0.18s; }
.rise.d4 { animation-delay: 0.24s; }
.pop { animation: pop 0.22s ease both; }
.shake { animation: shake 0.3s ease; border-color: rgba(251,113,133,0.6) !important; }
.pulse { animation: pulseRing 0.6s ease-out; }
.step-card { transition: border-color 0.2s ease; }
.step-card.step-ok { border-color: rgba(134, 239, 172, 0.35); }
.step-card.step-bad { border-color: rgba(251, 113, 133, 0.35); }

.btn:active, .token:active, .choice:active { transform: scale(0.97); }
.btn.lg { min-height: 50px; padding: 0 22px; font-size: 1.02rem; }
.btn.danger { color: var(--rose); border-color: rgba(251,113,133,0.35); }
.btn svg { width: 18px; height: 18px; }
.link-card { text-align: left; cursor: pointer; transition: 0.18s ease; }
.link-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.xp-float {
  position: fixed;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%);
  color: var(--amber-2);
  font-weight: 700;
  font-size: 1.1rem;
  z-index: 50;
  pointer-events: none;
  animation: floatUp 1.2s ease forwards;
  text-shadow: 0 2px 12px rgba(232,163,23,0.4);
}
.toast.pop { animation: pop 0.25s ease both; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* ---------- pronúncia figurada ---------- */
.say {
  display: inline-block;
  margin-left: 6px;
  color: var(--teal);
  font-size: 0.9em;
  font-style: italic;
  letter-spacing: 0.01em;
}
.big-say { display: block; margin: 4px 0 8px; font-size: 1.15rem; }
.say-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--amber-2);
  background: var(--amber-dim);
  font-size: 0.8rem;
  font-weight: 600;
}
.say-btn svg { width: 16px; height: 16px; }
.say-btn:hover { background: rgba(232,163,23,0.24); }
.pair .en { text-align: left; cursor: pointer; transition: 0.15s ease; width: 100%; }
.pair .en:hover { border-color: var(--amber); background: var(--amber-dim); }
.pair .en-text { font-size: 1.05rem; font-weight: 500; }
.big-en {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 10px 0 4px;
  padding: 8px 16px;
  border-radius: 14px;
  transition: 0.15s ease;
  line-height: 1.25;
}
.big-en:hover { background: var(--amber-dim); }
.q { font-size: 1.15rem; font-weight: 500; margin: 0; }
.choice .num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 0.78rem;
  margin-right: 6px;
  color: var(--muted);
}
.choice.ok .num { background: rgba(134,239,172,0.3); color: var(--mint); }
.choice.bad .num { background: rgba(251,113,133,0.3); color: var(--rose); }
.note.good { border-left-color: var(--mint); background: var(--mint-dim); color: var(--text); }
.note.bad { border-left-color: var(--rose); background: var(--rose-dim); color: var(--text); }
.input.big { font-size: 1.2rem; padding: 14px 16px; }

/* ---------- ouvir ---------- */
.listen-box { display: grid; place-items: center; gap: 6px; padding: 12px; }
.big-ear {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--amber-2), var(--amber));
  color: #1a1204;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(232,163,23,0.3);
  transition: 0.15s ease;
}
.big-ear svg { width: 40px; height: 40px; }
.big-ear:hover { transform: scale(1.05); }
.reveal { font-size: 1.2rem; }

/* ---------- ligar pares ---------- */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match .col { display: grid; gap: 10px; }
.match .token { text-align: center; padding: 14px; font-size: 1.02rem; transition: 0.15s ease; }
.match .token.selected { border-color: var(--amber); background: var(--amber-dim); transform: scale(1.03); }
.match .token.ok { background: var(--mint-dim); border-color: rgba(134,239,172,0.4); color: var(--mint); opacity: 0.85; }
.en-tok { border-color: rgba(232,163,23,0.25); }
.pt-tok { border-color: rgba(94,234,212,0.2); }
.token.in-slot { background: var(--amber-dim); border-color: rgba(232,163,23,0.35); }
.token .say { margin-left: 8px; }

/* ---------- home ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.ring-wrap { display: grid; gap: 6px; justify-items: center; }
.ring { filter: drop-shadow(0 8px 20px rgba(232,163,23,0.25)); }
.week { display: flex; gap: 8px; }
.week .day { flex: 1; display: grid; gap: 4px; justify-items: center; }
.week .day span { font-size: 0.68rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.week .day.today span { color: var(--amber-2); font-weight: 600; }
.week .day.today b:not(.on) { box-shadow: inset 0 0 0 1px rgba(232, 163, 23, 0.55); }
.week b { width: 100%; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: #1a1204; }
.week b.on { background: var(--amber); animation: pop 0.3s ease both; }
.week b svg { width: 18px; height: 18px; }
.flame { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--faint); }
.flame svg { width: 20px; height: 20px; }
.flame.on { color: var(--amber-2); background: var(--amber-dim); }
.flame.on svg { animation: flicker 1.4s ease-in-out infinite; }
.flame.small { width: 20px; height: 20px; background: transparent; margin-right: 2px; }
.flame.small svg { width: 14px; height: 14px; }
.streak-row { display: flex; gap: 10px; align-items: center; }
.sidebar-foot { display: grid; gap: 8px; }
.nav-btn.small { padding: 8px 10px; font-size: 0.9rem; }
.wod h3 { font-size: 1.6rem; }

/* ---------- mascote Pip ---------- */
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
@keyframes flap {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(-28deg); }
}
@keyframes talk {
  0%, 55%, 100% { transform: none; }
  62% { transform: translateY(3px) rotate(6deg); }
  70% { transform: translateY(0); }
}
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.08); }
}
@keyframes bubbleIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.9); }
  100% { opacity: 1; transform: none; }
}

.home-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: center;
  padding: 22px 24px 8px 28px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(232, 163, 23, 0.10), transparent 62%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.home-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(232, 163, 23, 0.16), transparent 70%);
  pointer-events: none;
}
.home-hero-copy { position: relative; z-index: 1; padding: 12px 0 24px; }
.home-hero .page-title { font-size: clamp(2rem, 4vw, 3rem); }

.mascot {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  background: none;
  padding: 0 8px 0 0;
  z-index: 1;
  cursor: pointer;
}
.mascot-svg {
  width: min(280px, 100%);
  height: auto;
  animation: bob 3.2s ease-in-out infinite;
  filter: drop-shadow(0 18px 18px rgba(15, 23, 42, 0.35));
  overflow: visible;
}
.mascot .beak { transform-origin: 190px 110px; animation: talk 2.4s ease-in-out infinite; }
.mascot .eye { transform-origin: 174px 92px; animation: blink 4.6s ease-in-out infinite; }
.mascot:hover .mascot-svg { animation-duration: 1.6s; }
.speech {
  position: absolute;
  left: 0;
  top: 8px;
  max-width: 180px;
  background: #fff;
  color: #1e293b;
  padding: 10px 14px 12px;
  border-radius: 18px 18px 18px 6px;
  text-align: left;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  animation: bubbleIn 0.45s ease both;
  z-index: 2;
}
.speech strong { display: block; font-size: 1.05rem; color: #dc2626; }
.speech span { display: block; font-size: 0.82rem; color: #475569; margin-top: 2px; }
.speech::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 16px;
  border: 10px solid transparent;
  border-left-color: #fff;
}

.onboard-hero { display: grid; justify-items: center; margin-bottom: 8px; }
.onboard-hero .mascot-svg { width: 200px; }
.onboard-hero .speech { left: auto; right: 12%; top: 0; }

.color-violet,
.color-teal,
.color-coral,
.color-week {
  background: var(--surface);
  border-color: var(--line);
}

.unit-num {
  background: var(--amber-dim);
  color: var(--amber-2);
}
.unit-bar { height: 4px; background: var(--surface-3); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.unit-bar i { display: block; height: 100%; background: var(--mint); border-radius: inherit; transition: width 0.6s ease; }
.unit { cursor: default; }
.unit:hover { transform: none; }
.unit-num svg { width: 26px; height: 26px; }
.unit h4 .tag { vertical-align: middle; margin-left: 6px; }

/* ---------- conclusão ---------- */
.done-wrap { text-align: center; max-width: 640px; margin: 4vh auto 0; }
.done-badge {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--mint), #4ade80);
  color: #052e16;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 40px rgba(134,239,172,0.3);
  animation: badgeIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.done-badge svg { width: 42px; height: 42px; }
.done-stats .stat { text-align: center; }
.done-stats .stat .n .faint { font-size: 1rem; }

/* ---------- diálogo ---------- */
.dlg { display: grid; gap: 10px; }
.bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}
.bubble.me { margin-left: auto; border-radius: 16px 16px 4px 16px; background: var(--amber-dim); border-color: rgba(232,163,23,0.25); }
.bubble.old { opacity: 0.55; }
.bubble:hover { opacity: 1; border-color: var(--line-strong); }
.bubble-en { font-size: 1.08rem; font-weight: 500; }

/* ---------- ajustes ---------- */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.toggle-row:last-child { border-bottom: 0; }
.switch { width: 46px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: 0.2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: 0.2s; }
.switch.on { background: var(--amber); }
.switch.on i { left: 23px; background: #1a1204; }

.mic svg { width: 34px; height: 34px; }
.flash.flipped { border-color: rgba(232,163,23,0.3); }
.read-text .nn { border-bottom: 1px dashed var(--line-strong); cursor: pointer; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ring-wrap { justify-items: start; }
  .match { gap: 10px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px 16px 108px; }
  .grid-2, .grid-3, .pair { grid-template-columns: 1fr; }
  .mobile-nav { display: flex; }
  .topbar { flex-direction: column; }
  .home-hero { grid-template-columns: 1fr; padding: 20px 16px 0; text-align: center; }
  .home-hero .lede { margin-inline: auto; }
  .home-hero .pills { justify-content: center; }
  .speech { left: 8px; }
}
