:root {
  --paper: #f6f1ea;
  --card: #fffdf9;
  --well: #efe7dd;
  --ink: #2a1e1c;
  --muted: #7a6a64;
  --line: #e4d9ce;
  --wine: #6e1f2e;
  --wine-soft: #f3e3e3;
  --gold: #a98142;
  --gold-soft: #f5ecdc;
  --sage: #4f7550;
  --sage-soft: #e6efe3;
  --slate: #5a6272;
  --slate-soft: #e8eaee;
  --shadow: 0 1px 2px rgba(42, 30, 28, .06), 0 6px 18px rgba(42, 30, 28, .06);
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16100f;
    --card: #211918;
    --well: #2b2120;
    --ink: #f2e9e1;
    --muted: #a8988f;
    --line: #3a2d2b;
    --wine: #d0687b;
    --wine-soft: #3b1f25;
    --gold: #d4b07a;
    --gold-soft: #372c1d;
    --sage: #9cc49a;
    --sage-soft: #21301f;
    --slate: #aab2c2;
    --slate-soft: #262a33;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16100f; --card: #211918; --well: #2b2120; --ink: #f2e9e1; --muted: #a8988f;
  --line: #3a2d2b; --wine: #d0687b; --wine-soft: #3b1f25; --gold: #d4b07a; --gold-soft: #372c1d;
  --sage: #9cc49a; --sage-soft: #21301f; --slate: #aab2c2; --slate-soft: #262a33;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
button, select, input, textarea { font: inherit; color: inherit; }

/* Masthead */
.masthead { padding: 40px 0 20px; }
.eyebrow {
  margin: 0 0 4px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wine);
}
h1 {
  margin: 0;
  font: 600 clamp(38px, 7vw, 60px)/1.02 var(--display);
  letter-spacing: -.01em;
}
.stats { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.stats b { color: var(--ink); font-weight: 600; }

/* Controls */
.controls {
  position: relative; z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .controls { position: sticky; top: 0; } }
.controls-inner { display: grid; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 44px;
}
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; font-size: 16px; }
.search:focus-within { border-color: var(--wine); }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--well); border-radius: 10px; padding: 3px; }
.seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; min-height: 36px;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sort { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sort select {
  border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  padding: 7px 8px; font-size: 14px; min-height: 36px;
}
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-height: 34px;
}
.chip[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: #16100f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #16100f; } }

/* Grid + cards */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; padding: 18px 0 8px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; box-shadow: var(--shadow); cursor: pointer; text-align: left; width: 100%;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--wine) 35%, var(--line)); }
.card:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.bottle {
  position: relative; height: 176px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 35%, #fff 0%, var(--well) 100%);
  display: grid; place-items: center;
}
:root[data-theme="dark"] .bottle { background: radial-gradient(120% 80% at 50% 35%, #f4efe9 0%, #d9d0c6 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bottle { background: radial-gradient(120% 80% at 50% 35%, #f4efe9 0%, #d9d0c6 100%); } }
.bottle img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 10px 6px; mix-blend-mode: multiply;
}
.bottle .ph { width: 40px; height: 140px; }
.count {
  position: absolute; top: 6px; right: 6px; background: var(--wine); color: #fff;
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 7px;
}
.info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.producer { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.title { font: 600 22px/1.1 var(--display); margin: 0; }
.vintage { font: 500 italic 19px/1 var(--display); color: var(--wine); }
.region { font-size: 13px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ready { background: var(--sage-soft); color: var(--sage); }
.pill.peak { background: var(--gold-soft); color: var(--gold); }
.pill.hold { background: var(--slate-soft); color: var(--slate); }
.pill.late { background: var(--wine-soft); color: var(--wine); }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.score-row { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 8px; }
.seal {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--wine); color: #fff; border-radius: 8px; padding: 4px 9px;
}
:root[data-theme="dark"] .seal { color: #16100f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seal { color: #16100f; } }
.seal small { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.seal span { font: 700 18px/1 var(--display); }
.ref { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ref b { color: var(--ink); font-weight: 600; }
.has-notes { font-size: 12px; color: var(--wine); font-weight: 500; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.foot { color: var(--muted); font-size: 13px; padding-top: 18px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 24px; }
.foot p { margin: 0 0 6px; max-width: 70ch; }

/* Detail sheet */
dialog {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(720px, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto;
}
dialog::backdrop { background: rgba(20, 12, 10, .55); backdrop-filter: blur(3px); }
.sheet {
  background: var(--card); border-radius: 20px; overflow: auto; max-height: 92dvh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); position: relative;
}
@media (max-width: 719px) {
  dialog { margin: auto 0 0; width: 100vw; }
  .sheet { border-radius: 20px 20px 0 0; max-height: 90dvh; }
}
.close {
  position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 20px; line-height: 1;
}
.d-head { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 22px 20px 8px; }
.d-head .bottle { height: 250px; }
.d-head .title { font-size: 30px; }
.d-head .vintage { font-size: 24px; }
.d-body { padding: 8px 20px 26px; display: grid; gap: 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.fact { background: var(--well); border-radius: 10px; padding: 10px 12px; }
.fact.wide { grid-column: 1 / -1; order: 9; }
.fact dt { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 500; }
.timeline h3, .notes h3 {
  margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.track { position: relative; height: 38px; }
.track .rail { position: absolute; left: 0; right: 0; top: 22px; height: 8px; border-radius: 4px; background: var(--well); }
.track .win { position: absolute; top: 22px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--wine) 35%, transparent); }
.track .pk { position: absolute; top: 22px; height: 8px; border-radius: 4px; background: var(--wine); }
.track .now { position: absolute; top: 16px; width: 2px; height: 20px; background: var(--ink); border-radius: 1px; }
.track .now::after {
  content: "Today"; position: absolute; top: -17px; left: -14px; font-size: 11px; font-weight: 600; color: var(--ink);
}
.scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 6px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.note {
  border-radius: 14px; padding: 14px 16px; background: var(--well);
}
.note + .note { margin-top: 10px; }
.note.jake { background: var(--wine-soft); border-left: 4px solid var(--wine); }
.note .label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note .label strong { font: 600 18px/1 var(--display); }
.note.jake .label strong { color: var(--wine); }
.mono {
  width: 26px; height: 26px; border-radius: 50%; background: var(--wine); color: #fff;
  display: grid; place-items: center; font: italic 600 14px/1 var(--display);
}
:root[data-theme="dark"] .mono { color: #16100f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mono { color: #16100f; } }
.note p { margin: 0; font-size: 15px; }
.note .src { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.note .src a { color: inherit; }
.critic { font-size: 12px; font-weight: 600; background: var(--card); border-radius: 6px; padding: 2px 7px; margin-left: auto; }
.about { font-size: 14.5px; color: var(--muted); margin: 0; }
.flag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold); background: var(--gold-soft); padding: 3px 9px; border-radius: 999px; }

@media (max-width: 420px) {
  .d-head { grid-template-columns: 100px 1fr; gap: 14px; }
  .d-head .bottle { height: 200px; }
  .d-head .title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* Ask Jake chat */
.ask-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 18px 12px 14px;
  background: var(--wine); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 20px rgba(110, 31, 46, .35); cursor: pointer;
}
.ask-fab[hidden] { display: none; }
.ask-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ai-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; border: 1px solid currentColor;
  border-radius: 4px; padding: 1px 4px; opacity: .85;
}
:root[data-theme="dark"] .ask-fab { color: #16100f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ask-fab { color: #16100f; } }
#ask {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(560px, 100vw); max-width: 100vw; height: min(760px, 92dvh); max-height: 100dvh; margin: auto;
}
#ask::backdrop { background: rgba(20, 12, 10, .55); backdrop-filter: blur(3px); }
.ask-sheet {
  height: 100%; display: flex; flex-direction: column; background: var(--card);
  border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
@media (max-width: 719px) {
  #ask { margin: auto 0 0; width: 100vw; height: 92dvh; }
  .ask-sheet { border-radius: 20px 20px 0 0; }
}
.ask-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.ask-head > div { flex: 1; min-width: 0; }
.ask-head h2 { margin: 0; font: 600 26px/1.1 var(--display); }
.ask-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.ask-head .close { position: static; float: none; margin: 0; flex: none; }
.ask-reset {
  flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 12px; font-size: 13px; color: var(--muted); cursor: pointer; min-height: 38px;
}
.ask-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.msg p { margin: 0; }
.msg p + p { margin-top: 8px; }
.msg.user { align-self: flex-end; background: var(--wine); color: #fff; border-bottom-right-radius: 6px; }
:root[data-theme="dark"] .msg.user { color: #16100f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.user { color: #16100f; } }
.msg.assistant { align-self: flex-start; background: var(--well); border-bottom-left-radius: 6px; }
.msg.error { background: var(--wine-soft); color: var(--wine); }
.wine-link {
  color: var(--wine); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.starters { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 4px; }
.starter {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left;
  border-radius: 14px; padding: 9px 13px; font-size: 14px; cursor: pointer;
}
.starter:hover { border-color: var(--wine); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ask-form {
  display: flex; gap: 8px; align-items: flex-end; padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
}
.ask-form textarea {
  flex: 1; resize: none; border: 1px solid var(--line); background: var(--paper); border-radius: 14px;
  padding: 11px 14px; font-size: 16px; line-height: 1.35; max-height: 120px; outline: 0;
}
.ask-form textarea:focus { border-color: var(--wine); }
.ask-form button {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--wine); cursor: pointer;
  display: grid; place-items: center;
}
.ask-form button:disabled { opacity: .45; cursor: default; }
.ask-form button svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; opacity: .6; } }
/* Keep the last card clear of the floating button. */
main.wrap { padding-bottom: 72px; }
/* Wines outside the cellar: named, not linked. */
.ext-wine {
  font-weight: 600; color: var(--ink);
  border-bottom: 1px dashed color-mix(in srgb, var(--wine) 55%, transparent);
}
.msg .status { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.msg .status .typing { padding: 0; }
.ask-note {
  margin: 0; padding: 8px 16px 0; border-top: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.4; color: var(--muted); text-align: center; background: var(--card);
}
.ask-note + .ask-form { border-top: 0; padding-top: 8px; }

/* Location on cards and in the detail sheet */
.loc { display: flex; align-items: flex-start; gap: 4px; font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.loc svg { width: 13px; height: 13px; flex: none; margin-top: 1px; fill: none; stroke: var(--wine); stroke-width: 2; }
.loc-fact dd { display: flex; flex-direction: column; gap: 6px; }
.loc-part { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.slot-link {
  border: 1px solid color-mix(in srgb, var(--wine) 45%, var(--line)); background: var(--card); color: var(--wine);
  border-radius: 7px; padding: 3px 8px; min-height: 30px; min-width: 38px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.slot-link:hover { background: var(--wine-soft); }

/* View toggle (shown only once the library has locations) */
.views { margin-top: 14px; }
.views[hidden], .grid[hidden], .sort[hidden] { display: none; }

/* Rack map */
.rack-view { padding: 18px 0 8px; }
.rack-view[hidden] { display: none; }
.rack-layout { display: grid; gap: 22px; }
@media (min-width: 900px) { .rack-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.rack-head h2 { margin: 0; font: 600 28px/1.1 var(--display); }
.rack-head p { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.rack-scroll { overflow-x: auto; margin: 0 -16px; padding: 4px 8px 6px; overscroll-behavior-x: contain; }
@media (min-width: 720px) { .rack-scroll { margin: 0; padding: 4px 0 6px; } }
.rack { --gap: 3px; display: grid; gap: var(--gap); min-width: calc(22px + var(--cols) * 34px + var(--cols) * var(--gap)); }
.rack-row { display: grid; grid-template-columns: 18px 1fr; gap: 4px; align-items: stretch; }
.rack-row .cells { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); }
.rl {
  display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted);
  border-left: 3px solid transparent; padding-right: 1px;
}
.rl.tier-hold, .key-tier.tier-hold { border-color: var(--slate); }
.rl.tier-early, .key-tier.tier-early { border-color: var(--sage); }
.rl.tier-now, .key-tier.tier-now { border-color: var(--gold); }
.rack-cols .cells span { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.slot {
  position: relative; min-width: 0; height: 54px; border-radius: 9px; padding: 4px 2px;
  border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  text-align: center; overflow: hidden; cursor: pointer; transition: opacity .15s ease, transform .15s ease;
}
.slot b { font: 700 15px/1 var(--display); }
.slot span { font-size: 9.5px; font-weight: 500; line-height: 1.12; max-width: 100%; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot span.squeeze { overflow-wrap: anywhere; }
.slot i { font-style: normal; font: 600 11px/1 var(--sans); opacity: .8; margin-left: 3px; }
.slot.empty { cursor: default; border: 1px dashed var(--line); background: transparent; }
/* Readiness tones: tinted fill, ink in the tone's own color. */
.tone-hold { --tone: var(--slate); }
.tone-early { --tone: var(--sage); }
.tone-now { --tone: var(--gold); }
.tone-late { --tone: var(--wine); }
.slot[class*="tone-"], .sw[class*="tone-"] {
  background: color-mix(in srgb, var(--tone) 24%, var(--card));
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
  color: color-mix(in srgb, var(--tone) 80%, var(--ink));
}
.slot.dim { opacity: .22; }
.slot.sel { border-color: currentColor; border-width: 2px; }
.slot.hit { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 1; }
.slot:focus-visible { outline: 2px solid var(--wine); outline-offset: 1px; }
@media (min-width: 720px) {
  .slot { height: 64px; }
  .slot b { font-size: 18px; }
  .slot span { font-size: 11px; }
}
.rack-count { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.rack-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.rack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; border: 1px solid transparent; }
.rack-key { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); max-width: 62ch; }
.key-tier { display: inline-block; width: 0; height: 11px; border-left: 3px solid; margin: 0 4px -1px 2px; }
.rack-info {
  margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--shadow); min-height: 52px;
}
.rack-hint { margin: 4px 0; font-size: 13.5px; color: var(--muted); }
.ri-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.ri-head .title { font-size: 22px; }
.ri-head .vintage { font-size: 19px; }
.ri-open {
  flex: none; border: 0; background: var(--wine); color: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 38px;
}
:root[data-theme="dark"] .ri-open { color: #16100f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ri-open { color: #16100f; } }
.ri-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 0; }
.ri-facts div { background: var(--well); border-radius: 10px; padding: 8px 10px; }
.ri-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ri-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.rack-side { display: grid; gap: 18px; }
.spot h3 { margin: 0 0 8px; font: 600 22px/1.1 var(--display); }
.spot ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.spot li + li { border-top: 1px solid var(--line); }
.spot-wine {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 0; background: transparent; padding: 10px 12px; min-height: 44px; cursor: pointer; font-size: 14px;
}
.spot-wine:hover { background: var(--well); }
.spot-wine.dim { opacity: .35; }
.sw-name { flex: 1; min-width: 0; }
.sw-vin { flex: none; font: 500 italic 16px/1 var(--display); color: var(--wine); }
@media (prefers-reduced-motion: reduce) { .slot { transition: none; } }
