:root {
  --bg: #f1f2f4;
  --sheet: #ffffff;
  --ink: #0e1014;
  --ink-2: #3d4149;
  --muted: #676c75;
  --line: #e7e8eb;
  --fill: #eceef1;
  --fill-2: #e2e4e8;
  --green: #12a150;
  --green-ink: #0b7a3b;
  --green-soft: #dff5e8;
  --brand: #2669c1;
  --brand-dark: #1d5299;
  --brand-soft: #e9f1fb;
  --blue: #1f5eff;
  --blue-soft: #e5edff;
  --amber-soft: #fff1d6;
  --amber-ink: #8a5a00;
  --r-sheet: 28px;
  --r-card: 20px;
  --r-pill: 999px;
  --dock-h: 84px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

/* ---------- layout ---------- */
.page { max-width: 1240px; margin: 0 auto; }
.sheet {
  background: var(--sheet);
  border-radius: var(--r-sheet);
  padding: 22px 16px;
  margin-bottom: 8px;
}
.sheet > h2, .h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.sub { color: var(--muted); font-size: 15px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.grow { flex: 1; min-width: 0; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  height: 60px; padding: 0 12px 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--fill); flex-shrink: 0; }
.avatar.lg { width: 64px; height: 64px; }
.avatar.xl { width: 88px; height: 88px; }
.brand-name { font-weight: 700; font-size: 16px; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; }
.icon-btn:hover { background: var(--fill); }
.top-nav { display: none; gap: 26px; font-weight: 500; font-size: 15px; }

/* ---------- chips / labels ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 12px; background: var(--fill); font-size: 15px; font-weight: 500; white-space: nowrap; }
.chip.sm { height: 26px; padding: 0 9px; border-radius: 8px; font-size: 13px; }
.chip.green { background: var(--green); color: #fff; }
.chip.green-soft { background: var(--green-soft); color: var(--green-ink); }
.chip.blue-soft { background: var(--blue-soft); color: #1a47c7; }
.chip.amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip.dark { background: rgba(14, 16, 20, 0.72); color: #fff; }
.chip .n { color: var(--muted); font-weight: 500; }
.rating { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--green-soft); color: var(--green-ink); font-size: 14px; font-weight: 600; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; min-height: 56px; padding: 8px 20px; border: 0; border-radius: 18px; font-weight: 600; font-size: 17px; line-height: 1.15; text-align: center; }
.btn small { font-weight: 400; font-size: 13px; opacity: 0.85; }
.btn.grey { background: var(--fill); }
.btn.grey:hover { background: var(--fill-2); }
.btn.black { background: var(--ink); color: #fff; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.square { width: 60px; padding: 0; flex-shrink: 0; }
.pill-btn { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 0; background: #fff; box-shadow: 0 6px 20px rgba(14,16,20,.12); font-weight: 500; font-size: 15px; white-space: nowrap; }
.q-chip { height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--fill-2); background: #fff; font-size: 15px; white-space: nowrap; }
.q-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- gallery ---------- */
.gal-wrap { position: relative; }
.gal { display: flex; align-items: flex-start; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scroll-padding: 0 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.gal::-webkit-scrollbar { display: none; }
.gal > * { flex: 0 0 calc(100% - 30px); scroll-snap-align: start; }
.gal img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; background: var(--fill); }
.gal-count { position: absolute; right: 30px; bottom: 12px; height: 28px; padding: 0 10px; border-radius: 10px; background: rgba(14,16,20,.64); color: #fff; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; }
.gal-cats { position: absolute; left: 28px; bottom: 12px; display: flex; gap: 6px; }
.gal-cats .chip { height: 30px; font-size: 13px; background: rgba(255,255,255,.92); }
.gal-cats .chip.on { background: var(--ink); color: #fff; }
.thumbs { display: none; }

/* ---------- key-value ---------- */
.kv { display: grid; grid-template-columns: 24px 1fr; gap: 2px 12px; align-items: start; padding: 10px 0; }
.kv svg { margin-top: 2px; color: var(--ink-2); }
.kv .k { font-size: 13px; color: var(--muted); line-height: 1.2; }
.kv .v { font-size: 16px; font-weight: 500; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.spec-line { color: var(--ink-2); font-size: 16px; }
.spec-line .dot { color: #b5b9c0; margin: 0 6px; }
.line-item { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.line-item:last-child { border-bottom: 0; }
.line-item .k { color: var(--ink-2); }
.line-item .v { font-weight: 600; white-space: nowrap; }

/* ---------- cards ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.tile { display: flex; flex-direction: column; gap: 2px; }
.tile .ph { position: relative; margin-bottom: 8px; }
.tile .ph img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; background: var(--fill); }
.tile .fav { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; padding: 0; }
.tile .lbl { position: absolute; left: 8px; bottom: 8px; }
.tile .lbl:not(.green):not(.blue-soft):not(.amber) { background: #fff; }
.tile .lbl.blue-soft, .tile .lbl.amber { box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tile .p { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.tile .t { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .m { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding-inline: 16px; scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: 0 0 auto; scroll-snap-align: start; }

/* ---------- misc ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 14px; padding: 3px; }
.seg button { height: 38px; border: 0; border-radius: 11px; background: none; font-weight: 500; font-size: 15px; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(14,16,20,.12); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select, .ask textarea { height: 52px; border: 0; border-radius: 14px; background: var(--fill); padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); }
.ask { position: relative; }
.ask textarea { width: 100%; height: 96px; padding: 14px 52px 14px 16px; resize: none; }
.ask .send { position: absolute; right: 8px; bottom: 8px; }
.stars { color: #f5a100; letter-spacing: 1px; font-size: 15px; }
.review { background: var(--fill); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.review .who { display: flex; align-items: center; gap: 10px; }
.review .ini { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.review p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.opt { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; background: var(--fill); font-size: 16px; font-weight: 500; white-space: nowrap; }
.opt .n { color: var(--muted); }
.bar { height: 8px; border-radius: 8px; background: var(--fill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 8px; }
.fine { font-size: 12px; color: var(--muted); line-height: 1.5; }
.link-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 17px; font-weight: 500; }
details.acc { border-top: 1px solid var(--line); }
details.acc summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 500; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc[open] summary svg { transform: rotate(180deg); }
details.acc .body { padding: 0 0 16px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; box-shadow: 0 -1px 0 var(--line); padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); }
.dock .who { text-align: center; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.dock .row { gap: 8px; }
.dock .btn { flex: 1; }
.dock .btn.square { flex: 0 0 60px; }
.dock > .row, .dock > .who { max-width: 1240px; margin-left: auto; margin-right: auto; }
.spacer { height: calc(var(--dock-h) + 30px); }

/* ---------- filter float (SRP) ---------- */
.float-filters { scroll-padding-inline: 16px; position: fixed; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.float-filters::-webkit-scrollbar { display: none; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  body { font-size: 16px; }
  .top { height: 68px; padding: 0 32px; }
  .top-nav { display: flex; }
  .sheet { padding: 28px 32px; margin-bottom: 12px; }
  .gal { padding: 0; scroll-padding: 0; }
  .gal > * { flex-basis: 100%; }
  .gal-count { right: 16px; }
  .gal-cats { left: 16px; }
  .thumbs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 10px; }
  .thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; opacity: .8; }
  .thumbs img.on { opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px; }
  .grid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
  .spacer { height: 40px; }
}
