/* Shelf app layer — built on the TERRA design system (terra.css). Only Shelf-specific pieces live here. */

body { padding-bottom: env(safe-area-inset-bottom); }
main { min-height: 60vh; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- header */
.site-logo__name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-search { display: flex; align-items: center; gap: 8px; height: 42px; width: 230px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-muted); transition: width var(--transition-standard), border-color var(--transition-fast); }
.header-search:focus-within { width: 300px; border-color: var(--color-focus); }
.header-search input { width: 100%; border: 0; outline: 0; background: none; color: var(--color-text); font-size: var(--text-sm); }
.header-search .i { width: 18px; height: 18px; }
.site-header { transition: box-shadow var(--transition-standard); }
.site-header.scrolled { box-shadow: 0 6px 24px rgb(15 45 75 / 6%); }
.announcement-bar[hidden] { display: none; }

/* ---------------------------------------------------------------- product cards */
.product-card__media { display: block; }
.product-card__media .ph { aspect-ratio: 4 / 5; }
.product-card:hover .product-card__media .ph { transform: scale(1.035); }
.product-card__badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: 6px; flex-wrap: wrap; }
.product-card__badges .product-card__badge { position: static; }
.badge--new { background: var(--color-action) !important; color: var(--color-white) !important; }
.badge--owned { background: var(--color-navy) !important; color: var(--color-white) !important; }
.product-card__wishlist { width: 38px; height: 38px; }
.product-card__wishlist .i, .heart-btn .i { width: 19px; height: 19px; }
[data-on="1"] .i, .heart-btn.is-on .i { fill: #d9534f; stroke: #d9534f; }
.product-card__meta { display: flex; gap: 6px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.product-card__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stars { color: #bb7e27; letter-spacing: .06em; font-size: var(--text-xs); }
.dot { width: 3px; height: 3px; border-radius: 99px; background: currentColor; flex: none; }
.product-grid--rail { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 3 * clamp(0.875rem, 2vw, 1.5rem)) / 4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.product-grid--rail::-webkit-scrollbar { display: none; }
.product-grid--rail > * { scroll-snap-align: start; }

/* Typographic tile for products an agent saved without a photo */
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; padding: 12%; text-align: center; background: var(--tint, var(--color-surface)); color: var(--color-navy); transition: transform 400ms ease; }
.ph b { font: 700 clamp(1.3rem, 2vw, 1.9rem)/1.05 var(--font-display); letter-spacing: -0.04em; }
.ph small { font-size: var(--text-xs); color: var(--color-muted); }

/* ---------------------------------------------------------------- home */
.section__heading h2 { font-size: var(--text-2xl); }
.section__heading .eyebrow { margin-bottom: var(--space-2); }
.page-title h1 { font-size: var(--text-3xl); }
.hero__eyebrow-dot { display: inline-flex; align-items: center; gap: 8px; }
.hero__eyebrow-dot::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--color-eucalyptus); box-shadow: 0 0 0 4px rgb(167 196 160 / 30%); }
.benefit { text-align: left; }
.category-card__media { display: block; overflow: hidden; }
.category-card__media .ph { aspect-ratio: 4 / 5; }
.category-card__label small { color: var(--color-muted); font-weight: 500; }
.editorial-card__content p { color: rgb(255 255 255 / 88%); max-width: 40ch; }
.editorial-card .text-link { color: var(--color-white); }
.feature-split { min-height: 0; }
.feature-split h2 { font-size: var(--text-2xl); }
.feature-list strong { display: block; color: var(--color-navy); font-size: var(--text-sm); }
.feature-list span { color: var(--color-muted); font-size: var(--text-xs); }

/* ---------------------------------------------------------------- collection */
.collection-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(232 245 252 / 96%) 0%, rgb(232 245 252 / 82%) 36%, rgb(232 245 252 / 0%) 68%); }
.collection-hero__content .lead { color: var(--color-muted); }
.collection-body { padding-block: var(--space-10) var(--section-space); }
.filter-chip { border: 1px solid transparent; cursor: pointer; font-weight: 600; text-transform: capitalize; }
.filter-chip:hover { border-color: var(--color-border); }
.filter-chip.is-active { background: var(--color-navy); color: var(--color-white); }
.filter-chip .n { opacity: .6; font-weight: 500; }

/* ---------------------------------------------------------------- product detail */
.product-gallery__main { position: relative; }
.product-gallery__main .ph { aspect-ratio: 4 / 5; }
.product-gallery__main .ph b { font-size: clamp(2.2rem, 4vw, 3.6rem); }
.product-gallery__thumb .ph { aspect-ratio: 1; padding: 6px; }
.product-gallery__thumb .ph b { font-size: .7rem; }
.product-info__price { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.product-info__price small { color: var(--color-muted); font-weight: 500; font-size: var(--text-sm); }
.rating-input { display: inline-flex; gap: 2px; }
.rating-input button { padding: 2px; background: none; color: var(--color-stone-light); }
.rating-input button .i { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.rating-input button.on { color: #bb7e27; }
.agent-note { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); margin: var(--space-6) 0; padding: var(--space-5); border-radius: var(--radius-md); background: var(--color-sky-light); }
.agent-note__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; background: var(--color-white); color: var(--color-sage-dark); }
.agent-note__who { margin-bottom: 4px; color: var(--color-navy); font-size: var(--text-sm); font-weight: 700; }
.agent-note__who span { color: var(--color-muted); font-weight: 500; }
.agent-note p { margin: 0; color: var(--color-text); font-size: var(--text-sm); }
.agent-note__rel { margin-top: 8px !important; font-size: var(--text-xs) !important; color: var(--color-muted) !important; }
.agent-note__rel a { color: var(--color-sage-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.swatch { cursor: pointer; }
.size-option { cursor: pointer; position: relative; }
.size-option.is-yours::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 99px; background: var(--color-sage); }
.size-option.is-selected.is-yours::after { background: var(--color-white); }
.product-info__actions { align-items: center; }
.product-info__actions .icon-btn { width: 54px; height: 54px; flex: none; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--color-border); }
.seg button { min-height: 38px; border-radius: var(--radius-pill); background: none; color: var(--color-navy); font-size: var(--text-xs); font-weight: 600; }
.seg button.active { background: var(--color-white); box-shadow: 0 2px 8px rgb(15 45 75 / 10%); }
.seg--2 { grid-template-columns: repeat(2, 1fr); }
.stock__watch { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md, 12px); background: var(--color-sky-light, #e8f5fc); }
.stock__watch p, .stock__back { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 var(--space-3); font-size: var(--text-sm); color: var(--color-navy); }
.stock__back { margin: var(--space-3) 0 0; color: var(--color-sage-dark); font-weight: 600; }
.stock .i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.badge--oos { background: var(--color-navy) !important; color: var(--color-white) !important; opacity: .85; }
.badge--back { background: var(--color-sage-dark) !important; color: var(--color-white) !important; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 0.3rem 0.7rem; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-navy); font-size: var(--text-xs); font-weight: 600; }
.tag--sage { background: var(--color-sage-dark); color: var(--color-white); }
.spec { width: 100%; border-collapse: collapse; }
.spec td { padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.spec tr:last-child td { border-bottom: 0; }
.spec td:first-child { width: 40%; color: var(--color-muted); text-transform: capitalize; }
.spec td:last-child { color: var(--color-navy); }
.danger-link { padding: 0; background: none; color: var(--color-danger); font-size: var(--text-xs); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- generic page parts */
.page-title p { margin: var(--space-3) 0 0; color: var(--color-muted); max-width: 60ch; }
.page-title__row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-6); flex-wrap: wrap; }
.card { padding: var(--space-8); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.card + .card { margin-top: var(--space-5); }
.card h2 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.card > p { color: var(--color-muted); font-size: var(--text-sm); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; padding-bottom: var(--section-space); }
.inline-form { display: flex; gap: var(--space-2); }
.inline-form .form-input { flex: 1; min-width: 0; }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-4); border-bottom: 1px solid var(--color-border); }
.row-item:last-child { border-bottom: 0; }
.row-item small { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 99px; background: var(--color-sky-light); color: var(--color-sage-dark); font: 800 var(--text-sm) var(--font-display); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
pre, code { font: 0.78rem/1.55 ui-monospace, "SF Mono", Menlo, monospace; }
pre { margin: var(--space-2) 0 var(--space-4); padding: var(--space-4); overflow-x: auto; white-space: pre-wrap; word-break: break-all; border-radius: var(--radius-sm); background: var(--color-white); border: 1px solid var(--color-border); }
.empty { padding: var(--space-16) var(--space-6); text-align: center; border-radius: var(--radius-lg); background: var(--color-sky-light); }
.empty h2 { font-size: var(--text-2xl); }
.empty p { color: var(--color-muted); max-width: 46ch; margin-inline: auto; }

/* lists */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-6); padding-bottom: var(--section-space); }
.list-card__cover { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; aspect-ratio: 1.3; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface); }
.list-card__cover > div { overflow: hidden; background: var(--color-surface); }
.list-card__cover > div:first-child { grid-row: span 2; }
.list-card__cover img, .list-card__cover .ph { width: 100%; height: 100%; object-fit: cover; }
.list-card__cover .ph b { font-size: 1rem; }
.list-card h3 { margin: var(--space-4) 0 var(--space-1); font-size: var(--text-xl); }
.ranked { padding-bottom: var(--section-space); }
.rank-row { display: grid; grid-template-columns: 64px 88px minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-5); padding-block: var(--space-4); border-bottom: 1px solid var(--color-border); }
.rank-row__n { font: 800 2.6rem/1 var(--font-display); letter-spacing: -0.06em; color: var(--color-sage); }
.rank-row__pic { width: 88px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-surface); }
.rank-row__pic img, .rank-row__pic .ph { width: 100%; height: 100%; object-fit: cover; }
.rank-row__pic .ph b { font-size: .8rem; }
.rank-row__title { color: var(--color-navy); font-weight: 700; }
.rank-row__price { color: var(--color-navy); font-weight: 700; font-size: var(--text-sm); }
.rank-row__move { display: flex; flex-direction: column; gap: 4px; }

/* photos */
.uploader { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-12); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); min-height: 280px; padding: var(--space-8); text-align: center; cursor: pointer; border: 2px dashed var(--color-eucalyptus); border-radius: var(--radius-lg); background: var(--color-sky-light); color: var(--color-navy); transition: border-color var(--transition-fast), background var(--transition-fast); }
.drop:hover, .drop.over { border-color: var(--color-sage-dark); background: #def0f9; }
.drop .i { width: 40px; height: 40px; color: var(--color-sage-dark); stroke-width: 1.3; }
.drop strong { font: 700 var(--text-xl) var(--font-display); letter-spacing: -0.03em; }
.photo-grid { columns: 4 240px; column-gap: var(--space-5); padding-bottom: var(--section-space); }
.photo { break-inside: avoid; margin: 0 0 var(--space-6); }
.photo img { width: 100%; border-radius: var(--radius-md); background: var(--color-surface); }
.photo__meta { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-3); }
.photo__cap { margin: var(--space-2) 0 var(--space-1); color: var(--color-navy); font-weight: 700; font-size: var(--text-sm); }
.photo p { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--space-2); }
.pending { display: inline-flex; align-items: center; gap: 8px; color: var(--color-warning); font-size: var(--text-xs); font-weight: 600; }
.pending::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* activity */
.feed { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding-block: var(--space-3); border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
.ev:last-child { border-bottom: 0; }
.ev__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 99px; background: var(--color-sky-light); color: var(--color-sage-dark); }
.ev__icon .i { width: 17px; height: 17px; }
.ev__when { color: var(--color-muted); font-size: var(--text-xs); white-space: nowrap; }
.ev__by { color: var(--color-muted); }

/* shared page */
.sizes-strip { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sizes-strip span { padding: 0.55rem 1rem; border-radius: var(--radius-pill); background: rgb(255 255 255 / 92%); color: var(--color-navy); font-size: var(--text-sm); }
.sizes-strip b { margin-left: 6px; }

/* ---------------------------------------------------------------- mobile tab bar & toast */
.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 120; transform: translate(-50%, 16px); padding: 0.8rem 1.3rem; border-radius: var(--radius-pill); background: var(--color-navy); color: var(--color-white); font-size: var(--text-sm); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity var(--transition-standard), transform var(--transition-standard); box-shadow: var(--shadow-float); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.fade { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 1100px) {
  .header-search { width: 42px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .header-search input { display: none; }
  .header-search:focus-within { width: 42px; }
  .product-grid--rail { grid-auto-columns: calc((100% - 2 * 1rem) / 3); }
}
@media (max-width: 820px) {
  .site-nav { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 110; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / 96%); backdrop-filter: blur(14px); border-top: 1px solid var(--color-border); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--color-muted); font-size: 0.68rem; font-weight: 600; }
  .tabbar a.active { color: var(--color-sage-dark); }
  .tabbar .i { width: 22px; height: 22px; }
  .site-footer { padding-bottom: 110px; }
  .toast { bottom: 96px; }
  .product-grid--rail { grid-auto-columns: 62%; }
  .two-col, .uploader { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 40px 72px minmax(0, 1fr); gap: var(--space-3); }
  .rank-row__n { font-size: 1.8rem; }
  .rank-row__pic { width: 72px; }
  .rank-row__price, .rank-row__move { grid-column: 3; }
  .rank-row__move { flex-direction: row; }
  .card { padding: var(--space-6) var(--space-5); }
  .photo-grid { columns: 2; column-gap: var(--space-3); }
}
@media (max-width: 560px) {
  .seg button { font-size: 0.7rem; }
  .product-info__actions .btn { font-size: var(--text-sm); }
}

/* ---------------------------------------------------------------- sign in */
body.signed-out .site-nav, body.signed-out .site-header__actions, body.signed-out .announcement-bar,
body.signed-out .newsletter, body.signed-out .site-footer, body.signed-out .tabbar { display: none !important; }
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - var(--header-height)); }
.login__media { width: 100%; height: 100%; object-fit: cover; }
.login__panel { display: grid; place-items: center; padding: var(--space-10) var(--container-gutter); background: var(--color-surface); }
.login__form { display: grid; gap: var(--space-4); width: min(100%, 400px); }
.login__form h1 { font-size: var(--text-3xl); margin: 0; }
.login__form p { margin: 0; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login__media { max-height: 34vh; } }

/* ---------------------------------------------------------------- swipe */
.swipe { padding-block: var(--space-8) var(--section-space); background: linear-gradient(180deg, var(--color-sky-light) 0%, var(--color-white) 55%); }
.swipe__layout { max-width: 480px; }
.swipe__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-4); }
.swipe__head h1 { font-size: var(--text-3xl); margin: 0; }
.swipe__head-actions { display: flex; gap: var(--space-2); align-items: center; }
.swipe__bar { height: 6px; border-radius: 99px; background: rgb(15 45 75 / 8%); overflow: hidden; }
.swipe__bar span { display: block; height: 100%; background: var(--color-action); border-radius: inherit; transition: width 500ms ease; }
.swipe__stats { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-muted); }
.swipe__stats strong { color: var(--color-navy); }
.swipe__stage { position: relative; height: min(640px, calc(100svh - 300px)); min-height: 440px; margin-top: var(--space-5); }
.swipe__btns { display: flex; justify-content: center; align-items: center; gap: var(--space-4); margin-top: var(--space-5); min-height: 64px; }
.swipe__hint { text-align: center; font-size: var(--text-xs); color: var(--color-muted); margin-top: var(--space-4); }

.sw-card { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--color-white); border-radius: var(--radius-lg); box-shadow: 0 18px 50px rgb(15 45 75 / 14%); touch-action: none; user-select: none; cursor: grab; will-change: transform; }
.sw-card:active { cursor: grabbing; }
.sw-card--back { transform: scale(.95) translateY(14px); opacity: .7; pointer-events: none; box-shadow: none; }
.sw-card--loading { background: var(--color-surface); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .6; } }
.sw-media { flex: 1; min-height: 0; background: var(--color-surface); }
.sw-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* Product photos are usually packshots on white: show the whole product instead of cropping it. */
.sw-media--product { position: relative; background: #fff; }
.sw-media--product img { object-fit: contain; padding: var(--space-4); }
.sw-price { position: absolute; left: var(--space-4); bottom: var(--space-4); padding: 6px 12px; border-radius: 99px; background: var(--color-navy); color: var(--color-white); font: 700 var(--text-sm)/1 var(--font-display); }
.sw-card__product { margin: 4px 0 0; font-size: var(--text-sm); color: var(--color-text); }
.sw-mosaic { flex: 1; min-height: 0; display: grid; gap: 3px; background: var(--color-white); }
.sw-mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; pointer-events: none; }
.sw-mosaic--2 { grid-template-columns: 1fr 1fr; }
.sw-mosaic--3 { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; }
.sw-mosaic--3 img:first-child { grid-row: span 2; }
.sw-vs__opt--product { background-color: #fff; background-size: contain; background-origin: content-box; padding-top: var(--space-8); }
.sw-vs__opt span small { display: block; font: 700 0.68rem/1.2 var(--font-body, inherit); letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.sw-vs__opt span em { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 99px; background: rgb(255 255 255 / 92%); color: var(--color-navy); font: 700 0.78rem/1.2 var(--font-display); font-style: normal; }
.sw-stmt { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--space-4); padding: var(--space-10) var(--space-8); background: var(--color-sky-light); }
.sw-stmt p { margin: 0; font: 700 clamp(1.6rem, 5vw, 2.2rem)/1.15 var(--font-display); letter-spacing: -0.035em; color: var(--color-navy); }
.sw-vs { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }
.sw-vs__opt { all: unset; position: relative; display: flex; align-items: flex-end; padding: var(--space-5); cursor: pointer; background: var(--opt, var(--color-surface)) center/cover no-repeat; transition: filter var(--transition-fast), box-shadow var(--transition-fast); }
.sw-vs__opt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / 45%)); }
.sw-vs__opt span { position: relative; z-index: 1; font: 700 clamp(1.05rem, 3.6vw, 1.35rem)/1.15 var(--font-display); color: var(--color-white); letter-spacing: -0.02em; }
.sw-vs__opt:hover, .sw-vs__opt.is-picked { filter: brightness(1.08); box-shadow: inset 0 0 0 4px var(--color-action); }
.sw-vs__or { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 99px; background: var(--color-white); color: var(--color-navy); font: 700 var(--text-sm) var(--font-display); box-shadow: var(--shadow-card); pointer-events: none; }
.sw-card__body { padding: var(--space-5) var(--space-6) var(--space-6); }
.sw-card__prompt { margin: 0; font: 700 var(--text-xl)/1.2 var(--font-display); color: var(--color-navy); letter-spacing: -0.025em; }
.sw-card__note { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.sw-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); font-size: var(--text-xs); color: var(--color-muted); }
.sw-card__meta a { color: var(--color-sage-dark); font-weight: 600; }
.sw-card__from { display: inline-flex; align-items: center; gap: 4px; color: var(--color-sage-dark); font-weight: 600; }
.sw-card__from .i { width: 14px; height: 14px; }
.sw-card__teaches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }
.sw-card__teaches span { font-size: 0.7rem; padding: 3px 9px; border-radius: 99px; background: var(--color-surface); color: var(--color-muted); }
.sw-stamp { position: absolute; top: 28px; left: 50%; transform: translateX(-50%) rotate(-8deg) scale(.8); padding: 6px 16px; border: 3px solid currentColor; border-radius: 10px; font: 800 1.6rem/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; opacity: 0; transition: opacity 120ms, transform 120ms; pointer-events: none; background: rgb(255 255 255 / 88%); }
.sw-stamp.is-on { opacity: 1; transform: translateX(-50%) rotate(-8deg) scale(1); }
.sw-stamp--yes { color: var(--color-sage-dark); } .sw-stamp--no { color: #c4473f; } .sw-stamp--love { color: #bb7e27; } .sw-stamp--skip { color: var(--color-muted); }
.sw-stamp--maybe { color: #4f6f8f; transform: translateX(-50%) rotate(0deg) scale(.8); } .sw-stamp--maybe.is-on { transform: translateX(-50%) rotate(0deg) scale(1); }
.sw-btn { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 99px; border: 1px solid var(--color-border); background: var(--color-white); box-shadow: 0 6px 18px rgb(15 45 75 / 8%); cursor: pointer; transition: transform var(--transition-fast); }
.sw-btn:hover { transform: translateY(-2px); } .sw-btn:active { transform: scale(.94); }
.sw-btn .i { width: 26px; height: 26px; stroke-width: 2; }
.sw-btn--no { color: #c4473f; } .sw-btn--yes { color: var(--color-sage-dark); } .sw-btn--love { color: #bb7e27; } .sw-btn--love .i { fill: currentColor; stroke: none; }
.sw-btn--maybe { width: auto; height: 52px; padding: 0 20px; display: inline-flex; gap: 6px; align-items: center; color: #4f6f8f; font-weight: 700; font-size: var(--text-sm); }
.sw-btn--maybe .i { width: 22px; height: 22px; }
.sw-btn--skip { width: 46px; height: 46px; color: var(--color-muted); } .sw-btn--skip .i { width: 20px; height: 20px; }
.sw-btn--skip:has(span) { width: auto; padding: 0 18px; display: inline-flex; gap: 6px; font-weight: 600; font-size: var(--text-sm); }
.sw-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); text-align: center; padding: var(--space-8); background: var(--color-white); border-radius: var(--radius-lg); }
.sw-empty h2 { margin: 0; }

/* ---------------------------------------------------------------- your taste */
.taste { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-8); align-items: start; padding-bottom: var(--section-space); }
.taste__groups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.taste__groups > .card.taste__group { margin: 0; } .taste__group h2 { margin-bottom: var(--space-4); }
.taste__side .card:first-child { margin-top: 0; }
.axis { padding-block: var(--space-3); border-top: 1px solid var(--color-border); }
.axis:first-of-type { border-top: 0; }
.axis__labels { display: flex; justify-content: space-between; font-size: var(--text-xs); font-weight: 600; color: var(--color-navy); }
.axis__track { position: relative; display: block; width: 100%; height: 22px; margin: 6px 0 4px; padding: 0; border: 0; background: none; cursor: pointer; }
.axis__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 99px; background: linear-gradient(90deg, var(--color-sky-light), var(--color-surface) 50%, var(--color-sky-light)); }
.axis__mid { position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; background: var(--color-border); }
.axis__dot { position: absolute; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 99px; background: var(--color-action); box-shadow: 0 0 0 4px rgb(62 101 80 / 18%); transition: left 400ms ease; }
.axis__meta { font-size: var(--text-xs); color: var(--color-muted); }
.axis__meta strong { color: var(--color-sage-dark); font-weight: 600; }
.axis.is-unsure .axis__labels { color: var(--color-muted); }
.tag--love { background: rgb(62 101 80 / 12%); color: var(--color-sage-dark); }
.tag--avoid { background: rgb(196 71 63 / 10%); color: #a63d36; }

@media (max-width: 1100px) {
  .taste { grid-template-columns: 1fr; }
  .taste__side { order: -1; } /* brands, loves and notes first on smaller screens; sliders below */
}
@media (max-width: 760px) {
  .swipe { padding-top: var(--space-5); }
  .swipe__head h1 { font-size: var(--text-2xl); }
  .swipe__stage { height: calc(100svh - 330px); min-height: 380px; }
  .taste__groups { grid-template-columns: 1fr; }
  .swipe__hint { display: none; }
}
/* The swipe screen is a focused, one-screen experience */
body[data-view="swipe"] #announce, body[data-view="swipe"] .newsletter, body[data-view="swipe"] .site-footer { display: none; }
@media (max-width: 760px) {
  .swipe { padding: var(--space-4) 0 calc(96px + env(safe-area-inset-bottom)); }
  .swipe__head { margin-bottom: var(--space-3); }
  .swipe__head .eyebrow { display: none; }
  .swipe__stats { font-size: 0.7rem; }
  .swipe__stats span:last-child { text-align: right; }
  .swipe__stage { height: calc(100svh - 365px - env(safe-area-inset-bottom)); min-height: 330px; margin-top: var(--space-3); }
  .swipe__btns { margin-top: var(--space-4); }
  .sw-stmt { padding: var(--space-8) var(--space-6); }
  .sw-card__body { padding: var(--space-4) var(--space-5) var(--space-5); }
}

/* Swipe notes */
.sw-note { margin-top: var(--space-3); }
.sw-note textarea { width: 100%; min-height: 0; resize: none; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font: inherit; font-size: var(--text-sm); color: var(--color-text); background: var(--color-surface-soft, var(--color-white)); }
.sw-note textarea:focus { outline: none; border-color: var(--color-focus); }
.sw-card:has(.sw-note:not([hidden])) .sw-card__teaches { display: none; }
.sw-btn--small { width: 44px; height: 44px; color: var(--color-muted); }
.sw-btn--small .i { width: 19px; height: 19px; }
.sw-btn--note.is-on { color: var(--color-white); background: var(--color-navy); border-color: var(--color-navy); }
.taste__note { padding-block: var(--space-3); border-top: 1px solid var(--color-border); }
.taste__note:first-of-type { border-top: 0; padding-top: 0; }
.taste__note span { font-size: var(--text-xs); color: var(--color-muted); }
.taste__note p { margin: 4px 0 0; font-size: var(--text-sm); color: var(--color-navy); }

/* Compact phone layout: progress and actions share one row, and the card, type and buttons get smaller */
@media (max-width: 760px) {
  .swipe { padding: var(--space-3) 0 calc(84px + env(safe-area-inset-bottom)); }
  .swipe__layout { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "progress head" "stage stage" "btns btns"; column-gap: var(--space-3); align-items: center; }
  .swipe__title, .swipe__hint { display: none; }
  .swipe__head { grid-area: head; margin: 0; }
  .swipe__head .icon-btn { width: 36px; height: 36px; }
  .swipe__head .btn--sm { padding: 0 12px; min-height: 36px; font-size: var(--text-xs); }
  .swipe__progress { grid-area: progress; min-width: 0; }
  .swipe__stats { margin-top: 6px; font-size: 0.68rem; }
  .swipe__stats span:last-child { display: none; }
  .swipe__stage { grid-area: stage; height: min(520px, calc(100svh - 290px - env(safe-area-inset-bottom))); min-height: 300px; margin-top: var(--space-3); }
  .swipe__btns { grid-area: btns; gap: var(--space-3); margin-top: var(--space-3); min-height: 54px; }
  .sw-card { border-radius: var(--radius-md); box-shadow: 0 10px 30px rgb(15 45 75 / 12%); }
  .sw-card--back { transform: scale(.96) translateY(8px); }
  .sw-stmt { gap: var(--space-2); padding: var(--space-6) var(--space-5); }
  .sw-stmt p { font-size: 1.4rem; }
  .sw-vs__opt { padding: var(--space-3); }
  .sw-vs__opt span { font-size: 1rem; }
  .sw-vs__or { width: 36px; height: 36px; font-size: var(--text-xs); }
  .sw-card__body { padding: var(--space-3) var(--space-4) var(--space-4); }
  .sw-card__prompt { font-size: 1.05rem; }
  .sw-card__note, .sw-card__meta { margin-top: 4px; font-size: 0.72rem; }
  .sw-card__teaches { display: none; }
  .sw-stamp { top: 16px; font-size: 1.2rem; }
  .sw-btn { width: 52px; height: 52px; }
  .sw-btn .i { width: 22px; height: 22px; }
  .sw-btn--small { width: 40px; height: 40px; }
  .sw-btn--small .i { width: 18px; height: 18px; }
}

/* Deck modes, wildcard badge, finds */
.sw-modes { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: var(--space-4); border-radius: var(--radius-pill); background: rgb(15 45 75 / 6%); }
.sw-modes a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.sw-modes a.is-active { background: var(--color-white); color: var(--color-navy); box-shadow: 0 2px 8px rgb(15 45 75 / 8%); }
.sw-modes span { min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--color-action); color: var(--color-white); font-size: 0.7rem; text-align: center; }
.sw-wild { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; background: #bb7e27; color: var(--color-white); font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em; box-shadow: 0 4px 12px rgb(0 0 0 / 15%); }
.sw-wild .i { width: 14px; height: 14px; }
.sw-media .ph { width: 100%; height: 100%; }
.sw-media .ph b { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.sw-card__eyebrow { margin: 0 0 2px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-sage-dark); }
.sw-card__meta .i { width: 12px; height: 12px; vertical-align: -1px; }
.swipe__stats--finds { margin-top: 0; }
.taste__label { margin: var(--space-3) 0 var(--space-2); font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
@media (max-width: 760px) {
  .swipe__layout { grid-template-areas: "modes modes" "progress head" "stage stage" "btns btns"; }
  .sw-modes { grid-area: modes; justify-self: start; margin-bottom: var(--space-3); }
  .sw-modes a { padding: 6px 12px; font-size: var(--text-xs); }
  .sw-wild { top: 10px; left: 10px; padding: 4px 9px; font-size: 0.68rem; }
  .sw-card__eyebrow { font-size: 0.66rem; }
  .swipe__stage { height: min(500px, calc(100svh - 330px - env(safe-area-inset-bottom))); }
}
.sw-card__meta a, .sw-card__from { white-space: nowrap; }

/* ---------------------------------------------------------------- buy queue ("To buy") */
.buy-link { position: relative; }
.buy-link__n { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--color-action); color: var(--color-white); font-size: 0.66rem; font-weight: 700; line-height: 18px; text-align: center; }
.buy-link__n[hidden] { display: none; }
.product-card__buy { position: absolute; top: calc(var(--space-3) + 46px); right: var(--space-3); width: 38px; height: 38px; background: rgb(255 255 255 / 92%); }
.product-card__buy .i { width: 19px; height: 19px; }
.product-card__buy[data-on="1"] { background: var(--color-action); color: var(--color-white); }
.product-card__buy[data-on="1"] .i { fill: none; stroke: currentColor; }
.badge--buy { background: var(--color-sky-light) !important; color: var(--color-navy) !important; }
.qty { display: inline-grid; grid-template-columns: 34px 44px 34px; align-items: center; height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-white); flex: none; }
.qty button { height: 100%; padding: 0; border: 0; background: none; color: var(--color-navy); font-size: 1.05rem; font-weight: 600; cursor: pointer; border-radius: var(--radius-pill); }
.qty button:hover { background: var(--color-sky-light); }
.qty input { width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: var(--color-navy); font-weight: 700; text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy__form { display: flex; gap: var(--space-2); align-items: center; }
.buy__form .form-input { flex: 1; min-width: 0; height: 44px; }
.buy__form .btn { flex: none; display: inline-flex; gap: 8px; align-items: center; height: 44px; }
.buy__form .btn .i { width: 18px; height: 18px; }
.buy__fine { margin: var(--space-2) 0 0; font-size: var(--text-xs); color: var(--color-muted); }
.buy__queued { padding: var(--space-3) var(--space-4) var(--space-4); border-radius: var(--radius-md, 12px); background: var(--color-sky-light, #e8f5fc); }
.buy__queued p { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 var(--space-3); font-size: var(--text-sm); color: var(--color-navy); }
.buy__queued p .i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--color-sage-dark); }
.buy-pop { position: absolute; z-index: 5; left: var(--space-2); right: var(--space-2); top: var(--space-2); display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-white); box-shadow: var(--shadow-float); }
.buy-pop__head { display: flex; align-items: center; justify-content: space-between; color: var(--color-navy); font-size: var(--text-sm); }
.buy-pop__head .icon-btn { width: 32px; height: 32px; }
.buy-pop .qty { justify-self: start; }
.buy-pop .form-input { height: 42px; font-size: var(--text-sm); }
.buy-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-8); align-items: start; padding-bottom: var(--section-space); }
.buy-empty { grid-column: 1 / -1; }
.buy-list { border-top: 1px solid var(--color-border); }
.buy-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto 96px 42px; align-items: center; gap: var(--space-5); padding-block: var(--space-4); border-bottom: 1px solid var(--color-border); }
.buy-row__pic { width: 88px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-surface); }
.buy-row__pic img, .buy-row__pic .ph { width: 100%; height: 100%; object-fit: cover; }
.buy-row__pic .ph b { font-size: .8rem; }
.buy-row__main .product-info__tag { margin-bottom: .15rem; }
.buy-row__title { display: block; color: var(--color-navy); font-weight: 700; line-height: 1.35; }
.buy-row__title:hover { color: var(--color-sage-dark); }
.buy-row__meta { margin-top: 2px; font-size: var(--text-xs); color: var(--color-muted); }
.buy-row__oos { color: var(--color-danger); }
.buy-row__note { height: 36px; margin-top: var(--space-2); max-width: 320px; font-size: var(--text-sm); }
.buy-row__qty { display: grid; justify-items: center; gap: 4px; }
.buy-row__unit { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.buy-row__total { color: var(--color-navy); font-weight: 700; text-align: right; }
.buy-sum { position: sticky; top: calc(var(--header-height, 72px) + var(--space-4)); display: grid; gap: var(--space-4); }
.buy-sum__card { margin: 0; padding: var(--space-6); }
.buy-sum__card h2 { margin-bottom: var(--space-4); }
.buy-sum__row { display: flex; justify-content: space-between; color: var(--color-muted); font-size: var(--text-sm); }
.buy-sum__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-border); color: var(--color-navy); }
.buy-sum__total strong { font: 700 var(--text-2xl)/1 var(--font-display); letter-spacing: -0.03em; }
.buy-sum__fine { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--color-muted); }
.buy-sum__note { margin: 0; }
@media (max-width: 1100px) { .buy-page { grid-template-columns: 1fr; } .buy-sum { position: static; } }
@media (max-width: 820px) {
  .buy-row { grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-3); }
  .buy-row__pic { width: 72px; grid-row: span 2; }
  .buy-row__qty { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: var(--space-3); justify-items: start; }
  .buy-row__total { grid-column: 3; grid-row: 2; white-space: nowrap; }
  .buy-row__remove { grid-column: 3; grid-row: 1; align-self: start; width: 32px; height: 32px; }
  .buy-row__note { max-width: none; }
  .product-card__buy { top: calc(var(--space-2) + 44px); right: var(--space-2); }
  .buy__form { flex-wrap: wrap; }
  .buy__form .form-input { flex-basis: calc(100% - 130px); }
  .buy__form .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- quick like / dismiss on New Finds tiles */
#app { overflow-x: clip; } /* a tile swiped off-screen must not add horizontal scroll */
.product-card--dismissible { touch-action: pan-y pinch-zoom; transition: transform var(--transition-standard), opacity var(--transition-standard); }
.product-card--dismissible.is-dragging { transition: none; z-index: 3; }
.product-card--dismissible.is-leaving { opacity: 0; pointer-events: none; }
.product-card--dismissible.is-returning { animation: quick-return .32s ease both; }
@keyframes quick-return { from { opacity: 0; transform: scale(.96); } }
.product-card--dismissible .product-card__media { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.product-card--dismissible .product-card__media img { -webkit-user-drag: none; }
.product-card__dismiss { position: absolute; top: calc(var(--space-3) + 92px); right: var(--space-3); width: 38px; height: 38px; background: rgb(255 255 255 / 92%); transition: opacity var(--transition-fast), background var(--transition-fast); }
.product-card__dismiss .i { width: 17px; height: 17px; }
.product-card__dismiss:hover { background: var(--color-white); color: var(--color-danger); }
.product-card--dismissible .product-card__wishlist:hover { color: var(--color-sage-dark); }
/* Mouse users: Dismiss appears on hover/focus so the grid stays calm. Touch users always see it. */
@media (hover: hover) and (pointer: fine) {
  .product-card__dismiss { opacity: 0; }
  .product-card:hover .product-card__dismiss, .product-card:focus-within .product-card__dismiss { opacity: 1; }
}
/* Swipe hint: "Like" fades in on the left as the tile moves right, "Dismiss" on the right as it moves left. */
.product-card__hint { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); pointer-events: none; border-radius: var(--radius-sm); }
.product-card__hint span { display: inline-flex; gap: 6px; align-items: center; padding: .45rem .8rem; border-radius: var(--radius-pill); background: var(--color-white); font-size: var(--text-xs); font-weight: 700; opacity: 0; box-shadow: var(--shadow-float); }
.product-card__hint .i { width: 15px; height: 15px; }
.product-card__hint-like { color: var(--color-sage-dark); }
.product-card__hint-dismiss { margin-left: auto; color: var(--color-danger); }
.product-card[data-dir="like"] .product-card__hint-like, .product-card[data-dir="dismiss"] .product-card__hint-dismiss { opacity: var(--qp, 0); }
.product-card[data-dir="like"] .product-card__hint { background: rgb(62 101 80 / calc(var(--qp, 0) * 18%)); }
.product-card[data-dir="dismiss"] .product-card__hint { background: rgb(173 56 59 / calc(var(--qp, 0) * 18%)); }
/* Toast with an Undo button */
.toast--action { display: flex; align-items: center; gap: var(--space-4); pointer-events: auto; padding-right: .5rem; }
.toast:not(.show) { pointer-events: none; }
.toast__action { min-height: 34px; padding: .35rem .95rem; border: 0; border-radius: var(--radius-pill); background: rgb(255 255 255 / 16%); color: var(--color-white); font: 700 var(--text-sm)/1 var(--font-body); cursor: pointer; }
.toast__action:hover, .toast__action:focus-visible { background: rgb(255 255 255 / 28%); }
@media (max-width: 820px) {
  .product-card__dismiss { top: calc(var(--space-2) + 88px); right: var(--space-2); }
  .product-card__hint { padding: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) {
  .product-card--dismissible, .product-card--dismissible.is-returning { transition: none; animation: none; }
}

/* "Sometimes" tags on the taste page */
.tag--maybe { background: #edf2f7; color: #4f6f8f; }
/* the mobile .sw-btn size rule above would squash the pill */
@media (max-width: 760px) {
  .sw-btn.sw-btn--maybe { width: auto; height: 46px; padding: 0 14px; }
  .sw-btn--maybe .i { display: none; }
}
