/* ============================================================
   Carr & Co. — a modern cocktail bar.
   Warm near-black room, one vivid accent per drink, soft light.
   Built phone-first; the desktop layout is the enhancement.
   ============================================================ */

:root {
  /* Room */
  --bg:        #100E0D;
  --bg-deep:   #0A0908;
  --surface:   #191614;
  --surface-2: #211D1A;
  --surface-3: #2A2521;
  --line:      rgba(247, 241, 233, .09);
  --line-firm: rgba(247, 241, 233, .16);

  /* Light */
  --text:      #F7F1E9;
  --muted:     rgba(247, 241, 233, .64);
  --faint:     rgba(247, 241, 233, .42);

  /* Per drink, set from JS */
  --accent:      #F2557F;
  --accent-soft: #FF9DBB;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 10px -4px rgba(0,0,0,.7);
  --shadow-md: 0 18px 40px -28px rgba(0,0,0,.95);
  --shadow-lg: 0 40px 80px -50px rgba(0,0,0,1);

  --ease: cubic-bezier(.22, .68, .36, 1);
  --pad: clamp(1rem, 4.5vw, 2rem);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --batchbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--batchbar-h) + var(--safe-b));
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.1; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { display: block; }

.label {
  display: block; font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin-bottom: .6rem;
}
.label__hint { text-transform: none; letter-spacing: .02em; font-weight: 400; opacity: .8; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--accent); color: #14100F; padding: .8rem 1.2rem;
  border-radius: var(--r-pill); font-weight: 600;
}
.skip:focus { left: 1rem; top: calc(1rem + var(--safe-t)); }

:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }

/* ---- Room atmosphere ------------------------------------------ */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient__blob {
  position: absolute; top: -22vh; left: 50%; transform: translateX(-50%);
  width: min(150vw, 1100px); aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 62%);
  filter: blur(30px); opacity: .5;
  transition: background 1.1s var(--ease);
}
.ambient__grain {
  position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  padding: calc(.7rem + var(--safe-t)) 0 .7rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 1240px; margin: 0 auto;
  padding: 0 calc(var(--pad) + var(--safe-l)) 0 calc(var(--pad) + var(--safe-r));
}

.brand { display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; text-decoration: none; color: inherit; }
.brand__mark {
  display: grid; place-items: center; width: 2.3rem; height: 2.3rem; flex: none;
  border-radius: var(--r-sm); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  transition: color .5s var(--ease), background .5s var(--ease), border-color .5s var(--ease);
}
.brand__mark svg { width: 1.25rem; height: 1.25rem; }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-family: var(--display); font-size: 1.16rem; font-weight: 600; letter-spacing: -.01em; }
.brand__sub {
  font-size: .58rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; margin-top: .15rem;
}

.iconbtn {
  display: inline-flex; align-items: center; gap: .5rem; flex: none;
  min-height: 40px; padding: .5rem .9rem; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); color: var(--muted);
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  transition: color .25s, border-color .25s, background .25s;
}
.iconbtn:hover { color: var(--text); border-color: var(--line-firm); }
.iconbtn__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); transition: all .3s;
}
.iconbtn[aria-pressed="false"] .iconbtn__dot { background: var(--faint); box-shadow: none; }

/* ============================================================
   The drink-page bar
   ============================================================ */
.detailbar {
  position: sticky; top: calc(3.4rem + var(--safe-t)); z-index: 55;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.detailbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  max-width: 1240px; margin: 0 auto;
  padding: .55rem calc(var(--pad) + var(--safe-l)) .55rem calc(var(--pad) + var(--safe-r));
}
.detailbar__now {
  font-size: .66rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.detailbar__steppers { display: inline-flex; gap: .35rem; flex: none; }

.chipbtn {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: .45rem .9rem; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); color: var(--muted);
  font-size: .82rem; font-weight: 600;
  transition: color .25s, border-color .25s, background .25s, transform .12s;
}
.chipbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chipbtn:hover { color: var(--text); border-color: var(--line-firm); }
.chipbtn:active { transform: scale(.95); }
.chipbtn--icon { padding: .45rem .6rem; }

/* ============================================================
   The menu — the front door
   ============================================================ */
.menu { animation: settle .5s var(--ease) both; }
.menu__head { text-align: center; padding: clamp(.6rem, 3vw, 2rem) 0 clamp(1.4rem, 3.5vw, 2.4rem); }
.menu__title {
  font-size: clamp(2.4rem, 8vw, 3.8rem); font-weight: 600; letter-spacing: -.02em;
  font-variation-settings: 'SOFT' 22, 'WONK' 1;
}
.menu__sub { margin: .7rem auto 0; max-width: 42ch; color: var(--muted); font-size: .95rem; }

.menu__section + .menu__section { margin-top: clamp(1.8rem, 4vw, 2.8rem); }
.menu__cat {
  display: flex; align-items: baseline; gap: .6rem;
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 1rem;
}
.menu__cat em { font-style: normal; color: var(--faint); opacity: .7; font-size: .68rem; letter-spacing: .05em; }
.menu__cat::after { content: ''; flex: 1; height: 1px; background: var(--line); align-self: center; }

.menu__grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.menucard {
  display: grid; grid-template-rows: auto 1fr; text-align: left; cursor: pointer;
  background: linear-gradient(170deg, var(--surface-2), var(--surface) 70%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 0; overflow: hidden; color: inherit;
  transition: border-color .3s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
  animation: settle .5s var(--ease) both;
  animation-delay: calc(min(var(--i, 0), 8) * 45ms);
}
.menucard:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--accent) 45%, #000);
}
.menucard:active { transform: translateY(-1px) scale(.99); }

.menucard__stage {
  display: grid; place-items: center; position: relative;
  padding: 1rem 0 .4rem; min-height: 150px;
  background: radial-gradient(58% 62% at 50% 46%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 72%);
}
.menucard__stage svg { width: 108px; height: auto; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }

.menucard__body { display: grid; gap: .3rem; padding: .2rem 1.1rem 1.1rem; }
.menucard__era {
  font-size: .58rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent-soft);
}
.menucard__name { font-family: var(--display); font-size: 1.32rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.menucard__tag {
  font-size: .8rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.menucard__meta { margin-top: .3rem; font-size: .68rem; font-weight: 600; letter-spacing: .05em; color: var(--faint); }

/* the batch bar belongs to a drink page, never the menu */
body.is-menu .batchbar { display: none; }

/* phones: two columns keeps twelve drinks scannable */
@media (max-width: 620px) {
  .menu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .menucard__stage { min-height: 112px; padding: .7rem 0 .2rem; }
  .menucard__stage svg { width: 82px; }
  .menucard__body { padding: .1rem .8rem .85rem; gap: .25rem; }
  .menucard__name { font-size: 1.06rem; }
  .menucard__era { font-size: .52rem; letter-spacing: .14em; }
  .menucard__tag { display: none; }
  .menucard__meta { font-size: .62rem; margin-top: .1rem; }
}

/* ============================================================
   Shell
   ============================================================ */
.shell {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 2.4rem) calc(var(--pad) + var(--safe-l)) 3rem calc(var(--pad) + var(--safe-r));
}
.drinkcard { display: grid; gap: clamp(1.1rem, 3vw, 1.6rem); }

/* ---- Hero ------------------------------------------------------ */
.hero {
  display: grid; gap: 1.2rem;
  background: linear-gradient(168deg, var(--surface-2), var(--surface) 62%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 4vw, 2.2rem);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero__stage {
  position: relative; display: grid; place-items: center;
  padding: .5rem 0 1rem; min-height: 210px;
  background: radial-gradient(46% 14% at 50% 88%, rgba(255,255,255,.035), transparent 75%);
}
.hero__glow {
  position: absolute; width: 82%; max-width: 380px; aspect-ratio: 1;
  border-radius: 50%; filter: blur(42px);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 52%, transparent), transparent 70%);
  opacity: .6; transition: background .8s var(--ease);
}
.glass-wrap {
  position: relative; z-index: 2;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.45));
  animation: settle .7s var(--ease) both;
}
.glass { width: clamp(150px, 44vw, 200px); height: auto; }
.glass .liquid { transition: transform .5s var(--ease); }
.is-shaking .glass-wrap { animation: shake .38s ease-in-out infinite; }

.hero__copy { text-align: center; display: grid; gap: .55rem; }
.hero__era {
  margin: 0; font-size: .64rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent-soft);
}
.hero__name {
  font-size: clamp(2.15rem, 9.5vw, 3.6rem);
  font-weight: 600; letter-spacing: -.02em; text-wrap: balance;
  font-variation-settings: 'SOFT' 22, 'WONK' 1;
}
.hero__tagline {
  margin: 0 auto; max-width: 46ch; color: var(--muted);
  font-size: .95rem; line-height: 1.55; text-wrap: pretty;
}

/* ---- Stats ----------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem;
  margin: .8rem 0 0; text-align: left;
}
.stat {
  margin: 0; padding: .8rem .85rem;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.stat dt {
  display: flex; align-items: center; gap: .35rem;
  font-size: .58rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: .2rem;
}
.stat__glyph { display: grid; place-items: center; color: var(--accent-soft); }
.stat__glyph svg { width: 12px; height: 12px; }
.stat dd {
  margin: 0; font-family: var(--display); font-size: 1.42rem; font-weight: 600;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.stat dd small {
  font-family: var(--sans); font-size: .58rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-left: .3em;
}
.stat--strength dd { color: var(--accent-soft); }
.stat__caption { margin: .25rem 0 0; font-size: .66rem; color: var(--faint); line-height: 1.35; }

/* ============================================================
   Controls
   ============================================================ */
.controls {
  display: grid; gap: 1.3rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.1rem, 4vw, 1.6rem);
}
.controls__row { display: grid; gap: 1.3rem; }
.control { min-width: 0; }

.stepper {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: .3rem;
}
.stepper__btn {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text);
  transition: background .2s, transform .12s, opacity .2s, color .2s;
}
.stepper__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.stepper__btn:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface-3)); }
.stepper__btn:active { transform: scale(.9); }
.stepper__btn:disabled { opacity: .3; cursor: not-allowed; background: var(--surface-3); }

.stepper__readout {
  display: inline-flex; align-items: baseline; gap: .35rem;
  justify-content: center; min-width: 7.4rem; padding: 0 .3rem;
}
.stepper__input {
  width: 2.2rem; background: none; border: 0; padding: 0;
  font-family: var(--display); font-size: 1.7rem; font-weight: 600;
  text-align: right; -moz-appearance: textfield; appearance: textfield;
  font-variant-numeric: tabular-nums;
}
.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input:focus { outline: none; color: var(--accent-soft); }
.stepper__unit { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

.presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.preset {
  min-width: 44px; min-height: 44px; padding: .3rem .9rem; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--muted); font-size: .82rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all .2s var(--ease);
}
.preset:hover { color: var(--text); border-color: var(--line-firm); }
.preset:active { transform: scale(.94); }
.preset.is-on {
  background: var(--accent); border-color: var(--accent); color: #14100F;
}

.segmented {
  display: inline-flex; padding: .28rem; gap: .2rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill);
}
.segmented__opt {
  min-height: 40px; padding: .4rem 1.15rem; cursor: pointer;
  background: none; border: 0; border-radius: var(--r-pill);
  color: var(--muted); font-size: .85rem; font-weight: 600;
  transition: all .25s var(--ease);
}
.segmented__opt:active { transform: scale(.96); }
.segmented__opt.is-on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }

.select {
  appearance: none; width: 100%; cursor: pointer;
  background-color: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  /* 16px keeps iOS from zooming the page when a select is focused */
  font-size: 16px; font-weight: 500;
  padding: .7rem 2.4rem .7rem .85rem; min-height: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23F7F1E9' stroke-opacity='.55' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 11px;
  transition: border-color .2s, background-color .2s;
}
.select:hover { border-color: var(--line-firm); }
.select option { background: var(--surface-2); color: var(--text); }
.select optgroup { background: var(--bg-deep); color: var(--faint); }
.select--house { max-width: 22rem; }
.house__hint { margin: .55rem 0 0; font-size: .78rem; color: var(--faint); font-style: italic; }

/* ============================================================
   Panels
   ============================================================ */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.1rem, 4vw, 1.7rem);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: .9rem;
}
.panel__title { font-size: 1.32rem; font-weight: 600; letter-spacing: -.01em; }
.panel__count { font-size: .74rem; font-weight: 600; color: var(--faint); letter-spacing: .04em; }
.panel__note { margin: 0 0 1.1rem; font-size: .84rem; color: var(--muted); line-height: 1.55; }
.panel__note strong { color: var(--accent-soft); font-weight: 700; }

/* ---- Ingredients ------------------------------------------------ */
.ingredients { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ing {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .85rem;
  align-items: baseline;
  padding: .8rem .9rem;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: border-color .25s;
}
.ing--spirit {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}
.ing__amt {
  font-family: var(--display); font-size: 1.16rem; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  min-width: 4.6rem; text-align: right;
}
.ing--spirit .ing__amt { color: var(--accent-soft); }
.ing__amt em {
  font-style: normal; font-family: var(--sans); font-size: .6rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.ing__name { font-size: .95rem; font-weight: 500; }
.ing__name::first-letter { text-transform: capitalize; }
.ing__note { font-size: .76rem; color: var(--faint); font-style: italic; font-weight: 400; }
.ing__swap { grid-column: 2; margin-top: .5rem; }
.ing__swap:first-of-type { margin-top: .25rem; }
.ing__meta { grid-column: 2; margin: .4rem 0 0; font-size: .72rem; color: var(--faint); }

/* ---- Method ------------------------------------------------------ */
.progress {
  height: 4px; border-radius: var(--r-pill); overflow: hidden;
  background: var(--surface-3); margin-bottom: 1.1rem;
}
.progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: inherit; transition: width .45s var(--ease);
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; counter-reset: step; }
.step {
  counter-increment: step; cursor: pointer;
  display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: .9rem;
  padding: .9rem 1rem;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: background .25s, border-color .25s, opacity .3s;
}
.step:hover { border-color: var(--line-firm); }
.step:active { background: var(--surface-3); }
.step__num {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none;
  border-radius: 50%; border: 1.5px solid var(--line-firm);
  font-size: .82rem; font-weight: 700; color: var(--muted);
  transition: all .3s var(--ease); user-select: none;
}
.step__num::before { content: counter(step); }
.step__text { margin: 0; font-size: .93rem; line-height: 1.62; text-wrap: pretty; }
.step__text b { color: var(--accent-soft); font-weight: 600; }
.step.is-done { opacity: .5; }
.step.is-done .step__num { background: var(--accent); border-color: var(--accent); color: #14100F; }
.step.is-done .step__num::before { content: '✓'; font-size: .95rem; }
.step__timer { margin-top: .75rem; }

.done {
  display: grid; gap: .55rem; justify-items: center;
  margin: 1rem 0 0; padding: 1rem 1.1rem 1.05rem; text-align: center;
  border-radius: var(--r-md); font-size: .92rem;
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  animation: settle .5s var(--ease) both;
}
.done__text { margin: 0; }
.done strong { font-family: var(--display); font-weight: 600; }
.done .btn { color: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.done .btn:hover { color: var(--text); }

/* ---- Tips -------------------------------------------------------- */
.tips { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .7rem; }
.tips li {
  position: relative; padding-left: 1.5rem;
  font-size: .89rem; color: var(--muted); line-height: 1.6;
}
.tips li::before {
  content: ''; position: absolute; left: .3rem; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .8;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.2rem; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--r-pill); color: var(--text);
  font-size: .86rem; font-weight: 600; letter-spacing: .01em;
  transition: background .22s, border-color .22s, transform .12s, color .22s;
}
.btn:hover { border-color: var(--line-firm); background: color-mix(in srgb, var(--accent) 14%, var(--surface-3)); }
.btn:active { transform: scale(.97); }
.btn__icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--text); }
.btn--sm { min-height: 40px; padding: .45rem 1rem; font-size: .78rem; }
.btn--wide { width: 100%; margin-top: 1.1rem; }
.btn--accent {
  background: var(--accent); border-color: var(--accent); color: #14100F;
}
.btn--accent:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #14100F; }

.cardactions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.cardactions .btn { flex: 1 1 12rem; }

/* ============================================================
   Shake timer
   ============================================================ */
.timer {
  position: fixed; z-index: 90;
  left: 50%; transform: translateX(-50%);
  bottom: calc(1rem + var(--safe-b) + var(--batchbar-h));
  width: min(92vw, 22rem);
  animation: rise .35s var(--ease) both;
}
.timer__inner {
  display: grid; place-items: center; gap: .7rem;
  padding: 1.2rem 1rem 1.1rem;
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line-firm); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.timer__ring { width: 108px; height: 108px; transform: rotate(-90deg); grid-area: 1 / 1; }
.timer__track { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.timer__fill {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 276.46; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.timer__face { grid-area: 1 / 1; display: grid; place-items: center; text-align: center; }
.timer__count { font-family: var(--display); font-size: 2.3rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.timer__label { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin-top: .2rem; }
#timerStop { grid-area: 2 / 1; }

/* ============================================================
   Batch bar — phones only, sits in the thumb zone
   ============================================================ */
.batchbar {
  position: fixed; z-index: 70; inset: auto 0 0 0;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem calc(var(--pad) + var(--safe-r)) calc(.6rem + var(--safe-b)) calc(var(--pad) + var(--safe-l));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid var(--line);
}
.batchbar__glass {
  display: grid; place-items: center; flex: none;
  width: 2.2rem; height: 2.2rem; border-radius: var(--r-sm);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  transition: color .5s var(--ease), background .5s var(--ease), border-color .5s var(--ease);
}
.batchbar__glass svg { width: 1.2rem; height: 1.2rem; }
.batchbar__label { min-width: 0; flex: 1; }
.batchbar__drink {
  display: block; font-family: var(--display); font-size: 1rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.batchbar__hint { display: block; font-size: .64rem; color: var(--faint); letter-spacing: .04em; }
.batchbar__stepper {
  display: flex; align-items: center; gap: .35rem; flex: none;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: .28rem;
}
.batchbar__count {
  min-width: 2.4rem; text-align: center;
  font-family: var(--display); font-size: 1.32rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Toast, confetti, colophon
   ============================================================ */
.toast {
  position: fixed; z-index: 120; left: 50%;
  bottom: calc(1.2rem + var(--safe-b) + var(--batchbar-h));
  transform: translate(-50%, 14px);
  max-width: min(92vw, 26rem); text-align: center;
  padding: .8rem 1.3rem; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--line-firm);
  box-shadow: var(--shadow-lg);
  font-size: .84rem; font-weight: 500;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .4s var(--ease), opacity .3s var(--ease), visibility .4s;
}
.toast.is-up { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

.confetti { position: fixed; inset: 0; z-index: 110; pointer-events: none; width: 100%; height: 100%; }

.colophon {
  position: relative; z-index: 1; text-align: center;
  padding: 1rem calc(var(--pad) + var(--safe-l)) 2.6rem calc(var(--pad) + var(--safe-r));
  color: var(--faint); font-size: .76rem; line-height: 1.65;
}
.colophon p { margin: .3rem auto; max-width: 52ch; }
.colophon__mark { font-weight: 600; letter-spacing: .02em; }
.colophon__legal { font-size: .7rem; opacity: .8; }
.colophon a { color: var(--accent-soft); text-decoration: none; }
.colophon a:hover { text-decoration: underline; }

/* ============================================================
   Motion
   ============================================================ */
.glass .bubble { animation: bubble-rise var(--dur, 6s) linear infinite; }
@keyframes bubble-rise {
  0%   { transform: translateY(12px); opacity: 0; }
  18%  { opacity: .7; }
  85%  { opacity: .45; }
  100% { transform: translateY(-36px); opacity: 0; }
}

@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 25px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-5px, -3px) rotate(-3deg); }
  50% { transform: translate(4px, 2px) rotate(2.5deg); }
  75% { transform: translate(-3px, 3px) rotate(-1.5deg); }
}
.is-pouring .hero,
.is-pouring .controls,
.is-pouring .panel,
.is-pouring .cardactions { animation: settle .45s var(--ease) both; }
.is-pouring .hero { animation-delay: 0s; }
.is-pouring .controls { animation-delay: .05s; }
.is-pouring .panel:nth-of-type(1) { animation-delay: .09s; }
.is-pouring .panel:nth-of-type(2) { animation-delay: .13s; }
.is-pouring .panel:nth-of-type(3) { animation-delay: .17s; }
.is-pouring .cardactions { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ============================================================
   Phones
   ============================================================ */
@media (max-width: 767px) {
  :root { --batchbar-h: 64px; }
  .batchbar { display: flex; }
  .hero { padding: 1.2rem 1rem 1.4rem; }
  .hero__stage { min-height: 190px; }
  .stats { gap: .45rem; }
  .stat { padding: .7rem .75rem; }
  .stat dd { font-size: 1.28rem; }
  .ing { grid-template-columns: minmax(0, 1fr); gap: .3rem; padding: .85rem .95rem; }
  .ing__amt { text-align: left; min-width: 0; font-size: 1.24rem; }
  .ing__swap, .ing__meta { grid-column: 1; }
  .cardactions .btn { flex: 1 1 100%; }
  .panel__head { flex-wrap: wrap; gap: .5rem; }
}

/* Very narrow phones (SE) */
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; }
  .stepper__readout { min-width: 6rem; }
  .brand__sub { display: none; }
}

/* ============================================================
   Tablet and up
   ============================================================ */
@media (min-width: 768px) {
  .controls__row { grid-template-columns: auto auto; justify-content: start; gap: 2.4rem; align-items: start; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 2rem; }
  .cardactions { justify-content: flex-start; }
  .cardactions .btn { flex: 0 0 auto; }
  .timer { left: auto; right: 1.5rem; transform: none; bottom: 1.5rem; width: 16rem; animation: settle .35s var(--ease) both; }
  .toast { bottom: 1.5rem; }
}

@media (min-width: 1024px) {
  .controls { grid-template-columns: auto auto minmax(16rem, 24rem); gap: 1.4rem 2.6rem; align-items: start; }
  .controls__row { display: contents; }
  .control--house { justify-self: end; width: 100%; }
  .select--house { max-width: none; }

  .hero {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    align-items: center; gap: 2.4rem; padding: 2.4rem;
  }
  .hero__stage { min-height: 300px; padding: 0; }
  .hero__copy { text-align: left; }
  .hero__tagline { margin: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .glass { width: clamp(190px, 18vw, 230px); }
  .shell { padding-top: 2rem; }
  .drinkcard { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1180px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .drinkcard {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-areas:
      'hero     hero'
      'controls controls'
      'build    method'
      'build    notes'
      'actions  actions';
    align-items: start; gap: 1.4rem;
  }
  .hero { grid-area: hero; }
  .controls { grid-area: controls; }
  #build { grid-area: build; }
  .panel:nth-of-type(2) { grid-area: method; }
  .panel:nth-of-type(3) { grid-area: notes; }
  .cardactions { grid-area: actions; }
}

/* ============================================================
   Print — a clean card for the counter
   ============================================================ */
@media print {
  :root { --text: #111; --muted: #333; --faint: #666; --line: #ddd; --surface: #fff; --surface-2: #fff; --surface-3: #fff; }
  body { background: #fff; color: #111; padding: 0; }
  .ambient, .topbar, .detailbar, .menu, .controls, .batchbar, .timer, .toast, .confetti,
  .cardactions, .skip, .select, .ing__swap, .ing__meta, .step__timer,
  .progress, #resetPicks, #copyList { display: none !important; }
  .shell { padding: 0; max-width: none; }
  .hero, .panel { border: 0; border-radius: 0; padding: 0 0 1rem; box-shadow: none; background: #fff; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { text-align: center; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { border: 1px solid #ddd; }
  .step, .ing { break-inside: avoid; border: 0; border-bottom: 1px solid #eee; border-radius: 0; padding: .45rem 0; }
  .step.is-done { opacity: 1; }
  .glass { width: 130px; }
  a { color: #111; }
}
