:root {
  --bg: #fff6ee; --surface: #ffffff; --ink: #2b2433; --muted: #7a7184; --line: #f0e2d4;
  --brand: #ff7a59; --brand-ink: #ffffff; --accent: #8e7dff; --ok: #2ec4b6; --warn: #ffe8a3;
  --radius: 18px; --shadow: 0 4px 14px rgba(120, 70, 30, .08);
  --n0: #ffe3d6; --n1: #fff1b8; --n2: #d6f5ef; --n3: #e4defe; --n4: #ffd9e6; --n5: #d9f1fb;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1826; --surface: #2a2336; --ink: #f5eefc; --muted: #b3a8c4; --line: #3a3149;
    --warn: #5b4a14; --shadow: 0 4px 14px rgba(0, 0, 0, .35);
    --n0: #5a3a2f; --n1: #5a5026; --n2: #24504b; --n3: #3d3667; --n4: #5e3347; --n5: #28485a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1.02rem; }
a { color: var(--accent); }
.muted { color: var(--muted); margin: 0; }
.stack { display: grid; gap: 12px; }
.stack > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.center { text-align: center; display: grid; gap: 14px; justify-items: center; padding-top: 12vh; }

.view { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 14px; align-content: start; }
.view.narrow { padding-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.banner { background: var(--warn); font-size: .82rem; text-align: center; padding: 6px 12px; }

/* formulários */
input, select, textarea { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 11px 12px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; }
.field { display: grid; gap: 6px; }
.label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.error { color: #d6336c; margin: 0; min-height: 0; }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 14px; padding: 11px 16px; cursor: pointer; text-decoration: none; text-align: center; display: inline-block; white-space: nowrap; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.btn-primary:active { transform: translateY(2px); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-icon { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px 8px; border-radius: 8px; }
.btn-icon:hover { background: var(--bg); color: #d6336c; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* pickers e chips */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { font-size: 1.5rem; width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.pick.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--surface)); transform: scale(1.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font: inherit; color: inherit; }
button.chip { cursor: pointer; }
.chip.warn { background: var(--warn); border-color: transparent; padding: 6px 12px; width: fit-content; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: .9rem; }
.who { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .9rem; }

/* landing */
.landing { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 18px 0 6px; }
.logo { font-size: 3.2rem; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 28px; background: color-mix(in srgb, var(--brand) 20%, var(--surface)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.trip-link { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.cover { font-size: 1.8rem; }

/* cabeçalho e navegação */
.app-header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; min-width: 0; }
.hname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 48px; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.menu-pop p { margin: 0; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; max-width: 108px; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 700; }
.tab .ti { font-size: 1.4rem; filter: grayscale(.8); transition: transform .15s; }
.tab.active { color: var(--brand); }
.tab.active .ti { filter: none; transform: translateY(-2px) scale(1.15); }

/* início */
.hero { text-align: center; display: grid; gap: 8px; justify-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), var(--surface)); }
.hero-cover { font-size: 3rem; }
.countdown { display: grid; justify-items: center; margin-top: 6px; }
.big { font-size: 3.6rem; font-weight: 900; line-height: 1; color: var(--brand); }
.cl { font-weight: 700; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: .82rem; font-weight: 700; }

/* listas */
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.place { display: grid; gap: 8px; }
.meta { margin: 0; font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.note-text { margin: 0; overflow-wrap: anywhere; }
.react { font: inherit; background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.react.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.react b { font-size: .85rem; }
.day-select { width: auto; padding: 6px 10px; margin-left: auto; font-size: .85rem; }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; margin: 0; }
.empty.small { padding: 4px; text-align: left; }
.day-n { color: var(--brand); }
.plan-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }

/* checklist e compras */
.item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.item .check { flex: 1; min-width: 55%; }
.item .meta { flex-basis: 100%; order: 3; padding-left: 36px; margin-top: -6px; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: .15s; }
.check input:checked + .box { background: var(--ok); border-color: var(--ok); }
.check input:checked + .box::after { content: "✓"; color: #fff; font-weight: 900; }
.check input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }
.item.done .txt { text-decoration: line-through; color: var(--muted); }
.bar { height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--ok)); transition: width .4s; }

/* mural */
.notes-grid { columns: 2 150px; column-gap: 12px; }
.note { break-inside: avoid; margin-bottom: 12px; padding: 14px; border-radius: 6px 6px 18px 6px; box-shadow: var(--shadow); display: grid; gap: 8px; color: var(--ink); }
.note:nth-child(odd) { transform: rotate(-1deg); } .note:nth-child(even) { transform: rotate(1deg); }
.note-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }
.note-foot { display: flex; justify-content: space-between; align-items: center; }
.c0 { background: var(--n0); } .c1 { background: var(--n1); } .c2 { background: var(--n2); }
.c3 { background: var(--n3); } .c4 { background: var(--n4); } .c5 { background: var(--n5); }
.dots { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.dot { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.dot.on { border-color: var(--ink); }

/* diálogo, toast, confete */
.dlg { border: 0; border-radius: 24px; padding: 24px; background: var(--surface); color: var(--ink); max-width: min(92vw, 420px); text-align: center; }
.dlg::backdrop { background: rgba(20, 10, 30, .55); }
.dlg .row { justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.big-pick { font-size: 1.8rem; margin: 8px 0; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 30; transition: opacity .3s; }
.toast.out { opacity: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .note { transform: none !important; } }
@media (min-width: 700px) { .tabbar { max-width: 640px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; } }

.gbtn { min-height: 44px; display: flex; justify-content: center; }
.center-box { text-align: center; justify-items: center; }
.userbar { justify-content: space-between; }
.btn.danger { color: #d6336c; border-color: color-mix(in srgb, #d6336c 40%, var(--line)); }
