:root {
  --bg: #F8F3EE;
  --card: #FFFFFF;
  --line: #EDE4DA;
  --line-2: #D6CCC2;
  --soft: #F1EAE2;
  --ink: #2B3A42;
  --ink-2: #4A5A63;
  --muted: #5C6B73;
  --primary: #3E5C6B;
  --primary-2: #2A4250;
  --primary-soft: #DCE8EC;
  --primary-ink: #2E4652;
  --rose: #A84D67;
  --rose-soft: #F6DDE3;
  --rose-ink: #7A2F45;
  --pink: #F3C6D0;
  --warn-bg: #FDF3DC;
  --warn-ink: #5C3D00;
  --on-primary-muted: #D5E1E5;
  --radius: 16px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Dancing Script', cursive;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.splash { flex: 1; display: flex; align-items: center; justify-content: center; }
.logo-script { font-family: var(--script); font-weight: 700; }
.splash .logo-script { font-size: 48px; color: var(--primary); }

/* ---------- layout ---------- */
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.with-nav .scroll { padding-bottom: calc(96px + var(--safe-bottom)); }
.topbar { display: flex; align-items: center; gap: 4px; padding: 16px 16px 4px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar h1 { font-size: 22px; font-weight: 800; }
.topbar .sub { font-size: 13px; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; flex-shrink: 0; }
.icon-btn:focus-visible, .btn:focus-visible, .chip:focus-visible, .check:focus-visible, a:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { min-height: 52px; border-radius: 14px; border: 0; padding: 0 18px; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-rose { background: var(--rose); color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--line-2); color: var(--ink); font-weight: 700; }
.btn-danger { background: #9B1C31; color: #fff; }
.btn-danger:disabled { opacity: .45; }
.aceite { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--ink); cursor: pointer; }
.aceite input { width: 22px; height: 22px; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--primary); }
.aceite a { color: var(--rose); font-weight: 800; }
.btn-ghost { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-white { background: #fff; color: var(--primary); }
.btn[disabled] { opacity: .6; cursor: default; }
.link-btn { background: none; border: 0; color: var(--rose); font-weight: 800; font-size: 14px; min-height: 40px; padding: 0; text-align: left; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 15px; font-weight: 800; }
.input { height: 52px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; padding: 0 16px; font-size: 16px; width: 100%; }
textarea.input { height: auto; padding: 12px 16px; resize: vertical; min-height: 88px; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.code-input { letter-spacing: 10px; text-align: center; font-size: 26px; font-weight: 800; }
.hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.error { font-size: 14px; color: #9B1C31; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--line-2); background: #fff; font-size: 15px; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips.small .chip { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 18px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hero { background: var(--primary); color: #fff; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.hero .muted { color: var(--on-primary-muted); }
.big-number { font-size: 34px; font-weight: 800; line-height: 1.1; }
.bar { height: 8px; border-radius: 4px; background: #5B7886; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--pink); }
.bar.light { height: 6px; background: var(--soft); }
.bar.light > span { background: var(--primary); }
.hero-row { min-height: 40px; display: flex; align-items: center; justify-content: space-between; color: #fff; text-decoration: none; border-top: 1px solid #5B7886; padding-top: 10px; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; }

.section-title { font-size: 18px; font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; min-height: 80px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--ink); text-align: left; }
.cat-card .name { font-size: 14px; font-weight: 800; line-height: 1.25; }
.cat-card .count { font-size: 12px; font-weight: 700; color: var(--muted); }

.row-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; width: 100%; text-align: left; }
.row-link .t { font-size: 15px; font-weight: 700; }
.row-link .s { font-size: 13px; color: var(--muted); }

/* ---------- item list ---------- */
.item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px 8px 4px; display: flex; align-items: center; gap: 6px; }
.check { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; }
.check .box { width: 28px; height: 28px; border-radius: 9px; border: 2px solid #B9ADA2; background: #fff; display: flex; align-items: center; justify-content: center; }
.check[aria-pressed="true"] .box { background: var(--primary); border-color: var(--primary); }
.check[data-status="presente"] .box { background: var(--rose); border-color: var(--rose); }
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); padding: 6px 0; background: none; border: 0; text-align: left; }
.item .name { font-size: 15px; font-weight: 800; }
.item.done .name { color: var(--muted); }
.item.outro-escolhido { opacity: .55; }
.item .meta { font-size: 13px; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 8px; }
.tag-ess { color: var(--rose-ink); background: var(--rose-soft); }
.tag-grp { color: var(--primary-ink); background: var(--primary-soft); }
.tag-warn { color: #6B4A00; background: #FBE9C2; }
.tag-gift { color: var(--rose-ink); background: var(--rose-soft); }
.tag-neutral { color: var(--ink-2); background: var(--soft); }
.skip { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); background: transparent; text-align: left; width: 100%; }
.skip .name { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.skip .why { font-size: 13px; color: var(--muted); }

/* ---------- item detail ---------- */
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 22px; border: 1.5px solid var(--line-2); background: #fff; font-size: 22px; font-weight: 700; }
.stepper button.plus { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper .n { width: 30px; text-align: center; font-size: 20px; font-weight: 800; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar span { font-family: var(--script); font-size: 15px; font-weight: 700; color: #fff; }
.warn { background: var(--warn-bg); border-radius: 18px; padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; color: var(--warn-ink); }
.warn b { display: block; font-size: 14px; }
.warn p { font-size: 14px; line-height: 1.5; }
.brand { font-size: 14px; font-weight: 700; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; padding: 8px 14px; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.status-grid .chip { border-radius: 12px; }

/* ---------- store mode ---------- */
.store-head { background: var(--primary); color: #fff; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; z-index: 5; }
.store-head h1 { font-size: 26px; font-weight: 800; }
.store-head .icon-btn svg { stroke: #fff; }
.chip-on-dark { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px solid #A9BDC5; background: transparent; color: #fff; font-weight: 700; font-size: 14px; }
.chip-on-dark[aria-pressed="true"] { background: #fff; color: var(--primary); border-color: #fff; font-weight: 800; }
.store-list { background: #fff; flex: 1; padding: 0 20px calc(110px + var(--safe-bottom)); }
.store-cat { margin: 18px 0 4px; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--rose); }
.store-item { width: 100%; min-height: 64px; border-bottom: 1px solid #EFE8E0; display: flex; align-items: center; gap: 4px; }
.store-tick { border: 0; background: transparent; padding: 10px 10px 10px 0; min-height: 64px; display: flex; align-items: center; flex-shrink: 0; }
.store-body { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; min-height: 64px; display: flex; align-items: center; gap: 12px; text-align: left; color: inherit; }
.store-item .box { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; border: 2.5px solid #B9ADA2; display: flex; align-items: center; justify-content: center; }
.store-item[data-on="true"] .box { background: var(--primary); border-color: var(--primary); }
.store-item[data-on="true"] .nm { text-decoration: line-through; color: var(--muted); }
.store-item[hidden], .store-grp[hidden], #loja-vazio[hidden] { display: none; }
.store-busca {height: 44px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); padding: 0 14px; font-size: 16px; width: 100%; }
.store-filtros { display: flex; gap: 8px; align-items: center; }
.store-cat-sel { flex: 1; min-width: 0; height: 40px; border-radius: 20px; border: 1.5px solid #A9BDC5; background: transparent; color: #fff; font-weight: 700; font-size: 14px; padding: 0 12px; }
.store-cat-sel option { color: var(--ink); }
.store-filtros .chip-on-dark { flex-shrink: 0; }
.store-sub {font-size: 14px; color: var(--on-primary-muted); margin-top: -4px; }
.store-item .q small { font-size: 13px; font-weight: 700; margin-right: 3px; }
.qtd-modal-row { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0; }
.qtd-modal-row .n { min-width: 90px; text-align: center; font-size: 28px; font-weight: 800; }
.qtd-modal-row .n small { font-size: 16px; font-weight: 700; color: var(--muted); }
.qtd-modal-row button { width: 52px; height: 52px; border-radius: 26px; border: 1.5px solid var(--line-2); background: #fff; font-size: 26px; font-weight: 700; color: var(--ink); }
.qtd-modal-row button.plus { background: var(--primary); border-color: var(--primary); color: #fff; }
.perfil-gastos { display: flex; align-items: center; gap: 14px; background: var(--rose-soft); border-radius: 20px; padding: 16px; text-decoration: none; color: #5B2235; }
.perfil-gastos .ic { width: 44px; height: 44px; border-radius: 22px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--rose); }
.perfil-gastos .t { display: block; font-size: 17px; font-weight: 800; color: var(--ink); }
.perfil-gastos .s { display: block; font-size: 14px; line-height: 1.35; }
.store-item .nm { font-size: 18px; font-weight: 800; display: block; }
.store-item .br { font-size: 14px; color: var(--muted); display: block; }
.store-item .q { font-size: 20px; font-weight: 800; color: var(--primary); flex-shrink: 0; }
.bottom-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(16px + var(--safe-bottom)); background: #fff; border-top: 1px solid #EFE8E0; z-index: 6; }
.bottom-cta > * { max-width: 520px; margin: 0 auto; }

/* ---------- offer ---------- */
.offer { background: var(--primary); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; color: #fff; }
.offer .kicker { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); background: var(--pink); border-radius: 6px; padding: 4px 10px; }
.offer .title-script { font-family: var(--script); font-size: 30px; font-weight: 700; line-height: 1.1; }
.offer h2 { font-size: 22px; font-weight: 800; line-height: 1.25; }
.offer p { font-size: 15px; line-height: 1.55; color: #E3ECEF; }
.offer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.offer li { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.offer .later { align-self: center; background: none; border: 0; color: #E3ECEF; font-weight: 700; font-size: 14px; min-height: 44px; }

/* ---------- nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(10px + var(--safe-bottom)); z-index: 6; }
.nav-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.nav a[aria-current="page"] { color: var(--rose); font-weight: 800; }

/* ---------- misc ---------- */
.progress-steps { height: 6px; border-radius: 3px; background: #E8DED4; }
.progress-steps > span { display: block; height: 100%; border-radius: 3px; background: var(--rose); }
.notice { background: var(--rose-soft); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; color: #5B2235; text-decoration: none; border: 0; text-align: left; width: 100%; font-size: 14px; line-height: 1.4; }
.ios-tip { background: var(--primary-soft); border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.5; color: var(--primary-ink); display: flex; flex-direction: column; gap: 8px; }
.empty { text-align: center; color: var(--muted); font-size: 15px; padding: 24px 8px; }

#toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .2s ease; max-width: 90vw; z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(43, 58, 66, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.modal { background: var(--bg); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 20px 20px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.modal h2 { font-size: 20px; font-weight: 800; }

.login-wrap { flex: 1; display: flex; flex-direction: column; padding: 48px 28px 32px; gap: 26px; }
.brand-mark { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 12px; text-align: center; }
.brand-mark .circle { width: 96px; height: 96px; border-radius: 48px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.brand-mark .circle span { font-family: var(--script); font-size: 40px; font-weight: 700; color: #fff; }
.brand-mark .check-word { font-family: var(--script); font-size: 40px; font-weight: 600; line-height: 1; }
.brand-mark h1 { font-size: 24px; font-weight: 800; letter-spacing: 1.5px; color: var(--rose); text-transform: uppercase; }
.brand-mark p { font-size: 16px; line-height: 1.5; color: var(--ink-2); max-width: 300px; }

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tamanho-bebe { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; line-height: 1.35; }
.tamanho-bebe .tb-medida { font-size: 15px; font-weight: 800; color: var(--rose); }
.tamanho-bebe .tb-comp { font-size: 14px; font-weight: 600; color: var(--muted); }
.mala-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.mala-card .ic { width: 44px; height: 44px; border-radius: 22px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); }
.mala-card .t { display: block; font-size: 16px; font-weight: 800; }
.mala-card .s { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); }
.mala-aviso-ic { width: 64px; height: 64px; border-radius: 32px; background: var(--rose-soft); color: var(--rose); display: flex; align-items: center; justify-content: center; }
.mala-aviso-ic svg { width: 32px; height: 32px; }
.mala-secao { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--rose); margin-bottom: 4px; }
.mala-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; border: 0; border-top: 1px solid var(--soft); background: none; padding: 8px 0; text-align: left; color: var(--ink); }
.mala-secao + .mala-item { border-top: 0; }
.mala-item .box { width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; border: 2.5px solid #B9ADA2; display: flex; align-items: center; justify-content: center; }
.mala-item[aria-pressed="true"] .box { background: var(--primary); border-color: var(--primary); }
.mala-item .nm { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.mala-item[aria-pressed="true"] .nm { color: var(--muted); text-decoration: line-through; }
.mala-item .q { font-size: 13px; font-weight: 700; color: var(--muted); flex-shrink: 0; text-align: right; }
