/* =====================================================================
   CRW TRICK V3 — Web
   Porta do design system Android (ver DESIGN.md): superfícies quase
   pretas, um único acento vívido, Clash Display pra autoridade/dados,
   General Sans pro resto. Sem framework, tokens puros em custom
   properties pra trocar tema/accent em runtime sem reload.
   ===================================================================== */

@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/clash_display_semibold.ttf') format('truetype'); font-weight: 600; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/clash_display_bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'General Sans'; src: url('../assets/fonts/general_sans_regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'General Sans'; src: url('../assets/fonts/general_sans_medium.ttf') format('truetype'); font-weight: 500; }
@font-face { font-family: 'General Sans'; src: url('../assets/fonts/general_sans_semibold.ttf') format('truetype'); font-weight: 600; }
@font-face { font-family: 'General Sans'; src: url('../assets/fonts/general_sans_bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Montserrat Black'; src: url('../assets/fonts/montserrat_black.ttf') format('truetype'); font-weight: 900; }

/* ---------------------------------------------------------------------
   Tokens — tema (bg/surface/text/border) x accent (cor de destaque),
   dois eixos independentes, exatamente como o app nativo.
   --------------------------------------------------------------------- */
:root {
  --radius-card: 20px;
  --radius-btn: 16px;
  --font-display: 'Clash Display', sans-serif;
  --font-body: 'General Sans', sans-serif;
  --font-wordmark: 'Montserrat Black', sans-serif;

  /* Defaults antes do JS aplicar a preferência salva (evita flash sem cor). */
  --accent: #a020f0;
  --accent-strong: #7a18b8;
  --accent-light: #c77dff;
  --on-accent: #ffffff;
  --glow-mult: 1;
  --motion-scale: 1;
  --density-mult: 1;

  /* Chão de segurança: mesmos valores de body[data-theme="black"] — se
     algum contexto renderizar sem esse atributo (ex.: um bundle que
     extraiu só o conteúdo do body), a superfície ainda fica escura em
     vez de cair no branco padrão do navegador. */
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  --surface: #0c0c0c;
  --surface-elevated: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #c7bdd8;
  --text-muted: #a0a0a0;
  --border: rgba(255,255,255,0.14);
  --success: #4ade80;
  --warning: #ffb020;
  --error: #ff6b6b;
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-scale: 0.001; }
}

body[data-theme="black"] {
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  --surface: #0c0c0c;
  --surface-elevated: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #c7bdd8;
  --text-muted: #a0a0a0;
  --border: rgba(255,255,255,0.14);
  --success: #4ade80;
  --warning: #ffb020;
  --error: #ff6b6b;
}

body[data-theme="amoled"] {
  --bg: #000000;
  --bg-secondary: #000000;
  --surface: #050505;
  --surface-elevated: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #c7bdd8;
  --text-muted: #a0a0a0;
  --border: rgba(255,255,255,0.14);
  --success: #4ade80;
  --warning: #ffb020;
  --error: #ff6b6b;
}

body[data-theme="midnight"] {
  --bg: #05040e;
  --bg-secondary: #0a0818;
  --surface: #120e24;
  --surface-elevated: #1c1633;
  --text-primary: #ffffff;
  --text-secondary: #c2bee0;
  --text-muted: #a0a0a0;
  --border: rgba(255,255,255,0.14);
  --success: #4ade80;
  --warning: #ffb020;
  --error: #ff6b6b;
}

body[data-theme="white"] {
  --bg: #ffffff;
  --bg-secondary: #f5f3f8;
  --surface: #fbfafc;
  --surface-elevated: #f0ecf6;
  --text-primary: #17121f;
  --text-secondary: #4b4458;
  --text-muted: #847d91;
  --border: #e6e0ed;
  --success: #1e9a54;
  --warning: #b05f00;
  --error: #d93a54;
}

/* Cor de destaque agora é RGB livre (ver Theme.apply em theme.js) —
   --accent/--accent-strong/--accent-light/--on-accent chegam via
   body.style, não mais presets fixos por [data-accent]. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ---------------------------------------------------------------------
   Screens — cada "tela" é uma section cheia; só uma fica visível.
   --------------------------------------------------------------------- */
.screen {
  display: none;
  position: relative;
  min-height: 100vh;
  background: var(--bg);
}
.screen.is-active {
  display: block;
  animation: screenFadeIn calc(0.4s * var(--motion-scale)) ease-out both;
}
@keyframes screenFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* A translação/escala fica nos wrappers de conteúdo, nunca em .screen —
   .screen é ancestral de elementos position:fixed (.bottom-nav), e uma
   animação de transform anexada a ele (mesmo já resolvida em "none")
   vira containing block pra esses descendentes fixos, "prendendo" a
   barra inferior ao fim do documento em vez da viewport. */
.login-card, .home-content, .tool-content {
  animation: screenContentEnter calc(0.5s * var(--motion-scale)) cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes screenContentEnter {
  from { transform: translateY(10px) scale(0.99); }
  to { transform: none; }
}

.ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  opacity: calc(0.14 * var(--glow-mult));
  background: radial-gradient(circle, var(--accent), transparent 70%);
  transition: opacity calc(0.5s * var(--motion-scale)) ease, background calc(0.5s * var(--motion-scale)) ease;
  animation: glowBreathe calc(9s / max(var(--motion-scale), 0.2)) ease-in-out infinite;
}
.ambient-glow--top {
  width: 480px; height: 260px; top: -80px; left: 50%;
  animation-name: glowBreatheTop; animation-delay: 0s;
}
.ambient-glow--corner {
  width: 320px; height: 260px; bottom: -60px; right: -60px;
  animation-name: glowBreatheCorner; animation-delay: -4.5s;
}

@keyframes glowBreatheTop {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.16); }
}
@keyframes glowBreatheCorner {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.16); }
}

/* ---------------------------------------------------------------------
   Typography roles
   --------------------------------------------------------------------- */
.wordmark {
  font-family: var(--font-wordmark);
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text-primary);
  -webkit-text-stroke: 1px var(--text-primary);
}
.wordmark--lg { font-size: 34px; }
.wordmark--md { font-size: 26px; }
.center { text-align: center; }

.screen-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin: 0; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 0 0 4px; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 12px 0 4px; }
.item-title { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--text-primary); }
.item-value { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--text-primary); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.eyebrow--accent { color: var(--accent); }

.body-text { font-family: var(--font-body); font-weight: 400; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin: 4px 0 0; }
.caption-text { font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--text-muted); margin: 0; }
.micro-status { font-family: var(--font-body); font-weight: 700; font-size: 10.5px; letter-spacing: 0.05em; color: var(--text-muted); }
.helper-text { font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--text-muted); }
.error-text { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--error); min-height: 16px; margin: 8px 0 0; }
.verdict-text { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.01em; color: var(--accent); margin: 0; }

/* ---------------------------------------------------------------------
   Login
   --------------------------------------------------------------------- */
.login-card {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
  padding: 64px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.login-logo { width: 68px; height: 68px; border-radius: 14px; margin-bottom: 4px; }
.login-card .input { margin-top: 26px; width: 100%; }
.login-card .btn { width: 100%; margin-top: 14px; }

/* ---------------------------------------------------------------------
   Home shell
   --------------------------------------------------------------------- */
.home-scroll { min-height: 100vh; padding-bottom: 96px; overflow-y: auto; }
.home-content {
  max-width: 480px; margin: 0 auto; position: relative;
  padding: calc(28px * var(--density-mult)) calc(20px * var(--density-mult)) 20px;
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
.nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 12px 0;
  border-radius: 14px;
  cursor: pointer;
  transition: background calc(0.2s * var(--motion-scale)), color calc(0.2s * var(--motion-scale)), transform calc(0.15s * var(--motion-scale));
}
.nav-btn:active { transform: scale(0.94); }
.nav-btn.is-active {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: var(--on-accent);
  animation: navPop calc(0.35s * var(--motion-scale)) cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes navPop { from { transform: scale(0.92); } to { transform: scale(1); } }

/* ---------------------------------------------------------------------
   Cards / rows
   --------------------------------------------------------------------- */
.card {
  background: transparent;
}
.card--bordered, .card--elevated {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: calc(18px * var(--density-mult));
  transition: border-color calc(0.3s * var(--motion-scale));
}

.toggle-list { display: flex; flex-direction: column; gap: calc(8px * var(--density-mult)); }

.row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: calc(14px * var(--density-mult)) calc(16px * var(--density-mult));
  transition: border-color calc(0.2s * var(--motion-scale)), background calc(0.2s * var(--motion-scale)), transform calc(0.15s * var(--motion-scale));
}
.row-card__text { display: flex; flex-direction: column; gap: 3px; }

/* linha clicável de configuração (Personalização) — row-card + chevron */
.perso-row { cursor: pointer; }
.perso-row:active { transform: scale(0.98); }
.perso-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.perso-row__chevron {
  width: 8px; height: 8px; flex-shrink: 0;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg); margin-left: 4px;
  transition: border-color calc(0.2s * var(--motion-scale));
}
.perso-row:hover .perso-row__chevron { border-color: var(--accent); }
.perso-row__value { display: flex; align-items: center; gap: 8px; }
.perso-row__swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; }

.kv-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.kv-label { font-size: 13px; color: var(--text-muted); }
.kv-value { font-family: var(--font-body); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.kv-value--accent { color: var(--accent); }
.divider { height: 1px; background: var(--border); }

/* switches */
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--surface-elevated); border: 1px solid var(--border);
  transition: background calc(0.25s * var(--motion-scale)), border-color calc(0.25s * var(--motion-scale)), box-shadow calc(0.25s * var(--motion-scale));
  cursor: pointer;
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  transition: transform calc(0.32s * var(--motion-scale)) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px 1px var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }

/* offer banners */
.banner-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-elevated); }
.banner-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.badge {
  font-family: var(--font-body); font-weight: 600; font-size: 10px; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,0.55); color: var(--accent);
  backdrop-filter: blur(4px);
}
.badge--corner { position: absolute; right: 10px; bottom: 10px; }
.badge--top { position: absolute; left: 10px; top: 10px; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.badge--pill { display: inline-block; background: var(--surface-elevated); border: 1px solid var(--border); color: var(--text-primary); }

.status-badge .status-label { font-weight: 600; letter-spacing: 0.03em; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1.5px solid var(--text-muted); display: inline-block; }
.status-dot--active, .is-unlocked .status-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 6px 0 var(--accent); }

/* ---------------------------------------------------------------------
   Buttons / inputs
   --------------------------------------------------------------------- */
.btn {
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform calc(0.1s * var(--motion-scale)), opacity calc(0.15s * var(--motion-scale)), box-shadow calc(0.25s * var(--motion-scale));
}
.btn:active { transform: scale(0.97); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 20px; font-size: 13px; font-weight: 700; }
.btn--sm { padding: 8px 16px; font-size: 10.5px; }
.btn--primary { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: var(--on-accent); font-weight: 700; }
.btn--primary[data-glow] { box-shadow: 0 6px 20px -6px var(--accent); }
.btn--outline { background: var(--surface-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-row { display: flex; gap: 8px; }

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
}
.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: var(--accent); }
.input--center { text-align: center; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background calc(0.2s * var(--motion-scale)), color calc(0.2s * var(--motion-scale)), border-color calc(0.2s * var(--motion-scale)), transform calc(0.15s * var(--motion-scale));
}
.chip:active { transform: scale(0.95); }
.chip.is-selected { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip-row--dots { gap: 10px; }
.chip--dot { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 2px solid transparent; }
.chip--dot.is-selected { border-color: var(--text-primary); transform: scale(1.12); }

/* ---------------------------------------------------------------------
   Tutorial de passos (ex.: adicionar à Tela de Início no iPhone)
   --------------------------------------------------------------------- */
.tutorial-steps { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.tutorial-step { display: flex; gap: 12px; align-items: flex-start; }
.tutorial-step__num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-elevated); border: 1px solid var(--border);
  color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.tutorial-step__text { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }

/* ---------------------------------------------------------------------
   Tool screens (Calibrador / Fixador)
   --------------------------------------------------------------------- */
.tool-topbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; max-width: 480px; margin: 0 auto; }
.tool-topbar__logo { width: 32px; height: 32px; border-radius: 8px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  background: var(--surface-elevated); color: var(--text-primary);
  font-size: 18px; cursor: pointer;
}
.tool-scroll { min-height: calc(100vh - 72px); overflow-y: auto; }
.tool-content { max-width: 480px; margin: 0 auto; padding: 8px 20px 40px; }

.stepper__row { display: flex; justify-content: space-between; align-items: center; }
.stepper__label { font-family: var(--font-body); font-weight: 700; letter-spacing: 0.04em; font-size: 11px; }
.stepper__current { font-family: var(--font-body); font-weight: 700; font-size: 11px; }
.stepper__track { height: 7px; border-radius: 999px; background: var(--surface-elevated); margin-top: 8px; overflow: hidden; }
.stepper__fill {
  height: 100%; width: 100%; transform-origin: left;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent)); border-radius: 999px;
  transition: transform calc(0.3s * var(--motion-scale)) cubic-bezier(0.16, 1, 0.3, 1);
}

.calib-hero { text-align: center; padding: 12px 0 8px; }
.calib-hero img { width: 56px; height: 56px; border-radius: 12px; }
.calib-hero h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin: 10px 0 6px; }
.calib-hero p { color: var(--text-secondary); font-size: 14px; margin: 0; }

.choice-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; margin-top: 8px; cursor: pointer;
}
.choice-row.is-selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choice-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.is-selected .choice-radio { border-color: var(--on-accent); background: var(--on-accent); }

.choice-chip {
  flex: 1; text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 8px; cursor: pointer;
}
.choice-chip.is-selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choice-chip .chip-title { font-weight: 700; font-size: 14px; display: block; }
.choice-chip .chip-sub { font-size: 11px; opacity: 0.8; display: block; margin-top: 2px; }

.result-card {
  background: var(--surface-elevated); border-radius: 16px; padding: 24px; text-align: center; margin-top: 14px;
}
.result-number { font-family: var(--font-display); font-weight: 700; font-size: 56px; color: var(--accent); margin: 4px 0; line-height: 1; }
.result-delta { font-size: 13px; color: var(--text-secondary); font-weight: 600; }

.processing-wrap { text-align: center; padding: 70px 0; }
.spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 4px solid var(--surface-elevated); border-top-color: var(--accent);
  margin: 0 auto; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   Overlays
   --------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.paywall-card {
  width: 100%; max-width: 340px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 26px; text-align: center;
}
.lock-icon { font-size: 32px; }
.paywall-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 10px 0 8px; }
.paywall-message { color: var(--text-muted); font-size: 13px; margin: 0; }
.paywall-card .input { margin-top: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--surface-elevated); border: 1px solid var(--border);
  color: var(--text-primary); padding: 12px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 500; max-width: 90vw;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---------------------------------------------------------------------
   Marca do logo (Personalização → Marca do logo)
   --------------------------------------------------------------------- */
.logo-mark--tinted {
  background-color: var(--accent);
  -webkit-mask-image: var(--logo-mask, none);
  mask-image: var(--logo-mask, none);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  transition: background-color calc(0.25s * var(--motion-scale));
}

/* ---------------------------------------------------------------------
   Picker genérico (Tema / Fundo / Marca / Animação / Interface / Idioma)
   — bottom-sheet no mobile, entrada com stagger nas opções.
   --------------------------------------------------------------------- */
.picker-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity calc(0.25s * var(--motion-scale));
}
.picker-overlay.is-visible { opacity: 1; pointer-events: auto; }

.picker-panel {
  width: 100%; max-width: 480px;
  max-height: 82vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  transition: transform calc(0.4s * var(--motion-scale)) cubic-bezier(0.16, 1, 0.3, 1), opacity calc(0.3s * var(--motion-scale));
}
.picker-overlay.is-visible .picker-panel { transform: translateY(0) scale(1); opacity: 1; }

.picker-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.picker-panel__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin: 0; }
.picker-panel__close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--surface-elevated); color: var(--text-primary); font-size: 16px; cursor: pointer;
  transition: transform calc(0.15s * var(--motion-scale));
}
.picker-panel__close:active { transform: scale(0.9) rotate(90deg); }

.picker-options { display: flex; flex-direction: column; gap: 8px; }
.picker-option {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: 14px; padding: calc(14px * var(--density-mult)) calc(16px * var(--density-mult));
  cursor: pointer; text-align: left;
  opacity: 0; transform: translateY(8px);
  animation: pickerOptionIn calc(0.35s * var(--motion-scale)) cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform calc(0.15s * var(--motion-scale)), background calc(0.2s * var(--motion-scale)), border-color calc(0.2s * var(--motion-scale));
}
.picker-option:active { transform: scale(0.98); }
.picker-option.is-selected {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border-color: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 18px -8px var(--accent);
}
.picker-option__radio {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border);
  transition: border-color calc(0.2s * var(--motion-scale)), background calc(0.2s * var(--motion-scale));
}
.picker-option.is-selected .picker-option__radio { border-color: var(--on-accent); background: var(--on-accent); }
.picker-option__label { font-weight: 600; font-size: 13.5px; flex: 1; }
.picker-option__check { margin-left: auto; width: 16px; height: 16px; flex-shrink: 0; }

@keyframes pickerOptionIn { to { opacity: 1; transform: translateY(0); } }

/* ---------------------------------------------------------------------
   Picker de cor de destaque — RGB livre, preview ao vivo
   --------------------------------------------------------------------- */
.accent-picker { display: flex; flex-direction: column; gap: 18px; }
.accent-preview-row { display: flex; align-items: center; gap: 14px; }
.accent-swatch {
  width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
  background: var(--rgb-preview, var(--accent));
  box-shadow: 0 8px 24px -8px var(--rgb-preview, var(--accent));
  transition: box-shadow calc(0.2s * var(--motion-scale));
}
.accent-hex { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.03em; }
.accent-rgb-values { display: flex; gap: 12px; margin-top: 2px; }
.accent-rgb-values span { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.accent-sliders { display: flex; flex-direction: column; gap: 12px; }
.accent-slider-row { display: flex; align-items: center; gap: 10px; }
.accent-slider-row label { width: 14px; font-size: 11px; font-weight: 700; color: var(--text-muted); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 6px; border-radius: 999px; background: var(--surface-elevated);
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--rgb-preview, var(--accent));
  box-shadow: 0 0 10px 1px var(--rgb-preview, var(--accent));
  cursor: pointer; transition: transform calc(0.12s * var(--motion-scale));
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 3px solid var(--rgb-preview, var(--accent)); box-shadow: 0 0 10px 1px var(--rgb-preview, var(--accent));
  cursor: pointer;
}
.accent-slider--r input[type="range"]::-webkit-slider-thumb { border-color: #ff5a5a; }
.accent-slider--g input[type="range"]::-webkit-slider-thumb { border-color: #4ade80; }
.accent-slider--b input[type="range"]::-webkit-slider-thumb { border-color: #5a9dff; }

.accent-suggestions { display: flex; gap: 10px; flex-wrap: wrap; }
.accent-suggestion-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  transition: transform calc(0.15s * var(--motion-scale)), border-color calc(0.15s * var(--motion-scale));
}
.accent-suggestion-dot:active { transform: scale(0.9); }
.accent-suggestion-dot.is-selected { border-color: var(--text-primary); transform: scale(1.1); }

/* ---------------------------------------------------------------------
   Conquistas CRWSensi — card premium com shimmer + modal de prévia
   --------------------------------------------------------------------- */
.wristband-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 20px; padding: 18px;
  transition: transform calc(0.2s * var(--motion-scale)), border-color calc(0.3s * var(--motion-scale));
}
.wristband-card:active { transform: scale(0.98); }
.wristband-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 65%);
  background-size: 220% 100%; background-position: 120% 0;
  animation: wristbandShimmer calc(6s / max(var(--motion-scale), 0.2)) ease-in-out infinite;
}
@keyframes wristbandShimmer {
  0%, 30% { background-position: 120% 0; }
  70%, 100% { background-position: -20% 0; }
}
.wristband-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-elevated); }
.wristband-frame img { width: 100%; height: 170px; object-fit: contain; display: block; }
.wristband-card .badge--corner { top: 10px; right: 10px; bottom: auto; }

/* modal genérico (reaproveita .overlay/.paywall-card) com entrada spring */
.overlay { transition: opacity calc(0.25s * var(--motion-scale)); }
.paywall-card {
  animation: modalIn calc(0.4s * var(--motion-scale)) cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: none; }
}
.wristband-modal-img { width: 100%; height: 180px; object-fit: contain; border-radius: 14px; background: var(--surface-elevated); margin-bottom: 4px; }

@media (max-width: 380px) {
  .wordmark--lg { font-size: 28px; }
  .btn-row { flex-wrap: wrap; }
}
