/* Home: welcome mode (empty bar) and bar mode, comps home-welcome.html and home-bar.html */
.home { padding-bottom: var(--s-12); }
:where(.home) :is(h1, h2, h3) { margin: 0; font-weight: inherit; line-height: inherit; text-transform: none; }
:where(.home) p, :where(.home) :is(ol, ul) li { margin: 0; line-height: inherit; }
:where(.home) button { opacity: 1; padding: 0; }
:where(.home) button:hover { opacity: 1; color: inherit; }
:where(.home) label { float: none; width: auto; margin: 0; padding: 0; }
.home .lede { margin-top: var(--s-4); max-width: 34ch; color: var(--text-soft); }
.home-add { position: relative; }
.home-add input { height: var(--cta-h); padding-inline: var(--s-4); font-size: var(--size-body); }
.home-add .listbox { position: absolute; z-index: 5; inset-inline: 0; max-height: 18rem; overflow-y: auto; }
.home-add .listbox li { cursor: pointer; }
.home-add__status:empty, .home-error:empty { display: none; }
.home-add__status { margin-top: var(--s-1); font-size: var(--size-small); color: var(--text-soft); }
.home-error p { margin-top: var(--s-2); color: var(--error-ink); font-size: var(--size-small); }
.tap { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Welcome */
.hero { display: grid; gap: var(--s-8); padding-block: var(--s-10) var(--s-6); }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--size-display); letter-spacing: var(--track-display); line-height: .9; font-variation-settings: "opsz" 96; margin-left: -.04em; max-width: 13ch; }
.hero .home-add { margin-top: var(--s-6); width: min(100%, 28rem); }
.hero .or { margin-top: var(--s-3); font-size: var(--size-ui); }
.hero .or a { display: inline-flex; align-items: center; min-height: var(--tap); }
.start { border-radius: var(--radius-card); background: var(--paper-white); box-shadow: var(--shadow-paper); padding: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.start h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--size-h3); letter-spacing: var(--track-head); line-height: 1.05; }
.start__bottles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-2); }
.start__b { width: 100%; display: grid; justify-items: center; gap: 2px; padding: var(--s-3) var(--s-1); border-radius: var(--radius-control); color: inherit; cursor: pointer; transition: background var(--dur-fast), box-shadow var(--dur-fast); }
.start__b:hover { background: var(--paper); box-shadow: var(--shadow-paper-inset); }
.start__b .flat { width: 4.5rem; }
.start__b img { width: 100%; height: auto; }
.start__name { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: var(--track-head); }
.start__keep { margin-top: var(--s-2); }
.how__steps { display: grid; gap: var(--s-8); }
.how__word { font-family: var(--font-display); font-weight: 800; font-size: var(--size-h1); letter-spacing: var(--track-display); line-height: 1; font-variation-settings: "opsz" 96; margin-bottom: var(--s-3); }
.how__steps p:not(.how__word) { max-width: 32ch; color: var(--text-soft); }

/* Sections shared by both modes */
.home .sec { margin-top: var(--s-16); }
.sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-5); }
.sec__head h2, .results h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--size-h2); letter-spacing: var(--track-head); line-height: 1.05; }
.home .ad-wrap { margin-top: var(--s-16); }
.spirits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.spirits a { display: grid; justify-items: center; gap: var(--s-1); padding: var(--s-3) var(--s-2) var(--s-4); border-radius: var(--radius-card); text-decoration: none; transition: background var(--dur-fast), box-shadow var(--dur-fast); }
.spirits a:hover { background: var(--paper-white); box-shadow: var(--shadow-paper); }
.spirits img { width: 5.5rem; height: auto; mix-blend-mode: multiply; filter: brightness(1.06); }
.spirits strong { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: var(--track-head); }

/* Bar mode: the shelf */
.shelfhero { padding-block: var(--s-8) 0; }
.shelfhero__head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.shelfhero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1.2rem + 5vw, 5.5rem); letter-spacing: var(--track-display); line-height: .92; font-variation-settings: "opsz" 96; margin-left: -.04em; }
.myshelf { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); border-bottom: 3px solid var(--text); }
.myshelf .home-add { width: 100%; order: -1; }
.myshelf__bottles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); align-items: start; }
.myshelf .bottle { border-bottom: 0; }
.myshelf .bottle .art { width: 100%; max-width: 8.5rem; --sticker-edge: 4px; }
.myshelf .bottle img { width: 100%; height: auto; }
.myshelf .bottle__name { min-height: 2.8em; font-size: var(--size-cap); line-height: 1.4; }
.ghost { display: grid; justify-items: center; gap: var(--s-2); padding-bottom: var(--s-3); cursor: pointer; }
.ghost__slot { width: 100%; max-width: 8.5rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--shape-b); background: var(--paper); box-shadow: var(--shadow-paper-inset); font-family: var(--font-mono); font-size: var(--size-h2); color: var(--text-soft); transition: background var(--dur-fast); }
.ghost:hover .ghost__slot { background: var(--paper-white); }
.ghost__name { min-height: 2.8em; font-family: var(--font-mono); font-size: var(--size-cap); line-height: 1.4; text-align: center; color: var(--text-soft); }
.shelfnote { margin-top: var(--s-3); }

/* Bar mode: what the shelf makes */
.results { display: grid; gap: var(--s-12); margin-top: var(--s-10); }
.results__head { display: grid; gap: var(--s-1); margin-bottom: var(--s-5); }
.results__none { max-width: var(--measure); color: var(--text-soft); }
.unlocks { display: grid; row-gap: var(--s-5); }
.unlock { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: var(--s-3); align-items: center; }
.unlock .flat img { width: 100%; height: auto; }
.unlock__bottle { font-weight: 600; line-height: 1.3; }
.unlock__bottle .cap { margin-left: var(--s-2); font-weight: 400; }
.unlock__drinks { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-4); }
.unlock__drinks::before { content: "→"; font-family: var(--font-mono); color: var(--text-soft); }
.unlock__drinks a { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--font-display); font-weight: 700; font-size: var(--size-h3); letter-spacing: var(--track-head); line-height: 1.05; text-decoration: none; }
.unlock__drinks a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }

/* Phone: makeable drinks as row cards, so One bottle away stays near the shelf */
@media (max-width: 56.24em) {
  .home-make .cards { grid-template-columns: minmax(0, 1fr); }
  .home-make .c a { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); column-gap: var(--s-4); align-content: center; padding: var(--s-3) var(--s-12) var(--s-3) var(--s-3); }
  .home-make .c-art { grid-row: span 3; margin: 0; border-radius: calc(var(--radius-card) - 4px); }
  .home-make .c-spec { display: block; }
}
@media (min-width: 48em) {
  .how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-10); }
  .spirits { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .myshelf__bottles { grid-template-columns: repeat(auto-fill, minmax(6rem, 8.5rem)); gap: var(--s-6); }
  .myshelf .bottle__name, .ghost__name { min-height: 0; font-size: var(--size-small); }
}
@media (min-width: 56.25em) {
  .hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; column-gap: var(--s-12); padding-block: var(--s-16) var(--s-8); }
  .shelfhero { padding-top: var(--s-12); }
  .shelfhero__head { margin-bottom: var(--s-10); }
  .myshelf { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); column-gap: var(--s-10); align-items: end; }
  .myshelf .home-add { order: 0; padding-bottom: var(--s-5); }
  .unlock { grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: var(--s-5); }
  .unlock__body { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-5); }
  .home .sec, .home .ad-wrap { margin-top: var(--s-24); }
}

@media (prefers-reduced-motion: reduce) { .start__b, .spirits a, .ghost__slot { transition: none; } }
