@import "base.css";

/* App Container Layout */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 61px;
  flex-shrink: 0;
  background: rgba(18, 17, 16, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--color-accent);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  font-weight: 600;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.my-bar-btn {
  position: relative;
}

#my-bar-badge {
  background: rgba(212, 163, 89, 0.18);
  color: var(--color-accent);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.15rem;
}

/* Vault Menu Button */
.vault-menu-btn {
  position: relative;
  gap: 0.35rem;
  anchor-name: --btn-vault;
}

.vault-menu-btn .chevron-icon {
  transition: transform var(--transition-fast);
  opacity: 0.7;
}

.vault-menu-btn:hover .chevron-icon {
  opacity: 1;
}

body:has(#vault-popover:popover-open) .vault-menu-btn .chevron-icon {
  transform: rotate(180deg);
}

/* Vault & Settings Popover */
.vault-popover {
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(28, 26, 23, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--color-text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  width: 300px;
  z-index: 1000;
  overflow: hidden;

  /* Placement: tethered beneath top bar */
  inset: auto;
  top: 56px;
  right: 1.5rem;

  /* Native popover animation */
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity var(--transition-fast), transform var(--transition-fast), display var(--transition-fast) allow-discrete, overlay var(--transition-fast) allow-discrete;
}

.vault-popover:popover-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .vault-popover:popover-open {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@supports (position-anchor: --btn-vault) {
  .vault-popover {
    position-anchor: --btn-vault;
    top: anchor(bottom);
    right: anchor(right);
    margin-top: 8px;
  }
}

/* Popover Header & Identity */
.vault-popover-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(212, 163, 89, 0.04);
  border-bottom: 1px solid var(--color-border);
}

.vault-identity-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(212, 163, 89, 0.25) 0%, rgba(212, 163, 89, 0.08) 100%);
  border: 1px solid rgba(212, 163, 89, 0.35);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vault-identity-text {
  flex: 1;
  min-width: 0;
}

.vault-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.vault-bar-name-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.25rem;
  margin-left: -0.25rem;
  width: 100%;
  max-width: 190px;
  transition: all var(--transition-fast);
}

.vault-bar-name-input:hover {
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.04);
}

.vault-bar-name-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(0, 0, 0, 0.35);
}

.vault-edit-icon {
  color: var(--color-text-faint);
  opacity: 0.6;
  flex-shrink: 0;
  pointer-events: none;
}

.vault-stats-line {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* Popover Body & Sections */
.vault-popover-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.vault-section {
  display: flex;
  flex-direction: column;
}

.vault-section-title {
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-faint);
  margin-bottom: 0.45rem;
}

/* Unit Segmented Toggle */
.vault-unit-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.vault-unit-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vault-unit-btn:hover:not(.active) {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.vault-unit-btn.active {
  background: var(--color-surface-hover);
  color: var(--color-accent);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 163, 89, 0.25);
}

.vault-unit-abbr {
  font-size: 0.68rem;
  opacity: 0.75;
  text-transform: uppercase;
}

/* Action Items List */
.vault-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.vault-action-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.vault-action-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.vault-action-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.vault-action-item:hover .vault-action-icon {
  color: var(--color-accent);
  background: rgba(212, 163, 89, 0.12);
  border-color: rgba(212, 163, 89, 0.25);
}

.vault-action-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vault-action-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.2;
}

.vault-action-sub {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.vault-action-primary .vault-action-icon {
  background: rgba(212, 163, 89, 0.12);
  border-color: rgba(212, 163, 89, 0.3);
  color: var(--color-accent);
}

.vault-action-primary:hover {
  background: rgba(212, 163, 89, 0.08);
}

.vault-action-primary:hover .vault-action-icon {
  background: rgba(212, 163, 89, 0.22);
  border-color: rgba(212, 163, 89, 0.45);
}

.vault-action-danger:hover {
  background: rgba(230, 57, 70, 0.08);
}

.vault-action-danger:hover .vault-action-icon {
  color: var(--color-crimson);
  background: rgba(230, 57, 70, 0.15);
  border-color: rgba(230, 57, 70, 0.3);
}

.vault-action-danger:hover .vault-action-label {
  color: var(--color-crimson);
}

/* Popover Footer */
.vault-popover-footer {
  padding: 0.45rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  color: var(--color-text-faint);
}

.vault-dot-sep {
  opacity: 0.4;
}


/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #121110;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-light);
  color: #121110;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(245, 240, 230, 0.04);
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(245, 240, 230, 0.08);
  border-color: rgba(245, 240, 230, 0.18);
}

.btn-ghost {
  color: var(--color-text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--color-text);
  background: rgba(245, 240, 230, 0.05);
}

.btn-danger {
  color: var(--color-crimson);
  border-color: rgba(194, 84, 80, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(194, 84, 80, 0.12);
}

.btn:disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

/* App Main Layout: Two Pane */
.app-main {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  flex: 1;
  height: calc(100vh - 61px);
  height: calc(100dvh - 61px);
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  background: rgba(18, 17, 16, 0.6);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 310px;
  min-width: 310px;
  max-width: 310px;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-search-box {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  width: 15px;
  height: 15px;
  color: var(--color-text-faint);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.25rem;
  background: rgba(245, 240, 230, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.search-input::placeholder {
  color: #a69f94;
}

.search-input:focus {
  border-color: var(--color-accent);
  background: rgba(245, 240, 230, 0.07);
}

.search-clear-btn {
  position: absolute;
  right: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-clear-btn.visible {
  display: inline-flex;
}

/* Sidebar Themed Pack Filter Pills */
.sidebar-pack-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--color-border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-pack-filter::-webkit-scrollbar {
  display: none;
}

.pack-pill {
  flex-shrink: 0;
  min-height: 38px;
  background: transparent;
  border: 1px solid rgba(245, 240, 230, 0.08);
  border-radius: var(--radius-sm);
  color: #bfb7aa;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pack-pill:hover:not(.active) {
  background: rgba(245, 240, 230, 0.05);
  color: #fff;
  border-color: rgba(245, 240, 230, 0.15);
}

.pack-pill.active {
  background: rgba(212, 163, 89, 0.15);
  border-color: rgba(212, 163, 89, 0.35);
  color: #fff;
  font-weight: 600;
}

/* Sidebar Inventory Filter */
.sidebar-inventory-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(245, 240, 230, 0.01);
}

.inventory-filter-btn {
  min-height: 42px;
  background: rgba(245, 240, 230, 0.04);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  color: #c9c3b8;
  padding: 0.5rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.inventory-filter-btn:hover {
  background: rgba(245, 240, 230, 0.08);
  color: #fff;
  border-color: var(--color-border);
}

.inventory-filter-btn.active {
  background: rgba(212, 163, 89, 0.15);
  border-color: rgba(212, 163, 89, 0.4);
  color: #fff;
}

.inventory-filter-btn .filter-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  opacity: 0.95;
}

.inventory-filter-btn.active .filter-count {
  background: rgba(212, 163, 89, 0.28);
  color: var(--color-accent-light);
}

/* Recipe List */
.recipe-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0.6rem 0.55rem;
  container-type: inline-size;
  background: rgba(10, 9, 8, 0.55);
}

.recipe-list-item {
  margin-bottom: 0.35rem;
}

.recipe-card-btn {
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(30, 27, 24, 0.75);
  border: 1px solid rgba(245, 240, 230, 0.05);
  transition: all var(--transition-fast);
  display: block;
}

.recipe-card-btn:hover {
  background: rgba(43, 38, 33, 0.9);
  border-color: rgba(212, 163, 89, 0.25);
}

.recipe-list-item.active .recipe-card-btn {
  background: rgba(212, 163, 89, 0.12);
  border-color: rgba(212, 163, 89, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.recipe-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.recipe-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.recipe-list-item.active .recipe-item-name {
  color: #fff;
}

.recipe-item-glass {
  font-size: 0.75rem;
  color: #bfb7aa;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.recipe-list-item.active .recipe-item-glass {
  color: #e5ded2;
}

@container (max-width: 275px) {
  .recipe-item-glass {
    display: none;
  }
}

.recipe-item-ingredients {
  font-size: 0.8rem;
  color: #c9c3b8;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  margin-top: 0.2rem;
}

.recipe-list-item.active .recipe-item-ingredients {
  color: #ded7cb;
}

.recipe-item-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.35rem;
  line-height: 1;
}

.recipe-item-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.recipe-item-status.status-ready {
  color: #8ed6aa;
}

.recipe-item-status.status-next {
  color: #e8c47f;
}

.tag-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

.tag-badge-accent {
  background: rgba(212, 163, 89, 0.12);
  color: var(--color-accent);
  border-color: rgba(212, 163, 89, 0.25);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* Main Content Panel */
.main-stage {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.25rem 3rem 4rem;
  min-width: 0;
  width: 100%;
}

/* Counter View: Editorial Cocktail Book Spread */
.counter-view {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
  animation: fadeIn 200ms ease;
}

.counter-mobile-bar {
  display: none;
  align-items: center;
  margin-bottom: 1rem;
}

.mobile-back-btn {
  display: none;
}

/* Title & Header Hierarchy */
.drink-title-section {
  margin-bottom: 1.75rem;
  container-type: inline-size;
  min-width: 0;
}

.drink-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  min-width: 0;
}

.drink-title-header-left {
  min-width: 0;
  flex: 1;
}

.drink-name {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 0.35rem;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.drink-actions-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-icon-btn svg {
  flex-shrink: 0;
}

.action-icon-btn .action-btn-text {
  display: none;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.action-icon-btn:active {
  transform: translateY(1px);
}

.action-icon-btn-danger:hover {
  background: rgba(230, 57, 70, 0.15);
  border-color: rgba(230, 57, 70, 0.4);
  color: #f87171;
}

/* Wide container/display: expand action buttons to show text labels */
@media (min-width: 900px) {
  .action-icon-btn {
    width: auto;
    padding: 0 0.65rem;
  }

  .action-icon-btn .action-btn-text {
    display: inline;
  }
}

@container (min-width: 520px) {
  .action-icon-btn {
    width: auto;
    padding: 0 0.65rem;
  }

  .action-icon-btn .action-btn-text {
    display: inline;
  }
}

@container (max-width: 519px) {
  .action-icon-btn {
    width: 34px;
    padding: 0;
  }

  .action-icon-btn .action-btn-text {
    display: none;
  }
}

/* Clean inline metadata row with subtle dot dividers */
.drink-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-top: 0.45rem;
}

.drink-meta-item {
  display: inline-flex;
  align-items: center;
  font-weight: 400;
}

.drink-meta-riff em {
  color: var(--color-accent-light);
  font-style: italic;
  font-family: var(--font-serif);
  margin-left: 0.25rem;
}

.drink-meta-riff strong {
  color: var(--color-accent-light);
  font-weight: 600;
  margin-left: 0.25rem;
}

.meta-status-ready {
  color: #7cb894;
  font-weight: 500;
  font-size: 0.82rem;
}

.meta-dot-divider {
  color: var(--color-text-faint);
  font-size: 0.65rem;
  user-select: none;
}

/* Editorial Story / Description directly under title */
.drink-description-prose {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-top: 0.85rem;
  margin-bottom: 0.25rem;
  max-width: 65ch;
}

/* Contextual substitution banner */
.drink-sub-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.5rem 0.85rem;
  background: rgba(185, 106, 67, 0.08);
  border: 1px solid rgba(185, 106, 67, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #d98e68;
}

.btn-sub-apply-link {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sub-apply-link:hover {
  background: rgba(212, 163, 89, 0.15);
  color: var(--color-accent-light);
}

/* Actionable status badges */
.drink-status-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pill-ready {
  background: rgba(77, 131, 99, 0.1);
  border-color: rgba(77, 131, 99, 0.25);
  color: #7cb894;
}

.status-pill-next {
  background: rgba(212, 163, 89, 0.1);
  border-color: rgba(212, 163, 89, 0.25);
  color: var(--color-accent-light);
}

.status-pill-swaps {
  background: rgba(212, 163, 89, 0.1);
  border-color: rgba(212, 163, 89, 0.25);
  color: var(--color-accent-light);
}

.status-pill-sub {
  background: rgba(185, 106, 67, 0.1);
  border-color: rgba(185, 106, 67, 0.28);
  color: #d98e68;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.status-pill-sub:hover {
  background: rgba(185, 106, 67, 0.18);
  border-color: rgba(185, 106, 67, 0.45);
  color: #ebaa88;
}

.status-pill-sub strong {
  color: var(--color-text);
  font-weight: 600;
}

.status-pill-sub .sub-pill-action {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(185, 106, 67, 0.2);
  color: #ebaa88;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.35rem;
}

.status-pill-garnish {
  background: rgba(245, 240, 230, 0.03);
  border-color: var(--color-border-subtle);
  color: var(--color-text-muted);
}

.status-pill-garnish strong {
  color: var(--color-text);
  font-weight: 500;
}

/* Drink Tags Bar (Counter View) */
.drink-tags-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.drink-tags-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.drink-tags-chips {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.drink-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(245, 240, 230, 0.04);
  border: 1px solid rgba(245, 240, 230, 0.09);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 400;
  padding: 0.18rem 0.5rem;
  transition: all var(--transition-fast);
}

.drink-tag-chip:hover {
  background: rgba(245, 240, 230, 0.08);
  border-color: rgba(245, 240, 230, 0.18);
  color: var(--color-text);
}

.drink-tag-text {
  cursor: pointer;
  user-select: none;
}

.drink-tag-text:hover {
  color: #fff;
  text-decoration: underline;
}

.drink-tag-remove {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  margin: 0 0 0 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.drink-tag-remove:hover {
  color: var(--color-crimson);
}

.tag-input-inline-wrapper {
  display: inline-flex;
  align-items: center;
}

.tag-input-inline {
  background: rgba(245, 240, 230, 0.03);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.76rem;
  padding: 0.18rem 0.5rem;
  width: 85px;
  transition: all 0.2s ease;
}

.tag-input-inline:focus {
  width: 130px;
  outline: none;
  background: rgba(245, 240, 230, 0.07);
  border: 1px solid var(--color-accent);
  box-shadow: 0 0 0 2px rgba(212, 163, 89, 0.15);
}

.tag-input-inline::placeholder {
  color: var(--color-text-faint);
}

/* Stage Split: Glass on Left, Specs on Right */
.counter-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
  min-width: 0;
  width: 100%;
}

/* Vector Glass Column */
.glass-column {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-items: center;
  width: 260px;
  min-width: 0;
}

.glass-wrapper {
  width: 100%;
  max-width: 260px;
  height: 340px;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  position: relative;
}

.speakeasy-glass-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.fluid-layer {
  transition: opacity 180ms ease, filter 180ms ease;
  cursor: pointer;
}

.glass-meta-card {
  width: 100%;
  max-width: 260px;
  margin-top: 0.5rem;
  padding: 0.4rem 0.25rem;
  background: transparent;
  border: none;
  border-radius: 0;
  text-align: center;
}

.glass-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.glass-stats-divider {
  color: var(--color-text-faint);
  font-size: 0.75rem;
  user-select: none;
}

.glass-total-volume,
.glass-abv {
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

.glass-total-volume strong,
.glass-abv strong {
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.glass-source {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--color-border-subtle);
}

.glass-source a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.glass-source a:hover {
  color: #ffffff;
}

.glass-interaction-tip {
  font-size: 0.72rem;
  color: var(--color-text-faint);
  margin-top: 0.35rem;
}

.card-instructions {
  white-space: pre-line;
  line-height: 1.7;
}

.card-method-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.card-method-ordered {
  counter-reset: method-counter;
}

.card-method-ordered > li {
  counter-increment: method-counter;
  display: grid;
  grid-template-columns: 1.65rem 1fr;
  align-items: baseline;
  line-height: 1.65;
  color: var(--color-text);
  font-size: 0.95rem;
}

.card-method-ordered > li::before {
  content: counter(method-counter) ".";
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-accent-light);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.card-method-unordered > li {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  align-items: baseline;
  line-height: 1.65;
  color: var(--color-text);
  font-size: 0.95rem;
}

.card-method-unordered > li::before {
  content: "•";
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-accent-light);
  user-select: none;
}

.card-description {
  color: var(--color-text);
  line-height: 1.65;
}

.card-source {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.card-source strong {
  color: var(--color-accent-light);
}

.card-source a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-source a:hover {
  color: #ffffff;
}

/* Specs Column */
.specs-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.counter-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border-subtle);
  border-radius: 0;
  padding: 1.25rem 0;
  box-shadow: none;
}

.counter-card:first-child {
  padding-top: 0;
}

.counter-card:last-child {
  border-bottom: none;
}

.counter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0;
  border-bottom: none;
}

.counter-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

/* Editorial Sections */
.recipe-editorial-section {
  margin-bottom: 2.25rem;
}

.editorial-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.editorial-section-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-accent-light);
  margin: 0 0 0.65rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.editorial-section-header .editorial-section-title {
  border-bottom: none;
  margin: 0;
  padding-bottom: 0;
}

/* Header Controls (Servings Stepper & Unit Switch) */
.specs-header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Servings Stepper */
.servings-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.servings-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.servings-stepper-box {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.servings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.servings-btn:hover:not(:disabled) {
  background: var(--color-accent);
  color: #121110;
}

.servings-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.servings-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.servings-value {
  min-width: 2.2rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--color-text);
  letter-spacing: 0.02em;
  user-select: none;
}

/* Measurement Unit Switch */
.unit-switch-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.unit-btn {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1.2;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.unit-btn:hover:not(.active) {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.unit-btn.active {
  background: var(--color-accent);
  color: #121110;
  font-weight: 600;
}

/* Specs Table */
.specs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spec-row {
  display: grid;
  grid-template-columns: 85px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border-subtle);
  border-radius: 0;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.counter-view.riff-mode-active .spec-row {
  grid-template-columns: 85px 1fr auto auto;
}

.spec-row:hover,
.spec-row.highlighted {
  background: rgba(245, 240, 230, 0.025);
  border-color: var(--color-border-subtle);
  transform: none;
}

.spec-row.is-riffed-row {
  background: rgba(212, 163, 89, 0.04);
}

/* Garnish Row */
.spec-garnish-row {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.75rem 0.25rem 0.85rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: none;
  cursor: default;
}

.spec-garnish-row:hover {
  background: transparent;
}

.spec-garnish-row .spec-amount {
  width: auto;
  min-width: 60px;
  flex-shrink: 0;
  font-size: 0.88rem;
}

.spec-garnish-row .spec-amount .spec-unit {
  font-style: italic;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--color-accent-light);
  margin-left: 0;
}

.spec-garnish-row .spec-ingredient {
  flex: 1;
  min-width: 0;
}

.spec-garnish-row .spec-ingredient-name-row {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
}

.spec-garnish-name {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  font-style: italic;
  white-space: normal;
  word-break: normal;
}

.spec-garnish-row .spec-actions {
  display: none;
}

.stock-check-glyph {
  color: #7cb894;
  margin-right: 0.25rem;
  font-weight: bold;
}

.spec-amount {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.spec-unit {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.25rem;
}

.spec-ingredient {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.spec-ingredient-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  flex-wrap: wrap;
}

.spec-sub-suggestion {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.btn-sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  background: rgba(185, 106, 67, 0.1);
  border: 1px solid rgba(185, 106, 67, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  color: #d98e68;
  cursor: pointer;
  line-height: 1.2;
  transition: all var(--transition-fast);
}

.btn-sub-chip:hover {
  background: rgba(185, 106, 67, 0.18);
  border-color: rgba(185, 106, 67, 0.45);
  color: #ebaa88;
}

.sub-more-badge {
  font-size: 0.68rem;
  color: var(--color-text-faint);
  cursor: help;
}

.spec-riff-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(212, 163, 89, 0.15);
  border: 1px solid rgba(212, 163, 89, 0.35);
  color: var(--color-accent);
}

.spec-riff-orig-note {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.spec-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: flex-end;
}

.btn-stock-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}

.btn-stock-toggle.in-stock {
  background: transparent;
  border: none;
  color: var(--color-text-faint);
  font-size: 0.72rem;
  font-weight: 400;
  padding: 0.15rem 0.35rem;
  width: auto;
}

.btn-stock-toggle.in-stock:hover {
  background: rgba(194, 84, 80, 0.1);
  border-radius: 3px;
  color: #e58784;
}

.btn-stock-toggle.out-of-stock {
  background: rgba(212, 163, 89, 0.06);
  border: 1px solid rgba(212, 163, 89, 0.2);
  color: var(--color-accent-light);
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.18rem 0.45rem;
  width: auto;
}

.btn-stock-toggle.out-of-stock:hover {
  background: rgba(212, 163, 89, 0.15);
  border-color: var(--color-accent);
  color: #ffffff;
}

.spec-staple-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-faint);
  background: rgba(245, 240, 230, 0.03);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}

.riff-toggle-btn {
  width: 100%;
  max-width: 260px;
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.spec-riff-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.spec-riff-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(245, 240, 230, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 500;
  padding: 0.22rem 1.3rem 0.22rem 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23a69f94' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 5 5 9 1'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 8px 5px;
}

.spec-riff-select:hover {
  background-color: rgba(212, 163, 89, 0.08);
  border-color: rgba(212, 163, 89, 0.3);
  color: var(--color-text);
}

.spec-riff-select.active-riff {
  background-color: rgba(212, 163, 89, 0.15);
  border-color: var(--color-accent);
  color: var(--color-accent-light);
  font-weight: 600;
}

.spec-riff-select option {
  background-color: #1f1c19;
  color: #f5f2ea;
}

.riff-active-pill {
  border-color: rgba(212, 163, 89, 0.35) !important;
  background: rgba(212, 163, 89, 0.1) !important;
  color: var(--color-accent-light) !important;
}

.color-swatch-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
}

.spec-ratio {
  display: none;
}

/* Instructions & Notes */
.card-content-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-text);
}

/* Recipe Editorial Footer: Source Citation & Tags */
.recipe-editorial-footer {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editorial-source {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.editorial-source-label {
  font-weight: 500;
  font-style: normal;
  color: var(--color-text-faint);
  margin-right: 0.35rem;
}

.editorial-source a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.editorial-source a:hover {
  color: #ffffff;
}

.recipe-editorial-footer .drink-tags-bar {
  margin-top: 0;
}

/* Editor View */
.editor-view {
  animation: fadeIn 200ms ease;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.editor-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a69f94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
  padding-right: 2.2rem;
  cursor: pointer;
}

.form-select option {
  background-color: #1a1816;
  color: #f5f2ea;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.07);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quick-paste-box {
  background: rgba(212, 163, 89, 0.04);
  border: 1px dashed rgba(212, 163, 89, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.quick-paste-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.quick-paste-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quick-paste-hint {
  font-size: 0.74rem;
  color: var(--color-text-faint);
}

.quick-paste-textarea {
  width: 100%;
  height: 90px;
  font-family: monospace;
  font-size: 0.84rem;
  padding: 0.6rem;
  background: rgba(11, 14, 20, 0.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  resize: vertical;
}

/* Tags & Custom Lists in Editor */
.editor-tags-box {
  background: rgba(11, 14, 20, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.editor-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 28px;
  align-items: center;
}

.editor-tags-empty {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.editor-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 240, 230, 0.04);
  border: 1px solid rgba(245, 240, 230, 0.09);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.18rem 0.55rem;
}

.editor-tag-chip .btn-remove-tag {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.editor-tag-chip .btn-remove-tag:hover {
  color: var(--color-crimson);
}

.editor-tag-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.editor-tag-input-field {
  flex: 1;
  font-size: 0.85rem;
}

/* Spec Rows in Editor */
.editor-specs-section {
  margin-top: 1rem;
}

.editor-specs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.editor-spec-row {
  display: grid;
  grid-template-columns: 80px 100px 1fr 75px 36px;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.spec-input-abv {
  text-align: right;
  font-size: 0.82rem;
}

.meta-pill-accent {
  background: rgba(212, 163, 89, 0.14);
  border-color: rgba(212, 163, 89, 0.35);
  color: var(--color-accent-light);
}

.btn-remove-row {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-subtle);
}

.btn-remove-row:hover {
  color: var(--color-crimson);
  background: rgba(230, 57, 70, 0.1);
  border-color: rgba(230, 57, 70, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-faint);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.empty-state-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}

.empty-state-create-btn {
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-active);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn 200ms ease;
}

@keyframes slideIn {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Similar Cocktails Shelf & Horizontal Scroll Carousel */
.similar-cocktails-shelf {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-subtle);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.shelf-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.shelf-scroll-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.shelf-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shelf-nav-btn:hover {
  background: rgba(212, 163, 89, 0.12);
  border-color: rgba(212, 163, 89, 0.45);
  color: var(--color-accent);
}

.similar-cocktails-track {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.25rem 0.25rem;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.similar-cocktails-track::-webkit-scrollbar {
  height: 6px;
}

.similar-cocktails-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.similar-cocktails-track::-webkit-scrollbar-thumb {
  background: rgba(212, 163, 89, 0.25);
  border-radius: 4px;
}

.similar-cocktails-track::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 163, 89, 0.45);
}

.similar-cocktail-card {
  flex: 0 0 190px;
  width: 190px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.similar-cocktail-card:hover,
.similar-cocktail-card:focus-visible {
  background: rgba(212, 163, 89, 0.06);
  border-color: rgba(212, 163, 89, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  outline: none;
}

.similar-card-glass {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0;
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.similar-card-glass svg {
  height: 100%;
  width: auto;
  max-width: 90px;
}

.similar-cocktail-card:hover .similar-card-glass {
  transform: scale(1.06);
}

.similar-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.similar-relation-badge {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  line-height: 1.2;
}

.similar-relation-badge.badge-orig {
  background: rgba(185, 106, 67, 0.12);
  border-color: rgba(185, 106, 67, 0.3);
  color: #d98e68;
}

.similar-relation-badge.badge-riff {
  background: rgba(212, 163, 89, 0.12);
  border-color: rgba(212, 163, 89, 0.3);
  color: var(--color-accent);
}

.similar-relation-badge.badge-sibling {
  background: rgba(245, 240, 230, 0.05);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.similar-relation-badge.badge-style {
  background: rgba(245, 240, 230, 0.03);
  border-color: var(--color-border-subtle);
  color: var(--color-text-faint);
}

.similar-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.25;
  margin: 0.15rem 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.similar-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.similar-card-meta .meta-dot {
  opacity: 0.45;
}

.similar-card-specs {
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 0.1rem;
}

/* Bottle Next Recommendation Note */
.bottle-next-banner {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
  margin-top: 1.25rem;
  padding: 0.95rem 1.15rem;
}

.bottle-next-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bottle-next-text {
  flex: 1;
  min-width: 0;
}

.bottle-next-kicker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.bottle-next-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.bottle-next-desc strong {
  color: var(--color-accent-light);
  font-weight: 600;
}

.btn-quick-add-bottle {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

/* Backbar Modal Dialog */
.backbar-dialog {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #0e131d;
  color: var(--color-text);
  width: min(1060px, 94vw);
  height: min(850px, 88vh);
  max-height: 88vh;
  min-height: 480px;
  padding: 0;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
  margin: auto;
  overflow: hidden;
}

.backbar-dialog:not([open]) {
  display: none;
}

.backbar-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: backbarModalFadeIn 0.18s ease-out forwards;
}

.backbar-dialog::backdrop {
  background-color: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backbarBackdropFadeIn 0.18s ease-out forwards;
}

@keyframes backbarModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes backbarBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .backbar-dialog[open] {
    animation: none;
    opacity: 1;
  }
  .backbar-dialog::backdrop {
    animation: none;
    opacity: 1;
  }
}

.backbar-dialog-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.backbar-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.35rem 1.75rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.backbar-dialog-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
}

.backbar-dialog-subtitle {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  margin: 0.3rem 0 0 0;
}

.close-modal-btn {
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
}

.backbar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.01);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.backbar-search-wrapper {
  flex: 1;
  min-width: 240px;
}

.backbar-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Category Filter Tabs inside Modal */
.backbar-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.75rem 0.85rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(255, 255, 255, 0.01);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.backbar-nav-tabs::-webkit-scrollbar {
  display: none;
}

.backbar-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.backbar-nav-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.backbar-nav-tab.active {
  background: rgba(212, 163, 89, 0.16);
  border-color: rgba(212, 163, 89, 0.45);
  color: #fff;
  font-weight: 600;
}

.backbar-nav-tab-fridge {
  color: #9ecdb1;
}

.backbar-nav-tab-fridge.active {
  background: rgba(77, 131, 99, 0.18);
  border-color: rgba(77, 131, 99, 0.45);
  color: #e6f4ec;
}

.backbar-categories-container {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
}

.backbar-category-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.backbar-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.backbar-category-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-accent);
}

.backbar-category-count {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.backbar-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.backbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.backbar-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.backbar-pill.active {
  background: rgba(212, 163, 89, 0.15);
  border-color: rgba(212, 163, 89, 0.45);
  color: #fdfdfd;
}

.backbar-pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.backbar-pill-check {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-left: 0.2rem;
}

.backbar-pill-fridge-tag {
  font-size: 0.72rem;
  margin-left: 0.1rem;
  opacity: 0.85;
}

/* Chill/Fridge Tag in Recipe Specs */
.spec-fridge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  vertical-align: middle;
  flex-shrink: 0;
}

.spec-fridge-tag .fridge-icon {
  font-size: 0.65rem;
}

.backbar-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.backbar-summary-text {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Responsive Media Queries */
@media (min-width: 769px) and (max-width: 960px) {
  .counter-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .glass-column {
    position: static;
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }

  .glass-meta-card {
    margin-top: 0;
    max-width: 220px;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .sidebar.mobile-hidden {
    display: flex !important;
  }
  .main-stage.mobile-hidden {
    display: block !important;
  }
}

@media (max-width: 768px) {

  /* Header Mobile Compact: Fixed & Sticky at top */
  .app-header {
    height: 52px;
    padding: 0 0.85rem;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    background: rgba(18, 17, 16, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
  }

  .brand-group {
    gap: 0.5rem;
  }

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

  .brand-title {
    font-size: 1.15rem;
    letter-spacing: 0.1em;
  }

  .brand-subtitle {
    display: none;
  }

  .header-actions {
    gap: 0.5rem;
  }

  /* Hide top-level New Drink button on mobile (now accessible in Vault menu) */
  #btn-new-drink {
    display: none;
  }

  .vault-menu-btn {
    min-height: 38px;
    min-width: 38px;
    padding: 0 0.4rem;
    font-size: 0.78rem;
    justify-content: center;
  }

  .vault-menu-btn .btn-text {
    display: none;
  }

  .vault-popover {
    right: 0.75rem;
    top: 54px;
    width: calc(100vw - 1.5rem);
    max-width: 310px;
  }

  .my-bar-btn {
    min-height: 38px;
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  /* Fixed Viewport Mobile Layout */
  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  #app {
    height: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .app-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    overflow: hidden;
    width: 100%;
    position: relative;
  }

  /* Sidebar (Drink Library List): Sticky Search & Filters, Inner Scroll, Sticky Bottom Info Bar */
  .sidebar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: static;
    border-right: none;
    border-bottom: none;
    overflow: hidden;
    animation: slideInFromLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .sidebar.mobile-hidden {
    display: none !important;
  }

  .sidebar-search-box {
    flex-shrink: 0;
    padding: 0.75rem 0.85rem 0.45rem;
  }

  .sidebar-pack-filter {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem 0.5rem;
  }

  .sidebar-inventory-filter {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem 0.55rem;
  }

  .recipe-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0.85rem 1rem;
  }

  .sidebar-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem max(0.65rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--color-border-subtle);
    background: rgba(18, 17, 16, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.78rem;
    color: var(--color-text-muted);
    z-index: 10;
  }

  /* Main Stage (Recipe & Editor): Clean Side Margins, Smooth Scrolling */
  .main-stage {
    display: block;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 1.25rem max(3.5rem, calc(2rem + env(safe-area-inset-bottom, 0px))) !important;
    animation: slideInFromRight 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .main-stage.mobile-hidden {
    display: none !important;
  }

  @keyframes slideInFromRight {
    from {
      opacity: 0.75;
      transform: translateX(16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes slideInFromLeft {
    from {
      opacity: 0.75;
      transform: translateX(-16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  /* Counter View: Sticky Back Button Header */
  .counter-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin: 0 -1.25rem 1.15rem -1.25rem;
    padding: 0.65rem 1.25rem;
    background: rgba(18, 17, 16, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    flex-shrink: 0;
  }

  /* Inline scrolled drink title to the right of < Drinks */
  .mobile-sticky-title {
    flex: 1;
    min-width: 0;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-sticky-title.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-sticky-name {
    display: block;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
  }

  /* Recipe Title & Metadata: Harmonious Sizing & Spacing */
  .drink-title-section {
    margin-bottom: 1.15rem;
  }

  .drink-title-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .drink-name {
    font-size: clamp(1.75rem, 6.5vw, 2.3rem);
    line-height: 1.18;
    margin-bottom: 0.25rem;
    flex: 1;
    min-width: 0;
    word-break: break-word;
  }

  .drink-actions-cluster {
    margin-top: 0.15rem;
    flex-shrink: 0;
    display: inline-flex;
    gap: 0.35rem;
  }

  .action-icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .action-icon-btn .action-btn-text {
    display: none;
  }

  .drink-meta-row {
    font-size: 0.88rem;
    gap: 0.45rem;
    margin-top: 0.45rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
  }

  .drink-description-prose {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
  }

  .drink-sub-banner {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
  }

  .drink-tags-bar {
    margin-top: 0.75rem;
    gap: 0.4rem;
  }

  /* Stage Split: Prominent Centered Glass & Enlarged Specs */
  .counter-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .glass-column {
    order: 1;
    width: 100%;
    align-items: center;
    position: static;
    top: auto;
    flex-direction: column !important;
    gap: 0.65rem;
    margin: 0.25rem 0 0.5rem;
  }

  .glass-wrapper {
    width: 100%;
    max-width: 290px;
    height: 330px;
    margin: 0 auto;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .glass-meta-card {
    width: 100%;
    max-width: 290px;
    margin: 0.25rem auto 0;
    text-align: center;
  }

  .glass-meta-card .glass-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.02rem;
  }

  .glass-meta-card .glass-total-volume,
  .glass-meta-card .glass-abv {
    font-size: 1.02rem;
    color: var(--color-text-muted);
  }

  .glass-meta-card .glass-total-volume strong,
  .glass-meta-card .glass-abv strong {
    font-size: 1.16rem;
    font-weight: 600;
    color: var(--color-accent-light);
  }

  .glass-meta-card .glass-stats-divider {
    font-size: 0.95rem;
    opacity: 0.6;
  }

  .glass-meta-card .glass-source,
  .glass-meta-card .glass-interaction-tip {
    display: none;
  }

  .riff-toggle-btn {
    width: 100%;
    max-width: 320px;
    margin: 0.65rem auto 0;
    padding: 0.65rem 1rem;
    justify-content: center;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
  }

  .specs-column {
    order: 2;
    width: 100%;
    gap: 1.25rem;
  }

  /* Card Sizing & Ingredients Table on Mobile */
  .counter-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }

  .counter-card-header {
    margin-bottom: 0.85rem;
    padding-bottom: 0.45rem;
  }

  .specs-card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .specs-header-controls {
    gap: 0.5rem;
  }

  .servings-label {
    display: none;
  }

  .servings-stepper-box {
    padding: 3px 4px;
    gap: 4px;
  }

  .servings-btn {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  .servings-value {
    min-width: 2.5rem;
    font-size: 0.85rem;
  }

  .unit-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .specs-list {
    gap: 0.45rem;
  }

  .spec-row {
    grid-template-columns: 60px 1fr auto;
    gap: 0.55rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
  }

  .spec-amount {
    font-size: 1.08rem;
  }

  .spec-unit {
    font-size: 0.75rem;
    margin-left: 0.15rem;
  }

  .spec-ingredient {
    min-width: 0;
    gap: 0.15rem;
  }

  .spec-ingredient-name-row {
    font-size: 0.92rem;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .spec-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .spec-actions {
    gap: 0.45rem;
  }

  .btn-stock-toggle,
  .spec-staple-tag {
    width: 50px;
    font-size: 0.62rem;
    padding: 0.18rem 0;
  }

  .spec-ratio {
    width: 32px;
    font-size: 0.72rem;
  }

  .btn-sub-chip {
    font-size: 0.66rem;
    padding: 0.12rem 0.35rem;
    max-width: 135px;
    white-space: nowrap;
  }

  .btn-sub-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sub-more-badge {
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .editor-spec-row {
    grid-template-columns: 65px 80px 1fr 65px 32px;
    gap: 0.35rem;
  }

  /* Garnish Row on Mobile */
  .spec-garnish-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: none;
    border-radius: var(--radius-sm);
  }

  .spec-garnish-row .spec-amount {
    width: auto;
    min-width: 54px;
    flex-shrink: 0;
  }

  .spec-garnish-row .spec-amount .spec-unit {
    font-size: 0.86rem;
    font-family: var(--font-display);
    color: var(--color-accent-light);
    margin-left: 0;
  }

  .spec-garnish-row .spec-ingredient {
    flex: 1;
    min-width: 0;
  }

  .spec-garnish-row .spec-ingredient-name-row {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
  }

  .spec-garnish-row .spec-garnish-name {
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: normal;
    word-break: normal;
  }

  .spec-garnish-row .spec-actions {
    display: none;
  }

  /* Editorial Sections on Mobile */
  .recipe-editorial-section {
    margin-bottom: 1.75rem;
  }

  .editorial-section-title {
    font-size: 1.15rem;
    color: var(--color-accent-light);
    margin-bottom: 0.65rem;
    padding-bottom: 0.35rem;
  }

  .card-instructions {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  /* Similar Cocktails Shelf on Mobile */
  .similar-cocktails-shelf {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    margin-bottom: 2rem;
  }

  .shelf-header {
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
  }

  .shelf-title {
    font-size: 0.78rem;
  }

  .similar-cocktail-card {
    flex: 0 0 160px;
    width: 160px;
    padding: 0.85rem 0.75rem;
  }

  .similar-card-glass {
    height: 76px;
    margin-bottom: 0.5rem;
  }

  /* Backbar Modal on Mobile */
  .backbar-dialog {
    width: 96vw;
    height: 92vh;
    max-height: 92vh;
    min-height: 0;
  }

  .backbar-dialog-header,
  .backbar-toolbar,
  .backbar-dialog-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .backbar-nav-tabs {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .backbar-categories-container {
    padding: 1rem;
    gap: 1.25rem;
    min-height: 0;
    flex: 1 1 auto;
  }

  .backbar-pill {
    padding: 0.38rem 0.68rem;
    font-size: 0.78rem;
  }

  /* Recipe Editor Mobile Optimization */
  .editor-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.85rem;
    margin-bottom: 1.15rem;
  }

  .editor-title {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
    line-height: 1.2;
    word-break: break-word;
    min-width: 0;
  }

  .editor-header .counter-actions {
    display: flex;
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .editor-header .counter-actions .btn {
    min-height: 38px;
    padding: 0.45rem 0.85rem;
    font-size: 0.84rem;
  }

  .editor-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
  }

  .editor-form-col {
    width: 100%;
    min-width: 0;
  }

  .editor-preview-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border-subtle);
  }

  .editor-preview-col .glass-wrapper {
    width: 100%;
    max-width: 280px;
    height: 300px;
    margin: 0 auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .editor-specs-section {
    margin-top: 1.25rem;
  }

  .editor-specs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
  }

  .editor-spec-row {
    display: grid;
    grid-template-columns: 60px 80px 1fr 58px 34px;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    align-items: center;
  }

  .editor-spec-row .form-input,
  .editor-spec-row .form-select {
    padding: 0.55rem 0.45rem;
    font-size: 0.86rem;
    min-height: 38px;
  }

  .editor-spec-row .form-select {
    padding-right: 1.4rem;
    background-size: 12px 12px;
    background-position: right 0.35rem center;
  }

  .editor-spec-row .spec-input-amount {
    text-align: center;
  }

  .editor-spec-row .spec-input-abv {
    padding: 0.55rem 0.25rem;
    font-size: 0.8rem;
    text-align: center;
  }

  .editor-spec-row .btn-remove-row {
    min-width: 34px;
    min-height: 38px;
    width: 34px;
    height: 38px;
    padding: 0;
  }

  .editor-tag-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .editor-tag-input-field {
    min-width: 180px;
    flex: 1 1 180px;
    min-height: 38px;
  }

  .editor-tag-input-row .btn {
    min-height: 38px;
    padding: 0.45rem 0.85rem;
  }

  .quick-paste-box {
    padding: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .quick-paste-textarea {
    font-size: 0.85rem;
    height: 85px;
  }
}

@media (max-width: 340px) {
  .recipe-item-glass {
    display: none;
  }
}