:root {
  /* Tema padrão: branco e azul */
  --bg: #F8F9FB;
  --surface: #FFFFFF;
  --fg: #111827;
  --muted: #374151;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --accent: #153d97;
  --accent-hover: #103076;
  --accent-light: #DBEAFE;
  --accent-soft: #EFF6FF;
  --success: #14532d;
  --success-light: #D1FAE5;
  --success-soft: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #881b1b;
  --danger-light: #FEE2E2;

  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
}

/* Modo daltônico: amarelo dourado original do MODALE */
#app.colorblind {
  --accent: #63480d;
  --accent-hover: #4d3708;
  --accent-light: #F5EAC8;
  --accent-soft: #FBF5E3;
  --success: #14532d;
  --success-light: #BBF7D0;
  --success-soft: #F0FDF4;
}

/* ============================================================================
   Telas revisadas (2026): mesmas medidas dos frames de 393 px do case.
   1rem = 16 px em 393 px de largura; o aparelho inteiro escala junto.
   ========================================================================== */

/* Paleta alternativa (azul): usada quando o modo daltônico é desligado. */
#app {
  --m-head: #10295f;
  --m-ink: #0c1f47;
  --m-soft: #dbe7fb;
  --m-solid: #153d97;
  --m-solid-ink: #ffffff;
  --m-head-btn: #24418a;
  --m-line: #c9d3e6;
  --m-muted: #3b4760;
  --m-page: #ffffff;
}
/* Dourado e marrom das telas do Modale. */
#app.colorblind {
  --m-head: #4d2800;
  --m-ink: #3d2000;
  --m-soft: #ffe4a0;
  --m-solid: #5d4812;
  --m-solid-ink: #fff3d1;
  --m-head-btn: #674218;
  --m-line: #dcd6cb;
  --m-muted: #5a4a2f;
  --m-page: #ffffff;
}
#app.high-contrast {
  --m-line: #3d2000;
  --m-muted: #2b1700;
  --m-solid: #3d2c05;
}
#app.high-contrast:not(.colorblind) { --m-line: #0c1f47; --m-muted: #0c1f47; --m-solid: #0f2c6e; }

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(13px, calc(100vw / 393 * 16), 17.500px); height: 100%; }
body {
  height: 100%;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #efe9dc;
  color: #3d2000;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 1.250rem; height: 1.250rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--m-ink); outline-offset: 3px; }
.app-header :focus-visible, .pass:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--m-ink); }

.demo-banner { flex: 0 0 auto; background: #f8f2e4; color: #171c17; padding: 10px max(16px, calc((100vw - 720px) / 2)); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; border-bottom: 1px solid #374151; font-size: 14px; }
.demo-banner a { color: #035338; min-height: 36px; display: inline-flex; align-items: center; font-weight: 700; }
.demo-banner p { color: #374151; font-size: 13px; }

.phone-frame { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 430px; align-self: center; position: relative; overflow: hidden; background: var(--bg); }
#app { width: 100%; height: 100%; position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--m-page); color: var(--m-ink); }

/* -- Cabeçalho ------------------------------------------------------------ */
.app-header { flex: none; background: var(--m-head); color: #fff; padding: 0.875rem 1.250rem 1.125rem; border-radius: 0 0 2.250rem 2.250rem; }
.status-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 0.625rem 0 0.625rem; height: 1.625rem; font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.01em; }
.status-icons { display: flex; align-items: center; gap: 0.375rem; }
.status-icons svg { fill: currentColor; height: 0.8125rem; width: auto; }
#app:not(.colorblind) .battery-cells { fill: var(--m-head); }
.profile-row { display: flex; align-items: center; gap: 0.625rem; margin-top: 1.125rem; }
.avatar { width: 4.125rem; height: 4.125rem; border-radius: 50%; flex: none; margin-left: -0.250rem; }
.profile-text { flex: 1; min-width: 0; }
.hello { font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
.updated { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.250rem; font-size: 0.8125rem; color: #f3e3bf; white-space: nowrap; }
.updated-icon { width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--m-head-btn); display: grid; place-items: center; }
.updated-icon .ic { width: 0.750rem; height: 0.750rem; color: var(--m-soft); }
.header-actions { display: flex; gap: 0.375rem; }
.head-btn { position: relative; width: 2.375rem; height: 2.375rem; border-radius: 50%; background: var(--m-head-btn); color: var(--m-soft); display: grid; place-items: center; }
.head-btn::before { content: ''; position: absolute; inset: -0.250rem; }
.head-btn .ic { width: 1.125rem; height: 1.125rem; }
.head-btn.has-dot::after { content: ''; position: absolute; top: 0.4375rem; right: 0.5rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--m-soft); }

/* -- Telas ---------------------------------------------------------------- */
.screens { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior-y: contain; padding: 1.250rem 1.250rem 7.250rem; }
.screens::-webkit-scrollbar { display: none; }
.screen { display: none; flex-direction: column; animation: fadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.screen.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.date { font-size: 0.8125rem; font-weight: 500; color: var(--m-solid); }
.title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; color: var(--m-ink); }
.title:focus { outline: none; }
#home-title { margin-top: 0.375rem; }
.kicker { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--m-solid); line-height: 1.2; }
.kicker-strong { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; }
.place { font-size: 1rem; font-weight: 600; color: #0f0a02; line-height: 1.25; margin-top: 0.125rem; }

/* -- Botões --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.750rem; padding: 0 1rem; border-radius: 1rem; font-size: 0.9375rem; font-weight: 700; white-space: nowrap; transition: transform 0.1s ease, background 0.15s ease; }
.btn:active { transform: scale(0.97); }
.btn .ic { width: 1.125rem; height: 1.125rem; stroke-width: 2.400; }
.btn-solid { background: var(--m-solid); color: var(--m-solid-ink); }
.btn-solid.is-on { background: var(--m-head); }
.btn-outline { background: #fff; color: var(--m-ink); box-shadow: inset 0 0 0 1.500px var(--m-solid); }
.btn-ghost { color: var(--m-solid); }
.btn-block { width: 100%; }
.btn-fab { border-radius: 1.500rem; min-height: 2.875rem; padding: 0 1.125rem; font-size: 1rem; box-shadow: 0 0.5rem 1rem rgba(77, 40, 0, 0.22); }
.link-btn { display: inline-flex; align-items: center; gap: 0.125rem; min-height: 2.750rem; font-size: 0.9375rem; font-weight: 500; color: var(--m-solid); }
.link-btn .ic { width: 1.125rem; height: 1.125rem; }

/* -- Cartão de rota ------------------------------------------------------- */
.route-card { display: grid; grid-template-columns: 1fr auto; gap: 0.750rem; align-items: center; margin-top: 0.875rem; padding: 0.9375rem 0.875rem 0.9375rem 1.125rem; border-radius: 1.500rem; background: var(--m-soft); }
.route-points { position: relative; display: grid; gap: 0.750rem; min-width: 0; }
.route-point { display: flex; align-items: flex-start; gap: 0.6875rem; }
.route-point-dest { padding-top: 0.750rem; border-top: 1px solid rgba(93, 72, 18, 0.28); margin-left: 1.9375rem; }
.route-point-dest .route-ic { margin-left: -1.9375rem; }
.route-ic { color: var(--m-solid); margin-top: 0.250rem; }
.route-ic-pin { fill: var(--m-solid); stroke: var(--m-soft); stroke-width: 1.500; }
.route-dash { position: absolute; left: 0.5625rem; top: 1.750rem; height: 1.500rem; border-left: 2px dashed var(--m-solid); opacity: 0.7; }
.route-actions { display: grid; gap: 0.5625rem; width: 7.375rem; }
.route-actions .btn { padding: 0 0.5rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.625rem; }
.chip { display: inline-flex; align-items: center; gap: 0.375rem; height: 1.750rem; padding: 0 0.625rem; border: 1px solid var(--m-line); border-radius: 1rem; font-size: 0.8125rem; font-weight: 500; color: #0f0a02; white-space: nowrap; }
.chip .ic { width: 0.9375rem; height: 0.9375rem; color: var(--m-solid); }

.section-row { display: flex; align-items: center; justify-content: space-between; margin-top: 1.125rem; }

/* -- Tickets e cartões ---------------------------------------------------- */
.pass { display: flex; flex-direction: column; justify-content: space-between; gap: 0.750rem; width: 100%; min-height: 7.125rem; margin-top: 0.625rem; padding: 0.875rem 1rem; border-radius: 1.375rem; text-align: left; color: #fff; position: relative; overflow: hidden; }
.section-row + .pass { margin-top: 0.375rem; }
.pass-short { min-height: 6.375rem; gap: 0.250rem; }
.pass-top { display: flex; align-items: flex-start; gap: 0.6875rem; }
.pass-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.750rem; }
.pass-badge { width: 2.125rem; height: 2.125rem; flex: none; border-radius: 50%; background: #ffe4a0; color: #4d2800; display: grid; place-items: center; }
.pass-badge .ic { width: 1.125rem; height: 1.125rem; }
.pass-name { flex: 1; min-width: 0; display: grid; }
.pass-name strong { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.pass-name small { font-size: 0.8125rem; opacity: 0.86; margin-top: 0.125rem; }
.pass-nfc { width: 1.250rem; height: 1.250rem; margin-top: 0.375rem; }
.pass-value { display: grid; }
.pass-value small { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.86; }
.pass-value strong { font-size: 1.3125rem; font-weight: 700; line-height: 1.1; }
.pass-number { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.12em; }
.pass-vem { background: radial-gradient(circle at 78% 50%, #1f6a3c 0 34%, #2f7b4b 34.300% 41%, transparent 41.300%), linear-gradient(120deg, #2a7646, #22693d); }
.pass-infinit { color: #0f0a02; background: linear-gradient(115deg, #f9cfe6 0%, #eef0f9 30%, #f4fbf9 52%, #c9efe8 78%, #d6d0ff 100%); }
.pass-infinit::after { content: ''; position: absolute; inset: 45% -10% -40% 30%; background: radial-gradient(closest-side, rgba(196, 184, 255, 0.85), transparent); pointer-events: none; }
.pass-infinit > * { position: relative; z-index: 1; }
.pass-infinit .pass-badge { background: #5d4812; color: #ffe4a0; }
.pass-nubank { background: linear-gradient(120deg, #9a2de6, #7411bd); }
.pass-inter { background: linear-gradient(120deg, #f17c13, #d45d02); }
.pass-static { cursor: default; }
.fab-row { display: flex; justify-content: flex-end; margin-top: 0.750rem; }

/* -- Viagem --------------------------------------------------------------- */
.trip-grid { display: grid; grid-template-columns: 1fr 7.750rem; gap: 0.625rem; align-items: stretch; }
.trip-main { display: flex; flex-direction: column; min-width: 0; }
.select-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5rem; height: 2.500rem; min-height: 2.750rem; padding: 0 0.750rem 0 0.5625rem; border: 1.500px solid var(--m-line); border-radius: 1.375rem; font-size: 0.9375rem; font-weight: 700; color: var(--m-ink); }
.select-chip-ic { width: 1.625rem; height: 1.625rem; border-radius: 50%; background: var(--m-soft); display: grid; place-items: center; }
.select-chip .ic { width: 1rem; height: 1rem; }
.route-card-compact { grid-template-columns: 1fr; margin-top: 0.625rem; flex: 1; }
.trip-ticket { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.750rem 0.625rem 0.625rem; border-radius: 1.500rem; background: var(--m-soft); text-align: left; }
.trip-ticket-label { display: flex; align-items: center; gap: 0.375rem; padding-left: 0.250rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--m-solid); }
.trip-ticket-label .ic { width: 0.9375rem; height: 0.9375rem; }
.trip-ticket-card { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 2.250rem; padding: 0.625rem; border-radius: 1rem; color: #fff; background: linear-gradient(180deg, #2a7646, #1f6a3c 55%, #24703f); }
.trip-ticket-card strong { font-size: 0.9375rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.trip-ticket-card small { font-size: 0.750rem; letter-spacing: 0.04em; }
.trip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin-top: 0.625rem; }
.trip-actions .btn { font-size: 1rem; }
.map { position: relative; margin-top: 0.750rem; border-radius: 1.500rem; overflow: hidden; background: #ece9e2; }
.map img { display: block; width: 100%; height: auto; }
.map-info { position: absolute; top: 0.625rem; left: 0.625rem; display: flex; background: #fff; border-radius: 1rem; padding: 0.5625rem 0.250rem; min-width: 9.625rem; box-shadow: 0 0.250rem 0.750rem rgba(0, 0, 0, 0.08); }
.map-info span { display: grid; padding: 0 0.750rem; }
.map-info span + span { border-left: 1px solid #d8d4cc; }
.map-info strong { font-size: 1.0625rem; font-weight: 700; color: #0f0a02; letter-spacing: -0.02em; white-space: nowrap; }
.map-info small { font-size: 0.8125rem; color: #453a28; white-space: nowrap; }
.map-full .trip-grid { display: none; }
.map-full .trip-actions { margin-top: 0; }
.demo-note { margin-top: 0.625rem; font-size: 0.750rem; line-height: 1.45; color: var(--m-muted); }

/* -- Carteira e Rotas ----------------------------------------------------- */
.page-head { display: flex; align-items: center; gap: 0.750rem; min-height: 2.875rem; }
.page-head .title { flex: 1; font-size: 1.500rem; }
.back-btn { width: 2.750rem; height: 2.750rem; flex: none; border-radius: 50%; border: 1.500px solid var(--m-line); display: grid; place-items: center; color: var(--m-ink); margin-left: -0.125rem; }
.group-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 1rem; font-size: 0.8125rem; color: #0f0a02; }
.group-row + .pass { margin-top: 0.500rem; }

.section-label { margin-top: 1.250rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--m-muted); }
.planner { margin-top: 0.875rem; }
.planner-card { display: grid; grid-template-columns: 1fr auto; gap: 0.750rem; align-items: center; padding: 0.625rem 0.875rem 0.625rem 1.125rem; border: 1.500px solid var(--m-line); border-radius: 1.500rem; background: #fff; box-shadow: 0 0.250rem 0.875rem rgba(77, 40, 0, 0.06); transition: border-color 0.15s; }
.planner-card:focus-within { border-color: var(--m-solid); }
.planner-points { display: grid; min-width: 0; }
.planner-field { display: flex; align-items: center; gap: 0.750rem; }
.planner-field input { flex: 1; min-width: 0; min-height: 2.750rem; border: 0; background: transparent; padding: 0; font-size: 1rem; font-weight: 600; color: #0f0a02; outline: 0; }
.planner-field input::placeholder { color: var(--m-muted); font-weight: 500; opacity: 1; }
.planner-field:focus-within .route-dot { box-shadow: 0 0 0 0.250rem var(--m-soft); }
.route-dot { width: 0.625rem; height: 0.625rem; flex: none; border-radius: 50%; background: var(--m-solid); transition: box-shadow 0.15s; }
.route-dot-dest { background: #8a1c1c; }
.planner-line { width: 0; height: 0.875rem; margin: -0.375rem 0 -0.375rem 0.250rem; border-left: 2px solid var(--m-line); }
.swap-btn { width: 2.750rem; height: 2.750rem; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.500px var(--m-solid); display: grid; place-items: center; color: var(--m-ink); transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.swap-btn:active { transform: rotate(180deg); }
.suggestions { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.625rem; animation: fadeIn 0.2s ease-out; }
.suggestion { display: inline-flex; align-items: center; gap: 0.250rem; min-height: 2.250rem; padding: 0 0.750rem 0 0.5rem; border-radius: 1.125rem; background: var(--m-soft); font-size: 0.8125rem; font-weight: 600; color: var(--m-ink); }
.suggestion .ic { width: 0.875rem; height: 0.875rem; color: var(--m-solid); }
.modes { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.mode-chip { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.750rem; padding: 0 0.875rem; border: 1.500px solid var(--m-line); border-radius: 1.375rem; font-size: 0.875rem; font-weight: 600; color: var(--m-muted); transition: background 0.15s, border-color 0.15s; }
.mode-chip .ic { width: 1rem; height: 1rem; }
.mode-chip.active { background: var(--m-soft); border-color: var(--m-solid); color: var(--m-ink); }

.results .section-label { margin-top: 1.125rem; }
.results-sum { font-size: 0.8125rem; color: var(--m-muted); margin-top: 0.250rem; }
.result-list { display: grid; gap: 0.625rem; margin-top: 0.5rem; }
.result-list li { animation: fadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(var(--n, 0) * 60ms); }
.result { display: grid; gap: 0.625rem; width: 100%; padding: 0.875rem 1rem; border: 1.500px solid var(--m-line); border-radius: 1.375rem; background: #fff; text-align: left; box-shadow: 0 0.250rem 0.875rem rgba(77, 40, 0, 0.06); transition: border-color 0.15s, transform 0.1s; }
.result:hover { border-color: var(--m-solid); }
.result:active { transform: scale(0.985); }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.750rem; }
.result-main { display: grid; justify-items: start; gap: 0.125rem; }
.badge { display: inline-block; padding: 0.1875rem 0.5rem; border-radius: 0.750rem; background: var(--m-soft); color: var(--m-ink); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.badge-alt { background: #dff3e6; color: #124a27; }
.result-time { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.03em; color: #0f0a02; line-height: 1.1; }
.result-price { font-size: 1.0625rem; font-weight: 800; color: var(--m-solid); white-space: nowrap; }
.result-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; font-size: 0.8125rem; color: var(--m-muted); }
.result-modes { display: flex; gap: 0.250rem; }
.mode-icon { width: 1.750rem; height: 1.750rem; border-radius: 0.5rem; background: var(--m-soft); color: var(--m-ink); display: grid; place-items: center; }
.mode-icon .ic { width: 1rem; height: 1rem; }
.result-hint { margin-top: 1.125rem; padding: 0.875rem 1rem; border-radius: 1rem; background: color-mix(in srgb, var(--m-soft) 45%, #fff); color: var(--m-ink); font-size: 0.875rem; line-height: 1.45; }

/* Rota escolhida */
#screen-route .map { margin-top: 0.750rem; }
.btn-start { margin-top: 0.750rem; min-height: 3.250rem; font-size: 1.0625rem; }
.steps { display: grid; gap: 0.5rem; margin-top: 0.625rem; }
.step { display: flex; align-items: flex-start; gap: 0.625rem; }
.step .ic { width: 1.750rem; height: 1.750rem; padding: 0.375rem; border-radius: 0.5rem; background: var(--m-soft); color: var(--m-ink); }
.step span { display: grid; }
.step strong { font-size: 0.875rem; font-weight: 700; color: #0f0a02; }
.step small { font-size: 0.8125rem; color: var(--m-muted); line-height: 1.35; }

/* -- Navegação inferior --------------------------------------------------- */
.bottom-nav { position: absolute; left: 1rem; right: 1rem; bottom: 1.625rem; height: 4.375rem; padding: 0.375rem; border-radius: 1.750rem; background: var(--m-soft); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.250rem; box-shadow: 0 0.5rem 1.250rem rgba(77, 40, 0, 0.16); z-index: 5; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.250rem; border-radius: 1.375rem; font-size: 0.750rem; font-weight: 500; color: var(--m-ink); transition: background 0.2s, color 0.2s; }
.nav-item .ic { width: 1.250rem; height: 1.250rem; }
.nav-item.active { background: var(--m-head); color: var(--m-soft); }
#app.large-icons .nav-item .ic { width: 1.625rem; height: 1.625rem; }
#app.large-icons .nav-item { font-size: 0.6875rem; gap: 0.125rem; }

/* -- Painéis -------------------------------------------------------------- */
dialog.sheet { width: 100%; max-width: 430px; margin: auto auto 0; border: 0; padding: 1.250rem 1.250rem 1.750rem; border-radius: 1.750rem 1.750rem 0 0; background: #fff; color: #3d2000; max-height: 88%; overflow-y: auto; }
dialog.sheet[open] { display: grid; gap: 0.750rem; animation: sheetIn 0.26s cubic-bezier(0.22, 1, 0.36, 1); }
dialog.sheet-center { margin: auto; width: calc(100% - 2rem); border-radius: 1.750rem; }
dialog.sheet::backdrop { background: rgba(38, 20, 0, 0.55); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
#buy-section, .success-box { display: grid; gap: 0.750rem; }
.sheet .title { color: #3d2000; }
.sheet-sub, .sheet-hint, .success-box p { font-size: 0.875rem; line-height: 1.45; color: #5a4a2f; }
.nfc-card { margin-top: 0; min-height: 9rem; }
.options { display: grid; gap: 0.5rem; }
.ticket-option { display: flex; align-items: center; justify-content: space-between; gap: 0.750rem; min-height: 3.500rem; padding: 0.625rem 0.875rem; border: 1.500px solid #dcd6cb; border-radius: 1rem; text-align: left; }
.ticket-option span, .pay-row span, .toggle-row span { display: grid; }
.ticket-option strong, .pay-row strong, .toggle-row strong { font-size: 0.9375rem; font-weight: 700; color: #0f0a02; }
.ticket-option small, .pay-row small, .toggle-row small { font-size: 0.8125rem; color: #5a4a2f; }
.ticket-option b { font-size: 1rem; font-weight: 800; white-space: nowrap; }
.ticket-option.selected { border-color: #5d4812; background: #fff3d1; box-shadow: inset 0 0 0 1px #5d4812; }
.pay-row { display: flex; align-items: center; gap: 0.750rem; padding: 0.625rem 0.250rem; }
.success-box { justify-items: center; text-align: center; }
.success-icon { width: 3.500rem; height: 3.500rem; border-radius: 50%; background: #22693d; color: #fff; display: grid; place-items: center; }
.success-icon .ic { width: 1.750rem; height: 1.750rem; stroke-width: 3; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid #e8e2d6; }
.toggle-switch { position: relative; flex: none; width: 3.250rem; height: 2.750rem; border-radius: 1.375rem; }
.toggle-switch::before { content: ''; position: absolute; left: 0; right: 0; top: 0.4375rem; height: 1.875rem; border-radius: 1rem; background: #8a8377; transition: background 0.2s; }
.toggle-switch::after { content: ''; position: absolute; top: 0.625rem; left: 0.1875rem; width: 1.500rem; height: 1.500rem; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle-switch.on::before { background: #22693d; }
.toggle-switch.on::after { transform: translateX(1.375rem); }
dialog.sheet :focus-visible { outline: 3px solid #3d2000; outline-offset: 3px; box-shadow: none; }

/* -- Toast ---------------------------------------------------------------- */
.toast { position: absolute; left: 1rem; right: 1rem; bottom: 6.625rem; padding: 0.750rem 1rem; border-radius: 1rem; background: #1c1203; color: #fff; font-size: 0.875rem; font-weight: 500; text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 20; }
.toast.show { opacity: 1; transform: none; }

/* -- Incorporada no modal do case ----------------------------------------- */
body.is-embedded { background: var(--bg); }
body.is-embedded .demo-banner { display: none !important; }
body.is-embedded .phone-frame { max-width: 100%; align-self: stretch; }
/* O aparelho do case já desenha o entalhe: a barra de status desce um pouco. */
body.is-embedded .app-header { padding-top: 1rem; }

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