/* =========================================================
   GRINGAS TROCA — AVALIAÇÃO (avaliar.html)
   Wizard, resultado e simulação de upgrade.
   Mobile first. Cores, fontes e espaçamentos vêm de tokens.css.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--bg-glow), var(--c-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, p { margin: 0; }
:focus-visible { outline: 2px solid var(--c-gold-light); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { visibility: hidden; }

.app {
  width: 100%;
  max-width: var(--w-narrow);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ===== TOPO ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--sp-3) 0;
  background: rgba(8, 9, 9, .85);
  border-bottom: 1px solid var(--c-line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-tag { padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .2); font-size: 9px; font-weight: var(--fw-heavy); letter-spacing: .26em; color: #d8a05c; }

.icon-btn, .text-btn { border: 0; background: transparent; color: var(--c-text); }
.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
}
.icon-btn:hover { background: var(--c-surface-2); }
.text-btn { justify-self: end; min-height: 44px; padding: 0 8px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-text-muted); }
.text-btn:hover { color: var(--c-text); }

/* Link de saída do wizard (volta para a landing) */
.home-nav { width: 100%; padding: var(--sp-3) var(--gutter) 0; }
.home-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; /* área de toque mínima recomendada */
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--c-text-muted); text-decoration: none;
  transition: color var(--t-fast);
}
.home-link span { display: inline-block; transition: transform var(--t-fast); }
.home-link:hover { color: var(--c-gold-light); }
.home-link:hover span { transform: translateX(-3px); }

/* ===== TELA ===== */
#screen { flex: 1; display: flex; }

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: var(--sp-5) var(--gutter) 0;
  animation: enter var(--t-base) var(--ease);
}
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen.is-static { animation: none; }

.screen-body { display: flex; flex-direction: column; gap: var(--sp-5); }
.screen-center { justify-content: center; align-items: center; text-align: center; gap: var(--sp-3); padding-bottom: var(--sp-16); }

/* ---- Progresso ---- */
.progress-wrap { margin-bottom: var(--sp-6); }
.progress-meta {
  display: flex; justify-content: space-between;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-2xs); font-weight: var(--fw-black); letter-spacing: var(--ls-label);
  color: var(--c-text-muted);
}
.progress-meta b { color: var(--c-gold-light); letter-spacing: .04em; }
.progress { height: 4px; border-radius: var(--r-pill); background: var(--c-surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--g-gold); transition: width var(--t-base) var(--ease); }

/* ---- Títulos ---- */
.question {
  font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2rem);
  line-height: var(--lh-snug);
  letter-spacing: -.035em;
  font-weight: var(--fw-black);
  color: #fff;
  text-wrap: balance;
}
.sub { margin: var(--sp-2) 0 var(--sp-6); color: var(--c-text-muted); font-size: var(--fs-sm); }
.sub b { color: var(--c-text); }

.pill {
  align-self: flex-start;
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--c-gold-line);
  border-radius: var(--r-pill);
  color: var(--c-gold-light);
  font-size: 10px;
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-label);
}

/* ===== OPÇÕES ===== */
.choices { display: grid; gap: var(--sp-2); }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  width: 100%;
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.choice:hover { border-color: var(--c-line-strong); background: var(--c-surface-2); }
.choice:active { transform: scale(.99); }
.choice strong { font-size: var(--fs-md); font-weight: var(--fw-bold); }
.choice small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--c-text-muted); }
.choice > div, .choice > strong { flex: 1; }
.choice.selected { border-color: var(--c-gold); background: linear-gradient(0deg, var(--c-gold-soft), var(--c-gold-soft)), var(--c-surface); }

.radio {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--c-line-strong);
  display: grid; place-items: center;
  transition: border-color var(--t-fast);
}
.selected .radio { border-color: var(--c-gold); }
.selected .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--g-gold); }

.model-grid { grid-template-columns: 1fr; }
.model-grid .choice { min-height: 52px; }
.mini-phone {
  flex: none;
  width: 18px; height: 32px;
  border-radius: 5px;
  border: 1.5px solid var(--c-line-strong);
  background: linear-gradient(150deg, #3a3a38, #151515);
  position: relative;
}
.mini-phone::before { content: ""; position: absolute; top: 3px; left: 3px; width: 7px; height: 7px; border-radius: 2px; background: #000; border: 1px solid rgba(255,255,255,.2); }
.selected .mini-phone { border-color: var(--c-gold); background: linear-gradient(150deg, #b99a73, #40372d); }
.mini-phone.lg { width: 28px; height: 50px; border-radius: 8px; background: linear-gradient(150deg, #b99a73, #40372d); border-color: var(--c-gold-line); }
.mini-phone.lg::before { width: 11px; height: 11px; top: 4px; left: 4px; border-radius: 3px; }

.chips { grid-template-columns: repeat(2, 1fr); }

/* ---- Liga/desliga (funções) ---- */
.toggle-list { display: grid; gap: var(--sp-2); }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  font-weight: var(--fw-semibold);
  text-align: left;
}
.toggle-row[aria-checked="true"] { border-color: rgba(239, 107, 107, .45); background: linear-gradient(0deg, var(--c-danger-soft), var(--c-danger-soft)), var(--c-surface); }
.switch { flex: none; width: 46px; height: 28px; border-radius: var(--r-pill); background: var(--c-surface-3); position: relative; transition: background var(--t-fast); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform var(--t-base) var(--ease); }
.switch.on { background: var(--c-danger); }
.switch.on::after { transform: translateX(18px); }

/* ---- Bateria ---- */
.battery-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}
.battery-icon {
  position: relative;
  width: 112px; height: 52px;
  padding: 5px;
  border: 3px solid var(--c-line-strong);
  border-radius: 14px;
}
.battery-icon::after { content: ""; position: absolute; right: -9px; top: 15px; width: 5px; height: 16px; border-radius: 0 4px 4px 0; background: var(--c-line-strong); }
.battery-icon span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #1f9d61, #3fdc8f); transition: width var(--t-fast); }
.battery-value { font-size: 3rem; line-height: 1; font-weight: var(--fw-black); letter-spacing: -.04em; }
.range {
  --fill: 0.74;  /* proporção 0–1 do valor; o JS atualiza a cada evento input */
  --thumb: 28px; /* mesmo tamanho da bolinha, usado no cálculo do preenchimento */
  width: 100%;
  height: 32px;
  -webkit-appearance: none; appearance: none;
  background: transparent;
}
/* O centro da bolinha anda de thumb/2 até (100% - thumb/2), não de 0 a 100%.
   Por isso o ponto de corte do gradiente compensa metade do thumb. */
.range::-webkit-slider-runnable-track {
  --stop: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--fill));
  height: 6px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--c-gold) var(--stop), var(--c-surface-3) var(--stop));
}
.range::-moz-range-track { height: 6px; border-radius: var(--r-pill); background: var(--c-surface-3); }
.range::-moz-range-progress { height: 6px; border-radius: var(--r-pill); background: var(--c-gold); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: -11px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.5), 0 0 0 4px var(--c-gold-soft); }
.range::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.range-scale { width: 100%; display: flex; justify-content: space-between; margin-top: -10px; font-size: var(--fs-2xs); color: var(--c-text-subtle); }
.help { width: 100%; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--c-surface-2); font-size: var(--fs-xs); color: var(--c-text-muted); text-align: center; }
.help b { display: block; color: var(--c-text); margin-bottom: 2px; }

/* ---- Fotos ---- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.photo-wrap { display: flex; flex-direction: column; gap: 6px; }
.photo-wrap:first-child, .photo-wrap:nth-child(2) { grid-row: span 1; }
.photo-box {
  position: relative;
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px dashed var(--c-line-strong);
  border-radius: var(--r-md);
  background: var(--c-surface);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.photo-box:hover { border-color: var(--c-gold); }
.photo-box.has-photo { border-style: solid; border-color: var(--c-success); }
.photo-box.loading::after { content: ""; position: absolute; inset: 0; background: rgba(8,9,9,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23e7c777' stroke-width='4' stroke-dasharray='90 40'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center / 36px no-repeat; }
.photo-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-plus { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--c-gold-soft); color: var(--c-gold-light); font-size: 20px; margin-bottom: 4px; }
.photo-box b { font-size: var(--fs-sm); }
.photo-box small { font-size: var(--fs-2xs); color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .08em; }
.photo-remove { align-self: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-danger); font-size: var(--fs-xs); font-weight: var(--fw-bold); }

/* ---- Campos ---- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.label { font-size: var(--fs-2xs); font-weight: var(--fw-black); letter-spacing: .12em; color: var(--c-text-muted); }
.hint { margin-top: -4px; font-size: var(--fs-xs); color: var(--c-text-subtle); }
.input {
  width: 100%;
  min-height: 54px;
  padding: 14px var(--sp-4);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  font-size: var(--fs-md); /* 16px evita zoom automático no iOS */
  color: var(--c-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  color-scheme: dark;
}
.input::placeholder { color: var(--c-text-subtle); }
.input:focus { outline: none; border-color: var(--c-gold); box-shadow: 0 0 0 4px var(--c-gold-soft); }
textarea.input { resize: vertical; min-height: 120px; line-height: var(--lh-body); }
.counter { align-self: flex-end; font-size: var(--fs-2xs); color: var(--c-text-subtle); }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-check {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%) scale(.6);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-success); color: #04150c; font-size: 13px; font-weight: var(--fw-black);
  opacity: 0; transition: opacity var(--t-fast), transform var(--t-base) var(--ease);
}
.field-error { min-height: 0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-danger); }
.field-error:empty { display: none; }
.is-valid .input { border-color: rgba(47, 191, 122, .6); }
.is-valid .input-check { opacity: 1; transform: translateY(-50%) scale(1); }
.is-invalid .input { border-color: var(--c-danger); background: linear-gradient(0deg, var(--c-danger-soft), var(--c-danger-soft)), var(--c-surface); }
.is-invalid .input:focus { box-shadow: 0 0 0 4px var(--c-danger-soft); }
.is-invalid .field-error::before { content: "! "; font-weight: var(--fw-black); }

.note { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--c-surface-2); font-size: var(--fs-xs); color: var(--c-text-muted); }

/* ===== BOTÕES ===== */
.footer-actions {
  position: sticky;
  bottom: 0;
  display: flex; flex-direction: column; gap: var(--sp-2);
  margin-top: auto;
  padding: var(--sp-6) 0 calc(var(--sp-4) + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--c-bg) 30%);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t-base), opacity var(--t-fast);
}
.btn:active:not(:disabled) { transform: scale(.985); }
.btn.primary { background: var(--g-gold-btn); color: #1a1006; box-shadow: 0 14px 40px rgba(201, 141, 79, .3), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.primary:hover:not(:disabled):not(.disabled) { box-shadow: var(--sh-gold-hover); }
.btn.primary:disabled, .btn.primary.disabled { background: var(--c-surface-3); color: var(--c-text-subtle); box-shadow: none; cursor: not-allowed; }
.btn.whatsapp { background: var(--c-whatsapp); color: #04210f; box-shadow: 0 10px 28px rgba(37, 211, 102, .28); }
.btn.whatsapp:hover { box-shadow: 0 14px 34px rgba(37, 211, 102, .4); }
.btn.ghost { background: transparent; color: var(--c-text-muted); border: 1px solid var(--c-line); }
.btn.ghost:hover { color: var(--c-text); border-color: var(--c-line-strong); }
.btn.small { min-height: 44px; font-size: var(--fs-xs); }

/* ---- Modal de confirmação (Recomeçar) ---- */
.confirm-modal {
  width: min(400px, calc(100% - 2 * var(--gutter)));
  padding: 0;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.confirm-modal::backdrop { background: rgba(8, 9, 9, .72); backdrop-filter: blur(4px); }
.confirm-modal__box { display: grid; gap: var(--sp-3); padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.confirm-modal h2 { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-heavy); letter-spacing: -.02em; }
.confirm-modal p { color: var(--c-text-muted); font-size: var(--fs-sm); }
.confirm-modal__actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
.confirm-modal__actions .btn { flex: 1; }

/* ===== CARREGANDO ===== */
.loader { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--c-surface-3); border-top-color: var(--c-gold); animation: spin .8s linear infinite; margin-bottom: var(--sp-3); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESULTADO ===== */
.result-screen, .upgrade-screen { gap: var(--sp-5); padding-bottom: var(--sp-8); }

.result-head { display: flex; flex-direction: column; gap: var(--sp-4); }
.result-device { display: flex; align-items: center; gap: var(--sp-3); }
.result-device b { display: block; font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.result-device small { color: var(--c-text-muted); font-size: var(--fs-sm); }

.value-card {
  position: relative;
  padding: var(--sp-8) var(--sp-5);
  border-radius: var(--r-xl);
  border: 1px solid rgba(201, 147, 43, .35);
  background: radial-gradient(circle at 50% 0%, rgba(201, 147, 43, .22), transparent 65%), var(--c-surface);
  text-align: center;
  overflow: hidden;
}
.value-label { display: block; font-size: var(--fs-2xs); font-weight: var(--fw-black); letter-spacing: var(--ls-label); color: var(--c-gold-light); }
.value-amount {
  margin: var(--sp-2) 0;
  font-size: var(--fs-value);
  line-height: 1;
  font-weight: var(--fw-black);
  letter-spacing: -.045em;
  background: var(--g-gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.value-sub { color: var(--c-text-muted); font-size: var(--fs-sm); }
.value-title { margin: var(--sp-2) 0 0; font-size: var(--fs-md); font-weight: var(--fw-bold); }
.value-callout { margin-top: var(--sp-4); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.result-code { word-break: break-all; }
.value-card.manual { border-color: var(--c-line-strong); background: var(--c-surface); }
.value-card.manual .value-amount { background: none; color: var(--c-text); }
.manual-list { margin: var(--sp-4) 0 0; padding: var(--sp-3) var(--sp-4); list-style: none; border-radius: var(--r-md); background: var(--c-surface-2); text-align: left; font-size: var(--fs-xs); color: var(--c-text-muted); }
.manual-list li { padding: 3px 0 3px 16px; position: relative; }
.manual-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-gold); }

.result-actions { display: flex; flex-direction: column; gap: var(--sp-2); }

.summary-card { border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-surface); overflow: hidden; }
.summary-card summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0 var(--sp-4);
  font-weight: var(--fw-bold); font-size: var(--fs-sm);
  cursor: pointer; list-style: none;
}
.summary-card summary::-webkit-details-marker { display: none; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--c-text-muted); border-bottom: 2px solid var(--c-text-muted); transform: rotate(45deg) translateY(-3px); transition: transform var(--t-base); }
.summary-card[open] .chev { transform: rotate(-135deg) translateY(-3px); }
.summary-card dl { margin: 0; padding: 0 var(--sp-4); }
.summary-row { display: flex; justify-content: space-between; gap: var(--sp-4); padding: 10px 0; border-top: 1px solid var(--c-line); font-size: var(--fs-sm); }
.summary-row dt { color: var(--c-text-muted); }
.summary-row dd { margin: 0; font-weight: var(--fw-semibold); text-align: right; }
.summary-notes { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--c-line); font-size: var(--fs-sm); }
.summary-card dl.summary-notes { padding: var(--sp-3) var(--sp-4); }
.summary-notes dt { color: var(--c-text-muted); margin-bottom: 4px; }
.summary-notes dd { margin: 0; white-space: pre-wrap; }
.summary-card .btn { width: calc(100% - var(--sp-8)); margin: var(--sp-3) var(--sp-4) var(--sp-4); }

.legal { font-size: var(--fs-2xs); color: var(--c-text-subtle); text-align: center; line-height: 1.5; }

/* ===== UPGRADE ===== */
.upgrade-screen .question { margin-top: calc(var(--sp-2) * -1); }
.credit-chip {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid rgba(47, 191, 122, .3);
  background: var(--c-success-soft);
  font-size: var(--fs-sm);
}
.credit-chip span { color: var(--c-text-muted); }
.credit-chip b { color: var(--c-success); font-size: var(--fs-lg); font-weight: var(--fw-black); }

.products { display: grid; gap: var(--sp-2); }
.product {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; min-height: 72px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.product:hover { border-color: var(--c-line-strong); }
.product.selected { border-color: var(--c-gold); background: linear-gradient(0deg, var(--c-gold-soft), var(--c-gold-soft)), var(--c-surface); }
.product-info { flex: 1; min-width: 0; }
.product-info strong { display: block; font-size: var(--fs-md); font-weight: var(--fw-heavy); }
.product-info small { font-size: var(--fs-xs); color: var(--c-text-muted); }
.product-diff { text-align: right; line-height: 1.2; }
.product-diff small { display: block; font-size: 10px; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.product-diff b { font-size: var(--fs-md); font-weight: var(--fw-black); white-space: nowrap; }
.product.selected .product-diff b { color: var(--c-gold-light); }
.product.undecided { min-height: 60px; }

.deal-card {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid rgba(201, 147, 43, .35);
  background: radial-gradient(circle at 50% 100%, rgba(201, 147, 43, .16), transparent 70%), var(--c-surface);
  animation: enter var(--t-base) var(--ease);
}
.deal-row { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 6px 0; font-size: var(--fs-sm); }
.deal-row span { color: var(--c-text-muted); }
.deal-row.credit b { color: var(--c-success); }
.deal-total { margin-top: var(--sp-3); padding-top: var(--sp-4); border-top: 1px dashed var(--c-line-strong); text-align: center; }
.deal-amount { margin: 6px 0 4px; font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem); line-height: 1; font-weight: var(--fw-black); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.deal-installment { font-size: var(--fs-sm); color: var(--c-text-muted); }
.deal-installment b { color: var(--c-text); }
.deal-help { font-size: var(--fs-sm); color: var(--c-text-muted); }
.deal-help b { color: var(--c-text); }

.upgrade-screen .footer-actions { position: static; margin-top: 0; padding-top: 0; background: none; }
.success-note { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--c-success-soft); color: var(--c-success); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: center; }

/* =========================================================
   ≥ 480px
   ========================================================= */
@media (min-width: 480px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-wrap:first-child, .photo-wrap:nth-child(2) { grid-column: span 1; }
}

/* =========================================================
   ≥ 768px — tablet/desktop: cartão central, botões normais
   ========================================================= */
@media (min-width: 768px) {
  .app { max-width: 640px; }
  .topbar { margin-top: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-lg); position: sticky; top: var(--sp-4); height: var(--header-h); padding-top: 0; }
  .screen { padding: var(--sp-10) var(--sp-8) 0; }
  .home-nav { padding: var(--sp-4) var(--sp-8) 0; }
  .footer-actions { position: static; background: none; padding-bottom: var(--sp-10); }
  .result-actions { flex-direction: row; }
  .result-actions .btn { flex: 1; font-size: var(--fs-xs); }
  .value-card { padding: var(--sp-10) var(--sp-8); }
}

/* =========================================================
   ≥ 1024px — desktop: lista de modelos em 3 colunas
   ========================================================= */
@media (min-width: 1024px) {
  .app { max-width: 760px; }
  .model-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Celular estreito (≤ 359px): topo mais enxuto */
@media (max-width: 359px) {
  .topbar { grid-template-columns: 52px 1fr auto; }
  .brand-tag { display: none; }
  .brand-logo { height: 28px; }
  .question { font-size: 1.5rem; }
}

/* Celular deitado (pouca altura): topo compacto e botão sempre visível */
@media (max-height: 500px) and (orientation: landscape) {
  .topbar { margin-top: 0; top: 0; border-radius: 0; border-width: 0 0 1px; height: 52px; }
  .screen { padding-top: var(--sp-4); }
  .progress-wrap { margin-bottom: var(--sp-3); }
  .sub { margin-bottom: var(--sp-3); }
  .footer-actions { position: sticky; padding-top: var(--sp-4); padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--c-bg) 30%); }
  .upgrade-screen .footer-actions { position: static; }
  .footer-actions { flex-direction: row; }
  .footer-actions .btn { min-height: 48px; }
}
