/* ==========================================================================
   Trendly styles. Mobile first.
   ========================================================================== */
:root {
  --cream: #fffaf5;
  --cream-2: #fbf3ec;
  --blush: #f6dfe6;
  --blush-2: #fbeef2;
  --lilac: #e9e2f8;
  --lilac-2: #f3effc;
  --ink: #2b2235;
  --ink-2: #4a4056;
  --muted: #7b7185;
  --line: #eee4dc;
  --rose: #d9587f;
  --plum: #6e4fc2;
  --mint: #1f8a5b;
  --amber: #b26a00;
  --white: #fff;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(43, 34, 53, .04), 0 8px 24px rgba(43, 34, 53, .06);
  --shadow-lg: 0 18px 44px rgba(43, 34, 53, .14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --tabbar-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 10px; }
.skip:focus { left: 8px; }

/* ---------- Demo bar + top bar ---------- */
.demo-bar { padding: 7px 16px; background: var(--ink); color: #f4eef8; font-size: 12.5px; text-align: center; }
.demo-bar a { color: #fff; font-weight: 700; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 250, 245, .92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; padding: 10px 0; }
.logo { font-family: var(--serif); font-size: 27px; font-weight: 600; font-style: italic; letter-spacing: -.02em; text-decoration: none; line-height: 1; }
.logo span { margin-left: 2px; font-style: normal; font-size: .6em; color: var(--rose); vertical-align: super; }
.logo-sm { font-size: 24px; }
.search { position: relative; grid-column: 1 / -1; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 44px; padding: 0 16px 0 42px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: #cdbfe9; box-shadow: 0 0 0 4px var(--lilac-2); }
.mainnav { display: none; }
.count:empty { display: none; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; background: var(--rose); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 1px; }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { stroke: var(--rose); }

/* ---------- Buttons, chips, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { border-color: #d8cbe9; box-shadow: var(--shadow); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #3c3049; border-color: #3c3049; }
.btn-soft { background: var(--lilac-2); border-color: transparent; color: var(--plum); }
.btn-soft:hover { background: var(--lilac); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[aria-pressed="true"].track { background: var(--lilac); color: var(--plum); border-color: transparent; }
.link { background: none; border: 0; padding: 0; color: var(--plum); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin-inline: -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s; }
.chip:hover { border-color: #d8cbe9; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip img { width: 26px; height: 26px; margin-left: -10px; border-radius: 50%; object-fit: cover; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-in { background: #e5f5ec; color: var(--mint); }
.pill-low { background: #fff1db; color: var(--amber); }
.pill-out { background: #fde6ea; color: #b4234d; }
.pill-new { background: var(--lilac); color: var(--plum); }
.pill-new::before { display: none; }
.demo-tag { display: inline-block; padding: 1px 6px; border: 1px solid #d9cfe6; border-radius: 6px; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }

/* ---------- Sections ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.eyebrow { display: inline-block; margin-bottom: 6px; color: var(--rose); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.h2 { font-family: var(--serif); font-size: clamp(27px, 4vw, 40px); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; }
.sub { margin-top: 6px; color: var(--muted); font-size: 15px; }
.see-all { flex: none; color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.see-all:hover { color: var(--rose); }
.page-head { padding: 28px 0 8px; }
.page-head .h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 56px); font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 30px 0 18px; }
.hero::before { content: ""; position: absolute; inset: -20% -30% auto auto; width: 70vw; height: 70vw; max-width: 720px; max-height: 720px; background: radial-gradient(closest-side, var(--lilac), transparent); opacity: .8; pointer-events: none; }
.hero::after { content: ""; position: absolute; left: -25%; bottom: -30%; width: 60vw; height: 60vw; max-width: 600px; max-height: 600px; background: radial-gradient(closest-side, var(--blush), transparent); pointer-events: none; }
.hero-in { position: relative; z-index: 1; display: grid; gap: 28px; }
.hero h1 { font-family: var(--serif); font-size: clamp(44px, 10vw, 88px); font-weight: 500; line-height: .98; letter-spacing: -.035em; }
.hero h1 em { font-style: italic; color: var(--rose); }
.hero p { max-width: 30em; margin-top: 16px; color: var(--ink-2); font-size: clamp(16px, 2.2vw, 19px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-cta .btn { flex: 1 1 auto; }
.hero-art { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; height: 340px; }
.hero-art a { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--blush-2); box-shadow: var(--shadow); }
.hero-art a:first-child { grid-row: span 2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-art a:hover img { transform: scale(1.04); }
.hero-art span { position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; background: rgba(255, 255, 255, .92); border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.hero-stat { position: absolute; z-index: 2; right: 10px; top: 10px; padding: 8px 12px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 12.5px; font-weight: 600; }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; padding: 4px 16px 10px; margin-inline: -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; animation: rise .45s ease both; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: linear-gradient(110deg, var(--blush-2) 30%, var(--lilac-2) 50%, var(--blush-2) 70%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-media.loaded { animation: none; background: var(--blush-2); }
.card:hover .card-media img { transform: scale(1.04); }
.fallback-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: linear-gradient(150deg, var(--blush), var(--lilac)); text-align: center; }
.fallback-art b { font-family: var(--serif); font-size: clamp(20px, 3vw, 28px); font-weight: 500; font-style: italic; line-height: 1.1; }
.card-badges { position: absolute; left: 10px; top: 10px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 64px); }
.card-badges .pill { background-color: rgba(255, 255, 255, .94); }
.heart { position: absolute; right: 10px; top: 10px; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; background: rgba(255, 255, 255, .94); border: 0; border-radius: 50%; box-shadow: 0 2px 10px rgba(43, 34, 53, .12); transition: transform .15s; }
.heart svg { width: 21px; height: 21px; fill: none; stroke: var(--ink); stroke-width: 1.9; }
.heart[aria-pressed="true"] svg { fill: var(--rose); stroke: var(--rose); }
.heart.pop { animation: pop .35s ease; }
.heart:active { transform: scale(.9); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 10px 2px 0; }
.card-brand { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.card-name { margin-top: 2px; font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-price { margin-top: 6px; font-size: 16px; font-weight: 800; }
.card-price small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.card-store { margin-top: 1px; color: var(--muted); font-size: 12.5px; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions .btn { flex: 1; min-height: 38px; padding: 0 10px; font-size: 13px; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-tile { position: relative; overflow: hidden; display: block; aspect-ratio: 1; border-radius: var(--radius); background: var(--blush-2); text-decoration: none; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(43, 34, 53, .62)); }
.cat-tile b { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; color: #fff; font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.1; }
.cat-tile small { display: block; margin-top: 2px; font-family: var(--sans); font-size: 12.5px; font-weight: 600; opacity: .9; }

/* ---------- Gift tiles ---------- */
.gift-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gift-tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 120px; padding: 16px; border-radius: var(--radius); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.gift-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gift-tile b { font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.05; }
.gift-tile small { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.gift-tile:nth-child(5n+1) { background: var(--blush); }
.gift-tile:nth-child(5n+2) { background: var(--lilac); }
.gift-tile:nth-child(5n+3) { background: #f3e8d9; }
.gift-tile:nth-child(5n+4) { background: #e3eef0; }
.gift-tile:nth-child(5n+5) { background: #efe3f2; }

/* ---------- How it works strip ---------- */
.how { display: grid; gap: 12px; }
.how-card { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.how-card h3 { margin: 8px 0 4px; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.how-card p { color: var(--muted); font-size: 14.5px; }
.how-num { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--lilac); color: var(--plum); border-radius: 50%; font-weight: 800; font-size: 14px; }

/* ---------- Notices, empty, error, loading ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--lilac-2); border: 1px solid #e2d9f5; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; }
.notice b { color: var(--ink); }
.notice-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; background: var(--white); border-radius: 50%; color: var(--plum); font-weight: 800; font-size: 14px; }
.notice.warn { background: #fff6e8; border-color: #f3dfbd; }
.notice.warn .notice-icon { color: var(--amber); }
.empty { padding: 44px 20px; text-align: center; background: var(--white); border: 1px dashed #e0d4cb; border-radius: var(--radius); }
.empty .em-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 12px; background: var(--blush-2); border-radius: 50%; font-size: 26px; }
.empty h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.empty p { max-width: 28em; margin: 6px auto 16px; color: var(--muted); }
.skeleton { height: 140px; border-radius: var(--radius); background: linear-gradient(110deg, var(--blush-2) 30%, var(--lilac-2) 50%, var(--blush-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--lilac); border-top-color: var(--plum); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }

/* ---------- Find It ---------- */
.find-hero { padding: 26px 0 12px; }
.find-box { display: flex; gap: 8px; margin-top: 16px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.find-box input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 0; background: transparent; font-size: 16px; outline: none; }
.find-box .btn { min-height: 46px; }
.try { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.try button { padding: 4px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; }
.try button:hover { border-color: #d8cbe9; }
.result { display: grid; gap: 14px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); animation: rise .4s ease both; }
.result + .result { margin-top: 14px; }
.result-top { display: flex; gap: 14px; align-items: center; }
.result-top .thumb { flex: none; position: relative; width: 84px; height: 84px; overflow: hidden; border-radius: var(--radius-sm); background: var(--blush-2); }
.result-top .thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-top .thumb .fallback-art b { font-size: 12px; }
.result-top h3 { font-size: 17px; line-height: 1.25; }
.result-top h3 a { text-decoration: none; }
.result-top h3 a:hover { text-decoration: underline; }

.offers { width: 100%; border-collapse: collapse; font-size: 14px; }
.offers th { padding: 0 8px 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.offers td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.offers td:first-child, .offers th:first-child { padding-left: 0; }
.offers .price { font-weight: 800; white-space: nowrap; }
.offers .checked { color: var(--muted); font-size: 12.5px; }
.real-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.real-links .label { width: 100%; color: var(--muted); font-size: 13px; }
.ext::after { content: " ↗"; }

/* ---------- Product detail ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 18px; color: var(--muted); font-size: 13.5px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.pdp { display: grid; gap: 22px; padding: 14px 0 10px; }
.pdp-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 26px; background: var(--blush-2); }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-media .photo-note { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; background: rgba(255, 255, 255, .9); border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.pdp h1 { margin-top: 4px; font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); font-weight: 500; line-height: 1.06; letter-spacing: -.02em; }
.pdp .desc { margin-top: 12px; color: var(--ink-2); font-size: 16px; }
.pdp .price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.pdp .price-line b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pdp-actions { display: grid; gap: 10px; margin-top: 18px; }
.save-row { display: flex; gap: 8px; }
.save-row select { flex: 1; min-width: 0; height: 48px; padding: 0 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; }
.panel { margin-top: 22px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { margin-bottom: 10px; font-size: 17px; font-weight: 800; }

/* ---------- Wishlist / alerts ---------- */
.list-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 8px; margin-inline: -16px; scrollbar-width: none; }
.list-tabs::-webkit-scrollbar { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 18px; }
.new-list { display: flex; gap: 8px; flex: 1 1 280px; }
.new-list input { flex: 1; min-width: 0; height: 42px; padding: 0 16px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.item-tools { display: flex; gap: 6px; margin-top: 8px; }
.item-tools select { flex: 1; min-width: 0; height: 36px; padding: 0 10px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; }
.item-tools .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.alert-row { display: grid; grid-template-columns: 72px 1fr; gap: 12px 14px; align-items: center; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); animation: rise .4s ease both; }
.alert-row + .alert-row { margin-top: 10px; }
.alert-row .thumb { position: relative; width: 72px; height: 72px; overflow: hidden; border-radius: var(--radius-sm); background: var(--blush-2); }
.alert-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.alert-row .thumb .fallback-art b { font-size: 11px; }
.alert-row h3 { font-size: 15.5px; line-height: 1.3; }
.alert-row h3 a { text-decoration: none; }
.alert-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.alert-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.alert-actions .btn { flex: 1; }

/* ---------- Gift finder filters ---------- */
.filter-group { margin-top: 14px; }
.filter-group > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.result-count { margin: 18px 0 12px; color: var(--muted); font-size: 14px; font-weight: 600; }

/* ---------- Prose pages ---------- */
.prose { max-width: 720px; padding-bottom: 20px; }
.prose h2 { margin: 26px 0 8px; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* ---------- Footer & toast ---------- */
.footer { margin-top: 40px; padding: 34px 0 26px; background: var(--cream-2); border-top: 1px solid var(--line); }
.footer-in { display: grid; gap: 18px; }
.tagline { margin-top: 6px; color: var(--muted); font-family: var(--serif); font-style: italic; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--rose); }
.fine { color: var(--muted); font-size: 12.5px; max-width: 60em; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); padding: 11px 18px; background: var(--ink); color: #fff; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #f6c6d6; font-weight: 800; white-space: nowrap; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -150% 0; } }
@keyframes pop { 50% { transform: scale(1.22); } }
@keyframes spin { to { transform: rotate(360deg); } }
.view-enter { animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Teen refresh: bold rounded type, stories, vibes, masonry feed, stickers
   ========================================================================== */
:root {
  --display: "Bricolage Grotesque", "Plus Jakarta Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  --pop: linear-gradient(120deg, #ff6fa3 0%, #c77dff 55%, #8f7bff 100%);
  --radius: 24px;
}
.hero h1, .h2, .page-head .h1, .pdp h1, .empty h3, .how-card h3, .gift-tile b, .cat-tile b, .prose h2, .fallback-art b, .find-hero .h2 {
  font-family: var(--display); font-style: normal; font-weight: 800; letter-spacing: -.035em;
}
.logo { font-family: var(--display); font-style: normal; font-weight: 800; letter-spacing: -.045em; font-size: 28px; }
.logo span { background: var(--pop); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-family: var(--display); font-style: normal; font-weight: 700; }
.grad { background: var(--pop); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.hero h1 { font-size: clamp(46px, 11vw, 92px); line-height: .95; }
.hero::before { background: radial-gradient(closest-side, #e7dbff, transparent); }
.hero::after { background: radial-gradient(closest-side, #ffd6e4, transparent); }
.eyebrow { color: #c2477a; }

.btn-glow { background: var(--pop); color: #fff; border: 0; box-shadow: 0 8px 22px rgba(199, 125, 255, .35); }
.btn-glow:hover { filter: saturate(1.15); box-shadow: 0 10px 28px rgba(199, 125, 255, .45); }

/* Hero mood board */
.hero-art a { border: 4px solid #fff; box-shadow: 0 16px 40px rgba(43, 34, 53, .14); }
.hero-art a:nth-child(1) { transform: rotate(-2deg); }
.hero-art a:nth-child(2) { transform: rotate(2.5deg); }
.hero-art a:nth-child(3) { transform: rotate(-1.5deg); }
.hero-art a { transition: transform .3s ease; }
.hero-art a:hover { transform: rotate(0) scale(1.02); z-index: 2; }
.hero-sticker { position: absolute; z-index: 2; left: 10px; top: 10px; padding: 5px 11px; background: #fff; border-radius: 999px; box-shadow: 0 4px 14px rgba(43, 34, 53, .14); font-style: normal; font-size: 12.5px; font-weight: 800; transform: rotate(-4deg); }

/* Ticker */
.ticker { overflow: hidden; padding: 11px 0; background: var(--pop); color: #fff; font-family: var(--display); font-weight: 700; font-size: 16px; }
.ticker-track { display: flex; width: max-content; animation: slide 45s linear infinite; }
.ticker span, .ticker b { white-space: nowrap; padding-right: 30px; }
.ticker span::before { content: "✦"; margin-right: 30px; opacity: .8; }
.ticker b { padding-left: 30px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; align-self: center; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Story circles */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 20px 16px 6px; margin-inline: -16px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; text-decoration: none; }
.story-ring { display: block; width: 72px; height: 72px; padding: 3px; border-radius: 50%; background: var(--pop); transition: transform .2s; }
.story-ring img { width: 100%; height: 100%; border: 3px solid var(--cream); border-radius: 50%; object-fit: cover; }
.story:hover .story-ring { transform: scale(1.06); }
.story-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 700; }

/* Shop by vibe */
.section-tight { padding-top: 6px; }
.vibes { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px; overflow-x: auto; padding: 4px 16px 10px; margin-inline: -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vibes::-webkit-scrollbar { display: none; }
.vibe { scroll-snap-align: start; display: flex; flex-direction: column; min-height: 200px; padding: 14px; border-radius: var(--radius); background: linear-gradient(160deg, var(--from), var(--to)); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.vibe:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.vibe-thumbs { position: relative; display: block; height: 104px; margin-bottom: 12px; }
.vibe-thumbs img { position: absolute; top: 0; width: 58px; height: 74px; border: 3px solid #fff; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 14px rgba(43, 34, 53, .14); }
.vibe-thumbs img:nth-child(1) { left: 0; transform: rotate(-8deg); top: 14px; }
.vibe-thumbs img:nth-child(2) { left: 34%; transform: rotate(4deg); z-index: 1; }
.vibe-thumbs img:nth-child(3) { right: 0; transform: rotate(10deg); top: 18px; }
.vibe b { margin-top: auto; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.vibe small { color: var(--ink-2); font-size: 13px; font-weight: 600; }

/* Masonry feed */
.masonry { columns: 2; column-gap: 12px; }
.masonry .card { break-inside: avoid; margin-bottom: 18px; }
.card-media.shape-tall { aspect-ratio: 3 / 4; }
.card-media.shape-square { aspect-ratio: 1 / 1; }
.card-media.shape-classic { aspect-ratio: 4 / 5; }

/* Card stickers */
.card-media { border-radius: var(--radius); }
.sticker { position: absolute; z-index: 1; left: 10px; top: 12px; max-width: calc(100% - 66px); padding: 5px 10px; background: #fff; border-radius: 999px; box-shadow: 0 4px 12px rgba(43, 34, 53, .14); font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(-3deg); }
.card-name { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-price { font-family: var(--display); font-size: 18px; letter-spacing: -.02em; }
.card-store { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
.card-store .pill { font-size: 11px; padding: 2px 8px; }

/* Tab bar: raised Find It button */
.tabbar a[data-tab="find"] svg { width: 50px; height: 50px; margin-top: -24px; padding: 13px; border-radius: 50%; background: var(--pop); stroke: #fff; stroke-width: 2.2; box-shadow: 0 8px 20px rgba(199, 125, 255, .45); }
.tabbar a[data-tab="find"][aria-current="page"] svg { stroke: #fff; }

@media (max-width: 639px) {
  .hero-art a:not(:first-child) span { display: none; }
  .hero-sticker { max-width: calc(100% - 16px); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 640px) {
  .masonry { columns: 3; column-gap: 16px; }
  .vibes { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; padding: 0; margin: 0; }
}
@media (min-width: 960px) {
  .masonry { columns: 4; column-gap: 20px; }
  .masonry .card { margin-bottom: 26px; }
  .stories { justify-content: space-between; gap: 10px; padding-top: 28px; }
  .story { width: 88px; }
  .story-ring { width: 84px; height: 84px; }
  .hero-art { height: 540px; gap: 14px; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
  .row-scroll { grid-auto-columns: 34%; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .gift-tiles { grid-template-columns: repeat(5, 1fr); }
  .how { grid-template-columns: repeat(3, 1fr); }
  .hero-cta .btn { flex: 0 0 auto; }
  .alert-row { grid-template-columns: 72px 1fr auto; }
  .alert-actions { grid-column: auto; }
  .alert-actions .btn { flex: none; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .toast { bottom: 24px; }
  .topbar-in { grid-template-columns: auto minmax(240px, 420px) 1fr; padding: 14px 0; gap: 24px; }
  .search { grid-column: auto; }
  .mainnav { display: flex; justify-content: flex-end; gap: 22px; font-size: 14.5px; font-weight: 600; }
  .mainnav a { text-decoration: none; white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; }
  .mainnav a:hover { color: var(--rose); }
  .mainnav a[aria-current="page"] { border-color: var(--rose); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px; }
  .row-scroll { grid-auto-columns: calc((100% - 60px) / 4.4); }
  .hero { padding: 56px 0 34px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
  .hero-art { height: 520px; }
  .section { padding: 48px 0; }
  .pdp { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding-top: 22px; }
  .pdp-info { position: sticky; top: 100px; }
  .pdp-actions { grid-template-columns: 1fr 1fr; }
  .pdp-actions .save-row { grid-column: 1 / -1; }
  .footer-in { grid-template-columns: 1fr auto; align-items: start; }
  .footer-in .fine { grid-column: 1 / -1; }
}
/* ---------- Secondhand: setting, Swap Shelf, send dialog ---------- */
.setting-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: -6px 0 18px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.switch { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 300px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; position: relative; width: 46px; height: 28px; margin-top: 1px; background: #ddd3e6; border-radius: 999px; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--mint); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--plum); outline-offset: 2px; }
.switch b { display: block; font-size: 15px; }
.switch small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }

.swap-form { margin-bottom: 4px; }
.form-grid { display: grid; gap: 10px; margin-bottom: 12px; }
.form-grid label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.form-grid input, .form-grid select, .send-line input { width: 100%; min-width: 0; height: 44px; padding: 0 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 500; outline: none; }
.form-grid input:focus, .form-grid select:focus, .send-line input:focus { border-color: #cdbfe9; box-shadow: 0 0 0 4px var(--lilac-2); }
.swap-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px 14px; align-items: center; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); animation: rise .4s ease both; }
.swap-row + .swap-row { margin-top: 10px; }
.swap-row h3 { font-size: 16px; line-height: 1.3; }
.swap-row .alert-actions { grid-column: 1 / -1; }
.swap-icon { display: grid; place-items: center; width: 48px; height: 48px; background: #e6f4ec; border-radius: var(--radius-sm); font-size: 22px; }
.swap-promo { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-items: center; padding: 18px; background: linear-gradient(120deg, #e6f4ec, var(--lilac-2)); border: 1px solid #d5ead9; border-radius: var(--radius); text-decoration: none; }
.swap-promo-icon { display: grid; place-items: center; width: 52px; height: 52px; background: #fff; border-radius: 50%; font-size: 24px; }
.swap-promo b { display: block; font-size: 18px; }
.swap-promo small { display: block; color: var(--ink-2); font-size: 14px; }
.swap-promo .btn { grid-column: 1 / -1; justify-self: start; }

.send-dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 22px; border: 0; border-radius: var(--radius); background: var(--cream); color: var(--ink); box-shadow: var(--shadow-lg); }
.send-dialog::backdrop { background: rgba(43, 34, 53, .45); }
.send-dialog h2 { padding-right: 40px; font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.2; }
.send-dialog .sub { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.send-close { position: absolute; top: 12px; right: 12px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; background: var(--white); border: 1px solid var(--line); border-radius: 50%; font-size: 16px; }
.send-field { margin-bottom: 14px; }
.send-field label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.send-line { display: flex; gap: 8px; }
.send-line .btn { flex: none; min-height: 44px; }
.send-err { display: block; min-height: 1em; margin-top: 4px; color: var(--rose); font-size: 13px; font-weight: 600; }
.send-preview { margin-bottom: 14px; font-size: 14px; }
.send-preview summary { cursor: pointer; font-weight: 700; color: var(--plum); }
.send-preview pre { max-height: 180px; overflow: auto; margin: 8px 0 0; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--sans); font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* Auto-buy preview */
.preview-tag { display: inline-block; padding: 1px 7px; background: #fff1d6; color: var(--amber); border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.autobuy-btn { width: 100%; margin-top: 6px; min-height: 36px; font-size: 13px; background: #fffaf0; border-color: #f3dfbd; }
.autobuy-btn.is-on { background: #fff1d6; color: var(--ink); }
.pdp-actions .autobuy-btn { width: auto; margin-top: 0; min-height: 48px; font-size: 15px; }
.ab-form { display: grid; gap: 14px; }
.ab-form > label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ab-form select { height: 44px; padding: 0 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 500; }
.ab-price { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: 16px; font-weight: 700; }
.ab-price input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 16px; outline: none; }
.ab-price:focus-within { border-color: #cdbfe9; box-shadow: 0 0 0 4px var(--lilac-2); }
.ab-lock { display: flex; gap: 10px; padding: 12px 14px; background: #e6f4ec; border-radius: var(--radius-sm); }
.ab-lock b { display: block; font-size: 14px; }
.ab-lock small { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.ab-steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; }
.ab-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1.3fr 1fr 1.3fr; }
  .swap-row { grid-template-columns: 48px 1fr auto; }
  .swap-row .alert-actions { grid-column: auto; }
  .swap-promo { grid-template-columns: auto 1fr auto; }
  .swap-promo .btn { grid-column: auto; }
}
@media (max-width: 420px) {
  .send-line { flex-direction: column; }
}
@media (max-width: 379px) {
  /* Very narrow phones: drop the demo "last checked" column so the table fits */
  .result .offers th:nth-child(4), .result .offers td:nth-child(4) { display: none; }
}

/* ---------- Phones: readable text and easy-to-tap targets ----------
   Minimum 12px text, about 44px tall tap areas, nothing wider than the screen. */
body { overflow-x: clip; } /* clip (not hidden) keeps the sticky top bar working */
img, video, table { max-width: 100%; }
.card-name, .alert-row h3, .swap-row h3, .result h3, .pdp-info h1 { overflow-wrap: anywhere; }
@media (max-width: 719px), (pointer: coarse) {
  .tabbar a { font-size: 12px; }
  .pill { font-size: 12px; }
  .demo-tag, .preview-tag { font-size: 11.5px; }
  .offers th { font-size: 12px; }
  .hero-sticker { font-size: 12.5px; }
  .photo-note { font-size: 12px; }

  .btn-sm, .card-actions .btn { min-height: 44px; }
  .card-actions { flex-wrap: wrap; }
  .card-store .pill { font-size: 12px; }
  .demo-bar a { padding: 10px 4px; margin: -10px 0; }
  /* Search results: keep the price table inside the card on narrow phones */
  .result { grid-template-columns: minmax(0, 1fr); }
  .result-top > div { min-width: 0; }
  .offers { font-size: 13.5px; }
  .offers th, .offers td { padding-left: 4px; padding-right: 4px; }
  .offers .checked { font-size: 12px; }
  .item-tools select, .item-tools .btn { height: 44px; min-height: 44px; }
  .try button { min-height: 40px; padding: 6px 14px; font-size: 14px; }
  .chip { min-height: 44px; }
  .see-all { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .logo { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 40px; }
  .card-name { padding-block: 4px; }
  .footer-links { gap: 2px 18px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .alert-row h3 a, .result h3 a { display: inline-block; padding-block: 4px; }
  .icon-btn { width: 44px; height: 44px; }
  .send-line input, .form-grid input, .form-grid select, .ab-form select, .ab-price { height: 48px; font-size: 16px; } /* 16px stops iPhone zooming in */
  .new-list input { height: 44px; font-size: 16px; }
  .send-preview summary { padding: 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
