:root {
  color-scheme: light;
  --paper: #f6f2eb;
  --surface: rgba(255, 255, 255, .86);
  --surface-strong: #ffffff;
  --ink: #22181c;
  --muted: #6f6264;
  --accent: #4b1626;
  --gold: #ba862d;
  --sage: #4f6d5a;
  --blue: #355a73;
  --line: rgba(45, 23, 28, .12);
  --shadow: 0 22px 54px rgba(27, 10, 18, .14);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    linear-gradient(120deg, rgba(75, 22, 38, .08), transparent 32%),
    linear-gradient(300deg, rgba(79, 109, 90, .13), transparent 38%),
    var(--paper);
}
body.modal-open { overflow: hidden; }

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.av-shell {
  width: min(100% - 24px, 1480px);
  margin-inline: auto;
}

.av-topbar {
  min-height: 64px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto minmax(250px, 1fr) auto auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(45, 23, 28, .1);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(27, 10, 18, .1);
  backdrop-filter: blur(14px);
}
.brand { color: var(--accent); text-decoration: none; font-family: Georgia, serif; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.nav-link { display: inline-grid; place-items: center; }
.summary-strip { display:grid; grid-template-columns:repeat(4,minmax(84px,1fr)); margin:0 0 0 4px; align-self:stretch; border-left:1px solid var(--line); }
.summary-strip div { display:grid; align-content:center; padding:4px 12px; border-right:1px solid var(--line); }
.summary-strip dt { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.09em; font-weight:800; }
.summary-strip dd { margin:2px 0 0; font-family:Georgia,serif; font-size:20px; color:var(--accent); }

.back-link,
.primary-action,
.secondary-action,
.icon-close {
  border: 1px solid rgba(75, 22, 38, .14);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.back-link { padding: 9px 12px; }
.primary-action {
  min-height: 42px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px rgba(75, 22, 38, .22);
}
.secondary-action {
  min-height: 42px;
  padding: 10px 14px;
  background: #fff;
}
.primary-action:hover,
.secondary-action:hover,
.back-link:hover { transform: translateY(-1px); }

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 950;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  color: var(--accent);
  font-size: clamp(30px, 5vw, 58px);
  line-height: .9;
  letter-spacing: 0;
}
h2 { margin-bottom: 8px; font-size: 24px; line-height: 1.05; letter-spacing: 0; }
h3 { margin-bottom: 4px; font-size: 18px; line-height: 1.08; letter-spacing: 0; }

.search-field span {
  display: none;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 950;
  margin: 0 0 5px;
}
.search-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  outline: none;
  padding: 10px 15px;
}
.search-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(186, 134, 45, .14);
}

.av-layout {
  height: calc(100vh - 84px);
  min-height: 520px;
  margin-top: 8px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 29vw);
  gap: 12px;
}
.av-layout.detail-closed {
  grid-template-columns: minmax(0, 1fr);
}
.av-layout.detail-closed .detail-panel {
  display: none;
}
.av-layout.detail-open .wine-grid {
  grid-template-columns: 62px minmax(150px, .72fr) 46px minmax(180px, 1fr) 76px;
}
.av-layout.detail-open .wine-grid-head span:nth-child(3),
.av-layout.detail-open .wine-grid-head span:nth-child(7),
.av-layout.detail-open .wine-row .style-wrap,
.av-layout.detail-open .wine-row .qty-cell,
.av-layout.detail-open .wine-row .row-kicker,
.av-layout.detail-open .wine-row .row-sub {
  display: none;
}

.wine-workspace,
.detail-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wine-workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.table-frame {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.wine-grid {
  display: grid;
  grid-template-columns: 66px minmax(220px, 1.3fr) minmax(100px, .45fr) 52px minmax(220px, 1fr) 82px 52px;
  gap: 10px;
  align-items: center;
}
.wine-grid-head abbr { text-decoration:none; cursor:help; }
.quality-cell { display:grid; place-items:center; }
.quality-face { display:inline-grid; place-items:center; min-width:30px; min-height:30px; border-radius:50%; font:22px/1 "Segoe UI Symbol","Segoe UI Emoji",sans-serif; }
.quality-face.good { color:var(--ink); font-size:25px; }
.quality-face.very-good { color:#a46c13; background:#fff4d6; }
.quality-face.outstanding { background:#f2d777; box-shadow:inset 0 0 0 1px rgba(75,22,38,.09); }
.quality-face.acceptable,.quality-face.poor,.quality-face.unrated { color:var(--muted); }
.quality-face.faulty { color:#fff; background:#8b2435; font-weight:900; font-size:15px; }
.wine-grid-head {
  padding: 10px 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 950;
  border-bottom: 1px solid var(--line);
}
.wine-table {
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

.wine-row {
  width: 100%;
  min-height: 74px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, .64);
  padding: 7px 8px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.wine-row:hover,
.wine-row.active {
  background: #fff;
  border-color: rgba(75, 22, 38, .18);
}
.wine-row.active {
  box-shadow: inset 4px 0 0 var(--accent);
}

.bottle-thumb {
  width: 56px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  cursor: zoom-in;
}
.name-block { min-width: 0; }
.row-kicker {
  margin: 0 0 3px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.row-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.style-pill,
.flavour-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(75, 22, 38, .13);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 850;
}
.style-pill {
  justify-content: center;
  background: var(--accent);
  color: #fff;
}
.flavour-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  max-height: 62px;
  overflow: hidden;
}
.flavour-pill {
  background: rgba(79, 109, 90, .1);
  color: #2f4d3a;
}
.price-cell,
.qty-cell {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.qty-cell {
  color: var(--muted);
  text-align: center;
}

.detail-panel {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
}
.empty-state,
.detail-content {
  min-height: 0;
  padding: 16px;
  overflow: auto;
}
.empty-state {
  display: none;
  color: var(--muted);
}
.empty-state h2 { color: var(--accent); }
.detail-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}
.detail-image-wrap {
  position: relative;
  width: 100%;
  height: clamp(160px, 28vh, 260px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
}
.image-edit-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(75, 22, 38, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(27, 10, 18, .16);
  font-size: 14px;
  cursor: pointer;
}
.image-edit-button:hover { border-color: var(--gold); background: #fff8e7; }
.image-edit-button:disabled { cursor: wait; opacity: .7; }
.image-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.detail-image {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
}
.detail-panel.expanded .detail-hero {
  grid-template-columns: 1fr;
}
.detail-panel.expanded .detail-image-wrap {
  height: min(42vh, 360px);
}
.detail-id {
  margin: 0 0 6px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 950;
}
.detail-title {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.04;
}
.detail-title-row { display: flex; align-items: flex-start; gap: 8px; }
.detail-title-row .detail-title { flex: 1; }
.detail-edit {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.detail-edit:hover { border-color: var(--gold); background: #fff8e7; }
.detail-meta,
.detail-description {
  color: var(--muted);
  line-height: 1.38;
  font-weight: 650;
}
.detail-meta { margin-bottom: 0; }
.detail-description { margin: 14px 0 0; }
.rating-section { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.rating-section h3 { margin-bottom:12px; }
.rating-scale { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.rating-choice { min-width:0; min-height:76px; display:grid; place-items:center; align-content:center; gap:5px; padding:7px 4px; border:1px solid var(--line); border-radius:13px; color:var(--muted); background:#fff; cursor:pointer; }
.rating-choice:hover,.rating-choice.selected { border-color:var(--gold); color:var(--accent); background:#fff8e7; }
.rating-choice.selected { box-shadow:inset 0 0 0 1px var(--gold); }
.rating-choice span:last-child { font-size:10px; font-weight:800; line-height:1.15; text-align:center; }
.rating-icon { font-size:25px; line-height:1; }
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.detail-fact {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  padding: 9px;
}
.qty-fact { width:100%; font:inherit; color:inherit; text-align:left; cursor:pointer; }
.qty-fact:hover,.qty-fact[aria-expanded="true"] { border-color:var(--gold); background:#fff8e7; }
.qty-fact small { display:block; margin-top:5px; color:var(--accent); font-size:10px; font-weight:800; }
.quantity-editor { grid-template-columns:44px minmax(70px,1fr) 44px; align-items:center; gap:10px; margin-top:9px; padding:9px; border:1px solid var(--line); border-radius:14px; background:#faf7f2; }
.quantity-editor:not([hidden]) { display:grid; }
.quantity-editor button { width:44px; height:40px; border:1px solid var(--line); border-radius:11px; color:var(--accent); background:#fff; font-size:22px; font-weight:800; cursor:pointer; }
.quantity-editor button:disabled { opacity:.35; cursor:not-allowed; }
.quantity-editor output { text-align:center; color:var(--accent); font:700 22px Georgia,serif; }
.detail-fact span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 9px;
  font-weight: 950;
  margin-bottom: 4px;
}
.detail-fact strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}
.detail-flavours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.detail-close {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(75, 22, 38, .14);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(75, 22, 38, .2);
}
.detail-close:hover { transform: translateY(-1px); }

.modal-overlay,
.image-overlay,
.fancy-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(34, 24, 28, .52);
  backdrop-filter: blur(9px);
}
.modal-overlay { padding: 0; background: #f6f2eb; backdrop-filter: none; }
.modal-overlay[hidden],
.image-overlay[hidden],
.fancy-overlay[hidden] { display: none !important; }
.fancy-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .36);
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  padding: 20px;
}
.filter-panel {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f8f5ef;
}
.filter-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(22px, 5vw, 76px) 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .96);
}
.filter-header h2 { margin: 0; color: var(--accent); font: 700 clamp(28px, 4vw, 46px)/1 Georgia, serif; }
.filter-intro { margin: 8px 0 0; color: var(--muted); }
.filter-header .icon-close { position: static; flex: 0 0 auto; width: 46px; height: 46px; font-size: 25px; }
.fancy-panel { width: min(980px, 100%); }
.image-modal {
  position: relative;
  display: grid;
  place-items: center;
  width: min(94vw, 980px);
  height: min(90vh, 900px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .36);
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  padding: 18px;
  overflow: hidden;
}
.image-modal-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.image-close {
  z-index: 2;
  background: #fff;
}
.icon-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 18px;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(26px, 5vh, 56px) 0;
}
.filter-grid > label,
.price-filter { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.filter-grid label span,
.price-filter > span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 950;
  margin-bottom: 6px;
}
.filter-grid select,
.filter-grid input[type="range"] {
  width: 100%;
}
.filter-grid select {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #f5f1eb;
  color: var(--ink);
  padding: 9px 11px;
}
.price-filter {
  grid-column: span 2;
}
.price-range-controls {
  display: grid;
  grid-template-columns:1fr auto 1fr;
  align-items:end;
  gap:10px;
}
.price-range-controls label span { display:none; }
.price-range-controls small { display:block; margin-bottom:5px; color:var(--muted); font-size:11px; }
.price-range-controls input {
  width:100%; min-height:42px; border:1px solid var(--line); border-radius:12px; padding:8px 10px; color:var(--ink); background:#fff;
}
.filter-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 18px clamp(22px, 5vw, 76px);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, .97);
}
.filter-actions .primary-action { min-width: min(320px, 55vw); }
.fancy-question {
  margin: 10px 44px 14px 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.12;
}
.fancy-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.fancy-option {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--accent);
  padding: 12px;
  text-align: left;
  font-weight: 950;
  cursor: pointer;
}
.fancy-option:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 24px rgba(186, 134, 45, .16);
  transform: translateY(-1px);
}
.fancy-results {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.fancy-result {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
}
.fancy-result img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.fancy-result strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.14;
}
.fancy-result span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.fancy-result small { display:block; margin-top:7px; color:var(--accent); font-size:10px; line-height:1.3; }

@media (orientation: landscape) and (max-height: 680px) {
  .av-topbar { min-height: 56px; padding: 7px; }
  .av-layout { height: calc(100vh - 72px); }
  .wine-row { min-height: 66px; }
  .detail-image-wrap { height: 150px; }
  .detail-panel.expanded .detail-image-wrap { height: min(38vh, 260px); }
}

@media (max-width: 1240px) {
  .av-topbar { grid-template-columns:auto minmax(220px,1fr) auto auto auto; }
  .summary-strip { grid-column:1 / -1; width:100%; margin:0; border-top:1px solid var(--line); }
  .av-layout { height:calc(100vh - 144px); }
}

@media (max-width: 980px) {
  .av-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    align-items: center;
  }
  .av-layout {
    height: calc(100vh - 82px);
    grid-template-columns: minmax(0, 1fr) minmax(270px, 34vw);
  }
  .av-layout.detail-closed {
    grid-template-columns: minmax(0, 1fr);
  }
  .wine-grid {
    grid-template-columns: 62px minmax(190px, 1fr) 46px minmax(150px, .75fr) 50px;
  }
  .av-layout.detail-open .wine-grid {
    grid-template-columns: 58px minmax(150px, .78fr) 44px minmax(140px, 1fr);
  }
  .wine-grid-head span:nth-child(3),
  .wine-grid-head span:nth-child(6),
  .wine-row .style-wrap,
  .wine-row .price-cell {
    display: none;
  }
  .fancy-options,
  .fancy-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.mobile-detail-mode .av-topbar { display:none; }
  body.mobile-detail-mode .av-layout { margin-top:7px; }
  .av-shell { width: min(100% - 14px, 1480px); }
  .av-topbar { grid-template-columns:1fr repeat(3,auto); position:sticky; top:4px; z-index:20; border-radius:14px; }
  .brand { grid-column:1 / -1; padding:3px 4px 0; }
  .search-field { grid-column:1 / -1; grid-row:2; }
  .av-topbar .secondary-action, .av-topbar .primary-action { grid-row:3; min-height:38px; padding:8px 11px; font-size:13px; }
  .summary-strip { grid-column:1 / -1; width:100%; margin:0; grid-template-columns:repeat(4,1fr); border-left:0; border-top:1px solid var(--line); }
  .summary-strip div { padding:6px 4px; text-align:center; }
  .summary-strip dt { font-size:8px; }
  .summary-strip dd { font-size:17px; }
  .av-layout { margin-top:5px; }
  .av-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .av-layout.detail-closed {
    grid-template-columns: 1fr;
  }
  .detail-panel {
    min-height: 460px;
  }
  .av-layout.mobile-detail-active { display:block; }
  .av-layout.mobile-detail-active .wine-workspace { display:none; }
  .av-layout.mobile-detail-active .detail-panel { display:block; min-height:calc(100vh - 8px); border-radius:14px; }
  .av-layout.mobile-detail-active .detail-close { position:sticky; top:7px; z-index:4; width:100%; margin-bottom:10px; }
  .wine-grid {
    grid-template-columns: 52px minmax(0, 1fr) 40px 42px;
    gap: 7px;
  }
  .wine-grid-head span:nth-child(3),
  .wine-grid-head span:nth-child(5),
  .wine-grid-head span:nth-child(6),
  .wine-row .style-wrap,
  .wine-row .flavour-list {
    display: none;
  }
  .wine-row .price-cell { display:none; }
  .bottle-thumb { width: 48px; height: 54px; }
  .wine-row { min-height:66px; margin-bottom:3px; border-radius:10px; padding:5px; }
  .row-title { font-size:15px; }
  .row-sub { font-size:11px; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-image-wrap,
  .detail-panel.expanded .detail-image-wrap { height: min(38vh, 300px); }
  .rating-scale { grid-template-columns:repeat(5,minmax(54px,1fr)); overflow-x:auto; padding-bottom:4px; }
  .fancy-options,
  .fancy-results {
    grid-template-columns: 1fr;
  }
  .filter-grid {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 520px);
    gap: 12px;
    padding: 18px 0;
  }
  .price-filter { grid-column: 1; }
  .filter-header { padding: 18px 16px 15px; }
  .filter-intro { font-size: 13px; }
  .filter-actions { padding: 12px 14px; }
  .filter-actions .primary-action { min-width: 0; flex: 1; }
}
