/* ============================================================
   Entre Nós — Folha de estilos
   Tema: noturno, sensual, elegante. Glassmorphism + gradientes.
   ============================================================ */

/* ---------- Tokens / Sistema de cores ---------- */
:root {
  /* Paleta principal: ameixa profunda, rosa neon e violeta */
  --wine-900: #160713;
  --wine-800: #240b25;
  --wine-700: #3a0d3c;
  --wine-600: #5b145d;
  --red-500: #be1f72;
  --red-400: #f13b91;
  --red-300: #ff80bd;
  --plum-500: #7519a6;
  --plum-400: #a82dd0;
  --plum-300: #d88cff;

  /* Neutros */
  --ink-900: #0d0310;
  --ink-800: #17071b;
  --ink-700: #250b2b;
  --white: #fff7ff;
  --muted: rgba(255, 247, 255, 0.7);
  --muted-2: rgba(255, 247, 255, 0.42);

  /* Vidro */
  --glass-bg: rgba(255, 220, 255, 0.07);
  --glass-brd: rgba(224, 117, 255, 0.24);
  --glass-brd-hi: rgba(239, 143, 255, 0.48);

  /* Estados */
  --success: #4caf50;
  --warning: #ffb300;
  --error: #ef5350;

  /* Tipografia */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;

  /* Espaçamento (base 8px) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* Raio */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Sombras */
  --sh-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
  --sh-glow: 0 0 40px rgba(211, 45, 213, 0.3);
  --sh-card: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 1px var(--glass-brd);

  /* Transições */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.18s;
  --t-mid: 0.35s;
  --t-slow: 0.6s;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--ink-900);
  min-height: 100dvh;
  height: 100%;
  overflow-x: hidden;
  /* hide outer page scrollbar; each .screen will scroll internally */
  overflow-y: hidden;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button { background: none; border: none; cursor: pointer; touch-action: manipulation; }

::selection { background: var(--red-400); color: #fff; }

/* ---------- Fundo animado ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 15% 0%, var(--wine-700) 0%, transparent 55%),
    radial-gradient(120% 90% at 85% 100%, var(--plum-500) 0%, transparent 55%),
    radial-gradient(100% 100% at 50% 50%, var(--wine-800) 0%, var(--ink-900) 70%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: bgShift 18s var(--ease-soft) infinite alternate;
}

@keyframes bgShift {
  0%   { background-position: 0% 0%, 100% 100%, 0 0; }
  100% { background-position: 30% 20%, 70% 80%, 0 0; }
}

.bg-orbs { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: orbFloat 16s var(--ease-soft) infinite alternate;
}
.orb-1 { width: 340px; height: 340px; background: var(--red-400); top: -8%; left: -10%; }
.orb-2 { width: 300px; height: 300px; background: var(--plum-400); bottom: -10%; right: -8%; animation-delay: -6s; }
.orb-3 { width: 220px; height: 220px; background: var(--red-500); top: 40%; left: 60%; animation-delay: -10s; opacity: 0.35; }

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.15); }
}

#particles {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
}

/* ---------- Layout / Screens ---------- */
#app {
  position: relative;
  min-height: 100dvh;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--sp-5) var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), visibility 0s var(--t-mid);
  overflow-y: auto;
}
.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), visibility 0s;
}

/* ---------- Tipografia utilitária ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.section-subtitle {
  color: var(--red-300);
  font-size: 1rem;
  margin-top: var(--sp-1);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border-radius: var(--r-pill);
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.96); }

.btn--lg { padding: 16px 28px; font-size: 1.05rem; }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--red-400), var(--plum-400));
  color: #fff;
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.35);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(233, 30, 99, 0.5); transform: translateY(-1px); }

.btn--ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  color: var(--white);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--glass-brd-hi); background: rgba(255, 245, 248, 0.1); }

.btn--soft {
  background: rgba(255, 245, 248, 0.08);
  border: 1px solid var(--glass-brd);
  color: var(--white);
  padding: 14px 22px;
  font-size: 0.95rem;
}
.btn--soft:hover { background: rgba(255, 245, 248, 0.14); }

.btn--icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  font-size: 1.1rem;
}
.btn--icon:hover { background: rgba(255, 245, 248, 0.12); }

.btn--back {
  align-self: flex-start;
  padding: 8px 14px;
  font-size: 0.9rem;
  background: transparent;
  border: 1px solid var(--glass-brd);
  color: var(--muted);
  border-radius: var(--r-pill);
}
.btn--back:hover { color: var(--white); border-color: var(--glass-brd-hi); }

/* ============================================================
   TELA INICIAL
   ============================================================ */
.screen--home { justify-content: center; text-align: center; }
.home-inner { max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); }

.home-eyebrow {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.72rem;
  color: var(--red-300);
  font-weight: 500;
  animation: fadeUp 0.8s var(--ease) both;
}
.home-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 16vw, 6.5rem);
  line-height: 1;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff, var(--red-300) 60%, var(--plum-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUp 0.9s var(--ease) 0.05s both;
  text-shadow: 0 0 60px rgba(233, 30, 99, 0.2);
}
.home-subtitle {
  font-size: 1.1rem;
  color: var(--red-300);
  max-width: 420px;
  animation: fadeUp 0.9s var(--ease) 0.12s both;
}
.home-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  margin-top: var(--sp-4);
  animation: fadeUp 0.9s var(--ease) 0.2s both;
}
.home-notice {
  margin-top: var(--sp-6);
  font-size: 0.78rem;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.9s var(--ease) 0.28s both;
}
.notice-dot {
  background: var(--red-400);
  color: #fff;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CONFIGURAÇÃO
   ============================================================ */
.screen--game .game-inner { margin: auto 0; }

/* ============================================================
   JOGO
   ============================================================ */
.screen--game { justify-content: flex-start; }
.game-inner {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: 32px;
  background: linear-gradient(155deg, rgba(53, 12, 56, 0.72), rgba(17, 4, 23, 0.92));
  border: 1px solid rgba(218, 75, 225, 0.58);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 35px rgba(173, 29, 178, 0.18) inset;
}

/* HUD */
.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.hud-center {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.85rem;
  color: var(--muted);
}
.hud-center { white-space: nowrap; }
.hud-center b { color: var(--white); font-weight: 600; }

.turn-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  align-self: center;
  font-size: 0.9rem;
}

.turn-label {
  color: var(--muted);
}

.turn-name {
  font-weight: 600;
}

.turn-name.p1 {
  color: var(--red-300);
}

.turn-name.p2 {
  color: var(--plum-300);
}


/* ---------- Ícone do jogador no turno ---------- */

.turn-avatar {
  width: 24px;
  height: 24px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  transition:
    color var(--t-fast) var(--ease),
    filter var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.turn-avatar svg {
  width: 22px;
  height: 22px;
  display: block;
}

.turn-avatar.p1 {
  color: var(--red-300);

  filter:
    drop-shadow(0 0 6px rgba(255, 107, 157, 0.35));
}

.turn-avatar.p2 {
  color: var(--plum-300);

  filter:
    drop-shadow(0 0 6px rgba(192, 132, 252, 0.35));
}

/* Card stage */
.card-stage {
  perspective: 1200px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 420px;
  padding: 36px 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,245,248,0.04) 0%, rgba(23,9,16,0.22) 100%);
  border: 1px solid rgba(255,245,248,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  overflow: hidden;
}

@keyframes cardIn {
  0%   { opacity: 0; transform: rotateY(90deg) translateY(10px) scale(0.95); }
  100% { opacity: 1; transform: rotateY(0) translateY(0) scale(1); }
}
.card.is-flip-out { animation: cardOut 0.28s var(--ease-soft) forwards; }
.card.is-flip-in  { animation: cardIn 0.35s var(--ease) both; }

@keyframes cardOut {
  0%   { opacity: 1; transform: rotateY(0) scale(1); }
  100% { opacity: 0; transform: rotateY(-90deg) scale(0.95); }
}

.card-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}
.card-cat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(233,30,99,0.06), rgba(156,39,176,0.04));
  border: 1px solid rgba(233,30,99,0.16);
  box-shadow: 0 6px 24px rgba(233,30,99,0.04), 0 0 10px rgba(233,30,99,0.04) inset;
  font-size: 0.85rem;
  text-transform: none;
}
.card-cat .card-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--red-300);
  filter: drop-shadow(0 4px 10px rgba(255,107,157,0.18));
}

.card-cat .card-category-icon svg,
.card-int .int-icon svg,
.chip .chip-icon svg {
  width: 18px; height: 18px; display: block; stroke-width: 1.8px;
}

.card-position-image {
  width: 160px; height: 160px; object-fit: cover; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(194,24,91,0.18), 0 0 28px rgba(233,30,99,0.08);
  border: 1px solid rgba(255,255,255,0.04);
}
.card-position-placeholder {
  width: 160px; height: 160px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 18px; color: var(--muted); background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
}
.card-int {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffdce6;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
  text-transform: none;
}
.card-icon {
  font-size: 6.4rem;
  line-height: 1;
  width: 160px;
  height: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  color: #ffd6e8;
  filter: drop-shadow(0 10px 40px rgba(233,30,99,0.28));
  background: radial-gradient(circle at 30% 20%, rgba(233,30,99,0.08), transparent 35%);
  animation: floatIcon 3s var(--ease-soft) infinite alternate;
}

/* Ensure SVG icons inside the card scale to the container */
.card-icon svg {
  width: 72%;
  height: 72%;
  display: block;
}
@keyframes floatIcon {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
.card-text {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 3.1vw, 1.2rem);
  font-weight: 300;
  line-height: 1.35;
  max-width: 420px;
  color: #fff7fb;
  text-shadow: 0 6px 30px rgba(194,24,91,0.06);
  padding: 0 6px;
  /* O JS mede o overflow e aplica text--small / text--xsmall */
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Classes applied by JS when text is too long */
.screen--game .card-text.text--small  { font-size: 0.95rem; }
.screen--game .card-text.text--xsmall { font-size: 0.85rem; }
.card-bottom {
  margin-top: auto;
  width: 100%;
  font-size: 1rem;
  color: var(--muted-2);
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.card-bottom::before {
  content: "";
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: 1px;
}
.card-bottom b { color: var(--muted); }

/* Neon edge */
.card::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 28px;
  box-shadow: 0 0 48px rgba(233,30,99,0.06) inset, 0 0 28px rgba(156,39,176,0.03);
}

/* Destaque do número atual da carta (ex: 'Carta 1 / 45') */
#cardIndex {
  color: var(--red-400);
  font-weight: 700;
  text-shadow: 0 6px 18px rgba(194,24,91,0.08);
}
#cardTotal {
  color: var(--muted-2);
  font-weight: 500;
}

/* Hover / focus subtle lift — disabled per user request */
.card:hover { transform: none; box-shadow: none; }

/* Action buttons restyle for neon look */
.game-actions .btn--primary {
  background: linear-gradient(135deg, #ff6b9d, #9c27b0);
  box-shadow: 0 14px 40px rgba(233,30,99,0.26);
  color: #fff;
  border-radius: 14px;
}
.game-actions .btn--soft {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--muted-2);
  border-radius: 12px;
}

/* smaller screens: keep layout compact */
@media (max-width: 420px) {
  .card { padding: 22px 18px; min-height: 320px; max-width: 92%; }
  .card-icon { width: 128px; height: 128px; font-size: 5rem; }
  .card-icon svg { width: 78%; height: 78%; }
  .card-text { font-size: 1.2rem; max-width: 92%; }
  .card-top { font-size: 0.72rem; }
}

/* Ações do jogo */
.game-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  align-items: center;
}
.game-actions .btn {
  width: 100%;
}
.game-actions .btn--soft { padding: 14px 8px; font-size: 0.9rem; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (min-width: 600px) {
  .home-actions { flex-direction: row; justify-content: center; }
}

@media (min-width: 768px) {
  .screen { padding: var(--sp-7) var(--sp-6); }
}


/* ---------- Acessibilidade / motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   CARTA DE POSIÇÃO — composição inspirada no exemplo visual
   ============================================================ */
.screen--game {
  padding: 20px 16px 28px;
}
.screen--game .game-inner {
  max-width: 480px;
  width: min(100%, 480px);
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
}
.screen--game .game-hud {
  padding: 0 4px;
}
.screen--game .game-hud .btn--ghost,
.screen--game .turn-bar {
  border-color: rgba(218, 75, 225, 0.48);
  background: rgba(67, 15, 72, 0.5);
}
.screen--game .game-hud .btn--ghost {
  padding: 10px 18px;
  font-size: 0.85rem;
}
.screen--game .hud-center {
  font-size: 0.85rem;
  color: var(--white);
}
.screen--game .hud-center b {
  color: var(--plum-300);
  font-size: 1em;
}
.screen--game .turn-bar {
  padding: 10px 18px;
  font-size: 0.9rem;
}
.screen--game .turn-name.p1,
.screen--game .turn-name.p2 {
  color: var(--plum-300);
}
.screen--game .turn-avatar.p1,
.screen--game .turn-avatar.p2 {
  color: var(--red-300);
  filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.65));
}
.screen--game .card-stage {
  min-height: 0;
  width: 100%;
}
.screen--game .card {
  max-width: none;
  height: 420px;
  padding: 24px 28px 26px;
  gap: 14px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(112, 18, 105, 0.32), transparent 54%),
    linear-gradient(145deg, rgba(75, 12, 71, 0.78), rgba(25, 5, 31, 0.9));
  border: 1px solid rgba(229, 52, 194, 0.68);
  box-shadow: 0 0 28px rgba(210, 41, 196, 0.15) inset, 0 18px 45px rgba(0, 0, 0, 0.25);
}
.screen--game .card::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 59, 145, 0.2), rgba(168, 45, 208, 0.08) 48%, transparent 72%);
  filter: blur(4px);
  pointer-events: none;
}
.screen--game .card-top {
  position: relative;
  z-index: 1;
  align-items: center;
}
.screen--game .card-cat {
  padding: 6px 13px;
  border-color: var(--red-400);
  background: rgba(92, 10, 74, 0.52);
  font-size: 0.85rem;
  box-shadow: 0 0 20px rgba(241, 59, 145, 0.16);
}
.screen--game .card-cat .card-category-icon {
  width: 20px;
  height: 20px;
  color: var(--red-300);
}
.screen--game .card-cat .card-category-icon svg {
  width: 18px;
  height: 18px;
}
.screen--game .card-int {
  padding: 6px 13px;
  border-color: rgba(216, 140, 255, 0.48);
  background: rgba(66, 22, 83, 0.48);
  color: var(--plum-300);
  font-size: 0.82rem;
}
.screen--game .card-icon {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 160px;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 16px 28px rgba(241, 59, 145, 0.25));
  animation: floatIcon 3s var(--ease-soft) infinite alternate;
}
.screen--game .card-position-image {
  width: min(100%, 260px);
  height: 160px;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  mix-blend-mode: screen;
  opacity: 0.78;
  box-shadow: none;
}
.screen--game .card-position-placeholder {
  width: min(100%, 260px);
  height: 160px;
  border: 0;
  border-radius: 50%;
  color: var(--plum-300);
  background: radial-gradient(ellipse, rgba(241, 59, 145, 0.22), rgba(168, 45, 208, 0.14) 45%, transparent 72%);
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-shadow: 0 0 18px rgba(216, 140, 255, 0.65);
}
.screen--game .card-text {
  position: relative;
  z-index: 1;
  max-width: 420px;
  font-size: clamp(0.85rem, 3.2vw, 1.1rem);
  line-height: 1.45;
  color: var(--white);
}
.screen--game .card-bottom {
  display: none;
}
.screen--game .game-actions {
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.screen--game .game-actions .btn {
  min-height: 56px;
  border-radius: 18px;
  font-size: 1.05rem;
}
.screen--game .game-actions .btn--primary {
  background: linear-gradient(100deg, #ff4e91, #a52ad3);
  box-shadow: 0 12px 30px rgba(241, 59, 145, 0.28);
}
.screen--game .game-actions .btn--soft {
  background: rgba(68, 21, 78, 0.5);
  border-color: rgba(168, 45, 208, 0.28);
  color: var(--muted);
}

@media (max-width: 420px) {
  .screen--game .game-inner {
    padding: 16px;
    border-radius: 22px;
  }
  .screen--game .card {
    height: 380px;
    padding: 18px 16px 20px;
    gap: 10px;
  }
  .screen--game .card-icon,
  .screen--game .card-position-image,
  .screen--game .card-position-placeholder {
    height: 130px;
  }
  .screen--game .card-text {
    font-size: 0.9rem;
  }
  .screen--game .game-actions .btn {
    min-height: 50px;
    border-radius: 16px;
    font-size: 0.95rem;
  }
}

@media (max-width: 340px) {
  .screen--game .card {
    height: 360px;
    padding-inline: 12px;
  }
}

/* ---------- Foco visível (teclado) ---------- */
:focus-visible {
  outline: 2px solid var(--red-300);
  outline-offset: 3px;
}

/* ============================================================
   FORMATOS DE CARTA, MODO DE JOGO E NOITE DE ENCONTRO
   ============================================================ */
[hidden] { display: none !important; }

/* ---------- Noite de Encontro: etapa e progresso ---------- */
.stage-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--plum-300);
  margin-top: -6px;
}
.stage-bar {
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(216, 140, 255, 0.2);
  overflow: hidden;
}
.stage-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red-400), var(--plum-400));
  transition: width 0.5s var(--ease);
}

/* ---------- Carta: nova composição ---------- */
.screen--game .card { height: 470px; gap: 10px; }
.screen--game .card--compact .card-icon { height: 76px; }
.screen--game .card--compact .card-icon svg { width: 62px; height: 62px; }
.screen--game .card--compact::before { top: 70px; }

.card-format {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 3px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(216, 140, 255, 0.5);
  color: var(--plum-300);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.screen--game .card-text {
  min-height: 0;
  flex: 1 1 auto;
}
.card-hint {
  position: relative;
  z-index: 1;
  max-width: 400px;
  align-self: center;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
}
.card-extra {
  position: relative;
  z-index: 1;
  width: 100%;
  flex-shrink: 0;
}

/* ---------- Botão de cronômetro / contagem ---------- */
.xbtn {
  width: 100%;
  min-height: 52px;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 16px;
  border: 1px solid rgba(216, 140, 255, 0.5);
  background: rgba(103, 24, 120, 0.4);
  color: var(--white);
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.xbtn:active { transform: scale(0.98); }
.xbtn-main {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.xbtn-sub { font-size: 0.72rem; color: var(--muted); min-height: 0.9em; }
.xbtn.is-running {
  background: linear-gradient(100deg, rgba(255, 78, 145, 0.35), rgba(165, 42, 211, 0.35));
  box-shadow: 0 0 22px rgba(241, 59, 145, 0.35);
}
.xbtn.is-done {
  background: linear-gradient(100deg, #ff4e91, #a52ad3);
  border-color: transparent;
}

/* ---------- Escolhas A / B ---------- */
.xopts { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.xopt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(216, 140, 255, 0.4);
  background: rgba(103, 24, 120, 0.3);
  color: var(--white);
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.25;
  transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.xopt:active { transform: scale(0.99); }
.xopt-letter {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(216, 140, 255, 0.6);
  color: var(--plum-300);
  font-size: 0.78rem;
  font-weight: 600;
}
.xopt.is-picked {
  background: linear-gradient(100deg, rgba(255, 78, 145, 0.35), rgba(165, 42, 211, 0.35));
  border-color: var(--red-400);
}
.xopt.is-picked .xopt-letter { background: var(--red-400); border-color: var(--red-400); color: #fff; }
.xopt.is-dim { opacity: 0.45; }

/* ---------- Botão desativado ---------- */
.game-actions .btn:disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Telas menores ---------- */
@media (max-width: 420px) {
  .screen--game .card { height: 450px; padding: 18px 14px 18px; gap: 8px; }
  .screen--game .card--compact .card-icon { height: 62px; }
  .screen--game .card--compact .card-icon svg { width: 52px; height: 52px; }
  .card-hint { font-size: 0.78rem; }
  .xopt { font-size: 0.84rem; min-height: 42px; }
}
@media (max-width: 340px) {
  .screen--game .card { height: 430px; }
}

/* Texto da carta mais legível (peso 400 em vez de 300) */
.screen--game .card-text {
  font-weight: 400;
  font-size: clamp(0.95rem, 3.7vw, 1.15rem);
}
.screen--game .card-text.text--small  { font-size: 0.92rem; }
.screen--game .card-text.text--xsmall { font-size: 0.84rem; }


/* ---------- Verdade ou Desafio ---------- */
.xvd { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.xvd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xvd-btn {
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(216, 140, 255, 0.45);
  background: rgba(103, 24, 120, 0.3);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.xvd-btn:active { transform: scale(0.98); }
.xvd-btn.is-picked {
  background: linear-gradient(100deg, rgba(255, 78, 145, 0.4), rgba(165, 42, 211, 0.4));
  border-color: var(--red-400);
}
.xvd-btn.is-dim { opacity: 0.55; }
.xvd-slot:empty { display: none; }


/* ============================================================
   CONFIGURAÇÃO — nova tela (responsiva)
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen--setup { justify-content: flex-start; align-items: stretch; }

.st { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.st-back { align-self: flex-start; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.st-hero { display: flex; flex-direction: column; gap: 20px; }
.st-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
.st-sub { margin: 10px 0 0; font-size: 0.95rem; line-height: 1.45; color: var(--muted); max-width: 420px; }

/* Leque de cartas (reage às categorias) */
.st-fan { position: relative; width: 100%; max-width: 300px; aspect-ratio: 300 / 200; margin: 0 auto; flex-shrink: 0; }
.fan-card {
  position: absolute;
  top: 14%;
  width: 32%;
  aspect-ratio: 7 / 10;
  border-radius: 18px;
  border: 1px solid rgba(229, 52, 194, 0.55);
  background: linear-gradient(145deg, rgba(75, 12, 71, 0.95), rgba(25, 5, 31, 0.97));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ff80bd;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.fan-card svg { width: 28px; height: 28px; }
.fan-card span { font-size: 0.75rem; color: rgba(255, 247, 255, 0.8); text-align: center; padding: 0 4px; line-height: 1.15; }
.fan-card--l { left: 6%; transform: rotate(-12deg); opacity: 0.85; }
.fan-card--r { right: 6%; transform: rotate(12deg); opacity: 0.85; }
.fan-card--c {
  left: 30%;
  top: 0;
  width: 40%;
  z-index: 2;
  border-color: #f13b91;
  background: linear-gradient(145deg, rgba(75, 12, 71, 0.97), rgba(25, 5, 31, 0.98));
  box-shadow: 0 0 34px rgba(241, 59, 145, 0.4), 0 16px 34px rgba(0, 0, 0, 0.5);
  gap: 10px;
}
.fan-card--c svg { width: 38px; height: 38px; }
.fan-card--c span { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; font-weight: 600; color: #fff7ff; }
.fan-card--l { align-items: flex-start; padding-left: 12%; }
.fan-card--r { align-items: flex-end; padding-right: 12%; }
.fan-card--l span { text-align: left; padding: 0; }
.fan-card--r span { text-align: right; padding: 0; }
.fan-card.is-pop { animation: fanPop 0.45s var(--ease); }
@keyframes fanPop { from { transform: scale(0.88); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }

/* Painel de opções */
.st-panel { display: flex; flex-direction: column; gap: 28px; }
.st-block { display: flex; flex-direction: column; gap: 12px; }
.st-label { font-size: 0.82rem; font-weight: 500; color: rgba(255, 247, 255, 0.72); letter-spacing: 0.02em; }
.st-opt { font-weight: 400; color: rgba(255, 247, 255, 0.55); }
.st-row { display: flex; justify-content: space-between; align-items: baseline; }
.st-level { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.6rem; font-weight: 600; color: var(--red-300); }

.st-mode,
.st-tile {
  position: relative;
  display: flex;
  border-radius: 16px;
  border: 1px solid rgba(224, 117, 255, 0.26);
  background: rgba(255, 220, 255, 0.06);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.st-mode:hover, .st-tile:hover { border-color: var(--glass-brd-hi); }
.st-mode:active, .st-tile:active { transform: scale(0.985); }
.st-mode.is-selected,
.st-tile.is-selected {
  border-color: #f13b91;
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.22), rgba(156, 39, 176, 0.22));
  box-shadow: 0 0 0 1px rgba(241, 59, 145, 0.3), 0 8px 22px rgba(233, 30, 99, 0.16);
}

.st-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.st-mode { gap: 12px; align-items: flex-start; padding: 16px; min-height: 92px; }
.st-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(239, 143, 255, 0.6); flex-shrink: 0; margin-top: 2px; }
.st-mode.is-selected .st-radio { background: #f13b91; border-color: #f13b91; box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.2); }
.st-mode-name { display: block; font-size: 1rem; font-weight: 500; margin-bottom: 5px; }
.st-mode-desc { font-size: 0.8rem; line-height: 1.35; color: rgba(255, 247, 255, 0.7); }

.st-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.st-tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; min-height: 112px; }
.st-tile-ico { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(241, 59, 145, 0.16); color: #ff80bd; }
.st-tile-ico svg { width: 22px; height: 22px; }
.st-tile-name { font-size: 1rem; font-weight: 500; line-height: 1.15; }
.st-tile-sub { font-size: 0.8rem; line-height: 1.3; color: rgba(255, 247, 255, 0.7); }
.st-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: #f13b91; display: none; align-items: center; justify-content: center; }
.st-tile.is-selected .st-check { display: flex; }

/* Intensidade: trilha */
.st-scale { position: relative; padding: 16px 8px 8px; border-radius: 18px; border: 1px solid rgba(224, 117, 255, 0.22); background: rgba(255, 220, 255, 0.04); }
.st-track { position: absolute; left: 16.67%; right: 16.67%; top: 26px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.st-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #f13b91, #a82dd0); transition: width 0.45s var(--ease); }
.st-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); }
.st-step { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; color: var(--white); font-size: 0.9rem; cursor: pointer; padding: 0; min-height: 44px; }
.st-dotwrap { height: 26px; display: flex; align-items: center; }
.st-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(239, 143, 255, 0.55); background: #240b25; transition: all 0.3s var(--ease); }
.st-step.is-done .st-dot { background: #a82dd0; border-color: #a82dd0; }
.st-step.is-current .st-dot { width: 26px; height: 26px; background: #f13b91; border-color: #fff7ff; box-shadow: 0 0 0 5px rgba(241, 59, 145, 0.25), 0 0 18px rgba(241, 59, 145, 0.6); }
.st-help { margin: 12px 8px 8px; text-align: center; font-size: 0.82rem; line-height: 1.4; color: rgba(255, 247, 255, 0.7); }

/* Jogadores */
.st-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.st-field { position: relative; }
.st-field input {
  height: 50px; width: 100%; box-sizing: border-box;
  border-radius: 14px; border: 1px solid rgba(224, 117, 255, 0.26);
  background: rgba(255, 220, 255, 0.06); color: var(--white);
  font-size: 0.95rem; padding: 0 50px 0 14px;
}
.st-field input::placeholder { color: rgba(255, 247, 255, 0.5); }
.st-field input:focus,
.st-field input:focus-visible { outline: none; border-color: #f13b91; }
.st-field svg { position: absolute; right: 14px; top: 13px; width: 24px; height: 24px; pointer-events: none; }
.st-p1 svg { color: #ff80bd; filter: drop-shadow(0 0 6px rgba(255, 128, 189, 0.7)); }
.st-p2 svg { color: #d88cff; filter: drop-shadow(0 0 6px rgba(216, 140, 255, 0.7)); }

/* Resumo + botão (fixo no rodapé em celular e tablet) */
.st-cta {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}
.st-summary { text-align: center; font-size: 0.85rem; color: rgba(255, 247, 255, 0.7); }

/* Telas muito estreitas */
@media (max-width: 330px) {
  .st-tiles { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet */
@media (min-width: 640px) {
  .st-title { font-size: 3.25rem; }
  .st-hero { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .st-fan { margin: 0; flex: 0 0 300px; }
  .st-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-panel { padding: 28px; border-radius: 28px; border: 1px solid rgba(224, 117, 255, 0.22); background: rgba(255, 220, 255, 0.05); }
}

/* Notebook e PC: duas colunas */
@media (min-width: 1024px) {
  .st { gap: 28px; }
  .st-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "hero panel" "cta panel";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    row-gap: 28px;
  }
  .st-hero { grid-area: hero; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 28px; }
  .st-panel { grid-area: panel; padding: 32px; gap: 32px; }
  .st-cta { grid-area: cta; position: static; padding: 0; background: none; max-width: 420px; align-self: start; }
  .st-title { font-size: 3.6rem; }
  .st-sub { font-size: 1.02rem; }
  .st-fan { max-width: 380px; flex: none; margin: 0; }
  .fan-card--l span, .fan-card--r span { font-size: 0.8rem; }
}
@media (min-width: 1440px) {
  .st { gap: 36px; }
  .st-grid { column-gap: 72px; }
  .st-title { font-size: 4rem; }
  .st-fan { max-width: 400px; }
  .st-panel { padding: 36px; }
}

/* ============================================================
   MODAL — Como jogar
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-mid) var(--ease), visibility 0s var(--t-mid);
}
.modal.is-open { opacity: 1; visibility: visible; transition: opacity var(--t-mid) var(--ease), visibility 0s; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 3, 12, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(224, 117, 255, 0.26);
  background: linear-gradient(160deg, rgba(58, 13, 60, 0.97), rgba(26, 8, 28, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--t-mid) var(--ease);
}
.modal.is-open .modal-card { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 10px 24px; flex-shrink: 0; }
.modal-close { position: static; flex-shrink: 0; }
.modal-title { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; font-weight: 600; line-height: 1.1; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 18px; display: flex; flex-direction: column; gap: 22px; }
.modal-foot { flex-shrink: 0; padding: 14px 24px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(224, 117, 255, 0.15); }
.modal-foot .btn { min-height: 52px; }

.howto-intro { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.howto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.howto-list li { display: flex; gap: 14px; align-items: flex-start; }
.howto-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; color: var(--red-300);
  background: rgba(241, 59, 145, 0.16); border: 1px solid rgba(241, 59, 145, 0.5);
}
.howto-step-title { display: block; font-weight: 600; margin-bottom: 3px; }
.howto-list p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.howto-list p b { color: var(--white); font-weight: 600; }
.howto-sub { margin: 0 0 10px; font-size: 0.82rem; font-weight: 500; color: rgba(255, 247, 255, 0.72); letter-spacing: 0.02em; }
.howto-types { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.howto-types li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(224, 117, 255, 0.2); background: rgba(255, 220, 255, 0.05); }
.howto-type-name { font-size: 0.9rem; font-weight: 600; color: var(--red-300); }
.howto-type-help { font-size: 0.82rem; line-height: 1.4; color: var(--muted); }
.modal-note { margin: 0; padding: 12px 14px; font-size: 0.85rem; line-height: 1.5; color: var(--muted); border-left: 3px solid var(--red-400); background: rgba(241, 59, 145, 0.08); border-radius: 0 12px 12px 0; }
