
:root {
  --bg: #fdf2f6;
  --surface: #ffffff;
  --surface-alt: #fbe8ef;
  --surface-sunk: #f6e0e9;
  --border: #f3d4e0;
  --text: #3a2233;
  --text-muted: #7d5f6e;
  --text-faint: #7a5c6b;

  --accent: #ff6f91;
  --accent-strong: #bd2b55;
  --accent-soft: #ffd6e2;
  /* versões mais fechadas só onde há texto sobre a cor (contraste mínimo 4,5:1 do WCAG AA) */
  --accent-btn: #c9305a;
  --on-accent-btn: #ffffff;
  --success-btn: #3d7a5a;
  --on-success-btn: #ffffff;
  --success-text: #276b4b;
  --danger-text: #a83722;
  --plum-btn: #85558a;
  --on-plum-btn: #ffffff;

  --warm: #ffb562;
  --warm-soft: #ffe6c2;

  --success: #4fb488;
  --success-soft: #d7f2e6;

  --coin: #f0b429;
  --coin-soft: #fdedc4;

  --danger: #e5654a;
  --danger-soft: #fbe0da;

  --plum: #9b6b9e;
  --plum-soft: #ece0f0;

  --shadow-soft: 0 8px 24px rgba(180, 60, 110, 0.12);
  --shadow-tap: 0 2px 8px rgba(180, 60, 110, 0.16);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;

  /* refinamento visual: só combinações novas das cores de cima, nenhum matiz novo.
     --accent-hero-light é um tom intermediário entre --accent e --accent-strong: usar --accent puro
     no degradê deixaria o texto branco por cima com contraste 2,65:1 (abaixo do mínimo AA de 4,5:1).
     Esse tom garante 4,92:1 em qualquer ponto do degradê (o outro lado, --accent-strong, já dá 5,77:1). */
  --accent-hero-light: #ca3961;
  --grad-hero: linear-gradient(135deg, var(--accent-strong), var(--accent-hero-light));
  --shadow-hero: 0 10px 28px rgba(189, 43, 85, 0.22);

  /* Modo Amigos: cor própria (azul), separada de propósito da paleta do casal —
     é outro "modo" do app, não um reskin do casal. Contraste conferido (≥4,5:1). */
  --friends-accent: #3d66c9;
  --friends-accent-strong: #2f52a0;
  --friends-accent-soft: #dce6fc;
  --on-friends-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #221521;
    --surface: #2e1d2c;
    --surface-alt: #3a2536;
    --surface-sunk: #1a1119;
    --border: #4a2f43;
    --text: #f6e9ef;
    --text-muted: #cba7ba;
    --text-faint: #a88a9a;

    --accent: #ff87a3;
    --accent-strong: #ff9fb7;
    --accent-soft: #4a2536;

    --warm: #ffc98a;
    --warm-soft: #3f2c1c;

    --success: #6fd2a8;
    --success-soft: #1c3a2d;

    --coin: #f6c445;
    --coin-soft: #3a2e14;

    --danger: #ff9c85;
    --danger-soft: #3a231d;

    --plum: #c79fca;
  --accent-btn: #ff87a3;
  --on-accent-btn: #2b1226;
  --success-btn: #6fd2a8;
  --on-success-btn: #0f2a1f;
  --success-text: #6fd2a8;
  --danger-text: #ff9c85;
  --plum-btn: #c79fca;
  --on-plum-btn: #2b1226;
    --accent-btn: #ff87a3;
    --on-accent-btn: #2b1226;
    --success-btn: #6fd2a8;
    --on-success-btn: #0f2a1f;
    --success-text: #6fd2a8;
    --danger-text: #ff9c85;
    --plum-btn: #c79fca;
    --on-plum-btn: #2b1226;
    --plum-soft: #302636;

    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-tap: 0 2px 8px rgba(0, 0, 0, 0.4);

    --grad-hero: linear-gradient(135deg, var(--accent-strong), var(--accent));
    --shadow-hero: 0 10px 28px rgba(0, 0, 0, 0.4);

    --friends-accent: #8fb3f5;
    --friends-accent-strong: #8fb3f5;
    --friends-accent-soft: #22315a;
    --on-friends-accent: #2b1226;
  }
}

:root[data-theme="dark"] {
  --bg: #221521;
  --surface: #2e1d2c;
  --surface-alt: #3a2536;
  --surface-sunk: #1a1119;
  --border: #4a2f43;
  --text: #f6e9ef;
  --text-muted: #cba7ba;
  --text-faint: #a88a9a;

  --accent: #ff87a3;
  --accent-strong: #ff9fb7;
  --accent-soft: #4a2536;

  --warm: #ffc98a;
  --warm-soft: #3f2c1c;

  --success: #6fd2a8;
  --success-soft: #1c3a2d;

  --coin: #f6c445;
  --coin-soft: #3a2e14;

  --danger: #ff9c85;
  --danger-soft: #3a231d;

  --plum: #c79fca;
  --plum-soft: #302636;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-tap: 0 2px 8px rgba(0, 0, 0, 0.4);

  --grad-hero: linear-gradient(135deg, var(--accent-strong), var(--accent));
  --shadow-hero: 0 10px 28px rgba(0, 0, 0, 0.4);

  --friends-accent: #8fb3f5;
  --friends-accent-strong: #8fb3f5;
  --friends-accent-soft: #22315a;
  --on-friends-accent: #2b1226;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  /* no Android (Chrome), arrastar pra baixo no topo de uma tela recarrega a página inteira
     (o gesto nativo de "puxar pra atualizar") — isso interrompe o jogo no meio da partida.
     "contain" mantém o gesto de rolar normal, só desliga esse recarregamento por engano. */
  overscroll-behavior-y: contain;
}

body {
  min-height: 100vh; /* navegador sem suporte a dvh: pelo menos não fica menor que a tela */
  height: 100dvh; /* altura de verdade (não só mínima) — sem isso, o #app-shell só CRESCE em
    vez de ficar do tamanho da tela e deixar o overflow:auto de dentro (#view-container/
    #friends-view) rolar por conta própria; a rolagem acaba acontecendo na página inteira em
    vez de dentro da área certa, o que é inconsistente entre navegadores/Android */
  display: flex;
  justify-content: center;
  overflow-wrap: break-word;
}

h1, h2, h3, .display {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

#app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  height: 100dvh; /* mesmo motivo do body: altura de verdade, não só mínima */
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ---------- topbar ---------- */

.topbar {
  padding: 22px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar .greeting-eyebrow {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}

.topbar h1 {
  font-size: 24px;
  color: var(--text);
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
  flex: none;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--surface-alt);
  box-shadow: var(--shadow-tap);
  font-size: 16px;
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 18px;
  flex: none;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-tap);
}

/* ---------- main content ---------- */

#view-container {
  flex: 1;
  min-height: 0; /* sem isso, um flex:1 com overflow:auto não "encolhe" pra caber no espaço
    disponível — ele cresce pro tamanho do conteúdo e quem acaba rolando é a página inteira,
    não essa área (e a página inteira rolando é inconsistente entre navegadores/Android) */
  padding: 4px 20px 110px;
  overflow-y: auto;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.card + .card { margin-top: 0; }

.card-title {
  font-size: 17px;
  margin-bottom: 4px;
}

/* etiqueta em aba, presa ao canto do cartão (ex.: "Pergunta da semana") */
.card-tab-wrap { position: relative; margin-top: 22px; }
.card-tab {
  position: absolute;
  top: -14px;
  left: 16px;
  background: var(--accent-btn);
  color: var(--on-accent-btn);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-tap);
  z-index: 1;
}

/* cartão-herói: destaque em degradê pra 1 card por tela (ex.: próximo encontro) */
.card-hero {
  background: var(--grad-hero);
  box-shadow: var(--shadow-hero);
  color: var(--on-accent-btn);
}
.card-hero-eyebrow {
  /* sem opacity de propósito: reduziria o contraste do texto sobre o degradê abaixo do mínimo AA.
     a hierarquia vem do peso/tamanho, não da transparência. */
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-hero-number {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 44px;
  line-height: 1.15;
  margin: 2px 0;
}
.card-hero-number span {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 17px;
  opacity: 0.9;
}
.card-hero-sub {
  /* sem opacity, pelo mesmo motivo do eyebrow acima */
  font-size: 13.5px;
}

.card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 22px 0 10px;
}

.section-title:first-child { margin-top: 4px; }

/* ---------- buttons & chips ---------- */

.btn {
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn * { line-height: 1.2; }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent-btn); color: var(--on-accent-btn); box-shadow: var(--shadow-tap); }
.btn-secondary { background: var(--surface-alt); color: var(--accent-strong); }
.btn-warm { background: var(--warm); color: #4a2c07; }
.btn-success { background: var(--success-btn); color: var(--on-success-btn); }
.btn-danger { background: var(--danger-soft); color: var(--danger-text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-plum { background: var(--plum-btn); color: var(--on-plum-btn); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 13px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  background: var(--surface-alt);
  color: var(--accent-strong);
  white-space: nowrap;
}
.pill-coin { background: var(--coin-soft); color: #8a6100; }
.pill-success { background: var(--success-soft); color: var(--success-text); }
.pill-muted { background: var(--surface-sunk); color: var(--text-muted); }

/* ---------- progress ---------- */

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-sunk);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transition: width 0.3s ease;
}

/* bolinhas de progresso (● preenchida / ○ vazia) vindas de progressDots() */
.progress-dots {
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--accent-strong);
}

.hearts-row { display: flex; gap: 6px; font-size: 20px; }

/* ---------- banners ---------- */

.banner {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.banner-warm { background: var(--warm-soft); }
.banner-icon { font-size: 26px; line-height: 1; }
.banner-text { font-size: 14px; line-height: 1.5; }
.banner-text strong { display: block; margin-bottom: 2px; font-family: "Baloo 2"; font-size: 15px; }

/* ---------- toggle switch ---------- */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.switch {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-sunk);
  position: relative;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.switch.on { background: var(--accent); }
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch.on::after { transform: translateX(20px); }

/* ---------- calendar ---------- */

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.month-nav button {
  background: var(--surface-alt);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--accent-strong);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.month-nav h2 { font-size: 18px; }

.weekday-row, .day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.weekday-row { margin-bottom: 6px; }
.weekday-row span {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
}

.day-cell {
  aspect-ratio: 1;
  border-radius: 14px;
  border: none;
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  padding: 2px;
  overflow: hidden;
  min-width: 0;
}
.day-cell.empty { background: transparent; cursor: default; }
.day-cell .num { font-size: 13px; font-weight: 700; }
.day-cell.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.day-cell.selected { background: var(--accent-soft); }
.day-cell .dots { display: flex; gap: 2px; font-size: 9px; max-width: 100%; overflow: hidden; flex-wrap: wrap; justify-content: center; line-height: 1.2; }

/* ---------- day detail / list items ---------- */

.entry-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.entry-item:last-child { border-bottom: none; }
.entry-icon { font-size: 22px; line-height: 1.3; }
.entry-body { flex: 1; min-width: 0; }
.entry-title { font-weight: 800; font-size: 14.5px; }
.entry-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.entry-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- mood grid ---------- */

.mood-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.mood-btn {
  background: var(--surface-alt);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 0 0 80px;
  width: 80px;
  scroll-snap-align: start;
}
.mood-btn .emoji { font-size: 26px; }
.mood-btn .label { font-size: 10.5px; font-weight: 700; text-align: center; color: var(--text-muted); line-height: 1.2; overflow-wrap: break-word; max-width: 100%; }
.mood-btn.selected { border-color: var(--accent); background: var(--accent-soft); }

.talk-options { display: flex; flex-direction: column; gap: 8px; }
.talk-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
}
.talk-option.selected { border-color: var(--plum); background: var(--plum-soft); }

.partner-mood-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.partner-mood-card .emoji-big { font-size: 40px; flex: none; }
.partner-mood-card > div { min-width: 0; }

.history-strip { display: flex; gap: 8px; justify-content: space-between; margin-top: 8px; }
.history-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--text-faint); }
.history-day .dot { font-size: 18px; }

/* dentro da turma, humor/quer-conversar usam a cor de destaque da turma, não a do casal */
#screen-friends .mood-btn.selected { border-color: var(--friends-accent); background: var(--friends-accent-soft); }
#screen-friends .talk-option.selected { border-color: var(--friends-accent); background: var(--friends-accent-soft); }

/* faixa de humor da Home (casal e turma) — card colorido por dia, mais chamativo que os pontinhos da aba Humor */
.moodstrip-grid { display: flex; gap: 6px; justify-content: space-between; margin-top: 8px; }
.moodstrip-cell {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface-alt); border-radius: 14px; padding: 10px 2px;
}
.moodstrip-cell.today { background: var(--accent-soft); }
.moodstrip-cell .emoji { font-size: 22px; line-height: 1; }
.moodstrip-cell .day { font-size: 10px; font-weight: 800; color: var(--text-muted); }

/* estrelas (Fazer juntos) */
.star-row { display: flex; gap: 2px; align-items: center; }
.star-row .star { font-size: 20px; line-height: 1; color: var(--border); cursor: pointer; }
.star-row .star.filled { color: #ffb648; }
.idea-card { display: flex; gap: 12px; align-items: flex-start; }
.idea-photo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; }

/* ---------- relógio flip (cronômetro do último beijo) ---------- */

.flip-clock {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 4px;
}
.flip-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.flip-value {
  position: relative;
  display: block;
  min-width: 44px;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--accent-btn);
  color: var(--on-accent-btn);
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-tap);
}
.flip-value::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.22);
}
.flip-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

textarea, input[type="text"], input[type="date"], input[type="time"] {
  width: 100%;
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
}
textarea:focus, input:focus { border-color: var(--accent); }
label.field-label { font-size: 12.5px; font-weight: 800; color: var(--text-muted); display: block; margin: 12px 0 6px; }
label.field-label:first-child { margin-top: 0; }

/* ---------- bottom nav ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(180, 60, 110, 0.1);
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  cursor: pointer;
  color: var(--text-faint);
  border-radius: 14px;
  position: relative;
}
.nav-btn .nav-icon { display: flex; }
.icon { display: inline-block; vertical-align: middle; flex: none; }
.nav-btn .nav-label { font-size: 10px; font-weight: 800; }
.nav-btn.active { color: var(--accent-strong); }
.dot-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}
.nav-btn .nav-dot {
  position: absolute;
  top: 2px;
  right: calc(50% - 16px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

/* ---------- onboarding ---------- */

#screen-onboarding {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  gap: 18px;
  text-align: center;
}
#screen-onboarding .logo { font-size: 52px; }
#screen-onboarding h1 { font-size: 30px; margin-bottom: 6px; }
#screen-onboarding .tagline { color: var(--text-muted); font-size: 14.5px; margin-bottom: 10px; }
.onboarding-code {
  font-family: "Baloo 2", sans-serif;
  font-size: 34px;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* ---------- tour de boas-vindas ---------- */
.tour-topbar { display: flex; align-items: center; justify-content: space-between; }
.tour-back {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--surface-alt); color: var(--text); font-size: 16px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.tour-back:active { transform: scale(0.92); }
.tour-skip { background: none; border: none; color: var(--text-muted); font-size: 13.5px; cursor: pointer; padding: 8px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-sunk); transition: background .2s, width .2s; }
.tour-dot.active { background: var(--accent); width: 20px; border-radius: 4px; }
.tour-dot.turma.active { background: var(--friends-accent); }
.tour-icon-circle {
  width: 96px; height: 96px; border-radius: 50%; margin: 6px auto 0;
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  background: var(--accent-soft);
}
.tour-icon-circle.turma { background: var(--friends-accent-soft); }
.tour-title { font-family: "Baloo 2", sans-serif; font-size: 24px; margin: 4px 0 2px; }
.tour-sub { color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }
.tour-feature-strip { display: flex; justify-content: center; gap: 18px; margin-top: 6px; }
.tour-feature-strip div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }
.tour-feature-strip span.emoji { font-size: 22px; background: var(--accent-soft); width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.role-pick { display: flex; gap: 12px; }
.role-btn {
  flex: 1;
  padding: 20px 10px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.role-btn .role-emoji { font-size: 30px; }
.role-btn.selected { border-color: var(--accent); background: var(--accent-soft); }
.role-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.error-text { color: var(--danger-text); font-size: 13px; font-weight: 700; }
.hint-text { color: var(--text-faint); font-size: 12.5px; }

/* ---------- modal ---------- */

#modal-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}
#modal-root.open { display: flex; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 15, 25, 0.45);
}
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 22px 22px calc(26px + env(safe-area-inset-bottom));
  animation: sheet-up 0.22s ease;
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.milestone-icon {
  font-size: 56px;
  text-align: center;
  margin: 4px 0 10px;
  animation: milestone-pulse 1.1s ease-in-out infinite;
}
@keyframes milestone-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.15) rotate(-6deg); }
  50% { transform: scale(1) rotate(0deg); }
  75% { transform: scale(1.15) rotate(6deg); }
}
.milestone-days {
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent-strong);
  animation: milestone-pop 0.4s ease;
}
@keyframes milestone-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- modo festa (dia marcado como aniversário em couple_settings.features.birthdays) ----------
   troca só a cor de destaque (accent/warm) por uma paleta mais vibrante e liga um confete de
   fundo — nenhum matiz novo fora dessa paleta, nada mais no app muda nesse dia */
html.party-mode {
  --accent: #ff3d82;
  --accent-strong: #b8104f;
  --accent-soft: #ffd6e8;
  --accent-btn: #d81457;
  --on-accent-btn: #ffffff;
  --warm: #ffb703;
  --warm-soft: #fff0c2;
}
@media (prefers-color-scheme: dark) {
  html.party-mode:not([data-theme="light"]) {
    --accent: #ff8fc0;
    --accent-strong: #ffb8d9;
    --accent-soft: #4a1030;
    --accent-btn: #ff8fc0;
    --on-accent-btn: #2b1226;
    --warm: #ffd166;
    --warm-soft: #3f2c08;
  }
}
html.party-mode[data-theme="dark"] {
  --accent: #ff8fc0;
  --accent-strong: #ffb8d9;
  --accent-soft: #4a1030;
  --accent-btn: #ff8fc0;
  --on-accent-btn: #2b1226;
  --warm: #ffd166;
  --warm-soft: #3f2c08;
}

#screen-app { position: relative; }
.party-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.party-confetti span {
  position: absolute;
  top: -24px;
  width: 8px;
  height: 14px;
  opacity: .85;
  animation: party-confetti-fall linear infinite;
}
.party-confetti span:nth-child(3n) { border-radius: 50%; }
.party-confetti span:nth-child(5n) { width: 6px; height: 6px; }
@keyframes party-confetti-fall {
  to { transform: translateY(120vh) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .party-confetti span { animation: none; opacity: .35; top: 40%; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface-alt);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-muted);
}
.modal-title { font-size: 19px; margin-bottom: 16px; padding-right: 30px; }

.empty-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-faint);
  font-size: 13.5px;
}
.empty-state .emoji { font-size: 34px; display: block; margin-bottom: 8px; }
.empty-state .empty-icon { display: block; margin: 0 auto 8px; }

.center-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}

.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; }
.row > *:not(.avatar):not(.theme-toggle):not(.icon-badge) { flex: 1; min-width: 0; }

/* ---------- atalhos (hub da aba Recadinhos) ---------- */

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.shortcut-card {
  position: relative;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-md);
  padding: 18px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-align: center;
}
.shortcut-card:active { transform: scale(0.97); }

/* lista compacta (ícone + nome + descrição opcional + seta), usada em Configurações e
   Recadinhos no lugar do grid de cartões — cabe mais atalho por tela, lê mais rápido */
.settings-list {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 16px;
}
.settings-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:active { background: var(--surface-alt); }
.settings-row-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.settings-row-body { flex: 1; min-width: 0; }
.settings-row-title { font-weight: 800; font-size: 14.5px; color: var(--text); }
.settings-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.settings-row-chevron { flex: none; color: var(--text-faint); }
.settings-row-dot { position: absolute; top: 10px; right: 34px; }

/* selo circular reutilizável pra um ícone ao lado de um título (ex.: carteira, seções) */
.icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.icon-badge.done { background: var(--success-soft); color: var(--success-text); }

/* checklist do dia (Home) */
.checklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--surface-alt);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}
.checklist-row .icon-badge { width: 32px; height: 32px; }
.checklist-label { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--text); }
.checklist-status { color: var(--success-text); display: flex; }

.shortcut-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.shortcut-title { font-weight: 800; font-size: 13.5px; color: var(--text); font-family: "Baloo 2", sans-serif; }
.shortcut-sub { font-size: 11px; color: var(--text-muted); }

/* guia de instalação */
.install-steps { margin: 6px 0 10px; padding-left: 22px; font-size: 14px; line-height: 1.55; }
.install-steps li { margin-bottom: 8px; }
.install-more { margin-top: 8px; font-size: 14px; }
.install-more summary { cursor: pointer; font-weight: 700; color: var(--accent-strong); padding: 6px 0; }

/* reações */
.react-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.react-btn {
  min-width: 44px; height: 44px; padding: 0 10px; font-size: 22px; line-height: 1; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.react-btn:active { transform: scale(.92); }
.react-btn.selected { background: var(--accent-soft); border-color: var(--accent-btn); transform: scale(1.06); }
.react-card { padding-top: 14px; padding-bottom: 14px; }
.react-got { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent-strong); display: flex; align-items: center; gap: 8px; }
.react-got-emoji { font-size: 22px; line-height: 1; }

/* Lembrei de você */
.memory-photo-wrap { border-radius: var(--radius-md); overflow: hidden; background: var(--surface-sunk); aspect-ratio: 4/3; }
.memory-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Capivarinhas (jogo) */
.sbg-board { display: grid; gap: 3px; width: 100%; max-width: 380px; }
.sbg-cell {
  aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(14px, 4vw, 22px); cursor: pointer; user-select: none;
}
.sbg-x { color: rgba(0,0,0,.4); font-weight: 800; }
.sbg-cat-icon { width: 72%; height: 72%; object-fit: contain; pointer-events: none; }

.sbg-celebrate { animation: sbg-pop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes sbg-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sbg-coin-float { display: inline-block; animation: sbg-float 1.1s ease-in-out infinite; }
@keyframes sbg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.sbg-rule-pill {
  flex: 1; background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  padding: 10px 6px; font-size: 12.5px; font-weight: 800; text-align: center; color: var(--text); line-height: 1.3;
}

/* salas multiplayer (Cartas + Stop) — visual aprovado no mockup, seção 5 */
.rm-hub { display: flex; flex-direction: column; gap: 12px; }
.rm-gamecard {
  display: flex; align-items: center; gap: 14px; border-radius: 18px; padding: 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--friends-accent-soft), var(--surface) 85%);
  border: 1px solid var(--border); box-shadow: 0 6px 18px -8px rgba(30, 50, 120, .28); position: relative; overflow: hidden;
}
.rm-gamecard::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 90px at 92% -10%, rgba(255,255,255,.5), transparent 70%); pointer-events: none; }
.rm-gamecard .ic, .rm-ic { flex: none; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px -3px rgba(20, 30, 80, .35); }
.rm-gamecard.cards .ic, .rm-ic.cards { background: linear-gradient(160deg, #6f8bff, #3d56c9); }
.rm-gamecard.stop .ic, .rm-ic.stop { background: linear-gradient(160deg, #ffb15c, #e0791f); }
.rm-gamecard .ic svg, .rm-ic svg { width: 30px; height: 30px; }
.rm-gamecard .t { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 16.5px; color: var(--friends-accent-strong); }
.rm-gamecard .s { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.rm-code-box { text-align: center; padding: 20px 14px; }
.rm-code-chip { display: inline-block; background: linear-gradient(135deg, var(--friends-accent-soft), var(--surface)); border: 1.5px dashed var(--friends-accent); border-radius: 16px; padding: 14px 28px; box-shadow: 0 6px 16px -9px rgba(30, 50, 120, .3); }
.rm-code { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 34px; letter-spacing: .14em; color: var(--friends-accent-strong); }

/* CapMart (jogo) */
.cm-clearing { animation: cm-clear .32s ease forwards; }
@keyframes cm-clear { 0% { transform: scale(1); opacity: 1; } 35% { transform: scale(1.22); opacity: 1; } 100% { transform: scale(.35); opacity: 0; } }
.cm-row-cleared { position: relative; border-radius: 10px; animation: cm-row-flash .45s ease; }
@keyframes cm-row-flash {
  0% { box-shadow: 0 0 0 0 rgba(255, 196, 0, 0); background: transparent; }
  35% { box-shadow: 0 0 0 3px rgba(255, 196, 0, .85); background: rgba(255, 210, 60, .22); }
  100% { box-shadow: 0 0 0 0 rgba(255, 196, 0, 0); background: transparent; }
}
.cm-combo-badge { display: inline-block; animation: cm-combo-pop .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes cm-combo-pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.rm-code-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.rm-code-actions button { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; background: var(--surface); color: var(--friends-accent-strong); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; box-shadow: 0 2px 6px -3px rgba(20, 30, 80, .25); cursor: pointer; }

.rm-players { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rm-player { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 9px 12px; box-shadow: 0 3px 10px -6px rgba(20, 30, 80, .22); }
.rm-player.me { border-color: var(--friends-accent); }
.rm-player .av {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex: none; position: relative; color: #fff;
  background: linear-gradient(150deg, var(--av1, #8fa4ff), var(--av2, #3d56c9));
  box-shadow: 0 2px 6px -2px rgba(20, 30, 80, .4);
}
.rm-player .dot { position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--surface); }
.rm-player .dot.on { background: #2ecc71; }
.rm-player .dot.away { background: #f1c40f; }
.rm-player .name { font-weight: 800; font-size: 13.5px; flex: 1; }
.rm-player .crown { font-size: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.rm-player .status { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.rm-player .status.ready { color: #1f8a6c; background: #dcf1e8; }
.rm-player .status.wait { color: var(--text-muted); background: var(--bg); }

.rm-progress { padding: 12px 0 0; font-size: 12px; color: var(--text-muted); text-align: center; font-weight: 700; }
.rm-start-btn { margin: 12px 0 4px; background: linear-gradient(135deg, var(--friends-accent), var(--friends-accent-strong)); color: var(--on-friends-accent); border-radius: 14px; padding: 14px; text-align: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px -6px rgba(30, 50, 120, .45); cursor: pointer; }
.rm-start-btn.disabled { opacity: .35; box-shadow: none; cursor: default; pointer-events: none; }
.rm-leave { text-align: center; margin: 8px 0 0; font-size: 12px; color: var(--text-muted); }

/* mesma tela de salas, mas dentro do Casal (#screen-app) usa a cor do casal, não a da turma */
#screen-app .rm-gamecard { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 85%); }
#screen-app .rm-gamecard .t { color: var(--accent-strong); }
#screen-app .rm-code-chip { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-color: var(--accent); }
#screen-app .rm-code { color: var(--accent-strong); }
#screen-app .rm-code-actions button { color: var(--accent-strong); }
#screen-app .rm-player.me { border-color: var(--accent); }
#screen-app .rm-start-btn { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--on-accent-btn); }

.rm-join-box { padding: 18px 0; }
.rm-join-input { width: 100%; box-sizing: border-box; text-align: center; font-family: 'Baloo 2', sans-serif; font-size: 22px; letter-spacing: .16em; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); box-shadow: inset 0 2px 6px -3px rgba(20, 30, 80, .2); text-transform: uppercase; }

/* ---------- jogo de Cartas (Fase 2: mesa de jogo) ----------
   Paleta fixa escura (não usa --accent/--friends-accent em lugar nenhum) — mesma mesa pro
   casal e pra turma, só o resto do app em volta muda de cor. */
.cg-table { background: linear-gradient(180deg, #232c5e, #171d40); border-radius: 20px; min-height: 460px; display: flex; flex-direction: column; color: #fff; position: relative; overflow: hidden; }
.cg-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; font-size: 12px; font-weight: 700; opacity: .7; letter-spacing: .03em; }
.cg-opp-row { display: flex; justify-content: space-around; align-items: flex-start; padding: 10px 14px 0; flex-wrap: wrap; gap: 10px; }
.cg-opp { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: .6; }
.cg-opp.turn { opacity: 1; }
.cg-opp .av { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(150deg, var(--av1, #8fa4ff), var(--av2, #3d56c9)); }
.cg-opp.turn .av { box-shadow: 0 0 0 2.5px #ffd15c; }
.cg-opp .nm { font-size: 10.5px; font-weight: 700; text-align: center; }
.cg-opp .stack { display: flex; }
.cg-opp .stack .mini { width: 13px; height: 19px; border-radius: 3px; background: linear-gradient(165deg, #7c93ff, #3d56c9); margin-left: -7px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.cg-opp .stack .mini:first-child { margin-left: 0; }
.cg-opp .stack.warn .mini { background: linear-gradient(165deg, #ff8a80, #e0433d); }

.cg-mat-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 14px 0; }
.cg-mat { width: 172px; height: 172px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .07), transparent 60%), #1e2652; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; gap: 14px; position: relative; }
.cg-mat .dir-arc { position: absolute; inset: -8px; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .18); }
.cg-pile { width: 44px; height: 64px; border-radius: 9px; background: linear-gradient(165deg, #7c93ff, #3d56c9 55%, #232f8f); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }

.card-face { width: 58px; height: 84px; border-radius: 14px; position: relative; flex: none; background: linear-gradient(165deg, color-mix(in srgb, var(--cc) 88%, #fff), var(--cc) 55%, color-mix(in srgb, var(--cc) 82%, #000) 100%); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--cc) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-face::after { content: ""; position: absolute; top: -30%; left: -20%; width: 70%; height: 60%; background: rgba(255, 255, 255, .16); border-radius: 50%; filter: blur(1px); transform: rotate(-25deg); }
.card-face .oval { position: absolute; width: 76%; height: 58%; background: rgba(255, 255, 255, .96); border-radius: 50%; box-shadow: 0 3px 10px rgba(0, 0, 0, .16); }
.card-face .num { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 25px; letter-spacing: -.01em; color: var(--cc); z-index: 1; }
.card-face .corner { position: absolute; top: 6px; left: 7px; font-family: 'Nunito', sans-serif; font-size: 10.5px; font-weight: 800; color: rgba(255, 255, 255, .92); z-index: 2; }
.card-face .corner.br { top: auto; left: auto; bottom: 6px; right: 7px; }
.card-face .icon { z-index: 1; width: 24px; height: 24px; color: var(--cc); display: flex; }
.card-face .icon svg { width: 100%; height: 100%; }
.card-face.wild { background: conic-gradient(from 200deg, #e0433d 0 90deg, #f4c430 90deg 180deg, #3d9e4f 180deg 270deg, #3d66c9 270deg 360deg); }
.card-face.wild .oval { opacity: .96; }
.card-face.wild .num { font-size: 20px; }

.card-back { width: 58px; height: 84px; border-radius: 14px; flex: none; background: linear-gradient(165deg, #7c93ff, #3d56c9 55%, #232f8f 100%); box-shadow: 0 8px 18px -8px rgba(40, 55, 150, .7), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card-back::after { content: ""; position: absolute; top: -30%; left: -20%; width: 70%; height: 60%; background: rgba(255, 255, 255, .15); border-radius: 50%; filter: blur(1px); transform: rotate(-25deg); }
.card-back .mark { width: 24px; height: 24px; z-index: 1; opacity: .92; }

.cg-mat .card-face { width: 44px; height: 64px; border-radius: 9px; box-shadow: 0 0 0 2.5px var(--cc), 0 6px 14px -6px rgba(0, 0, 0, .6); }
.cg-mat .card-face .num { font-size: 20px; }
.cg-mat .card-face .corner { font-size: 8.5px; }
.cg-mat .card-face.wild .num { font-size: 16px; }

.cg-last-move { text-align: center; font-size: 11px; opacity: .6; margin: -6px 0 0; }

.cg-you { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 16px; }
.cg-turn-pill { font-size: 11px; font-weight: 800; color: #1c2458; background: #ffd15c; padding: 4px 12px; border-radius: 999px; }
.cg-hand { display: flex; justify-content: center; flex-wrap: wrap; padding: 6px 10px 0; }
.cg-hand .card-face, .cg-hand .card-back { width: 42px; height: 61px; border-radius: 10px; margin-left: -10px; transition: transform .15s; }
.cg-hand .card-face:first-child, .cg-hand .card-back:first-child { margin-left: 0; }
.cg-hand .card-face .num { font-size: 18px; }
.cg-hand .card-face .corner { font-size: 8.5px; top: 4px; left: 5px; }
.cg-hand .card-face .icon { width: 17px; height: 17px; }
.cg-hand .card-face.playable { cursor: pointer; transform: translateY(-8px); box-shadow: 0 10px 16px -6px rgba(0, 0, 0, .6); }
.cg-hand .card-face.dim { filter: brightness(.5) saturate(.5); }

/* ---------- Stop/Adedonha (Fase 3) ----------
   Base usa tokens --friends-accent (turma é o padrão do mockup); override abaixo troca pra
   --accent quando a sala é do Casal, mesmo esquema do .rm-*. */
.sg-hexwrap { display: flex; justify-content: center; padding: 18px 0 8px; }
.sg-hex { width: 88px; height: 96px; background: linear-gradient(160deg, var(--friends-accent), var(--friends-accent-strong)); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -8px rgba(30, 50, 120, .5); margin: 0 auto; }
.sg-hex .letter { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 40px; color: #fff; }
.sg-catlist { padding: 6px 0; display: flex; flex-direction: column; gap: 8px; }
.sg-cat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; }
.sg-cat .lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--friends-accent-strong); margin-bottom: 2px; }
.sg-progress-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 0; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.sg-stopbtn { margin: 12px 0 4px; background: linear-gradient(135deg, #ff8a5c, #e0433d); color: #fff; border-radius: 16px; padding: 16px; text-align: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: .04em; box-shadow: 0 8px 20px -8px rgba(224, 67, 61, .6); cursor: pointer; }

.sg-result-cat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; }
.sg-result-cat .lbl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: var(--friends-accent-strong); margin-bottom: 8px; }
.sg-answer-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--border); }
.sg-answer-row:first-of-type { border-top: none; }
.sg-answer-row .who { width: 56px; font-size: 11.5px; font-weight: 800; color: var(--muted); flex: none; }
.sg-answer-row .ans { flex: 1; font-weight: 800; font-size: 13.5px; }
.sg-answer-row .pts { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 13px; }
.sg-answer-row .pts.ok { color: #1f8a6c; }
.sg-answer-row .pts.rep { color: #c98a1f; }
.sg-answer-row .react { font-size: 13px; cursor: default; }
.sg-answer-row .react[data-flag-user] { cursor: pointer; opacity: .75; }
.sg-answer-row .react[data-flag-user]:hover { opacity: 1; }

.sg-contest-banner { background: #fff3f0; border: 1px dashed #e0433d; border-radius: 10px; padding: 8px 10px; margin: 2px 0 6px; display: flex; flex-direction: column; gap: 6px; }
.sg-contest-txt { font-size: 12px; font-weight: 800; color: #c0392b; }

#screen-app .sg-hex { background: linear-gradient(160deg, var(--accent), var(--accent-strong)); }
#screen-app .sg-cat .lbl { color: var(--accent-strong); }
#screen-app .sg-result-cat .lbl { color: var(--accent-strong); }

/* ---------- tela larga (computador) ----------
   O app é mobile-first (pensado pra celular, coluna de 480px). Em tela larga, só alarga
   essa coluna pra ficar mais confortável — layout, cards e menu continuam exatamente os
   mesmos, só com mais espaço em vez de ficar espremido no meio de uma tela grande. */
@media (min-width: 768px) {
  #app-shell, .bottom-nav, .modal-sheet { max-width: 640px; }
}
