/* Yarn Assistant · design tokens and components from the Tier 1 design:
   plum shell, soft lilac ground, six-colour stripe = score breakdown,
   yoke chart band on headers, Rubik with tabular numbers. */

:root {
  --plum: #3B1F4A;
  --plum-ink: #24132E;
  --ground: #F7F4F9;
  --lilac: #EDE4F2;
  --lilac-2: #E2D5EA;
  --line: #E4DAEA;
  --border: #C9B6D6;
  --muted: #5B4A66;
  --on-plum-muted: #D9C8E3;
  --card: #FFFFFF;
  --focus: #B9708F;
  --gold: #D9BF73;

  --gauge: #5E9C9A;
  --fibre: #E39B6B;
  --drape: #D9BF73;
  --look: #B9708F;
  --wash: #6F86B8;
  --price: #7FA27A;

  --ok-bg: #E3EFE5;
  --ok: #2F6B3F;
  --warn-bg: #FBEFD0;
  --warn: #7A5A00;
  --bad-bg: #F6E0E3;
  --bad: #9B2C3A;
  --info: #3D5A8C;

  --shadow: 0 1px 2px rgba(36, 19, 46, 0.06), 0 8px 20px rgba(36, 19, 46, 0.05);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--plum-ink);
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--gold); color: var(--plum-ink); }
a { color: var(--plum); }
a:hover { color: var(--plum-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 18px; font-weight: 700; }
input[type=checkbox], input[type=radio] { accent-color: var(--plum); width: 20px; height: 20px; }
input[type=range] { accent-color: var(--plum); width: 100%; }

/* ---------- Shell ---------- */
.yoke-s, .yoke-l {
  background-color: var(--plum);
  background-image: url(/static/yoke.svg);
  background-repeat: repeat-x;
  background-position: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.yoke-s { height: 62px; background-size: auto 54px; }
.yoke-l { height: 76px; background-size: auto 64px; }

.mhead { background: var(--plum); color: #fff; padding: 10px 12px 0; }
.mhead-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; }
.mhead-row h1, .mhead-row .title { margin: 0; font-size: 18px; font-weight: 700; text-align: center; flex: 1; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: transparent; border: 0; border-radius: 10px; text-decoration: none; flex: none; }
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.mhead-sub { padding: 0 4px 16px; color: var(--lilac); display: flex; flex-direction: column; gap: 2px; }
.mhead .yoke-s { margin: 0 -12px; }

.topbar { background: var(--plum); color: #fff; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; margin-right: 12px; }
.logo:hover { color: #fff; }
.logo-mark { display: flex; width: 28px; height: 28px; border-radius: 7px; overflow: hidden; }
.logo-mark span { flex: 1; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; color: #fff; text-decoration: none; font-size: 15px; }
.topnav a[aria-current=page] { font-weight: 600; background: rgba(255, 255, 255, 0.14); }
.topnav a:hover { background: rgba(255, 255, 255, 0.1); }
.where-btn { margin-left: auto; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.where-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.account { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.account a, .account button { color: #fff; background: transparent; border: 0; min-height: 40px; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }

.tabbar { position: sticky; bottom: 0; z-index: 5; margin-top: auto; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 4px 8px calc(8px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 12px; }
.tabbar a[aria-current=page] { color: var(--plum); font-weight: 600; }

main.page { width: 100%; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.d-only { display: none !important; }

@media (min-width: 900px) {
  .m-only { display: none !important; }
  .d-only { display: revert !important; }
  .d-flex.d-only { display: flex !important; }
  main.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; gap: 24px; }
  .page-head h1 { font-size: 32px; font-weight: 800; }
}

/* ---------- Building blocks ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; align-items: start; }
.cols { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .cols.aside-l { grid-template-columns: 320px minmax(0, 1fr); }
  .cols.wide-r { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-ink); color: #fff; }
.btn-secondary { background: #fff; color: var(--plum-ink); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--plum); }
.btn-danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; }

.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--plum-ink); border: 1px solid var(--border); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; cursor: pointer; user-select: none; }
.chip[aria-pressed=true], .chip.on, input:checked + .chip { background: var(--plum); color: #fff; border-color: var(--plum); }
.chip .tick { display: none; }
.chip[aria-pressed=true] .tick, .chip.on .tick, input:checked + .chip .tick { display: inline; }
.chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-input:focus-visible + .chip { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.tag { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.warn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--plum-ink); font-size: 13px; }
.stash-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--lilac); color: var(--plum); font-size: 13px; font-weight: 600; }
.featured { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--muted); color: var(--muted); font-size: 12px; font-weight: 600; }
.best { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-size: 12px; font-weight: 600; }

.risk { position: relative; }
.risk > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.risk > summary::-webkit-details-marker { display: none; }
.risk-low > summary, .risk-badge.risk-low { background: var(--ok-bg); color: var(--ok); }
.risk-medium > summary, .risk-badge.risk-medium { background: var(--warn-bg); color: var(--warn); }
.risk-high > summary, .risk-badge.risk-high { background: var(--bad-bg); color: var(--bad); }
.risk-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.risk-pop { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 14px; max-width: 34rem; }

.stock { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.stock-in-stock { color: var(--ok); }
.stock-possibly-outdated { color: var(--warn); }
.stock-pre-order { color: var(--info); }
.stock-discontinued { color: var(--bad); }
.stock .when { color: var(--muted); font-weight: 400; }

.conf { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.conf-high { color: var(--ok); }
.conf-medium, .conf-low { color: var(--warn); }
.conf-none { color: var(--muted); }

.thumb { flex: none; border-radius: 12px; background: var(--lilac); overflow: hidden; display: grid; place-items: center; }
.thumb.orig { background: #EEE9F1; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 14px; font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-size: 16px; color: var(--plum-ink); }
.textarea { padding: 12px 14px; min-height: 88px; resize: vertical; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B4A66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-wrap { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.input-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; outline: none; }
.input-wrap:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.unit { color: var(--muted); font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.error { padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--lilac); color: var(--plum-ink); }
.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fieldset legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; padding: 4px; border-radius: 12px; background: var(--lilac); gap: 4px; }
.seg label, .seg button, .seg a { min-height: 40px; border-radius: 9px; border: 0; font-size: 15px; font-weight: 600; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; padding: 0 10px; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg input:checked + span, .seg .on { color: var(--plum-ink); }
.seg label:has(input:checked), .seg .on { background: #fff; color: var(--plum-ink); box-shadow: 0 1px 3px rgba(36, 19, 46, 0.12); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg label:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.rate { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rate label { min-height: 44px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; font-weight: 600; cursor: pointer; position: relative; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate label:has(input:checked) { background: var(--plum); color: #fff; border-color: var(--plum); }
.rate label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.size-tile { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 10px 4px; border-radius: 10px; background: #fff; border: 1px solid var(--border); cursor: pointer; position: relative; }
.size-tile input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.size-tile .sz { font-size: 13px; font-weight: 600; }
.size-tile input[type=number] { width: 100%; border: 0; background: transparent; text-align: center; font-size: 15px; font-weight: 700; padding: 0; color: inherit; -moz-appearance: textfield; }
.size-tile:has(input[type=radio]:checked) { background: var(--plum); color: #fff; border-color: var(--plum); }
.size-tile:has(input[type=radio]:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.size-btns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.size-btns a { min-height: 44px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; text-decoration: none; color: var(--plum-ink); font-weight: 600; background: #fff; }
.size-btns a[aria-current=true] { background: var(--plum); color: #fff; border-color: var(--plum); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 28px; border-radius: 999px; background: var(--border); position: relative; flex: none; transition: background 0.15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--plum); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }

.slider { display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.slider label { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Score ---------- */
.stripe { display: flex; height: 10px; background: var(--lilac); }
.stripe.lg { height: 14px; border-radius: 4px; overflow: hidden; }
.stripe span { height: 100%; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.f-gauge { background: var(--gauge); } .f-fibre { background: var(--fibre); } .f-drape { background: var(--drape); }
.f-look { background: var(--look); } .f-wash { background: var(--wash); } .f-price { background: var(--price); }
.score { text-align: right; flex: none; }
.score .n { font-size: 34px; font-weight: 800; color: var(--plum); line-height: 1; }
.score.xl .n { font-size: 44px; }
.score .l { font-size: 12px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.bar-row .name { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--lilac); overflow: hidden; }
.bar span { display: block; height: 100%; }
.bar-row .v { font-size: 14px; font-weight: 700; text-align: right; }

/* ---------- Match card ---------- */
.match { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.match-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.match h3 { font-size: 18px; font-weight: 700; }
.match h3 a { color: var(--plum-ink); text-decoration: none; }
.match h3 a::after { content: ''; position: absolute; inset: 0; }
.match h3 a:hover { text-decoration: underline; }
.match .top { display: flex; gap: 12px; position: relative; }
.match .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.match .facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.match .big { font-size: 18px; font-weight: 700; }
.match.pinned { outline: 2px solid var(--plum); }
.matches { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; } }

/* ---------- Lists, tables ---------- */
.list-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--plum-ink); text-decoration: none; }
.list-row:first-of-type { border-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { display: block; font-weight: 600; }
.list-row .s { display: block; font-size: 13px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv:first-of-type { border-top: 0; }
.kv > :first-child { color: var(--muted); }
.cmp-head, .cmp-row { display: grid; grid-template-columns: 96px repeat(2, minmax(0, 1fr)); gap: 10px; }
.cmp-head { align-items: end; }
.cmp-row { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cmp-row > :first-child { color: var(--muted); }
.cmp-row > :last-child { font-weight: 600; }
.cmp-row .note { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ev-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ev-row .t { font-size: 14px; font-weight: 600; }
.ev-row .s { font-size: 13px; color: var(--muted); }
.ev-row .v { font-size: 14px; font-weight: 700; }
.ev-row .v.ok { color: var(--ok); } .ev-row .v.warn { color: var(--warn); } .ev-row .v.dim { color: var(--muted); }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.sum-row.total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--lilac); border-radius: 12px; padding: 12px; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 13px; color: var(--muted); }

.offer h3 { font-size: 18px; font-weight: 700; }
.offer .total { font-size: 24px; font-weight: 800; text-align: right; }

.colours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .colours { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.colour { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.colour .chipc { height: 48px; border-radius: 8px; }
.colour .n { font-size: 13px; font-weight: 600; padding: 0 4px 2px; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { background: #fff; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.swatch .ph { height: 96px; background: repeating-linear-gradient(90deg, var(--lilac) 0 6px, var(--lilac-2) 6px 12px); }
.swatch img { width: 100%; height: 96px; object-fit: cover; display: block; }
.swatch .b { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }

.dots { display: flex; gap: 3px; }
.dots span { width: 18px; height: 8px; border-radius: 2px; background: var(--lilac); }
.dots span.on { background: var(--plum); }
.rv-row { display: grid; grid-template-columns: 130px auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
blockquote { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ground); font-size: 15px; }
blockquote .by { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.banner-bad { background: var(--bad-bg); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.banner-bad .h { display: flex; gap: 8px; align-items: center; color: var(--bad); font-weight: 700; }
.banner-link { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: #fff; text-decoration: none; color: var(--plum-ink); }

.hero { background: var(--lilac); }
.hero-inner { max-width: 820px; margin: 0 auto; padding: 24px 16px; }
@media (min-width: 900px) { .hero-inner { padding: 72px 24px 64px; } }
.hero label.q { font-size: 24px; font-weight: 800; line-height: 1.2; }
@media (min-width: 900px) { .hero label.q { font-size: 28px; } }
.searchbox { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 8px 0 16px; border-radius: 16px; background: #fff; border: 2px solid var(--plum); box-shadow: 0 8px 24px rgba(59, 31, 74, 0.10); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; outline: none; }
@media (min-width: 900px) { .searchbox { min-height: 68px; } .searchbox input { font-size: 20px; } }
.searchbox:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--border); color: var(--plum-ink); text-decoration: none; }
.tile-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--lilac); display: grid; place-items: center; color: var(--plum); flex: none; }

.summary-band { background: var(--lilac); }
.summary-inner { max-width: 1240px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

.ruler { border-radius: 12px; background: repeating-linear-gradient(90deg, var(--lilac) 0 10px, var(--lilac-2) 10px 20px); height: 72px; display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--plum); }
.photo-btn { display: flex; gap: 12px; align-items: center; min-height: 64px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--border); background: #fff; cursor: pointer; }
.photo-btn input { max-width: 100%; }

.empty { padding: 24px; text-align: center; color: var(--muted); }
.footer { padding: 24px 16px 96px; text-align: center; font-size: 13px; color: var(--muted); }
@media (min-width: 900px) { .footer { padding-bottom: 32px; } }
details.weights > summary { list-style: none; }
details.weights > summary::-webkit-details-marker { display: none; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.scroll-x { overflow-x: auto; }

/* ---------- Filters ---------- */
.js .js-hide { display: none; }
.filters .near { display: block; position: relative; }
.near-switch { display: none; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.near input:checked ~ .near-switch .track { background: var(--plum); }
.near input:checked ~ .near-switch .track::after { transform: translateX(18px); }
.near input:focus-visible ~ .near-switch .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.near-switch .track { width: 46px; height: 28px; border-radius: 999px; background: var(--border); position: relative; flex: none; }
.near-switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
@media (max-width: 899px) {
  .filters { gap: 10px; }
  .filters .filter-card { background: transparent; box-shadow: none; padding: 0; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .filters .filter-card .fieldset { display: contents; }
  .filters .filter-card .chips { display: contents; }
  .filters details.weights:not([open]) { background: transparent; box-shadow: none; padding: 0; }
}
@media (min-width: 900px) {
  .near-switch { display: flex; }
  details.weights > summary { display: none; }
  .filters { position: sticky; top: 16px; }
}
