/* Boasty — palette: grape #6C3BFF, gold #FFC23D, coral #FF6B6B, mint #1FC8A0, ink #1D1640, cream #FFF8EE */
@font-face { font-family: "Fredoka"; src: url(fonts/Fredoka.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(fonts/Nunito.ttf) format("truetype"); font-weight: 200 1000; font-display: swap; }
:root {
  --grape: #6C3BFF; --grape-d: #4B1FD1; --grape-l: #EEE7FF;
  --gold: #FFC23D; --coral: #FF6B6B; --mint: #1FC8A0;
  --ink: #1D1640; --muted: #6E6890; --line: #ECE6F7;
  --bg: #FFF8EE; --card: #FFFFFF; --r: 20px;
  --shadow: 0 6px 20px rgba(45, 20, 120, .08);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Nunito, system-ui, sans-serif; font-size: 16px; }
body { min-height: 100dvh; }
h1, h2, h3, .wordmark, .btn, .stat b { font-family: Fredoka, Nunito, sans-serif; }
h1 { font-size: 28px; margin: 4px 0 6px; line-height: 1.1; }
h2 { font-size: 20px; margin: 22px 0 10px; }
h3 { font-size: 17px; margin: 0; }
p { line-height: 1.5; }
a { color: var(--grape); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  background: rgba(255, 248, 238, .92); backdrop-filter: blur(10px); }
.wordmark { font-size: 30px; font-weight: 700; text-decoration: none; letter-spacing: -.5px;
  background: linear-gradient(90deg, var(--grape), #B03BFF 60%, var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark .spark { color: var(--gold); -webkit-text-fill-color: var(--gold); font-size: 18px; vertical-align: super; margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; gap: 8px; }
.icon-btn { border: 0; background: var(--card); width: 38px; height: 38px; border-radius: 12px; font-size: 26px; line-height: 1; box-shadow: var(--shadow); color: var(--ink); cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--grape-l); color: var(--grape-d); font-weight: 800; font-size: 13px; text-decoration: none; }

.view { padding: 4px 18px calc(110px + var(--safe-b)); outline: none; }
.no-tabs .view { padding-bottom: 40px; }

/* Tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 8px 8px calc(10px + var(--safe-b));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(45, 20, 120, .06); border-radius: 22px 22px 0 0; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 800; }
.tabbar a span { font-size: 21px; filter: grayscale(1); opacity: .6; }
.tabbar a.on { color: var(--grape); }
.tabbar a.on span { filter: none; opacity: 1; }
.tabbar .fab span { filter: none; opacity: 1; width: 56px; height: 56px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 700;
  background: linear-gradient(135deg, var(--grape), #B03BFF); box-shadow: 0 8px 20px rgba(108, 59, 255, .45); }
.no-tabs .tabbar { display: none; }

/* Buttons + forms */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 16px; padding: 14px 18px; font-size: 17px; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--grape); color: #fff; box-shadow: 0 6px 16px rgba(108, 59, 255, .3); width: 100%; }
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 16px rgba(255, 194, 61, .4); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.danger { background: #fff; color: #D33; border: 2px solid #F7C9C9; box-shadow: none; }
.btn.sm { padding: 9px 14px; font-size: 14px; width: auto; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
label.field { display: block; margin: 12px 0; font-weight: 800; font-size: 14px; }
label.field > span.hint { font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; margin-top: 6px; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 600; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--grape); }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: #fff; border-radius: 14px; border: 2px solid var(--line); margin: 10px 0; font-size: 14px; line-height: 1.4; }
.check input { width: 22px; height: 22px; accent-color: var(--grape); flex: none; margin-top: 1px; }
.check b { display: block; }

/* Cards */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
.hero { border-radius: 26px; padding: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #B03BFF 0%, var(--grape) 45%, var(--grape-d) 100%); box-shadow: 0 14px 30px rgba(75, 31, 209, .3); position: relative; overflow: hidden; }
.hero::after { content: "✦"; position: absolute; right: 18px; top: 8px; font-size: 54px; color: var(--gold); opacity: .9; }
.hero h1 { font-size: 30px; }
.hero p { opacity: .92; margin: 6px 0 0; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; }
.badge.sample { background: #FFF1C9; color: #8A5A00; }
.badge.soon { background: #EDEBF3; color: var(--muted); }
.badge.hot { background: #FFE1E1; color: #C42F2F; }
.badge.grade { background: var(--ink); color: var(--gold); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: rgba(255,255,255,.16); border-radius: 16px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; }
.stat small { opacity: .85; font-weight: 700; font-size: 12px; }
.up { color: #19A97F; font-weight: 900; }
.hero .up { color: #9BFFDF; }
.down { color: #D33; font-weight: 900; }

/* Hobby picker */
.search { position: relative; }
.search input { padding-left: 42px; }
.search::before { content: "🔎"; position: absolute; left: 14px; top: 19px; font-size: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 13px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: 13px; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--grape); border-color: var(--grape); color: #fff; }
.hobby { background: #fff; border-radius: 18px; box-shadow: var(--shadow); margin: 10px 0; overflow: hidden; border: 2px solid transparent; }
.hobby.picked { border-color: var(--grape); }
.hobby-head { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; }
.hobby-emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex: none; }
.hobby-head .grow { flex: 1; min-width: 0; }
.hobby-head small { color: var(--muted); font-weight: 700; }
.tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; color: #fff; flex: none; }
.picked .tick { background: var(--grape); border-color: var(--grape); }
.subs { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 14px 72px; }
.hobby.soon .hobby-head { opacity: .8; }
.soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soon-tile { background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); font-weight: 800; font-size: 14px; }
.soon-tile .e { font-size: 24px; }
.soon-tile button { margin-top: 8px; width: 100%; border: 0; border-radius: 10px; padding: 7px; font-weight: 800; background: var(--grape-l); color: var(--grape-d); cursor: pointer; font-family: inherit; }
.soon-tile button.on { background: var(--mint); color: #fff; }
.sticky-cta { position: sticky; bottom: calc(86px + var(--safe-b)); margin-top: 16px; }
.no-tabs .sticky-cta { bottom: 16px; }

/* Collection */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; }
.thumb { aspect-ratio: 1 / 1; width: 100%; display: grid; place-items: center; font-size: 54px; position: relative; background-size: cover; background-position: center; }
.thumb .badge { position: absolute; left: 8px; top: 8px; }
.item .meta { padding: 10px 12px 12px; }
.item .meta h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta .v { font-weight: 900; margin-top: 3px; font-size: 14px; }
.totals .t-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.totals .t-row:last-child { border: 0; }
.bar { height: 8px; border-radius: 99px; background: var(--grape-l); overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--grape), var(--coral)); border-radius: 99px; }
.empty { text-align: center; padding: 30px 10px; }
.empty .big { font-size: 64px; }

/* Item detail */
.detail-photo { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.detail-photo .thumb { font-size: 120px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv div { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.kv small { display: block; color: var(--muted); font-weight: 800; font-size: 12px; }
.kv b { font-family: Fredoka, sans-serif; font-size: 18px; }

/* Feed */
.post { background: #fff; border-radius: 22px; box-shadow: var(--shadow); margin: 14px 0; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-family: Fredoka, sans-serif; flex: none; }
.post-head .grow { flex: 1; min-width: 0; line-height: 1.2; }
.post-head small { color: var(--muted); font-weight: 700; }
.post .thumb { aspect-ratio: 4 / 3; font-size: 90px; }
.post-body { padding: 12px 14px 14px; }
.post-body p { margin: 6px 0 10px; }
.post-actions { display: flex; gap: 8px; }
.post-actions button { border: 0; background: var(--bg); border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink); }
.post-actions button.on { background: #FFE1E1; color: #C42F2F; }
.banner { background: #FFF1C9; color: #6B4600; border-radius: 16px; padding: 12px 14px; font-size: 13.5px; font-weight: 700; margin: 8px 0 4px; }

/* Profile */
.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-top .avatar { width: 64px; height: 64px; font-size: 26px; }
.list a, .list button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; font-weight: 800; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.list > :last-child { border-bottom: 0; }
.list .chev { margin-left: auto; color: var(--muted); }
.switch { margin-left: auto; position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #DCD6EA; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--mint); }
.switch input:checked + i::after { left: 23px; }

/* Privacy */
.policy h2 { font-size: 18px; margin-top: 22px; }
.policy li { margin: 6px 0; line-height: 1.5; }
.callout { border-left: 5px solid var(--grape); background: var(--grape-l); padding: 12px 14px; border-radius: 0 14px 14px 0; font-weight: 700; }

/* Onboarding */
.onb { padding-top: 6px; }
.onb-hero { text-align: center; padding: 18px 8px 6px; }
.onb-hero .trophy { font-size: 78px; filter: drop-shadow(0 10px 18px rgba(108,59,255,.3)); }
.onb-hero h1 { font-size: 34px; }
.floaters { display: flex; justify-content: center; gap: 10px; font-size: 30px; margin: 4px 0 8px; }
.floaters span { background: #fff; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; box-shadow: var(--shadow); }
.floaters span:nth-child(odd) { transform: rotate(-8deg); }
.floaters span:nth-child(even) { transform: rotate(7deg) translateY(4px); }
.steps { display: flex; gap: 6px; justify-content: center; margin: 8px 0; }
.steps i { width: 26px; height: 6px; border-radius: 9px; background: var(--line); }
.steps i.on { background: var(--grape); }

/* Photo upload */
.photo-drop { display: grid; place-items: center; aspect-ratio: 16 / 10; border: 2.5px dashed #CFC4F2; border-radius: 20px; background: #fff; cursor: pointer; text-align: center; color: var(--muted); font-weight: 800; background-size: cover; background-position: center; overflow: hidden; }
.photo-drop .e { font-size: 40px; }
.photo-drop.has { border-style: solid; border-color: var(--grape); }
.photo-drop.has > div { display: none; }

/* Modal + toast */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(29, 22, 64, .55); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.sheet { background: var(--bg); width: 100%; max-width: 520px; border-radius: 26px 26px 0 0; padding: 18px 18px calc(22px + var(--safe-b)); max-height: 94dvh; overflow: auto; }
.sheet canvas { width: 100%; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: block; }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 800; opacity: 0; transition: .25s; z-index: 60; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section-head a { font-weight: 800; font-size: 14px; text-decoration: none; }

/* Crawlable about section: shown on the welcome screen (and without JS), hidden inside the app */
.seo-about { margin: 0 18px 40px; padding: 18px 20px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); font-size: 14px; color: var(--ink); }
.seo-about h2 { margin-top: 0; }
.seo-about p { margin: 8px 0; }
body[data-route]:not([data-route="welcome"]) .seo-about { display: none; }

/* Demo mode */
.topbar { flex-wrap: wrap; }
.demo-bar[hidden] { display: none; }
.demo-bar { flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 -2px;
  padding: 7px 8px 7px 12px; border-radius: 14px; background: #FFF1C9; color: #6B4600; border: 1.5px solid #FFD77A;
  font-size: 13px; font-weight: 800; line-height: 1.25; }
.demo-bar-btn { flex: none; border: 0; border-radius: 10px; padding: 7px 11px; background: var(--grape); color: #fff;
  font: 700 13px Fredoka, Nunito, sans-serif; cursor: pointer; white-space: nowrap; }
.demo-bar-btn:hover { background: var(--grape-d); }
.demo-cta { text-align: center; margin: 4px 0 14px; }
.demo-try { width: 100%; border: 2px solid var(--grape); color: var(--grape-d); font-size: 18px; }
.demo-cta p { margin: 8px 0 12px; }
.demo-cta .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.demo-cta .or::before, .demo-cta .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 360px) { .demo-bar { flex-wrap: wrap; } .demo-bar-btn { width: 100%; } }
