:root {
  --bg: #f6f4ed;
  --surface: #fffefa;
  --ink: #192d3b;
  --muted: #566570;
  --line: #dedfd7;
  --accent: #b84122;      /* linha do quiz */
  --accent-soft: #f9e9df;
  --accent-ink: #ffffff;
  --brand: #0d47a1;       /* resultado */
  --brand-deep: #082c66;
  --sun: #ffd23f;
  --hl: #fff1b8;
  --hl-chosen: #ffd23f;
  --hl-ink: #16213a;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(22, 33, 58, .06), 0 8px 24px -12px rgba(22, 33, 58, .18);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151f;
    --surface: #1a2030;
    --ink: #eef0f5;
    --muted: #a3aabb;
    --line: #2b3346;
    --accent: #ff7a50;
    --accent-soft: #34251f;
    --brand: #1b5fd1;
    --brand-deep: #0a2a5e;
    --hl: #4a4220;
    --hl-chosen: #ffd23f;
    --hl-ink: #fff6d6;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .hl-chosen { color: #16213a; }
}
:root[data-theme="dark"] {
  --bg: #11151f; --surface: #1a2030; --ink: #eef0f5; --muted: #a3aabb; --line: #2b3346;
  --accent: #ff7a50; --accent-soft: #34251f; --brand: #1b5fd1; --brand-deep: #0a2a5e; --hl: #4a4220; --hl-chosen: #ffd23f; --hl-ink: #fff6d6;
  color-scheme: dark;
}
:root[data-theme="dark"] .hl-chosen { color: #16213a; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(80px + env(safe-area-inset-top)); scroll-padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.05; }

.screen { display: none; }
.screen.is-active { display: block; }

.kicker {
  font: 600 11px/1.5 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---------- Botões ---------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  min-height: 52px;
  font: 600 16px/1.3 var(--font-body);
  touch-action: manipulation;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
a.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost {
  appearance: none; border: 0; background: none; color: var(--ink);
  font: 600 22px/1 var(--font-body); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex: none;
}
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }
[hidden] { display: none !important; }
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { transform: translateY(-2px); }
  .btn-secondary:hover, .btn-ghost:hover { background: var(--line); }
}

/* ---------- Home ---------- */
.home-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(32px, 7vh, 76px) 20px 48px;
  display: grid; gap: 32px; align-items: center;
}
.home-intro > .kicker { display: flex; align-items: center; gap: 8px; color: var(--accent); margin-bottom: 24px; }
.route-mark { width: 14px; height: 14px; border: 4px solid currentColor; border-radius: 50%; }
.home-eyebrow { color: var(--muted); margin: 0 0 12px; font-size: 13px; }
.home-title {
  font-size: clamp(54px, 13vw, 86px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .96;
}
.home-title .rj {
  color: var(--accent);
}
.home-lede {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  max-width: 28em;
  margin: 24px 0 28px;
}
.home-start .btn { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.home-start .btn > span { font-size: 22px; font-weight: 400; }
.home-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.home-meta span + span::before { content: "·"; margin-right: 12px; }
.route-card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.route-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.route-card-head .kicker { margin-bottom: 8px; }
.route-card-head h2 { font-size: 22px; line-height: 1.15; letter-spacing: -.025em; }
.route-total { color: var(--accent); font: 700 44px/1 var(--font-display); letter-spacing: -.04em; }
.route-note { border-top: 1px dashed var(--line); padding-top: 18px; margin: 22px 0 0; font-size: 12px; color: var(--muted); }

.line-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
  position: relative;
}
.line-preview li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.line-preview .dot {
  flex: none;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600;
}
.lp-stop { display: grid; gap: 4px; }
.lp-name { line-height: 1.35; }
.lp-theme { font-size: 11px; line-height: 1.3; color: var(--muted); }
@media (min-width: 800px) {
  .home-inner { grid-template-columns: 1fr 1fr; gap: 64px; min-height: 82svh; }
  .home-start { max-width: 350px; }
  .route-card { padding: 28px; }
}

/* ---------- Quiz ---------- */
.screen-quiz { max-width: 720px; margin: 0 auto; padding: 0 20px; min-height: 100dvh; }
.screen-quiz.is-active { display: flex; flex-direction: column; }
.quiz-head {
  padding: max(8px, env(safe-area-inset-top)) 0 18px;
  position: sticky; top: 0; background: var(--bg); z-index: 2; border-bottom: 1px solid var(--line);
}
.quiz-head-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.quiz-head .btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.quiz-route-title { flex: 1; font: 500 13px/1.3 var(--font-body); color: var(--muted); }
.quiz-count { font: 600 12px/1 var(--font-body); color: var(--ink); border-radius: 99px; background: var(--surface); padding: 8px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.track { position: relative; height: 12px; margin: 0 4px; }
.track::before, .track-fill {
  content: ""; position: absolute; left: 7px; right: 7px; top: 5px; height: 4px; border-radius: 4px;
}
.track::before { background: var(--line); }
.track-fill { right: auto; background: var(--accent); transition: width .4s ease; max-width: calc(100% - 14px); }
.track-stops {
  list-style: none; margin: 0; padding: 0;
  position: absolute; inset: 0; display: flex; justify-content: space-between;
}
.track-stops li {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 3px var(--line);
  transition: box-shadow .3s, background .3s, transform .3s;
}
.track-stops li.done { background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }
.track-stops li.now { box-shadow: inset 0 0 0 3px var(--accent); transform: scale(1.3); }

.quiz-body { flex: 1; padding: 24px 0; }
.quiz-body.enter { animation: slide .18s ease both; }

.q-station { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.q-badge {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent);
  font: 600 10px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 6px;
}
.q-prompt {
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.16;
  margin-bottom: 12px;
}

.q-instruction { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.q-options { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-option-list { display: grid; gap: 10px; }
.opt {
  display: block; position: relative; cursor: pointer; touch-action: manipulation;
  scroll-margin: 24px 0 0;
}
.opt-content {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 15px 14px; min-height: 72px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  font: 500 16px/1.4 var(--font-body);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.opt-text { flex: 1; }
.opt-key {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font: 700 12px/1 var(--font-display);
  background: var(--bg); color: var(--muted);
  transition: background .15s, color .15s;
}
.opt-indicator { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 50%; }
.opt input:checked + .opt-content { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.opt input:checked + .opt-content .opt-key { background: var(--accent); color: var(--bg); }
.opt input:checked + .opt-content .opt-indicator { border: 5px solid var(--accent); background: var(--surface); }
.opt input:focus-visible + .opt-content { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (hover: hover) { .opt:hover .opt-content { border-color: var(--accent); } }
.quiz-navigation { position: sticky; bottom: 0; z-index: 2; padding: 12px 0 max(14px, env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.quiz-hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); text-align: center; }
.quiz-navigation .btn { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 12px; }
.quiz-navigation .btn > span:last-child { font-size: 22px; font-weight: 400; }
@media (min-width: 720px) {
  .quiz-navigation { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .quiz-navigation .btn { width: auto; min-width: 220px; }
  .quiz-hint { margin: 0; text-align: left; }
}

/* ---------- Loading ---------- */
.screen-loading.is-active { display: grid; place-items: center; min-height: 80dvh; padding: 16px; }
.loading-inner { text-align: center; }
.loading-text { font: 600 20px/1.3 var(--font-display); max-width: 18em; margin: 24px auto 0; }
.loading-dots { display: flex; gap: 10px; justify-content: center; }
.loading-dots span {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  animation: bounce 1s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }

/* ---------- Resultado ---------- */
.reveal {
  background: radial-gradient(120% 90% at 85% 0%, var(--brand) 0%, var(--brand-deep) 70%);
  color: #fff;
  padding: clamp(32px, 5vh, 52px) 20px 32px;
  padding-top: max(clamp(32px, 5vh, 52px), calc(env(safe-area-inset-top) + 20px));
  text-align: center;
  overflow: hidden;
}
.kicker-light { color: rgba(255,255,255,.7); }
.reveal-pre { font-size: 15px; margin: 0 0 12px; color: rgba(255,255,255,.85); }
.reveal-name {
  font-size: clamp(44px, 11vw, 88px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--sun);
  animation: rise .7s cubic-bezier(.2,.9,.3,1.2) both;
}
/* Lei 9.504/97, art. 36 § 4º: nome da vice com no mínimo 30% do tamanho do titular (aqui ~33–35%). */
.reveal-vice {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(16px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--sun);
}
.reveal-vice span { font-family: var(--font-body); font-size: .45em; font-weight: 600; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .08em; }
.reveal-sub { margin: 10px 0 0; font-size: 14px; color: rgba(255,255,255,.9); }
.reveal-sub strong { color: var(--sun); }
.match { max-width: 360px; margin: 22px auto 0; }
.match-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.match-fill { height: 100%; width: 0; background: var(--sun); border-radius: 99px; transition: width 1.2s cubic-bezier(.2,.8,.2,1) .3s; }
.match-fill.full { width: 100%; }
.match-text { margin: 10px 0 0; font-size: 14px; }
.match-text strong { color: var(--sun); }
.reveal-date {
  display: inline-block; margin: 20px 0 0; padding: 8px 14px; border-radius: 99px;
  background: rgba(255,255,255,.12); font-size: 13px;
}

.result-nav { position: sticky; top: 0; z-index: 3; display: flex; justify-content: center; gap: 4px; padding: max(6px, env(safe-area-inset-top)) 12px 6px; background: var(--surface); border-bottom: 1px solid var(--line); }
.result-nav a { flex: 1; max-width: 180px; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 10px 8px; border-radius: 99px; text-decoration: none; font-size: 12px; font-weight: 600; text-align: center; white-space: nowrap; }
.result-nav a:first-child { color: var(--accent); background: var(--accent-soft); }
@media (hover: hover) { .result-nav a:hover { background: var(--line); } }
.result-body { max-width: 860px; margin: 0 auto; padding: 0 20px 40px; }
.block { padding: 36px 0 8px; }
.block-title { font-size: clamp(27px, 5vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.block-lede { color: var(--muted); margin: 10px 0 24px; max-width: 40em; font-size: 15px; }
.block > .kicker { margin-bottom: 10px; }
.legend { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: 4px; font-size: 14px; }

/* Compartilhar imagens */
.sr-only, .share-card input, .opt input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.block-share { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.share-picker { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.share-card { position: relative; min-width: 0; cursor: pointer; }
.share-card-content {
  display: block; padding: 5px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.share-card img { display: block; width: 100%; height: auto; border-radius: 8px; }
.share-card-label { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 2px 7px; font-weight: 600; }
.share-radio { flex: none; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 50%; }
.share-card input:checked + .share-card-content { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.share-card input:checked + .share-card-content .share-radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
@media (hover: hover) { .share-card:hover .share-card-content { border-color: var(--accent); } }
.share-card input:focus-visible + .share-card-content { outline: 3px solid var(--accent); outline-offset: 5px; }
.share-selection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 8px; margin: 8px 0; font-size: 12px; }
.share-selection p { margin: 0; }
.share-text-button { background: none; border: 0; padding: 12px 0; min-height: 44px; color: var(--ink); font: 600 12px/1.4 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.share-include { display: flex; align-items: center; gap: 10px; width: fit-content; min-height: 44px; margin-bottom: 12px; font-size: 14px; cursor: pointer; }
.share-include input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.share-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.share-status { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
#share:disabled { cursor: wait; }
.share-link-box { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.share-link-box > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.share-link-row { display: flex; align-items: center; gap: 10px; }
.share-link-row input { min-width: 0; flex: 1; width: 100%; height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 400 16px/1.4 var(--font-body); }
.share-link-row .btn { flex: none; min-height: 48px; font-size: 13px; padding: 12px 14px; }
.share-link-box p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.share-help { margin-top: 6px; }
.share-help summary { padding: 12px 0; min-height: 44px; color: var(--muted); font-size: 12px; cursor: pointer; }
.share-help p { margin-top: 0; }
.share-preview { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.share-preview::backdrop { background: rgba(0, 0, 0, .8); }
.share-preview-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--surface); }
.share-preview-head h2 { font-size: 22px; }
.share-preview img { display: block; width: 100%; height: auto; }
body:has(.share-preview[open]) { overflow: hidden; }
.block-share [hidden] { display: none; }
@media (max-width: 560px) {
  .share-picker { gap: 8px; }
  .share-card-content { padding: 3px; border-radius: 10px; }
  .share-card-label { gap: 4px; font-size: 11px; padding: 10px 0 5px; }
  .share-radio { width: 14px; height: 14px; }
  .share-actions { flex-direction: column; }
  .share-link-box { padding: 14px; }
  .share-link-row { gap: 8px; }
}

.hl {
  background: var(--hl); color: var(--hl-ink);
  padding: .08em .3em; border-radius: 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-chosen { background: var(--hl-chosen); color: #16213a; font-weight: 600; }

/* Suas escolhas */
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.choice {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.choice summary { list-style: none; padding: 18px; cursor: pointer; }
.choice summary::-webkit-details-marker, .result-details > summary::-webkit-details-marker { display: none; }
.choice[open] { border-color: var(--accent); }
.choice[open] .choice-chevron { transform: rotate(180deg); }
.choice-meta { margin: 0 0 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice-text { display: block; font: 600 16px/1.45 var(--font-body); }
.choice-hint { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 12px; color: var(--muted); }
.choice-chevron { font-size: 20px; line-height: 1; }
.pd { margin: 0 18px 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.pd > div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; font-size: 15px; }
.pd dt { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.pd dd { margin: 0; }
.src { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; text-underline-offset: 3px; }
@media (max-width: 480px) {
  .pd > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Todas as opções */
.result-details { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.result-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px; list-style: none; cursor: pointer; }
.detail-eyebrow { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.detail-title { font: 700 clamp(19px, 3vw, 24px)/1.15 var(--font-display); letter-spacing: -.02em; }
.detail-toggle { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); font-size: 24px; line-height: 1; }
.result-details[open] .detail-toggle { transform: rotate(45deg); }
.result-details-body { padding: 0 20px 24px; }
.all-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.group-title { font: 600 15px/1.4 var(--font-body); color: var(--muted); margin-bottom: 14px; }
.group-title .q-badge { margin-right: 6px; }
.group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.group-list li { display: grid; gap: 4px; font-size: 16px; line-height: 1.45; }
.group-list li.is-chosen { order: -1; }
.group-plan { font-size: 13px; color: var(--muted); }

/* Histórico */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; margin-bottom: 40px; }
.stat {
  background: var(--brand); color: #fff; border-radius: var(--radius); padding: 20px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-v { font: 800 clamp(30px, 5vw, 40px)/1 var(--font-display); color: var(--sun); letter-spacing: -.03em; }
.stat-l { font-size: 14px; line-height: 1.35; color: rgba(255,255,255,.88); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 32px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 3px; background: var(--line); border-radius: 3px; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 4px var(--brand);
}
.tl-when { font: 700 14px/1 var(--font-body); color: var(--brand); letter-spacing: .04em; }
:root[data-theme="dark"] .tl-when { color: #7fb0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-when { color: #7fb0ff; } }
.tl-title { font-size: 22px; font-weight: 700; margin: 8px 0 10px; letter-spacing: -.015em; }
.tl-item ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }

/* CTA */
.block-cta { text-align: center; padding-top: 40px; }
.cta-big { font: 800 clamp(28px, 6vw, 40px)/1.15 var(--font-display); letter-spacing: -.03em; margin: 0 0 24px; }
.cta-big .num { background: var(--sun); color: #16213a; padding: 0 .2em; border-radius: 8px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-links { margin-top: 24px; font-size: 13px; color: var(--muted); line-height: 1.8; }
@media (max-width: 560px) {
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
}

/* ---------- Rodapé / toast ---------- */
.legal {
  font-size: 12px; line-height: 1.7; color: var(--muted); text-align: center;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}
.legal a { text-underline-offset: 3px; }

.toast {
  max-width: calc(100% - 32px); width: max-content; text-align: center; z-index: 5;
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 99px;
  font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animações ---------- */
@keyframes slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-12px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .match-fill { width: 100%; }
}

@media (max-width: 359px) {
  .home-inner, .result-body { padding-left: 16px; padding-right: 16px; }
  .screen-quiz { padding: 0 16px; }
  .route-card { padding: 18px; }
  .route-card-head { gap: 8px; }
  .route-total { font-size: 36px; }
  .quiz-route-title { font-size: 12px; }
  .opt-content { gap: 8px; padding: 14px 10px; font-size: 15px; }
  .opt-key { width: 24px; height: 26px; }
  .result-nav { padding-left: 8px; padding-right: 8px; gap: 2px; }
  .result-nav a { padding: 10px; font-size: 12px; }
  .result-nav a > span { display: none; }
}

@media (forced-colors: active) {
  .opt input:checked + .opt-content, .share-card input:checked + .share-card-content { outline: 3px solid Highlight; }
  .opt-indicator, .share-radio { forced-color-adjust: none; }
}

/* Preserva os controles fora do recorte da tela, inclusive em paisagem. */
@supports (padding: max(0px, 1px)) {
  .home-inner, .screen-quiz, .result-body, .reveal, .legal {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .result-nav {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  @media (max-width: 359px) {
    .home-inner, .screen-quiz, .result-body { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  }
}
