/* Rayiha. Tokens follow DESIGN.md: sage canvas, house green, gold only for scores. */
@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-ext.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-italic-ext.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light dark;
  --bg: #eef0ea;
  --surface: #ffffff;
  --sunken: #e3e7de;
  --ink: #15211d;
  --body: #3a4742;
  --muted: #5a6862;
  --line: #d3d9ce;
  --house: #1e3932;
  --on-house: #f1f5ef;
  --accent: #00704a;
  --btn: #00704a;
  --on-btn: #ffffff;
  --score-bg: #1e3932;
  --gold: #ecd08a;
  --gold-ink: #7a5a12;
  --danger: #a3341f;
  --shadow: 0 1px 2px rgba(30, 57, 50, .06), 0 8px 24px -12px rgba(30, 57, 50, .18);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-card: 14px;
  --pad: 20px;
  --tabs: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1613;
    --surface: #16211d;
    --sunken: #1c2925;
    --ink: #e9eee9;
    --body: #c5cfc9;
    --muted: #9aaba2;
    --line: #2a3933;
    --house: #1a2f29;
    --on-house: #e9eee9;
    --accent: #6fd1a5;
    --btn: #8fdcb8;
    --on-btn: #0b1a14;
    --score-bg: #24382f;
    --gold: #e2c078;
    --gold-ink: #e2c078;
    --danger: #f08c75;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding: 150px 0 calc(var(--tabs) + var(--safe-b) + 84px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
.ic { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#view:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--house); color: var(--on-house); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
.noscript { padding: 40px var(--pad); text-align: center; }

/* ------------------------------------------------------------ shell */
.top { max-width: 1120px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--pad) 0; }
.wordmark { font: italic 600 26px/1.2 var(--serif); color: var(--house); letter-spacing: -.01em; display: inline-block; padding-bottom: 2px; }
@media (prefers-color-scheme: dark) { .wordmark { color: var(--ink); } }
body[data-route="detail"] .wordmark { display: none; }
body[data-route="detail"] .top { padding-top: env(safe-area-inset-top, 0px); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11.5px; font-weight: 500; color: var(--muted);
  transition: color .15s ease;
}
.tabs a[aria-current] { color: var(--accent); font-weight: 600; }
.tabs a:active { transform: scale(.96); }
.tabs span { display: block; }
.badge {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--btn); color: var(--on-btn); font: 600 11px/18px var(--sans); text-align: center; font-variant-numeric: tabular-nums;
}

main { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad) calc(var(--tabs) + var(--safe-b) + 40px); min-height: 80dvh; }
main.enter { animation: enter .26s cubic-bezier(.2, .7, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs) + var(--safe-b) + 14px); z-index: 40;
  transform: translate(-50%, 12px); opacity: 0; visibility: hidden; pointer-events: none;
  background: var(--house); color: var(--on-house); border: 1px solid transparent;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow); transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
}
@media (prefers-color-scheme: dark) { .toast { border-color: var(--line); } }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto; transition-delay: 0s; }
.toast button { margin-left: 10px; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }

/* ------------------------------------------------------------ type + atoms */
h1 { font: 500 clamp(34px, 9vw, 52px)/1.12 var(--serif); letter-spacing: -.02em; color: var(--ink); padding-bottom: 4px; text-wrap: balance; }
h1 em { font-style: italic; color: var(--accent); }
h2, .h2 { font: 500 22px/1.25 var(--serif); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 16.5px; line-height: 1.55; color: var(--body); max-width: 46ch; margin-top: 14px; text-wrap: pretty; }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; max-width: 60ch; }
.brand { display: block; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pname { display: block; font: 500 17px/1.25 var(--serif); color: var(--ink); letter-spacing: -.005em; }
.price { font-size: 13.5px; font-weight: 500; color: var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; margin: 0 7px; vertical-align: middle; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--btn); color: var(--on-btn); }
.btn.ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn.onband { background: var(--on-house); color: #1e3932; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn.wide { width: 100%; }
.btn.saved { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
.iconbtn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.iconbtn:active { transform: scale(.94); }
@media (hover: hover) {
  .btn.ghost:hover, .btn.small:hover { border-color: var(--accent); }
  .btn.primary:hover { filter: brightness(1.08); }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current]:hover { color: var(--accent); }
  .more:hover { text-decoration: underline; text-underline-offset: 4px; }
  .heart:hover { color: var(--accent); }
  .iconbtn:hover { background: var(--sunken); }
  .card-link:hover .pname, .row-link:hover .pname, .ranked a:hover .pname { color: var(--accent); }
  .chip:hover { border-color: var(--accent); }
  .fam:hover { border-color: var(--accent); }
}

.score {
  display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 9px; border-radius: 999px;
  background: var(--score-bg); color: var(--gold); font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.score b { font-weight: 600; }
.score.none { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 11.5px; }

.ribbon { display: flex; height: 64px; border-radius: 10px; overflow: hidden; gap: 2px; background: var(--surface); }
.ribbon i { display: block; min-width: 3px; }
.ribbon-empty { background: repeating-linear-gradient(135deg, var(--sunken) 0 8px, transparent 8px 16px); border: 1px solid var(--line); }
.ribbon-v { flex: none; flex-direction: column; width: 8px; height: auto; align-self: stretch; border-radius: 4px; gap: 1px; }
.ribbon-v i { min-height: 2px; min-width: 0; }
.ribbon-lg { height: 96px; border-radius: var(--r-card); margin-bottom: 22px; }

.heart { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--muted); transition: color .15s ease, transform .15s ease; }
.heart.on { color: var(--accent); }
.heart:active { transform: scale(.86); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 28px 0 0; padding: 14px 16px; border-radius: var(--r-card);
  background: var(--sunken); font-size: 13.5px; line-height: 1.5; color: var(--body);
}
.note .ic { margin-top: 1px; color: var(--accent); }

/* ------------------------------------------------------------ home */
.hero { padding: 34px 0 6px; }
.searchbox {
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 18px; margin-top: 26px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 16px; color: var(--ink); }
.searchbox input::placeholder { color: var(--muted); opacity: 1; }
.searchbox input::-webkit-search-cancel-button { filter: grayscale(1); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.block { margin-top: 44px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.block-head p { font-size: 14px; color: var(--muted); margin-top: 3px; }
.more { flex: none; display: inline-flex; align-items: center; gap: 3px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--accent); }

.rail {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 10px;
  scroll-snap-type: x proximity; scroll-padding-left: var(--pad); scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.card {
  position: relative; flex: none; width: 172px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  transition: transform .15s ease;
}
.card:active { transform: scale(.985); }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 10px 12px 12px; }
.card .ribbon { margin-bottom: 12px; }
.card .pname { margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.card .heart { position: absolute; top: 20px; right: 16px; width: 44px; height: 44px; }
.card .heart::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); z-index: -1; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.card .heart { z-index: 0; color: var(--ink); }
.card .heart.on { color: var(--accent); }

.fams { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fam {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 76px; justify-content: center;
  padding: 12px 14px 12px 26px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.fam:active { transform: scale(.98); }
.fam i { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.fam span { font: 500 16px/1.25 var(--serif); color: var(--ink); }
.fam small { font-size: 12.5px; color: var(--muted); }
.fam:last-child:nth-child(odd) { grid-column: 1 / -1; }

.ranked { border-top: 1px solid var(--line); }
.ranked a { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank { flex: none; width: 30px; font: italic 500 28px/1 var(--serif); color: var(--accent); text-align: center; }
.stat { flex: none; font-size: 13.5px; font-weight: 500; color: var(--body); font-variant-numeric: tabular-nums; }
.row-main { flex: 1; min-width: 0; display: block; }

.band { margin-top: 48px; padding: 28px 22px; border-radius: var(--r-card); background: var(--house); color: var(--on-house); }
.band h2 { color: var(--on-house); font-size: 26px; }
.band p { margin: 10px 0 20px; font-size: 15px; line-height: 1.55; opacity: .88; max-width: 52ch; }
@media (prefers-color-scheme: dark) { .band { border: 1px solid var(--line); } }

.foot { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.foot p + p { margin-top: 8px; }

/* ------------------------------------------------------------ rows */
.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; border-bottom: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 84px; }
.row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 0; min-height: 76px; }
.row-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row .heart { margin-right: -10px; }
.fit { color: var(--accent); font-weight: 600; }
.code { font-weight: 600; color: var(--ink); letter-spacing: .02em; }

/* ------------------------------------------------------------ search */
.searchbar {
  position: sticky; top: 0; z-index: 10;
  margin: 0 calc(var(--pad) * -1); padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--pad) 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.searchbar .searchbox { margin-top: 0; height: 50px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.toolbar [data-filter-count]:not(:empty) {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--btn); color: var(--on-btn);
  font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums;
}
.sorter { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding-left: 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; min-width: 0; }
.sorter select { appearance: none; -webkit-appearance: none; border: 0; background-color: var(--surface); color: var(--ink); border-radius: 999px; height: 38px; padding: 0 16px 0 0; max-width: 46vw; text-overflow: ellipsis; font-weight: 600; cursor: pointer; }
.sorter select:focus-visible { outline: none; }
.sorter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.sorter option { background: var(--surface); color: var(--ink); }
.quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
.quick::-webkit-scrollbar { display: none; }
.quick:not(:empty) { padding-top: 10px; }
.count { font-size: 13px; color: var(--muted); margin: 16px 0 10px; min-height: 20px; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--house); border-color: var(--house); color: var(--on-house); }
@media (prefers-color-scheme: dark) { .chip.on { background: var(--btn); border-color: var(--btn); color: var(--on-btn); } }
.chip.big { min-height: 46px; padding: 0 18px; font-size: 15px; }
.chip.removable { min-height: 36px; padding: 0 12px; font-size: 13px; }

.sheet {
  width: 100%; max-width: 560px; max-height: 88dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 22px 22px 0 0; background: var(--bg); color: var(--body);
  overscroll-behavior: contain;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(9, 18, 15, .5); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px var(--pad); }
.sheet-body { overflow-y: auto; padding: 0 var(--pad) 18px; overscroll-behavior: contain; }
.sheet fieldset { margin-top: 20px; }
.sheet legend, .quiz legend { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.sheet footer { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px var(--pad) calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
@media (min-width: 720px) { .sheet { margin: auto; border-radius: 22px; } }

.empty { padding: 56px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty p { max-width: 36ch; color: var(--muted); }
.empty .btn { margin-top: 8px; }
.hint { color: var(--muted); font-size: 14.5px; padding: 18px 0; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ detail */
.detail { max-width: 720px; margin: 0 auto; }
.detail-top { display: flex; justify-content: space-between; margin: 8px -10px 8px; }
.detail h1 { font-size: clamp(32px, 8.4vw, 46px); margin-top: 6px; overflow-wrap: anywhere; }
.detail > .brand { font-size: 12.5px; color: var(--accent); }
.detail-meta { font-size: 14px; color: var(--muted); margin-top: 10px; }

.shop { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.shop-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.shop-head div { flex: none; }
.shop-head small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.shop-head b { display: block; font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--ink); letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-head p { font-size: 13px; line-height: 1.45; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); overflow-wrap: anywhere; min-width: 0; }
.prices { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); }
.pricecell { padding: 14px 8px; text-align: center; }
.pricecell + .pricecell { border-left: 1px solid var(--line); }
.pricecell small { display: block; font-size: 12px; color: var(--muted); }
.pricecell b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin: 2px 0; white-space: nowrap; }
.pricecell span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.scores { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.bigscore { flex: none; display: grid; place-items: center; align-content: center; width: 124px; height: 124px; border-radius: 50%; background: var(--score-bg); color: var(--gold); }
.bigscore b { font: 500 52px/1 var(--serif); font-variant-numeric: lining-nums; }
.bigscore span { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin-top: 4px; }
.sources { flex: 1; min-width: 0; }
.sources div { padding: 8px 0; }
.sources div + div { border-top: 1px solid var(--line); }
.sources dt { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.sources dd { font-size: 14px; color: var(--body); font-variant-numeric: tabular-nums; }
.sources dd b { font-size: 19px; font-weight: 600; color: var(--ink); }
.sources dd small { display: inline-block; margin-left: 6px; font-size: 12.5px; color: var(--muted); }

.sect { margin-top: 40px; }
.sect > h2 { margin-bottom: 16px; }
.whys li { display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.whys li:last-child { border-bottom: 1px solid var(--line); }
.whys .ic { color: var(--accent); margin-top: 2px; }
.whys b { display: block; font-weight: 600; color: var(--ink); font-size: 15px; }
.whys span { display: block; font-size: 14px; line-height: 1.45; color: var(--body); margin-top: 1px; }

.meters { display: grid; gap: 20px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; color: var(--ink); font-weight: 500; }
.meter-top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--sunken); margin: 8px 0 6px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.meter small { font-size: 13px; color: var(--muted); }

.accords { display: grid; gap: 9px; }
.accords li { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 12px; font-size: 14px; color: var(--ink); }
.accords div { height: 12px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.accords i { display: block; height: 100%; border-radius: 6px; min-width: 8px; }

.notes div { padding: 14px 0; border-top: 1px solid var(--line); }
.notes div:last-child { border-bottom: 1px solid var(--line); }
.notes dt { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.notes dd { display: flex; flex-wrap: wrap; gap: 8px; }
.notes a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink); }
@media (hover: hover) { .notes a:hover { border-color: var(--accent); } }

.when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.when div { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.when b { font-weight: 600; font-size: 15px; color: var(--ink); }

.links { display: flex; flex-wrap: wrap; gap: 10px; }
.nodata p { margin-top: 10px; max-width: 52ch; }
.nodata { padding: 22px; border-radius: var(--r-card); background: var(--sunken); margin-top: 28px; }

.cta { position: sticky; bottom: calc(var(--tabs) + var(--safe-b) + 12px); z-index: 5; margin-top: 36px; }
.cta .btn { box-shadow: var(--shadow); }

/* ------------------------------------------------------------ recommend + list */
.page-head { padding: 28px 0 4px; }
.quiz { display: grid; gap: 26px; margin-top: 28px; }
.quiz legend small { font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.quiz legend { font-size: 15px; color: var(--ink); letter-spacing: 0; }

.sizes { display: flex; gap: 8px; margin: 22px 0 16px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; font-size: 15px; color: var(--body); }
.total b { font: 500 28px/1.1 var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.list-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.listrows .heart:hover { color: var(--danger); }

.skeleton { display: grid; gap: 14px; padding-top: 40px; }
.skeleton i { display: block; height: 22px; border-radius: 8px; background: var(--sunken); animation: pulse 1.2s ease-in-out infinite alternate; }
.skeleton i:first-child { height: 96px; width: 80%; }
.skeleton i:nth-child(2) { width: 60%; }
.skeleton i:nth-child(3) { height: 54px; border-radius: 999px; }
.skeleton i:nth-child(4) { height: 220px; }
@keyframes pulse { to { opacity: .45; } }

/* ------------------------------------------------------------ wider screens */
@media (min-width: 900px) {
  :root { --pad: 32px; --tabs: 0px; }
  .top { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; }
  body[data-route="detail"] .wordmark { display: inline-block; }
  body[data-route="detail"] .top { padding-top: 22px; }
  .tabs { position: static; display: flex; gap: 6px; height: auto; padding: 0; background: none; border: 0; }
  .tabs a { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; }
  .tabs a[aria-current] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .tabs svg { width: 18px; height: 18px; }
  .badge { position: static; }
  main { padding-bottom: 80px; }
  .toast { bottom: 28px; }
  .hero { padding-top: 64px; max-width: 760px; }
  .hero .searchbox { max-width: 560px; }
  .note { max-width: 760px; }
  .rail { margin: 0; padding-left: 0; padding-right: 0; scroll-padding-left: 0; scrollbar-width: thin; }
  .card { width: 196px; }
  .fams { grid-template-columns: repeat(4, 1fr); }
  .fam:last-child:nth-child(odd) { grid-column: auto; }
  .ranked, main > .rows, .block > .rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .searchbar { margin: 0; padding-left: 0; padding-right: 0; top: 0; }
  .quick { margin: 0; padding-left: 0; padding-right: 0; }
  .sorter select { max-width: none; }
  .quiz, .page-head, .sizes, .total, .list-actions { max-width: 760px; }
  .cta { bottom: 24px; }
  .band { padding: 40px; }
}

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