/* ==========================================================================
   Nexos — "Ver como…" (prefixo .cv-)
   Faixa fixa no topo, palco com moldura de celular realista + legenda ao lado
   (desktop) e tela cheia no celular de verdade (<= 760px).
   Só variáveis de tokens.css: respeita claro/escuro, destaque, cantos e densidade.
   ========================================================================== */

.cv-root {
  --cv-banner-h: 54px;
  --cv-phone-w: 392px;
  --cv-phone-h: clamp(560px, calc(100dvh - var(--cv-banner-h) - 100px), 844px);
  --cv-bezel-w: 11px;
  --cv-bezel: var(--text);
  --cv-edge: color-mix(in srgb, var(--text) 62%, var(--surface));
  --cv-status-h: 48px;
  --cv-tabs-pb: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
}
:root[data-theme="dark"] .cv-root {
  --cv-bezel: var(--bg);
  --cv-edge: var(--border-2);
}
/* bare + view-full: no celular o base.css reserva espaço da barra inferior, que aqui não existe */
.view:has(> .cv-root) { overflow: hidden; }

/* ==========================================================================
   Faixa "Você está vendo como <nome>"
   ========================================================================== */
.cv-banner {
  position: relative; z-index: 30; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  min-height: var(--cv-banner-h); padding: 8px 14px 8px 16px;
  background: var(--c-lilac); color: var(--c-lilac-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--c-lilac-s) 28%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--c-lilac-s) 10%, transparent), var(--shadow-sm);
}
.cv-banner::before {
  /* listras discretas de "modo pré-visualização" */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--c-lilac-s) 9%, transparent) 14px 28px);
}
.cv-banner > * { position: relative; }
.cv-banner-ico {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--c-lilac-s);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-lilac-s) 14%, transparent);
  animation: cvPulseRing 2.8s ease-in-out infinite;
}
.cv-banner-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 520; line-height: 1.3; }
.cv-banner-text b { font-weight: 750; }
.cv-banner-role { opacity: .72; }
.cv-banner .btn { height: 36px; border-radius: 11px; flex-shrink: 0; }
.cv-banner-info {
  color: var(--c-lilac-ink);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.cv-banner-info:hover { background: color-mix(in srgb, var(--surface) 85%, transparent); }
.cv-banner-back {
  background: var(--c-lilac-ink); color: var(--c-lilac);
  padding: 0 14px 0 11px; font-weight: 650;
}
.cv-banner-back:hover { background: color-mix(in srgb, var(--c-lilac-ink) 86%, var(--c-lilac-s)); }
.cv-banner .btn:focus-visible { outline-color: var(--c-lilac-ink); }

/* ==========================================================================
   Palco + moldura de celular
   ========================================================================== */
.cv-stage {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
  display: flex; align-items: safe center; justify-content: center;
  gap: clamp(36px, 6vw, 84px);
  padding: 24px 32px 28px;
  background:
    radial-gradient(620px 420px at 28% 18%, color-mix(in srgb, var(--c-lilac-s) 11%, transparent), transparent 70%),
    radial-gradient(560px 460px at 72% 88%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    radial-gradient(var(--dot) 1px, transparent 1.3px) 0 0 / 22px 22px,
    var(--bg-sub);
}
.cv-device {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.view-enter .cv-device { animation: cvRise .5s var(--ease) both; }
.cv-phone {
  position: relative;
  width: var(--cv-phone-w); height: var(--cv-phone-h);
  padding: var(--cv-bezel-w);
  border-radius: 54px;
  background: var(--cv-bezel);
  box-shadow:
    0 0 0 1.5px var(--cv-edge),
    0 0 0 4px var(--cv-bezel),
    0 0 0 5px color-mix(in srgb, var(--cv-edge) 60%, transparent),
    var(--shadow-window);
}
/* botões laterais (volume à esquerda, power à direita) */
.cv-phone::before, .cv-phone::after {
  content: ""; position: absolute; width: 4px; border-radius: 3px;
  background: var(--cv-edge);
}
.cv-phone::before { left: -8px; top: 150px; height: 84px; box-shadow: 0 -52px 0 0 var(--cv-edge); }
.cv-phone::after { right: -8px; top: 190px; height: 92px; }

.cv-island {
  position: absolute; z-index: 70; top: calc(var(--cv-bezel-w) + 10px); left: 50%;
  width: 112px; height: 32px; transform: translateX(-50%);
  border-radius: 20px; background: var(--cv-bezel);
  pointer-events: none;
}
:root[data-theme="dark"] .cv-island { box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 60%, transparent); }
.cv-island::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--c-sky-s) 55%, var(--cv-bezel)) 0 22%, color-mix(in srgb, var(--cv-edge) 40%, var(--cv-bezel)) 45%, var(--cv-bezel) 75%);
}

.cv-screen {
  position: relative; isolation: isolate;
  height: 100%; display: flex; flex-direction: column;
  border-radius: 43px; overflow: hidden;
  background: var(--bg);
  /* "vidro": brilho suave na borda */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}
/* indicador de início (home indicator) */
.cv-screen::after {
  content: ""; position: absolute; z-index: 65; left: 50%; bottom: 7px;
  width: 128px; height: 5px; margin-left: -64px; border-radius: 3px;
  background: var(--text); opacity: .82; pointer-events: none;
}
/* o Modo mercado da lista abre dentro da tela do celular */
.cv-screen > .cp-market.in-host { padding-top: var(--cv-status-h); border-radius: inherit; }
.cv-screen > .cp-market.in-host .cpm-foot { padding-bottom: calc(12px + var(--cv-tabs-pb)); }

/* Barra de status */
.cv-status {
  position: relative; z-index: 66; /* fica visível sobre o Modo mercado */
  flex-shrink: 0; height: var(--cv-status-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 26px 0 34px;
  font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--text);
  font-variant-numeric: tabular-nums; user-select: none;
}
.cv-clock { min-width: 44px; }
.cv-sb { display: inline-flex; align-items: center; gap: 7px; }
.cv-signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.cv-signal i { display: block; width: 3px; border-radius: 1px; background: currentColor; }
.cv-signal i:nth-child(1) { height: 4px; }
.cv-signal i:nth-child(2) { height: 6px; }
.cv-signal i:nth-child(3) { height: 8.5px; }
.cv-signal i:nth-child(4) { height: 11px; }
.cv-batt {
  position: relative; display: inline-block; width: 25px; height: 12px; padding: 1.5px;
  border: 1.4px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 4px;
}
.cv-batt::after {
  content: ""; position: absolute; right: -4px; top: 50%; width: 2px; height: 4px; margin-top: -2px;
  border-radius: 0 2px 2px 0; background: color-mix(in srgb, currentColor 45%, transparent);
}
.cv-batt i { display: block; width: 78%; height: 100%; border-radius: 1.5px; background: currentColor; }

/* Barra do app (dentro do celular) */
.cv-appbar {
  flex-shrink: 0; position: relative; z-index: 5;
  display: flex; align-items: center; gap: 6px;
  height: 52px; padding: 0 14px 0 16px;
}
.cv-brand { display: flex; align-items: center; gap: 9px; font-weight: 780; font-size: 17px; letter-spacing: -.02em; }
.cv-logo {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 4px 12px var(--accent-ring);
}
.cv-me { display: inline-flex; flex-shrink: 0; }
.cv-me .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px color-mix(in srgb, var(--c-lilac-s) 45%, transparent); }
.cv-back {
  width: 40px; height: 40px; margin-left: -8px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: var(--text);
  transition: background var(--dur), transform .1s;
}
.cv-back:hover { background: var(--hover); }
.cv-back:active { transform: scale(.92); background: var(--active); }
.cv-back:focus-visible { border-radius: 50%; }
.cv-appbar-title {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16.5px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cv-appbar-title > span { font-size: 19px; line-height: 1; flex-shrink: 0; }

/* Conteúdo rolável */
.cv-content {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scroll-behavior: smooth;
  scrollbar-width: none;
}
.cv-content::-webkit-scrollbar { display: none; }
.cv-enter { animation: cvIn .32s var(--ease); }

/* Barra inferior (abas) */
.cv-tabs {
  flex-shrink: 0; position: relative; z-index: 5;
  display: flex; align-items: stretch; justify-content: space-around;
  padding: 6px 8px var(--cv-tabs-pb);
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border);
}
.cv-tab {
  position: relative; flex: 1; min-width: 0; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 14px;
  font-size: 11px; font-weight: 620; color: var(--text-3);
  transition: color var(--dur);
}
.cv-tab svg.lucide {
  box-sizing: content-box; padding: 3px 16px; border-radius: 999px;
  transition: background .2s var(--ease), color .2s;
}
.cv-tab:hover { color: var(--text-2); }
.cv-tab.on { color: var(--accent-ink); }
.cv-tab.on svg.lucide { background: var(--accent-soft); color: var(--accent); stroke-width: 2.2; }
.cv-tab:active svg.lucide { transform: scale(.92); }
.cv-tab > span:not(.cv-tab-badge) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cv-tab-badge {
  position: absolute; top: 2px; left: calc(50% + 10px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 750; line-height: 1;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 2px var(--surface);
}

/* Legenda do aparelho */
.cv-caption {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 550; color: var(--text-3);
}

/* ==========================================================================
   Legenda ao lado (desktop) e no modal
   ========================================================================== */
.cv-legend { display: flex; flex-direction: column; gap: 12px; }
.cv-stage > .cv-legend {
  width: 352px; flex-shrink: 0;
  max-height: calc(var(--cv-phone-h) + 30px); overflow-y: auto;
  padding: 4px 6px 12px 2px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, var(--text) calc(100% - 26px), transparent);
  mask-image: linear-gradient(to bottom, var(--text) calc(100% - 26px), transparent);
}
.cv-stage > .cv-legend::-webkit-scrollbar { display: none; }
.cv-lg-kicker {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-ink);
}
.cv-lg-title { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.cv-lg-text { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.cv-lg-box {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 12px 8px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.cv-lg-label {
  display: flex; align-items: center; gap: 7px; padding: 0 2px 6px;
  font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
}
.cv-lg-label.ok { color: var(--success); }
.cv-lg-label.no { color: var(--text-3); }
.cv-lg-row {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 3px 2px;
  font-size: 13.5px; font-weight: 520; line-height: 1.3;
}
.cv-lg-row + .cv-lg-row { border-top: 1px dashed var(--border); }
.cv-lg-row.faint { color: var(--text-3); }
.cv-lg-emoji {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 16px; line-height: 1;
  background: var(--c-bg); color: var(--c-ink);
}
.cv-lg-box:has(.cv-lg-label.no) .cv-lg-row .grow { color: var(--text-2); }
.cv-lg-note { color: var(--text-3); font-weight: 450; font-size: 12.5px; }
.cv-lg-role {
  flex-shrink: 0; height: 22px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 620; background: var(--surface-3); color: var(--text-2);
}
.cv-lg-secret {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--c-pink); color: var(--c-pink-ink);
  font-size: 13.5px; line-height: 1.4;
}
.cv-lg-secret > svg.lucide { margin-top: 1px; }
.cv-lg-secret b { font-weight: 680; }
.cv-lg-secret-list { margin-top: 5px; font-size: 12.5px; opacity: .86; line-height: 1.5; }
.cv-lg-steps {
  padding: 12px 14px 10px; border-radius: var(--r-lg);
  border: 1.5px dashed var(--border-2);
}
.cv-lg-steps .cv-lg-label { color: var(--text-2); }
.cv-lg-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: cvstep; display: flex; flex-direction: column; gap: 8px; }
.cv-lg-steps li {
  counter-increment: cvstep; display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--text); line-height: 1.35;
}
.cv-lg-steps li::before {
  content: counter(cvstep); flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 750; background: var(--accent-soft); color: var(--accent-ink);
}
.cv-lg-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.cv-lg-actions .btn { height: 34px; }
.cv-legend-modal { gap: 12px; }
.cv-legend-modal .cv-lg-box { box-shadow: none; background: var(--surface-2); }

/* ==========================================================================
   Peças comuns das telas da pessoa
   ========================================================================== */
.cv-page { padding: 4px var(--pad) 28px; }
.cv-page-head { margin: 6px 2px 16px; }
.cv-h1 { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.cv-sub { margin-top: 5px; font-size: 13px; color: var(--text-2); line-height: 1.45; }

.cv-sec-title {
  display: flex; align-items: center; gap: 7px;
  margin: 24px 2px 10px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -.005em; color: var(--text-2);
}
.cv-sec-title > span:first-child:not(:only-child) { font-size: 15px; line-height: 1; }
.cv-sec-title > svg.lucide { color: var(--text-3); }
.cv-sec-title > span:nth-of-type(2) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-sec-extra {
  margin-left: auto; flex-shrink: 0;
  min-width: 22px; height: 22px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2);
}
.cv-sec-extra:empty { display: none; }

.cv-input {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); outline: none;
  font-size: 15px; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.cv-input::placeholder { color: var(--text-3); }
.cv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ==========================================================================
   Início da pessoa
   ========================================================================== */
.cv-hello { margin: 8px 2px 16px; }
.cv-hello-title { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.cv-hello-sub { margin-top: 6px; font-size: 13px; color: var(--text-2); }

/* Convite (primeira visita) */

/* Dica "Adicione à Tela de Início" */

/* Blocos grandes */
.cv-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cv-block {
  grid-column: 1 / -1;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 132px; padding: 15px 16px 16px;
  border-radius: var(--r-xl);
  background: var(--c-bg); color: var(--c-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 16%, transparent), var(--shadow-sm);
  cursor: pointer; user-select: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cv-block.cv-half { grid-column: auto; min-height: 150px; }
.cv-block::after {
  /* brilho no canto */
  content: ""; position: absolute; z-index: -1; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c-s) 22%, transparent), transparent 70%);
  pointer-events: none;
}
@media (hover: hover) {
  .cv-block:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 30%, transparent), var(--shadow); }
  .cv-block:hover .cv-b-arrow { transform: translateX(2px); background: color-mix(in srgb, var(--surface) 85%, transparent); }
}
.cv-block:active:not(:has(input:active, button:active)) { transform: scale(.985); }
.cv-block:focus-visible { outline: 2.5px solid var(--c-s); outline-offset: 3px; border-radius: var(--r-xl); }

.cv-b-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cv-b-emoji {
  width: 44px; height: 44px; border-radius: 15px;
  display: grid; place-items: center; font-size: 25px; line-height: 1;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--surface) 60%, transparent) inset, var(--shadow-sm);
}
.cv-b-arrow {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--c-ink);
  transition: transform .2s var(--ease), background .2s;
}
.cv-b-title { font-size: 18.5px; font-weight: 760; letter-spacing: -.015em; line-height: 1.2; }
.cv-half .cv-b-title { font-size: 16px; }
.cv-b-sub { font-size: 13.2px; line-height: 1.35; color: color-mix(in srgb, var(--c-ink) 82%, transparent); }
.cv-b-sub b { font-weight: 800; color: var(--c-ink); }

.cv-b-peek { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cv-b-peek span {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 580; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--surface) 62%, transparent); color: var(--c-ink);
}
.cv-b-peek span.more { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c-s) 40%, transparent); font-weight: 700; }

/* tarefas dentro do bloco */
.cv-b-tasks {
  display: flex; flex-direction: column; margin-top: 10px;
  border-radius: 15px; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
}
.cv-mini-task {
  display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 2px;
  color: var(--text); cursor: default;
}
.cv-mini-task + .cv-mini-task { border-top: 1px solid color-mix(in srgb, var(--c-s) 16%, transparent); }
.cv-mini-check { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; }
.cv-mini-check:focus-visible { border-radius: 50%; }
.cv-mini-task .check { border-color: color-mix(in srgb, var(--c-s) 60%, var(--border-2)); }
.cv-mini-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-mini-task .chip { flex-shrink: 0; }
.cv-b-free {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  font-size: 12.5px; line-height: 1.35; color: color-mix(in srgb, var(--c-ink) 85%, transparent);
}
.cv-b-free b { font-weight: 700; color: var(--c-ink); }
.cv-b-free > svg.lucide { flex-shrink: 0; color: var(--c-s); }

/* bloco da viagem (contagem) */
.cv-mountains {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; width: 100%; height: 46%;
  fill: color-mix(in srgb, var(--c-s) 20%, transparent);
  pointer-events: none;
}
.cv-hero .cv-mountains { height: 38%; fill: color-mix(in srgb, var(--c-s) 16%, transparent); }
.cv-b-count { display: flex; align-items: baseline; gap: 5px; margin-top: auto; padding-top: 4px; }
.cv-b-count b { font-size: 38px; font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.cv-b-count span { font-size: 14px; font-weight: 700; }
.cv-b-trip .cv-b-sub { margin-top: -2px; }

/* bloco das metas */
.cv-b-bars { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 8px; }
.cv-b-bar { display: flex; align-items: center; gap: 7px; }
.cv-b-bar > span { font-size: 13px; line-height: 1; width: 16px; text-align: center; flex-shrink: 0; }
.cv-b-bar .progress { flex: 1; height: 7px; background: color-mix(in srgb, var(--surface) 60%, transparent); }

/* Novidades */
.cv-news {
  display: flex; flex-direction: column;
  padding: 4px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.cv-news-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.cv-news-row + .cv-news-row { border-top: 1px solid var(--border); }
.cv-news-text { font-size: 13.2px; line-height: 1.4; color: var(--text-2); }
.cv-news-text b { color: var(--text); font-weight: 680; }
.cv-news-time { margin-top: 2px; font-size: 11.5px; color: var(--text-3); }

/* ==========================================================================
   Afazeres
   ========================================================================== */
.cv-addrow { display: flex; gap: 8px; }
.cv-addbtn { width: 48px; height: 48px; padding: 0; border-radius: 14px; flex-shrink: 0; }

.cv-sec-mine .cv-sec-title { color: var(--accent-ink); }
.cv-sec-mine .cv-sec-title > svg.lucide { color: var(--accent); }
.cv-sec-mine .cv-sec-extra { background: var(--accent-soft); color: var(--accent-ink); }
.cv-sec-empty {
  padding: 16px 14px; border-radius: var(--r-lg);
  border: 1.5px dashed var(--border-2); color: var(--text-2);
  font-size: 13.2px; line-height: 1.45; text-align: center;
}

.cv-task {
  display: flex; align-items: center; gap: 6px;
  min-height: 60px; padding: 6px 10px 6px 4px; margin-bottom: 8px;
  border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: background var(--dur), border-color var(--dur), box-shadow var(--dur), opacity .3s ease, transform .35s var(--ease), max-height .4s var(--ease), margin .4s var(--ease), padding .4s var(--ease);
}
.cv-task.mine { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm); }
.cv-task.done { background: transparent; box-shadow: none; border-style: dashed; }
.cv-task.done .cv-task-title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }
.cv-check { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; }
.cv-check:focus-visible { border-radius: 50%; }
.cv-check:active .check { transform: scale(.88); }
.cv-task-main { flex: 1; min-width: 0; }
.cv-task-title { font-size: 15px; font-weight: 560; line-height: 1.35; word-break: break-word; }
.cv-task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.cv-take { height: 36px; padding: 0 11px; border-radius: 11px; flex-shrink: 0; font-size: 13px; }
.cv-task-who { display: inline-flex; flex-shrink: 0; padding: 0 4px; }
.cv-task.cv-going {
  max-height: 0 !important; opacity: 0; transform: translateX(24px) scale(.98);
  margin-bottom: 0; padding-top: 0; padding-bottom: 0; min-height: 0; border-width: 0; overflow: hidden;
}
.cv-mini-task.cv-going { opacity: 0; transform: translateX(18px); }
.cv-mini-task { transition: opacity .3s ease, transform .35s var(--ease); }

.cv-done { margin-top: 18px; }
.cv-done > summary {
  display: flex; align-items: center; gap: 6px; list-style: none;
  min-height: 40px; padding: 0 4px; border-radius: 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 650; color: var(--text-2); user-select: none;
}
.cv-done > summary::-webkit-details-marker { display: none; }
.cv-done > summary:hover { color: var(--text); }
.cv-done > summary svg.lucide { transition: transform .2s var(--ease); color: var(--text-3); }
.cv-done[open] > summary svg.lucide { transform: rotate(90deg); }
.cv-done[open] > summary { margin-bottom: 6px; }

/* ==========================================================================
   Viagem
   ========================================================================== */
.cv-hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 4px; padding: 16px 16px 14px; border-radius: var(--r-xl);
  background: linear-gradient(165deg, var(--c-bg) 30%, color-mix(in srgb, var(--c-s) 26%, var(--c-bg)));
  color: var(--c-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 16%, transparent), var(--shadow-sm);
}
.cv-hero-top { display: flex; align-items: center; gap: 12px; }
.cv-hero-emoji {
  width: 52px; height: 52px; border-radius: 17px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 30px; line-height: 1;
  background: color-mix(in srgb, var(--surface) 62%, transparent); box-shadow: var(--shadow-sm);
}
.cv-hero-name { font-size: 19px; font-weight: 780; letter-spacing: -.015em; line-height: 1.2; }
.cv-hero-desc { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: color-mix(in srgb, var(--c-ink) 80%, transparent); }
.cv-hero-label { margin: 16px 0 7px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cv-cd { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cv-cd-box {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px 8px; border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
}
.cv-cd-box b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--c-ink); }
.cv-cd-box span { font-size: 11.5px; font-weight: 650; color: color-mix(in srgb, var(--c-ink) 75%, transparent); }
.cv-cd-past { grid-column: 1 / -1; font-size: 22px; font-weight: 800; padding: 6px 0; }
.cv-hero-date {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 12px;
  font-size: 12.5px; font-weight: 560; line-height: 1.4;
}
.cv-hero-date > svg.lucide { flex-shrink: 0; margin-top: 2px; }

.cv-prep {
  margin-top: 12px; padding: 12px 14px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.cv-prep-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 13.5px; }
.cv-prep-row > span { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-2); }
.cv-prep-row b { font-weight: 750; font-variant-numeric: tabular-nums; }
.cv-prep .progress { height: 8px; }

/* Roteiro em linha do tempo */
.cv-timeline { position: relative; padding: 2px 0 2px 24px; }
.cv-timeline::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: repeating-linear-gradient(to bottom, var(--border-2) 0 5px, transparent 5px 9px);
}
.cv-tl-h { position: relative; margin: 14px 0 6px; font-size: 15px; font-weight: 720; line-height: 1.3; }
.cv-tl-h:first-child { margin-top: 0; }
.cv-tl-dot {
  position: absolute; left: -23px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-ring);
}
.cv-tl-p { margin: 4px 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.cv-tl-li { position: relative; margin: 3px 0; padding-left: 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.cv-tl-li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.cv-tl-q {
  margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent-ring);
  font-size: 13.5px; font-style: italic; color: var(--text-2);
}
.cv-tl-todo {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 6px; margin: 0 -6px;
  border-radius: 10px; text-align: left; font-size: 14px; line-height: 1.35;
  transition: background var(--dur);
}
.cv-tl-todo:hover { background: var(--hover); }
.cv-tl-todo.done > span:last-child { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }
.cv-tl-callout {
  display: flex; align-items: flex-start; gap: 9px; margin: 8px 0; padding: 10px 12px;
  border-radius: 13px; background: var(--surface-3); font-size: 13.2px; line-height: 1.45;
}
.cv-tl-callout > span:first-child { font-size: 16px; line-height: 1.3; }
.cv-timeline .divider { margin: 12px 0; }

/* Checklist da mala */
.cv-mala {
  padding: 12px 10px 8px; border-radius: var(--r-xl);
  background: var(--c-bg); color: var(--c-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 16%, transparent);
}
.cv-mala > .progress { height: 7px; margin: 0 6px 6px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.cv-mala-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 6px 8px;
  border-radius: 12px; text-align: left; font-size: 14.5px; font-weight: 540; line-height: 1.35; color: var(--c-ink);
  transition: background var(--dur);
}
.cv-mala-row:hover { background: color-mix(in srgb, var(--surface) 40%, transparent); }
.cv-mala-row .check { background: color-mix(in srgb, var(--surface) 75%, transparent); border-color: color-mix(in srgb, var(--c-s) 55%, var(--border-2)); }
.cv-mala-row .check.on { background: var(--accent); border-color: var(--accent); }
.cv-mala-row.done > span:last-child { opacity: .6; text-decoration: line-through; }

/* Quem faz o quê */
.cv-who-grid { display: flex; flex-direction: column; gap: 10px; }
.cv-who-col {
  padding: 8px 8px 4px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.cv-who-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; font-size: 13.5px; }
.cv-who-head b { font-weight: 700; }
.cv-nobody {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-3); color: var(--text-2);
}
.cv-who-col .cv-task { margin: 0; min-height: 52px; border: 0; border-radius: 12px; box-shadow: none; background: transparent; }
.cv-who-col .cv-task + .cv-task { border-top: 1px solid var(--border); border-radius: 0; }
.cv-who-col .cv-task.mine { box-shadow: none; }
.cv-who-col .cv-task-title { font-size: 14.2px; }

/* ==========================================================================
   Metas
   ========================================================================== */
.cv-goals { display: flex; flex-direction: column; gap: 12px; }
.cv-goal {
  padding: 14px 16px 10px; border-radius: var(--r-xl);
  background: var(--c-bg); color: var(--c-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 16%, transparent), var(--shadow-sm);
}
.cv-goal-top { display: flex; align-items: center; gap: 12px; }
.cv-ring { position: relative; width: 58px; height: 58px; flex-shrink: 0; }
.cv-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.cv-ring-bg { fill: color-mix(in srgb, var(--surface) 55%, transparent); stroke: color-mix(in srgb, var(--c-s) 22%, transparent); stroke-width: 6; }
.cv-ring-fg { fill: none; stroke: var(--c-s); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .35s var(--ease); }
.cv-ring-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; }
.cv-goal-title { font-size: 15.5px; font-weight: 720; line-height: 1.3; letter-spacing: -.01em; }
.cv-goal-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; color: color-mix(in srgb, var(--c-ink) 75%, transparent); }
.cv-goal-meta .avatar { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--surface) 70%, transparent); }
.cv-goal-pct { flex-shrink: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.cv-foot-tip {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px;
  font-size: 12.5px; color: var(--text-3); text-align: center; line-height: 1.4;
}
.cv-foot-tip > svg.lucide { color: var(--accent); flex-shrink: 0; }
.cv-foot-tip > span { text-wrap: balance; }

/* ==========================================================================
   Outros espaços, sem acesso e lista de compras
   ========================================================================== */
.cv-space-hero {
  display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 16px; border-radius: var(--r-xl);
  background: var(--c-bg); color: var(--c-ink);
}
.cv-space-hero .cv-sub { color: color-mix(in srgb, var(--c-ink) 78%, transparent); }
.cv-space-emoji {
  width: 52px; height: 52px; border-radius: 17px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 28px; line-height: 1; background: color-mix(in srgb, var(--surface) 62%, transparent);
}
.cv-things { display: flex; flex-direction: column; gap: 8px; }
.cv-thing {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.cv-thing[class*="c-"] { background: var(--c-bg); color: var(--c-ink); border-color: transparent; }
.cv-thing-emoji {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 20px; line-height: 1; background: color-mix(in srgb, var(--surface) 62%, var(--surface-3));
}
.cv-thing-title { font-size: 14.2px; font-weight: 640; line-height: 1.3; }
.cv-thing-sub { font-size: 12px; opacity: .72; }

.cv-locked { padding-top: 40px; }
.cv-locked .empty-icon { background: var(--surface-3); color: var(--text-2); }

.cv-compras { padding-top: 6px; }

/* ==========================================================================
   Modal "Entrar com código" (fica no body, fora do .cv-root)
   ========================================================================== */

/* ==========================================================================
   Tamanhos de tela
   ========================================================================== */
/* Telas médias: só o celular, legenda via botão "O que <nome> vê?" */
@media (max-width: 1099px) {
  .cv-stage > .cv-legend { display: none; }
}
@media (min-width: 1100px) {
  .cv-banner-legend { display: none; }
}
/* Altura curta: o palco rola, o celular mantém o tamanho mínimo */
@media (max-height: 700px) and (min-width: 761px) {
  .cv-root { --cv-banner-h: 48px; }
  .cv-stage { padding-top: 16px; padding-bottom: 16px; }
}

/* Celular de verdade: sem moldura, tela cheia */
@media (max-width: 760px) {
  .view:has(> .cv-root) { margin-bottom: 0; padding-bottom: 0; }
  .cv-root { --cv-banner-h: 50px; --cv-status-h: 0px; --cv-tabs-pb: env(safe-area-inset-bottom); }
  .cv-banner {
    gap: 8px; padding: calc(6px + env(safe-area-inset-top)) 10px 6px 12px;
    min-height: calc(var(--cv-banner-h) + env(safe-area-inset-top));
  }
  .cv-banner-ico { width: 28px; height: 28px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-lilac-s) 14%, transparent); }
  .cv-banner-text { font-size: 13px; }
  .cv-banner-role { display: none; }
  .cv-banner .btn { height: 40px; border-radius: 12px; }
  .cv-banner-info { width: 40px; padding: 0; }
  .cv-banner-info span { display: none; }
  .cv-banner-back { padding: 0 12px 0 9px; }

  .cv-stage { display: block; padding: 0; overflow: hidden; background: var(--bg); }
  .cv-device { height: 100%; gap: 0; animation: none; }
  .cv-phone {
    width: 100%; height: 100%; padding: 0; border-radius: 0;
    background: transparent; box-shadow: none;
  }
  .cv-phone::before, .cv-phone::after,
  .cv-island, .cv-status, .cv-caption, .cv-stage > .cv-legend, .cv-screen::after { display: none; }
  .cv-screen { border-radius: 0; box-shadow: none; }
  .cv-screen > .cp-market.in-host { padding-top: 0; border-radius: 0; }
  .cv-appbar { height: 54px; padding: 0 12px 0 16px; border-bottom: 1px solid transparent; }
  .cv-tabs { padding: 4px 6px var(--cv-tabs-pb); }
  .cv-tab { min-height: 58px; }

  .cv-page { padding: 4px 16px 28px; }
  .cv-b-input, .cv-input { font-size: 16px; } /* evita zoom automático no iOS */
  
  .cv-lg-actions .btn { height: 40px; }
  
}
@media (max-width: 360px) {
  .cv-banner-text { font-size: 12.3px; }
  .cv-banner-back { width: 40px; padding: 0; font-size: 0; gap: 0; }
  .cv-blocks { gap: 10px; }
  .cv-block { padding: 14px; }
  .cv-hello-title { font-size: 27px; }
}

/* ==========================================================================
   Animações
   ========================================================================== */
@keyframes cvIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cvRise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes cvPulseRing {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-lilac-s) 14%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c-lilac-s) 6%, transparent); }
}
@keyframes cvShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}

/* ==========================================================================
   Prévia real (só leitura): compras, metas, legenda e escolha da pessoa
   ========================================================================== */
.cv-root [data-cv-ro] { cursor: default; }
.cv-goal > .progress { margin: 12px 0 6px; height: 8px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.cv-goal > .progress > span { background: var(--c-s); }
.cv-tab-emoji { font-size: 19px; line-height: 1; width: 40px; height: 28px; display: grid; place-items: center; border-radius: 14px; transition: background var(--dur); }
.cv-tab.on .cv-tab-emoji { background: var(--accent-soft); }

/* lista de compras */
.cv-ro-add { margin-bottom: 14px; }
.cv-ro-add .cv-input { display: flex; align-items: center; color: var(--text-3); }
.cv-ro-add .cv-addbtn { display: grid; place-items: center; }
.cv-shop-cat { margin-bottom: 6px; }
.cv-shop-list { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px; }
.cv-shop-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px;
  border-radius: 12px; text-align: left; font-size: 15px; font-weight: 540; color: var(--text);
}
.cv-shop-row + .cv-shop-row { box-shadow: 0 -1px 0 var(--border); }
.cv-shop-name { min-width: 0; overflow-wrap: anywhere; }
.cv-shop-qty { font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface-3); padding: 3px 8px; border-radius: var(--r-full); white-space: nowrap; }
.cv-shop-row.done .cv-shop-name { text-decoration: line-through; color: var(--text-3); }
.cv-done .cv-shop-list { margin-top: 8px; }

/* legenda */
.cv-lg-presence { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 560; color: var(--text-2); }
.cv-lg-foot { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.cv-lg-foot svg.lucide { flex-shrink: 0; margin-top: 2px; }

/* escolher a pessoa */
.cv-pick { flex: 1; min-height: 0; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: clamp(20px, 6vh, 64px) 16px 40px; }
.cv-pick-card {
  width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: pop .22s var(--ease);
}
.cv-pick-head { display: flex; align-items: flex-start; gap: 14px; }
.cv-pick-head p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }
.cv-pick-ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--c-lilac); color: var(--c-lilac-ink); }
.cv-pick-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; }
.cv-pick-list { display: flex; flex-direction: column; gap: 8px; }
.cv-pick-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: border-color var(--dur), background var(--dur), transform var(--dur);
}
.cv-pick-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.cv-pick-row:active { transform: scale(.99); }
.cv-pick-row .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-pick-name { font-weight: 650; font-size: 15px; }
.cv-pick-sub { font-size: 12.5px; color: var(--text-2); }
.cv-pick-row > svg.lucide { color: var(--text-3); flex-shrink: 0; }
@media (max-width: 760px) {
  .cv-pick { padding: 16px; }
  .cv-pick-card { padding: 18px; }
  .cv-pick-title { font-size: 19px; }
}
