@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/dm-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #fff;
  --wash: #f4f4f6;
  --line: #e2e2e8;
  --ink: #000;
  --sub: #55555f;
  --red: #d6002a;
  --red-dark: #ad0022;
  --sticker: #ffd60a;
  --green: #0a7a45;
  --focus: #0b57d0;
  --rail: 96px;
  --gutter: clamp(14px, 2.4vw, 32px);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.45 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.hero :focus-visible { outline-color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; padding: 12px 16px; background: #000; color: #fff; border-radius: 10px; }
.skip:focus { top: 12px; }
.icon { width: 24px; height: 24px; flex: none; }

/* Display type: the condensed poster cut of a store circular. */
h1, h2, h3, .price-now, .sticker, .receipt-keep strong, .kit-keep strong { font-family: var(--sans); font-stretch: 68%; }

/* ---------- Frame ---------- */
.page { margin-left: var(--rail); padding: 16px var(--gutter) 40px; min-width: 0; }

.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 22px 0; z-index: 20; }
.rail > .logo { display: none; }
.rail-group { margin-block: auto; width: 72px; padding: 8px 6px; display: grid; gap: 4px; background: #fff; border-radius: 28px; box-shadow: 0 2px 16px rgb(0 0 0 / .12); }
.rail-link { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 58px; padding: 8px 0 6px; border: 0; background: none; border-radius: 20px; font-size: 12px; font-weight: 500; text-decoration: none; color: var(--sub); cursor: pointer; }
.rail-link:hover { background: var(--wash); color: #000; }
.rail-link[aria-current="page"] { background: var(--wash); color: #000; }
.count { position: absolute; top: 4px; right: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font: 700 12px/20px var(--sans); text-align: center; }

.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-stretch: 75%; font-size: 21px; white-space: nowrap; }
.logo svg { width: 34px; height: 34px; }

.top { position: relative; display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 56px; }
.top-logo { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.search { display: flex; align-items: center; gap: 10px; width: min(100%, 560px); height: 56px; padding: 0 20px; background: #fff; border-radius: 28px; box-shadow: 0 2px 18px rgb(0 0 0 / .13); }
.search:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.search .icon { color: var(--sub); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: #000; caret-color: var(--red); }
.search input::placeholder, .ask-bar input::placeholder { font-weight: 500; letter-spacing: -.01em; opacity: 1; }
.search input::placeholder { color: var(--sub); }
.search input::-webkit-search-cancel-button { display: none; }

.pills { display: flex; gap: 6px; margin: 16px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter); overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.pills::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 48px; padding: 5px 14px 5px 6px; border-radius: 24px; text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.pill-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--wash); }
.pill-icon svg { width: 21px; height: 21px; }
.pill:hover .pill-icon, .pill[aria-current="page"] .pill-icon { background: #fff; }
.pill:hover, .pill[aria-current="page"] { background: var(--wash); }
.disclosure-line { margin: 6px 0 12px; text-align: center; font-size: 13px; color: var(--sub); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background-color .12s, transform .08s; }
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 54px; padding: 0 26px; border-radius: 27px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-sticker { background: var(--sticker); color: #000; font-weight: 700; }
.btn-sticker:hover { background: #ffe352; }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .55); }
.btn-ghost:hover { background: rgb(255 255 255 / .12); }
.btn-ghost-dark { color: #000; box-shadow: inset 0 0 0 2px #000; background: #fff; }
.btn-ghost-dark:hover { background: var(--wash); }
.btn-add[aria-pressed="true"] { background: #fff; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--wash); cursor: pointer; }
.icon-btn:hover { background: var(--line); }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); align-items: center; gap: clamp(24px, 4vw, 64px); padding: clamp(28px, 4.5vw, 72px); border-radius: 36px; overflow: hidden; color: #fff; background: #000 var(--hero-art, none) center / cover no-repeat; }
.hero h1 { font-size: clamp(72px, 9.6vw, 164px); line-height: .88; font-weight: 900; font-stretch: 62%; letter-spacing: -.005em; text-wrap: balance; }
.hero-sub { margin-top: 22px; max-width: 34em; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.35; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 14px; color: #c9c9d2; }

/* ---------- Receipt: the one loud thing ---------- */
.receipt { --tooth: 9px; padding: 22px 22px calc(22px + var(--tooth)); background: #fff; color: #000; font: 500 13.5px/1.4 var(--mono); -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat; }
.receipt .btn { font-family: var(--sans); }
.receipt-hero { transform: rotate(1.6deg); box-shadow: 0 30px 60px rgb(0 0 0 / .5); }
.receipt-head { padding-bottom: 12px; border-bottom: 2px dashed #000; text-align: center; font-size: 13px; }
.receipt-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px dotted #9a9aa5; }
.receipt-item { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.receipt-item a { text-decoration: none; }
.receipt-item a:hover { text-decoration: underline; }
.receipt-amt { white-space: nowrap; }
.receipt-totals { padding: 10px 0; }
.receipt-totals div { display: flex; justify-content: space-between; padding: 2px 0; }
.receipt-keep { display: flex; flex-direction: column; align-items: center; margin: 4px 0 14px; padding-top: 12px; border-top: 2px dashed #000; }
.receipt-keep span { font-size: 13px; }
.receipt-keep strong { color: var(--green); font-size: 64px; line-height: 1; font-weight: 900; font-stretch: 62%; font-variant-numeric: tabular-nums; }
.receipt-line-new { animation: print .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes print { from { opacity: 0; transform: translateY(-10px); } }
.line-remove { display: grid; place-items: center; width: 32px; height: 32px; margin: -5px -8px -5px 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.line-remove:hover { background: var(--wash); }
.line-remove .icon { width: 16px; height: 16px; }
.receipt-line-row { grid-template-columns: minmax(0, 1fr) auto auto !important; align-items: start; }
.milestone { margin: 0 0 14px; font: 500 14px/1.3 var(--sans); }
.milestone progress { display: block; width: 100%; height: 10px; margin-top: 6px; border: 0; border-radius: 5px; overflow: hidden; background: var(--wash); accent-color: var(--green); }
.milestone progress::-webkit-progress-bar { background: var(--wash); }
.milestone progress::-webkit-progress-value { background: var(--green); transition: width .3s; }
.milestone progress::-moz-progress-bar { background: var(--green); }

.search-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 20px; }
.search-chips-label { margin-right: 4px; font-size: 14.5px; font-weight: 600; }
.search-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--wash); font-size: 14.5px; text-decoration: none; }
.search-chips a:hover { background: var(--line); }

/* ---------- Rows and cards ---------- */
.row { margin-top: clamp(32px, 4vw, 52px); }
.row-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.row-head h2 { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.05; font-weight: 800; }
.row-all { font-size: 15px; font-weight: 600; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(176px, 17vw, 244px); gap: 14px; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.row-track .card { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 212px), 1fr)); gap: 24px 14px; }

.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; display: block; aspect-ratio: 1; border-radius: 22px; background: var(--wash); overflow: hidden; }
/* Absolute so a tall product photo can never stretch its tile: every card lines up. */
.card-media img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; mix-blend-mode: multiply; }
.card-media:hover img { transform: scale(1.03); transition: transform .2s; }
.sticker { position: absolute; left: 8px; top: 10px; padding: 3px 10px 4px; background: var(--sticker); color: #000; font-size: 19px; line-height: 1.1; font-weight: 800; border-radius: 4px; transform: rotate(-3deg); }
.sticker-lg { left: 18px; top: 18px; font-size: 32px; padding: 5px 14px 6px; }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 10px 2px 0; }
.badge { align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--red); }
.card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.7em; font-size: 15px; line-height: 1.35; text-decoration: none; }
.card-title:hover { text-decoration: underline; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; color: var(--sub); }
.stars b { color: #000; font-weight: 600; }
.stars .icon { width: 15px; height: 15px; color: #000; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 2px; }
.price-now { font-size: 27px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-list { font-size: 14px; color: var(--sub); }
.price-none { font-size: 15px; font-weight: 600; }
.keep { font-size: 14.5px; font-weight: 700; color: var(--green); }
.card-actions { display: grid; gap: 2px; margin-top: auto; padding-top: 8px; }
.link-amazon { display: inline-block; padding: 9px 0; font-size: 13.5px; text-align: center; color: var(--sub); }
.link-amazon:hover { color: #000; }

/* ---------- Ready-made kits ---------- */
.kits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.kit-tile { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 28px; background: var(--wash); }
.kit-tile h3 { font-size: 32px; line-height: 1; font-weight: 800; }
.kit-thumbs { display: flex; gap: 8px; margin: 10px 0 6px; }
.kit-thumbs img { width: 84px; height: 84px; padding: 8px; object-fit: contain; border-radius: 16px; background: #fff; }
.kit-keep { margin-top: auto; font-size: 15px; }
.kit-keep strong { color: var(--green); font-size: 30px; font-weight: 900; }

/* ---------- Trust, guide, prose ---------- */
.trust { margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 3vw, 40px); border-radius: 28px; background: var(--wash); }
.trust h2, .guide h2 { font-size: 28px; line-height: 1.1; font-weight: 800; }
.trust ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px 28px; margin: 16px 0; }
.trust a { font-weight: 600; }
.guide { margin-top: 44px; max-width: 70ch; }
.guide ul { display: grid; gap: 6px; margin: 12px 0; padding-left: 20px; list-style: disc; }
.guide .link-amazon { text-align: left; font-size: 15px; }
.guide-inline { margin-top: 28px; }
.page-title { margin-top: 12px; font-size: clamp(44px, 6vw, 84px); line-height: .95; font-weight: 900; font-stretch: 62%; text-wrap: balance; }
.lede { max-width: 66ch; margin-top: 12px; font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 20px 0; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--wash); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.seg a:hover { background: var(--line); }
.seg a[aria-current] { background: #000; color: #fff; }
.after-grid { margin-top: 24px; }
.shared-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.empty { margin-top: 24px; padding: 36px 24px; border-radius: 28px; background: var(--wash); text-align: center; }
.empty h2 { font-size: 30px; font-weight: 800; }
.empty p { margin: 8px 0 16px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.empty-page { margin-top: 48px; }
.empty-page h1 { font-size: 48px; line-height: 1; font-weight: 900; }
.prose { max-width: 68ch; margin: 12px auto 0; font-size: 17px; line-height: 1.55; }
.prose h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1; font-weight: 900; font-stretch: 62%; }
.prose h2 { margin-top: 30px; font-size: 28px; line-height: 1.15; font-weight: 800; }
.prose p, .prose ul, .prose ol { margin-top: 10px; }
.prose ul { padding-left: 20px; list-style: disc; }
.prose li + li { margin-top: 6px; }
.steps { padding-left: 24px; list-style: decimal; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 24px; }
.cat-card { display: grid; gap: 2px; padding: 18px; border-radius: 24px; background: var(--wash); text-decoration: none; }
.cat-card:hover { background: var(--line); }
.cat-card img { width: 100%; height: 150px; margin-bottom: 10px; object-fit: contain; mix-blend-mode: multiply; }
.cat-name { font-size: 18px; font-weight: 700; }
.cat-meta { font-size: 14px; color: var(--sub); }

.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); margin-top: 16px; }
.product-media { position: relative; display: grid; place-items: center; align-self: start; padding: 8%; border-radius: 32px; background: var(--wash); }
.product-media img { width: 100%; max-height: 560px; object-fit: contain; mix-blend-mode: multiply; }
.product-info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.product-info h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.08; font-weight: 800; text-wrap: pretty; }
.crumb { font-size: 14.5px; font-weight: 600; }
.product-info .price-now { font-size: 54px; }
.product-info .price-list { font-size: 18px; }
.keep-lg { font-size: 20px; }
.as-of { font-size: 13.5px; color: var(--sub); }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ---------- Footer ---------- */
.foot { display: grid; gap: 16px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.foot-legal { max-width: 90ch; font-size: 13px; color: var(--sub); }

/* ---------- Sheets ---------- */
.sheet { width: min(480px, 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; background: #fff; color: #000; overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgb(0 0 0 / .5); }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.sheet-head h2 { font-size: 30px; line-height: 1; font-weight: 800; }
.sheet-body { flex: 1; padding: 0 18px 24px; overflow-y: auto; }
#kit .sheet-body { background: var(--wash); padding-top: 18px; }
.kit-empty { padding: 28px 8px; text-align: center; }
.kit-empty h3 { font-size: 30px; font-weight: 800; }
.kit-empty p { margin: 8px 0 18px; }
.kit-empty .btn { margin: 4px; }
.kit-after { display: grid; gap: 8px; margin-top: 16px; font-family: var(--sans); }
.kit-after .btn { width: 100%; }
.kit-secondary { display: flex; gap: 8px; }
.kit-note { margin-top: 14px; font: 400 13px/1.4 var(--sans); color: var(--sub); }

/* ---------- Assistant popover: the search bar unfolds into glass ---------- */
.ask {
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ask-sub: #3d3d46; /* --sub is too light for small text on a translucent panel. */
  position: fixed;
  inset: var(--ask-top, 8px) auto auto var(--ask-left, 12px);
  width: var(--ask-width, min(560px, calc(100vw - 24px)));
  max-width: none;
  max-height: var(--ask-max, calc(100dvh - 20px));
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  color: #000;
  background: rgb(255 255 255 / .76);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .7), 0 0 0 1px rgb(0 0 0 / .06), 0 24px 64px rgb(0 0 0 / .24);
  transition: height .36s var(--ease);
}
.ask[open] { display: flex; flex-direction: column; animation: ask-open .4s backwards; }
.ask.is-closing { animation: ask-close .22s forwards; }
.ask::backdrop { background: rgb(0 0 0 / .1); animation: ask-dim-in .36s ease-out backwards; }
.ask.is-closing::backdrop { animation: ask-dim-out .2s ease-in forwards; }
/* The start and end shape is the search bar itself. The last stretch widens the clip past the panel to let its shadow in. */
@keyframes ask-open {
  from { clip-path: inset(0 0 calc(100% - var(--ask-bar, 56px)) 0 round 28px); animation-timing-function: var(--ease); }
  80% { clip-path: inset(0 round 28px); animation-timing-function: linear; }
  to { clip-path: inset(-80px round 28px); }
}
@keyframes ask-close {
  from { clip-path: inset(-80px round 28px); animation-timing-function: linear; }
  20% { clip-path: inset(0 round 28px); animation-timing-function: ease-in; }
  /* Stays solid until it has nearly become the bar, or its text smears across the bar's own text. */
  75% { opacity: 1; }
  to { clip-path: inset(0 0 calc(100% - var(--ask-bar, 56px)) 0 round 28px); opacity: 0; }
}
@keyframes ask-dim-in { from { opacity: 0; } }
@keyframes ask-dim-out { to { opacity: 0; } }
@keyframes ask-in { from { opacity: 0; transform: translateY(6px); } }
.ask .chat-log > *, .ask .chat-note { animation: ask-in .28s .08s ease-out backwards; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ask { background: #fff; }
}
@media (prefers-reduced-transparency: reduce) {
  .ask { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.ask-bar { flex: none; display: flex; align-items: center; gap: 4px; min-height: var(--ask-bar, 56px); padding: 0 6px 0 20px; box-shadow: inset 0 -1px 0 rgb(0 0 0 / .08); }
.ask-bar:focus-within { box-shadow: inset 0 -2px 0 var(--focus); }
.ask-bar .icon { color: var(--ask-sub); }
.ask-bar input { flex: 1; min-width: 0; height: 44px; margin-left: 6px; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: #000; caret-color: var(--red); }
.ask-bar input::placeholder { color: var(--ask-sub); }
.ask-send { flex: none; width: 68px; min-height: 44px; padding: 0; overflow: hidden; border-radius: 22px; font-size: 15px; transition: width .24s var(--ease), transform .24s var(--ease), opacity .18s ease-out, visibility .18s; }
/* Nothing to send yet, so the button gives its room to the placeholder. Hidden also keeps it out of the tab order. */
.ask-bar input:placeholder-shown ~ .ask-send { width: 0; opacity: 0; transform: scale(.85); visibility: hidden; }
.ask-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ask-close:hover { background: rgb(0 0 0 / .07); }
.ask .toast { bottom: 12px; max-width: calc(100% - 24px); }

/* ---------- Chat ---------- */
.chat-log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(0 0 0 / .25) transparent; }
.bubble { max-width: 92%; padding: 11px 15px; border-radius: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.bubble-bot { align-self: flex-start; background: rgb(255 255 255 / .62); border-bottom-left-radius: 6px; }
.bubble-user { align-self: flex-end; background: #000; color: #fff; border-bottom-right-radius: 6px; }
.chat-status { align-self: flex-start; font-size: 14px; color: var(--ask-sub); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: rgb(255 255 255 / .55); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); font-size: 14.5px; cursor: pointer; transition: background .15s; }
.chip:hover { background: #fff; }
.chat-note { flex: none; padding: 0 18px 12px; font-size: 12.5px; color: var(--ask-sub); }
.chat-deals { display: grid; gap: 8px; }
.chat-deal { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 18px; background: rgb(255 255 255 / .72); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.chat-deal img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; }
.chat-deal-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14px; line-height: 1.3; text-decoration: none; }
.chat-deal-title:hover { text-decoration: underline; }
.chat-deal-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-top: 3px; font-size: 13.5px; }
.chat-deal-meta b { font-size: 18px; font-stretch: 68%; font-weight: 800; }
.chat-deal-meta .keep { font-size: 13.5px; }
.chat-deal .btn { min-height: 40px; margin-top: 6px; padding: 0 14px; font-size: 14px; }
.chat-kit { display: grid; gap: 10px; }
.chat-tabs { display: flex; gap: 4px; }
.chat-tab { flex: 1; min-height: 44px; padding: 2px 6px; border: 0; border-radius: 14px; background: rgb(0 0 0 / .06); font-size: 14px; font-weight: 600; cursor: pointer; }
.chat-tab[aria-selected="true"] { background: #000; color: #fff; }
.chat-more { align-self: flex-start; font-size: 14.5px; font-weight: 600; }

/* ---------- Toast and kit bar ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 4px; width: max-content; max-width: min(92vw, 520px); padding: 6px 8px 6px 18px; transform: translateX(-50%); border-radius: 26px; background: #000; color: #fff; font-size: 15px; box-shadow: 0 10px 30px rgb(0 0 0 / .35); }
.toast button, .toast a { flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 20px; background: none; color: var(--sticker); font-weight: 700; font-size: 15px; cursor: pointer; }
.toast button:hover { background: rgb(255 255 255 / .14); }
.kitbar { position: fixed; right: 24px; bottom: 24px; z-index: 15; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 22px; border: 0; border-radius: 28px; background: #000; color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 8px 28px rgb(0 0 0 / .3); }
.kitbar strong { color: var(--sticker); font-size: 22px; font-stretch: 68%; font-weight: 800; }

/* ---------- Mobile ---------- */
.tabs { display: none; }

@media (max-width: 1023px) {
  :root { --rail: 0px; }
  .rail { display: none; }
  .page { padding-bottom: 150px; }
  .top { flex-direction: column; gap: 10px; }
  .top-logo { position: static; transform: none; }
  .search { width: 100%; height: 52px; }
  .pills { justify-content: flex-start; }
  .tabs { position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -1px 0 var(--line); }
  .tab { position: relative; display: grid; justify-items: center; gap: 1px; min-height: 54px; padding: 6px 0 4px; border: 0; background: none; font-size: 12px; font-weight: 500; text-decoration: none; color: var(--sub); }
  .tab[aria-current="page"] { color: #000; }
  .tab .count { right: calc(50% - 24px); }
  .kitbar { right: 12px; left: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
  .sheet { width: 100vw; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 28px 22px 32px; border-radius: 28px; }
  .hero h1 { font-size: clamp(72px, 21vw, 150px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .receipt-hero { transform: none; }
  .product { grid-template-columns: minmax(0, 1fr); }
  .product-actions, .product-actions .btn { width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; }
  .row-track { grid-auto-columns: 164px; gap: 10px; }
  .card-media { border-radius: 18px; }
  .sticker { font-size: 17px; }
  .price-now { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .receipt-hero { transform: none; }
}
