/* ════════ Teacher Th.AI — Design System (índigo / magenta) ════════ */
:root {
  --ink:        #1a2380;   /* brand indigo */
  --ink-2:      #0a2b84;   /* blue, gradients/active */
  --magenta:    #e91d64;   /* CTA + XP */
  --magenta-soft:#fde3ec;
  --bg:         #eeebe7;    /* warm off-white */
  --surface:    #ffffff;
  --line:       #e7e2db;
  --line-2:     #efeae3;
  --muted:      #7a7a93;
  --muted-2:    #9b9bb0;
  --ink-08:     rgba(26,35,128,.08);
  --ink-12:     rgba(26,35,128,.12);
  --ok:         #1f9d6b;
  --warn:       #e08a1e;
  --grad:       linear-gradient(145deg,#1a2380 0%,#0a2b84 100%);
  --grad-mag:   linear-gradient(140deg,#f24b86 0%,#e91d64 100%);
  --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --radius: 18px;
  --shadow-card:0 1px 2px rgba(26,35,128,.04), 0 8px 24px rgba(26,35,128,.07);
  --shadow-pop: 0 12px 40px rgba(26,35,128,.16);
  --font: "Poppins", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

/* ── Header (global, only on chat) ── */
header {
  display: none;
  align-items: center;
  justify-content: space-between;
  /* topo seguro: soma o inset do sistema ao espaçamento do header */
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 20px 6px;
  background: var(--grad);
  color: #fff;
}
#app.screen-chat header { display: flex; }
.logo { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: #fff; line-height: 0; }
.logo span { color: var(--magenta); }
.logo-img { height: 64px; width: auto; display: block; }

/* ── Screen switching ── */
.auth-screen, .reset-screen, .chat-screen, .profile-screen, .admin-screen, .student-detail-screen, .leaderboard-screen, .chunks-screen, .dictionary-screen, .achievements-screen, .consumption-screen { display: none; }
#app.screen-auth    .auth-screen    { display: flex; }
#app.screen-reset   .reset-screen   { display: flex; }
#app.screen-chat    .chat-screen    { display: flex; }
#app.screen-profile .profile-screen { display: flex; }
#app.screen-admin   .admin-screen   { display: flex; }
#app.screen-student-detail .student-detail-screen { display: flex; }
#app.screen-leaderboard .leaderboard-screen { display: flex; }
#app.screen-chunks  .chunks-screen  { display: flex; }
#app.screen-dictionary .dictionary-screen { display: flex; }
#app.screen-achievements .achievements-screen { display: flex; }
#app.screen-consumption .consumption-screen { display: flex; }
.consumption-screen { flex: 1; flex-direction: column; min-height: 0; background: var(--bg); overflow-y: auto; padding-bottom: 24px; }
.consumption-body { padding: 0 20px; }
.chat-screen { flex: 1; flex-direction: column; min-height: 0; }
.achievements-screen { flex: 1; flex-direction: column; min-height: 0; background: var(--bg); overflow-y: auto; padding-bottom: 24px; }
.achievements-screen .badges-grid { padding: 0 20px; }

/* ════════ Buttons ════════ */
.auth-btn, .logout-btn, .admin-entry-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: none; cursor: pointer;
  font-family: var(--font); font-weight: 600; font-size: 16px;
  border-radius: 16px; padding: 15px 22px; width: 100%;
  transition: transform .12s, box-shadow .15s, background .15s;
  letter-spacing: .1px;
}
.auth-btn:active, .logout-btn:active, .admin-entry-btn:active { transform: translateY(1px) scale(.995); }
.auth-btn { background: var(--grad-mag); color: #fff; box-shadow: 0 8px 20px rgba(233,29,100,.32); }
.auth-btn:disabled { opacity: .6; cursor: default; }
.admin-entry-btn { background: var(--ink-08); color: var(--ink); margin-top: 10px; }
.logout-btn { background: transparent; color: var(--magenta); box-shadow: inset 0 0 0 1.5px rgba(233,29,100,.3); margin-top: 10px; }

/* ════════ XP chip ════════ */
.xp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 5px 13px 5px 6px;
  box-shadow: var(--shadow-card); border: none; cursor: pointer;
}
.xp-chip-level {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.xp-chip-xp { font-size: 12px; font-weight: 700; color: var(--magenta); }

/* ════════ Streak chip (perfil — canto superior direito) ════════ */
.streak-chip {
  position: absolute; top: 12px; right: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--magenta-soft); color: var(--magenta);
  border: none; border-radius: 999px; padding: 6px 12px;
  font-family: var(--font); font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.streak-chip.pulse { animation: streak-pulse .6s ease; }
@keyframes streak-pulse {
  0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); }
}

/* ════════ Meta diária ════════ */
.daily-goal-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: var(--r-md, 18px); padding: 14px 16px;
  margin: 16px 0 28px; box-shadow: var(--shadow-card);
}
.daily-ring { position: relative; width: 56px; height: 56px; flex: 0 0 auto; }
.daily-ring__num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--ink);
}
.daily-ring.complete .daily-ring__num { color: var(--ok); }
.daily-goal-info { flex: 1; min-width: 0; text-align: left; }
.daily-goal-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.daily-goal-label { font-size: 13px; color: var(--muted); font-weight: 600; margin: 2px 0 6px; }
.daily-goal-edit { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.daily-goal-edit input {
  width: 64px; border: none; background: var(--bg); border-radius: 8px;
  padding: 5px 8px; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

/* ════════ Conquistas ════════ */
.section-title { font-size: 14px; font-weight: 800; color: var(--ink); text-align: left; margin: 18px 0 10px; }
.badges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge {
  background: #fff; border-radius: 16px; padding: 14px 8px; text-align: center;
  box-shadow: var(--shadow-card);
}
.badge-icon { font-size: 28px; line-height: 1; }
.badge-title { font-size: 11px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.badge { cursor: pointer; }
.badge.locked { filter: grayscale(1); opacity: .42; }

/* Popup de conquista */
.ach-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 28px;
  background: rgba(60,62,90,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.ach-modal-card {
  background: #fff; border-radius: 22px; padding: 28px 24px; max-width: 320px; width: 100%;
  text-align: center; box-shadow: var(--shadow-pop); animation: xp-pop .35s ease;
}
.ach-modal-icon { font-size: 54px; line-height: 1; }
.ach-modal-card.locked .ach-modal-icon { filter: grayscale(1); opacity: .55; }
.ach-modal-title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 12px 0 6px; }
.ach-modal-status { font-size: 12px; font-weight: 800; color: var(--magenta); margin-bottom: 10px; }
.ach-modal-desc { font-size: 14px; line-height: 1.5; color: var(--muted); margin-bottom: 20px; }
.ach-modal-close { width: 100%; }

/* ════════ Ranking ════════ */
.leaderboard-screen { flex: 1; flex-direction: column; min-height: 0; overflow-y: auto; padding-bottom: 24px; }
.leaderboard-list { display: flex; flex-direction: column; gap: 10px; padding: 0 20px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-card);
}
.lb-row.me { box-shadow: inset 0 0 0 2px var(--magenta); background: var(--magenta-soft); }
.lb-rank { font-size: 16px; font-weight: 800; color: var(--ink); min-width: 34px; text-align: center; }
.lb-avatar { font-size: 24px; }
.lb-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-xp { font-size: 13px; font-weight: 800; color: var(--magenta); }

/* ════════ Confete ════════ */
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

/* ════════ Chunks ════════ */
.chunks-screen { flex: 1; flex-direction: column; min-height: 0; background: var(--bg); overflow: hidden; }
.chunk-cats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 4px 20px 14px; flex: 0 0 auto;
}
.chunk-cat {
  border: none; cursor: pointer; font-family: var(--font);
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: #fff; box-shadow: var(--shadow-card);
  padding: 12px 6px; border-radius: 14px; min-height: 70px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  text-align: center; line-height: 1.1;
}
.chunk-cat .cat-ico { font-size: 22px; line-height: 1; }
.chunk-cat.active { background: var(--grad-mag); color: #fff; box-shadow: 0 6px 16px rgba(233,29,100,.28); }

.chunk-stage {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; padding: 12px 22px; text-align: center;
  overflow-y: auto;
}
.chunk-hint { font-size: 15px; color: var(--muted); font-weight: 500; max-width: 280px; }
.chunk-card {
  width: 100%; background: var(--surface); border-radius: var(--r-lg, 24px);
  box-shadow: var(--shadow-pop); padding: 30px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.chunk-text { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.3; letter-spacing: -.3px; }
.chunk-pt { font-size: 14px; color: var(--muted); font-weight: 500; }
.chunk-example { font-size: 13px; color: var(--muted-2); font-style: italic; line-height: 1.4; }
.chunk-listen {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink-08); color: var(--ink); border: none; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 999px;
}
.chunk-listen:disabled { opacity: .5; }
.chunk-feedback { min-height: 22px; font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.chunk-feedback.ok { color: var(--ok); font-weight: 800; }
.chunk-feedback.err { color: var(--warn); }

.chunk-bar { gap: 22px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.chunk-bar-spacer { width: 56px; flex: 0 0 auto; }

/* botão de ranking na barra do chat */
.bottom-bar-spacer { width: 52px; flex: 0 0 auto; }
.rank-btn {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  background: var(--grad); color: #fff; border: none; cursor: pointer;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(26,35,128,.26);
}
.rank-btn:active { transform: translateY(1px); }
.chunk-next {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
  background: var(--grad); color: #fff; border: none; cursor: pointer;
  font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(26,35,128,.26);
}
.chunk-next:active { transform: translateY(1px); }

/* ════════ Dicionário / Flashcards ════════ */
.dictionary-screen { flex: 1; flex-direction: column; min-height: 0; background: var(--bg); overflow: hidden; }
.dict-tabs { display: flex; gap: 8px; background: var(--ink-08); border-radius: 999px; padding: 4px; margin: 4px 20px 14px; }
.dict-tab {
  flex: 1; border: none; cursor: pointer; font-family: var(--font);
  font-size: 14px; font-weight: 700; color: var(--muted);
  background: transparent; padding: 9px 12px; border-radius: 999px;
}
.dict-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-card); }
.dict-panel { flex: 1; min-height: 0; }
#dict-tab-list { overflow-y: auto; padding: 0 20px 20px; }
.dict-cat-filter {
  width: 100%; border: none; background: #fff; border-radius: 12px; padding: 12px 14px;
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-card); margin-bottom: 16px;
}
.dict-list { display: flex; flex-direction: column; gap: 10px; }
.dict-letter { font-size: 15px; font-weight: 800; color: var(--magenta); margin: 10px 2px 2px; }
.dict-letter:first-child { margin-top: 0; }
.dict-row { background: #fff; border-radius: 14px; padding: 12px 15px; box-shadow: var(--shadow-card); }
.dict-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dict-chunk { font-size: 15px; font-weight: 800; color: var(--ink); }
.dict-row-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.dict-del, .dict-edit { border: none; background: transparent; cursor: pointer; font-size: 15px; opacity: .6; padding: 2px 4px; }
.dict-del:active, .dict-edit:active { opacity: 1; }
.dict-mine { background: var(--ink-08); color: var(--ink); padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; margin-left: 4px; }

/* Form de chunk manual */
.dict-add-toggle {
  width: 100%; border: none; cursor: pointer; font-family: var(--font);
  font-weight: 700; font-size: 14px; color: var(--ink); background: var(--ink-08);
  padding: 12px; border-radius: 12px; margin-bottom: 14px;
}
.dict-form { background: #fff; border-radius: 16px; padding: 24px 18px; box-shadow: var(--shadow-card); margin-bottom: 14px; display: flex; flex-direction: column; gap: 28px; }
.dict-form input, .dict-form select {
  width: 100%; border: none; background: var(--bg); border-radius: 12px;
  padding: 14px 14px; font-family: var(--font); font-size: 14px; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.dict-form-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.dict-form-actions .auth-btn { flex: 1; }
.dict-form-cancel { border: none; background: transparent; color: var(--muted); font-family: var(--font); font-weight: 700; font-size: 14px; cursor: pointer; padding: 8px; }
.dict-pt { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dict-ex { font-size: 12.5px; color: var(--muted-2); font-style: italic; margin-top: 4px; line-height: 1.4; }
.dict-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.dict-cat { background: var(--magenta-soft); color: var(--magenta); padding: 2px 9px; border-radius: 999px; font-weight: 700; }

/* Flashcards */
#dict-tab-cards { flex-direction: column; }
.flash-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 6px 20px 20px; gap: 16px; }
.flash-card {
  width: 100%; min-height: 230px; border-radius: var(--r-lg, 24px);
  background: var(--grad-mag); color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 26px 20px; box-shadow: var(--shadow-pop); text-align: center;
}
.flash-card.flipped { background: var(--grad); }
.flash-label { font-size: 14px; font-weight: 700; opacity: .9; }
.flash-term { font-size: 28px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; }
.flash-hint { font-size: 13px; font-weight: 600; opacity: .85; }
.flash-nav { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center; }
.flash-nav-btn {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: 13.5px;
  color: var(--ink); background: #fff; box-shadow: var(--shadow-card);
  padding: 11px 14px; border-radius: 999px;
}
.flash-nav-btn.solid { background: var(--ink-08); }
.flash-info { width: 100%; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-card); font-size: 13px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.flash-info b { color: var(--muted); font-weight: 700; }
.flash-count { color: var(--muted-2); font-weight: 700; margin-top: 4px; }

/* ════════ Consumo (professor) ════════ */
.usage-period { display: flex; gap: 10px; margin: 4px 0 16px; }
.usage-period select {
  flex: 1; border: none; background: #fff; border-radius: 12px; padding: 12px 14px;
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-card);
}
.usage-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.usage-card { background: #fff; border-radius: 16px; padding: 16px 10px; text-align: center; box-shadow: var(--shadow-card); }
.usage-card.total { background: var(--grad-mag); }
.usage-card.total .usage-num, .usage-card.total .usage-lbl { color: #fff; }
.usage-num { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; }
.usage-lbl { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.usage-section-title { font-size: 14px; font-weight: 800; color: var(--ink); margin: 4px 2px 10px; }
.usage-list { display: flex; flex-direction: column; gap: 8px; }
.usage-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 11px 14px; box-shadow: var(--shadow-card); }
.usage-av { font-size: 22px; }
.usage-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-count { font-size: 13px; font-weight: 800; color: var(--magenta); }

/* Bloco de limite (consumo do aluno) */
.usage-limit { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow-card); margin-bottom: 18px; }
.usage-limit-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.usage-plan-tag { font-size: 12px; font-weight: 800; color: var(--ink); background: var(--ink-08); border-radius: 999px; padding: 4px 12px; }
.usage-limit-count { font-size: 15px; font-weight: 800; color: var(--ink); }
.usage-limit-bar { height: 10px; border-radius: 999px; background: var(--ink-08); overflow: hidden; }
.usage-limit-fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad-mag); transition: width .3s ease; }
.usage-limit-note { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.usage-limit.reached .usage-limit-fill { background: #e23b3b; }
.usage-limit.reached .usage-limit-count { color: #e23b3b; }
.usage-limit.reached .usage-limit-note { color: #e23b3b; }

/* Tag de plano na lista de alunos (professor) */
.plan-tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; background: var(--ink-08); color: var(--ink); }
.student-plan-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.student-plan-row select {
  border: none; background: #fff; border-radius: 10px; padding: 6px 10px;
  font-family: var(--font); font-size: 12.5px; font-weight: 700; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer;
}
.student-usage { font-size: 12px; font-weight: 700; color: var(--muted); }
.student-usage.over { color: #e23b3b; }

/* ════════ Auth / Reset ════════ */
.auth-screen, .reset-screen {
  flex: 1; flex-direction: column; min-height: 0;
  overflow-y: auto;
}
.auth-card {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 0 0 28px;
}
.auth-avatar {
  background: var(--grad);
  color: #fff; font-size: 56px;
  display: flex; align-items: center; justify-content: center;
  padding: 30px 0 34px;
  border-radius: 0 0 34px 34px;
  box-shadow: var(--shadow-card);
}
.auth-logo { width: 200px; height: auto; display: block; }
.auth-card h2 {
  font-size: 26px; font-weight: 800; letter-spacing: -.5px;
  text-align: center; margin: 26px 24px 6px; color: var(--ink);
}
.auth-sub {
  text-align: center; font-size: 14px; color: var(--muted);
  font-weight: 500; line-height: 1.4; margin: 0 28px 22px;
}
#auth-form, #reset-form { padding: 0 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-card input, .reset-screen input, .eb-input,
.profile-name-input, .student-search {
  width: 100%; border: none; background: #fff;
  border-radius: 14px; padding: 15px 16px;
  font-family: var(--font); font-size: 15px; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .15s;
}
.auth-card input::placeholder, .reset-screen input::placeholder,
.profile-name-input::placeholder, .student-search::placeholder { color: var(--muted-2); }
.auth-card input:focus, .reset-screen input:focus,
.profile-name-input:focus, .student-search:focus {
  outline: none; box-shadow: inset 0 0 0 1.5px var(--ink);
}
.auth-msg { font-size: 13px; margin: 12px 24px 0; text-align: center; line-height: 1.4; min-height: 1px; }
.auth-msg.ok  { color: var(--ok); }
.auth-msg.err { color: var(--magenta); }
.auth-link {
  background: none; border: none; cursor: pointer;
  color: var(--magenta); font-size: 13px; font-weight: 600;
  font-family: var(--font); padding: 0;
}
#forgot-link { display: block; margin: 14px auto 0; }
.auth-toggle {
  text-align: center; margin: 22px 24px 0;
  font-size: 14px; color: var(--muted); font-weight: 500;
}
.auth-toggle .auth-link { color: var(--ink); font-weight: 700; }

/* reset screen appbar */
.reset-screen .auth-avatar {
  background: var(--magenta-soft); color: var(--magenta);
  border-radius: 22px; font-size: 34px;
  width: 72px; height: 72px; padding: 0;
  margin: 24px auto 18px;
}

/* ════════ Chat ════════ */
.chat-screen { background: var(--bg); }
.inactive-banner {
  position: absolute; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center;
  padding: 28px;
  background: rgba(60,62,90,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.inactive-card {
  background: #fff; border-radius: 22px; padding: 30px 26px;
  max-width: 320px; width: 100%; text-align: center;
  box-shadow: var(--shadow-pop);
  animation: xp-pop .35s ease;
}
.inactive-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 32px; background: rgba(224,138,30,.12);
}
.inactive-card h3 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 8px; letter-spacing: -.3px; }
.inactive-card p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }

.avatar-section {
  background: var(--grad);
  color: #fff;
  border-radius: 0 0 30px 30px;
  padding: 0 20px 12px;
  display: flex; flex-direction: column; align-items: center;
}
.avatar-wrapper {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0;
}
/* the mascot disc (replaces avela.png) */
#buddy-avatar, .mascot-disc {
  width: 104px; height: 104px; border-radius: 50%;
  background-image: repeating-linear-gradient(135deg,#dfe0ef 0 9px,#eceaf6 9px 18px);
  box-shadow: inset 0 0 0 2px rgba(26,35,128,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; position: relative; z-index: 2;
  overflow: hidden;
}
.mascot-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.mouth-overlay { display: none !important; }

/* sound waves (listening) */
.sound-waves { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.wave {
  position: absolute; width: 104px; height: 104px;
  border-radius: 50%; border: 2px solid var(--magenta); opacity: 0;
}
#app.listening .wave { animation: ebwave 1.8s ease-out infinite; }
#app.listening .wave.wave2 { animation-delay: .6s; }
#app.listening .wave.wave3 { animation-delay: 1.2s; }
@keyframes ebwave { 0% { opacity: .5; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.4); } }
#app.speaking .mascot-disc, #app.speaking #buddy-avatar { animation: ebbob 1.4s ease-in-out infinite; }
@keyframes ebbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* equalizer (speaking) */
.eb-eq { display: none; align-items: flex-end; gap: 3px; height: 18px;
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  background: #fff; padding: 6px 10px; border-radius: 999px; box-shadow: var(--shadow-card); z-index: 3; }
#app.speaking .eb-eq { display: flex; }
.eb-eq i { width: 3px; background: var(--magenta); border-radius: 2px; animation: ebeq .9s ease-in-out infinite; }
.eb-eq i:nth-child(2){ animation-delay:.15s } .eb-eq i:nth-child(3){ animation-delay:.3s }
.eb-eq i:nth-child(4){ animation-delay:.45s } .eb-eq i:nth-child(5){ animation-delay:.2s }
@keyframes ebeq { 0%,100% { height: 5px; } 50% { height: 18px; } }

.status-text {
  margin-top: 10px; font-size: 14.5px; font-weight: 600;
  color: rgba(255,255,255,.95);
  display: flex; align-items: center; gap: 8px;
}
#app.listening .status-text::before {
  content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--magenta);
}

.chat-area {
  flex: 1; overflow-y: auto;
  padding: 18px 20px 8px;
  display: flex; flex-direction: column; gap: 18px;
}
.chat-intro {
  margin: auto; text-align: center; color: var(--muted);
  font-size: 14px; line-height: 1.5; padding: 0 24px;
}
.chat-intro p { background: #fff; padding: 16px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-card); color: var(--ink); }

/* sugestões de fala (não clicáveis) */
.suggestions-row { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin: 4px 0 2px; }
.suggestions-label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.suggestion-chip {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line);
  box-shadow: var(--shadow-card); border-radius: 16px; border-bottom-left-radius: 6px;
  padding: 9px 13px; font-size: 13px; line-height: 1.35; max-width: 88%;
  pointer-events: none; user-select: none;
}

/* bubbles */
.bubble-row { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.bubble-row.user { align-items: flex-end; }
.bubble-row.ai   { align-items: flex-start; }
.bubble-avatar { display: none; }
.bubble-wrap { display: flex; flex-direction: column; max-width: 82%; }
.bubble-row.user .bubble-wrap { align-items: flex-end; }
.bubble {
  padding: 12px 15px; font-size: 14.5px; line-height: 1.45; border-radius: 20px;
}
.bubble-row.ai .bubble { background: #fff; color: var(--ink); border-bottom-left-radius: 7px; box-shadow: var(--shadow-card); }
.bubble-row.user .bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 7px; box-shadow: 0 6px 16px rgba(26,35,128,.22); }
.bubble .phonetic { font-family: var(--mono); font-size: .85em; opacity: .8; }
.bubble strong { font-weight: 700; }

.repeat-btn {
  margin-top: 2px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink-08); color: var(--ink); border: none; cursor: pointer;
  font-family: var(--font); font-weight: 600; font-size: 12.5px;
  padding: 7px 13px; border-radius: 999px; align-self: flex-start;
}
.bubble-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bubble-actions .repeat-btn { margin-top: 0; }

/* confidence ring */
.conf-ring { position: relative; width: 34px; height: 34px; }
.conf-ring__num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--ink); }

.bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 7px; }
.xp-gain {
  font-size: 15px; font-weight: 800; color: var(--magenta);
  background: var(--magenta-soft); padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
  animation: xp-pop .4s ease;
  opacity: 1; transition: opacity .45s ease, transform .45s ease;
}
.xp-gain.leaving { opacity: 0; transform: translateY(-6px); }
@keyframes xp-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

.typing-indicator { display: inline-flex; gap: 4px; align-items: center; }
.typing-indicator span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: ebtype 1.2s infinite; }
.typing-indicator span:nth-child(2){ animation-delay:.2s } .typing-indicator span:nth-child(3){ animation-delay:.4s }
@keyframes ebtype { 0%,60%,100% { opacity:.25; transform: translateY(0); } 30% { opacity:1; transform: translateY(-3px); } }

/* mic bar */
.bottom-bar {
  flex: 0 0 auto; padding: 16px 20px 24px;
  display: flex; align-items: center; justify-content: center; gap: 22px;
}
.mic-btn {
  position: relative; width: 78px; height: 78px; border-radius: 50%;
  background: var(--grad-mag); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(233,29,100,.4); border: none; cursor: pointer; flex: 0 0 auto;
  color: #fff;
  /* Press-and-hold: evita scroll/seleção/callout durante o hold em mobile */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.mic-btn:disabled { background: var(--ink-08); box-shadow: none; cursor: not-allowed; color: var(--muted); }
.mic-icon { width: 30px; height: 30px; pointer-events: none; }
.pulse-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--magenta); opacity: 0; pointer-events: none; }
#app.listening .pulse-ring { animation: ebpulse 1.6s ease-out infinite; }
#app.listening .pulse-ring:nth-of-type(2) { animation-delay: .8s; }
@keyframes ebpulse { 0% { opacity:.55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }

/* ════════ Dock inferior ancorado (tela de chat) ════════ */
.dock-wrap { flex: 0 0 auto; padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.dock {
  position: relative; background: #fff; border-radius: 26px; box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
}
.dock-side {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: transparent; border: none; cursor: pointer; padding: 6px 0; color: var(--ink);
  transition: transform .12s;
}
.dock-side:active { transform: scale(.94); }
.dock-side svg { width: 23px; height: 23px; }
.dock-side span { font-size: 11.5px; font-weight: 700; }
.dock-center { width: 96px; flex: 0 0 auto; display: flex; justify-content: center; position: relative; }
.dock-center .mic-btn { width: 72px; height: 72px; margin-top: -34px; }

/* "Arraste para cima para cancelar" (não-premium) */
.mic-cancel {
  position: absolute; left: 50%; bottom: calc(100% + 48px); transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 5;
}
.mic-cancel-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--muted); box-shadow: var(--shadow-pop);
  border: 2px solid transparent; transition: transform .15s ease, background .15s ease, color .15s ease;
}
.mic-cancel-icon svg { width: 24px; height: 24px; }
/* armado: usuário arrastou para cima o suficiente para cancelar ao soltar */
.mic-cancel.armed .mic-cancel-icon { background: #e23b3b; color: #fff; transform: scale(1.15); }
.mic-btn.cancel-armed { filter: grayscale(.4) brightness(.92); }
.stop-btn {
  width: 52px; height: 52px; border-radius: 18px; border: none;
  background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card); cursor: pointer;
}
.stop-btn svg { width: 22px; height: 22px; }

/* ════════ Profile ════════ */
.profile-screen, .admin-screen, .student-detail-screen {
  flex: 1; flex-direction: column; min-height: 0;
  background: var(--bg);
}
.profile-back, .admin-header .profile-back {
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--ink);
  /* topo seguro + área de toque maior */
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 10px;
  align-self: flex-start;
}
.profile-screen { overflow-y: auto; position: relative; }
.profile-card { padding: 4px 20px 24px; display: flex; flex-direction: column; }
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%; background: #fff; border: none;
  box-shadow: 0 6px 18px rgba(26,35,128,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; margin: 8px auto 4px; cursor: pointer;
  transition: transform .12s;
}
.profile-avatar:active { transform: scale(.95); }
.avatar-hint { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted-2); margin-bottom: 10px; }
.profile-name-input { margin: 14px 0; text-align: center; font-weight: 700; }
.profile-level-badge {
  align-self: center; background: var(--magenta-soft); color: var(--magenta);
  font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.xp-bar-wrap { margin-bottom: 18px; }
.xp-bar { height: 12px; border-radius: 999px; background: var(--ink-08); overflow: hidden; }
.xp-bar-fill { height: 100%; border-radius: 999px; background: var(--grad-mag); transition: width .4s ease; }
.xp-bar-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 7px; text-align: right; }

.avatar-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.avatar-option {
  aspect-ratio: 1; border-radius: 16px; background: var(--bg); border: none; cursor: pointer;
  font-size: 24px; display: flex; align-items: center; justify-content: center;
}
.avatar-option.selected { box-shadow: inset 0 0 0 2.5px var(--magenta); background: var(--magenta-soft); }

/* Modal de seleção de avatar */
.avatar-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(60,62,90,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.avatar-modal-card {
  background: #fff; border-radius: 22px; padding: 22px 20px; max-width: 340px; width: 100%;
  box-shadow: var(--shadow-pop); animation: xp-pop .35s ease; max-height: 80vh; overflow-y: auto;
}
.avatar-modal-title { font-size: 17px; font-weight: 800; color: var(--ink); text-align: center; margin-bottom: 16px; }

/* Seletor de roleplay (cenários) */
#buddy-avatar { cursor: pointer; }
.avatar-wrapper { position: relative; }
.roleplay-badge {
  position: absolute; right: -2px; bottom: -2px; z-index: 4;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad-mag); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(233,29,100,.45); border: 2.5px solid #fff;
  animation: roleplay-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes roleplay-badge-pulse {
  0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); }
}
.roleplay-hint {
  margin-top: 10px; border: none; cursor: pointer; font-family: var(--font);
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.16); border-radius: 999px; padding: 6px 14px;
  backdrop-filter: blur(4px);
}
.roleplay-hint:active { transform: translateY(1px); }
.roleplay-current {
  margin-bottom: 12px; align-self: center;
  font-family: var(--font); font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.18); border-radius: 999px; padding: 6px 16px;
  backdrop-filter: blur(4px); white-space: nowrap;
}
.roleplay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.roleplay-option.empty { border: none; background: none; box-shadow: none; pointer-events: none; visibility: hidden; }
.roleplay-option.center { border-color: var(--magenta); }
.roleplay-option {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  height: 128px; min-width: 0; box-sizing: border-box;
  background: var(--bg); border: 2px solid transparent; border-radius: 16px;
  padding: 12px 6px; cursor: pointer; font-family: var(--font);
}
.roleplay-option img { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; object-position: center top; background: #fff; }
.roleplay-option span { font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.2; }
.roleplay-option.selected { border-color: var(--magenta); background: var(--magenta-soft); }
.avatar-modal-close { margin-top: 16px; }

/* Confirmação da fala antes de enviar */
.confirm-text {
  background: var(--bg); color: var(--ink); border-radius: 16px;
  padding: 14px 16px; font-size: 15px; line-height: 1.45; font-weight: 600;
  text-align: center; word-break: break-word;
}
.confirm-actions { display: flex; gap: 10px; margin-top: 18px; }
.confirm-actions button {
  flex: 1; border: none; cursor: pointer; font-family: var(--font);
  font-weight: 700; font-size: 15px; padding: 13px 14px; border-radius: 14px;
}
.confirm-cancel { background: var(--ink-08); color: var(--ink); }
.confirm-send { background: var(--grad-mag); color: #fff; box-shadow: var(--shadow-pop); }
.confirm-actions button:active { transform: translateY(1px); }

/* Popup de limite mensal atingido */
.limit-emoji { font-size: 40px; text-align: center; margin-bottom: 6px; }
.limit-text { font-size: 14px; line-height: 1.5; color: var(--ink); text-align: center; margin-bottom: 18px; }
.limit-modal .limit-ok { margin-top: 0; }

/* ════════ Admin ════════ */
.admin-header { display: flex; flex-direction: column; }
.admin-header h2 { font-size: 20px; font-weight: 700; color: var(--ink); padding: 0 20px 8px; letter-spacing: -.3px; }
.admin-tabs {
  display: flex; gap: 6px; margin: 0 20px 14px;
  background: var(--ink-08); padding: 4px; border-radius: 14px;
}
.admin-tab {
  flex: 1; text-align: center; padding: 10px; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  background: transparent; border: none; cursor: pointer; font-family: var(--font);
}
.admin-tab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(26,35,128,.1); }
.admin-tab-panel { flex: 1; overflow-y: auto; padding: 0 20px 24px; }
.admin-hint { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }

.student-search { margin-bottom: 12px; }
.student-filter { display: flex; gap: 8px; background: var(--ink-08); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.student-filter-btn {
  flex: 1; border: none; cursor: pointer; font-family: var(--font);
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: transparent; padding: 8px 6px; border-radius: 999px;
}
.student-filter-btn.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-card); }

.student-list { display: flex; flex-direction: column; gap: 12px; }
.student-card {
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-card); padding: 16px;
}
.student-card.clickable { cursor: pointer; transition: box-shadow .15s, transform .12s; }
.student-card.clickable:active { transform: scale(.995); }
.student-info { min-width: 0; }
.student-name { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.role-tag { font-size: 10px; font-weight: 600; background: var(--ink-08); color: var(--ink); padding: 2px 8px; border-radius: 999px; }
.inactive-badge { font-size: 10.5px; font-weight: 600; background: rgba(224,138,30,.14); color: var(--warn); padding: 3px 8px; border-radius: 999px; }
.student-email { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.student-stats {
  font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 8px;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.student-stats b { color: var(--ink); }
.student-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.student-actions .spacer { flex: 1; }
.mini-btn {
  font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 13px;
  border: none; cursor: pointer; font-family: var(--font); white-space: nowrap;
  background: var(--ink-08); color: var(--ink);
}
.mini-btn.on  { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-12); }
.mini-btn.off { background: var(--grad-mag); color: #fff; }
.mini-btn.teacher { background: var(--ink); color: #fff; }

/* prompt editor */
.prompt-textarea {
  width: 100%; min-height: 230px; padding: 16px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  border: none; border-radius: var(--r-md); background: #fff; color: var(--ink);
  box-shadow: var(--shadow-card); resize: vertical; outline: none;
}
.prompt-textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink), var(--shadow-card); }
.prompt-actions { display: flex; gap: 12px; margin-top: 14px; }
.prompt-actions .auth-btn { background: var(--grad); box-shadow: 0 8px 20px rgba(26,35,128,.26); }
.prompt-actions .logout-btn { margin-top: 0; }

/* ════════ Student detail ════════ */
.student-detail-screen { overflow: hidden; }
.detail-body { flex: 1; overflow-y: auto; padding: 4px 20px 24px; }
.detail-head {
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-card);
  padding: 18px; margin-bottom: 14px; display: flex; gap: 14px; align-items: center;
}
.detail-avatar {
  width: 56px; height: 56px; border-radius: 17px; background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 28px; flex: 0 0 auto;
}
.detail-name { font-size: 17px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail-email { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.detail-badge { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.detail-badge.on  { background: rgba(31,157,107,.12); color: var(--ok); }
.detail-badge.off { background: rgba(122,122,147,.14); color: var(--muted); }

.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 14px; }
.stat-val { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }

.detail-section-title { font-size: 13px; font-weight: 700; color: var(--ink); margin: 4px 0 10px 2px; }
.sparkline { width: 100%; height: 90px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 14px; margin-bottom: 16px; display: block; }

.detail-transcript {
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-card);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.detail-msg { display: flex; flex-direction: column; max-width: 88%; gap: 5px; }
.detail-msg.user { align-self: flex-end; align-items: flex-end; }
.detail-msg.ai   { align-self: flex-start; align-items: flex-start; }
.detail-msg-bubble { font-size: 13.5px; line-height: 1.45; padding: 10px 14px; border-radius: 16px; }
.detail-msg.ai .detail-msg-bubble { background: var(--bg); color: var(--ink); border-bottom-left-radius: 6px; }
.detail-msg.user .detail-msg-bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.detail-msg-meta { font-size: 10px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; }
.detail-score { font-weight: 700; color: var(--magenta); background: var(--magenta-soft); padding: 0 6px; border-radius: 8px; }

/* ════════ Toast ════════ */
.toast {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-pop);
  z-index: 100; max-width: 86%; text-align: center; animation: toast-in .25s ease;
  pointer-events: none;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
