:root {
  --ink: #000;
  --muted: #6b6b6b;
  --faint: #a3a3a3;
  --line: #e4e4e4;
  --paper: #fff;
  --wash: #f6f5f3;
  --sale: #8c1c13;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  /* Adjustable in Admin → Design (design.py); these are the original values */
  --on-ink: #fff;
  --size-body: 14px; --size-wordmark: 34px; --size-title: 30px; --size-heading: 24px;
  --size-product: 17px; --size-price: 13px; --size-label: 10.5px; --size-section: 11px;
  --page-width: 1480px; --gutter: 40px; --grid-row-gap: 44px; --grid-col-gap: 22px; --section-space: 48px;
  --chip: rgba(255,255,255,.92);   /* round buttons over product photos */
  --ok: #2f6b3a;
  color-scheme: light;
}
/* Dark mode: chosen in Settings → Appearance, or "Automatic" on a device set to dark. The colors are the defaults
   of Admin → Design → Dark mode colors (a saved design version layers its own over these). The admin portal has no
   data-theme, so it always stays light. */
:root[data-theme="dark"] {
  --ink: #ece9e4; --paper: #121211; --on-ink: #121211; --muted: #a19d97; --faint: #6e6b66; --line: #2e2d2b;
  --wash: #1c1b19; --sale: #e07a6c; --chip: rgba(28,27,25,.88); --ok: #86c293; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ink: #ece9e4; --paper: #121211; --on-ink: #121211; --muted: #a19d97; --faint: #6e6b66; --line: #2e2d2b;
    --wash: #1c1b19; --sale: #e07a6c; --chip: rgba(28,27,25,.88); --ok: #86c293; color-scheme: dark;
  }
  :root[data-theme="auto"] .card .img img, :root[data-theme="auto"] .qv-img img { filter: brightness(.93); }
}
/* Dark color dots (Black, Navy…) keep a visible edge at night */
:root[data-theme="dark"] .swatch i { border-color: var(--faint); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .swatch i { border-color: var(--faint); } }
/* Bright product photos are softened a little at night */
:root[data-theme="dark"] .card .img img, :root[data-theme="dark"] .qv-img img { filter: brightness(.93); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); font-size: var(--size-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- header ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 40px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; gap: 28px; align-items: center; }
.topbar a:hover, .topbar button:hover { opacity: .55; }
.topbar form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; text-transform: inherit; font-size: inherit; }
.badge { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: var(--ink);
  color: var(--on-ink); font-size: 9px; text-align: center; letter-spacing: 0; margin-left: 4px; padding: 0 4px; }
.wordmark { display: block; text-align: center; font-family: var(--serif); font-weight: 400; font-size: var(--size-wordmark);
  letter-spacing: .42em; text-transform: uppercase; padding: 26px 0 18px; margin: 0; padding-left: .42em; }
.depts { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; padding: 0 20px 16px;
  border-bottom: 1px solid var(--line); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; }
.depts button { background: none; border: 0; padding: 4px 0; cursor: pointer; letter-spacing: inherit;
  text-transform: inherit; border-bottom: 1px solid transparent; }
.depts button.on, .depts button:hover { border-bottom-color: var(--ink); }

/* ---------- layout ---------- */
.wrap { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; }
h1.title { font-family: var(--serif); font-weight: 400; font-size: var(--size-title); letter-spacing: .08em; text-transform: uppercase;
  text-align: center; margin: 0 0 8px; }
.sub { text-align: center; color: var(--muted); margin: 0 0 40px; }
h2.section { font-size: var(--size-section); letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  border-bottom: 1px solid var(--ink); padding-bottom: 10px; margin: var(--section-space) 0 20px; }
.flash { border: 1px solid var(--ink); padding: 12px 16px; margin: 24px auto 0; max-width: 760px; text-align: center; }
.flash.warn { color: var(--sale); border-color: var(--sale); }
.block-note { color: var(--sale); font-size: 12.5px; margin: 6px 0 0; }
.toast.warn { background: var(--sale); }

/* ---------- forms ---------- */
label.f, span.f, legend.f, p.f { display: block; padding: 0; font-size: var(--size-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=url], input[type=tel], select {
  width: 100%; border: 0; border-bottom: 1px solid var(--ink); padding: 9px 0; background: transparent; border-radius: 0;
  outline: none; font-size: 15px; }
select { cursor: pointer; }
input:focus, select:focus { border-bottom-width: 2px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.btn { display: inline-block; background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); padding: 13px 30px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn.small { padding: 8px 16px; font-size: 10px; }
.btn[disabled] { opacity: .4; cursor: default; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; margin: 18px 0; }
.check input { accent-color: var(--ink); width: 15px; height: 15px; }

/* toggle switch */
.toggle { position: relative; display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 10px 0; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }   /* (hidden to the eye only:
   the keyboard and screen readers still reach it) */
.toggle input:focus-visible + .sw { outline: 2px solid var(--ink); outline-offset: 2px; }
.toggle .sw { width: 34px; height: 18px; border: 1px solid var(--ink); border-radius: 9px; position: relative; flex: none; transition: background .2s; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transition: transform .2s, background .2s; }
.toggle input:checked + .sw { background: var(--ink); }
.toggle input:checked + .sw::after { transform: translateX(16px); background: var(--paper); }

/* ---------- auth ---------- */
.auth { max-width: 400px; margin: 40px auto 100px; padding: 0 24px; }
.auth .btn { width: 100%; margin-top: 32px; }
.auth .alt { text-align: center; margin-top: 24px; color: var(--muted); }
.auth .alt a { color: var(--ink); border-bottom: 1px solid var(--ink); }
.auth .alt .inline-form { display: inline; }
.auth .alt .linkbtn { color: var(--ink); font: inherit; padding: 0; border: 0; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- shop ---------- */
.shopbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0;
  border-bottom: 1px solid var(--line); font-size: 12px; }
.shopbar .search { flex: 1; max-width: 420px; position: relative; }
.shopbar .search input { font-size: 14px; padding-left: 24px; }
.shopbar .search svg { position: absolute; left: 0; top: 11px; }
.shopbar .meta { display: flex; align-items: center; gap: 20px; color: var(--muted); letter-spacing: .06em; }
.shopbar select { width: auto; border: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 0; }
.refresh { background: none; border: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding: 0; }
.refresh.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.filters-btn { display: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
aside.filters .close { display: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

.shop { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding-top: 28px; }
aside.filters { font-size: 13px; }
aside.filters .group { border-bottom: 1px solid var(--line); padding: 14px 0; }
aside.filters .group:first-child { padding-top: 0; }
aside.filters h3 { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; margin: 0 0 10px; }
aside.filters .opts { max-height: 260px; overflow: auto; }
aside.filters .opt { display: flex; gap: 10px; align-items: center; padding: 3px 0; cursor: pointer; }
aside.filters .opt input { accent-color: var(--ink); }
aside.filters .opt span.n { color: var(--faint); margin-left: auto; font-size: 11px; }
/* Colors: a compact row of small dots (named on hover), the picked ones named underneath */
.swatches { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.swatch { display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; background: none; border: 0; padding: 0;
  color: var(--muted); }
.swatch i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); outline: 1px solid transparent; outline-offset: 2px; }
.swatch:hover i { outline-color: var(--line); }
.swatch-picked { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.swatch.on i { outline-color: var(--ink); }
.swatch.on { color: var(--ink); }
.price-row { display: flex; gap: 12px; align-items: center; }
.price-row input { font-size: 13px; }
.clear { background: none; border: 0; cursor: pointer; padding: 14px 0; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.sizes-note { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.sizes-note a { border-bottom: 1px solid var(--muted); }

.grid { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--grid-row-gap) var(--grid-col-gap); }
.grid[data-cols="5"], .grid[data-cols="6"] { gap: 36px 16px; }
.grid[data-cols="7"], .grid[data-cols="8"], .grid[data-cols="9"] { gap: 30px 12px; }
.grid[data-cols="10"], .grid[data-cols="11"], .grid[data-cols="12"] { gap: 26px 10px; }
.grid[data-cols="2"] .name { font-size: 20px; }
/* A card shrinks to fit how many are shown per row: its text and buttons follow its own width. */
.card { position: relative; container-type: inline-size; }

.card .img { position: relative; aspect-ratio: 3 / 4; background: var(--wash); overflow: hidden; }
.card .img img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card[data-id] .img img { opacity: 0; transition: opacity .25s ease, transform .6s ease; }   /* (shop.js's cards: showPic) */
.card[data-id] .img img.in { opacity: 1; }
.card .img img.gone { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .card .img img { transition: none; } }
/* While a picture loads: a soft tint of the item's own color (app.serialize_item "tint"), over the page's own wash */
.card .img[data-tint="black"] { background: color-mix(in srgb, #1c1c1c 16%, var(--wash)); }
.card .img[data-tint="white"] { background: color-mix(in srgb, #ffffff 55%, var(--wash)); }
.card .img[data-tint="grey"] { background: color-mix(in srgb, #8a8a8a 18%, var(--wash)); }
.card .img[data-tint="navy"] { background: color-mix(in srgb, #1f2a44 16%, var(--wash)); }
.card .img[data-tint="blue"] { background: color-mix(in srgb, #4a6fa5 18%, var(--wash)); }
.card .img[data-tint="brown"] { background: color-mix(in srgb, #7a5230 16%, var(--wash)); }
.card .img[data-tint="beige"] { background: color-mix(in srgb, #cbb89a 30%, var(--wash)); }
.card .img[data-tint="green"] { background: color-mix(in srgb, #5d7a52 16%, var(--wash)); }
.card .img[data-tint="red"] { background: color-mix(in srgb, #9b2c2c 14%, var(--wash)); }
.card .img[data-tint="pink"] { background: color-mix(in srgb, #e4a3b4 24%, var(--wash)); }
.card .img[data-tint="purple"] { background: color-mix(in srgb, #7a5a8c 16%, var(--wash)); }
.card .img[data-tint="yellow"] { background: color-mix(in srgb, #e3c35a 22%, var(--wash)); }
.card .img[data-tint="orange"] { background: color-mix(in srgb, #d9824a 20%, var(--wash)); }
.card .acts, .card .tag { z-index: 2; }
.card:hover .img img { transform: scale(1.03); }
.card .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif);
  letter-spacing: .3em; color: var(--faint); text-transform: uppercase; font-size: 13px; }
.card .acts { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
.card .act { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.card:hover .act, .card .act.on, .card .act:focus-visible { opacity: 1; }
.card .act.on { background: var(--ink); }
.card .act.on svg { stroke: var(--on-ink); }
.card .act.on[data-kind="favorite"] svg { fill: var(--on-ink); }
.act-lg.on svg { fill: none; }
.act-lg.on[data-kind="favorite"] svg { fill: var(--on-ink); }
.card .tag { position: absolute; left: 0; bottom: 12px; background: var(--paper); padding: 4px 10px; font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; }
.card .tag.sold { color: var(--muted); }
.card .info { padding-top: 14px; }
.card .brand { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.card .name { font-family: var(--serif); font-size: var(--size-product); line-height: 1.25; margin: 4px 0 6px; }
.card .price { font-size: var(--size-price); letter-spacing: .04em; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }   /* (wraps in narrow cards instead of running into the next) */
.card .price s { color: var(--faint); }
.card .price .now.sale { color: var(--sale); }
.card .price .off { color: var(--sale); font-size: 11px; letter-spacing: .1em; }
.card .sz { margin-top: 6px; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.card .sz .x { color: var(--faint); text-decoration: line-through; }
.card .sz .mine { color: var(--ink); font-weight: 500; }

.empty { text-align: center; padding: 100px 20px; color: var(--muted); grid-column: 1 / -1; }
.empty h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); margin: 0 0 10px; }
.empty .load-retry { color: var(--ink); border-bottom: 1px solid currentColor; }   /* ("Couldn't load these": Try again) */
.more { text-align: center; padding: 56px 0 96px; }
.count { color: var(--muted); }
.tabs { display: flex; justify-content: center; gap: 32px; margin-bottom: 8px; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; }
.tabs button { background: none; border: 0; cursor: pointer; padding: 4px 0; border-bottom: 1px solid transparent; letter-spacing: inherit; text-transform: inherit; }
.tabs button.on { border-bottom-color: var(--ink); }
.tabs a { padding: 4px 0; border-bottom: 1px solid transparent; }
.tabs a.on, .tabs a:hover { border-bottom-color: var(--ink); }
.tabs { flex-wrap: wrap; row-gap: 8px; }
.skeleton .img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- lists (stores, alerts, categories) ---------- */
.row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding: 20px 0; }
.row .nm { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.row .dm { color: var(--muted); font-size: 12.5px; }
.status { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.status.ok { color: var(--ink); }
.status.bad { color: var(--sale); }
.status.wait { color: var(--muted); }
details.edit summary { list-style: none; cursor: pointer; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); display: inline-block; }
details.edit summary::-webkit-details-marker { display: none; }
details.edit[open] { grid-column: 1 / -1; }
details.edit .panel, dialog.brand-edit .panel { padding: 8px 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
details.edit .panel .actions, dialog.brand-edit .panel .actions { grid-column: 1 / -1; display: flex; gap: 12px; margin-top: 20px; }
/* A brand's products to show in my shop: what's chosen now, beside the button that opens the choice */
.scope-now-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 6px; }
.scope-now { font-size: 13px; }
dialog.brand-edit .scope-now-row { justify-content: flex-start; }   /* (the window: the button under its heading, at the left) */
.scope-pick { margin-top: 10px; }
.addform { display: grid; grid-template-columns: 1fr 200px auto; gap: 24px; align-items: end; }
.alert { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); padding: 16px 0; }
.alert img, .alert .ph { width: 64px; height: 84px; object-fit: cover; background: var(--wash); }
.alert.unread .msg::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: middle; }
.alert .when { color: var(--muted); font-size: 12px; }
.cat { display: flex; gap: 16px; align-items: end; border-bottom: 1px solid var(--line); padding: 10px 0; }
.cat form { margin: 0; }
.cat input { font-size: 14px; }

footer { border-top: 1px solid var(--line); text-align: center; padding: 28px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .topbar { padding: 10px 16px; }
  .topbar nav { gap: 14px; overflow-x: auto; white-space: nowrap; max-width: 100%; font-size: 10px; scrollbar-width: none; }
  .topbar { justify-content: flex-start; }
  .topbar .greet { display: none; }
  .wordmark { font-size: 24px; padding: 20px 0 14px; }
  .depts { gap: 20px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
  .shop { grid-template-columns: 1fr; gap: 0; }
  .grid { gap: 32px 12px; }
  .grid[data-cols="2"] .name { font-size: 15px; }
  .shopbar { flex-wrap: wrap; }
  .shopbar .search { max-width: none; flex-basis: 100%; }
  .shopbar .meta { width: 100%; justify-content: space-between; gap: 12px 14px; flex-wrap: wrap; }

  .filters-btn { display: inline-block; }
  aside.filters { display: none; position: fixed; inset: 0; background: var(--paper); z-index: 20; overflow: auto; padding: 20px 16px 80px; }
  aside.filters.open { display: block; }
  aside.filters .close { display: block !important; margin-bottom: 16px; }
  .card .act { opacity: 1; }
  /* small cards: smaller icons, and only the two you'd use at a glance (favorite, watch); the others are in the product view */
  .card .acts { top: 3px; right: 3px; gap: 0; }
  .card .act { width: 28px; height: 28px; }
  .card .act[data-kind="bought"], .card .act[data-kind="hide"] { display: none; }
  .addform, details.edit .panel, dialog.brand-edit .panel { grid-template-columns: 1fr; }
  .alert { grid-template-columns: 56px 1fr; }
  .alert > :last-child { grid-column: 2; }
}

/* ---------- welcome / choices ---------- */
textarea { width: 100%; border: 1px solid var(--ink); padding: 12px 14px; font: inherit; font-size: 15px; line-height: 1.6;
  border-radius: 0; resize: vertical; outline: none; background: transparent; }
textarea:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--ink); border-radius: 50%;
  font-size: 10px; margin-right: 10px; letter-spacing: 0; }
.choice { display: flex; gap: 0; }
.choice label { flex: 1; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; text-align: center; padding: 14px 0; border: 1px solid var(--ink); margin-left: -1px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; transition: background .15s, color .15s; }
.choice label:first-child span { margin-left: 0; }
.choice input:checked + span { background: var(--ink); color: var(--on-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* gender switch in the shop bar */
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg button { background: var(--paper); border: 0; padding: 6px 14px; cursor: pointer; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--on-ink); }

/* category tree */
.cats .cat-row { display: flex; justify-content: space-between; width: 100%; background: none; border: 0; padding: 4px 0;
  cursor: pointer; text-align: left; font-size: 13px; }
.cats .cat-row .n { color: var(--faint); font-size: 11px; }
.cats .cat-row.on { font-weight: 500; }
.cats .cat-row.on::before { content: "— "; }
.cats .subs { padding: 2px 0 8px 14px; border-left: 1px solid var(--line); margin: 2px 0 6px 2px; }
.cats .back { background: none; border: 0; padding: 0 0 8px; cursor: pointer; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); }
.card .ptype { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; margin-top: 2px; }
[hidden] { display: none !important; }


/* ================================================================= v2 layout */

/* masthead with menu button */
.masthead { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 24px; }
.masthead .wordmark { padding: 26px 0 18px; }
.menu-btn { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer;
  padding: 8px; color: var(--ink); display: grid; place-items: center; }
.menu-btn { left: 32px; }
.menu-btn .dot { position: absolute; top: 6px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--sale); }
.menu-btn:hover { opacity: .55; }
.rule { border-bottom: 1px solid var(--line); }

/* slide-out menu */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 40; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: var(--paper); z-index: 41;
  transform: translateX(calc(-100% - 60px)); transition: transform .32s cubic-bezier(.2,.7,.2,1); padding: 72px 40px 40px;
  display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,.08); overflow-y: auto; }
.drawer.open { transform: none; }
.drawer a, .drawer .linkbtn { display: flex; align-items: center; font-family: var(--serif); font-size: 26px; letter-spacing: .04em;
  padding: 10px 0; border-bottom: 1px solid var(--line); text-transform: none; text-align: left; width: 100%; }
.drawer a.on { font-style: italic; }
.drawer a:hover, .drawer .linkbtn:hover { opacity: .55; }
.drawer form { margin-top: 18px; }
.drawer form .linkbtn { font-size: 13px; font-family: var(--sans); letter-spacing: .16em; text-transform: uppercase; border: 0; color: var(--muted); }
.drawer .badge { margin-left: 10px; }
.drawer-close { position: absolute; top: 22px; left: 32px; background: none; border: 0; font-size: 18px; cursor: pointer; padding: 6px; }
.drawer-greet { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

/* department buttons */
.deptbar { display: flex; justify-content: center; padding: 4px 20px 22px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ink); }
.seg button { background: var(--paper); border: 0; padding: 7px 14px; cursor: pointer; font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button:hover:not(.on) { background: var(--wash); }
.seg button.on { background: var(--ink); color: var(--on-ink); }
.seg-lg button { padding: 11px 22px; font-size: 11px; letter-spacing: .22em; }

/* add a store | search */
.searchbar { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.searchbar .addstore, .searchbar .search { display: flex; align-items: center; gap: 10px; padding: 16px 0; position: relative; }
.searchbar .addstore { padding-right: 28px; border-right: 1px solid var(--line); }
.searchbar .search { padding-left: 28px; }
.searchbar input { border: 0 !important; padding: 6px 0; font-size: 14px; flex: 1; min-width: 0; }
.searchbar svg { flex: none; }
.searchbar .btn.small { padding: 7px 14px; }

/* product categories | store categories */
.catbar { display: grid; grid-template-columns: minmax(0, auto) minmax(0, auto); justify-content: space-between; gap: 16px 32px;
  padding: 18px 0; border-bottom: 1px solid var(--line); }
.catgroup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.catgroup:last-child { justify-content: flex-end; }
.catlabel { font-size: var(--size-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.catgroup .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.catgroup .seg::-webkit-scrollbar { display: none; }
.catgroup .seg button { flex: none; }

/* count, sort, view, refresh */
.shopbar { border-bottom: 1px solid var(--line); flex-wrap: wrap; row-gap: 12px; justify-content: flex-end; padding: 12px 0; }
.shopbar .meta { width: 100%; justify-content: flex-end; }
.perrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.perrow[hidden] { display: none; }
.perrow label { color: var(--muted); }
.perrow input[type=range] { width: 96px; accent-color: var(--ink); padding: 0; border: 0; }
.perrow span { min-width: 1.2em; text-align: right; }
.mysize-bar[hidden], .lvls[hidden] { display: none; }
/* The bar's own checkboxes are small, like its text (the label is what's tapped); not the big touch-screen boxes */
.shopbar .check { gap: 7px; }
.shopbar .check input, .shopbar .check input[type=checkbox] { width: 11px; height: 11px; margin: 0; }
/* Price levels, $ … $$$$: in the bar, words like its others (the picked ones underlined, as in the departments) */
.lvls { display: inline-flex; align-items: center; }
/* $$$$, one picker: the signs up to the level picked are lit (and, on a computer, up to the one under the pointer) */
.lvls button { background: none; border: 0; padding: 4px 1px; font: inherit; font-size: 13px; letter-spacing: 0; color: var(--muted);
  opacity: .55; cursor: pointer; white-space: nowrap; }
.lvls button:first-child { padding-left: 4px; } .lvls button:last-child { padding-right: 4px; }
.lvls button.lit { color: var(--ink); opacity: 1; font-weight: 600; }
@media (hover: hover) {
  .lvls:hover button { color: var(--ink); opacity: 1; }
  .lvls button:hover ~ button { color: var(--muted); opacity: .55; font-weight: 400; }
}
.lvls button:focus-visible { outline: 1px solid var(--ink); outline-offset: 1px; }
/* … and in More filters, larger, with the level's name beside it */
/* Settings → Price levels: the simple slider of three scales (_price_table.html) */
.pl-scale { max-width: 520px; margin: 0 0 18px; }
.pl-scale input[type=range] { width: 100%; accent-color: var(--ink); margin: 6px 0 2px; }
.pl-scale-marks { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pl-sample { font-size: 13px; margin: 12px 0 6px; font-variant-numeric: tabular-nums; display: grid; gap: 2px; }
#plDetailBtn { text-decoration: underline; text-underline-offset: 3px; }
.lvl-pick { display: flex; align-items: center; gap: 14px; margin: 2px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }   /* (a line between the level and the price range) */
.lvls-panel button { font-size: 22px; padding: 2px 3px; }
.lvl-name { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lvls.picked + .lvl-name { color: var(--ink); }
.lvls button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* What a $ level means, shown when a button is held on a phone (shop.html: showLevelTip) */
.lvl-tip { position: fixed; z-index: 60; max-width: min(320px, calc(100vw - 16px)); padding: 9px 12px; background: var(--ink);
  color: var(--paper); font-size: 12.5px; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  pointer-events: none; }
.groupcolors { margin: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.card .also { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* The watch picker: a small list that slides out beside the eye */
.wp { position: absolute; z-index: 70; width: 230px; max-height: 60vh; overflow: auto; background: var(--paper);
  border: 1px solid var(--ink); padding: 12px 12px 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12);
  opacity: 0; transform: translateX(8px); transition: opacity .15s ease, transform .18s ease; }
.wp[data-side="right"] { transform: translateX(-8px); }
.wp.in { opacity: 1; transform: none; }
.wp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.wp h3 { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; margin: 0; }
.wp-x { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; color: inherit; }
.wp-opts { display: grid; gap: 4px; margin-bottom: 8px; }
.wp-opt { display: flex; align-items: center; gap: 8px; padding: 4px 6px; cursor: pointer; font-size: 13px; }
.wp-opt:hover { background: var(--wash); }
.wp-opt img { width: 26px; height: 32px; object-fit: cover; }
.wp-opt em { color: var(--muted); font-style: normal; font-size: 11px; }
.wp-opt input { accent-color: var(--ink); }
.wp .hint { font-size: 11.5px; margin: 0 0 8px; }
.wp-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* category tree */
.cats .cat-node { border-bottom: 1px solid transparent; }
.cats .cat-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0; }
.cats .cat-row .opt { flex: 1; }
.cats .caret { background: none; border: 0; cursor: pointer; width: 22px; height: 22px; position: relative; flex: none; }
.cats .caret::before { content: ""; position: absolute; left: 8px; top: 7px; width: 5px; height: 5px; border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink); transform: rotate(-45deg); transition: transform .15s; }
.cats .caret.open::before { transform: rotate(45deg); top: 5px; }
.cats .caret-space { width: 22px; flex: none; }
.cats .subs { padding: 0 0 6px 22px; margin: 0; border-left: 0; }
.cats .subs .opt { font-size: 12.5px; }
/* a long category list scrolls in its own box, like the brands (taller: its sub-categories open inside it) */
aside.filters .opts.cats, aside.filters .cats { max-height: 320px; overflow: auto; overscroll-behavior: contain; }
aside.filters h3 { display: flex; justify-content: space-between; align-items: baseline; }
.mini-clear { background: none; border: 0; cursor: pointer; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--muted); padding: 0; }

/* price range slider */
.range { position: relative; height: 26px; }
.range-track { position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--line); }
.range-fill { position: absolute; top: -1px; height: 3px; background: var(--ink); }
.range input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 26px; margin: 0; background: none;
  pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 14px;
  border-radius: 50%; background: var(--paper); border: 1px solid var(--ink); cursor: pointer; }
.range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 13px; height: 13px; border-radius: 50%; background: var(--paper);
  border: 1px solid var(--ink); cursor: pointer; }
.range input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .04em; margin-top: 4px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 12px 20px;
  font-size: 13px; z-index: 80; max-width: calc(100vw - 32px); }   /* (above quick view, the sheets, Brand discovery and the
   Save-all bar, so a message is never hidden behind what it's about; under the brand being dragged, 90) */

/* purchases */
.purchase { display: grid; grid-template-columns: 84px 1fr; gap: 20px; border-bottom: 1px solid var(--line); padding: 20px 0; }
.purchase img, .purchase .ph { width: 84px; height: 112px; object-fit: cover; background: var(--wash); }
.purchase .fields { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 0 18px; }
.purchase .fields .wide { grid-column: 1 / -1; }
.purchase .row-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.totals { display: flex; justify-content: space-between; border-bottom: 1px solid var(--ink); padding: 10px 0; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; }

.alert-kind { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 860px) {
  .menu-btn { left: 8px; }
  .searchbar .addstore { padding-right: 14px; }
  .searchbar .search { padding-left: 14px; }
  .searchbar input { font-size: 13px; }
  .catgroup { flex-direction: column; align-items: flex-start; gap: 8px; }
  .catgroup:last-child { align-items: flex-end; }
  .seg button { padding: 8px 12px; }
  .shopbar .meta { justify-content: space-between; }
  .purchase .fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .catgroup { flex-direction: column; align-items: flex-start; gap: 8px; }
  .catgroup:last-child { align-items: flex-end; }
}
@media (max-width: 640px) {
  .catbar { grid-template-columns: minmax(0, 1fr); }
  .catgroup:last-child { align-items: flex-start; }
}
@media (max-width: 520px) {
  .searchbar { grid-template-columns: 1fr; }
  .searchbar .addstore { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .searchbar .search { padding-left: 0; }
}

/* ---------- quick view ---------- */
.qv-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.36); z-index: 60; }
.qv { position: fixed; z-index: 61; top: 4vh; left: 50%; transform: translateX(-50%); width: min(1080px, calc(100vw - 48px));
  max-height: 92vh; background: var(--paper); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.qv-top { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.qv-top a, .qv-top button { width: 40px; height: 40px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--ink);
  cursor: pointer; color: var(--ink); }
.qv-top a:hover, .qv-top button:hover { background: var(--ink); color: var(--on-ink); }
.qv-body { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; min-height: 0; flex: 1; }
.qv-media { background: var(--wash); display: flex; flex-direction: column; min-height: 0; }
.qv-main { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.qv-main img { width: 100%; height: 100%; max-height: 80vh; object-fit: contain; }
.qv-thumbs { display: flex; gap: 6px; padding: 10px; overflow-x: auto; background: var(--paper); border-top: 1px solid var(--line); }
.qv-thumbs:empty { display: none; }
.qv-thumbs button { flex: none; width: 56px; height: 72px; padding: 0; border: 1px solid transparent; background: var(--wash); cursor: pointer; }
.qv-thumbs button.on { border-color: var(--ink); }
.qv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qv-info { padding: 44px 40px 32px; overflow-y: auto; }
.qv-info .brand { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.qv-info h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 8px 0 12px; padding-right: 60px; }
.qv-info .price { font-size: 15px; letter-spacing: .04em; }
.qv-info .price s { color: var(--faint); margin-right: 8px; }
.qv-info .price .sale { color: var(--sale); }
.qv-info .price .off { color: var(--sale); margin-left: 8px; font-size: 12px; }
.qv-cat { color: var(--muted); font-size: 12px; letter-spacing: .06em; margin-top: 6px; }
.qv-section { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; }
.qv-section h4 { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; margin: 0 0 8px; }
.qv-section p { margin: 0 0 8px; }
.qv-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.qv-sizes span { min-width: 40px; padding: 6px 8px; text-align: center; border: 1px solid var(--line); font-size: 12px; }
.qv-sizes .x { color: var(--faint); text-decoration: line-through; }
.qv-sizes .mine { border-color: var(--ink); font-weight: 500; }
.qv-details { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.qv-details ul { margin: 0 0 8px; padding-left: 18px; }
.qv-details li { margin: 2px 0; }
.qv-actions { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.act-lg { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: var(--paper); padding: 9px 14px; cursor: pointer;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.act-lg.on { background: var(--ink); color: var(--on-ink); }
.act-lg.on svg { stroke: var(--on-ink); fill: var(--on-ink); }
.qv-cta { display: block; text-align: center; margin-top: 14px; }
@media (max-width: 860px) {
  /* Phones: one column that scrolls as a whole. The columns are capped at the screen width (a wide row of
     "other colors" must not stretch the panel), and the photo gets a real height instead of filling a
     cell that has none. */
  .qv { top: 0; left: 0; transform: none; width: 100vw; height: 100dvh; max-height: none; }
  .qv-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; overflow-x: hidden; }
  .qv-media, .qv-info { min-width: 0; max-width: 100vw; }
  .qv-media { min-height: auto; }
  .qv-main { display: block; height: 56vh; height: 56dvh; overflow: hidden; }
  .qv-main img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .qv-info { padding: 24px 16px 40px; overflow: visible; }
  .qv-info h2 { font-size: 24px; padding-right: 0; }
  .qv-top { top: 10px; right: 10px; }
}

/* settings: shop page sections */
.sections { list-style: none; padding: 0; margin: 0 0 12px; border-top: 1px solid var(--line); }
.sections li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sections .move button { background: none; border: 1px solid var(--line); width: 30px; height: 30px; cursor: pointer; margin-left: 4px; }
.sections .move button:hover { border-color: var(--ink); }
/* stores: favorite brand star */
.star-form { display: inline; margin: 0; }
.star { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--line); padding: 0 6px 0 0; vertical-align: -1px; }
.star.on { color: var(--ink); }
.star:hover { color: var(--muted); }

/* ---------- shelves: rows at the top of the shop ---------- */
.shelves:empty { display: none; }
.shelf { padding: 10px 0 8px; border-bottom: 1px solid var(--line); }   /* (same top as folded: the title doesn't move when a row opens) */
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.shelf-head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--size-heading); letter-spacing: .04em; margin: 0; line-height: 1.15; }
.shelf-head a, .shelf-head .linkbtn { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.shelf-head > a, .shelf-head > .linkbtn { margin-block: -12px; }   /* (a phone's 40px tap area doesn't make an open row's title line taller) */
.shelf-row { display: grid; grid-auto-flow: column; gap: var(--rowgap, 18px);
  grid-auto-columns: calc((100% - (var(--rowcols, 6) - 1) * var(--rowgap, 18px)) / var(--rowcols, 6));   /* (set by the page: the grid's own columns and gap, so row cards match it) */
  overflow-x: auto; padding-bottom: 18px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf-row .card { scroll-snap-align: start; }
.shelf:not(.open-all) .shelf-row .card .sz { display: none; }   /* (opened, a row's cards show their sizes, as below) */
/* A row opened with See all: its cards in rows, as the products below (same columns and gap), no sideways scrolling */
.shelf.open-all .shelf-row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(var(--rowcols, 6), minmax(0, 1fr));
  row-gap: var(--rowrowgap, var(--grid-row-gap)); overflow-x: visible; scroll-snap-type: none; padding-bottom: 8px; }
.shelf-more { padding: 24px 0 32px; }
/* A row's See all / Show less (a button) and the Brands row's See all (a link) underline alike: on phones the button's
   40px tap area would otherwise put its line well below the words */
@media (max-width: 860px) {
  .shelf-head > a, .shelf-head > .linkbtn { border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
}
@media (max-width: 640px) { .shelf-head h2 { font-size: 20px; } }

/* fabric on cards */
.card .fabric { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* last refreshed, above the button */
.refresh-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.last-refreshed { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.last-refreshed:empty { display: none; }

/* ---------- onboarding ---------- */
.onboard .steps { display: flex; justify-content: center; gap: 0; list-style: none; padding: 0; margin: 0 0 40px; }
.onboard .steps li { display: flex; align-items: center; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.onboard .steps li + li::before { content: ""; width: 28px; height: 1px; background: var(--line); margin: 0 12px; }
.onboard .steps li span { white-space: nowrap; }   /* (six steps: each name on one line) */
.onboard .steps li.on, .onboard .steps li.done { color: var(--ink); }
.onboard .steps li.on span { border-bottom: 1px solid var(--ink); }
.onboard h1:focus { outline: none; }
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 12px 0 8px; }
.intro-grid h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 8px 0 6px; }
.intro-grid p { color: var(--muted); font-size: 13.5px; margin: 0; }
.intro-num { font-size: 10.5px; letter-spacing: .2em; color: var(--faint); }
.step-actions { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.optional { text-transform: none; letter-spacing: 0; color: var(--faint); }
.chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); padding: 6px 6px 6px 12px; font-size: 12.5px; }
.chip button { background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.popular { display: flex; flex-wrap: wrap; gap: 8px; }
.popular button { background: var(--paper); border: 1px solid var(--line); padding: 7px 12px; cursor: pointer; font-size: 12.5px; }
.popular button:hover { border-color: var(--ink); }
.popular button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (max-width: 700px) {
  .intro-grid { grid-template-columns: 1fr; }
  /* the row of step names doesn't fit a phone: "Step 2 of 5 · About you" instead */
  .onboard .steps { display: none; }
  .onboard .steps-phone { display: block; }
}

/* ---------- store picker dropdown ---------- */
.sp-wrap { position: relative; flex: 1; min-width: 0; }
.sp-wrap input { width: 100%; }
.sp-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 4px 0;
  background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.08); max-height: 320px; overflow-y: auto; }
.sp-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; cursor: pointer; }
.sp-list li.on, .sp-list li:hover { background: var(--wash); }
.sp-name { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.sp-domain { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-list li.added .sp-name { color: var(--muted); }

/* ---------- tour ---------- */
.tour { position: fixed; z-index: 70; width: min(320px, calc(100vw - 32px)); background: var(--ink); color: var(--on-ink); padding: 18px 20px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.tour h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 4px 0 6px; }
.tour p { font-size: 13px; line-height: 1.5; margin: 0 0 14px; color: var(--on-ink); opacity: .86; }
.tour-step { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--on-ink); opacity: .65; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; }
.tour .linkbtn { color: var(--on-ink); opacity: .75; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.tour .btn { background: var(--paper); color: var(--ink); border-color: var(--on-ink); }
.tour .btn.ghost { background: transparent; color: var(--on-ink); }
.tour-target { outline: 2px solid var(--ink); outline-offset: 6px; position: relative; z-index: 2; }

.verify-bar { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 16px;
  background: var(--wash); font-size: 12.5px; text-align: center; border-bottom: 1px solid var(--line); }
.verify-bar form { margin: 0; }
.verify-bar .linkbtn { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }

/* quick view: photo arrows, other colors, similar items */
.qv-main { position: relative; touch-action: pan-y; }
.qv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 1px solid var(--line);
  background: var(--chip); color: var(--ink); cursor: pointer; font-size: 22px; line-height: 1; opacity: 0; transition: opacity .15s; }
.qv-nav.prev { left: 12px; } .qv-nav.next { right: 12px; }
.qv-main:hover .qv-nav, .qv-nav:focus-visible { opacity: 1; }
.qv-alt { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.qv-alt .alt { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.qv-alt .alt-img { display: block; width: 96px; height: 128px; background: var(--wash); overflow: hidden; }
.qv-alt .alt-img img { width: 100%; height: 100%; object-fit: cover; }
.qv-alt .alt-label { display: block; font-size: 11px; margin-top: 6px; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.qv-alt .alt-price { display: block; font-size: 11px; color: var(--muted); }
.qv-alt .alt:hover .alt-label { text-decoration: underline; }
.qv-alt .alt-new { cursor: default; }
.qv-alt .alt-new a { color: inherit; text-decoration: none; display: block; }
.qv-alt .alt-new a:hover .alt-label { text-decoration: underline; }
.qv-alt .alt-add { margin-top: 4px; background: none; border: 0; padding: 0; font: inherit; font-size: 11px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.qv-alt .alt-add:disabled { color: var(--muted); text-decoration: none; cursor: default; }
@media (hover: none) { .qv-nav { opacity: 1; } }

/* ---------- homepage ---------- */
body.home { min-height: 100vh; display: grid; place-items: center; }
.home-main { text-align: center; padding: 24px; }
.home-name { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 9vw, 88px); letter-spacing: .32em;
  text-transform: uppercase; margin: 0 0 36px; padding-left: .32em; }
.home-links { display: flex; justify-content: center; gap: 40px; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; }
.home-links a { padding-bottom: 4px; border-bottom: 1px solid transparent; }
.home-links a:hover, .home-links a:focus-visible { border-bottom-color: var(--ink); }
@media (max-width: 480px) { .home-links { gap: 24px; } }

/* about, sign-up, log-in */
.about-body { font-size: 15px; line-height: 1.7; }
.about-list { padding-left: 18px; } .about-list li { margin: 8px 0; }
.username-row { display: flex; align-items: baseline; gap: 2px; border-bottom: 1px solid var(--ink); }
.username-row .prefix { color: var(--muted); font-size: 14px; white-space: nowrap; }
.username-row input { border: 0 !important; }
#username::placeholder { color: var(--muted); opacity: 1; }   /* the suggested username, in medium grey */
.hint.ok { color: var(--ok); } .hint.bad { color: var(--sale); }
fieldset.vis { border: 0; padding: 0; margin: 22px 0 0; }
fieldset.vis .check { margin: 8px 0; }
.pw-option { margin-top: 22px; }
.pw-option summary { cursor: pointer; font-size: 13px; color: var(--ink); }
/* the password choices on sign-in and sign-up stand out in red */
.pw-link, .auth .alt a.pw-link, .hint a.pw-link { color: var(--ink); border-bottom: 1px solid var(--ink); }   /* (red means a sale on this site) */
.dev-note { border: 1px dashed var(--muted); padding: 14px 16px; font-size: 13px; margin: 8px 0 20px; }
.copy-row { display: flex; gap: 10px; align-items: end; }
.copy-row input { flex: 1; min-width: 0; font-size: 13px; }

/* storefront visitors */
.visitor-bar { display: flex; justify-content: center; gap: 18px; padding: 14px 0; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; border-bottom: 1px solid var(--line); }
.visitor-bar a { border-bottom: 1px solid var(--ink); }
.searchbar.visitor { grid-template-columns: 1fr; }
.searchbar.visitor .search { padding-left: 0; }

/* footer links, announcement, editable pages */
.footer-links { display: flex; justify-content: center; gap: 22px; margin-top: 12px; }
.footer-links a:hover { color: var(--ink); }
.announcement { background: var(--ink); color: var(--on-ink); text-align: center; padding: 10px 16px; font-size: 12.5px; letter-spacing: .04em; }
.home-note { margin-top: 32px; color: var(--muted); font-size: 13px; }
.home-foot { position: fixed; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); border: 0; padding: 0; }
.page-body h2.section { margin-top: 36px; }
.page-body ul { padding-left: 18px; } .page-body li { margin: 8px 0; }
.page-body a { border-bottom: 1px solid var(--ink); }

/* ================================================================= admin portal */
/* (minmax(0, …): a wide table or a long address scrolls inside the page, instead of widening it past the screen) */
body.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
body.admin:not(:has(.admin-nav)) { grid-template-columns: minmax(0, 1fr); }
/* (pinned to the window at its height, and scrolling within itself: the menu is taller than most windows, and a pinned
   box that can't scroll keeps its lower links out of reach for as long as the page beside it is long; dvh: a phone
   browser's own bars don't hide its bottom; overscroll-behavior: scrolling the menu never scrolls the page behind it) */
.admin-nav { border-right: 1px solid var(--line); padding: 28px 22px; display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
.admin-brand { font-family: var(--serif); font-size: 22px; letter-spacing: .24em; text-transform: uppercase; }
.admin-brand span { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .24em; color: var(--muted); margin-top: 4px; }
.admin-nav nav { display: flex; flex-direction: column; gap: 14px; }
.admin-group { display: flex; flex-direction: column; gap: 2px; }
.admin-group summary { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 2px 10px 4px;
  cursor: pointer; list-style: none; }
.admin-group summary::-webkit-details-marker { display: none; }
.admin-group a { display: block; }
.admin-find { position: relative; }
.attention-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.attention-list a { display: block; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--sale, #b3261e); font-size: 14px; }
.attention-list a:hover { background: var(--wash); }
.admin-find input { width: 100%; font-size: 13px; padding: 7px 10px; }
.admin-find-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper);
  border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.admin-find-results a { display: block; padding: 8px 10px; font-size: 13px; }
.admin-find-results a:hover, .admin-find-results a:focus { background: var(--wash); }
.admin-find-results a span { display: block; font-size: 11px; color: var(--muted); }
.admin-find-results p { padding: 8px 10px; font-size: 12px; color: var(--muted); margin: 0; }
.admin-nav nav a { padding: 7px 10px; font-size: 13px; }
.admin-nav nav a.on { background: var(--ink); color: var(--on-ink); }
.admin-nav nav a:hover:not(.on) { background: var(--wash); }
.admin-who { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.admin-who .linkbtn, .admin-who a { font-size: 12px; text-decoration: underline; color: var(--ink); text-align: left; }
.admin-main { padding: 32px 44px 80px; max-width: 1180px; width: 100%; }
.admin-title { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0 0 8px; }
.admin-title .count { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.admin-flash { margin: 0 0 20px; max-width: none; text-align: left; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tile-n { font-family: var(--serif); font-size: 30px; line-height: 1; }
.tile-k { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 32px; gap: 10px; align-items: center; font-size: 12px; }
.bar { display: block; height: 10px; background: var(--ink); min-width: 2px; }
.bar-n, .bar-day { color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.admin-table th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  border-bottom: 1px solid var(--ink); padding: 8px 10px 8px 0; }
.admin-table td { border-bottom: 1px solid var(--line); padding: 10px 10px 10px 0; vertical-align: top; }
.admin-table .num { text-align: right; }
.admin-table a { text-decoration: underline; }
.admin-table.compact td { padding: 6px 10px 6px 0; }
.row-actions { display: flex; gap: 12px; }
.row-actions form { margin: 0; }
.row-actions .linkbtn { font-size: 12px; text-decoration: underline; }
.pill { display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); padding: 1px 6px; color: var(--muted); }
.pill.bad { border-color: var(--sale); color: var(--sale); }
.admin-search, .admin-row { display: flex; gap: 12px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.admin-search input, .admin-row input[type=email] { max-width: 360px; }
.admin-filter { display: flex; gap: 6px; align-items: center; margin: 12px 0 16px; flex-wrap: wrap; font-size: 12px; }
.admin-filter > a { padding: 6px 12px; border: 1px solid var(--line); }
.add-brands { margin: 10px 0 18px; padding: 12px 14px; border: 1px solid var(--line); }
.add-brands summary { cursor: pointer; }
.add-brands textarea { width: 100%; max-width: 520px; display: block; margin-top: 8px; }
.add-brands form + form { margin-top: 6px; }
.admin-filter > a.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; margin: 18px 0; }
.facts dt { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.facts dd { margin: 0; }
.facts a { text-decoration: underline; }
.admin-actions { display: flex; flex-direction: column; gap: 10px; }
.admin-act { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; margin: 0; }
.admin-act .btn { width: 100%; }
.section.danger { color: var(--sale); border-bottom-color: var(--sale); }
.admin-delete { max-width: 520px; }
.danger-btn { background: var(--sale); border-color: var(--sale); margin-top: 12px; }
.danger-btn:hover { background: var(--paper); color: var(--sale); }
.back-link { font-size: 12px; text-decoration: underline; }
.page-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.page-editor textarea { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.page-preview { border: 1px solid var(--line); padding: 20px 24px; max-height: 80vh; overflow-y: auto; }
.code-reveal { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px 0; margin-bottom: 14px; max-width: 520px; }   /* (rules, not a box) */
.admin-pw { max-width: 360px; }
@media (max-width: 900px) {
  body.admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; gap: 16px; }
  .admin-nav nav { gap: 6px; }
  .admin-group { flex-direction: row; flex-wrap: wrap; }
  .admin-group summary { width: 100%; padding: 10px 0 4px; font-size: 11px; }
  .admin-group summary::after { content: " +"; }
  .admin-group[open] summary::after { content: " −"; }
  .admin-nav nav a { padding: 10px 12px; }   /* (big enough for a finger) */
  .admin-main { padding: 20px 16px 60px; overflow-wrap: break-word; }   /* (break-word: tables keep words whole, and scroll) */
  .page-editor, .admin-act { grid-template-columns: 1fr; }
  /* Tables wider than a phone scroll sideways on their own; the page stays the screen's width */
  .admin-main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-main table th { white-space: nowrap; }
  .admin-main table td { min-width: 7.5em; }   /* (a date or a short name on one line, not split at its hyphens) */
  /* Safari zooms into any text box under 16px (the admin's own smaller ones too) */
  body.admin input:not([type=checkbox]):not([type=radio]):not([type=range]), body.admin select, body.admin textarea,
  body.admin .refresh-fields .unit select { font-size: 16px; }
  .store-actions .mini { min-height: 40px; }
  .admin-who .linkbtn, .admin-who a { padding: 8px 0; }
}

.aff-note { font-size: 11px; color: var(--muted); margin: 8px 0 0; text-align: center; line-height: 1.4; }
.aff-footer { max-width: 620px; margin: 14px auto 0; text-transform: none; letter-spacing: .02em; font-size: 11px; }
.aff-form { max-width: 760px; }
.aff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.aff-store { display: flex; gap: 10px; align-items: center; margin: 0; }
.aff-store input[type=text] { font-size: 12px; min-width: 260px; }
.aff-url { display: block; word-break: break-all; font-size: 12px; background: var(--wash); padding: 10px; }
@media (max-width: 900px) { .aff-grid { grid-template-columns: 1fr; } .aff-store { flex-wrap: wrap; } }

.assign { display: flex; flex-direction: column; gap: 8px; }
.assign-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.assign-groups { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.assign-groups button { font: inherit; font-size: 12px; padding: 5px 10px; border: 1px solid var(--line); background: none; color: inherit; cursor: pointer; }
.assign-groups button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.assign-groups button.guess { border: 1px dashed var(--ink); color: var(--ink); }   /* Belvery's suggestion: in only once tapped */
@media (max-width: 560px) { .assign-row { grid-template-columns: 1fr; gap: 6px; } .assign-groups { justify-content: flex-start; } }

/* Store categories on the Stores page: tick as many as fit */
.group-checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.group-checks .check { margin: 6px 0; }

/* Search takes over the page: a header with Save search and ✕ */
.searchhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.searchhead .sh-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.searchhead .sh-actions { display: flex; align-items: center; gap: 10px; }
.sh-close { background: none; border: 1px solid var(--line); width: 36px; height: 36px; display: grid; place-items: center;
  cursor: pointer; color: inherit; }
.sh-close:hover { border-color: var(--ink); }
.allhead { font-family: var(--serif); font-weight: 400; font-size: var(--size-heading); margin: 6px 0 18px; }
.shelf-kind { font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  vertical-align: middle; margin-right: 6px; }
.saved-search-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.saved-search-row input[type=text] { flex: 1; min-width: 0; padding: 4px 0; font-size: 14px; }

/* Stores you might like */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 30px; }
.rec { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 12px 14px; font-size: 14px; }
.sp-list .sp-head { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px;
  border-top: 1px solid var(--line); cursor: default; background: none !important; }

/* Size editor (Settings and each brand on the Stores page) */
.size-editor .choice { margin: 6px 0 12px; max-width: 520px; }
.size-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 24px; margin-top: 6px; }
.size-quick label { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 10px; font-size: 13px; margin: 4px 0; }
.size-quick label span { color: var(--muted); }
.size-quick input { margin: 0; }
.size-quick .pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.size-quick .slash { color: var(--muted); }
.size-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 10px; }
.size-kind { border: 1px solid var(--line); padding: 10px 14px 12px; margin: 0; min-width: 0; }
.size-kind legend { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; padding: 0 6px; }
.size-kind label { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; font-size: 13px; margin: 6px 0; }
.size-kind label span { color: var(--muted); }
.size-kind input { padding: 4px 0; font-size: 14px; min-width: 0; }

/* Hidden products (Settings) */
.hidden-brand { border-bottom: 1px solid var(--line); padding: 10px 0; }
.hidden-brand summary { cursor: pointer; font-size: 14px; }
.hidden-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.hidden-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; font-size: 14px; }
.hidden-list img, .noimg-sm { width: 44px; height: 56px; object-fit: cover; background: var(--wash); display: block; }
.toast-action { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; margin-left: 10px; letter-spacing: inherit; text-transform: inherit; }

/* Departments: a full-width row of plain text above the search; the chosen ones bold and underlined */
.deptrow { display: flex; align-items: baseline; gap: 18px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.deptrow[hidden] { display: none; }
.textseg { display: flex; flex-wrap: wrap; gap: 6px 22px; min-width: 0; }
.textseg button { background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink); text-decoration: none; text-underline-offset: 5px; }
.textseg button:hover { text-decoration: underline; text-decoration-color: var(--line); }
.textseg button.on { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: var(--ink); }
.catbar { grid-template-columns: minmax(0, 1fr); }
.catbar .catgroup:last-child { justify-content: flex-start; }
@media (max-width: 900px) { .catbar .catgroup:last-child { align-items: flex-start; } }
.textseg .dept-add { font-size: 18px; line-height: 1; letter-spacing: 0; padding: 0 4px; color: var(--muted); }
.textseg .dept-add:hover, .textseg .dept-add[aria-expanded="true"] { color: var(--ink); text-decoration: none; }
.dp { width: 300px; }
.dp-ideas { display: flex; flex-wrap: wrap; gap: 5px; max-height: 92px; overflow: auto; margin: 0 0 10px; }
.dp-ideas button { font: inherit; font-size: 11.5px; padding: 4px 9px; border: 1px solid var(--line); background: none; color: var(--ink);
  border-radius: 0; cursor: pointer; }
.dp-ideas button:hover { border-color: var(--ink); }
.dp-stores label.suggested span { border-bottom: 1px dotted var(--ink); }
.dp .dp-suggested { font-size: 11.5px; margin: 0 0 6px; }
.dp input[type=text] { width: 100%; padding: 6px 0; font-size: 14px; margin-bottom: 8px; }
.dp-stores { max-height: 40vh; overflow: auto; }
.dp-error { color: #a12; }

/* Admin → Email: the setup guide */
.steps-list { max-width: 760px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.steps-list > li { margin-bottom: 14px; }
.steps-list ul { padding-left: 18px; margin: 6px 0; }
.code-block { background: var(--wash); padding: 12px 14px; font-size: 13px; margin: 8px 0; overflow-x: auto; }

/* Admin → Design: the editor and its live preview (the preview uses the values being edited) */
.design-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; }
@media (max-width: 1100px) { .design-layout { grid-template-columns: minmax(0, 1fr); } }
.design-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 24px; }
.design-field { display: grid; gap: 4px; font-size: 13px; }
.design-field > span:first-child { color: var(--muted); }
.design-field select, .design-field input[type=text], .design-field input[type=number] { padding: 6px 0; font-size: 14px; width: 100%; }
.design-field .px-field { display: flex; align-items: center; gap: 6px; }
.design-field .px-field input { width: 90px; }
.color-pair { display: flex; align-items: center; gap: 10px; }
.color-pair input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; }
.design-words { border-bottom: 1px solid var(--line); padding: 10px 0; }
.design-words summary { cursor: pointer; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.design-words .design-fields { margin-top: 10px; }
.design-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.live-tag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--on-ink); padding: 2px 6px; margin-left: 4px; }
.design-preview { position: sticky; top: 16px; }
.dp-frame { border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--size-body);
  padding: 18px var(--gutter) 22px; overflow: hidden; max-height: calc(100vh - 80px); overflow-y: auto; }
.dp-wordmark { font-family: var(--serif); font-size: var(--size-wordmark); letter-spacing: .42em; text-transform: uppercase; text-align: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dp-row { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dp-label, .dp-section { font-size: var(--size-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.dp-tab { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.dp-tab.on { font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.dp-title { font-family: var(--serif); font-size: var(--size-title); letter-spacing: .08em; text-transform: uppercase; text-align: center; margin: 16px 0 6px; }
.dp-heading { font-family: var(--serif); font-size: var(--size-heading); margin: 10px 0; }
.dp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--grid-row-gap) var(--grid-col-gap); }
.dp-img { aspect-ratio: 3 / 4; background: var(--wash); }
.dp-brand { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; margin-top: 8px; font-weight: 500; }
.dp-name { font-family: var(--serif); font-size: var(--size-product); line-height: 1.25; margin: 4px 0; }
.dp-price { font-size: var(--size-price); } .dp-price s { color: var(--faint); } .dp-sale { color: var(--sale); }
.dp-muted { color: var(--muted); font-size: 12px; }
.dp-body { margin: 18px 0 10px; }
.dp-btn { display: inline-block; background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); padding: 8px 16px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.dp-btn.ghost { background: var(--paper); color: var(--ink); }
.dp-section { margin-top: var(--section-space); border-bottom: 1px solid var(--ink); padding-bottom: 8px; color: var(--ink); font-size: var(--size-section); }
.card .sz.unknown { color: var(--faint); display: inline-flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .06em; }

/* admin: email service settings */
.email-form { max-width: 640px; }
.email-form select { margin-bottom: 6px; }
.email-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 14px; }
.email-fields label.f { display: block; }
.email-fields label.f input { display: block; width: 100%; margin-top: 4px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.email-fields label.f:first-child { grid-column: 1 / -1; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1100px; }
.service-grid h3 { font-size: 15px; margin: 0 0 6px; }
.service-grid .steps-list { padding-left: 18px; font-size: 13.5px; }
@media (max-width: 860px) { .email-fields, .service-grid { grid-template-columns: 1fr; } }

/* error pages */
.oops { text-align: center; padding-top: 72px; }
.oops-code { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--faint); margin: 0 0 18px; letter-spacing: .06em; }
.oops .sub { max-width: 420px; margin-left: auto; margin-right: auto; }
.oops-links { margin-top: 40px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.oops-links a { color: var(--ink); border-bottom: 1px solid transparent; }
.oops-links a:hover { border-bottom-color: var(--ink); }

/* admin: refresh settings */
.refresh-form { max-width: 760px; }
.refresh-fields { display: grid; gap: 22px; }
.refresh-fields label.f { display: block; }
.refresh-fields .unit { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; letter-spacing: 0; text-transform: none; }
.refresh-fields .unit input[type=number] { width: 90px; font-size: 14px; }
.refresh-fields .unit select { width: auto; font-size: 14px; }
.refresh-fields small.hint { display: block; margin-top: 6px; letter-spacing: 0; text-transform: none; max-width: 640px; line-height: 1.5; }

/* admin: two-step sign-in setup */
.twostep-setup { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; max-width: 760px; }
.twostep-qr { flex: none; border: 1px solid var(--line); padding: 8px; background: #fff; }
.twostep-qr svg { display: block; width: 180px; height: 180px; }

/* ---------- Stays (beta) ---------- */
.modes { display: flex; justify-content: center; gap: 36px; padding: 0 20px 14px; font-family: var(--serif); font-size: 19px; letter-spacing: .14em; text-transform: uppercase; }
.modes a { padding-bottom: 3px; border-bottom: 1px solid transparent; }
.modes a.on, .modes a:hover { border-bottom-color: var(--ink); }
.beta-tag { font-family: var(--sans); font-size: 9px; letter-spacing: .2em; vertical-align: super; color: var(--muted); }
.planner { display: grid; grid-template-columns: 2fr 1fr 1fr .7fr auto; gap: 14px; align-items: end; max-width: 980px; margin: 28px auto 20px; }
.planner label.f { display: block; }
.planner label.f input { display: block; width: 100%; margin-top: 4px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.planner .btn[disabled] { opacity: .45; cursor: not-allowed; }
.hotel-card .img .noimg { font-family: var(--serif); font-size: 48px; color: var(--faint); }
.hotel-card .muted { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.hotel-card .press { font-size: 11px; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }   /* "In HTSI, 12 Oct 2024" (The Weekend) */
.hotel-card .press a { color: inherit; border-bottom: 1px solid var(--line); }
/* The Weekend (PLAN-weekend.md): a conversation in the page's own type, no bubbles */
.weekend .wk-thread { margin: 16px 0 8px; }
.weekend .wk-thread:empty { margin: 0; }
.wk-turn { border-bottom: 1px solid var(--line); }
.wk-turn .wk-msg { border-bottom: 0; }
.wk-turn .wk-a { padding-top: 0; }
.wk-results { margin-top: 8px; }
.wk-results-h { margin: 18px 0 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wk-find { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wk-find p { margin: 0; line-height: 1.55; }
.wk-find .hint a { border-bottom: 1px solid var(--line); }
.wk-msg { padding: 14px 0; border-bottom: 1px solid var(--line); }
.wk-msg p { margin: 0 0 10px; line-height: 1.6; }
.wk-msg p:last-child { margin-bottom: 0; }
.wk-q { font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.wk-a { font-size: 15px; }
.wk-cite { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.wk-cite a { color: inherit; border-bottom: 1px solid var(--line); }
.wk-ask { margin-top: 8px; }
.wk-ask textarea { margin: 0 0 10px; }
.wk-stay { padding: 8px 0; }
.wk-stay p { margin: 0; }
.wk-stay-name { font-family: var(--serif); font-size: 17px; }
.wk-stay-name a { border-bottom: 1px solid var(--line); }
.wk-stay-tags { font-size: 12.5px; color: var(--muted); }
.wk-ask-row { gap: 16px; align-items: center; }
.wk-recent-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; text-align: left; }
.wk-recent-row:hover { background: var(--wash); }
.stays .empty { text-align: center; padding: 48px 16px 64px; max-width: 560px; margin: 0 auto; }   /* (Stays' own: the shop's is above) */
.stays .empty h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 10px; }
.addhotel { max-width: 560px; margin: 0 auto 36px; }
.hp-wrap { position: relative; }
.hp-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; list-style: none; margin: 0; padding: 4px 0; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.08); max-height: 320px; overflow: auto; }
.hp-list li { padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.hp-list li:hover { background: var(--wash); }
.hp-place { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.hp-manual { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.hp-manual label.f input { display: block; width: 100%; margin-top: 4px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.pill { display: inline-block; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--line); padding: 2px 6px; vertical-align: middle; margin-left: 4px; }
.beta-row { display: flex; gap: 16px; align-items: flex-start; max-width: 720px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.beta-switch { position: relative; flex: none; margin-top: 2px; }
.beta-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.beta-switch .sw { display: block; width: 34px; height: 18px; border: 1px solid var(--ink); border-radius: 9px; position: relative; }
.beta-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.beta-switch input:checked + .sw { background: var(--ink); }
.beta-switch input:checked + .sw::after { background: var(--on-ink); transform: translateX(16px); }
@media (max-width: 860px) { .planner, .hp-manual { grid-template-columns: 1fr 1fr; } .planner label.f:first-child, .planner .btn { grid-column: 1 / -1; } .modes { font-size: 16px; gap: 28px; } }
.addplace { margin: 0 0 18px; }
.addplace .hp-wrap { position: relative; display: flex; align-items: center; }
.addplace .hp-wrap .plus { margin-right: 10px; }
.addplace .hp-wrap input { flex: 1; }
.addplace .hp-manual { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; }
.stayfilters { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.pricecap { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.pricecap input[type=range] { width: 160px; accent-color: var(--ink); }
.hotel-card .img img { width: 100%; height: 100%; object-fit: cover; }
.hotel-card .price .per { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.hotel-card .tag.sold { color: var(--muted); }
.hotel-card .act { font-size: 15px; line-height: 1; }
.addplace { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0 0 18px; }
.addplace .hp-wrap input { border: 0; width: 100%; font-size: 14px; letter-spacing: 0; text-transform: none; padding: 10px 0; }
.addplace .hp-wrap input:focus { outline: none; }
.addplace .hp-manual { margin: 6px 0 4px; }
.hotel-card .act.on { color: var(--on-ink); }
form.addplace { display: block; }
form.addplace .hp-manual:not([hidden]) { display: grid; }
/* Stays: collections and trip-type rows, filters */
.stayrow { align-items: center; }
.stayrow .depts-label { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.depts.stayrow a { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; padding: 4px 0; border-bottom: 1px solid transparent; }
.depts.stayrow a.on { border-bottom-color: var(--ink); font-weight: 500; }
.newcoll { display: inline-flex; align-items: center; gap: 6px; }
.plus-btn { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-bottom: 1px solid var(--ink); }
.newcoll input { font-size: 13px; max-width: 160px; }
.catbar.stayrow { display: flex; gap: 14px; align-items: center; padding: 8px 0 12px; }
.catbar.stayrow .seg { display: flex; flex-wrap: wrap; }
.catbar.stayrow .seg a { padding: 8px 12px; border: 1px solid var(--ink); margin-left: -1px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.catbar.stayrow .seg a.on { background: var(--ink); color: var(--on-ink); }
.catbar.stayrow .seg small { color: inherit; opacity: .6; margin-left: 4px; }
.stayfilters-panel { flex-basis: 100%; }
.stayfilters-panel summary { cursor: pointer; list-style: none; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--ink); display: inline-block; }
.filterform { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 28px; padding: 14px 0 4px; }
.filterform fieldset { border: 0; padding: 0; margin: 0; }
.filterform legend.f { margin-bottom: 6px; }
.filterform .check { display: block; font-size: 13px; margin: 4px 0; }
.filterform small { color: var(--muted); }
.filterform p { grid-column: 1 / -1; margin: 4px 0 0; display: flex; gap: 14px; align-items: center; }

/* notifications */
.notif-grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.notif-grid th { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; text-align: center; padding: 6px 0 10px; color: var(--muted); }
.notif-grid th:first-child { text-align: left; }
.notif-grid td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.notif-grid td + td { width: 80px; text-align: center; }
.notif-grid td .toggle { display: inline-flex; padding: 0; }
.notif-grid .toggle.locked { opacity: .4; cursor: default; }   /* included in "Price drops on all products" */
.notif-grid .notif-group td { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); padding-top: 18px; border-bottom: 1px solid var(--ink); }
.alert .ph.who { display: grid; place-items: center; font-family: var(--serif); font-size: 26px; color: var(--muted); background: var(--wash); }
.tabs .badge { margin-left: 4px; }

/* settings: drag handle for rows */
.sections .handle { background: none; border: 1px solid var(--line); width: 30px; height: 30px; cursor: grab; touch-action: none; color: var(--muted); letter-spacing: -2px; }
.sections .handle:hover, .sections .handle:focus-visible { border-color: var(--ink); color: var(--ink); }
.sections li { position: relative; background: var(--paper); }
.sections li.dragging { z-index: 3; box-shadow: 0 10px 28px rgba(0,0,0,.14); will-change: transform; }   /* (lifted: static/dragsort.js) */
.rename summary { cursor: pointer; list-style: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); display: inline-block; margin-bottom: 8px; }

/* sharing */
.subsection { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; margin: 22px 0 6px; }
.subsection .count { color: var(--muted); font-weight: 400; margin-left: 6px; }
.share-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.share-row .admin-row { gap: 8px; }
.mf-box { max-width: 420px; margin: 0 0 6px; }
.mf-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mf-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mf-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mf-others { margin-top: 28px; }
/* A friend in the row of friends: the friend monogram (FriendCard's fr-mono: a square on wash, line border, serif ink
   letter) at the Brands row's tile size; brands are white rounded tiles, so the two never look alike */
.fr-pal .br-logo { border-radius: 0; background: var(--wash); }
.fr-pal .br-letter { color: var(--ink); }
.fr-pal.on .br-logo { outline-color: var(--ink); }
.fr-open { margin-top: 6px; }
.fr-open-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 0 8px; }
.fr-open-t { font-family: var(--serif); font-size: 18px; }
.card .via { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* "via Alex": From your friends (PLAN-following step 3) */
.visitor-bar .follow-form { display: inline-flex; align-items: center; gap: 10px; }
.following-tag { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* menu: My Belvery group */
.drawer-group { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.drawer-head { display: block; font-family: var(--serif); font-size: 26px; letter-spacing: .04em; color: var(--ink); margin-bottom: 4px; }
.drawer a.sub { font-size: 17px; letter-spacing: .06em; padding: 7px 0 7px 18px; }
.drawer a.sub { border-bottom: 0; padding: 5px 0 5px 18px; }
.drawer-group { padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* menu: no divider lines */
.drawer a, .drawer .linkbtn { border-bottom: 0; }
.drawer-group { border-top: 0; border-bottom: 0; margin-top: 14px; padding-top: 0; }
.drawer-head { font-size: 22px; }
.drawer a.sub { margin-bottom: 6px; }
.drawer-group { margin-top: 18px; }
.drawer-head { font-size: 26px; }
.drawer-group.drawer-shop { margin-top: 0; }   /* (the menu's first line: Shop, with its pages beneath) */
.drawer a.sub { font-size: 21px; letter-spacing: .04em; padding: 6px 0 6px 20px; }

/* stores: heart, remove X, up to three columns */
.star.heart { color: var(--ink); vertical-align: -3px; }
.star.heart svg { fill: none; }
.star.heart.on svg { fill: var(--ink); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 0 28px; }
.store-row { position: relative; grid-template-columns: 1fr auto; padding-right: 30px; align-items: start; }
.store-row .store-x { position: absolute; top: 18px; right: 0; margin: 0; }
.store-row .xbtn { background: none; border: 0; cursor: pointer; font-size: 14px; line-height: 1; padding: 4px; color: var(--muted); }
.store-row .xbtn:hover { color: var(--ink); }
.store-row details.edit[open] { grid-column: 1 / -1; }
.store-row:has(details.edit[open]) { grid-column: 1 / -1; }

/* stores: pick any number of departments when adding, or make a new one */
.addform .dept-pick .group-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.addform .new-dept { gap: 6px; }
.addform .new-dept input { font-size: 13px; letter-spacing: 0; text-transform: none; padding: 4px 0; min-width: 200px; }
.addform .new-dept .plus { font-size: 15px; }
.addform { grid-template-columns: 1fr auto; }
.addform .dept-pick { grid-column: 1 / -1; }

.rec-acts { display: inline-flex; align-items: center; gap: 6px; }
.rec-x { margin: 0; display: inline; }
.rec-x .xbtn { background: none; border: 0; cursor: pointer; font-size: 13px; padding: 6px; color: var(--muted); }
.rec-x .xbtn:hover { color: var(--ink); }

/* suggestion cards: matching square + and ✕ buttons */
.rec .sq { width: 30px; height: 30px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; display: inline-grid; place-items: center; }
.rec .sq:hover { background: var(--ink); color: var(--on-ink); }
.rec[hidden] { display: none; }
.recs .rec:nth-child(n+10) { display: none; }

/* ---------- phones: bigger tap targets, an 11px floor for captions, stacked controls ---------- */
@media (max-width: 860px) {
  .depts button, .depts.stayrow a, .catbar .seg a, .seg button { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .dept-add, .plus-btn { min-width: 40px; min-height: 40px; }
  .linkbtn, .shopbar .refresh, .filters-btn, .see-all, .footer-links a { min-height: 40px; display: inline-flex; align-items: center; }
  .footer-links { gap: 28px; }
  .btn.small { min-height: 40px; padding: 10px 16px; font-size: 11px; }
  .xbtn, .rec .sq, .star, .act { min-width: 40px; min-height: 40px; }
  .rec .sq { width: 40px; height: 40px; }
  .store-row .store-x { top: 10px; }
  .check input, input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  .check { min-height: 40px; display: flex; align-items: center; gap: 10px; }
  details.edit summary { min-height: 40px; display: inline-flex; align-items: center; }
  /* captions: nothing smaller than 11px on a phone */
  .onboard .steps li, .pill, .tag, .beta-tag, .alert-kind, .f, .depts-label, .row .nm, .hotel-card .muted, .subsection,
  .card .brand, .qv-info .brand, .qv-section h4, .following-tag, .oops-links, .notif-grid th, .notif-grid .notif-group td,
  .shelf-head .see-all, .shopbar .meta, .seg button, .catbar .seg a { font-size: 11px; }
  /* the store edit panel's three-way choice stacks into full-width rows */
  .scope-choice { display: grid; grid-template-columns: 1fr; }
  .scope-choice label { width: 100%; }
  .scope-choice label span { display: block; width: 100%; text-align: center; padding: 10px 12px; }
  /* sharing rows: the buttons wrap under the name instead of squeezing it */
  .share-row { flex-wrap: wrap; }
  .share-row > form, .share-row .admin-row { flex-basis: 100%; justify-content: flex-start; }
  label.f, span.f, footer, .drawer-greet, .badge, .catlabel, .last-refreshed, .searchhead .sh-label, .intro-num, .catbar.stayrow .seg a, .depts a, .depts button, .textseg button, .cats button, .tag, .card .tag, .stayrow .depts-label, small { font-size: 11px; }
  .textseg button, .depts a, .depts button, .stayrow a, .cats button { min-height: 40px; padding-top: 8px; padding-bottom: 8px; display: inline-flex; align-items: center; }
  .textseg { gap: 0 24px; }
  .depts { gap: 0 22px; }
  a.btn, .btn, button.btn { min-height: 40px; }
  .badge { min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; }
  .toggle .sw { width: 44px; height: 24px; border-radius: 12px; }
  .toggle .sw::after { width: 18px; height: 18px; }
  .toggle input:checked + .sw::after { transform: translateX(20px); }
  input[type=radio], input[type=checkbox] { flex: none; }
  .pw-option summary, .hidden-brand summary, .design-words summary { padding: 9px 0; }   /* keeps the disclosure arrow */
  .stayfilters-panel summary, .rename summary { padding: 8px 0 2px; }
}

/* "Sizes for": In my size can use another person's sizes (Settings → Sizes for other people) */
.sizes-for { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13px; }
.sizes-for select { width: auto; min-width: 130px; margin: 0; }
details.person { margin: 0 0 6px; }
details.person summary .hint { text-transform: none; letter-spacing: 0; }
.sold-out-img { display: block; width: 160px; max-width: 50%; margin: 0 auto 18px; }
.qv-stock { font-size: 12px; color: var(--muted); margin: 6px 0 0; min-height: 1em; }
.qv-stock.bad { color: var(--sale); }

/* ---------- iPhone and other phones: review of October 2026 ---------- */
.add-toggle, .qv-buybar, .filters-foot, .phone-only { display: none; }
@media (max-width: 860px) {
  /* Safari zooms the page into any text box under 16px and doesn't zoom back: 16px on phones */
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date],
  input[type=url], input[type=tel], select, textarea, .searchbar input, .shopbar .search input, .price-row input, .cat input { font-size: 16px; }
  .shopbar select { font-size: 16px; letter-spacing: .04em; }

  /* The shop's top, compact: departments in one sideways-scrolling line (with + at its end), search with a +
     that opens the add-a-brand box, categories in one line, and filters / count / sort / refresh in one row. */
  .deptrow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 14px; padding: 6px 0; align-items: center; }
  .deptrow::-webkit-scrollbar { display: none; }
  .deptrow .catlabel { flex: none; }
  .deptrow .textseg { flex-wrap: nowrap; gap: 0 20px; }
  .deptrow .textseg button { flex: none; white-space: nowrap; }
  .searchbar { display: flex; align-items: center; gap: 4px; }
  .searchbar .add-toggle { display: grid; place-items: center; flex: none; width: 40px; height: 40px; background: none; border: 0;
    border-right: 1px solid var(--line); margin-right: 8px; cursor: pointer; color: var(--ink); }
  .searchbar .addstore { display: none; border: 0 !important; padding: 8px 0; flex: 1; }
  .searchbar .search { flex: 1; padding: 8px 0; }
  .searchbar.adding .addstore { display: flex; }
  .searchbar.adding .search { display: none; }
  .searchbar.adding .add-toggle { transform: rotate(45deg); }
  .searchbar .addstore svg:not(.sp-list svg) { display: none; }
  .catbar { padding: 6px 0; }
  .catgroup { gap: 10px; }
  .shopbar { padding: 4px 0; }
  .shopbar .meta { flex-wrap: nowrap; gap: 12px; justify-content: space-between; }
  .shopbar .groupcolors:not(.mysize-bar), .shopbar .last-refreshed { display: none !important; }   /* (In my size: shown while it fits, see fitBar) */
  .shopbar .count { white-space: nowrap; }
  .refresh-wrap { flex-direction: row; flex: none; }
  .shopbar #refreshLabel { display: none; }          /* the arrow alone; it spins while refreshing */
  .shopbar .refresh { min-width: 40px; min-height: 40px; justify-content: center; }
  .shopbar select { flex: 1; min-width: 0; max-width: 170px; }
  .phone-only { display: flex; }

  /* Heart and eye on product photos: they look 30px but keep a 40px tap area */
  .card .act, .card .act.on { width: 40px; height: 40px; min-width: 40px; min-height: 40px; border-radius: 0;
    background: radial-gradient(circle, var(--chip) 0 15px, transparent 15.5px); }
  .card .act.on { background: radial-gradient(circle, var(--ink) 0 15px, transparent 15.5px); }
  .card .act svg { width: 13px; height: 13px; }
  .card .acts { top: 2px; right: 2px; gap: 0; }

  /* Quick view: price, heart and the way to the brand stay at the bottom of the screen */
  .qv { display: flex; flex-direction: column; }
  .qv-body { flex: 1; min-height: 0; }
  .qv-info .qv-cta { display: none; }
  .qv-buybar { display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--paper); }
  .qv-buy-price { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
  .qv-buy-price s { color: var(--muted); margin-right: 6px; font-size: 13px; }
  .qv-buy-price .off { display: none; }
  .qv-buy-price .sale { color: var(--sale); }
  .qv-buybar .buy-fav { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .qv-buybar .buy-fav span { display: none; }
  .qv-buy-cta { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qv-top { top: calc(10px + env(safe-area-inset-top)); }

  /* Filters: Close stays at the top and Show / Clear at the bottom of the panel */
  aside.filters { padding-top: 0; padding-bottom: 0; }
  aside.filters .close { position: sticky; top: 0; z-index: 2; width: 100%; text-align: left; background: var(--paper);
    padding: max(20px, env(safe-area-inset-top)) 0 12px; margin: 0 0 8px; }
  .filters-foot { display: flex; position: sticky; bottom: 0; z-index: 2; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--paper); border-top: 1px solid var(--line); margin: 24px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .filters-foot .btn { flex: 1; }
  aside.filters .clear { display: none; }

  /* Settings: reorder handles big enough for a thumb */
  .sections .handle { width: 40px; height: 40px; }
}

/* The notch, rounded corners and home bar (iPhone, especially when opened from the home screen) */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
@supports (padding-top: env(safe-area-inset-top)) {
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  .drawer { padding-top: calc(72px + env(safe-area-inset-top)); padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}
.toast { bottom: calc(28px + env(safe-area-inset-bottom)); }
.home-foot { bottom: calc(18px + env(safe-area-inset-bottom)); }
.table-wrap { overflow-x: auto; }
.stock-line { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; }
.stock-line .linkbtn { font-size: inherit; letter-spacing: 0; text-transform: none; border-bottom: 1px solid currentColor; }
@media (max-width: 860px) {
  .searchhead { flex-wrap: wrap; gap: 10px; }
  .searchhead > div:first-child { flex-basis: 100%; }
  .searchhead .sh-actions { width: 100%; }
  .searchhead .sh-actions .btn { flex: 1; }
}

/* Brands page: Edit and ✕ are a matching pair of outlined buttons, same height, side by side in each brand's
   top-right corner (Edit stays there, filled, while its panel is open). */
.store-row { padding-right: 116px; }
.store-row .store-x { top: 18px; right: 0; }
.store-row .xbtn, .store-row details.edit > summary {
  box-sizing: border-box; height: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; line-height: 1;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.store-row .xbtn { width: 32px; min-width: 32px; padding: 0; font-size: 13px; letter-spacing: 0; }
.store-row details.edit > summary { position: absolute; top: 18px; right: 40px; padding: 0 14px; }
.store-row .xbtn:hover, .store-row details.edit > summary:hover, .store-row details.edit[open] > summary {
  background: var(--ink); color: var(--on-ink); }
@media (max-width: 860px) {
  .store-row { padding-right: 132px; }
  .store-row .store-x, .store-row details.edit > summary { top: 14px; }
  .store-row .xbtn, .store-row details.edit > summary { height: 40px; min-height: 40px; }
  .store-row .xbtn { width: 40px; min-width: 40px; }
  .store-row details.edit > summary { right: 48px; }
}
/* Admin → Debug */
.debug-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 10px 0 14px; }
.debug-filters select, .debug-filters input[type=text] { width: auto; min-width: 120px; flex: 0 1 160px; }
.debug-table td.wrap { word-break: break-word; max-width: 420px; }
.debug-table tr.lvl-error td:first-child { box-shadow: inset 3px 0 0 var(--sale); }
.debug-table tr.lvl-warn td:first-child { box-shadow: inset 3px 0 0 #c79a2a; }
.debug-table pre { white-space: pre-wrap; font-size: 11px; max-height: 320px; overflow: auto; background: var(--wash); padding: 8px; }

/* Admin → Dev: version and change log */
.dev-version th { text-align: left; white-space: nowrap; width: 1%; padding-right: 18px; font-weight: 500; }
.dev-warn { color: #9b1c1c; }
.dev-log { font-size: 11px; line-height: 1.5; background: var(--wash); padding: 10px 12px; overflow-x: auto; max-height: 320px; white-space: pre-wrap; }
.changelog { max-width: 860px; }
.changelog details { border-top: 1px solid #e6e6e6; padding: 10px 0; }
.changelog summary { cursor: pointer; line-height: 1.5; }
.changelog-body { font-size: 14px; line-height: 1.55; padding: 4px 0 6px; }
.changelog-body ul { margin: 4px 0 8px 20px; padding: 0; }
.changelog-body li { margin: 3px 0; }
.changelog-body p { margin: 10px 0 4px; }
.changelog-body code { font-size: 12.5px; background: #f3f3f3; padding: 1px 4px; border-radius: 3px; }

/* Admin → Design: homepage background */
.design-thumb { display: block; max-width: 220px; max-height: 120px; object-fit: cover; margin: 4px 0; border: 1px solid #e4e4e4; }
.dp-home { height: 150px; display: grid; place-content: center; text-align: center; border: 1px solid #e4e4e4; background: #fff; color: #000; }
.dp-home-name { font-family: var(--serif); font-size: 26px; letter-spacing: .3em; margin-bottom: 10px; }
.dp-home-links { display: flex; gap: 16px; justify-content: center; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; }

/* Settings → Appearance */
.theme-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 6px; max-width: 520px; }
.theme-choice label { border: 1px solid var(--line); padding: 12px 10px 10px; cursor: pointer; text-align: center; font-size: 12.5px; }
.theme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.theme-choice label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.theme-choice label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.theme-swatch { display: block; height: 46px; margin-bottom: 8px; border: 1px solid #d9d6d1; }
.theme-swatch.light { background: linear-gradient(#fff 0 55%, #f6f5f3 55%); }
.theme-swatch.dark { background: linear-gradient(#121211 0 55%, #1c1b19 55%); border-color: #2e2d2b; }
.theme-swatch.auto { background: linear-gradient(90deg, #fff 0 50%, #121211 50%); }
@media (max-width: 480px) { .theme-choice { gap: 6px; } .theme-choice label { padding: 10px 4px 8px; font-size: 11.5px; } }

/* Admin → Stores: the brand directory check */
.dir-progress th { text-align: left; white-space: nowrap; width: 1%; padding-right: 18px; font-weight: 500; }

/* Quick view: price over time; watch picker: your price */
.qv-history { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; margin: 6px 0 2px; }
.qv-history .hint { flex-basis: 100%; margin: 0; font-size: 11px; }
.qv-spark { width: 160px; height: 28px; color: var(--ink); }
.wp-when { border: 0; padding: 0; margin: 10px 0 8px; font-size: 12.5px; min-width: 0; }
.wp-when legend { padding: 0; margin-bottom: 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.wp-choice { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; line-height: 1.3; }
.wp-choice > input { accent-color: var(--ink); margin: 0; flex: none; }
.wp-choice span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.wp-when input[type=number] { width: 4ch; min-width: 0; padding: 2px 4px; margin: 0 2px; text-align: right; }   /* (a share off: two digits) */
.wp-at { flex-basis: 100%; color: var(--muted); font-size: 11.5px; }
.wp.sheet .wp-choice { padding: 10px 0; font-size: 15px; }
.wp-when input[type=number] { -moz-appearance: textfield; appearance: textfield; }   /* (no arrows eating the digits' room) */
.wp-when input[type=number]::-webkit-inner-spin-button, .wp-when input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Sold out in your size: find similar */
.find-sim { display: block; margin: 8px 0 0; padding: 0; border: 0; background: none; color: var(--ink); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
#qvFindSimilar { margin-top: 10px; }

/* Filters: saved searches and filter sets */
.saved-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.saved-filters:empty::before { content: "None yet: set some filters, then save them."; font-size: 12px; color: var(--muted); }
.chip-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 6px 10px; font-size: 12px; cursor: pointer; border-radius: 14px; }
.chip-btn:hover, .chip-btn:focus-visible { border-color: var(--ink); }

/* Prices in other currencies: a US-dollar estimate, and where the shop sells from */
.price .approx { margin-left: 6px; color: var(--muted); font-size: .92em; }
.qv-ship { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* Settings: phone notifications for this device */
.push-box { border: 1px solid var(--line); padding: 12px 14px; margin: 0 0 14px; }
.push-box p { margin: 4px 0; }

/* Brands loading for the first time: the quiet line under the search bar, the dot in the Brand filter, and the
   "new items · Show" bar above the products (shop.html: renderLoading, newItemsBar). */
.loading-line { font-size: 12px; color: var(--muted); padding: 10px 0 0; letter-spacing: .02em; transition: opacity .6s; }
.loading-line.fade { opacity: 0; }
.loading-line a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.loading-line .ready { margin-right: 6px; }
.pulse-dot, .ld-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite; }
.pulse-dot { margin-right: 8px; position: relative; top: -1px; }
.ld-dot { margin-left: 6px; color: var(--muted); }
.new-items { display: block; margin: 0 auto 16px; padding: 8px 16px; border: 1px solid var(--line); background: var(--paper);
  color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.new-items:hover { background: var(--wash); }
.new-items u { text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pulse-dot, .ld-dot { animation: none; } }

/* The add-a-brand list: a website to add, the brand's own shop found by name, and what else can be typed. */
.sp-list li.sp-info { display: block; cursor: default; font-size: 12px; color: var(--muted); padding: 10px 14px; line-height: 1.5; }
.sp-list li.sp-info:hover { background: none; }
.sp-list li.sp-info b { font-weight: 500; color: var(--ink); }
.sp-list .sp-looking { font-style: italic; }
.sp-list li.sp-add .sp-name { text-transform: none; letter-spacing: .02em; font-size: 13px; }
/* A pasted item's address: "Add this item" with where it's from on the line below (the address is long). */
.sp-list li.sp-item { flex-direction: column; gap: 2px; }
.sp-plus { font-weight: 400; margin-right: 2px; }

/* The rows at the top of the shop: the title folds a row away and opens it again (shop.html: .shelf-toggle). */
.shelf-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 10px; font: inherit; letter-spacing: inherit;
  padding: 8px 0; margin: -8px 0; }   /* (a 40px tap area without a taller row) */
.shelf-toggle:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.shelf-chev { align-self: center; color: var(--muted); transition: transform .2s; }
.shelf-toggle:hover .shelf-chev { color: var(--ink); }
.shelf.collapsed .shelf-chev { transform: rotate(-90deg); }
.shelf.collapsed { padding-bottom: 9px; }   /* (folded: just the title, a slim line) */
.shelf.collapsed .shelf-head { margin-bottom: 0; }
.shelf.collapsed .shelf-head > a, .shelf.collapsed .shelf-head > .linkbtn { display: none; }   /* (no "See all" while folded) */
.shelf.collapsed .shelf-row { display: none; }
/* The whole title bar folds the row, not just its name: up to a little before "See all", which stays its own link */
.shelf-head h2 { flex: 1; min-width: 0; }
.shelf-head > a, .shelf-head > .linkbtn { margin-left: 24px; }
.shelf-toggle { display: flex; box-sizing: border-box; width: 100%; }
@media (prefers-reduced-motion: reduce) { .shelf-chev { transition: none; } }

/* Product categories always start at the left (a single group: the old "second group goes right" rules don't apply). */
.catbar .catgroup:last-child { justify-content: flex-start; }
@media (max-width: 1100px) { .catbar .catgroup:last-child { align-items: flex-start; } }

/* Filters are a panel opened with the Filters button at every width (never a column beside the products): from the
   left over a dimmed shop on wide screens, the whole screen on phones. */
.shop { grid-template-columns: 1fr; gap: 0; }
.filters-btn { display: inline-block; }
aside.filters { display: none; position: fixed; inset: 0 auto 0 0; width: min(380px, 100%); background: var(--paper); z-index: 40;
  overflow: auto; padding: 24px 24px 80px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
aside.filters.open { display: block; }
aside.filters .close { display: block !important; margin-bottom: 16px; }
@media (max-width: 860px) { aside.filters { width: 100%; padding: 0 16px; box-shadow: none; }
  aside.filters .close { margin-bottom: 8px; } }   /* (Close's 8px on phones, over the 16px just above; and no padding at the top or bottom on
   phones: Close and Show N items stick to the panel's edges, and a sticky bar stops at the padding, which left Show N
   items 80px above the bottom with products showing under it) */

/* The bar that stays while scrolling the shop (shop.html: stickyRefresh). Hidden, and taking no room, until the
   controls above have scrolled away: then a slim bar along the top on wide screens, a pill at the bottom on phones. */
.stickybar { position: fixed; left: 0; right: 0; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line);
  transform: translateY(-110%); transition: transform .28s ease; visibility: hidden; }
.stickybar.show { transform: none; visibility: visible; }
.sb-inner { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter); height: 50px; display: flex; align-items: center; gap: 30px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.sb-seg { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: none; border: 0; padding: 0;
  color: var(--ink); font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.sb-k { color: var(--muted); }
.sb-v::after { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0 3px 7px; border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.sb-seg select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }   /* (16px: no zoom on iPhone) */
.sb-seg:hover .sb-v, .sb-filters:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line); }
.sb-filters { font-weight: 500; }
.sb-count { margin-left: auto; color: var(--muted); }
@media (max-width: 860px) {
  .stickybar { top: auto; left: 50%; right: auto; bottom: calc(14px + env(safe-area-inset-bottom)); border: 1px solid var(--line);
    border-radius: 999px; box-shadow: 0 8px 28px rgba(0, 0, 0, .16); transform: translate(-50%, calc(100% + 40px)); max-width: calc(100vw - 24px); }
  .stickybar.show { transform: translate(-50%, 0); }
  .sb-inner { height: 46px; padding: 0 20px; gap: 18px; font-size: 10.5px; letter-spacing: .12em; }
  .sb-k, .sb-count { display: none; }
  .sb-seg + .sb-seg::before { content: ""; position: absolute; left: -9px; top: 50%; height: 14px; margin-top: -7px; border-left: 1px solid var(--line); }
  /* (a long department or category on a 375-pixel phone: the choices shrink and end in "…", inside the pill; Filters
     keeps its whole name, and the arrow moves out of the cut-off text so it always shows) */
  .stickybar { width: max-content; }   /* (its whole width when it fits: from the middle, it would otherwise shrink to half the screen) */
  .sb-seg { min-width: 0; }
  .sb-filters { flex: none; }
  .sb-v { min-width: 0; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
  .sb-v::after { display: none; }
  label.sb-seg::after { content: ""; flex: none; width: 5px; height: 5px; margin: 0 0 3px -1px; border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor; transform: rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) { .stickybar { transition: none; } }
@media (max-width: 860px) { body.sb-on .toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }   /* (above the scrolling pill) */
.design-icon-note { display: flex; gap: 14px; align-items: center; max-width: 780px; }
.design-icon-note img { flex: none; border: 1px solid var(--line); border-radius: 10px; }

/* The Brands row (shop.html: loadBrandRow): every followed brand that fits the filters, with its logo and a mark. */
/* "Open this brand's website?" (a brand Belvery can't read, tapped in the Brands row) */
dialog.ask { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 26px 26px 22px;
  width: min(420px, calc(100vw - 32px)); }
dialog.ask::backdrop { background: rgba(0,0,0,.36); }
dialog.brand-edit { width: min(760px, 94vw); max-height: 90vh; overflow: auto; }   /* the brand menu's Edit window */
/* (its layout, the owner, 31 Oct: one column, even gaps, the "Added" panel's chips, star and ×) */
dialog.brand-edit .panel { grid-template-columns: 1fr; }
dialog.brand-edit p.hint { margin: 6px 0 0; }   /* (not dialog.ask p's 20px under each hint) */
dialog.brand-edit .be-head { display: flex; align-items: flex-start; gap: 8px; }   /* (a long name on two lines: star and × by its first) */
dialog.brand-edit .be-head h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
dialog.brand-edit .be-head .be-fav, dialog.brand-edit .be-head .ap-close { height: 40px; margin-top: -2px; display: inline-flex; align-items: center; justify-content: center; }   /* (centred on the name's first line, 36px) */
dialog.brand-edit .be-head .ap-close { margin-left: auto; margin-right: -10px; }
dialog.brand-edit .be-refresh { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; margin-top: 4px; }
dialog.brand-edit .be-refresh:hover { color: var(--ink); }
dialog.brand-edit .be-refresh:disabled { cursor: default; text-decoration: none; }
.be-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.be-chip, .be-fav { position: relative; cursor: pointer; }
.be-chip { display: inline-flex; }   /* (a chip a block of its own: wrapped rows don't overlap) */
dialog.brand-edit .be-chip input, dialog.brand-edit .be-fav input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.be-chip input:checked + .ap-chip { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.be-chip input:checked + .ap-chip::before { content: '✓ '; }
.be-chip input:focus-visible + .ap-chip, .be-fav input:focus-visible ~ svg { outline: 2px solid var(--ink); outline-offset: 2px; }
.be-fav svg { width: 17px; height: 17px; }
.be-fav:has(input:checked) { color: var(--ink); }
.be-fav input:checked + svg { fill: currentColor; }
dialog.brand-edit .f .hint { font-size: 12px; }
dialog.brand-edit input.be-new { width: 170px; font-size: 12px; padding: 6px 12px; border: 1px dashed var(--line); }   /* (the "Added" panel's field, not a full-width one) */
dialog.brand-edit input.be-new:focus { border-style: solid; border-color: var(--ink); }
dialog.brand-edit .be-edit-depts { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--muted);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
dialog.brand-edit .be-edit-depts:hover { color: var(--ink); }
dialog.brand-edit .choice span { padding: 8px 0; font-size: 10px; }   /* (the size and show switches: as tall as its buttons) */
dialog.brand-edit .size-editor .choice { display: inline-flex; max-width: none; }   /* (the sizes switch: each choice as wide as its word, like a button) */
dialog.brand-edit .size-editor .choice label { flex: none; }
dialog.brand-edit .size-editor .choice span { padding: 8px 16px; }
@media (max-width: 860px) {
  dialog.brand-edit { padding: 20px 18px 18px; }
  dialog.brand-edit .ap-chip { padding: 10px 14px; }
  dialog.brand-edit .be-head .ap-close, dialog.brand-edit .be-fav, dialog.brand-edit .be-refresh { min-height: 40px; min-width: 40px; }
  dialog.brand-edit .be-refresh, dialog.brand-edit .be-edit-depts { display: inline-flex; align-items: center; margin-top: 0; min-height: 40px; }
  dialog.brand-edit .be-new { min-height: 40px; }
  dialog.brand-edit .choice span { padding: 0 6px; font-size: 11px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
  dialog.brand-edit .size-editor .choice span { padding: 0 16px; }
}
@media (max-width: 400px) {   /* (the narrowest phones: the sizes switch shares the width, no sideways scroll) */
  dialog.brand-edit .size-editor .choice { display: flex; }
  dialog.brand-edit .size-editor .choice label { flex: 1 1 auto; min-width: 0; }
  dialog.brand-edit .size-editor .choice span { padding: 0 6px; letter-spacing: .12em; }
}
dialog.ask h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 8px; }
dialog.ask p { margin: 0 0 20px; line-height: 1.5; }
.ask-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.br-count { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; color: var(--muted); vertical-align: middle; margin-left: 6px; }
.br-row { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px 6px 10px; scrollbar-width: none; }   /* (room for the outline) */
.br-row::-webkit-scrollbar { display: none; }
.br-card { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: inherit;
  text-decoration: none; scroll-snap-align: start; }
.br-logo { position: relative; width: 52px; height: 52px; border-radius: 0; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: visible; }
.br-logo img { width: 78%; height: 78%; object-fit: contain; }
.br-letter { font-family: var(--serif); font-size: 25px; color: #000; line-height: 1; }
.br-name { font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; text-align: center; line-height: 1.35;
  max-width: 74px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.br-mark { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; border: 1.5px solid var(--paper); }
.br-mark svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.br-mark.indexed { background: #fff; color: #000; border-color: var(--line); }   /* (black on white, like the logos) */
.br-mark.indexed svg { stroke-width: 2.8; }
.br-mark.link { background: var(--paper); color: var(--muted); border-color: var(--line); }
.br-mark.reading { background: var(--paper); color: var(--ink); border-color: var(--line); }
.br-mark.reading svg { animation: spin 1.4s linear infinite; }
/* "More you might like": the brand itself opens its sheet (a look before adding); its + adds it, drawn as the ✓ is */
.br-mark.suggest { background: #fff; color: #000; border-color: var(--line); padding: 0; cursor: pointer; }
.br-mark.suggest svg { stroke-width: 2.8; }
.br-mark.suggest:hover, .br-mark.suggest:focus-visible { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.br-mark.suggest::after { content: ""; position: absolute; inset: -9px; }   /* (a finger-sized target around the small mark) */
.br-sug { position: relative; }
.br-sug > .br-add { top: -6px; right: 1px; }   /* (where the ✓ sits on a logo, on the card: the + is a button of its own) */
.br-sug-open, .fr-pal { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.br-sug-open { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; }
.br-sug .br-logo { border-style: dashed; }
aside.filters .mode-hint { display: block; margin-top: 2px; }   /* (Filters' Shop mode: what Discovery means, under it) */
@media (prefers-reduced-motion: reduce) { .br-mark.reading svg { animation: none; } }

/* The test site (testsite.py): a bar on every page, so it's never mistaken for the real one. */
.test-banner { background: #f4d35e; color: #1a1a1a; font-size: 12px; letter-spacing: .04em; line-height: 1.4;
  padding: 7px 16px; text-align: center; position: relative; z-index: 60; }
.test-banner b { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 600px) { .test-banner .tb-more { display: none; } }

/* A favorite brand (the star): next to the brand's name in quick view, and on its card in the Brands row */
.qv-brandline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qv-brandfav { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 11px; letter-spacing: .08em; }
.qv-brandfav svg, .qv-brandfav-lg svg { width: 14px; height: 14px; }
.qv-brandfav:hover, .qv-brandfav.on { color: var(--ink); }
.qv-brandfav.on svg, .qv-brandfav-lg.on svg { fill: currentColor; }
.br-fav { position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.br-fav svg { width: 12px; height: 12px; fill: currentColor; }
/* Right after an item is added from its link: keep it as a favorite, for later, and star its brand */
.qv-added { background: var(--wash); padding: 14px 16px; margin: 0 0 18px; }
.qv-added-t { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.qv-added-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.qv-added-btns .act-lg { padding: 7px 12px; font-size: 11px; }
.qv-added-top { display: none; }
.act-lg.on[data-kind="later"] svg, .act-lg.qv-brandfav-lg.on svg { fill: none; }
.act-lg.qv-brandfav-lg.on svg { fill: var(--on-ink); }
@media (max-width: 860px) {
  .qv-added-top:not([hidden]) { display: block; margin: 64px 16px 12px; }   /* (clear of the ↗ and ✕ buttons) */
  .qv-info .qv-added { display: none; }
}

/* Small cards (many per row): after the card styles above, so these win (also in the shop rows). */
@container (max-width: 240px) { .card .info .name { font-size: 15px; } }
@container (max-width: 190px) {
  .card .info .name { font-size: 13px; }
  .card .fabric { display: none; }
  .card .info { padding-top: 10px; }
}
@container (max-width: 150px) {
  .card .acts { top: 6px; right: 6px; gap: 4px; }
  /* a 26px circle drawn inside a 30px tap area (as on phones) */
  .card .act, .card .act.on { width: 30px; height: 30px; min-width: 0; min-height: 0; border-radius: 0;
    background: radial-gradient(circle, var(--chip) 0 13px, transparent 13.5px); }
  .card .act.on { background: radial-gradient(circle, var(--ink) 0 13px, transparent 13.5px); }
  .card .act svg { width: 13px; height: 13px; }
  .card .act[data-kind="bought"], .card .act[data-kind="hide"] { display: none; }
  .card .info .name { font-size: 12px; line-height: 1.3; }
  .card .info .brand { font-size: 9px; }
  .card .info .price { font-size: 12px; }
  .card .tag { font-size: 9px; padding: 3px 6px; bottom: 8px; }
  .card .also, .card .sz { font-size: 10px; }
}
@container (max-width: 120px) {
  .card .info .sz, .card .info .sz.unknown { display: none; }
  /* a 22px circle in a 28px tap area */
  .card .acts { top: 2px; right: 2px; }
  .card .act, .card .act.on { width: 28px; height: 28px; background: radial-gradient(circle, var(--chip) 0 11px, transparent 11.5px); }
  .card .act.on { background: radial-gradient(circle, var(--ink) 0 11px, transparent 11.5px); }
  .card .act svg { width: 11px; height: 11px; }
}
/* Four across on a phone (cards about 80 pixels wide) */
@container (max-width: 92px) {
  .card .info { padding-top: 8px; }
  .card .info .brand { font-size: 8px; letter-spacing: .12em; }
  .card .info .name { font-size: 11px; line-height: 1.25; margin: 2px 0 4px; }
  .card .info .price { font-size: 11px; letter-spacing: 0; }
  .card .info .price .off { display: none; }
  .card .info .price .approx { display: block; font-size: 9.5px; white-space: nowrap; }   /* (its own line: "(≈ $345 ex VAT)") */
  .card .also { display: none; }
  .card .tag { font-size: 8px; letter-spacing: .1em; padding: 2px 5px; bottom: 6px; }
  .card .act, .card .act.on { width: 24px; height: 24px; background: radial-gradient(circle, var(--chip) 0 10px, transparent 10.5px); }
  .card .act.on { background: radial-gradient(circle, var(--ink) 0 10px, transparent 10.5px); }
  .card .act svg { width: 10px; height: 10px; }
}
@media (max-width: 600px) { .grid[data-cols="4"] { gap: 24px 8px; } }

/* Purchases → Orders (from forwarded order emails, inbox.py) */
.order-address { border: 1px solid var(--line); padding: 16px 18px; margin: 10px 0 26px; }
.oa-label { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.oa-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.oa-row code { font-size: 15px; background: var(--wash); padding: 6px 10px; user-select: all; word-break: break-all; }
.oa-help { margin-top: 6px; } .oa-help .hint { line-height: 1.6; margin-top: 8px; }
.oa-confirm { margin: 12px 0 0; padding: 10px 12px; background: var(--wash); font-size: 14px; }
.order-card { border-top: 1px solid var(--line); padding: 16px 0; }
.order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.order-head .hint { margin-left: 8px; }
.order-brand { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.order-status { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--ink); white-space: nowrap; }
.order-status.shipped { background: var(--wash); } .order-status.delivered { background: var(--ink); color: var(--on-ink); }
.order-status.cancelled { color: var(--muted); border-color: var(--line); }
.order-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 6px 0; font-size: 14px; }
.order-item img, .order-item .noimg-sm { width: 44px; height: 56px; object-fit: cover; background: var(--wash); display: block; }
.order-price { white-space: nowrap; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
/* Admin forms laid out as a column (Receiving email, the Claude API reader) */
.stack-form { display: grid; gap: 12px; }
.stack-form > button, .stack-form > .btn { justify-self: start; }
.stack-form label.f { display: grid; gap: 4px; }
.stack-form input[type=text], .stack-form input[type=email], .stack-form input[type=password] { width: 100%; }
.inbox-table tr.unread td { font-weight: 500; }
.inbox-body { white-space: pre-wrap; font-family: var(--sans); font-size: 13.5px; line-height: 1.55; background: var(--wash); padding: 14px 16px; max-height: 480px; overflow: auto; }

/* A site-wide promotion (promos.py): never part of the price or the Sale tag */
.card .promo-line { font-size: 11px; letter-spacing: .04em; color: var(--sale); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .promo-line::before { content: "Promo? "; font-weight: 500; }
.qv-promo { font-size: 13px; line-height: 1.5; color: var(--sale); margin: 6px 0 0; }
.br-promo { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); background: var(--sale); color: #fff;
  font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; white-space: nowrap; }
@container (max-width: 120px) { .card .promo-line::before { content: ""; } }
/* "Brands for you" in the brand box: ✕ turns one down */
.sp-list li { position: relative; }
.sp-list li .sp-no { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 13px; width: 28px; height: 28px; display: grid; place-items: center; }
.sp-list li .sp-no:hover { color: var(--ink); }
.sp-list li:has(.sp-no) { padding-right: 44px; }
/* Sign-up: brands for what the member wrote about themselves */
#aboutMe { width: 100%; resize: vertical; }
.for-you { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.for-you li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fy-logo { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 0; display: grid; place-items: center; overflow: hidden;
  font-family: var(--serif); font-size: 20px; background: #fff; color: var(--ink); }
.fy-logo img { width: 80%; height: 80%; object-fit: contain; }
.fy-name { font-size: 14px; }
.fy-no { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 14px; width: 32px; height: 32px; }
.fy-no:hover { color: var(--ink); }

/* Settings → Notifications: when email alerts arrive (right away, once a day, once a week) */
.email-when { border: 0; padding: 0; margin: 18px 0 14px; max-width: 620px; }
.email-when legend { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 0; margin-bottom: 8px; }
.email-when .check { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: nowrap; }
.email-when .check > input { flex: none; }
.email-when .check > span { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.email-when select { width: auto; padding: 4px 26px 4px 8px; font-size: 13px; min-height: 0; }
.email-when > .hint { margin: 6px 0 0; }
.email-when[disabled] { opacity: .55; }
@media (max-width: 600px) {   /* (phones: "all in one email" under the choice, the circle by its first line) */
  .email-when .check { align-items: flex-start; }
  .email-when .check > input { margin-top: 3px; }
  .email-when .check .hint { flex-basis: 100%; }
  .email-when .check .sep { display: none; }
}

.card .price .approx { margin-left: 0; }
@media (max-width: 640px) { .tabs { gap: 8px 18px; font-size: 11px; letter-spacing: .12em; } }   /* (Notifications' five tabs fit one line on a phone) */

/* Shop top (design review, Oct 2026): "+ Add a brand" opens the add-a-brand box beside search; Filters is a real
   button; the sort reads like it (its choice shows as text over an invisible select); no item count. */
.searchbar .add-toggle { display: flex; align-items: center; gap: 10px; background: none; border: 0; border-right: 1px solid var(--line);
  padding: 16px 28px 16px 0; cursor: pointer; color: var(--ink); font: inherit; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; text-align: left; }
.searchbar .add-toggle:hover .add-label { text-decoration: underline; text-underline-offset: 5px; }
.searchbar:not(.adding) .addstore { display: none; }
.searchbar.adding .add-toggle { display: none; }
.shopbar .filters-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink);
  padding: 0; cursor: pointer; font: inherit; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.shopbar .filters-btn:hover span { text-decoration: underline; text-underline-offset: 5px; }
.sort-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.sort-pick select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }   /* (16px: no zoom on iPhone) */
.sort-pick:hover #sortV { text-decoration: underline; text-underline-offset: 5px; }
.sort-pick:focus-within { outline: 1px solid var(--ink); outline-offset: 4px; }
.sb-count { display: none; }
@media (max-width: 860px) {
  .searchbar .add-toggle { display: flex; width: auto; height: 40px; padding: 0 12px 0 0; margin-right: 10px; flex: none; }
  .searchbar.adding .add-toggle { display: flex; transform: none; }
  .searchbar.adding .add-toggle svg { transform: rotate(45deg); }
  .searchbar.adding .add-label { display: none; }
  .shopbar .filters-btn { min-height: 40px; }
  .shopbar .sort-pick { min-height: 40px; }
}
body.list-empty .deptrow, body.list-empty .searchbar, body.list-empty .catbar, body.list-empty .shopbar { display: none; }
/* Brands page: the heart sits before the name, and every line under it lines up with the name's first letter */
.store-row { --heart-w: 26px; }
.store-row .nm { display: flex; align-items: center; }
.store-row .nm .star { display: inline-flex; align-items: center; justify-content: flex-start; width: var(--heart-w); min-width: var(--heart-w); padding: 0; flex: none; }
.store-row .nm ~ * { margin-left: var(--heart-w); }
@media (max-width: 860px) { .store-row { --heart-w: 34px; } .store-row .nm .star { min-height: 40px; } }
/* Purchases: each item's details fold behind Edit; Remove is the same small link for items and orders */
.purchase-facts { margin: 6px 0 0; }
.purchase-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px; margin-top: 10px; }
.purchase-actions details.edit[open] { flex-basis: 100%; }
.purchase-actions details.edit[open] ~ .inline-form { display: none; }   /* (open: Remove sits beside Save instead) */
.purchase .row-actions .remove-link { margin-left: 12px; }
.order-foot .remove-link { margin-left: 16px; }
.purchase-actions details.edit[open] > summary { margin-bottom: 8px; }
.inline-form { display: inline; margin: 0; }
.remove-link { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.remove-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.alert .ph.icon { display: grid; place-items: center; color: var(--muted); }
/* Short pages: the footer sits at the bottom of the window, not halfway up it */
body:not(.home):not(.admin) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page-main { flex: 1 0 auto; }
/* Stays: the Collections row has the same spacing as the shop's Departments row */
.depts.stayrow { padding: 14px 0 12px; justify-content: flex-start; }
@media (max-width: 860px) { .depts.stayrow { padding: 6px 0; } }
.steps-phone { display: none; text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 32px; }
/* Admin → Stores: a row's actions are small buttons on one line, Remove set a little apart */
.store-actions { gap: 6px; white-space: nowrap; align-items: center; }
.store-actions .mini { font: inherit; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: none;
  border: 1px solid var(--ink); padding: 5px 8px; cursor: pointer; white-space: nowrap; }
.store-actions .mini:hover { background: var(--ink); color: var(--on-ink); }
.store-actions form:last-child { margin-left: 10px; }
.store-actions .mini.remove { border-color: var(--line); color: var(--muted); }
.store-actions .mini.remove:hover { border-color: var(--sale); background: none; color: var(--sale); }
/* Admin: a number with its unit on one line ("14 newest", "0 GB"), not the unit under a full-width field */
body.admin .unit { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
body.admin .unit input[type=number] { width: 90px; }
/* The refresh arrow: "Refresh your shop" shows to its left while the pointer is on it */
@media (hover: hover) {
  .shopbar .refresh { position: relative; }
  .shopbar .refresh::before { content: "Refresh your shop"; position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    white-space: nowrap; font-size: 11px; letter-spacing: .04em; text-transform: none; color: var(--muted); background: var(--paper);
    padding: 2px 0 2px 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
  .shopbar .refresh:hover::before, .shopbar .refresh:focus-visible::before { opacity: 1; }
}
/* Per row stays in the controls bar at every size; on a phone, just the slider and its number */
@media (max-width: 520px) {
  .shopbar .meta { gap: 10px; }
  .shopbar .perrow { gap: 6px; }
  .shopbar .perrow label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .shopbar .perrow input[type=range] { width: 56px; }
}
/* Per row folds into a grid button (with the number) when the bar runs out of room; the button opens the slider */
.perrow { position: relative; }
.perrow-panel, .perrow-ctl { display: inline-flex; align-items: center; gap: 8px; }
.perrow-panel.phone-only { display: none; }   /* (Filters' own Per row, for phones: not over the rule above on wide screens) */
@media (max-width: 860px) { .perrow-panel.phone-only { display: flex; } }
.perrow-btn { display: none; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink);
  font: inherit; font-size: 11px; letter-spacing: .1em; }
.perrow-btn:hover span { text-decoration: underline; text-underline-offset: 5px; }
.perrow.compact .perrow-btn { display: inline-flex; min-height: 40px; }
.perrow.compact .perrow-panel { display: none; position: absolute; top: calc(100% + 6px); right: -10px; z-index: 25; flex-direction: column;
  align-items: flex-start; gap: 10px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.perrow.compact.open .perrow-panel { display: flex; }
.shopbar .perrow.compact .perrow-panel label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.shopbar .perrow.compact .perrow-panel input[type=range] { width: 120px; }
.shopbar.tight .sort-k { display: none; }   /* (a very narrow bar: just "Newest", without "Sort by:") */
/* Shop rows (Settings → Your shop page, and the welcome steps): each row's name with what it shows under it */
.sections .row-pick { align-items: flex-start; gap: 12px; margin: 0; flex: 1; min-width: 0; padding-right: 14px; cursor: pointer; }
.sections .row-pick input { margin-top: 4px; flex: none; }
.sections .row-line { line-height: 1.5; }
.sections .row-title { font-weight: 500; }
.sections .row-desc { font-size: 13px; color: var(--muted); }
.rows-step { max-width: 560px; margin: 0 auto; }   /* (the welcome step: a narrower list) */
.sections li { gap: 10px; }
/* Admin → Refresh → Working on now: each background job's state */
.jobs-table td { vertical-align: top; }
.jobs-table td:first-child { min-width: 170px; }
.job-state { display: inline-block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 7px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.job-state.running { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.job-state.waiting { border-color: var(--ink); color: var(--ink); }
.job-state.stuck, .job-state.problem, .job-state.interrupted { border-color: var(--sale); color: var(--sale); }
/* The quick sizes' shoe size: the size, and whether it's women's or men's sizing */
.size-quick .q-shoe { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 10px; font-size: 13px; margin: 4px 0; }
.size-quick .q-shoe > label, .size-quick .q-shoe .q-label { color: var(--muted); }
/* the shoe box, as wide as the boxes above, with its US / EU switch under it; its label lines up with the box */
.size-quick .q-shoe { align-items: start; }
.size-quick .q-shoe > label, .size-quick .q-shoe .q-label { padding-top: 10px; }
.size-quick .shoe-field { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.size-quick .shoe-field input[type=text] { width: 100%; }
.shoe-toggle { display: inline-flex; flex: none; border: 1px solid var(--line); }
.shoe-toggle label { display: block; margin: 0; cursor: pointer; }
.shoe-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.shoe-toggle span { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) !important;
  padding: 4px 8px; white-space: nowrap; }
.shoe-toggle input:checked + span { background: var(--ink); color: var(--on-ink) !important; }
.shoe-toggle input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.size-quick .q-shoe-for .shoe-toggle { justify-self: start; }
.size-quick input[data-guess] { font-style: italic; }   /* (Belvery's guess, until the member types over it) */
.size-quick .size-guess-note { grid-column: 1 / -1; margin: 2px 0 0; }
.size-quick .pair input { color: var(--ink); }   /* (the pant boxes sit in a muted label: their values are ink, like the others) */
/* Welcome steps (four): a short line for each intro point on phones; brands, ideas, and departments on one screen */
.intro-grid .short { display: none; }
@media (max-width: 700px) {
  .intro-grid { gap: 18px; margin: 4px 0; }
  .intro-grid .long { display: none; }
  .intro-grid .short { display: block; }
  .intro-grid h3 { font-size: 19px; margin: 4px 0 2px; }
  .onboard .step-panel[data-step="1"] .sub { margin-bottom: 18px; }
}
.onboard .ideas, .onboard .depts-block { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.onboard .ideas-head { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; margin: 0 0 6px; }
.onboard .ideas-head .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.popular .more-groups { border-style: dashed; }
.f .hint { text-transform: none; letter-spacing: 0; }   /* ("(optional)" beside a label, in plain text) */
/* What's new: a small flag in the top bar (opposite the menu) and the list it opens (whatsnew.py) */
/* the flag: a small blue bookmark ribbon hanging from the top edge near the right corner, with a sparkle */
.whatsnew-flag { --wn-blue: #2f5fd0; position: absolute; top: 0; right: 32px; z-index: 5; width: 18px; height: 28px; padding: 7px 0 0;
  border: 0; cursor: pointer; display: flex; justify-content: center; align-items: flex-start; color: #fff; background: var(--wn-blue);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); opacity: .9; transition: height .15s, opacity .15s; }
.whatsnew-flag:hover, .whatsnew-flag:focus-visible { height: 32px; opacity: 1; outline: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .whatsnew-flag { --wn-blue: #4a76e6; } }
:root[data-theme="dark"] .whatsnew-flag { --wn-blue: #4a76e6; }
.whatsnew-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 60; }
.whatsnew { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto; background: var(--paper); border: 1px solid var(--ink); padding: 28px 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.whatsnew h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: .06em; text-transform: uppercase; text-align: center; margin: 0 0 18px; }
.whatsnew ul, .wn-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.whatsnew li, .wn-list li { padding: 12px 0 12px 18px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; line-height: 1.5; }
.whatsnew .wn-lead, .wn-list .wn-lead { font-weight: 500; }
.wn-release { margin-top: 22px; }   /* (Notifications → What's new: each update, when it came, then its lines) */
.wn-release .alert-kind { margin-bottom: 8px; }
.whatsnew li::before, .wn-list li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 6px; height: 6px; background: var(--ink); }
.whatsnew-cta { white-space: nowrap; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); margin-left: 4px; }
.whatsnew-close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 16px; cursor: pointer; padding: 6px; color: var(--muted); }
.whatsnew-actions { text-align: center; margin: 20px 0 0; }
.whatsnew-more { text-align: center; margin: 14px 0 0; }
.whatsnew-more .linkbtn { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.whatsnew { max-height: calc(100dvh - 48px); overscroll-behavior: contain; }   /* (a long list scrolls inside the box) */
/* (only its list scrolls: the title, close and Got it stay in sight; the box never grows past the screen) */
.whatsnew { display: flex; flex-direction: column; overflow: hidden; }
.whatsnew .wn-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.whatsnew .wn-release { margin: 0; }
.whatsnew .wn-release ul { border-top: 0; }
.whatsnew .wn-date { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--muted);
  margin: 0; padding: 16px 0 6px; border-bottom: 1px solid var(--line); scroll-margin-top: 0; }
.whatsnew .wn-new { color: var(--ink); margin-left: 6px; }
.whatsnew .whatsnew-actions { flex: none; }
@media (max-width: 860px) {
  .whatsnew-flag { right: 20px; }
  .whatsnew { padding: 24px 18px 18px; }
  .whatsnew h2 { font-size: 22px; }
}

/* A brand under the pointer gets an outline a little away from its tile, in the text color (black on the light theme,
   white on the dark one, so it shows against either); a picked one keeps it */
.br-card .br-logo { outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .12s; }   /* (1px, like every other line) */
.br-card:not(.br-search):hover .br-logo, .br-card.on .br-logo { outline-color: var(--ink); }
/* The brands picked, as bubbles in the Brands row's title bar */
.br-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; margin: 0 16px; align-self: center; }
.br-picked:empty { display: none; }
.shelf-head:has(.br-picked:not(:empty)) h2 { flex: 0 1 auto; }
.br-bubble { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); border-radius: 0;
  padding: 3px 9px 3px 11px; font: inherit; font-family: var(--sans); font-size: 11.5px; letter-spacing: .02em; color: var(--ink); cursor: pointer; }
.br-bubble span { font-size: 9.5px; color: var(--muted); }
.br-bubble:hover { border-color: var(--ink); }
.br-bubble:hover span { color: var(--ink); }
.shelf-head .br-clear[hidden], .shelf-head > a[hidden] { display: none; }
.shelf-head .br-clear { font: inherit; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: none;
  border: 0; border-bottom: 1px solid var(--ink); padding: 0; cursor: pointer; color: var(--ink); white-space: nowrap; }   /* (looks like "See all") */
.br-new { font-size: 9.5px; letter-spacing: .06em; color: var(--muted); margin-top: -4px; white-space: nowrap; }
/* Brands that only open their own site: after a divider, a little faded */
.br-out { opacity: .72; }
.br-out:hover { opacity: 1; }
.br-sep { flex: none; align-self: stretch; display: flex; align-items: center; padding: 0 2px 18px 14px; border-left: 1px solid var(--line);
  margin-left: 2px; }
.br-sep span { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); width: 58px; line-height: 1.4; }
.br-none { align-self: center; margin: 0 0 18px 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* The search tile, before the brands: a magnifier; tapped, a box slides out of it */
/* (beside the row, not in it: the brands scroll in their own space, so none ever shows under or around it) */
.br-wrap { display: flex; align-items: flex-start; }
.br-wrap > .br-row { flex: 1; min-width: 0; }
.br-searchslot { flex: none; padding: 8px 18px 10px 0; }
.shelf.collapsed .br-wrap, .shelf.collapsed .br-more { display: none; }
/* "More you might like" (Discovery only): its own row of brands under the member's, its name small above */
.br-more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.br-more-label { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.br-search { width: auto; min-width: 66px; }
.br-find { display: flex; align-items: center; height: 52px; }
.br-find-btn { cursor: pointer; padding: 0; color: var(--ink); background: var(--paper); flex: none; }
.br-find-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.br-find-btn:hover, .br-search.open .br-find-btn { border-color: var(--muted); }   /* (a 1px line, like the inputs and boxes around it) */
.br-search .br-find-input { width: 0; min-width: 0; padding: 0; margin: 0; border: 0; border-bottom: 1px solid transparent; box-shadow: none; opacity: 0; font-size: 14px;
  transition: width .22s ease, opacity .18s ease, margin .22s ease; background: none; }
.br-search.open .br-find-input { width: 74px; opacity: 1; margin-left: 10px; padding: 6px 0; border-bottom-color: var(--line); font-size: 13px; }   /* (one brand's width) */
.br-find-label { color: var(--muted); }
.br-search.open .br-find-label { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .br-search .br-find-input { transition: none; } }
@media (max-width: 600px) { .br-search.open .br-find-input { font-size: 16px; } }   /* (16px: no zoom on iPhone) */

/* ---------- Collections (PLAN-collections.md) ---------- */
/* Cards: + under the heart. Small cards and phones keep the heart and the eye, and "…" for the rest (shop.html: openMoreMenu) */
.card .act[data-kind="more"] { display: none; }
@media (max-width: 860px) {
  .card .act[data-kind="later"], .card .act[data-kind="collect"] { display: none; }
  .card .act[data-kind="more"] { display: grid; }
}
@container (max-width: 190px) {
  .card .act[data-kind="later"], .card .act[data-kind="collect"], .card .act[data-kind="bought"], .card .act[data-kind="hide"] { display: none; }
  .card .act[data-kind="more"] { display: grid; }
}
/* the + list beside the button: the member's collections, ticked, and a new one */
.cp { width: 250px; }
.cp-new { display: flex; gap: 6px; align-items: center; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.cp-new[hidden] { display: none; }
.cp-newbtn { display: block; width: 100%; text-align: left; margin-top: 4px; padding: 10px 6px 4px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink); }
.cp-newbtn[hidden] { display: none; }
/* Phones: the + list and "…" slide up from the bottom, with big rows; a tap above them or a swipe down closes them */
.sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 71; }
.wp.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; z-index: 72; border: 0;
  border-top: 1px solid var(--ink); padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.14);
  opacity: 1; transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.7,.2,1); }
.wp.sheet.in { transform: none; }
.wp.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -6px auto 14px; }
.wp.sheet .wp-opt { padding: 13px 6px; font-size: 16px; }
.wp.sheet .wp-opt input { width: 20px; height: 20px; }
.wp.sheet .am-item { padding: 15px 8px; font-size: 16px; }
.wp.sheet .cp-newbtn { font-size: 16px; padding: 15px 6px 6px; }
.wp.sheet .cp-new input { font-size: 16px; }
/* an empty collection of your own keeps its search and add bar, to find things to put in it */
body.list-empty.coll-own .searchbar { display: grid; }
.cp-new input { flex: 1; min-width: 0; font-size: 14px; padding: 6px 2px; }
.cp-new .btn.small { padding: 7px 12px; }
.cp .wp-opts .hint { margin: 0; font-size: 12px; }
/* "…": a small menu of the card's other buttons */
.am { width: auto; min-width: 200px; padding: 6px; }
.am-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 9px 10px; font: inherit;
  font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.am-item:hover, .am-item:focus-visible { background: var(--wash); outline: none; }
.am-item svg { flex: none; width: 15px; height: 15px; }
.am-on { margin-left: auto; padding-left: 12px; }
/* a collection's page */
.coll-head { text-align: center; margin: 36px 0 34px; }
.coll-kind { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.coll-kind a { color: inherit; border-bottom: 1px solid currentColor; }
.coll-acts { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 12px; }
.coll-acts .linkbtn { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.coll-acts .linkbtn:hover { color: var(--ink); }
.coll-share-note { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 4px 0; font: inherit; font-size: 12px; color: var(--ink);
  cursor: pointer; }   /* (a plain link with its rule under it, not a pill) */
.coll-share-note:hover { border-bottom-color: var(--ink); }
.csn-k { color: var(--muted); margin-right: 2px; }
.coll-vis { display: grid; gap: 6px; margin: 6px 0 16px; }
.coll-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; line-height: 1.45; }
.coll-opt:has(input:checked) { border-color: var(--ink); }
.coll-opt input { margin-top: 3px; accent-color: var(--ink); }
.coll-opt strong { display: block; font-weight: 500; }
.coll-link { margin: 0 0 16px; }
.coll-link input { width: 100%; font-size: 13px; padding: 8px 2px; margin-bottom: 8px; }
.coll-link-btns { display: flex; align-items: center; gap: 16px; }
dialog.ask .coll-link .hint, dialog.ask #collShopNote { margin: 8px 0 16px; font-size: 12.5px; }
#collShopNote a { border-bottom: 1px solid currentColor; }
dialog.ask #collRenameIn { width: 100%; font-size: 16px; padding: 8px 2px; margin: 6px 0 4px; }
dialog.ask .coll-err { min-height: 1.4em; margin: 0 0 12px; color: var(--sale, #9b1b1b); }
/* the menu: Collections, with New collection… (like the items around it, in grey) and its name box. Headings and
   single links are one size; the items under a heading are smaller and set in. */
.drawer .linkbtn.sub { font-family: var(--serif); font-size: 21px; letter-spacing: .04em; padding: 6px 0 6px 20px; color: var(--muted);
  margin-bottom: 6px; text-transform: none; }
.drawer .linkbtn.sub:hover { color: var(--ink); opacity: 1; }
.drawer form.drawer-newcoll-form { margin: 2px 0 8px 20px; display: flex; gap: 8px; align-items: center; }
.drawer-newcoll-form input[type=text] { flex: 1; min-width: 0; font-size: 15px; padding: 6px 2px; }

/* A link card (a site Belvery can't read): no price, just the way to see it there */
.card .price .link-price { color: var(--muted); font-size: 12px; letter-spacing: .02em; }

/* Filters → Brand: find a brand in a long list */
aside.filters .brand-find { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
aside.filters .brand-find:focus-within { border-bottom-color: var(--ink); color: var(--ink); }
aside.filters .brand-find svg { flex: none; }
aside.filters .brand-find input { flex: 1; min-width: 0; font-size: 14px; padding: 7px 0; border: 0; background: none; color: var(--ink); outline: none; }
#brands label.nomatch { display: none !important; }
aside.filters .brand-none { margin: 0 0 6px; font-size: 12px; }

/* Filters → Close: in a square-cornered box, so it reads as a button */
aside.filters .close-box { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); padding: 8px 14px;
  line-height: 1; }
aside.filters .close:hover .close-box, aside.filters .close:focus-visible .close-box { background: var(--wash); }   /* (as the category menu) */
aside.filters .close:focus-visible { outline: none; }

/* A folded row: ✕ hides it from the shop, the handle drags it up or down (shop.html: arranging the rows) */
.shelf-tools { display: none; align-items: center; gap: 4px; margin-left: 16px; }
.shelf.collapsed .shelf-tools { display: inline-flex; align-self: center; }
.shelf-tools button { all: unset; display: grid; place-items: center; width: 32px; height: 32px; margin-block: -8px; cursor: pointer;
  color: var(--muted); }
.shelf-tools button:hover, .shelf-tools button:focus-visible { color: var(--ink); background: var(--wash); }
.shelf-tools .shelf-drag { cursor: grab; touch-action: none; }
.shelf-tools svg { width: 14px; height: 14px; }
.shelf.dragging { position: relative; z-index: 3; background: var(--paper); box-shadow: 0 10px 28px rgba(0,0,0,.14); will-change: transform; }
.shelf { position: relative; }   /* (rows sliding out of the way stay under the one being dragged) */
body.dragsort-active, body.dragsort-active * { cursor: grabbing !important; user-select: none; }

/* Settings → Departments: each one's handle drags it to a new place (static/dragsort.js) */
.dept-list .cat { position: relative; background: var(--paper); }
#groups button.dragging { position: relative; z-index: 3; background: var(--paper); box-shadow: 0 6px 18px rgba(0,0,0,.14);
  padding-left: 8px; padding-right: 8px; margin: 0 -8px; will-change: transform; }   /* (a department, lifted) */
#groups button { -webkit-touch-callout: none; }
/* A department under the pointer shows a small ⋮⋮: it can be dragged (All and Favorites can't) */
@media (hover: hover) {
  #groups button[data-group]:not([data-group=""]):not([data-group="fav"]) { position: relative; }
  #groups button[data-group]:not([data-group=""]):not([data-group="fav"]):hover::before { content: '⋮⋮'; position: absolute; left: -12px;
    top: 50%; transform: translateY(-50%); font-size: 10px; letter-spacing: -2px; color: var(--muted); cursor: grab; }
}
.dept-list .cat.dragging { z-index: 3; box-shadow: 0 10px 28px rgba(0,0,0,.14); will-change: transform; }
.dept-handle { flex: none; align-self: center; background: none; border: 1px solid var(--line); width: 30px; height: 30px; cursor: grab;
  touch-action: none; color: var(--muted); letter-spacing: -2px; margin-right: 4px; }
.dept-handle:hover, .dept-handle:focus-visible { border-color: var(--ink); color: var(--ink); }
@media (max-width: 860px) { .dept-handle { width: 40px; height: 40px; } }

/* Log in: a code from the email, typed in (folded under "Have a code from your email?") */
.auth .code-entry { margin: 22px 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.auth .code-entry summary { cursor: pointer; font-size: 13px; color: var(--ink); text-align: center; list-style: none;
  text-decoration: underline; text-underline-offset: 3px; }   /* (a link, so it reads as one: it opens the code box) */
.auth .code-entry summary::-webkit-details-marker { display: none; }
.auth .code-entry summary:hover, .auth .code-entry[open] summary { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth .code-entry form { margin-top: 12px; }
/* The code box and its button side by side: the button only as wide as its word (sign-in pages' buttons are otherwise
   full width, which left the box no room at all) */
.auth .code-form .copy-row .btn { width: auto; flex: none; margin-top: 0; }
.auth .code-form .copy-row input { min-width: 0; font-size: 18px; letter-spacing: .2em; }

/* Right after adding a brand: its departments, a new one, its star (shop.html: showAddedPanel) */
.added-panel { border: 1px solid var(--line); background: var(--paper); padding: 16px 18px 14px; margin: 14px 0 6px;
  opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .22s cubic-bezier(.2,.7,.2,1); }
.added-panel.in { opacity: 1; transform: none; }
.added-panel[hidden] { display: none; }
.ap-head { display: flex; align-items: center; gap: 10px; }
.ap-head h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; flex: 1; }
.ap-done-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 12px; }
.ap-close { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 6px; }
.ap-close:hover { color: var(--ink); }
.ap-brand { margin-top: 10px; }
.ap-name { margin: 6px 0 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.ap-q { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-chip { font: inherit; font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); background: none; color: var(--ink);
  border-radius: 0; cursor: pointer; }
.ap-chip:hover { border-color: var(--ink); }
.ap-chip.guess { border: 1px dashed var(--ink); }
.ap-chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.ap-new input, .be-new { font: inherit; font-size: 12px; padding: 6px 12px; border: 1px dashed var(--line); border-radius: 0; width: 150px;
  background: none; color: var(--ink); }
.ap-new input:focus, .be-new:focus { border-style: solid; border-color: var(--ink); outline: none; }
.ap-fav { margin-top: 10px; }
.ap-hint { margin: 8px 0 0; font-size: 11.5px; }
.ap-foot { display: flex; justify-content: flex-start; margin-top: 10px; }

/* Brands page: each brand's departments on its row (stores.html): in (ticked), the most used others, find or make one */
.brand-depts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.brand-depts .bd-label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.bd-chip { font: inherit; font-size: 12px; padding: 5px 11px; border: 1px solid var(--line); background: none; color: var(--ink);
  border-radius: 0; cursor: pointer; }
.bd-chip:hover { border-color: var(--ink); }
.bd-chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
/* Brands page → Add brands: the same chips, each a checkbox inside (ticked: ✓ and filled) */
.add-depts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }   /* (not .brand-depts: that one is filled in by script) */
.add-depts .bd-chip { position: relative; display: inline-flex; align-items: center; }
.add-depts .bd-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.add-depts .bd-chip .bd-off { margin-right: 4px; }
.add-depts .bd-chip:has(input:checked) .bd-off { display: none; }   /* (an idea taken: added, like the rest) */
.add-depts .bd-chip:has(input:checked) { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.add-depts .bd-chip[hidden] { display: none; }
.dept-ideas-label { display: block; margin-top: 14px; }
.idea-more { font-size: 12px; border-bottom: 1px solid var(--line); }
.add-depts .bd-chip:has(input:focus-visible) { outline: 1px solid var(--ink); outline-offset: 2px; }
.bd-find { position: relative; }
.bd-find input { font: inherit; font-size: 12px; padding: 5px 11px; border: 1px dashed var(--line); border-radius: 0; width: 190px;
  background: none; color: var(--ink); }
.bd-find input:focus { border-style: solid; border-color: var(--ink); outline: none; }
.bd-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 220px; background: var(--paper);
  border: 1px solid var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 4px; display: grid; }
.bd-list[hidden] { display: none; }
.bd-list button { font: inherit; font-size: 13px; text-align: left; background: none; border: 0; padding: 8px 10px; cursor: pointer; color: var(--ink); }
.bd-list button:hover, .bd-list button:focus-visible { background: var(--wash); outline: none; }
.bd-list button[data-new] { border-top: 1px solid var(--line); color: var(--muted); }

/* A brand dragged from the Brands row onto a department (shop.html: "a brand dropped on a department") */
.brand-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--ink); padding: 6px 12px 6px 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.brand-ghost img, .brand-ghost .br-letter { width: 28px; height: 28px; object-fit: contain; font-size: 18px; display: grid; place-items: center; }
body.brand-dragging, body.brand-dragging * { cursor: grabbing !important; user-select: none; }
body.brand-dragging #groups button[data-group]:not([data-group=""]), body.brand-dragging #addDept {
  outline: 1px dashed var(--muted); outline-offset: 4px; }
#groups button.drop-over, #addDept.drop-over { outline: 2px solid var(--ink) !important; outline-offset: 4px; background: var(--wash); }
.br-card.dragging { opacity: .4; }
#brandRowBody .br-card, #brandMoreRow .br-card { -webkit-user-drag: none; -webkit-touch-callout: none; }

/* Added while in a department: add it there too, or just to the shop? */
.ap-ask { margin: 10px 0 4px; padding: 12px 14px; background: var(--wash); }
.ap-ask p { margin: 0 0 10px; font-size: 14px; }
.ap-ask-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Brands page: find one of your brands */
.brand-filter { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); margin: 0 0 18px; color: var(--muted); max-width: 520px; }
.brand-filter:focus-within { border-bottom-color: var(--ink); color: var(--ink); }
/* The search fields that are a glass over a light rule: focus darkens and thickens the rule (inputs have no outline) */
.disc-addbox:focus-within, .disc-searchbox:focus-within { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.st-own-input:focus { border-bottom-width: 2px !important; }
/* Settings: a section's title is a button inside its heading (the heading's own look) */
.sec-toggle { background: none; border: 0; padding: 0; margin: 0; font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; cursor: pointer; text-align: inherit; flex: 1; }
.brand-filter input { flex: 1; min-width: 0; border: 0; background: none; font-size: 15px; padding: 10px 0; color: var(--ink); outline: none; }
.store-grid .store-row[hidden] { display: none; }

/* Save all (static/saveall.js): a slim bar at the bottom while a page has changes not saved yet */
.saveall { position: fixed; left: 50%; bottom: 18px; z-index: 55; display: flex; align-items: center; gap: 18px; padding: 10px 12px 10px 20px;
  background: var(--ink); color: var(--on-ink); box-shadow: 0 10px 30px rgba(0,0,0,.2);
  transform: translate(-50%, 140%); transition: transform .24s cubic-bezier(.2,.7,.2,1); }
.saveall.in { transform: translate(-50%, 0); }
.saveall[hidden] { display: none; }
.saveall-n { font-size: 13px; letter-spacing: .04em; }
.saveall .btn { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
@media (max-width: 600px) { .saveall { left: 12px; right: 12px; transform: translateY(140%); bottom: calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .saveall.in { transform: none; } }

/* Settings → Price levels: a table, $ … $$$$ across the top; each row "Tops  under [40]  $40 – [100]  $100 – [250]  $250 and up" */
.pl-group { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 22px 0 2px; }
.pl-row, .pl-head { display: grid; grid-template-columns: minmax(96px, 1fr) 104px 136px 136px 88px 40px; gap: 4px 10px; align-items: center; }
.pl-head { padding: 4px 0 6px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; letter-spacing: .06em; }
.pl-row { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pl-name { font-weight: 500; }
.pl-lvl { white-space: nowrap; color: var(--muted); }
.pl-from { color: var(--ink); }
.pl-in { position: relative; display: inline-block; }
.pl-in::before { content: '$'; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pl-in input { width: 62px; padding: 4px 4px 4px 14px; font-size: 13px; margin: 0; -moz-appearance: textfield; }
.pl-in input::-webkit-inner-spin-button, .pl-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pl-row.bad .pl-in input { border-color: var(--sale); }
.pl-reset { font-size: 12px; justify-self: end; }
.pl-msg { grid-column: 1 / -1; color: var(--sale); font-size: 12px; margin-top: -2px; }
.pl-msg[hidden] { display: none; }
.pl-more { margin-top: 18px; }
.pl-more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0; }
@media (max-width: 700px) {   /* a phone: the name on its own line, the four levels two by two under it, each marked */
  .pl-head { display: none; }
  .pl-row { grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 0; position: relative; }
  .pl-name { grid-column: 1 / -1; }
  .pl-lvl::before { content: attr(data-sign); color: var(--ink); font-weight: 600; letter-spacing: .04em; display: inline-block; min-width: 38px; }
  .pl-reset { position: absolute; right: 0; top: 10px; }
  .pl-in input { width: 64px; font-size: 16px; }   /* (16px: no zoom on iPhone) */
}
/* The bar's words stay on one line: when it runs short of room, things fold away instead (shop.html: fitBar) */
.shopbar .filters-btn, .shopbar .perrow label, .shopbar .sort-pick { white-space: nowrap; }

/* Admin → Stores → Brands in PDFs: Belvery's check of its own work, and the sites waiting for a decision */
.pdf-check { border: 1px solid var(--line); padding: 12px 16px; margin: 14px 0; max-width: 820px; }
.pdf-check.warn { border-color: var(--sale); }
.pdf-check p { margin: 0 0 6px; }
.pdf-check ul { margin: 6px 0 10px; padding-left: 0; list-style: none; font-size: 13px; line-height: 1.7; }
.review-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.review-table a { border-bottom: 1px solid var(--line); }

/* Admin → Stores: the alert at the top when brands can't be read properly, and their list (refresh.store_problems) */
.problem-alert { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border: 1px solid var(--sale); color: var(--sale);
  padding: 12px 16px; margin: 6px 0 18px; max-width: 820px; text-decoration: none; }
.problem-alert strong { font-weight: 500; }
.problem-alert span { color: var(--ink); font-size: 13px; }
.problem-alert:hover { background: var(--wash); }
.problems-table .problem-why { min-width: 220px; max-width: 360px; line-height: 1.5; }
/* Brands with problems on a phone: each brand a block of its own, its buttons in reach (no sideways scrolling) */
@media (max-width: 700px) {
  .problems-table thead { display: none; }
  .problems-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line, #ddd); }
  .problems-table td { display: block; border: 0; padding: 3px 0; }
  .problems-table .problem-why { min-width: 0; max-width: none; }
  .problems-table td.num::before { content: "Followers: "; color: var(--muted, #777); }
  .problems-table .problem-actions form { max-width: none !important; }
}
.fix-state { font-size: .85em; }
.fix-waiting, .fix-working { color: var(--muted, #777); }
.fix-needs-you { font-weight: 600; }

/* Better price elsewhere (betterprice.py): a card's mark, and quick view's line */
.card .less-line { font-size: 11px; letter-spacing: .04em; color: var(--ink); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .less-line::before { content: "↓ "; }
.qv-better { font-size: 13px; line-height: 1.5; margin: 6px 0 0; }
.qv-better a { text-decoration: underline; }
.checkup-line { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 18px; max-width: 820px; }


/* ================================================================= Brand discovery (templates/_discovery.html) */
.disc-links { columns: 3 180px; column-gap: 28px; margin: 0 0 16px; padding-left: 0; list-style: none; font-size: 14px; line-height: 1.75; }
.disc-links li { break-inside: avoid; }
.disc-links a.disc-ret { display: flex; align-items: center; gap: 10px; border: 0; padding: 4px 0; }
.disc-ret-logo { width: 32px; height: 32px; flex: none; border: 1px solid var(--line); background: #fff; object-fit: contain;
  display: grid; place-items: center; font-family: var(--serif); font-size: 15px; color: var(--ink); }   /* (square, as brands' tiles) */
.disc-ret-words { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.disc-ret-name { border-bottom: 1px solid var(--line); align-self: flex-start; }
.disc-ret .hint { font-size: 11.5px; }
.disc-links a:hover { border-bottom-color: var(--ink); }
.disc-links .hint { font-size: 12px; }
.disc-stores-more { margin: -6px 0 16px; }
.disc-stores-more .linkbtn { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.disc-addstore { display: flex; gap: 10px; align-items: center; max-width: 560px; }
.disc-addbox, .disc-searchbox { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; min-width: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); }   /* (the shop bar's own look: its glass, its type, its light rule) */
.disc-addstore input { flex: 1; min-width: 0; font-size: 14px; padding: 8px 2px; border: 0; background: none; }
.sp-browse .sp-name::before { content: "▦ "; opacity: .6; }
.sp-arrow { margin-left: 10px; font-size: 14px; letter-spacing: 0; }
/* In the shop's bar the dropdown hangs from the bar's own line, flush with its left edge */
.searchbar .addstore .sp-wrap { position: static; }
.searchbar .addstore .sp-list { left: 0; right: auto; min-width: 100%; top: calc(100% + 1px); }
/* Widened for the retailers (links in columns, and a box to add one) */
.sp-list.sp-wide { width: 100%; max-height: min(70vh, 640px); overflow-y: auto; }   /* (grows to hold the retailers, as wide as its bar) */
.sp-list li.sp-stores { display: block; cursor: default; padding: 2px 14px 14px; }
.sp-list li.sp-stores:hover { background: none; }
.sp-stores-in .disc-links li { display: list-item; list-style: disc; padding: 0; min-height: 0; cursor: default; }   /* (the dropdown's row rules don't apply to the retailers) */
.sp-stores-in .disc-links li:hover { background: none; }
.sp-list .sp-head { justify-content: flex-start; gap: 0; }
.sp-stores-in .hint { font-size: 12px; margin: 4px 0 10px; }
.sp-stores-in .disc-links { columns: 3 150px; margin-bottom: 12px; font-size: 13px; line-height: 1.5; }
.sp-list .sp-head .sp-back { background: none; border: 0; padding: 0 10px 0 0; margin: 0; font: inherit; font-size: 14px; letter-spacing: 0; color: var(--ink); cursor: pointer; line-height: 1; vertical-align: -1px; }
.sp-list .sp-head .sp-back:hover { opacity: .6; }
.sp-stores-in .disc-addstore { max-width: 100%; }
@media (max-width: 700px) {
  .sp-list.sp-wide, .searchbar .addstore .sp-list.sp-wide { width: 100%; }   /* (as wide as its bar) */
  .sp-stores-in .disc-links { columns: 2 130px; line-height: 1.65; }
  .disc-links { line-height: 1.65; }
}
.disc-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 71; }
.disc { position: fixed; z-index: 72; left: 50%; top: 6vh; transform: translate(-50%, 12px); width: min(680px, calc(100vw - 32px)); max-height: 88vh;
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 12px 40px rgba(0,0,0,.18);
  opacity: 0; transition: opacity .18s, transform .18s; }
.disc.in { opacity: 1; transform: translate(-50%, 0); }
.disc[hidden] { display: none; }
.disc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; }
.disc-head h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0; }
.disc-head .hint { margin: 2px 0 0; }
.disc.is-building .disc-head .hint::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 7px; vertical-align: 1px; animation: disc-pulse 1.2s ease-in-out infinite; }
@keyframes disc-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .disc.is-building .disc-head .hint::before { animation: none; } }
.disc-head-acts { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.disc-seeall { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); margin-top: 8px; }
/* The full view (plan section 8): the whole window under the logo and menu, a Return line top left, labelled filter rows */
.disc-return { display: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); color: var(--ink); margin-top: 8px; white-space: nowrap; }
.disc-head-main { min-width: 0; }
.disc-lab, .disc-fullonly { display: none; }
.disc .is-off { display: none !important; }
.disc.full { top: var(--disc-top, 0px); left: 0; width: 100vw; max-height: none; height: calc(100vh - var(--disc-top, 0px));
  height: calc(100dvh - var(--disc-top, 0px)); transform: none;   /* (dvh: a phone browser's own bars don't hide its bottom) */
  border: 0; border-top: 1px solid var(--line); box-shadow: none; }
.disc.moving { transition: top .28s cubic-bezier(.2,.7,.2,1), left .28s cubic-bezier(.2,.7,.2,1), width .28s cubic-bezier(.2,.7,.2,1),
  height .28s cubic-bezier(.2,.7,.2,1); overflow: hidden; }
.disc.full .disc-return { display: inline-flex; }
.disc.full .disc-seeall, .disc.full .disc-close { display: none; }
.disc.full .disc-lab, .disc.full .disc-fullonly { display: inline-block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); min-width: 92px; }
.disc-pagetitle { display: none; }
/* The full view's head, as a shop carousel's head (.shelf-head): the serif title, the store and count beside it in the
   small type, the way back underlined at the right */
.disc.full .disc-head { padding: 14px 32px 8px; align-items: baseline; gap: 24px; }
.disc.full .disc-head-main { display: flex; flex-direction: column; gap: 6px; }   /* (the store and its count under the title) */
.disc.full .disc-pagetitle { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--size-heading); letter-spacing: .04em; margin: 0; line-height: 1.15; }
.disc.full .disc-head-main > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.disc.full .disc-head h3 { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.disc.full .disc-head .hint { margin: 0; font-size: 12px; }
.disc.full .disc-head-acts { margin-block: -12px; align-self: baseline; }
.disc-stores { padding: 4px 20px 20px; overflow-y: auto; }
.disc-stores .disc-links { columns: 2 180px; }
.disc.full .disc-stores { padding: 4px 32px 24px; }
.disc.full .disc-tools { padding: 0 32px 14px; }
.disc.full .disc-list { padding-left: 32px; padding-right: 32px; }
.disc-tier button.lit { color: var(--ink); opacity: 1; font-weight: 600; }
#discTierName { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.disc-scrim.full { background: transparent; pointer-events: none; }   /* (the logo and menu stay in reach) */
/* The brand sheet: over the panel (or the full view), the quick view's manner: pictures, then the words; two columns when wide */
.disc-brand { position: absolute; inset: 0; z-index: 3; background: var(--paper); overflow-y: auto; overscroll-behavior: contain; }
.disc-brand[hidden] { display: none; }
.disc-brand-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink); cursor: pointer; }
.disc-brand-x:hover { background: var(--ink); color: var(--on-ink); }
.disc-brand-body { display: grid; grid-template-columns: 1fr; min-height: 100%; }
.disc-brand-media { position: relative; background: var(--wash); }
.disc-brand-media:hover .qv-nav, .disc-brand-media:focus-within .qv-nav { opacity: 1; }
/* The strip: four pictures in view, the rest a swipe (or an arrow) away, a page at a time */
.disc-brand-pics { display: grid; grid-auto-flow: column; grid-auto-columns: calc(25% - 1.5px); gap: 2px; padding: 2px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.disc-brand-pics::-webkit-scrollbar { display: none; }
.disc-brand-pics > :nth-child(4n+1) { scroll-snap-align: start; }
.disc-brand-pics.none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: var(--muted); font-size: 12px; }
.disc-brand-count { position: absolute; right: 10px; bottom: 8px; font-size: 10px; letter-spacing: .14em; color: var(--muted); background: rgba(255,255,255,.85); padding: 2px 6px; }
.disc-brand-pic { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--paper); overflow: hidden; }
.disc-brand-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.disc-brand-pic:hover img { transform: scale(1.03); }
.disc-brand-pic span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 10px; color: var(--ink); background: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .15s; }
.disc-brand-pic:hover span, .disc-brand-pic:focus-visible span { opacity: 1; }
.disc-brand-info { padding: 26px 32px 32px; }
.disc-brand-info h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0 0 8px; padding-right: 48px; }
.disc-brand-meta { margin: 0 0 14px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.disc-brand-meta i { font-style: normal; margin: 0 8px; }
.disc-brand-tier .disc-tier { margin-left: 0; font-size: 12px; color: var(--ink); }
.disc-brand-essence { font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.disc-brand-words { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.disc-brand-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 20px; margin: 0 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.disc-brand-facts dt { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.disc-brand-facts dd { margin: 2px 0 0; font-size: 14px; }
.disc-brand-site { margin: 0 0 6px; font-size: 14px; }
.disc-brand-site a { color: var(--ink); border-bottom: 1px solid var(--ink); }
.disc-brand-acts { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.disc.full .disc-brand-body { grid-template-columns: 1.1fr 1fr; }
.disc.full .disc-brand-media { position: sticky; top: 0; align-self: start; }
.disc.full .disc-brand-pics { grid-template-rows: repeat(2, auto); grid-auto-columns: calc(50% - 1px); }   /* (two by two beside the words: bigger pictures, four a page) */
.disc.full .disc-brand-pics.n1, .disc.full .disc-brand-pics.n2 { grid-template-rows: auto; }
.disc.full .disc-brand-pic { aspect-ratio: 1; }   /* (two rows fit beside the words) */
.disc.full .disc-brand-info { padding: 40px 48px 40px 40px; }
@media (prefers-reduced-motion: reduce) { .disc, .disc.moving { transition: none; } }
.disc-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 2px; }
.disc-tools { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.disc-tools-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.disc-addbox input, .disc-tools .disc-searchbox input[type=search] { flex: 1; min-width: 0; font-size: 14px; padding: 6px 0; border: 0;
  background: none; color: var(--ink); }
.disc-who { flex-wrap: wrap; }
.disc-who button { padding: 6px 11px; }
.toggle.disc-new { display: inline-flex; gap: 8px; align-items: center; padding: 0; margin-left: auto; font-size: 13px; white-space: nowrap; }
.disc-list { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 12px; flex: 1 1 auto; }
.disc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.disc-main { flex: 1 1 auto; min-width: 0; }
/* a brand's name that opens its sheet (the Brands page, a style's brands, Discover's suggestions) */
.disc-open { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.disc-main { display: block; min-height: 44px; }
.disc-open:hover .disc-name, .nm .disc-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.disc-name { font-size: 15px; }
.disc-name a { color: var(--ink); }
.disc-tier { font-size: 11px; color: var(--muted); margin-left: 8px; letter-spacing: .1em; }
.disc-line { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc-row.is-find .disc-name { color: var(--muted); }
.disc-yours { font-size: 12px; color: var(--muted); white-space: nowrap; }
.disc-row, .disc-card-foot { cursor: pointer; }   /* the whole row or card selects */
.disc-pick { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; cursor: pointer; min-height: 44px; padding: 0 2px 0 10px; }
.disc-pick input { width: 20px; height: 20px; accent-color: var(--ink); }
.disc-row.is-yours, .disc-row.is-find, .disc-card.is-yours .disc-card-foot, .disc-card.is-find .disc-card-foot { cursor: default; }
.disc-more { display: block; margin: 14px auto 4px; }
.disc-none { padding: 18px 0; text-align: center; }
.disc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 74; display: flex; justify-content: center; align-items: center; gap: 16px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--on-ink); font-size: 13px; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
.disc-bar .linkbtn { color: var(--on-ink); text-decoration: underline; }
.disc-bar .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.disc-bar[hidden] { display: none; }
@media (max-width: 700px) {
  /* a sheet from the bottom on phones */
  .disc { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 86vh; transform: translateY(100%); border-left: 0; border-right: 0; border-bottom: 0; }
  .disc.in { transform: none; }
  .disc-head { padding: 14px 16px 8px; }
  .disc-head h3 { font-size: 21px; }
  .disc-tools, .disc-list, .disc-foot { padding-left: 16px; padding-right: 16px; }
  .disc.full .disc-head, .disc.full .disc-tools, .disc.full .disc-list { padding-left: 16px; padding-right: 16px; }
  .disc.full .disc-head { flex-wrap: nowrap; gap: 6px 16px; align-items: flex-start; }
  .disc.full .disc-head-acts { margin-block: 0; align-self: flex-start; padding-top: 6px; }
  .disc.full .disc-head-main { gap: 2px; }
  .disc.full .disc-head-main > div { flex-wrap: nowrap; white-space: nowrap; }   /* (the store and its count on one line) */
  .disc.full .disc-head-main > div .hint { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .disc-stores .disc-links { columns: 1; }
  .disc.full .disc-lab, .disc.full .disc-fullonly { min-width: 0; flex: 0 0 auto; margin-right: 2px; white-space: nowrap; }   /* (inline with its row, never squeezed by it) */
  /* one line per filter row, scrolling sideways like the shop's Departments; the cards start higher */
  .disc.full .disc-tools-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .disc.full .disc-tools-row::-webkit-scrollbar { display: none; }
  .disc.full .disc-who { flex-wrap: nowrap; flex: 0 0 auto; }
  .disc.full .disc-who button { white-space: nowrap; }
  .disc.full .toggle.disc-new { margin-left: 14px; flex: 0 0 auto; }
  .disc.full .disc-tools { gap: 6px; }
  .disc-row { padding: 8px 0; }
  .disc-pick input { width: 22px; height: 22px; }
  .toggle.disc-new { margin-left: 0; }
}

/* Brand discovery: list icons, the grid view, the Discover page's tiles */
.disc-icon { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.disc-mono { display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 17px; color: var(--ink); background: var(--wash); }
.disc-views { display: inline-flex; border: 1px solid var(--line); margin-left: auto; }
.disc-views button { padding: 4px 9px; border: 0; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.disc-views button.on { background: var(--ink); color: var(--on-ink); }
.disc-list.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 30px 22px; align-content: start; padding: 18px 24px 24px; }
.disc-list.is-grid .disc-more, .disc-list.is-grid .disc-none { grid-column: 1 / -1; }
.disc.full .disc-list.is-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding: 20px 32px 32px; }
/* Like the shop's product cards: no box around a card, pictures on the wash, the words beneath. Picked (or under the
   pointer): the thin outline a little away from the whole card, as a picked tile gets in the Brands row. The italic
   link below the words opens the brand's site and never picks. */
.disc-card { display: flex; flex-direction: column; min-width: 0; position: relative; outline: 1px solid transparent; outline-offset: 5px; transition: outline-color .12s; }
.disc-card.on, .disc-card:has(.disc-sel:hover) { outline-color: var(--ink); }
.disc-card:has(.disc-pick-key:focus-visible) { outline: 2px solid var(--ink); }   /* (keyboard focus: thicker, picked or not) */
.disc-pick-key { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }
.disc.has-foot .disc-list { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }   /* (room for the Add bar) */
/* The brand area picks: the same thin outline a little away from it that a picked tile in the Brands row gets; the
   button below it is its own thing, outside the outline */
.disc-sel { display: flex; flex-direction: column; cursor: pointer; flex: 1 1 auto; }   /* (fills the card, so the link below lines up across a row) */
.disc-sel .disc-pics img { transition: transform .6s ease; }
.disc-sel:hover .disc-pics img { transform: scale(1.03); }   /* (as the shop's cards do) */
.disc-card.is-yours .disc-sel, .disc-card.is-find .disc-sel { cursor: default; }
.disc-pics { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 1; background: var(--wash); overflow: hidden; }
.disc-pics a { display: block; overflow: hidden; background: #fff; }
.disc-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.disc-pics a:only-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.disc-pics a:first-child:nth-last-child(2), .disc-pics a:first-child:nth-last-child(3) { grid-column: 1 / -1; }
.disc-pics a:first-child:nth-last-child(3) ~ a { grid-column: auto; }
.disc-nopics { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; }
.disc-nopics .disc-icon, .disc-icon.big { width: 64px; height: 64px; flex-basis: 64px; font-size: 26px; }
.disc-wait { grid-column: 1 / -1; background: linear-gradient(90deg, var(--wash), var(--paper), var(--wash)); background-size: 200% 100%; animation: disc-shimmer 1.2s linear infinite; }
@keyframes disc-shimmer { to { background-position: -200% 0; } }
.disc-card-foot { display: flex; flex-direction: column; gap: 4px; padding: 10px 0 2px; }
.disc-card .disc-name { font-size: 14px; }
.disc-card .disc-line, .disc-essence { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.disc-essence { display: -webkit-box; margin-top: 2px; }
.disc-card-acts { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 6px 0 0; margin-top: auto; }
/* the site's small capitals (See all, Refresh), right-aligned, with no box */
.disc-seemore { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-decoration: none; border: 0; border-bottom: 1px solid transparent; padding: 0 0 1px; background: none; font-family: inherit; cursor: pointer; white-space: nowrap; }   /* (a button now: the brand sheet) */
.disc-seemore:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.disc-seemore:hover { color: var(--ink); border-bottom-color: var(--ink); }
.disc-row .disc-essence { -webkit-line-clamp: 1; margin-top: 1px; }
/* Discover: two across on a phone, up to five on a wide screen (the page is wider than the usual narrow column) */
.narrow.discover-page { max-width: 1320px; }
.narrow.discover-page > .title, .narrow.discover-page > .sub { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 700px) {
  .disc-views { margin-left: 0; }
  .disc-list.is-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; padding: 14px 18px 20px; }
  .disc.full .disc-list.is-grid { grid-template-columns: repeat(2, 1fr); padding: 14px 16px 20px; }   /* (two cards across in the full view too) */
  .disc.full .disc-brand-body { grid-template-columns: 1fr; }
  .disc.full .disc-brand-media { position: relative; }   /* (not sticky on a phone; the count stays on the pictures) */
  .disc-brand-pics, .disc.full .disc-brand-pics { grid-template-rows: repeat(2, auto); grid-auto-columns: calc(50% - 1px); }   /* (two by two on a phone, a swipe for the next four) */
  .disc-brand-pics.n1, .disc-brand-pics.n2, .disc.full .disc-brand-pics.n1, .disc.full .disc-brand-pics.n2 { grid-template-rows: auto; }
.disc.full .disc-brand-pic { aspect-ratio: 1; }   /* (two rows fit beside the words) */
  .disc-brand-media .qv-nav { display: none; }
  .disc-brand-info, .disc.full .disc-brand-info { padding: 20px 16px 28px; }
  .disc-brand-info h2 { font-size: 24px; }
  .disc-bar { justify-content: space-between; }
}

/* Settings: jump to a section. A list beside the page on a wide screen, following the reader down: the three groups in
   the serif, each with its sections in small capitals (as the page itself reads, folded, on a phone). */
.set-jump { position: fixed; top: 140px; left: max(24px, calc(50% - 380px - 280px)); width: 240px; z-index: 5;
  max-height: calc(100vh - 160px); overflow-y: auto; scrollbar-width: none; }
.set-jump[hidden] { display: none; }
.set-jump ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.set-jump li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase; font-weight: 500; white-space: nowrap; color: var(--muted); }
.set-jump li.set-jump-group a { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: .04em; line-height: 1.15;
  text-transform: none; white-space: normal; color: var(--ink); padding: 18px 0 6px 14px; }
.set-jump li.set-jump-group:first-child a { padding-top: 0; }
.set-jump li a:hover { color: var(--ink); }
.set-jump li a.on { color: var(--ink); border-left-color: var(--ink); }
.set-jump li a.danger { color: var(--sale); }
@media (max-width: 1320px) { .set-jump { display: none !important; } }   /* (narrower: the sections fold instead) */
/* Settings groups (Shop, Personalization, Account): a row title in the serif, a line under it on a wide screen */
.set-group { font-family: var(--serif); font-weight: 400; font-size: var(--size-heading); letter-spacing: .04em; line-height: 1.15;
  margin: 64px 0 6px; scroll-margin-top: 24px; }
.settings-fold > .sub + .set-group { margin-top: 40px; }
.set-group-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 4px; }
.settings-fold .set-sub { margin-top: 36px; }   /* (a part of a section: Sizes for other people, Hidden brand suggestions) */
@media (max-width: 640px) { .set-group { font-size: 20px; } }   /* (as a shop row's title on a phone) */
.settings-fold h2.section { scroll-margin-top: 24px; }
/* Settings: sections fold to their headings on narrower screens and phones, one tap to open (see settings.html) */
@media (max-width: 1320px) {
  .settings-fold > .set-group { margin: 36px 0 4px; }
  .settings-fold > .set-group-sub { display: none; }   /* (folded, a group is just its title and its sections) */
  .settings-fold > h2.section { cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    margin: 0; padding: 16px 0 12px; }   /* (folded: a slim line each, so the whole list fits about one screen) */
  .settings-fold .sec-body:not(.folded) { padding: 18px 0 28px; }
  .settings-fold > h2.section::after { content: "+"; font-family: var(--sans); font-size: 18px; font-weight: 400; }
  .settings-fold > h2.section.open::after { content: "–"; }
  .settings-fold .sec-body.folded { display: none; }
}
/* A retailer's brands inside the add-a-brand dropdown (docked): the panel in the dropdown's frame, not over the page */
.sp-list li.sp-docked { display: block; padding: 0; cursor: default; }
.sp-list li.sp-docked:hover { background: none; }
.sp-list.sp-wide:has(.sp-docked) { max-height: none; overflow: visible; }
.disc.docked { position: static; transform: none; opacity: 1; width: 100%; max-height: min(64vh, 620px); box-shadow: none;
  border: 0; border-top: 1px solid var(--line); z-index: auto; transition: none; }
.disc.docked .disc-head { padding: 12px 14px 8px; }
.disc.docked .disc-head h3 { font-size: 20px; }
.disc.docked .disc-tools { padding: 0 14px 10px; }
.disc.docked .disc-list { padding-left: 14px; padding-right: 14px; }
.disc.docked .disc-list.is-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 16px; padding: 14px; }
.disc.docked .disc-seemore { font-size: 9.5px; letter-spacing: .12em; white-space: normal; text-align: right; }
@media (max-width: 700px) { .disc.docked .disc-list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; padding: 12px; } }
.disc.no-brands .disc-tools, .disc.no-brands .disc-seeall { display: none; }   /* (blocked, or nothing read yet: nothing to search or expand) */
/* Narrower screens and phones (the bar's own breakpoint): the add-a-brand dropdown spans the whole bar, gutter to
   gutter (the bar, not the field beside the ×, holds it) */
@media (max-width: 860px) {
  .searchbar { position: relative; }
  .searchbar .addstore { position: static; }
  .searchbar .addstore .sp-list, .searchbar .addstore .sp-list.sp-wide { left: 0; right: 0; width: auto; min-width: 0; }
}
@media (max-width: 860px) { .disc-addbox input, .disc-tools .disc-searchbox input[type=search] { font-size: 16px; } }   /* (as the shop bar on phones: 16 px, so a phone does not zoom in on tap) */

/* Friends → Shops (v5.15): a card or a row per friend; a card opens "Brands Alex likes" in Brand discovery's panel */
.friends-page > .title, .friends-page > .sub, .friends-page > .tabs { max-width: 760px; margin-left: auto; margin-right: auto; }
.friends-page { max-width: 1080px; }
.fr-tabs { margin-bottom: 28px; }
.fr-tools { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.fr-tools .disc-searchbox { flex: 1; }
.fr-tools .disc-searchbox input[type=search] { flex: 1; min-width: 0; font-size: 14px; padding: 6px 0; border: 0; background: none; color: var(--ink); width: auto; }
.fr-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px 22px; }
.fr-shops.is-list { display: block; }
.fr-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; }
.fr-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 1; background: var(--wash); overflow: hidden; }
/* (four pictures, two by two) */
.fr-pics img, .fr-pics span { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--wash); min-height: 0; }
.fr-card:hover .fr-pics img { opacity: .92; }
.fr-card.skeleton .fr-pics { background: var(--line); }
.fr-who { display: flex; align-items: center; gap: 10px; }
.fr-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.fr-mono { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--brand-icon, 34px); width: var(--brand-icon, 34px);
  height: var(--brand-icon, 34px); border: 1px solid var(--line); background: var(--wash); font-family: var(--serif); font-size: 17px; color: var(--ink); }
.fr-name { font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.fr-line, .fr-brands { font-size: 13px; color: var(--muted); line-height: 1.4; }
.fr-brands { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fr-row .fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-row .fr-name { font-size: 18px; }
.fr-row .fr-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row:hover { background: var(--wash); }
.fr-chev { color: var(--muted); font-size: 18px; }
.fr-card:focus-visible, .fr-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fr-none { text-align: center; }
@media (max-width: 700px) { .fr-shops { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } .fr-name { font-size: 18px; } }

/* Discover (v5.16): three ways to find brands. Wider than 1,100px, three columns; narrower, a tab bar and one at a time */
.disc3 { max-width: 1320px; }
.disc3-tabs { display: none; }
.disc3-tabs button { background: none; border: 0; padding: 4px 0; border-bottom: 1px solid transparent; cursor: pointer; font: inherit;
  letter-spacing: inherit; text-transform: inherit; color: var(--ink); }
.disc3-tabs button.on { border-bottom-color: var(--ink); }
.disc3-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; align-items: start; }
.disc3-sec { min-width: 0; }
.disc3-lead { color: var(--muted); font-size: 13px; line-height: 1.5; margin: -8px 0 16px; }
@media (max-width: 1100px) {
  .disc3-tabs { display: flex; margin: 0 0 28px; }
  .disc3-cols { display: block; max-width: 760px; margin: 0 auto; }
  .disc3-sec { display: none; } .disc3-sec.on { display: block; }
  .disc3-sec > h2.section { display: none; }   /* (the tab names it) */
}
/* A link that does a step (Next, Back, Find, Add): small capitals over an ink line, no box */
.disc3-link { background: none; border: 0; padding: 0 0 1px; border-bottom: 1px solid var(--ink); color: var(--ink); cursor: pointer;
  font: inherit; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.disc3-link:hover { opacity: .6; }
.disc3-link[disabled] { opacity: .35; cursor: default; }
.disc3-field { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.disc3-field .disc-searchbox, .disc3-field .disc-addbox { flex: 1; }
.disc3-field .disc-searchbox input[type=search], .disc3-field .disc-addbox input { flex: 1; min-width: 0; font-size: 14px; padding: 6px 0;
  border: 0; background: none; color: var(--ink); width: auto; }
@media (max-width: 860px) { .disc3-field .disc-searchbox input[type=search], .disc3-field .disc-addbox input { font-size: 16px; } }
.disc3-rows .disc-row { cursor: default; }
.disc3-recs { margin-bottom: 18px; }
.st-switches { display: flex; flex-wrap: wrap; gap: 0 28px; }
.st-switches .toggle { justify-content: flex-start; gap: 10px; font-size: 14px; }
.st-switches-hint { margin: 8px 0 0; }
.st-made { display: flex; flex-direction: column; gap: 6px; }
.st-made .st-switches { flex-direction: column; }
.st-made .st-switches .toggle { padding: 4px 0; font-size: 13px; }
.st-say { margin: 4px 0 0; color: var(--sale); }   /* (the welcome steps' messages, written under their style) */
.st-grid.welcome-styles { margin-top: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .st-grid.welcome-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.disc3-sec .subsection { margin-top: 28px; }
.disc3-hint { margin: 0 0 12px; }
.disc3-sec .disc-links { columns: 2 150px; }
.disc3-rows .disc-line { white-space: normal; }
.disc-no { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 6px 2px 6px 10px; cursor: pointer; line-height: 1; }
.disc-no:hover { color: var(--ink); }

/* Your style: cards, and building one in place */
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.st-card { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
  border: 1px solid var(--line); background: var(--wash); color: var(--ink); text-decoration: none; overflow: hidden; }
.st-pics { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.st-pics img, .st-pics span { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--wash); min-height: 0; }
.st-veil { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; background: linear-gradient(to top, var(--paper) 42%, transparent); }
.st-name, .st-line, .st-flags { position: relative; }
.st-name { font-family: var(--serif); font-size: 21px; line-height: 1.1; }
.st-line { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.st-flags { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
a.st-card:hover .st-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.st-card:focus-visible, .st-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.st-new { align-items: center; justify-content: center; gap: 8px; text-align: center; border-style: dashed; background: var(--paper);
  cursor: pointer; font: inherit; }
.st-plus { font-family: var(--sans); font-size: 34px; font-weight: 300; line-height: 1; }
.st-new-name { font-size: 14px; }
.st-new-line { font-size: 11.5px; color: var(--muted); line-height: 1.45; max-width: 190px; }
.st-step { grid-column: 1 / -1; border: 1px solid var(--ink); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.st-q { font-family: var(--serif); font-size: 21px; margin: 0; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-who { align-self: flex-start; }   /* who a style is for: Women, Men, Both */
.st-chip { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 7px 12px; cursor: pointer;
  font: inherit; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }   /* (the shop's segmented buttons' type: .seg) */
.st-chip:hover { border-color: var(--ink); }
.st-chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.st-chip.st-more { border-style: dashed; color: var(--muted); }
.st-own { display: inline-flex; align-items: center; gap: 10px; }
.st-own-input { width: 180px !important; font-size: 14px !important; padding: 6px 0 !important; border: 0 !important; border-bottom: 1px solid var(--ink) !important; }
.st-acts { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 0; }
.st-acts .hint { margin: 0; }
.st-acts > span { display: inline-flex; gap: 18px; }
.st-step input#stName { max-width: 260px; }
@media (max-width: 700px) { .st-grid { gap: 10px; } .st-name { font-size: 19px; } }

/* A style's own page */
.st-page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.st-page-head .title { margin: 0; text-align: left; }
.st-page-top { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; margin: 0 0 28px; }
@media (max-width: 700px) { .st-page-top { grid-template-columns: 1fr; } }
.st-card-big .st-name { font-size: 24px; }
.st-prose { font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.st-for { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.st-for strong { color: var(--ink); font-weight: 500; }
.st-for .hint { display: inline; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.st-brands-head { margin-top: 36px; }
.st-more-row { margin: 18px 0 8px; }
.st-addbrand { margin-top: 18px; max-width: 520px; }
.st-page-acts { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 32px; }

/* The shop's filter bar: Shop mode: My brands | Discovery (app.discovery_on), a tap switches it; as Sort by: looks */
.shopbar .mode-pick { background: none; border: 0; padding: 0; font-family: inherit; }
.shopbar .mode-short, .shopbar.tight .mode-long { display: none; }   /* (a narrow bar: "Mode: Discovery") */
.shopbar.tight .mode-short { display: inline; }
.shopbar .mode-pick #modeV { text-decoration: underline; text-underline-offset: 5px; }   /* (the mode in use, always underlined) */
.shopbar .mode-pick, .shopbar .mode-pick:focus-within { outline: none; }   /* (never a box around it) */
.shopbar .mode-pick:focus-visible { box-shadow: 0 2px 0 var(--ink); }   /* (the keyboard's focus: a rule under the whole of it) */
.shopbar.tight .meta { gap: 8px; }   /* (a very narrow bar, as on a phone: Shop mode and Sort by give up their labels too) */
.shopbar.tight .refresh { min-width: 32px; }
.shopbar.wrapped .meta { flex-wrap: wrap; justify-content: flex-start; row-gap: 8px; }   /* (still too wide: a second line, never off the page) */
.shopbar.wrapped .refresh-wrap { margin-left: auto; }
/* Discover's suggestions: ruled rows, as a style's page lists its brands (not boxes) */
.disc3-recs.recs { display: block; }
.disc3-recs .rec.disc-row { border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; }
.filters .filt-perrow { justify-content: space-between; width: 100%; padding: 10px 0; }   /* (More filters' per row, on phones) */
/* A card from a shop abroad: where it ships from, small and muted under the price (quick view says more) */
.card .ships-from { font-size: 11px; color: var(--muted); margin-top: 2px; }
