/* Wrapped in Secret — "Playful Pop". Phone first; the same look as the app.
   Colors are tokens; each group's occasion sets --occ and --occ2 on its screens. */

:root {
  --bg: #FFFBF5;
  --card: #FFFFFF;
  --ink: #2B2320;
  --muted: #7A6B64;
  --line: #EFE4DA;
  --coral: #EE4A52;
  --coral-deep: #CC343C;
  --teal: #14A89E;
  --gold: #F5B83D;
  --soft: #FFF1E8;
  --occ: var(--coral);
  --occ2: var(--teal);
  --ok: #1F8A5B;
  --danger: #C8323A;
  --shadow: 0 1px 2px rgba(60, 30, 20, .06), 0 6px 20px rgba(60, 30, 20, .07);
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1715; --card: #272120; --ink: #F6EEE8; --muted: #B5A69E; --line: #3A312D;
    --soft: #33292520; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1715; --card: #272120; --ink: #F6EEE8; --muted: #B5A69E; --line: #3A312D;
  --soft: #33292520; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { 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);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--occ); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.8rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Layout */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.screen { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px 16px 110px; flex: 1; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  max-width: 560px; margin: 0 auto; width: 100%;
}
.topbar h1 { font-size: 1.15rem; margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--card);
  box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; flex: none;
}
.iconbtn svg { width: 22px; height: 22px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabs a {
  flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 650; padding: 6px 0; border-radius: 12px;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--coral); }

/* Cards and lists */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.hero-card {
  border-radius: 24px; padding: 20px; margin: 0 0 16px; color: #fff;
  background: linear-gradient(135deg, var(--occ), color-mix(in srgb, var(--occ) 55%, var(--occ2)));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--occ) 35%, transparent);
  position: relative; overflow: hidden;
}
.hero-card .kicker { font-size: .82rem; font-weight: 700; opacity: .9; text-transform: uppercase; letter-spacing: .06em; }
.hero-card .big { font-size: 1.9rem; font-weight: 850; line-height: 1.1; margin: 4px 0 6px; }
.hero-card .btn { background: #fff; color: var(--occ); }
.hero-card .btn.ghost { background: rgba(255,255,255,.18); color: #fff; }
.hero-card .emoji { position: absolute; right: -6px; bottom: -14px; font-size: 92px; opacity: .22; transform: rotate(-12deg); pointer-events: none; }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; overflow-wrap: anywhere; }
.row .sub { color: var(--muted); font-size: .88rem; }
a.row { color: inherit; text-decoration: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--occ2);
}
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px;
  font-size: .76rem; font-weight: 750; background: var(--soft); color: var(--ink); white-space: nowrap;
}
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge.wait { background: color-mix(in srgb, var(--gold) 26%, transparent); color: #8a5a00; }
.badge.occ { background: color-mix(in srgb, var(--occ) 14%, transparent); color: var(--occ); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 13px;
  font-weight: 650; cursor: pointer; font-size: .92rem;
}
.chip.on { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 10%, var(--card)); color: var(--coral); }

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--coral); color: #fff; font-weight: 750; border-radius: 14px; padding: 13px 18px;
  text-decoration: none; min-height: 48px; transition: transform .08s ease, filter .15s;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.04); }
.btn.block { width: 100%; }
.btn.teal { background: var(--teal); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: .9rem; border-radius: 11px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns .btn { flex: 1; }

label.field { display: block; margin: 0 0 14px; font-weight: 700; font-size: .92rem; }
label.field .hint { font-weight: 500; color: var(--muted); }
.input, select.input, textarea.input {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px; border-radius: 13px;
  border: 1.5px solid var(--line); background: var(--card); min-height: 48px; font-weight: 500;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 18%, transparent); }
.code-input { font-size: 1.8rem; letter-spacing: .4em; text-align: center; font-weight: 800; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch input { width: 46px; height: 28px; accent-color: var(--coral); }

/* Wishlist items */
.item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .thumb {
  width: 48px; height: 48px; border-radius: 13px; flex: none; display: grid; place-items: center;
  font-size: 1.5rem; background: var(--soft);
}
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 700; overflow-wrap: anywhere; }
.item .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.item .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.stars { color: var(--gold); letter-spacing: 1px; }
.taken { opacity: .55; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.mine { align-self: flex-end; background: var(--occ); color: #fff; border-bottom-right-radius: 6px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble .when { display: block; font-size: .72rem; opacity: .7; margin-top: 2px; }
.bubble .report { font-size: .72rem; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; margin-left: 6px; }
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; background: var(--card);
  border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.composer form { max-width: 560px; margin: 0 auto; display: flex; gap: 8px; }
.composer .input { margin: 0; flex: 1; min-height: 46px; }

/* Landing */
.landing-hero { text-align: center; padding: 34px 6px 10px; }
.landing-hero img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px rgba(238,74,82,.35); }
.landing-hero h1 { font-size: 2.3rem; margin-top: 18px; }
.landing-hero .tag { font-size: 1.12rem; color: var(--muted); max-width: 26em; margin: 0 auto 18px; }
.occasion-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 8px; }
.occasion-cloud span { padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: .9rem; background: var(--card); box-shadow: var(--shadow); }
.steps { counter-reset: s; display: grid; gap: 12px; }
.steps .card { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.steps .num { counter-increment: s; width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--coral); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps .num::before { content: counter(s); }
.promise { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.promise .card { margin: 0; text-align: center; padding: 14px 10px; }
.promise .card b { display: block; font-size: 1.4rem; }
.store-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* Modal, toast, empty states */
.backdrop { position: fixed; inset: 0; background: rgba(30, 15, 10, .45); z-index: 30; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .2s ease; max-height: 88vh; overflow: auto; }
@media (min-width: 640px) { .backdrop { align-items: center; } .sheet { border-radius: 24px; } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 14px; z-index: 40; font-weight: 650; max-width: calc(100% - 32px); box-shadow: var(--shadow); animation: up .2s ease; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty .art { font-size: 54px; margin-bottom: 6px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
.notice { background: color-mix(in srgb, var(--gold) 18%, var(--card)); border-radius: 14px; padding: 12px 14px; font-size: .92rem; margin: 0 0 14px; }
.disclosure { font-size: .8rem; color: var(--muted); text-align: center; margin: 14px 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes up { from { transform: translateY(14px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Gift reveal */
.reveal-box { font-size: 86px; text-align: center; cursor: pointer; user-select: none; animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

/* Plain pages (privacy, terms) */
body.page { background: var(--bg); }
.page-head { max-width: 720px; margin: 0 auto; padding: 18px 16px 0; }
.page-head .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.page-head .brand img { border-radius: 9px; }
.prose { max-width: 720px; margin: 0 auto; padding: 18px 16px 30px; }
.prose h1 { font-size: 2rem; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin: .3em 0; }
.foot { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

/* Toggle rows ("I've got my gift", email reminders) */
.switch .title { font-weight: 700; }
.switch .sub { color: var(--muted); font-size: .88rem; }
.switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; border-radius: 99px;
  background: var(--line); position: relative; cursor: pointer; transition: background .15s;
}
.switch input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.switch input[type="checkbox"]:checked { background: var(--ok); }
.switch input[type="checkbox"]:checked::after { transform: translateX(20px); }
.switch input[type="checkbox"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--coral) 40%, transparent); outline-offset: 2px; }

/* Plain pages: top links and the FAQ */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-nav { display: flex; align-items: center; gap: 14px; }
.page-nav a { font-weight: 700; color: var(--ink); text-decoration: none; }
.page-nav a.btn { color: #fff; }
details.faq { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin: 0 0 10px; }
details.faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--coral); font-weight: 700; }
details.faq[open] summary::after { content: "−"; }
details.faq > div { padding: 0 16px 14px; color: var(--ink); }

/* Front page */
.landing-top { max-width: 960px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
@media (max-width: 400px) { .landing-top .brand span.long { display: none; } .landing-top nav { gap: 12px; } }
.landing-top .brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); text-decoration: none; }
.landing-top .brand img { border-radius: 8px; }
.landing-top nav { display: flex; gap: 16px; }
.landing-top nav a { font-weight: 700; color: var(--ink); text-decoration: none; }
.screen.landing { max-width: 760px; }
.section-title { margin-top: 34px; text-align: center; font-size: 1.5rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.features .card { margin: 0; }
.feature-emoji { font-size: 30px; margin-bottom: 6px; }
.feature h3 { margin-bottom: 4px; }
.feature p { margin: 0; font-size: .95rem; }
.card.highlight { margin-top: 26px; background: color-mix(in srgb, var(--teal) 10%, var(--card)); }
.store-badge { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 10px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); text-decoration: none; min-width: 150px; }
.store-badge b { font-size: 1.05rem; }
.store-badge span { font-size: .8rem; opacity: .8; }
.store-badge.soon { background: var(--soft); color: var(--muted); }
@media (min-width: 700px) { .steps { grid-template-columns: 1fr 1fr; } .landing-hero h1 { font-size: 2.6rem; } }

/* Invite page: the group code to type into the app */
.invite-code { font-size: 2rem; font-weight: 850; letter-spacing: .28em; text-align: center; padding: 14px 8px 14px calc(8px + .28em); margin: 4px 0 8px; border: 2px dashed var(--occ); border-radius: 16px; font-variant-numeric: tabular-nums; word-break: break-all; }
.join-steps { padding-left: 1.3em; margin: 0 0 10px; line-height: 1.6; }
