/* ═══════════════════════════════════════
   MIXMASTER AI — STYLES
   Dark glassmorphism · Amber palette
═══════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg:           #06040A;
  --bg2:          #0D0A15;
  --surface:      rgba(18, 12, 6, 0.72);
  --surface-hi:   rgba(30, 20, 10, 0.90);
  --surface-top:  rgba(10, 8, 16, 0.82);

  /* Amber palette */
  --amber-300:    #FCD34D;
  --amber-400:    #FBBF24;
  --amber-500:    #F59E0B;
  --amber-600:    #D97706;
  --amber-700:    #B45309;

  /* Semantic */
  --primary:      #D97706;
  --primary-lt:   #F59E0B;
  --primary-glow: rgba(217, 119, 6, 0.35);
  --primary-dim:  rgba(217, 119, 6, 0.12);

  /* Text */
  --text:         #F5EDD8;
  --text-muted:   #9A8870;
  --text-dim:     #5A4A38;

  /* Borders */
  --border:       rgba(217, 119, 6, 0.16);
  --border-hi:    rgba(217, 119, 6, 0.42);

  /* Misc accents */
  --red:          #EF4444;
  --green:        #10B981;
  --blue:         #60A5FA;
  --purple:       #A78BFA;

  /* Effects */
  --blur:         blur(22px);
  --blur-sm:      blur(12px);
  --shadow:       0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.45);
  --radius:       20px;
  --radius-sm:    12px;
  --radius-lg:    28px;

  font-family: 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 65% 0%, rgba(217,119,6,.14) 0%, transparent 55%),
              radial-gradient(ellipse at 15% 100%, rgba(139,92,246,.07) 0%, transparent 45%),
              linear-gradient(180deg, #080510 0%, #040208 100%);
  color: var(--text);
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-family: 'Playfair Display', serif; }
h1 em, h2 em { font-style: italic; color: var(--primary-lt); }
p { margin: 0; }
.hidden { display: none !important; }

/* ── AGE GATE ── */
.age-gate {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(4, 3, 10, 0.97);
  z-index: 1000;
}
.age-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(217,119,6,.18), transparent 60%);
  pointer-events: none;
}
.age-card {
  position: relative;
  width: min(520px, 100%);
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  background: rgba(14, 10, 6, 0.98);
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow), 0 0 80px rgba(217,119,6,.12);
  text-align: center;
}
.age-logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--text); margin-bottom: 28px;
}
.age-logo em { color: var(--primary-lt); font-style: italic; }
.age-logo-icon { width: 44px; height: 44px; }
.age-card h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text), var(--amber-300));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.age-card > p { color: var(--text-muted); line-height: 1.7; margin-bottom: 32px; }
.age-legal { display: block; margin-top: 16px; color: var(--text-dim); font-size: .82rem; line-height: 1.6; }

/* ── APP SHELL ── */
.app { display: flex; flex-direction: column; min-height: 100dvh; }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  background: rgba(6, 4, 10, 0.82);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  border: none; background: none; padding: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700;
  color: var(--text); white-space: nowrap;
  text-decoration: none;
}
.topbar-brand em { color: var(--primary-lt); font-style: italic; }
.brand-icon { width: 32px; height: 32px; flex-shrink: 0; }
.topbar-search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.topbar-search svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.topbar-search input {
  flex: 1; border: none; background: none; outline: none;
  font-size: .9rem; color: var(--text);
}
.topbar-search input::placeholder { color: var(--text-dim); }
.topbar-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: none; background: rgba(255,255,255,.05);
  border-radius: 12px; color: var(--text-muted);
  transition: background .2s, color .2s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--primary-dim); color: var(--primary-lt); }
.sidebar-toggle { display: none; }

/* ── LAYOUT ── */
.layout {
  display: flex;
  flex: 1;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 64px;
  align-self: flex-start;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  padding: 20px 16px;
  border-right: 1px solid rgba(255,255,255,.04);
}
.nav-section { margin-bottom: 28px; }
.nav-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .7rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding: 0 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 12px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem; font-weight: 500;
  text-align: left;
  transition: all .2s ease;
  margin-bottom: 2px;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--primary-dim); color: var(--text); }
.nav-item.active {
  background: var(--primary-dim);
  color: var(--primary-lt);
  border: 1px solid var(--border);
}

/* ── MAIN ── */
.main {
  flex: 1; min-width: 0;
  padding: 32px 28px 120px;
}

/* ── PAGES ── */
.page { animation: pageIn .25s ease-out; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HERO ── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 60px;
  margin-bottom: 56px;
}
.hero-glow {
  position: absolute;
  top: -120px; left: -100px; right: -100px; bottom: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(217,119,6,.16) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-dim);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--primary-lt);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin-bottom: 20px;
  background: linear-gradient(160deg, var(--text) 40%, var(--amber-300));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; align-items: center; gap: 0; }
.hstat { text-align: center; padding: 0 24px; }
.hstat span {
  display: block;
  font-size: 1.5rem; font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--primary-lt);
}
.hstat small { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.hstat-sep { width: 1px; height: 36px; background: var(--border); }

.hero-visual { position: relative; }
.hero-card-skeleton {
  aspect-ratio: 1;
  max-width: 360px;
  border-radius: var(--radius-lg);
  background: rgba(20,12,6,.7);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

/* Hero featured card */
.featured-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  max-width: 360px;
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-card), 0 0 60px rgba(217,119,6,.15);
  transition: transform .25s ease, box-shadow .25s ease;
}
.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow), 0 0 80px rgba(217,119,6,.25);
}
.featured-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.featured-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(0deg, rgba(6,4,10,.95) 0%, rgba(6,4,10,.3) 60%, transparent 100%);
}
.featured-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--primary-lt);
  margin-bottom: 8px;
}
.featured-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; color: var(--text); margin-bottom: 12px;
}
.featured-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ── SECTION HEADERS ── */
.home-section { margin-bottom: 48px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.section-head h2 { font-size: 1.5rem; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 8px; }
.page-head p { color: var(--text-muted); }
.page-head-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 28px;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-500));
  color: #fff; font-weight: 700; font-size: .92rem;
  transition: all .2s ease;
  box-shadow: 0 4px 16px rgba(217,119,6,.35);
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(217,119,6,.5);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.active { background: linear-gradient(135deg, #B45309, var(--amber-600)); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--border-hi);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--text); font-weight: 600; font-size: .92rem;
  transition: all .2s ease;
}
.btn-secondary svg { width: 16px; height: 16px; }
.btn-secondary:hover { background: var(--primary-dim); border-color: var(--primary-lt); color: var(--primary-lt); transform: translateY(-1px); }

.btn-ghost {
  background: none; border: none;
  color: var(--primary-lt); font-weight: 600; font-size: .9rem;
  padding: 8px 4px;
  transition: color .2s;
}
.btn-ghost:hover { color: var(--amber-300); }

.btn-lg { padding: 15px 28px; font-size: 1rem; }

/* ── DRINK GRID ── */
.drink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.explore-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ── DRINK CARD ── */
.drink-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}
.drink-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-card), 0 0 30px rgba(217,119,6,.18);
}
.drink-card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(20,12,6,.5);
}
.drink-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.drink-card:hover .drink-card-img img { transform: scale(1.06); }
.drink-card-img img[src=""] { opacity: 0; }

.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: rgba(6,4,10,.75);
  backdrop-filter: var(--blur-sm);
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: all .2s;
}
.fav-btn svg { width: 16px; height: 16px; }
.fav-btn:hover, .fav-btn.active { color: var(--red); background: rgba(239,68,68,.2); }
.fav-btn.active svg { fill: var(--red); stroke: var(--red); }

.alc-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
  background: rgba(6,4,10,.8);
  backdrop-filter: var(--blur-sm);
}
.alc-badge.alcoholic { color: var(--primary-lt); border: 1px solid rgba(217,119,6,.4); }
.alc-badge.nonalc { color: var(--green); border: 1px solid rgba(16,185,129,.3); }

.match-badge {
  position: absolute; bottom: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  background: rgba(6,4,10,.85);
  backdrop-filter: var(--blur-sm);
  color: var(--primary-lt);
  border: 1px solid var(--border);
}

.drink-card-body { padding: 14px; }
.drink-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drink-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.drink-meta-tag {
  font-size: .7rem; color: var(--text-dim);
  background: rgba(255,255,255,.04);
  padding: 2px 8px; border-radius: 999px;
}
.drink-missing {
  margin-top: 8px;
  font-size: .72rem; color: var(--amber-600);
}

/* ── SKELETON LOADER ── */
.skeleton-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.skeleton-img {
  aspect-ratio: 1;
  background: rgba(255,255,255,.04);
}
.skeleton-body { padding: 14px; }
.skeleton-line {
  height: 12px; border-radius: 6px;
  background: rgba(255,255,255,.05);
  margin-bottom: 8px;
}
.shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(217,119,6,.06) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* ── EXPLORE ── */
.load-more-wrap { display: flex; justify-content: center; margin: 32px 0 16px; }
.explore-bar { margin-bottom: 16px; }
.search-field {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: var(--blur-sm);
  transition: border-color .2s;
}
.search-field:focus-within { border-color: var(--border-hi); }
.search-field svg { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0; }
.search-field input {
  flex: 1; border: none; background: none; outline: none;
  font-size: .95rem; color: var(--text);
}
.search-field input::placeholder { color: var(--text-dim); }
.clear-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: .85rem; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  transition: color .2s;
}
.clear-btn:hover { color: var(--text); }

.filter-row {
  display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 12px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.ftab {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
  font-size: .85rem; font-weight: 500;
  transition: all .2s;
}
.ftab:hover { color: var(--text); border-color: var(--border-hi); }
.ftab.active { background: var(--primary-dim); border-color: var(--border-hi); color: var(--primary-lt); }

.spirit-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; overflow-x: auto;
  padding-bottom: 6px; margin-bottom: 20px;
  scrollbar-width: none;
}
.spirit-row::-webkit-scrollbar { display: none; }
.spirit-label { color: var(--text-dim); font-size: .8rem; white-space: nowrap; }
.spirit-chips { display: flex; gap: 6px; }
.chip {
  white-space: nowrap; padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text-muted);
  font-size: .8rem; font-weight: 500;
  transition: all .2s;
}
.chip:hover { border-color: var(--border-hi); color: var(--text); }
.chip.active { background: var(--primary-dim); border-color: var(--border-hi); color: var(--primary-lt); }

.load-more-row { display: flex; justify-content: center; margin-top: 24px; }

/* ── AI BARTENDER ── */
.ai-header {
  text-align: center;
  padding: 48px 0 40px;
}
.ai-icon-wrap { margin-bottom: 20px; }
.ai-icon-wrap svg { width: 72px; height: 72px; margin: 0 auto; }
.ai-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  background: linear-gradient(135deg, var(--text), var(--amber-300));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 12px;
}
.ai-header p { color: var(--text-muted); font-size: 1.05rem; }

.ai-input-panel {
  max-width: 680px; margin: 0 auto 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.ai-label {
  display: block;
  font-weight: 600; font-size: .95rem;
  margin-bottom: 12px; color: var(--text);
}

.chips-input-wrap {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 52px;
  cursor: text;
  transition: border-color .2s;
}
.chips-input-wrap:focus-within { border-color: var(--border-hi); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ing-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(217,119,6,.25), rgba(251,191,36,.15));
  border: 1px solid rgba(217,119,6,.35);
  color: var(--primary-lt); font-size: .82rem; font-weight: 600;
  animation: chipIn .2s ease-out;
}
@keyframes chipIn {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.ing-chip-remove {
  background: none; border: none;
  color: var(--primary-lt); opacity: .6;
  padding: 0; font-size: .9rem; line-height: 1;
  transition: opacity .2s;
}
.ing-chip-remove:hover { opacity: 1; }
.chips-input-wrap input {
  flex: 1; min-width: 140px;
  border: none; background: none; outline: none;
  font-size: .9rem; color: var(--text);
}
.chips-input-wrap input::placeholder { color: var(--text-dim); }

.ai-suggestions {
  position: relative;
  background: var(--surface-hi);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  max-height: 180px; overflow-y: auto;
  z-index: 10; margin-top: 4px;
}
.ai-suggestion-item {
  padding: 10px 14px; cursor: pointer; font-size: .9rem;
  transition: background .15s;
}
.ai-suggestion-item:hover { background: var(--primary-dim); color: var(--primary-lt); }

.ai-quick-add {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-top: 12px;
}
.ai-quick-add span { font-size: .78rem; color: var(--text-dim); }
.chip-sm {
  padding: 4px 12px; border-radius: 999px;
  border: 1px dashed rgba(217,119,6,.3);
  background: none;
  color: var(--text-muted); font-size: .78rem;
  transition: all .2s;
}
.chip-sm:hover { border-color: var(--primary-lt); color: var(--primary-lt); background: var(--primary-dim); }

.ai-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }

.ai-loading {
  text-align: center; padding: 60px 20px;
}
.loading-dots {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 16px;
}
.loading-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary-lt);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
  0%, 100% { transform: scale(.7); opacity: .4; }
  50%       { transform: scale(1.1); opacity: 1; }
}
.ai-loading p { color: var(--text-muted); }

.ai-empty-state {
  text-align: center; padding: 60px 20px;
}
.ai-empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; }
.ai-empty-state p { color: var(--text-muted); }

.ai-results { display: grid; gap: 40px; }
.result-section {}
.rs-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rs-head h3 { font-size: 1.1rem; color: var(--text); font-family: 'Inter', sans-serif; font-weight: 600; }
.rs-badge {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.rs-badge.perfect { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.3); }
.rs-badge.near    { background: rgba(217,119,6,.15);  color: var(--primary-lt); border: 1px solid rgba(217,119,6,.3); }
.rs-badge.partial { background: rgba(96,165,250,.12); color: var(--blue); border: 1px solid rgba(96,165,250,.25); }
.no-results-msg { color: var(--text-dim); font-size: .9rem; padding: 12px 0; }

/* ── AI RESULT WRAP ── */
.ai-result-wrap { display: flex; flex-direction: column; }
.btn-add-shopping {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px 12px;
  background: rgba(217,119,6,.1); border: 1px solid rgba(217,119,6,.25);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--primary-lt); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-add-shopping:hover { background: rgba(217,119,6,.2); border-color: rgba(217,119,6,.5); }
.btn-add-shopping.added { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: var(--green); }

/* ── SHOPPING LIST ── */
.shopping-list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.shopping-count { font-size: .9rem; color: var(--text-muted); }
.shopping-group { margin-bottom: 24px; }
.shopping-group-label {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary-lt);
  margin-bottom: 10px; opacity: .85;
}
.shopping-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  margin-bottom: 6px; transition: background .15s;
}
.shopping-item.checked { opacity: .5; }
.shopping-item.checked .shopping-ing-name { text-decoration: line-through; }
.shopping-check-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1;
}
.shopping-checkbox { display: none; }
.shopping-checkmark {
  width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0;
  border: 2px solid var(--border-hi); background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.shopping-checkbox:checked + .shopping-checkmark {
  background: var(--primary); border-color: var(--primary);
}
.shopping-checkbox:checked + .shopping-checkmark::after {
  content: ''; display: block;
  width: 5px; height: 9px;
  border: 2px solid #000; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px,-1px);
}
.shopping-ing-name { font-size: .9rem; color: var(--text); }
.shopping-measure { font-size: .8rem; color: var(--primary-lt); font-weight: 600; margin-right: 2px; }
.shopping-remove {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); opacity: .5; transition: opacity .15s;
}
.shopping-remove:hover { opacity: 1; color: var(--text); }
.shopping-remove svg { width: 13px; height: 13px; }

/* ── COMMUNITY ── */
.comm-tabs { display: flex; gap: 4px; margin-bottom: 24px; }
.ctab {
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text-muted); font-weight: 500; font-size: .88rem;
  transition: all .2s;
}
.ctab.active { background: var(--primary-dim); border-color: var(--border-hi); color: var(--primary-lt); }
.ctab:hover:not(.active) { color: var(--text); border-color: var(--border-hi); }

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.recipe-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  backdrop-filter: var(--blur-sm);
  transition: border-color .2s, box-shadow .2s;
}
.recipe-card:hover {
  border-color: var(--border-hi);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.recipe-card-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
}
.recipe-card h3 { font-size: 1.05rem; }
.recipe-card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.recipe-card-body { color: var(--text-muted); font-size: .85rem; line-height: 1.6; }
.recipe-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.recipe-author { font-size: .78rem; color: var(--text-dim); }
.recipe-like-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px;
  color: var(--text-muted); font-size: .8rem;
  transition: all .2s;
}
.recipe-like-btn svg { width: 13px; height: 13px; }
.recipe-like-btn:hover { border-color: var(--red); color: var(--red); }
.recipe-like-btn.liked { border-color: var(--red); color: var(--red); }
.recipe-like-btn.liked svg { fill: var(--red); stroke: var(--red); }

/* Recipe badge row */
.rbadge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 600;
  background: var(--primary-dim); color: var(--primary-lt);
  border: 1px solid var(--border);
}
.rbadge.diff-easy   { background: rgba(16,185,129,.1); color: var(--green); border-color: rgba(16,185,129,.25); }
.rbadge.diff-medium { background: rgba(217,119,6,.12); color: var(--primary-lt); border-color: var(--border); }
.rbadge.diff-hard   { background: rgba(239,68,68,.1);  color: var(--red); border-color: rgba(239,68,68,.25); }

/* ── MY BAR ── */
.bar-tabs { display: flex; gap: 4px; margin-bottom: 24px; }
.btab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text-muted); font-weight: 500; font-size: .88rem;
  transition: all .2s;
}
.btab svg { width: 15px; height: 15px; }
.btab.active { background: var(--primary-dim); border-color: var(--border-hi); color: var(--primary-lt); }
.btab:hover:not(.active) { color: var(--text); border-color: var(--border-hi); }
.shopping-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; border-radius: 999px;
  background: var(--primary); color: #000;
  font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.inventory-search-row { margin-bottom: 20px; }
.inventory-search-row input {
  width: 100%; max-width: 360px;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text); outline: none;
  transition: border-color .2s;
}
.inventory-search-row input:focus { border-color: var(--border-hi); }
.inventory-search-row input::placeholder { color: var(--text-dim); }

.inv-section { margin-bottom: 28px; }
.inv-section-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 12px;
}
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.inv-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.inv-item:hover { border-color: var(--border-hi); background: var(--primary-dim); }
.inv-item.checked { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); }
.inv-check {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 6px;
  border: 2px solid var(--border-hi);
  display: grid; place-items: center;
  transition: all .2s;
}
.inv-item.checked .inv-check {
  background: var(--green); border-color: var(--green);
}
.inv-check::after {
  content: '';
  width: 5px; height: 9px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -2px);
  opacity: 0; transition: opacity .15s;
}
.inv-item.checked .inv-check::after { opacity: 1; }
.inv-name { font-size: .85rem; color: var(--text-muted); }
.inv-item.checked .inv-name { color: var(--text); }

/* ── PROFILE / AUTH ── */
.auth-wrap { max-width: 460px; margin: 0 auto; padding-top: 40px; }
.auth-box {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.auth-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 14px;
}
.auth-logo em { color: var(--primary-lt); font-style: italic; }
.auth-logo svg { width: 40px; height: 40px; }
.auth-box > p { color: var(--text-muted); margin-bottom: 28px; font-size: .92rem; }

.auth-tabs { display: flex; gap: 4px; margin-bottom: 24px; }
.atab {
  flex: 1; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text-muted); font-weight: 500; font-size: .88rem;
  text-align: center; transition: all .2s;
}
.atab.active { background: var(--primary-dim); border-color: var(--border-hi); color: var(--primary-lt); }

.auth-form { display: grid; gap: 16px; }
.auth-hint { font-size: .78rem; color: var(--text-dim); text-align: center; }

.profile-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  backdrop-filter: var(--blur-sm);
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-500));
  display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.profile-info h2 { font-size: 1.3rem; margin-bottom: 4px; }
.profile-info p { color: var(--text-muted); font-size: .9rem; }
.profile-stats-row {
  display: flex; gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
.pstat {
  flex: 1; padding: 20px;
  text-align: center;
  background: var(--surface);
}
.pstat-num {
  display: block;
  font-size: 1.8rem; font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--primary-lt); margin-bottom: 4px;
}
.pstat-lbl { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.profile-section-head { margin-bottom: 16px; }
.profile-section-head h3 { font-size: 1.1rem; }

/* ── FORMS ── */
.form-group { display: grid; gap: 7px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--border-hi); }
.form-group select option { background: #0D0A15; color: var(--text); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.req { color: var(--red); }

.tag-checkboxes { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.tag-check {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; font-size: .85rem; color: var(--text-muted);
}
.tag-check input { accent-color: var(--primary); }

.create-form { display: grid; gap: 16px; }

/* ── CREATE RECIPE INGREDIENT TILE PICKER ── */
.rc-ing-picker {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 210px; overflow-y: auto;
  padding: 10px 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.rc-cat-mini { display: flex; flex-direction: column; gap: 5px; }
.rc-cat-mini-label {
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim);
}
.rc-cat-mini-tiles { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 7px 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #1a1208;
  cursor: pointer;
  min-width: 52px; max-width: 64px;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.rc-tile:hover { border-color: var(--border-hi); background: #231808; }
.rc-tile.selected { border-color: var(--primary); background: #2e1e06; }
.rc-tile-img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.rc-tile-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.rc-tile-name {
  font-size: .55rem; font-weight: 500;
  color: var(--text-muted); text-align: center; line-height: 1.2;
  max-width: 58px; word-break: break-word;
}
.rc-tile.selected .rc-tile-name { color: var(--primary-lt); }

.rc-custom-row {
  display: flex; gap: 7px; align-items: center;
  margin-top: 4px;
}
.rc-custom-row input {
  flex: 1; padding: 8px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: .82rem; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.rc-custom-row input:focus { border-color: var(--border-hi); }
.rc-custom-row input::placeholder { color: var(--text-dim); }
.rc-custom-row input:first-child { flex: 2; }
.rc-add-btn { white-space: nowrap; flex-shrink: 0; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 3, 10, 0.88);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  display: grid; place-items: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  width: min(680px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  background: rgba(12, 8, 6, 0.98);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), 0 0 80px rgba(217,119,6,.12);
  animation: modalIn .25s ease-out;
}
@keyframes modalIn {
  from { transform: scale(.94) translateY(10px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.modal-close-btn {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: grid; place-items: center; color: var(--text-muted);
  z-index: 10; transition: all .2s; flex-shrink: 0;
}
.modal-close-btn svg { width: 14px; height: 14px; }
.modal-close-btn:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.4); color: var(--red); }
.modal-title { padding: 28px 32px 0; font-size: 1.4rem; padding-right: 60px; }

.create-form { display: grid; gap: 16px; padding: 20px 32px 32px; }

.modal-drink-content { display: grid; }
.modal-drink-img {
  position: relative; height: 280px; overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-drink-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-drink-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(12,8,6,.9) 0%, transparent 60%);
}
.modal-drink-body { padding: 28px 32px 32px; }
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-tag {
  padding: 4px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  background: var(--primary-dim); color: var(--primary-lt);
  border: 1px solid var(--border);
}
.modal-tag.alc  { color: var(--primary-lt); }
.modal-tag.nonalc { background: rgba(16,185,129,.1); color: var(--green); border-color: rgba(16,185,129,.25); }
.modal-drink-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 24px; }
.modal-section { margin-bottom: 24px; }
.modal-section h4 {
  font-family: 'Inter', sans-serif;
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim); margin-bottom: 12px;
}
.ing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ing-item {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ing-measure { color: var(--primary-lt); font-size: .82rem; font-weight: 600; min-width: 80px; }
.ing-name { font-size: .9rem; }
.instructions { color: var(--text-muted); line-height: 1.8; font-size: .92rem; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ── TAGS ── */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  background: var(--primary-dim); color: var(--primary-lt);
  border: 1px solid var(--border);
}
.tag.alc { color: var(--primary-lt); }
.tag.nonalc { background: rgba(16,185,129,.1); color: var(--green); border-color: rgba(16,185,129,.2); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 60px 20px;
  display: grid; gap: 16px; justify-items: center;
}
.empty-state svg { width: 56px; height: 56px; }
.empty-state p { color: var(--text-muted); max-width: 300px; }

/* ── MOBILE BOTTOM NAV ── */
.bnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: none;
  justify-content: stretch;
  padding: 0;
  background: rgba(6,4,10,.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid rgba(255,255,255,.05);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bnav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 4px;
  border: none; background: transparent;
  color: var(--text-dim); font-size: .62rem; font-weight: 500;
  transition: color .2s;
}
.bnav-btn svg { width: 20px; height: 20px; }
.bnav-btn.active { color: var(--primary-lt); }
.bnav-btn:hover { color: var(--text-muted); }

.bnav-center {
  position: relative;
}
.bnav-center::before {
  content: '';
  position: absolute; top: -10px;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-500));
  box-shadow: 0 0 24px rgba(217,119,6,.5);
  z-index: -1;
}
.bnav-center svg { color: #fff; }
.bnav-center.active { color: #fff; }

/* ── TOAST ── */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 500;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  background: rgba(20, 14, 8, 0.98);
  border: 1px solid var(--border-hi);
  color: var(--text); font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-card);
  transform: translateX(120%);
  transition: transform .3s ease;
  max-width: 320px;
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: rgba(16,185,129,.4); }
.toast.error   { border-color: rgba(239,68,68,.4); }
.toast.info    { border-color: var(--border-hi); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .main { padding: 24px 20px 120px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 40px; }
  .hero-glow { display: none; }
  .hero-visual { order: -1; }
  .featured-card { max-width: 100%; }
  .hero-title { font-size: clamp(2rem, 5vw, 2.8rem); }
}

@media (max-width: 768px) {
  .modal-title { padding: 24px 20px 0; padding-right: 52px; }
  .create-form  { padding: 16px 20px 24px; }
  .modal-drink-body { padding: 20px 20px 24px; }
  .sidebar { display: none; }
  .sidebar.open {
    display: flex; flex-direction: column;
    position: fixed; inset: 64px 0 0 0;
    width: 100%; z-index: 50;
    background: rgba(6,4,10,.98);
    backdrop-filter: var(--blur);
    padding: 20px;
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }
  .bnav { display: flex; }
  .sidebar-toggle { display: grid; }
  .topbar-search { display: none; }
  .drink-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .community-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .ai-input-panel { padding: 20px; }
  .modal-box { max-height: 96dvh; }
  .toast-wrap { bottom: 90px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }
  .hero-stats { gap: 0; }
  .hstat { padding: 0 14px; }
  .page-head-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .topbar { padding: 12px 16px; }
  .main { padding: 20px 14px 100px; }
  .hero-title { font-size: 1.9rem; }
  .drink-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hstat span { font-size: 1.2rem; }
  .auth-box { padding: 28px 20px; }
}

/* ══════════════════════════════════════
   GLASS VISUALIZER
══════════════════════════════════════ */
.create-modal-box { width: min(940px, 100%); overflow: hidden; }
.create-modal-layout {
  display: grid;
  grid-template-columns: 1fr 264px;
  align-items: start;
  overflow: hidden;
}
.create-modal-layout > .create-form {
  border-right: 1px solid var(--border);
  max-height: calc(90dvh - 82px);
  overflow-y: auto;
}
.comm-modal-box { width: min(840px, 100%); overflow: hidden; }
.comm-modal-layout {
  display: grid;
  grid-template-columns: 1fr 252px;
  min-height: 300px;
}
.comm-modal-info {
  padding: 28px 24px 32px 32px;
  overflow-y: auto;
  max-height: calc(90dvh - 20px);
}
.comm-modal-name {
  font-size: 1.35rem;
  font-family: 'Playfair Display', serif;
  color: var(--primary-lt);
  margin: 0 0 12px;
}

/* Shared glass panel */
.glass-viz-panel {
  padding: 20px 14px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  min-height: 280px;
}
.viz-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--primary);
  margin: 0;
}
.viz-hint {
  font-size: .74rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Glass picker buttons */
.glass-type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 236px;
}
.gpick {
  padding: 3px 9px;
  font-size: .68rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .18s;
  line-height: 1.7;
  font-family: inherit;
}
.gpick.active, .gpick:hover {
  border-color: var(--primary);
  color: var(--primary-lt);
  background: var(--primary-dim);
}

/* Glass stage */
.glass-stage { display: flex; justify-content: center; flex-shrink: 0; }
.glass-wrap { position: relative; width: 160px; height: 260px; }
.glass-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(217,119,6,.3));
}
.glass-inner {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  transition: clip-path .35s cubic-bezier(.4,0,.2,1);
}
.liq-layer {
  width: 100%;
  flex-shrink: 0; flex-grow: 0;
  position: relative; overflow: hidden;
  transition: height .55s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center;
}
.liq-measure {
  font-size: .58rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: .03em;
  z-index: 1;
  position: relative;
}
.liq-layer::after {
  content: '';
  position: absolute; top: 0; left: -100%; right: 0;
  height: 3px;
  background: rgba(255,255,255,.26);
  animation: liq-shimmer 2.6s linear infinite;
}
@keyframes liq-shimmer {
  from { transform: translateX(0); }
  to   { transform: translateX(260%); }
}

/* Pour stream */
.pour-stream {
  position: absolute;
  width: 6px; height: 50px;
  border-radius: 4px;
  left: 50%; top: 0;
  transform: translateX(-50%);
  z-index: 3; pointer-events: none; opacity: 0;
}
.pour-stream.falling {
  animation: pour-fall .72s ease-in forwards;
}
@keyframes pour-fall {
  0%   { top: 0;                 opacity: .92; }
  55%  { opacity: .75; }
  100% { top: calc(100% - 50px); opacity: 0; }
}

/* Legend */
.glass-legend {
  width: 100%;
  display: flex; flex-direction: column; gap: 5px;
  max-height: 130px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.legend-item {
  display: flex; align-items: center; gap: 7px;
  font-size: .73rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.legend-swatch {
  width: 11px; height: 11px;
  border-radius: 3px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.12);
}
[data-comm-recipe] { cursor: pointer; }

@media (max-width: 768px) {
  .create-modal-layout { grid-template-columns: 1fr; }
  .create-modal-layout > .create-form { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .comm-modal-layout { grid-template-columns: 1fr; }
  .comm-modal-info { padding: 20px 20px 24px; max-height: none; }
  .glass-viz-panel { border-left: none; border-top: 1px solid var(--border); min-height: auto; }
  .glass-wrap { width: 120px; height: 195px; }
}

/* ══════════════════════════════════════
   MINI GLASS CARD THUMBNAIL
══════════════════════════════════════ */
.card-mini-glass {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #1a0e06 0%, #06040a 100%);
}
.card-mini-wrap {
  position: relative;
  width: 88px; height: 143px;
}
.card-mini-liq {
  position: absolute; inset: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card-mini-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(217,119,6,.28));
}
.mini-shimmer {
  position: absolute; top: 0; left: -100%; right: 0;
  height: 2px;
  background: rgba(255,255,255,.22);
  animation: liq-shimmer 2.6s linear infinite;
}

/* ══════════════════════════════════════
   AI BARTENDER BUBBLE BACKGROUND
══════════════════════════════════════ */
#page-ai-bartender {
  position: relative;
  overflow: hidden;
}
.ai-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
#page-ai-bartender .ai-header,
#page-ai-bartender .ai-ing-selector,
#page-ai-bartender .ai-loading,
#page-ai-bartender #aiResults,
#page-ai-bartender #aiEmpty {
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   AI INGREDIENT PICKER
══════════════════════════════════════ */
.ai-ing-selector {
  display: flex; flex-direction: column;
  gap: 64px;
  max-width: 940px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.ai-ing-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: .95rem;
  margin: 0;
}

/* Category section */
.ai-cat-section { display: flex; flex-direction: column; gap: 20px; }
.ai-cat-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.ai-cat-icon { width: 32px; height: 32px; color: var(--primary); flex-shrink: 0; }
.ai-cat-label {
  font-size: 1.55rem; font-weight: 700;
  letter-spacing: .01em;
  color: var(--text);
  font-family: 'Playfair Display', serif;
}
.ai-cat-tiles { display: flex; flex-wrap: wrap; gap: 8px; }

/* Individual tile */
.ing-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 10px 10px 8px;
  border: 1.5px solid rgba(217,119,6,.22);
  border-radius: var(--radius-sm);
  background: #1a1208;
  cursor: pointer; transition: border-color .18s, background .18s, transform .18s;
  min-width: 120px; max-width: 140px;
  user-select: none; font-family: inherit;
}
.ing-tile:hover {
  border-color: var(--border-hi);
  background: #231808;
  transform: translateY(-2px);
}
.ing-tile.selected {
  border-color: var(--primary);
  background: #2e1e06;
}
.ing-tile-img {
  width: 88px; height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.6));
  flex-shrink: 0;
  transition: transform .18s;
}
.ing-tile:hover .ing-tile-img { transform: scale(1.1); }
.ing-tile.selected .ing-tile-img { filter: drop-shadow(0 3px 12px rgba(217,119,6,.65)); }
.ing-tile-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  box-shadow: 0 2px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18);
  flex-shrink: 0;
}
.ing-tile-name {
  font-size: .82rem; font-weight: 500;
  color: var(--text-muted); text-align: center; line-height: 1.3;
  max-width: 110px; word-break: break-word;
}
.ing-tile.selected .ing-tile-name { color: var(--primary-lt); }

/* Tick badge */
.ing-tile-tick {
  position: absolute; top: 4px; right: 4px;
  width: 15px; height: 15px;
  background: var(--primary); border-radius: 50%;
  display: grid; place-items: center;
  opacity: 0; transform: scale(0);
  transition: opacity .15s, transform .18s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.ing-tile.selected .ing-tile-tick { opacity: 1; transform: scale(1); }
.ing-tile-tick svg { width: 8px; height: 8px; color: #fff; stroke-width: 2.5; }

/* Custom ingredient input row */
.ai-custom-row {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color .2s;
}
.ai-custom-row:focus-within { border-color: var(--border-hi); }
.ai-custom-icon { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }
.ai-custom-row input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: .9rem; font-family: inherit;
}
.ai-custom-row input::placeholder { color: var(--text-dim); }

/* Autocomplete dropdown */
.ai-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: rgba(12,8,6,.98);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  overflow: hidden; z-index: 20;
  box-shadow: var(--shadow-card);
}
.ai-sug-item {
  padding: 10px 14px; cursor: pointer;
  font-size: .88rem; color: var(--text-muted);
  transition: background .15s;
}
.ai-sug-item:hover { background: rgba(217,119,6,.12); color: var(--text); }

/* Chips row */
.ai-chips-row { min-height: 0; }

/* Actions bar */
.ai-actions-bar {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px; padding-top: 16px;
}
.ai-sel-count { font-size: .88rem; color: var(--text-muted); }
.ai-actions-btns { display: flex; gap: 10px; align-items: center; }

@media (max-width: 600px) {
  .ai-ing-selector { gap: 44px; }
  .ai-cat-tiles { gap: 10px; }
  .ing-tile { min-width: 96px; max-width: 116px; padding: 12px 8px 10px; }
  .ing-tile-img { width: 64px; height: 64px; }
  .ing-tile-dot { width: 32px; height: 32px; }
  .ing-tile-name { font-size: .72rem; }
  .ai-cat-label { font-size: 1.2rem; }
  .ai-actions-bar { flex-direction: column; align-items: stretch; }
  .ai-actions-btns { justify-content: flex-end; }
}
