/* TinyBlossom — visual system
   Warm paper, near-black ink, one accent. Type does the work. */

:root {
  color-scheme: light;

  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --fill: #F3F1EC;
  --ink: #1D1D1F;
  --ink-2: #57575C;
  --ink-3: #8A8A8F;
  --line: #E6E3DD;
  --line-strong: #D3D0C9;

  --accent: #A2545C;
  --accent-ink: #8C454D;
  --accent-soft: #F5E9E8;

  /* Product tile tints and their illustration tones */
  --t-stone: #F1EDE6;  --t-stone-ink: #8A7A68;
  --t-sage: #E7ECE3;   --t-sage-ink: #5F7563;
  --t-blush: #F4E8E4;  --t-blush-ink: #A6625C;
  --t-mist: #E6EBEE;   --t-mist-ink: #5E7180;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-float: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  --shadow-sheet: 0 24px 80px rgba(0, 0, 0, .18);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.022em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }
.muted { color: var(--ink-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

section[id] { scroll-margin-top: 56px; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.section-sub { color: var(--ink-2); margin-top: 8px; font-size: 17px; }

/* ---------- Announcement + header ---------- */
.announce { background: var(--ink); color: rgba(255, 255, 255, .86); text-align: center; font-size: 12.5px; letter-spacing: 0; padding: 9px 16px; }
.announce:empty { display: none; }
.announce.vacation { background: #8A4B00; color: #fff; }

.header { position: sticky; top: 0; z-index: 20; background: rgba(251, 250, 247, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 56px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark { width: 22px; height: 22px; fill: var(--accent); }
.logo-mark .logo-eye { fill: var(--bg); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.bag-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--ink); }
.bag-btn:hover { background: var(--fill); }
.bag-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; letter-spacing: 0; }
.bag-btn.bump .bag-count { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 0; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), transform .1s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333336; }
.btn-secondary { background: var(--fill); color: var(--ink); }
.btn-secondary:hover { background: #EAE7E1; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.text-link { color: var(--accent-ink); text-decoration: none; font-size: 16px; }
.text-link:hover { text-decoration: underline; }
.icon-btn { display: grid; place-items: center; border: 0; background: var(--fill); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--ink-2); flex-shrink: 0; }
.icon-btn:hover { background: #EAE7E1; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; max-width: 11ch; }
.lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 30em; }
.hero-cta { display: flex; align-items: center; gap: 28px; margin-top: 34px; flex-wrap: wrap; }

.hero-art { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; aspect-ratio: 1 / 1; }
.hero-art .tile { border-radius: var(--r-lg); display: grid; place-items: center; }
.hero-art .tile:first-child { grid-row: span 2; }
.hero-art .tile svg { width: 46%; height: auto; }
.hero-art .tile:first-child svg { width: 56%; }

/* ---------- Illustration tiles ---------- */
.tile { position: relative; overflow: hidden; }
.tile svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tint-stone { background: var(--t-stone); color: var(--t-stone-ink); }
.tint-sage { background: var(--t-sage); color: var(--t-sage-ink); }
.tint-blush { background: var(--t-blush); color: var(--t-blush-ink); }
.tint-mist { background: var(--t-mist); color: var(--t-mist-ink); }

/* ---------- Categories ---------- */
.cats { padding: 8px 0 72px; }
.cat-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 14px; margin-top: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { scroll-snap-align: start; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; }
.cat .tile { aspect-ratio: 1 / 1; border-radius: var(--r-lg); display: grid; place-items: center; transition: transform .35s var(--ease); }
.cat .tile svg { width: 42%; }
.cat:hover .tile { transform: scale(1.02); }
.cat-name { display: block; margin-top: 12px; font-size: 15px; font-weight: 500; }
.cat-count { display: block; font-size: 13px; color: var(--ink-3); }

/* ---------- Shop ---------- */
.shop { padding: 72px 0 96px; background: var(--surface); }
.shop-head { margin-bottom: 28px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 32px; }
.segments { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background-color .15s, color .15s; }
.seg:hover { color: var(--ink); background: var(--fill); }
.seg[aria-selected="true"] { background: var(--ink); color: #fff; }
.toolbar-right { display: flex; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: var(--fill); border-radius: 999px; color: var(--ink-3); }
.search:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.search input { border: 0; outline: 0; background: transparent; width: 150px; font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.sort select { appearance: none; -webkit-appearance: none; height: 38px; border: 0; border-radius: 999px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2357575C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; padding: 0 34px 0 14px; font-size: 14px; cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 20px; }
.card { display: flex; flex-direction: column; }
.card-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; padding: 0; border-radius: var(--r-lg); cursor: pointer; }
.card-media .art { border: 0; background: none; padding: 0; margin: 0; color: inherit; cursor: pointer; border-radius: inherit; overflow: hidden; display: grid; place-items: center; width: 100%; height: 100%; transition: transform .5s var(--ease); }
.card-media .art svg { width: 44%; }
.card:hover .card-media .art { transform: scale(1.04); }
.tag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 12px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.tag.sale { color: var(--accent-ink); }
.tag.out { background: rgba(29, 29, 31, .78); color: #fff; }
.tag.low { color: #8A4B00; }
.tag.soon { background: var(--ink); color: #fff; }
.card.coming-soon .price { color: var(--ink-3); }
.quick-add { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-float); display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: transform .2s var(--ease), background-color .2s; }
.quick-add:hover { transform: scale(1.08); }
.quick-add.added { background: var(--ink); color: #fff; }
.card-info { padding: 14px 2px 0; }
.card-title { display: block; border: 0; background: none; padding: 0; text-align: left; font-size: 15px; font-weight: 500; line-height: 1.35; cursor: pointer; }
.card-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-meta { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.price { display: flex; gap: 8px; align-items: baseline; font-size: 15px; margin-top: 6px; }
.price.on-sale .now { color: var(--accent-ink); }
.old { color: var(--ink-3); text-decoration: line-through; font-size: 13px; }
.card.sold-out .price, .card.sold-out .card-title { color: var(--ink-3); }
.loading, .empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); padding: 56px 0; font-size: 15px; }

/* ---------- How it works ---------- */
.how { padding: 96px 0; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--surface); border-radius: var(--r-lg); padding: 30px 28px 32px; }
.step-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: 15px; }

.promise { padding: 0 0 96px; }
.promise-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; border-top: 1px solid var(--line); padding-top: 40px; }
.promise h3 { font-size: 17px; margin-bottom: 6px; }
.promise p { color: var(--ink-2); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { padding: 96px 0; background: var(--surface); }
.faq-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; font-size: 17px; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 9px; height: 9px; flex-shrink: 0; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease); }
details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
details p { color: var(--ink-2); padding: 0 40px 22px 0; font-size: 16px; }
details a, .agree a { color: var(--accent-ink); }

/* ---------- Contact ---------- */
.contact { padding: 96px 0; text-align: center; }
.contact h2 { font-size: clamp(28px, 3.4vw, 40px); }
.contact p { color: var(--ink-2); margin-top: 10px; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Footer ---------- */
.footer { background: var(--fill); padding: 48px 0 28px; font-size: 13px; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line-strong); }
.footer-brand .shop-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); }
.footer-brand p { margin-top: 6px; }
.footer h4 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; letter-spacing: 0; }
.footer nav a { display: block; text-decoration: none; padding: 3px 0; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { padding-top: 20px; color: var(--ink-3); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Product sheet ---------- */
.modal { border: 0; padding: 0; width: min(920px, calc(100% - 48px)); max-height: calc(100% - 48px); border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sheet); overflow: auto; }
.modal::backdrop { background: rgba(0, 0, 0, .32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
.modal .close { position: absolute; top: 16px; right: 16px; z-index: 2; background: rgba(255, 255, 255, .85); }
.pm { display: grid; grid-template-columns: 1.05fr 1fr; }
.pm-gallery { display: flex; flex-direction: column; min-width: 0; }
.pm-media { display: grid; place-items: center; min-height: 460px; flex: 1; }
.pm-media img { width: 100%; height: 100%; object-fit: cover; }
.pm-thumbs { display: flex; gap: 8px; padding: 10px; background: var(--surface); }
.pm-thumb { width: 56px; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: var(--fill); }
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm-thumb[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.low-note { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 500; color: #8A4B00; }
.pm-details { margin: 18px 0 0; display: grid; gap: 8px; font-size: 14px; }
.pm-details div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; }
.pm-details dt { color: var(--ink-3); }
.pm-details dd { margin: 0; color: var(--ink-2); }
.vacation-note { font-size: 13px; color: #8A4B00; }
.vacation-note:empty { display: none; }
.pm-media svg { width: 46%; }
.pm-info { padding: 48px 44px 40px; display: flex; flex-direction: column; }
.pm-cat { font-size: 13px; color: var(--ink-3); }
.pm-info h3 { font-size: 30px; line-height: 1.12; margin-top: 6px; }
.pm-info .price { font-size: 19px; margin-top: 12px; }
.pm-info .old { font-size: 15px; }
.price-note { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.pm-desc { color: var(--ink-2); font-size: 16px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.opt-label { font-size: 14px; font-weight: 600; margin-top: 26px; margin-bottom: 10px; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.size { height: 46px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-md); font-size: 15px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.size:hover { border-color: var(--ink-3); }
.size[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--fill); font-weight: 500; }
.pm-actions { display: flex; gap: 12px; align-items: center; margin-top: 28px; }
.pm-actions .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; height: 48px; border-radius: 999px; background: var(--fill); }
.qty button { width: 42px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--ink-2); border-radius: 999px; }
.qty button:hover { color: var(--ink); }
.qty span { min-width: 20px; text-align: center; font-size: 15px; font-weight: 500; }
.sold-note { margin-top: 28px; font-size: 15px; color: var(--ink-2); }

/* ---------- Bag drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 40; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; height: 100%; height: 100dvh; width: min(440px, 100%); background: var(--surface); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .38s var(--ease), visibility 0s .38s; }
.drawer.open { transform: none; visibility: visible; transition: transform .38s var(--ease); box-shadow: var(--shadow-sheet); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 14px; }
.drawer-head h2 { font-size: 26px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 24px 24px; }
.drawer-foot { padding: 18px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; background: var(--surface); }

.cart-item { display: grid; grid-template-columns: 76px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.ci-thumb { width: 76px; height: 92px; border-radius: var(--r-md); display: grid; place-items: center; }
.ci-thumb svg { width: 56%; }
.ci-top { display: flex; justify-content: space-between; gap: 12px; }
.ci-name { font-size: 15px; font-weight: 500; line-height: 1.35; }
.ci-price { font-size: 15px; white-space: nowrap; }
.ci-meta { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.ci-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.ci-bottom .qty { height: 34px; }
.ci-bottom .qty button { width: 32px; font-size: 16px; }
.ci-remove { border: 0; background: none; padding: 0; color: var(--accent-ink); font-size: 14px; cursor: pointer; }
.ci-remove:hover { text-decoration: underline; }
.cart-empty { text-align: center; padding: 72px 16px; color: var(--ink-2); font-size: 15px; }
.cart-empty-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cart-empty .btn { margin-top: 24px; }

.totals { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.totals > div { display: flex; justify-content: space-between; font-size: 15px; }
.totals > div:first-child { font-size: 17px; font-weight: 600; }
.totals > div:nth-child(2) span:last-child { color: var(--ink-2); }
.ship-note, .free-note { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.free-note { color: var(--t-sage-ink); }
.free-note:empty { display: none; }
#checkoutView:not([hidden]) ~ .drawer-foot .ship-note { display: none; }
.send-btns { display: flex; flex-direction: column; gap: 8px; }

/* Checkout form */
.checkout { display: flex; flex-direction: column; gap: 18px; }
.back-link { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--accent-ink); font-size: 15px; cursor: pointer; }
.back-link span { font-size: 20px; line-height: 0; position: relative; top: 1px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .pay legend { font-size: 14px; font-weight: 500; }
.optional { font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 13px 14px; font-size: 16px; background: var(--surface); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.field input { height: 50px; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 29, 31, .08); }
.field textarea::placeholder { color: var(--ink-3); }
.field .invalid { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pay { border: 0; padding: 0; margin: 0; }
.pay legend { margin-bottom: 8px; padding: 0; }
#payOptions { display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); font-size: 15px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.radio:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.radio input, .agree input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.agree input { margin-top: 1px; }
.agree.invalid span { color: var(--accent-ink); }
.form-error { color: var(--accent-ink); font-size: 14px; }
.form-error:empty { display: none; }

.drawer-done { text-align: center; padding: 64px 28px; display: flex; flex-direction: column; align-items: center; }
.done-mark { width: 56px; height: 56px; fill: none; stroke: var(--t-sage-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.drawer-done h3 { font-size: 24px; margin-bottom: 10px; }
.drawer-done p { color: var(--ink-2); font-size: 15px; max-width: 30ch; }
.drawer-done .btn { margin-top: 28px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; visibility: hidden; background: rgba(29, 29, 31, .92); backdrop-filter: blur(12px); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 60; transition: transform .3s var(--ease), opacity .3s, visibility 0s .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .3s var(--ease), opacity .3s; }
body.locked { overflow: hidden; }
body.locked .toast { display: none; }

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

/* ---------- Policies page ---------- */
.back-shop { margin-left: auto; min-height: 36px; padding: 0 16px; font-size: 14px; }
.legal { padding: 56px 22px 96px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.03em; margin-bottom: 12px; }
.legal section { scroll-margin-top: 80px; padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line); }
.legal h2 { font-size: 26px; margin-bottom: 14px; }
.legal h3 { font-size: 17px; margin: 24px 0 6px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 0; }
.legal li { margin-bottom: 10px; }
.legal a { color: var(--accent-ink); }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.legal-toc a { text-decoration: none; background: var(--fill); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--ink); }
.legal-toc a:hover { background: #EAE7E1; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .hero { padding: 40px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 12ch; }
  .hero-art { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; aspect-ratio: auto; gap: 10px; }
  .hero-art .tile { aspect-ratio: 1 / 1.15; border-radius: 18px; }
  .hero-art .tile:first-child { grid-row: auto; }
  .hero-art .tile svg, .hero-art .tile:first-child svg { width: 52%; }
  .steps, .promise-inner { grid-template-columns: 1fr; gap: 14px; }
  .promise-inner { gap: 28px; }
  .faq-inner { grid-template-columns: 1fr; gap: 24px; }
  .how, .faq, .contact { padding: 72px 0; }
  .promise { padding-bottom: 72px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .bag-btn { margin-left: auto; }
  .cats { padding-bottom: 56px; }
  .cat-row { grid-auto-columns: 42%; margin-right: -16px; padding-right: 16px; }
  .shop { padding: 56px 0 72px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .segments { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .segments::-webkit-scrollbar { display: none; }
  .seg { flex-shrink: 0; }
  .toolbar-right { width: 100%; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; min-width: 0; }
  .sort { flex-shrink: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .card-media { border-radius: 18px; }
  .quick-add { width: 34px; height: 34px; right: 10px; bottom: 10px; }
  .card-title { font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  /* Product sheet becomes a bottom sheet */
  .modal { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .modal[open] { animation: sheet .4s var(--ease); }
  @keyframes sheet { from { transform: translateY(100%); } }
  .pm { grid-template-columns: 1fr; }
  .pm-media { min-height: 0; aspect-ratio: 4 / 3; }
  .pm-info { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .pm-info h3 { font-size: 24px; }
  .pm-desc { margin-top: 16px; padding-top: 16px; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 20px; padding-right: 20px; }
}
