* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
}

body {
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

body.is-sheet-open {
  overflow: hidden;
}

button,
input {
  font-family: inherit;
  color: inherit;
}

/* ============================================================
   Full-bleed burgundy topbar (single horizontal center axis)
   ============================================================ */
.topbar {
  background: var(--bg-header);
  color: var(--outer-ink);
  border-bottom: 1px solid var(--outer-chip-border);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.topbar-brand-row {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-mobile-actions {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--outer-ink);
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-glass {
  width: 18px;
  height: 21px;
  display: block;
}

.brand-glass-wine {
  fill: var(--dot-red);
}

.brand-glass-stroke {
  stroke: var(--bg-header);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.type-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: var(--space-5);
  min-width: 0;
}

.type-btn {
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--outer-muted);
  padding: 0 var(--space-1);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.tab-label-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.type-btn:hover {
  color: var(--outer-ink);
}

.type-btn.active {
  color: var(--outer-ink-bright);
  font-weight: 700;
}

.type-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--bg-surface);
}

.tab-dot {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.tab-dot-red { background: var(--dot-red); }
.tab-dot-white { background: var(--dot-white); }
.tab-dot-rose { background: var(--dot-rose); }
.tab-dot-sparkling { background: var(--dot-sparkling); }

.type-count {
  font-size: var(--text-xs);
  opacity: 0.72;
  font-weight: 400;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.site-switch {
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-md);
  border: 1px solid var(--outer-chip-border);
  background: var(--outer-chip-bg);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.site-switch-active {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink);
  font-weight: 700;
}

.site-switch-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--outer-muted);
  text-decoration: none;
}

.site-switch-link:hover {
  color: var(--outer-ink-bright);
}

/* Desktop search */
.search-wrap {
  position: relative;
  width: 240px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: var(--space-3);
  color: var(--outer-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--space-6) 0 34px;
  border: 1px solid var(--header-input-border);
  border-radius: var(--radius-md);
  background: var(--header-input-bg);
  font-size: var(--text-sm);
  color: var(--outer-ink);
}

.search-input::placeholder {
  color: var(--outer-muted);
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-input:focus {
  outline: 2px solid var(--bonus);
  outline-offset: 1px;
}

.search-clear-btn {
  position: absolute;
  right: var(--space-1);
  width: var(--space-6);
  height: var(--space-6);
  border: none;
  background: transparent;
  color: var(--outer-muted);
  font-size: var(--text-base);
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  color: var(--outer-ink-bright);
}

.search-clear-btn[hidden] {
  display: none;
}

.search-results {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  width: 360px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-surface);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 45;
}

.search-results[hidden] {
  display: none;
}

.search-meta-bar {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}

.search-empty {
  padding: var(--space-4) var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  text-align: center;
}

.search-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover,
.search-item:focus-visible {
  background: var(--bg-hover);
  outline: none;
}

.search-item-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink);
}

.search-item-sub {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 2px;
}

.search-item-right {
  text-align: right;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 1120px) {
  .type-nav {
    gap: var(--space-3);
  }
  .search-wrap {
    width: 205px;
  }
}

/* ============================================================
   Main page shell (matching 20px outer/inner rhythm)
   ============================================================ */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) var(--space-6);
}

/* Zone 1: Style chips + Store dropdown */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.style-chips-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex-wrap: wrap;
}

.filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--outer-muted);
  white-space: nowrap;
}

.style-chips {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.style-chip {
  height: var(--control-h);
  border: 1px solid var(--outer-chip-border);
  background: var(--outer-chip-bg);
  color: var(--outer-ink);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.style-chip:hover {
  background: var(--outer-chip-hover);
}

.style-chip.active {
  background: var(--bg-surface);
  border-color: var(--bg-surface);
  color: var(--ink);
  font-weight: 700;
}

.chip-count {
  opacity: 0.72;
  font-size: var(--text-xs);
}

.mobile-pickers {
  display: none;
}

.store-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  height: var(--control-h);
  border: 1px solid var(--bg-surface);
  background: var(--bg-surface);
  color: var(--ink);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.picker-trigger:hover {
  background: var(--bg-surface-bright);
}

.picker-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-trigger-right {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.picker-trigger-count {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-3);
}

.origin-grape {
  color: var(--ink-muted);
}

.tt-bonus {
  color: var(--bonus);
  font-weight: 700;
}

.picker-caret {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  flex-shrink: 0;
}

.store-dropdown-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  width: 300px;
  max-height: min(76vh, 620px);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  color: var(--ink);
  color-scheme: light;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  z-index: 60;
}

.store-dropdown-panel[hidden] {
  display: none;
}

.store-dd-sheet-head {
  display: none;
}

.sheet-done-btn {
  border: none;
  background: var(--wine);
  color: var(--wine-ink);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}

.sheet-done-btn:hover {
  background: var(--wine-hover);
}

.sheet-done-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.store-dd-presets {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.85fr;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.store-dd-preset-btn {
  height: var(--control-h);
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.store-dd-preset-btn:hover {
  background: var(--bg-hover);
}

.store-dd-preset-btn.is-active {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--wine-ink);
  font-weight: 700;
}

.store-dd-preset-btn.is-active:hover {
  background: var(--wine-hover);
}

.store-dd-hint {
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-secondary);
  text-align: center;
  flex-shrink: 0;
}

.store-dd-hint[hidden] {
  display: none;
}

.store-dd-status {
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bonus-tint);
  border: 1px solid var(--bonus-tint-border);
  font-size: var(--text-xs);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.store-dd-status[hidden] {
  display: none;
}

.store-dd-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.store-dd-group {
  padding: var(--space-1) 0;
}

.store-dd-group + .store-dd-group {
  border-top: 1px solid var(--line);
  margin-top: var(--space-1);
  padding-top: var(--space-2);
}

.store-dd-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--space-2);
}

.store-dd-group-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.store-dd-group-toggle {
  border: none;
  background: none;
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 2px var(--space-1);
}

.store-dd-group-toggle:hover {
  text-decoration: underline;
}

.store-dd-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-dd-opt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  user-select: none;
}

.store-dd-opt:hover {
  background: var(--bg-hover);
}

.store-dd-check {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.store-dd-opt input[type="checkbox"] {
  accent-color: var(--wine);
  width: var(--space-4);
  height: var(--space-4);
  cursor: pointer;
  flex-shrink: 0;
}

.store-dd-name {
  flex: 1;
  color: var(--ink);
}

.store-dd-opt.is-checked .store-dd-name {
  font-weight: 600;
}

.store-dd-only {
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border-radius: var(--radius-sm);
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.25;
}

.store-dd-only:hover,
.store-dd-only:focus-visible {
  border-color: var(--wine);
  color: var(--wine);
  background: var(--bg-surface);
  outline: none;
}

.store-dd-only[hidden] {
  display: none;
}

@media (hover: hover) {
  .store-dd-only {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
  }

  .store-dd-opt:hover .store-dd-only,
  .store-dd-opt:focus-within .store-dd-only {
    opacity: 1;
    pointer-events: auto;
  }
}

.store-dd-count {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  min-width: 34px;
  text-align: right;
}

.store-dd-foot {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-1);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  flex-shrink: 0;
}

/* Inline retry banner */
.inline-error-banner {
  margin-bottom: var(--space-3);
  background: var(--bonus-tint);
  border: 1px solid var(--bonus-tint-border);
  border-left: 4px solid var(--bonus);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.inline-error-banner[hidden] {
  display: none;
}

/* ============================================================
   Zone 2: Value Band Chart card (20px inner gutter)
   ============================================================ */
.chart-surface {
  background: var(--bg-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  flex-wrap: wrap;
}

.lg-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}

.lg-band {
  width: 14px;
  height: 9px;
  border-top: 2px solid var(--wine);
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    color-mix(in srgb, var(--wine) 30%, transparent) 2px,
    color-mix(in srgb, var(--wine) 30%, transparent) 4px
  );
}

.lg-dot-solid {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--wine);
}

.lg-dot-bonus {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--bonus);
}

.lg-dot-hollow {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 2px solid var(--wine);
}

.lg-dot-below {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--dot-below);
}

.chart-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  line-height: 1.35;
  text-align: right;
}

.chart-summary strong {
  color: var(--ink);
  font-weight: 700;
}

.summary-stat {
  white-space: nowrap;
}

.chart-scale-link {
  border: none;
  border-left: 1px solid var(--line-strong);
  background: none;
  padding: 0 0 0 var(--space-3);
  font: inherit;
  font-weight: 700;
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.chart-scale-link:hover {
  color: var(--wine-hover);
}

.lg-num {
  color: var(--ink);
  font-weight: 700;
}

.chart-stage {
  position: relative;
}

.band-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block;
}

#band-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  overflow: visible;
  user-select: none;
  touch-action: pan-y;
}

.handle-pill-btn {
  cursor: text;
}

.handle-pill-btn:hover rect {
  stroke: var(--wine);
}

.handle-inline-input {
  position: absolute;
  z-index: 20;
  height: var(--space-6);
  padding: 0 var(--space-1);
  border: 2px solid var(--wine);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-bright);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.handle-inline-input::-webkit-outer-spin-button,
.handle-inline-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.handle-inline-input[hidden] {
  display: none;
}

.plot-brush {
  cursor: crosshair;
}

.chart-dot {
  cursor: pointer;
}

.axis-handle {
  cursor: ew-resize;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-header);
  color: var(--outer-ink);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--outer-chip-border);
  font-size: var(--text-xs);
  line-height: 1.35;
  max-width: 260px;
  box-shadow: var(--shadow-md);
  z-index: 25;
}

.chart-tooltip[hidden] {
  display: none;
}

.tt-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--outer-ink-bright);
}

.tt-meta {
  color: var(--outer-muted);
  margin-top: 2px;
}

/* ============================================================
   Unified control strip beneath chart (identical geometry)
   ============================================================ */
.window-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.window-row-price {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.seg-group {
  display: inline-flex;
  align-items: stretch;
  height: var(--control-h);
  padding: 3px;
  gap: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 100%;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--ink);
}

.seg-btn.active {
  background: var(--bg-surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.seg-btn[data-bonus="this_week"].active,
.seg-btn[data-bonus="next_week"].active {
  background: var(--bonus);
  color: var(--bonus-ink);
}

.bonus-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--bonus);
  flex-shrink: 0;
}

.seg-btn[data-bonus="this_week"].active .bonus-dot {
  background: var(--bonus-ink);
}

.cluster-sheet-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cluster-item {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
  cursor: pointer;
}

.cluster-item:last-child {
  border-bottom: none;
}

.cluster-item:hover {
  background: var(--bg-hover);
}

.cluster-item-main {
  flex: 1;
  min-width: 0;
}

.preview-banner {
  margin-top: var(--space-3);
  background: var(--bonus-tint);
  border: 1px solid var(--bonus-tint-border);
  border-left: 4px solid var(--bonus);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.preview-banner[hidden] {
  display: none;
}

.btn-quiet {
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.btn-quiet:hover {
  background: var(--bg-hover);
}

/* ============================================================
   Zone 3: Wine Table (matching 20px inner gutter)
   ============================================================ */
.table-wrap {
  margin-top: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mobile-list-head {
  display: none;
}

.wine-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.wine-table thead th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-muted);
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--bg-surface);
  white-space: nowrap;
  vertical-align: middle;
}

.wine-table thead th:first-child {
  padding-left: var(--space-5);
}

.wine-table thead th:last-child {
  padding-right: var(--space-5);
}

.wine-table thead th.num,
.wine-table tbody td.num {
  text-align: right;
}

.sort-btn {
  border: none;
  background: none;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: inherit;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0;
  vertical-align: baseline;
}

.sort-btn:hover,
.sort-btn.is-active {
  color: var(--ink);
  font-weight: 700;
}

.wine-table col.c-wine { width: 34%; }
.wine-table col.c-taste { width: 13%; }
.wine-table col.c-store { width: 13%; }
.wine-table col.c-vivino { width: 11%; }
.wine-table col.c-price { width: 17%; }
.wine-table col.c-action { width: 12%; }

.wine-table tbody tr {
  cursor: pointer;
}

.wine-table tbody tr:hover,
.wine-table tbody tr.is-highlighted {
  background: var(--bg-hover);
}

.wine-table tbody tr.is-selected {
  background: var(--bg-selected);
}

.wine-table tbody td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.wine-table tbody tr:last-child td {
  border-bottom: none;
}

.wine-table tbody td:first-child {
  padding-left: var(--space-5);
}

.wine-table tbody td:last-child {
  padding-right: var(--space-5);
}

.wine-id {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
}

.bottle-thumb {
  position: relative;
  width: 28px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottle-silhouette {
  width: 100%;
  height: 100%;
  color: var(--bottle-placeholder);
  display: block;
}

.bottle-silhouette[hidden] {
  display: none;
}

.bottle-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  mix-blend-mode: multiply;
}

.bottle-img.is-loaded {
  opacity: 1;
}

.wine-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
}

.wine-origin {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.style-hint {
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: underline dotted var(--ink-muted);
  text-underline-offset: 3px;
  cursor: help;
}

.cell-muted {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.rating-main {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.rating-star {
  color: var(--wine);
  font-size: var(--text-sm);
  margin-left: 1px;
}

.rating-sub {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.price-line {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: var(--space-1);
  white-space: nowrap;
}

.price-main {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.price-was {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.per-unit {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-muted);
}

.price-sub {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: var(--space-1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.price-note {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 2px;
  text-align: right;
  white-space: nowrap;
}

/* Strictly AH Bonus orange for Bonus pills, plain neutral tag for multi-buy */
.bonus-pill {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--bonus-ink);
  background: var(--bonus);
  border-radius: var(--radius-sm);
  padding: 1px var(--space-2);
  line-height: 1.35;
  white-space: nowrap;
}

.neutral-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 1px var(--space-2);
  line-height: 1.35;
  white-space: nowrap;
}

.store-cell-main {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.store-also {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 2px;
  line-height: 1.25;
}

.buy-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.buy-link {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--wine);
  text-decoration: none;
  white-space: nowrap;
}

.buy-link-muted {
  color: var(--ink-secondary);
  font-weight: 600;
}

.buy-link:hover {
  color: var(--wine-hover);
  text-decoration: underline;
}

.basket-add-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.basket-add-btn:hover {
  background: var(--bg-hover);
  border-color: var(--wine);
}

.basket-add-btn.in-basket {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--wine-ink);
}

.empty-state {
  padding: var(--space-6) var(--space-5);
  text-align: center;
  color: var(--ink-secondary);
  font-size: var(--text-base);
}

.empty-state p {
  margin-bottom: var(--space-3);
}

/* ============================================================
   Floating AH basket dock
   ============================================================ */
body.has-basket-dock .page {
  padding-bottom: 92px;
}

.basket-dock {
  position: fixed;
  left: 50%;
  bottom: var(--space-4);
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg-header);
  color: var(--outer-ink);
  border: 1.5px solid var(--bonus);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - var(--space-6));
}

.basket-dock[hidden] {
  display: none;
}

.basket-dock-info {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.basket-dock-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.basket-clear-btn {
  border: none;
  background: none;
  color: var(--outer-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.basket-clear-btn:hover {
  color: var(--outer-ink);
}

.basket-go-btn {
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bonus);
  color: var(--bonus-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.basket-go-btn:hover {
  background: var(--bonus-hover);
}

/* ============================================================
   Scrim, Style Popover, Bottom Sheets, Drawer & Search Overlay
   ============================================================ */
.sheet-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 50;
}

.sheet-scrim[hidden] {
  display: none;
}

.style-popover {
  position: fixed;
  max-width: 300px;
  background: var(--bg-header);
  color: var(--outer-ink);
  border: 1px solid var(--outer-chip-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  line-height: 1.4;
  box-shadow: var(--shadow-md);
  z-index: 70;
  pointer-events: none;
}

.style-popover[hidden] {
  display: none;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-surface);
  color: var(--ink);
  color-scheme: light;
  border-top: 1px solid var(--card-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-sheet);
  z-index: 60;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
}

.bottom-sheet[hidden] {
  display: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.sheet-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--ink);
}

.style-sheet-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.style-sheet-opt {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.style-sheet-opt.active {
  background: var(--bg-selected);
  border-color: var(--wine);
}

.style-sheet-opt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
}

.style-sheet-opt-desc {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  line-height: 1.35;
}

/* Mobile full-screen search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-surface);
  color: var(--ink);
  color-scheme: light;
  z-index: 65;
  display: flex;
  flex-direction: column;
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay-head {
  background: var(--bg-header);
  color: var(--outer-ink);
  border-bottom: 1px solid var(--outer-chip-border);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.search-overlay-field {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-overlay-icon {
  position: absolute;
  left: var(--space-3);
  color: var(--outer-muted);
  pointer-events: none;
}

.search-overlay-input {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--space-6) 0 36px;
  border: 1px solid var(--header-input-border);
  border-radius: var(--radius-md);
  background: var(--header-input-bg);
  color: var(--outer-ink);
  font-size: var(--text-base);
}

.search-overlay-input::placeholder {
  color: var(--outer-muted);
}

.search-overlay-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-overlay-input:focus {
  outline: 2px solid var(--bonus);
  outline-offset: 1px;
}

.search-cancel-btn {
  border: none;
  background: none;
  color: var(--outer-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  white-space: nowrap;
}

.search-overlay-meta {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.search-overlay-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bottle detail slide-over drawer (desktop) */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  background: var(--bg-surface);
  color-scheme: light;
  border-left: 1px solid var(--card-border);
  padding: var(--space-5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  z-index: 60;
  box-shadow: var(--shadow-lg);
}

.drawer[hidden] {
  display: none;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.drawer-hero {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  min-width: 0;
}

.drawer-hero img {
  width: 52px;
  height: 104px;
  object-fit: contain;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.25;
}

.drawer-alt {
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--wine);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  line-height: 1.4;
}

.drawer-alt[hidden] {
  display: none;
}

.inline-link-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--wine);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.drawer-kv {
  border-top: 1px solid var(--line);
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}

.kv-label {
  color: var(--ink-secondary);
  flex-shrink: 0;
}

.kv-val {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.taste-meters {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-1);
}

.meters-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-muted);
}

.meter-row {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.meter-pole-right {
  text-align: right;
}

.meter-track {
  position: relative;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
}

.meter-marker {
  position: absolute;
  top: 0;
  width: var(--space-6);
  height: 6px;
  transform: translateX(-50%);
  background: var(--wine);
  border-radius: var(--radius-pill);
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.drawer-links-row {
  display: flex;
  gap: var(--space-2);
}

.btn-basket {
  width: 100%;
  height: var(--control-h);
  border-radius: var(--radius-md);
  border: 1px solid var(--bonus);
  background: var(--bonus);
  color: var(--bonus-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}

.btn-basket:hover {
  background: var(--bonus-hover);
}

.btn-basket.in-basket {
  background: var(--bg-subtle);
  border-color: var(--wine);
  color: var(--wine);
}

.btn-basket[hidden] {
  display: none;
}

.btn-primary {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: var(--control-h);
  border-radius: var(--radius-md);
  background: var(--wine);
  color: var(--wine-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--wine-hover);
}

.btn-primary[hidden] {
  display: none;
}

.btn-secondary {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: var(--control-h);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-secondary[hidden] {
  display: none;
}

/* ============================================================
   Mobile (<= 700px) — zero overflow, tight above-the-fold cards
   ============================================================ */
.mobile-list {
  display: none;
}

@media (max-width: 720px) {
  .topbar-inner {
    height: auto;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .topbar-brand-row {
    padding: var(--space-2) var(--space-3);
    justify-content: space-between;
  }

  .brand {
    font-size: var(--text-lg);
    gap: var(--space-2);
  }

  .brand-mark {
    width: 24px;
    height: 24px;
  }

  .brand-glass {
    width: 15px;
    height: 18px;
  }

  .topbar-mobile-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .mobile-search-btn {
    width: var(--control-h);
    height: var(--control-h);
    border: 1px solid var(--outer-chip-border);
    background: var(--outer-chip-bg);
    color: var(--outer-ink);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .topbar-right {
    display: none;
  }

  .type-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 var(--space-2);
    gap: var(--space-1);
    border-top: 1px solid var(--outer-chip-bg);
    height: 40px;
  }

  .type-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    gap: 3px;
    padding: 0 2px;
    line-height: 1;
  }

  .tab-label-row {
    gap: var(--space-1);
  }

  .tab-dot {
    width: 6px;
    height: 6px;
  }

  .type-count {
    display: inline;
    font-size: calc(var(--text-xs) * 0.85);
    opacity: 0.72;
    font-weight: 500;
    line-height: 1;
  }

  .page {
    padding: var(--space-3) var(--space-3) var(--space-6);
  }

  .filter-bar {
    display: block;
    margin-bottom: var(--space-3);
  }

  .style-chips-wrap,
  .store-picker > .filter-label,
  .store-dropdown-btn {
    display: none;
  }

  .mobile-pickers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    width: 100%;
  }

  .mobile-pickers .picker-trigger {
    width: 100%;
    min-width: 0;
    font-size: var(--text-xs);
    padding: 0 var(--space-2);
  }

  .store-picker {
    position: static;
  }

  .store-dropdown-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 80dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-sheet);
    z-index: 60;
  }

  .store-dd-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }

  .store-dd-sheet-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--ink);
  }

  .store-dd-opt {
    padding: var(--space-2);
  }

  .chart-surface {
    padding: var(--space-3);
  }

  .chart-head {
    margin-bottom: var(--space-1);
  }

  .chart-legend {
    gap: var(--space-1) var(--space-3);
  }

  .chart-summary {
    display: none;
  }

  /* Mobile price & Bonus controls: 2 clean rows */
  .window-strip {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding-top: var(--space-2);
  }

  .window-row-price {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .preset-group {
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }

  .preset-group .seg-btn {
    padding: 0 var(--space-1);
    font-size: var(--text-sm);
  }

  .bonus-group {
    width: 100%;
    display: flex;
  }

  .bonus-group .seg-btn {
    flex: 1 1 0;
    padding: 0 var(--space-2);
    font-size: var(--text-xs);
  }

  .bonus-group .seg-btn[data-bonus="all"] {
    flex: 0 0 auto;
    padding: 0 var(--space-4);
  }

  .table-wrap {
    margin-top: var(--space-3);
  }

  .mobile-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--line);
    background: var(--bg-subtle);
  }

  .mobile-list-count {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    color: var(--ink-secondary);
  }

  .m-count-stat {
    white-space: nowrap;
  }

  .mobile-list-count strong {
    color: var(--ink);
    font-weight: 700;
  }

  .mobile-sort {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
  }

  .wine-table {
    display: none;
  }

  .mobile-list {
    display: block;
  }

  .m-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 2px var(--space-3);
    padding: var(--space-3);
    border-bottom: 1px solid var(--line);
    align-items: start;
    cursor: pointer;
  }

  .m-row:last-child {
    border-bottom: none;
  }

  .m-row.is-selected {
    background: var(--bg-selected);
  }

  .m-row .bottle-thumb {
    grid-row: 1 / 4;
    width: 26px;
    height: 52px;
  }

  .m-right {
    text-align: right;
    white-space: nowrap;
  }

  .m-meta {
    grid-column: 2 / 4;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px var(--space-3);
    font-size: var(--text-xs);
    color: var(--ink-secondary);
    margin-top: 2px;
  }

  .m-meta-shop {
    color: var(--ink);
    font-weight: 600;
  }

  .m-meta-also {
    color: var(--ink-muted);
  }

  .m-foot {
    grid-column: 2 / 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: var(--space-2);
  }

  .m-price-wrap {
    display: flex;
    align-items: baseline;
    gap: var(--space-1);
    flex-wrap: wrap;
    min-width: 0;
  }

  .m-card-note {
    font-size: var(--text-xs);
    color: var(--ink-muted);
  }

  /* Mobile detail drawer renders as a clean bottom sheet */
  .drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 86dvh;
    border-left: none;
    border-top: 1px solid var(--card-border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-sheet);
  }

  .basket-dock {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
    transform: none;
    max-width: none;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
  }
}
