/* ==========================================================================
   Academia MedMember · MEd+ APAC
   Identidade visual: aeroporto noturno · raio x · cuidado humanizado
   ========================================================================== */

:root {
  /* Paleta base */
  --bg-deep: #060d1a;
  --bg-night: #0a1628;
  --bg-card: #0f1e36;
  --bg-elevated: #162844;
  --bg-soft: rgba(255, 255, 255, 0.04);

  /* Acentos · paleta Med+ */
  --accent: #ed5a2a;        /* laranja Med+ oficial */
  --accent-2: #ff7a3d;      /* laranja claro */
  --accent-deep: #c44617;   /* laranja queimado */
  --accent-glow: rgba(237, 90, 42, 0.4);
  --accent-warm: #ffb627;   /* embarque */
  --med-red: #ff3b5c;       /* cruz médica */
  --signal-blue: #6bcfff;   /* sinalização */

  /* Texto */
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* 7 cuidados, uma cor para cada portão */
  --c1-ouvido: #6bcfff;
  --c2-sensorial: #b68dff;
  --c3-coracao: #ff7a8a;
  --c4-mente: #7fe3c5;
  --c5-pernas: #ffb85c;
  --c6-invisivel: #94a3ff;
  --c7-emergencia: #ff5454;

  /* Espaçamento, tipografia */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --ff-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --ff-display: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html { overflow-x: hidden; }
body {
  font-family: var(--ff-sans);
  background: var(--bg-deep);
  color: var(--text);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
  max-width: 100vw;
}
/* Evita filhos de grid/flex empurrarem o layout pra fora */
.shell, .eval-wrap, .eval-rubric-col, .rubric-card { min-width: 0; }
img, svg, canvas { max-width: 100%; }
.text-muted, p, h1, h2, h3, h4, h5 { overflow-wrap: anywhere; word-wrap: break-word; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ============== Fundo aeroporto ============== */
.airport-bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(237, 90, 42, 0.10), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 182, 39, 0.08), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 122, 61, 0.04), transparent 70%),
    linear-gradient(180deg, #060d1a 0%, #0a1628 60%, #060d1a 100%);
}
.airport-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 87% 32%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 42% 76%, rgba(237,90,42,0.55), transparent),
    radial-gradient(1px 1px at 67% 24%, rgba(255,182,39,0.7), transparent),
    radial-gradient(1px 1px at 23% 88%, rgba(255,122,61,0.6), transparent),
    radial-gradient(2px 2px at 71% 88%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 94% 67%, rgba(255,255,255,0.4), transparent);
  background-size: 100% 100%;
  opacity: 0.7;
  animation: drift 80s linear infinite;
}
@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-40px); }
}

/* Linha de horizonte tipo pista */
.runway-line {
  position: fixed; left: 0; right: 0; bottom: 28vh; z-index: -1;
  height: 1px; background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0.4;
}

/* ============== Layout, cabeçalho ============== */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 60px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex; align-items: center; gap: 16px;
}
.brand-mark {
  height: 44px; width: auto;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}
.brand-divider {
  width: 1px; height: 30px; background: var(--border-strong);
  flex-shrink: 0;
}
.brand-name {
  display: flex; flex-direction: column;
}
.brand-name strong {
  font-size: 14px; letter-spacing: 0.5px; font-weight: 700;
}
.brand-name span {
  font-size: 10px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase;
}

.flight-info {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: flex; gap: 22px; align-items: center;
  flex-wrap: wrap;
}
.flight-info .blink { color: var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.user-chip .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.user-chip .meta {
  font-size: 12px; line-height: 1.2;
}
.user-chip .meta strong { display: block; }
.user-chip .meta span { color: var(--text-muted); font-size: 11px; }

/* ============== Botões ============== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px var(--accent-glow); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--bg-soft); box-shadow: none; }
.btn--warm { background: var(--accent-warm); color: #2a1900; box-shadow: 0 8px 24px rgba(255, 182, 39, 0.3); }
.btn--lg { padding: 18px 34px; font-size: 16px; }
.btn--sm { padding: 9px 16px; font-size: 12px; }

/* ============== Cards ============== */
.card {
  background: linear-gradient(180deg, rgba(22, 40, 68, 0.6), rgba(15, 30, 54, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.card--glass {
  background: rgba(255, 255, 255, 0.03);
}
.card-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ============== Tela 1: Chegada ============== */
.arrival {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 980px) { .arrival { grid-template-columns: 1fr; } }

.arrival-headline {
  font-family: var(--ff-display);
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 18px 0 24px;
}
.arrival-headline .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-warm));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: blink 1.4s infinite;
}
.arrival-sub {
  font-size: 18px; color: var(--text-muted); max-width: 540px; margin-bottom: 36px;
}

.arrival-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============== Painel de embarques — display LED de aeroporto ============== */
.flight-board {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-lg);
  padding: 14px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 4px #000,
    inset 0 0 20px rgba(255, 176, 0, 0.04);
}
.flight-board h3 {
  font-family: 'Share Tech Mono', 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffb627;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}
.flight-board h3 .blink {
  color: #ff5454;
  animation: ledBlink 1.2s steps(2) infinite;
}
@keyframes ledBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.2; } }

/* Display LED: container preto com scan lines CRT */
.led-display {
  background: #050300;
  border: 1px solid #1a0f00;
  border-radius: 6px;
  padding: 10px 0 0;
  position: relative;
  font-family: 'VT323', 'Share Tech Mono', 'JetBrains Mono', monospace;
}
/* Scan lines horizontais (efeito CRT) */
.led-display::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.35) 2px,
      rgba(0, 0, 0, 0.35) 4px
    );
  pointer-events: none;
  border-radius: 6px;
  z-index: 3;
  opacity: 0.6;
}
/* Glow âmbar geral */
.led-display::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 176, 0, 0.06), transparent 70%);
  pointer-events: none;
  border-radius: 6px;
  z-index: 2;
}

/* Cabeçalho do display LED */
.led-header {
  display: grid;
  grid-template-columns: 1.1fr 2fr 0.5fr 1.2fr;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid #2a1a00;
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffb627;
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.7);
  position: relative;
  z-index: 4;
  background: linear-gradient(180deg, #110a00, #0a0500);
}
.led-header .led-col {
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Viewport: máscara que mostra ~8 linhas */
.led-viewport {
  height: 280px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* Ticker: rola verticalmente em loop */
.led-ticker {
  display: flex;
  flex-direction: column;
  animation: ledScroll 36s linear infinite;
}
@keyframes ledScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.led-display:hover .led-ticker { animation-play-state: paused; }

.led-row {
  display: grid;
  grid-template-columns: 1.1fr 2fr 0.5fr 1.2fr;
  gap: 8px;
  padding: 8px 14px;
  font-size: 18px;
  line-height: 1.1;
  color: #ffb627;
  text-shadow:
    0 0 4px rgba(255, 176, 0, 0.55),
    0 0 14px rgba(255, 134, 0, 0.25);
  border-bottom: 1px solid #1a0a00;
  align-items: center;
}
.led-row .led-col { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-row .led-flight { font-weight: 700; }
.led-row .led-dest { letter-spacing: 1px; }
.led-row .led-gate {
  font-weight: 700;
  text-align: center;
}
.led-row .led-status {
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: right;
}
.led-row .led-status.led-ontime { color: #ffb627; }
.led-row .led-status.led-boarding {
  color: #ff8a00;
  text-shadow: 0 0 8px rgba(255, 138, 0, 0.85), 0 0 18px rgba(255, 100, 0, 0.5);
  animation: ledBlink 1s steps(2) infinite;
}
.led-row .led-status.led-boarded {
  color: #4ade80;
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

/* Rodapé do display */
.led-footer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: #ff8a00;
  padding: 8px 14px;
  border-top: 1px solid #2a1a00;
  background: linear-gradient(180deg, #0a0500, #110a00);
  position: relative;
  z-index: 4;
}
.led-footer .led-blink {
  color: #ff5454;
  animation: ledBlink 0.8s steps(2) infinite;
  margin-right: 6px;
}

@media (max-width: 720px) {
  .led-header, .led-row { grid-template-columns: 1fr 1.8fr 0.5fr 1fr; gap: 6px; font-size: 14px; padding: 6px 10px; }
  .led-row { font-size: 16px; }
  .led-viewport { height: 240px; }
}

/* Form */
.login-form {
  display: grid; gap: 14px; max-width: 460px; margin-top: 28px;
}
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted);
}
.field input, .field select, .field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 212, 168, 0.04);
}

/* ============== Tela 2: Boarding Pass ============== */
.checkin-wrap {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start;
}
@media (max-width: 980px) { .checkin-wrap { grid-template-columns: 1fr; } }

.boarding-pass {
  background: linear-gradient(135deg, #fff 0%, #fef5f0 100%);
  color: #0a1628;
  border-radius: 22px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  font-family: var(--ff-mono);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(237, 90, 42, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.boarding-pass:hover { transform: rotate(0); }
.boarding-pass::before {
  content: ''; position: absolute; right: 36%; top: 0; bottom: 0;
  border-left: 2px dashed #cbd5e1;
}
.boarding-pass::after {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; background: var(--bg-deep); border-radius: 50%;
  box-shadow: calc(100% + 20px) 0 0 0 var(--bg-deep);
}
.bp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
.bp-header {
  display: flex; justify-content: space-between;
  grid-column: 1 / -1;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}
.bp-brand { display: flex; align-items: center; gap: 10px; }
.bp-brand-mark {
  height: 32px; width: auto;
  display: block;
}
.bp-brand strong { font-size: 14px; letter-spacing: 1px; }
.bp-class {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; padding: 6px 10px; border-radius: 6px;
}
.bp-item { }
.bp-label {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: #64748b; margin-bottom: 4px;
}
.bp-value { font-size: 18px; font-weight: 700; color: #0a1628; }
.bp-value--xl { font-size: 28px; }
.bp-divider { grid-column: 1 / -1; border-top: 1px dashed #cbd5e1; margin: 8px 0; }
.bp-stub {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
  padding-top: 10px;
}
.bp-barcode {
  height: 50px; display: flex; gap: 2px; align-items: flex-end;
}
.bp-barcode i {
  display: block; background: #0a1628; width: 3px; height: 100%;
}
.bp-progress-ring {
  width: 70px; height: 70px; position: relative;
}

.checkin-side h2 {
  font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px;
}
.checkin-side p { color: var(--text-muted); margin-bottom: 28px; }

/* ============== Tela 3: Mapa do Aeroporto ============== */
.terminal-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
  align-items: stretch;
}
@media (max-width: 980px) { .terminal-hero { grid-template-columns: 1fr; } }

.terminal-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-night));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.terminal-card h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 10px;
}
.terminal-card p { color: var(--text-muted); max-width: 540px; }
.terminal-card::after {
  content: '';
  position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.daily-briefing {
  background: linear-gradient(180deg, rgba(255, 182, 39, 0.06), rgba(15, 30, 54, 0.6));
  border: 1px solid rgba(255, 182, 39, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.daily-briefing h3 {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-warm);
  margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.daily-briefing h3::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-warm); box-shadow: 0 0 12px var(--accent-warm);
}
.daily-briefing p strong { color: var(--text); font-size: 18px; font-weight: 700; }
.daily-briefing small { color: var(--text-muted); display: block; margin-top: 12px; font-size: 12px; }

/* Departures (7 cuidados em formato de painel de embarque) */
.departures {
  margin-top: 24px;
}
.departures-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.departures-head .live { color: var(--accent); display: flex; align-items: center; gap: 8px; }
.departures-head .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; }

.gates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px 0 0;
}

.gate {
  background: linear-gradient(180deg, rgba(22,40,68,0.7), rgba(15,30,54,0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
}
.gate:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.gate::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gate-color, var(--accent));
  box-shadow: 0 0 16px var(--gate-color, var(--accent));
}
.gate-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
}
.gate-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--gate-color, var(--accent)) 14%, transparent);
  color: var(--gate-color, var(--accent));
  font-size: 22px;
}
.gate h4 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.gate-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.gate-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.gate-progress {
  flex: 1; height: 4px; background: var(--bg-soft);
  border-radius: 999px; overflow: hidden;
  margin-right: 12px;
}
.gate-progress i {
  display: block; height: 100%; background: var(--gate-color, var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.gate-status {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.gate--locked { opacity: 0.5; cursor: not-allowed; }
.gate--locked:hover { transform: none; }

/* Pilares */
.pillars {
  margin-top: 60px;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px;
  gap: 20px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
}
.section-head p { color: var(--text-muted); font-size: 14px; max-width: 480px; }
.pillar-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.pillar {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.pillar-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 2px;
}
.pillar h5 { font-size: 17px; font-weight: 700; }
.pillar p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ============== Tela 4: Detalhe do módulo / portão ============== */
.module-hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px;
  margin-bottom: 40px; align-items: start;
}
@media (max-width: 980px) { .module-hero { grid-template-columns: 1fr; } }

.module-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
  margin: 16px 0 16px;
}
.module-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--gate-color, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--gate-color, var(--accent)) 35%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--ff-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gate-color, var(--accent));
}
.module-sub { color: var(--text-muted); font-size: 17px; margin-bottom: 32px; max-width: 560px; }

.module-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px;
}
.stat {
  padding: 16px; background: var(--bg-soft); border-radius: var(--radius); border: 1px solid var(--border);
}
.stat-num {
  font-family: var(--ff-mono);
  font-size: 26px; font-weight: 700; color: var(--gate-color, var(--accent));
}
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 4px; }

.media-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  cursor: pointer;
}
.media-frame::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at center, var(--gate-color, var(--accent)) 0%, transparent 50%);
  opacity: 0.12;
}
.media-frame .play {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: grid; place-items: center;
  color: var(--bg-deep);
  font-size: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 60px var(--accent-glow);
  z-index: 1;
  transition: transform 0.25s ease;
}
.media-frame:hover .play { transform: scale(1.08); }
.media-frame .scanline {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gate-color, var(--accent)), transparent);
  animation: scan 3.5s linear infinite;
  filter: blur(1px);
  z-index: 0;
}
@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Steps de aprendizagem */
.steps {
  display: grid; gap: 14px; margin-top: 30px;
}
.step {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s;
}
.step:hover { border-color: var(--border-strong); }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb, var(--gate-color, var(--accent)) 18%, transparent);
  color: var(--gate-color, var(--accent));
  display: grid; place-items: center;
  font-family: var(--ff-mono); font-weight: 700;
  flex-shrink: 0;
}
.step-body { flex: 1; }
.step-body h5 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.step-body p { font-size: 13px; color: var(--text-muted); }
.step-time {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  white-space: nowrap;
}
.step--done .step-num { background: var(--accent); color: var(--bg-deep); }
.step--done .step-num::before { content: '✓'; }
.step--done .step-num span { display: none; }

/* Kit MedMember */
.kit-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-top: 18px;
}
.kit-item {
  padding: 18px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.2s ease;
}
.kit-item:hover { transform: translateY(-2px); }
.kit-item .icon {
  font-size: 26px; margin-bottom: 8px;
}
.kit-item .name { font-size: 13px; font-weight: 600; }
.kit-item .qty { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: var(--ff-mono); }

/* ============== Tela 5: Avaliação humanizada ============== */
.eval-wrap {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start;
}
@media (max-width: 1100px) { .eval-wrap { grid-template-columns: 1fr; } }

.scene {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-night));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}
.scene-vis {
  aspect-ratio: 16/9;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(127, 227, 197, 0.18), transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(255, 182, 39, 0.12), transparent 70%),
    linear-gradient(180deg, #0a1628, #060d1a);
  position: relative;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 56px;
  min-height: 280px;
}
.scene-vis .tag {
  position: absolute; top: 18px; left: 18px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--ff-mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
}
.scene-vis .tag::before { content: '● '; }
.scene-figure {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c4-mente), var(--c2-sensorial));
  display: grid; place-items: center;
  font-size: 40px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  flex-shrink: 0;
  z-index: 1;
}
.scene-vis::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(6,13,26,0.85));
  pointer-events: none;
}
.scene-caption {
  position: absolute; bottom: 22px; left: 22px; right: 22px;
  font-size: 13px; line-height: 1.5; color: var(--text);
  z-index: 1;
  background: rgba(6,13,26,0.6);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.scene-figure { z-index: 0; }
.scene-body {
  padding: 28px;
}
.scene-body h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.scene-body .ctx {
  padding: 16px 18px;
  background: rgba(127, 227, 197, 0.05);
  border-left: 3px solid var(--c4-mente);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px; color: var(--text-muted); margin-bottom: 20px;
}
.scene-body .ctx strong { color: var(--text); }

/* Mic / gravação */
.record {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mic-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--med-red);
  color: white;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.35);
  flex-shrink: 0;
}
.mic-btn.recording { animation: pulseRec 1.6s infinite; }
@keyframes pulseRec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.6); }
  50% { box-shadow: 0 0 0 16px rgba(255, 59, 92, 0); }
}
.mic-meta {
  font-size: 14px; color: var(--text-muted);
  flex: 1;
}
.mic-meta strong { color: var(--text); display: block; }

/* Aviso de browser sem suporte */
.browser-warn {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.browser-warn strong { color: #f59e0b; }

/* Feedback IA — medidores e sugestões */
.feedback-ia {
  margin-top: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(127, 227, 197, 0.06), rgba(237, 90, 42, 0.06));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.feedback-ia[hidden] { display: none !important; }
.fb-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.fb-title {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.fb-nota {
  font-size: 13px;
  color: var(--text-muted);
}
.fb-nota strong {
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
}
.fb-meters {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.fb-meter {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.fb-meter-label {
  font-weight: 600;
  color: var(--text);
}
.fb-bar {
  height: 10px;
  border-radius: 5px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}
.fb-bar i {
  display: block;
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(.16,.84,.42,1);
  background: var(--accent);
}
.fb-meter.lvl-good .fb-bar i { background: linear-gradient(90deg, #22c55e, #4ade80); }
.fb-meter.lvl-mid  .fb-bar i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fb-meter.lvl-bad  .fb-bar i { background: linear-gradient(90deg, #ef4444, #f87171); }
.fb-meter-val {
  font-family: var(--ff-mono);
  font-weight: 700;
  text-align: right;
  color: var(--text);
}
.fb-tips {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.fb-tips li { color: var(--text-muted); }
.fb-tips li strong { color: var(--text); }
.fb-transcript {
  font-size: 13px;
  color: var(--text-muted);
}
.fb-transcript summary {
  cursor: pointer;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  padding: 8px 0;
}
.fb-transcript p {
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: 8px;
  font-style: italic;
  line-height: 1.6;
  margin-top: 6px;
}

/* Microfone gravando — animação de pulso vermelho */
.mic-btn.recording {
  background: #ef4444 !important;
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
}

@media (max-width: 640px) {
  .fb-meter { grid-template-columns: 90px 1fr 36px; font-size: 12px; }
}

/* =====================================================================
   Landing + Login (onboardapac.com.br)
   ===================================================================== */
.landing {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 28px 60px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 980px) { .landing { grid-template-columns: 1fr; } }

.landing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex; flex-direction: column; gap: 28px;
  position: relative;
  overflow: hidden;
}
.landing-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}
.landing-head {
  display: flex; gap: 18px; align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}
.landing-logo { height: 52px; filter: drop-shadow(0 0 20px var(--accent-glow)); }
.landing-brand { display: flex; flex-direction: column; }
.landing-brand strong { font-size: 16px; letter-spacing: 1.5px; }
.landing-brand span {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.landing-hero h1.landing-title {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 14px 0 12px;
}
.landing-hero h1 .accent { color: var(--accent); }
.landing-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
}
.landing-sub strong { color: var(--text); }

.landing-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px;
  background: rgba(255, 182, 39, 0.06);
  border: 1px solid rgba(255, 182, 39, 0.3);
  border-radius: 12px;
}
.lstat-item { display: grid; gap: 4px; }
.lstat-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.lstat-value {
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-warm);
  letter-spacing: 1px;
}
.lstat-pulse {
  color: var(--med-red);
  animation: ledBlink 1.4s steps(2) infinite;
}

.landing-login {
  padding: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
}
.ll-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.login-airline { display: grid; gap: 14px; }
.la-field { display: grid; gap: 6px; }
.la-field label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
}
.la-field input {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 18px;
  font-family: var(--ff-mono);
  font-weight: 600;
  letter-spacing: 1.5px;
  transition: border-color 0.2s;
}
.la-field input:focus { outline: none; border-color: var(--accent); }
.la-field #localizador { text-transform: uppercase; }
.la-field small {
  font-size: 11px;
  color: var(--text-faint);
}
.la-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 13px;
}
.la-submit {
  letter-spacing: 1.5px;
  font-weight: 700;
}

.landing-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-faint);
}

.landing-board {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-lg);
  padding: 14px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 4px #000,
    inset 0 0 20px rgba(255, 176, 0, 0.04);
}
.landing-board h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: #ffb627;
  margin-bottom: 10px;
  display: flex; justify-content: space-between;
  padding: 0 4px;
}
.landing-board h3 .blink { color: #ff5454; animation: ledBlink 1s steps(2) infinite; }

/* =====================================================================
   Topbar: link admin + sair
   ===================================================================== */
.topbar-link {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.18s;
}
.topbar-link:hover { color: var(--accent); border-color: var(--accent); }
.topbar-link--sair:hover { color: var(--med-red); border-color: var(--med-red); }

/* =====================================================================
   Painel Admin
   ===================================================================== */
.admin-head {
  display: flex; justify-content: space-between; align-items: start;
  gap: 18px; flex-wrap: wrap;
}
.admin-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
}
.admin-sub {
  font-size: 14px;
  color: var(--text-muted);
}
.admin-sub strong { color: var(--text); }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 720px) { .admin-kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.kpi-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-top: 6px;
}

.admin-form { display: grid; gap: 16px; }
.af-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .af-grid { grid-template-columns: 1fr; } }
.af-field { display: grid; gap: 4px; }
.af-field--wide { grid-column: span 2; }
@media (max-width: 720px) { .af-field--wide { grid-column: auto; } }
.af-field label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.af-field input, .af-field select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
}
.af-field input:focus, .af-field select:focus { outline: none; border-color: var(--accent); }
.af-field--check { display: flex; align-items: end; }
.af-checkbox {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.af-actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}

.card-head {
  display: flex; justify-content: space-between; align-items: start;
  gap: 18px; flex-wrap: wrap;
}
.admin-filter {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 13px;
  min-width: 280px;
}
.admin-filter:focus { outline: none; border-color: var(--accent); }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 12px 10px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr.tr-base { background: rgba(237, 90, 42, 0.04); }
.admin-table td .btn { margin-right: 6px; margin-bottom: 4px; }
.badge {
  display: inline-block;
  padding: 3px 9px;
  background: var(--bg-elevated);
  border-radius: 6px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1px;
}
.badge--admin {
  background: var(--accent);
  color: #0a1628;
  font-weight: 700;
}

/* =====================================================================
   Prova CESP — estilo Cebraspe (sério, técnico, fundamentação normativa)
   ===================================================================== */
.prova-header {
  display: grid;
  gap: 16px;
}
.prova-banner {
  padding: 24px 28px;
  background: linear-gradient(135deg, #0f1e36, #142844);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  border-left: 6px solid var(--accent);
}
.prova-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.prova-orgao {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}
.prova-tipo {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.prova-titulo {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 4px 0;
}
.prova-subtitulo {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.prova-instrucoes {
  padding: 18px 22px;
  background: rgba(127, 227, 197, 0.05);
  border: 1px solid var(--border);
  border-left: 3px solid #7fe3c5;
  border-radius: var(--radius);
}
.ins-list {
  margin: 12px 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}
.ins-list li strong { color: var(--text); }

/* Corpo da prova */
.prova-corpo { display: grid; gap: 18px; }
.prova-texto-base {
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ptb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.ptb-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}
.ptb-base {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-align: right;
}
.ptb-conteudo {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
}
.ptb-conteudo p { margin-bottom: 12px; }
.ptb-conteudo p:last-child { margin-bottom: 0; }
.ptb-conteudo strong { color: var(--accent); }

/* Itens */
.prova-itens { display: grid; gap: 14px; }
.prova-itens.itens-encerrados .item-opt { pointer-events: none; opacity: 0.6; }

.item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.item.respondido { border-color: var(--accent); }
.item-num {
  font-family: var(--ff-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(237, 90, 42, 0.1);
  border-radius: 8px;
  display: grid; place-items: center;
  align-self: start;
}
.item-body { min-width: 0; }
.item-enunciado {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 14px;
  text-align: justify;
}
.item-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.item-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}
.item-opt:hover {
  border-color: var(--accent);
  background: rgba(237, 90, 42, 0.06);
}
.item-opt.on {
  border-color: var(--accent);
  background: rgba(237, 90, 42, 0.18);
}
.opt-letter {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.item-opt.on .opt-letter {
  background: var(--accent);
  color: #fff;
}
.opt-text {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.opt-branco { opacity: 0.7; }

@media (max-width: 600px) {
  .item { grid-template-columns: 44px 1fr; gap: 12px; padding: 16px; }
  .item-num { font-size: 18px; }
  .item-opts { grid-template-columns: 1fr; }
  .opt-text { font-size: 13px; }
}

/* Rodapé com status + botão */
.prova-rodape {
  position: sticky;
  bottom: 12px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(15, 30, 54, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  gap: 16px;
  flex-wrap: wrap;
  z-index: 10;
}
.prova-status { display: flex; gap: 22px; }
.ps-block { display: grid; gap: 4px; }
.ps-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.ps-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

/* Gabarito */
.prova-gabarito {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}
.prova-gabarito[hidden] { display: none !important; }
.gab-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}
.gab-result { display: grid; gap: 4px; }
.gab-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
}
.gab-classe {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
}
.gab-numeros {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.gab-num {
  display: grid;
  gap: 2px;
  text-align: center;
}
.gab-num strong {
  font-family: var(--ff-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.gab-num span {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.gab-num--final strong { color: var(--accent); font-size: 36px; }

#gabaritoLista { display: grid; gap: 12px; margin-top: 16px; }
.gab-item {
  padding: 18px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 4px solid var(--border-strong);
}
.gab-item.gab-certo { border-left-color: #22c55e; }
.gab-item.gab-errado { border-left-color: #ef4444; }
.gab-item.gab-branco { border-left-color: #94a3b8; }

.gi-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
}
.gi-num {
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.gi-status {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.gab-certo .gi-status { color: #4ade80; }
.gab-errado .gi-status { color: #f87171; }
.gi-gabarito {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.gi-gabarito strong {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}
.gi-enunciado {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 10px;
  text-align: justify;
}
.gi-comentario, .gi-fundamento {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 8px;
}
.gi-comentario strong, .gi-fundamento strong {
  color: var(--accent);
  margin-right: 4px;
}

/* ====== Rubrica profissional ====== */
.rubric { display: block; }
.rubric-card { padding: 28px; min-width: 0; }
.rubric-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}
.rubric-class-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: start;
}
@media (max-width: 720px) {
  .rubric-card-head { grid-template-columns: 1fr; }
  .rubric-class-tag { justify-self: start; }
}

.rubric-pro {
  display: grid;
  gap: 22px;
  margin-top: 4px;
}
.rubric-dim {
  padding: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-left: 3px solid var(--dim-color);
  border-radius: var(--radius);
}
.rubric-dim-head { margin-bottom: 14px; }
.rubric-dim-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
}
.rubric-dim-title strong { font-weight: 700; }
.rubric-dim-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--dim-color);
  flex-shrink: 0;
}
.rubric-dim-score {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--dim-color);
}
.rubric-dim-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.rubric-dim-items { display: grid; gap: 12px; }
.rubric-item-pro {
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.rubric-item-pro.answered { border-color: var(--dim-color); }
.ri-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}
.ri-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ri-peso {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.ri-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}
.ri-score-mini {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: grid; place-items: center;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  flex-shrink: 0;
}
.rubric-item-pro.answered .ri-score-mini {
  background: var(--dim-color);
  color: #0a1628;
}

.ri-levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ri-level {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
  text-align: left;
  padding: 8px 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  min-width: 0;
}
.ri-level:hover {
  border-color: var(--dim-color);
  background: color-mix(in srgb, var(--dim-color) 12%, var(--bg-elevated));
}
.ri-level.on {
  border-color: var(--dim-color);
  background: color-mix(in srgb, var(--dim-color) 22%, var(--bg-elevated));
}
.ri-level-num {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 11px;
}
.ri-level.on .ri-level-num {
  background: var(--dim-color);
  color: #0a1628;
}
.ri-level-txt {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ri-level.on .ri-level-txt { color: var(--text); }

@media (max-width: 640px) {
  .ri-levels { grid-template-columns: 1fr 1fr; }
}

/* Resumo da pontuação */
.rubric-summary {
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--bg-night);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.rs-block { min-width: 80px; }
.rs-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.rs-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.rs-of {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}
.rs-pct {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 2px;
}
.rubric-summary .btn { justify-self: end; }
@media (max-width: 720px) {
  .rubric-summary { grid-template-columns: repeat(3, 1fr); }
  .rubric-summary .btn { grid-column: 1 / -1; justify-self: stretch; }
}

/* Revisão mentorada — 3 colunas */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.review-tile {
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.review-tile strong {
  font-family: var(--ff-mono);
  font-size: 22px;
  color: var(--accent);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .review-grid { grid-template-columns: 1fr; }
}

/* ============== Tela 6: Certificação ============== */
.certify {
  text-align: center;
  padding: 60px 40px;
  min-height: 80vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.certify-headline {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 30px 0 20px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-warm));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.certify p { font-size: 18px; color: var(--text-muted); max-width: 580px; margin: 0 auto 40px; }

.seal {
  width: 240px; height: 240px;
  margin: 30px auto;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff, #fef0e7);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 30px 80px rgba(237, 90, 42, 0.45), 0 0 120px rgba(237, 90, 42, 0.25);
  animation: floatSeal 5s ease-in-out infinite;
}
@keyframes floatSeal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.seal::before {
  content: ''; position: absolute; inset: -8px;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.seal-inner {
  text-align: center; color: var(--bg-deep);
  font-family: var(--ff-mono);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.seal-inner strong {
  display: block; font-size: 22px; letter-spacing: 1px; color: var(--accent-deep);
}
.seal-inner span { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-top: 2px; }

.plane-strip {
  margin-top: 40px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 2px;
}
.plane-strip .plane {
  display: inline-block;
  animation: fly 8s linear infinite;
}
@keyframes fly {
  0% { transform: translateX(-200px); }
  100% { transform: translateX(200px); }
}

/* ============== Manifesto ============== */
.manifesto {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0;
}
.manifesto h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
  line-height: 1;
}
.manifesto p {
  font-size: 18px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.7;
}
.manifesto p strong { color: var(--text); }
.manifesto blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 30px 0;
  font-size: 22px; font-weight: 600;
  color: var(--text);
}

/* ============== Utilitários ============== */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-warm { color: var(--accent-warm); }
.mono { font-family: var(--ff-mono); }
.tag {
  display: inline-flex; gap: 6px; padding: 4px 10px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 999px; font-size: 11px; color: var(--text-muted);
  letter-spacing: 1.5px; text-transform: uppercase;
}

/* PA announcement bar */
.pa {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 182, 39, 0.08);
  border: 1px solid rgba(255, 182, 39, 0.2);
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 24px;
}
.pa .icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent-warm); color: #2a1900;
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.pa strong { color: var(--accent-warm); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 13, 26, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.on { display: flex; }
.modal {
  max-width: 540px; width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}
.modal h3 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.modal p { color: var(--text-muted); margin-bottom: 24px; }

/* Card "Bem-vindo de volta" no index */
.welcome-back {
  padding: 24px;
  background: linear-gradient(135deg, rgba(237, 90, 42, 0.10), rgba(127, 227, 197, 0.08));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-top: 14px;
  display: grid;
  gap: 18px;
}
.welcome-back[hidden] { display: none !important; }
.wb-greeting {
  display: flex;
  gap: 14px;
  align-items: center;
}
.wb-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(237, 90, 42, 0.4);
}
.wb-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 4px;
}
.wb-nome {
  font-size: 18px;
  color: var(--text);
}
.wb-nome strong { font-weight: 700; }
.wb-meta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Overlay "Embarcando..." que segura a tela enquanto o áudio toca */
.entry-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, rgba(10, 22, 40, 0.97), rgba(5, 11, 20, 0.99));
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: grid;
  place-items: center;
  animation: fadeIn 0.3s ease;
}
.entry-overlay[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.entry-card {
  text-align: center;
  padding: 40px 50px;
  display: grid;
  gap: 16px;
  place-items: center;
}
.entry-icon {
  font-size: 56px;
  animation: planeFly 2.5s ease-in-out infinite;
}
@keyframes planeFly {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(8px) translateY(-4px); }
}
.entry-title {
  font-family: var(--ff-mono);
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--accent);
  font-weight: 700;
}
.entry-msg {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  max-width: 480px;
  line-height: 1.3;
}
.entry-bar {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.entry-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ffb35c);
  animation: entryProgress 2.8s linear forwards;
}
@keyframes entryProgress {
  to { width: 100%; }
}

/* Boarding pass — barra de progresso e poltrona dinâmica */
.bp-progress-strip {
  grid-column: 1 / -1;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  border: 1px dashed #94a3b8;
  border-radius: 10px;
}
.bp-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.bp-progress-pct {
  font-family: var(--ff-mono); font-weight: 700; font-size: 18px; color: #0a1628;
}
.bp-progress-bar {
  height: 8px; border-radius: 4px; background: #d8dee7; overflow: hidden;
}
.bp-progress-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb35c);
  transition: width 0.4s ease;
}
.bp-progress-meta {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 11px; color: #475569; letter-spacing: 0.5px;
}
.bp-progress-meta strong { color: #0a1628; }

.bp-seat-note {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff7ed;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 12px;
  color: #0a1628;
  display: flex; flex-direction: column; gap: 2px;
}
.bp-seat-note strong { font-family: var(--ff-mono); font-size: 13px; letter-spacing: 1px; }
.bp-seat-note span { color: #475569; }

/* Vantagens conquistadas no boarding pass */
.bp-perks {
  grid-column: 1 / -1;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  border: 1px dashed #94a3b8;
  border-radius: 10px;
}
.bp-perks-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.bp-perks-count {
  font-family: var(--ff-mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
}
.bp-perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 540px) {
  .bp-perks-grid { grid-template-columns: repeat(3, 1fr); }
}
.bp-perk {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid;
  font-size: 10px;
  transition: all 0.2s;
}
.bp-perk--on {
  background: linear-gradient(135deg, rgba(237, 90, 42, 0.12), rgba(255, 182, 39, 0.12));
  border-color: var(--accent);
  color: #0a1628;
}
.bp-perk--off {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  filter: grayscale(0.6);
  opacity: 0.55;
}
.bp-perk-ico { font-size: 18px; line-height: 1.1; }
.bp-perk-name {
  font-weight: 700;
  font-size: 10px;
  line-height: 1.15;
  letter-spacing: 0.2px;
  overflow-wrap: anywhere;
}
.bp-perk-seat {
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}
.bp-perk--off .bp-perk-seat { color: #94a3b8; }

.bp-perks-next {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(127, 227, 197, 0.15);
  border: 1px dashed #7fe3c5;
  border-radius: 6px;
  font-size: 12px;
  color: #0a1628;
}
.bp-perks-next strong { color: var(--accent); margin-right: 4px; }
.bp-perks-next--max {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-color: var(--accent);
  font-weight: 700;
  text-align: center;
}

/* Botão flutuante de pausar/retomar som ambiente */
.audio-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.audio-toggle:hover { transform: translateY(-2px); border-color: var(--accent); }
.audio-toggle .ico {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0a1628;
  font-size: 11px;
  font-weight: 700;
}
.audio-toggle.is-playing { background: rgba(237, 90, 42, 0.18); border-color: var(--accent); }
.audio-toggle.is-playing .ico { background: #fff; }
.audio-toggle .lbl { font-weight: 600; }
@media (max-width: 540px) {
  .audio-toggle .lbl { display: none; }
  .audio-toggle { padding: 10px; }
}

/* ==========================================================================
   Game · Simulador de Check-in
   ========================================================================== */
.game-hero {
  display: grid;
  gap: 16px;
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(237, 90, 42, 0.14), rgba(10, 22, 40, 0.6));
  border: 1px solid var(--border);
}
.game-title {
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 8px 0 12px;
}
.game-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 720px;
  line-height: 1.5;
}
.game-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.rule-pill {
  font-size: 12px;
  font-family: var(--ff-mono);
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 999px;
}
.rule-pill--good { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }
.rule-pill--bad  { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }

/* HUD */
.game-arena { display: grid; gap: 22px; }
.game-hud {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hud-cell { display: flex; flex-direction: column; gap: 4px; }
.hud-cell--bar { grid-column: 2 / 3; }
.hud-cell--score { text-align: right; }
.hud-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.hud-value {
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  transition: color 0.2s;
}
.hud-bar { height: 8px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.hud-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb35c);
  transition: width 0.5s ease;
}
.pulse-good { animation: pulseGood 0.6s ease; }
.pulse-bad  { animation: pulseBad 0.6s ease; }
@keyframes pulseGood {
  0% { transform: scale(1); color: var(--accent); }
  40% { transform: scale(1.18); color: #4ade80; }
  100% { transform: scale(1); color: var(--accent); }
}
@keyframes pulseBad {
  0% { transform: scale(1); color: var(--accent); }
  40% { transform: scale(1.18); color: #f87171; }
  100% { transform: scale(1); color: var(--accent); }
}

/* Scene card */
.scene-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.scene-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Palco: SVG do cenário + avatar do colaborador + balão de fala */
.scene-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  border-radius: 16px;
  overflow: hidden;
  background: #0a1628;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.scene-svg {
  width: 100%; height: 100%; display: block;
}
.scene-passenger {
  transform-origin: 285px 120px;
  animation: passWobble 2.5s ease-in-out infinite;
}
@keyframes passWobble {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Avatar do colaborador APAC dentro da cena */
.avatar-stage {
  position: absolute;
  bottom: 0; left: 5%;
  width: 28%; max-width: 140px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
  animation: avatarBob 3s ease-in-out infinite;
}
.avatar-svg { width: 100%; height: auto; display: block; }
@keyframes avatarBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Balão de fala — narrador do passageiro / feedback */
.speech-bubble {
  position: absolute;
  top: 14px; right: 14px;
  max-width: 56%;
  padding: 14px 16px;
  background: #ffffff;
  color: #0a1628;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.5;
  transition: transform 0.4s ease, background 0.3s, color 0.3s;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 30px;
  border: 10px solid transparent;
  border-top-color: #ffffff;
  border-bottom: 0;
}
.bubble-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.bubble-text {
  font-size: 13px; color: #475569;
}
.bubble-pts {
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
}
.bubble-pts.pos { color: #16a34a; }
.bubble-pts.neg { color: #dc2626; }
.bubble-next {
  margin-top: 12px;
  font-size: 12px;
}
.speech-flip {
  animation: bubbleFlip 0.5s ease;
}
@keyframes bubbleFlip {
  0%   { transform: scale(0.96); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Pontos flutuantes (+30 / -25) que sobem dentro da cena */
.floating-points {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}
.floating-pts {
  font-family: var(--ff-mono);
  font-weight: 800;
  font-size: 76px;
  letter-spacing: -2px;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  animation: floatUp 2.2s cubic-bezier(.16,.84,.42,1) forwards;
}
.floating-pts.pts-good { color: #4ade80; }
.floating-pts.pts-bad  { color: #f87171; }
.floating-tag {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  animation: floatUp 2.2s cubic-bezier(.16,.84,.42,1) forwards;
}
.floating-tag.tag-good { background: #22c55e; color: #052e16; }
.floating-tag.tag-bad  { background: #ef4444; color: #fee2e2; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(40px) scale(0.6); }
  18%  { opacity: 1; transform: translateY(-10px) scale(1.05); }
  60%  { opacity: 1; transform: translateY(-30px) scale(1); }
  100% { opacity: 0; transform: translateY(-90px) scale(0.95); }
}

/* Flash colorido da cena */
.scene-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
}
.scene-flash.flash-good {
  background: radial-gradient(circle at center, rgba(34,197,94,0.55), rgba(34,197,94,0) 70%);
  animation: flashFx 0.9s ease;
}
.scene-flash.flash-bad {
  background: radial-gradient(circle at center, rgba(239,68,68,0.55), rgba(239,68,68,0) 70%);
  animation: flashFx 0.9s ease;
}
@keyframes flashFx {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}

/* Opções de escolha */
.scene-options { display: grid; gap: 10px; }
.opt {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  text-align: left;
  padding: 14px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  align-items: center;
}
.opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(237, 90, 42, 0.08);
  transform: translateY(-1px);
}
.opt-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(237, 90, 42, 0.18);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 14px;
}
.opt-text { font-size: 14px; line-height: 1.45; }
.opt-pts-preview {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.2s;
}
.opt.locked .opt-pts-preview { opacity: 1; }
.opt.locked { opacity: 0.55; cursor: default; }
.opt.locked:hover { transform: none; border-color: var(--border); background: var(--bg-soft); }
.opt.chosen-good { border-color: #22c55e; background: rgba(34, 197, 94, 0.14); opacity: 1; }
.opt.chosen-good .opt-letter { background: #22c55e; color: #052e16; }
.opt.chosen-good .opt-pts-preview { color: #4ade80; }
.opt.chosen-bad  { border-color: #ef4444; background: rgba(239, 68, 68, 0.14); opacity: 1; }
.opt.chosen-bad .opt-letter { background: #ef4444; color: #fee2e2; }
.opt.chosen-bad .opt-pts-preview { color: #f87171; }

/* ==========================================================================
   Jogo 2D · Terminal APAC (view top-down)
   ========================================================================== */
.shell--game { padding-bottom: 24px; }
.game-headbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; margin-bottom: 12px; gap: 12px; flex-wrap: wrap;
}
.back-link { font-size: 11px; letter-spacing: 2px; text-decoration: none; }
.game-hud-mini {
  display: inline-flex; gap: 10px; align-items: center;
  padding: 8px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--ff-mono); font-size: 13px;
}
.game-hud-mini .hud-value { font-weight: 700; color: var(--accent); }
.game-hud-mini .hud-sep { opacity: 0.4; }

.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 5;
  max-height: 56vh;
  border-radius: 18px;
  overflow: hidden;
  background: #050b14;
  border: 1px solid var(--border-strong);
  outline: none;
  box-shadow: 0 22px 48px rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
}
.game-frame:focus { border-color: var(--accent); }
.game-frame canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
  background: #050b14;
  /* só o canvas bloqueia gestos — a página continua rolando fora dele */
  touch-action: none;
}
@media (max-width: 720px) {
  .game-frame { max-height: 50vh; }
}

/* Splash inicial — overlay FULLSCREEN sobre toda a página */
.splash--overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(10, 22, 40, 0.96), rgba(5, 11, 20, 0.99));
  z-index: 500;
  padding: 24px;
  text-align: center;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash[hidden] { display: none !important; }
.splash-inner {
  max-width: 560px;
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 28px 32px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: rgba(10, 22, 40, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  margin: auto;
}
@media (max-width: 540px) {
  .splash-inner { padding: 22px 18px; gap: 10px; }
}
.splash-title {
  font-family: var(--ff-mono);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 0 4px 0 #c44617, 0 6px 14px rgba(0,0,0,0.4);
}
.splash-sub {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.splash-instructions {
  display: grid;
  gap: 10px;
  font-size: 13px;
  padding: 14px;
  background: var(--bg-soft);
  border-radius: 8px;
  text-align: left;
  margin-bottom: 6px;
}
.ins-block { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ins-key {
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  background: #fff;
  color: #0a1628;
  border-radius: 4px;
  border-bottom: 2px solid #aaa;
  letter-spacing: 1px;
}
.ins-lbl { color: var(--text-muted); margin-left: 6px; font-size: 12px; }
.splash-goal {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(237, 90, 42, 0.08);
  border: 1px solid rgba(237, 90, 42, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  line-height: 1.6;
}
.splash-mission {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  padding: 12px 14px;
  background: rgba(127, 227, 197, 0.08);
  border-left: 3px solid #7fe3c5;
  border-radius: 6px;
  text-align: left;
}
.splash-mission strong { color: #7fe3c5; }
.splash-bosses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.boss-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid var(--c);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}
.boss-chip span { color: var(--c); }

/* Controles mobile */
.game-controls {
  position: absolute; inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  padding: 12px;
  z-index: 15;
  pointer-events: none;
}
.game-controls[hidden] { display: none !important; }
.gc-left, .gc-right {
  display: flex; gap: 10px;
  pointer-events: auto;
}
.gc-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(237, 90, 42, 0.85);
  color: #fff;
  border: 2px solid #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.gc-btn:active { background: var(--accent); transform: scale(0.94); }
.gc-action { background: rgba(127, 227, 197, 0.85); color: #052e16; }
.gc-jump { background: rgba(107, 207, 255, 0.9); color: #0a1628; }

/* Mundo: piso top-down do terminal */
.world {
  position: relative;
  width: 100%; height: 100%;
}
.floor {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(237, 90, 42, 0.07), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(127, 227, 197, 0.05), transparent 60%),
    linear-gradient(180deg, #122236 0%, #0a1828 100%);
}
.floor::after {
  /* textura de piso quadriculado leve */
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.floor-line {
  position: absolute;
  background: rgba(237, 90, 42, 0.18);
  pointer-events: none;
}
.floor-line--h { left: 0; right: 0; height: 2px; }
.floor-line--v { top: 0; bottom: 0; width: 2px; }

/* Estações de atendimento */
.station {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 130px; height: 150px;
  display: grid;
  grid-template-rows: 60px 30px 1fr auto;
  place-items: center;
  pointer-events: none;
}
.station-floor {
  position: absolute;
  top: 12%; left: 50%;
  transform: translateX(-50%);
  width: 110%;
  height: 130%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 90, 42, 0.18) 0%, rgba(237, 90, 42, 0) 65%);
  z-index: 0;
  animation: stationPulse 2.6s ease-in-out infinite;
}
@keyframes stationPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.7; }
  50%      { transform: translateX(-50%) scale(1.12); opacity: 1; }
}
.station--done .station-floor {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0) 65%);
  animation: none; opacity: 0.6;
}
.station-desk {
  position: relative; z-index: 1;
  width: 90px; height: 30px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #1e3a5f, #0f2338);
  border: 1px solid #2a4868;
  box-shadow: 0 4px 0 #061525;
}
.station-desk::before {
  content: '';
  position: absolute;
  top: -4px; left: 0; right: 0; height: 5px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}
.station-npc {
  position: relative; z-index: 2;
  font-size: 44px;
  margin-top: -40px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
  animation: npcBounce 2.5s ease-in-out infinite;
}
@keyframes npcBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.station-tag {
  position: relative; z-index: 2;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #cfd9e6;
  background: rgba(10, 22, 40, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.station-done {
  position: absolute;
  top: 16px; right: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #22c55e;
  color: #052e16;
  display: grid; place-items: center;
  font-weight: 700;
  z-index: 3;
}
.station-float {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-mono);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -1px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
  animation: floatUp 1.6s cubic-bezier(.16,.84,.42,1) forwards;
  z-index: 4;
  pointer-events: none;
}
.station-float.sf-good { color: #4ade80; }
.station-float.sf-bad  { color: #f87171; }

/* Player */
.player {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 60px; height: 90px;
  z-index: 5;
  pointer-events: none;
  transition: filter 0.2s;
}
.player-shadow {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.45), transparent 70%);
}
.player-body {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.5));
}
.player-svg { width: 100%; height: auto; }
.player-name {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.player.is-walking .player-body { animation: walkBob 0.36s ease-in-out infinite; }
@keyframes walkBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.player[data-dir="left"]  .player-body { transform: scaleX(-1); }
.player[data-dir="right"] .player-body { transform: scaleX(1); }

/* Hint de interação */
.interact-hint {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 6;
  background: var(--accent);
  color: #0a1628;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  display: inline-flex; gap: 8px; align-items: center;
  white-space: nowrap;
  animation: hintFloat 1.2s ease-in-out infinite;
  box-shadow: 0 6px 18px rgba(237, 90, 42, 0.45);
}
@keyframes hintFloat {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 4px)); }
}
.hint-key {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: #0a1628;
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 12px;
}
.hint-tap { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint-key { display: none; }
  .hint-tap { display: inline; }
}

/* Legenda topo */
.map-legend {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 8px; flex-wrap: wrap;
  z-index: 4;
}
.lg-pill {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1px;
  background: rgba(10, 22, 40, 0.85);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
@media (hover: none) and (pointer: coarse) {
  .map-legend .lg-pill:first-child { display: none; }
}

/* D-Pad mobile */
.dpad {
  position: absolute;
  bottom: 14px; left: 14px;
  display: none;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 4px;
  z-index: 7;
}
.dpad .dp {
  background: rgba(237, 90, 42, 0.85);
  border: 1px solid #fff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dpad .dp:active { background: var(--accent); transform: scale(0.96); }
.dp-up    { grid-column: 2; grid-row: 1; }
.dp-left  { grid-column: 1; grid-row: 2; }
.dp-right { grid-column: 3; grid-row: 2; }
.dp-down  { grid-column: 2; grid-row: 3; }
.dp-action {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a1628;
  font-weight: 800;
  font-size: 22px;
  border: 3px solid #fff;
  cursor: pointer;
  z-index: 7;
}
@media (hover: none) and (pointer: coarse) {
  .dpad { display: grid; }
}

/* Diálogo */
.dialog-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 11, 20, 0.78);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 200;
  padding: 16px;
}
.dialog-overlay[hidden],
.game-final-overlay[hidden],
.interact-hint[hidden] { display: none !important; }
.dialog-modal {
  width: min(900px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  animation: dialogIn 0.3s cubic-bezier(.16,.84,.42,1);
}
.dialog-modal--full {
  grid-template-columns: 220px 1fr;
  grid-template-areas:
    "scene scene"
    "side  main";
  max-height: 92vh;
  overflow-y: auto;
}
.dialog-modal--full .dialog-side { grid-area: side; }
.dialog-modal--full .dialog-main { grid-area: main; }
.dialog-modal--full .dialog-scene { grid-area: scene; }

/* Cena visual SVG dentro do modal — menor pra deixar espaço pra pergunta */
.dialog-scene {
  width: 100%;
  background: #050b14;
  border-bottom: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  height: 180px;
}
.dialog-scene svg {
  width: 100%;
  height: 100%;
  display: block;
}
.dialog-scene.scene-anim svg {
  animation: sceneIn 0.5s cubic-bezier(.16,.84,.42,1);
}
@keyframes sceneIn {
  0%   { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
@media (max-width: 720px) {
  .dialog-scene { height: 140px; }
}

/* Pergunta principal destacada */
.dialog-bubble {
  font-size: 16px;
  color: var(--text);
  background: rgba(237, 90, 42, 0.12);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  line-height: 1.5;
  font-weight: 500;
  display: block;
}
.bubble-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bubble-line {
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  font-style: italic;
}
.dialog-prompt {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .dialog-modal--full {
    grid-template-columns: 1fr;
    grid-template-areas:
      "scene"
      "side"
      "main";
  }
  .dialog-modal--full .dialog-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px 18px;
  }
  .dialog-modal--full .dialog-passenger { font-size: 42px; }
}
@keyframes dialogIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.dialog-side {
  padding: 26px 20px;
  background: linear-gradient(180deg, #1e3a5f, #0f2338);
  display: grid; place-items: center; gap: 10px;
  text-align: center;
  border-right: 1px solid var(--border-strong);
}
.dialog-passenger {
  font-size: 80px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5));
  animation: npcBounce 2.5s ease-in-out infinite;
}
.dialog-passenger-name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.dialog-step-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
}
.dialog-main { padding: 22px 26px; display: grid; gap: 14px; }
.dialog-context {
  font-size: 13px; color: var(--text-muted);
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  line-height: 1.55;
}
.dialog-bubble {
  font-size: 17px;
  color: var(--text);
  background: rgba(237, 90, 42, 0.08);
  border: 1px solid rgba(237, 90, 42, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  line-height: 1.5;
  font-weight: 500;
}
.dialog-typer { display: inline-block; }
.dialog-typer::after { content: '▍'; color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.dialog-options { display: grid; gap: 8px; }
.dlg-opt {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
  align-items: center;
}
.dlg-opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(237, 90, 42, 0.06);
  transform: translateX(2px);
}
.dlg-letter {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(237, 90, 42, 0.18);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 12px;
}
.dlg-text { font-size: 13px; line-height: 1.4; }
.dlg-opt.locked { opacity: 0.5; cursor: default; }
.dlg-opt.chosen-good { border-color: #22c55e; background: rgba(34, 197, 94, 0.14); opacity: 1; }
.dlg-opt.chosen-good .dlg-letter { background: #22c55e; color: #052e16; }
.dlg-opt.chosen-bad  { border-color: #ef4444; background: rgba(239, 68, 68, 0.14); opacity: 1; }
.dlg-opt.chosen-bad .dlg-letter { background: #ef4444; color: #fee2e2; }

.dialog-feedback {
  padding: 14px 16px;
  border-radius: 10px;
  border-left: 4px solid;
  background: var(--bg-soft);
}
.dialog-feedback.feedback--good { border-color: #22c55e; background: rgba(34, 197, 94, 0.08); }
.dialog-feedback.feedback--bad  { border-color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.fb-row { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.fb-pts { font-family: var(--ff-mono); font-weight: 700; font-size: 18px; }
.feedback--good .fb-pts { color: #4ade80; }
.feedback--bad  .fb-pts { color: #f87171; }
.fb-tag { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--text-faint); }
.dialog-feedback p { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin: 6px 0 12px; }

.dialog-progress {
  display: grid; grid-template-columns: 1fr; gap: 6px;
  margin-top: 4px;
}
.dp-label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 1.5px; color: var(--text-faint); }
.dp-bar { height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.dp-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb35c);
  transition: width 0.4s ease;
}

@media (max-width: 720px) {
  .dialog-modal { grid-template-columns: 1fr; }
  .dialog-side { padding: 18px; flex-direction: row; }
  .dialog-passenger { font-size: 56px; }
  .dialog-side > * { display: inline-block; }
}

/* Final overlay */
.game-final-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 11, 20, 0.86);
  backdrop-filter: blur(8px);
  z-index: 300;
  overflow-y: auto;
  display: grid; place-items: center;
  padding: 24px;
}
.game-final-overlay .game-final {
  max-width: 720px; width: 100%;
}

/* Avatar grande no resultado final */
.final-avatar {
  position: relative;
  width: 160px;
  margin: 0 auto 16px;
}
.final-avatar .avatar-svg { width: 100%; }
.final-seat-tag {
  position: absolute;
  bottom: -8px; right: -20px;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--final-bg, var(--accent));
  color: #0a1628;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* Final */
.game-final {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--final-bg, var(--accent)) 25%, var(--bg-card)), var(--bg-card));
  border: 1px solid var(--border-strong);
  text-align: center;
}
.final-badge {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--final-bg, var(--accent));
  padding: 6px 14px;
  border: 1px solid var(--final-bg, var(--accent));
  border-radius: 999px;
  margin-bottom: 14px;
}
.final-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.final-seat {
  font-family: var(--ff-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--final-bg, var(--accent));
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.final-sub {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 640px;
  margin: 0 auto 26px;
  line-height: 1.55;
}
.final-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.final-stat {
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.final-stat-num {
  font-family: var(--ff-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
}
.final-stat-num span { font-size: 14px; color: var(--text-muted); margin-left: 4px; }
.final-stat-lbl {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  margin-top: 4px;
}
.final-recap {
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 26px;
}
.final-recap h4 {
  font-size: 14px;
  font-family: var(--ff-mono);
  letter-spacing: 1.5px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.final-recap ol { list-style: none; display: grid; gap: 10px; }
.final-recap li {
  display: grid;
  grid-template-columns: 32px 1fr 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.recap-num { font-family: var(--ff-mono); font-size: 12px; color: var(--text-faint); }
.recap-label { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.recap-pts { font-family: var(--ff-mono); font-weight: 700; text-align: right; }
.recap-pts.pos { color: #4ade80; }
.recap-pts.neg { color: #f87171; }
.final-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Bloco de evolução do curso na tela final do simulador */
.final-course-box {
  margin: 24px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(237, 90, 42, 0.06), rgba(127, 227, 197, 0.06));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  text-align: left;
}
.final-course-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap; gap: 6px;
}
.fc-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.fc-progress {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.fc-progress strong { color: var(--text); }
.final-course-seat {
  font-family: var(--ff-mono);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.final-course-msg {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.final-course-msg strong { color: var(--text); }
.final-perks {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.final-perk-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: rgba(237, 90, 42, 0.15);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

@media (max-width: 640px) {
  .scene-grid { grid-template-columns: 1fr; }
  .scene-emoji { width: 80px; height: 80px; font-size: 40px; }
  .game-hud { grid-template-columns: 1fr; gap: 10px; text-align: left; }
  .hud-cell--bar { grid-column: auto; }
  .hud-cell--score { text-align: left; }
}

/* Gate — elenco e tom do módulo */
.gate-cast {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 8px;
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.3px;
}
.gate-tom {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gate-color, var(--accent)) 12%, transparent);
  color: var(--gate-color, var(--accent));
  font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 10px;
}
