/* ==========================================================================
   Creami Cravings - Modern Ninja Creami Pantry & Recipe Styling System
   ========================================================================== */

:root {
  color-scheme: dark;
  
  --bg-main: #0c0e17;
  --bg-gradient: radial-gradient(circle at 10% 10%, rgba(236, 72, 153, 0.15) 0%, transparent 45%),
                 radial-gradient(circle at 90% 85%, rgba(139, 92, 246, 0.14) 0%, transparent 45%),
                 radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.06) 0%, transparent 60%);
  --bg-card: rgba(20, 24, 39, 0.85);
  --bg-card-hover: rgba(28, 34, 56, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);
  --bg-input: rgba(12, 14, 23, 0.85);
  --bg-item: rgba(18, 22, 36, 0.6);
  --bg-item-hover: rgba(236, 72, 153, 0.08);
  --bg-modal: #151828;
  --bg-modal-overlay: rgba(6, 8, 14, 0.82);

  --border-glass: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(236, 72, 153, 0.4);
  --border-item: rgba(255, 255, 255, 0.06);
  
  --primary: #ec4899;
  --primary-glow: rgba(236, 72, 153, 0.35);
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #d946ef 50%, #8b5cf6 100%);
  --secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  
  --heading-gradient: linear-gradient(135deg, #ffffff 0%, #cbd5e1 55%, #f472b6 100%);
  --badge-bg: rgba(236, 72, 153, 0.15);
  --badge-border: rgba(236, 72, 153, 0.3);
  --badge-text: #f472b6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-checked: #34d399;
  
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-card-hover: 0 16px 36px -10px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --shadow-success-glow: 0 0 25px var(--success-glow);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  
  --bg-main: #f8fafc;
  --bg-gradient: radial-gradient(circle at 10% 10%, rgba(236, 72, 153, 0.1) 0%, transparent 45%),
                 radial-gradient(circle at 90% 85%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
                 radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 60%);
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(15, 23, 42, 0.04);
  --bg-glass-hover: rgba(15, 23, 42, 0.08);
  --bg-input: rgba(241, 245, 249, 0.95);
  --bg-item: rgba(248, 250, 252, 0.9);
  --bg-item-hover: rgba(236, 72, 153, 0.08);
  --bg-modal: #ffffff;
  --bg-modal-overlay: rgba(15, 23, 42, 0.55);

  --border-glass: rgba(15, 23, 42, 0.1);
  --border-highlight: rgba(236, 72, 153, 0.4);
  --border-item: rgba(15, 23, 42, 0.08);
  
  --primary: #db2777;
  --primary-glow: rgba(219, 39, 119, 0.25);
  --primary-gradient: linear-gradient(135deg, #db2777 0%, #c026d3 50%, #7c3aed 100%);
  --secondary: #7c3aed;
  --accent-cyan: #0891b2;
  --accent-amber: #d97706;
  --success: #059669;
  --success-glow: rgba(5, 150, 105, 0.25);
  
  --heading-gradient: linear-gradient(135deg, #0f172a 0%, #334155 50%, #db2777 100%);
  --badge-bg: rgba(219, 39, 119, 0.1);
  --badge-border: rgba(219, 39, 119, 0.25);
  --badge-text: #be185d;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-checked: #059669;
  
  --shadow-main: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 16px 36px -10px rgba(15, 23, 42, 0.14);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --shadow-success-glow: 0 0 25px var(--success-glow);
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 60px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--bg-gradient);
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
}

/* Custom Smooth Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Container */
.container {
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Header */
.main-header {
  margin-bottom: 28px;
}

.header-top-bar {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 20px !important;
  gap: 6px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.header-top-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
}

.header-desktop-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.header-utility-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}

.header-nav-cluster {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.btn-secondary-action,
.btn-install-pwa {
  height: 31px !important;
  min-height: 31px !important;
  padding: 0 7px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  gap: 4px !important;
}

.btn-header-icon {
  width: 31px !important;
  height: 31px !important;
  min-width: 31px !important;
  min-height: 31px !important;
  font-size: 0.92rem !important;
  padding: 0 !important;
}

.btn-google-signin {
  height: 31px !important;
  min-height: 31px !important;
  padding: 0 8px !important;
  font-size: 0.75rem !important;
  gap: 5px !important;
  font-weight: 600 !important;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  color: var(--badge-text);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap !important;
  justify-content: flex-end;
}

.header-desktop-only {
  display: inline-flex;
}

.signin-text-desktop {
  display: inline;
}

.signin-text-mobile {
  display: none;
}

.feedback-text-desktop {
  display: inline;
}

.feedback-text-mobile {
  display: none;
}

.creator-text-desktop {
  display: inline;
}

.creator-text-mobile {
  display: none;
}

.creators-text-desktop {
  display: inline;
}

.creators-text-mobile {
  display: none;
}

.gear-text-desktop {
  display: inline;
}

.gear-text-mobile {
  display: none;
}

.btn-creators-nav {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.btn-creators-nav:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.6);
  color: #f3e8ff;
}

.nav-text-full {
  display: inline;
}

.nav-text-short {
  display: none;
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  height: 38px;
  max-height: 38px;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.btn-header-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

.btn-header-icon:active {
  transform: scale(0.94);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

.theme-toggle-btn:active {
  transform: scale(0.94);
}

[data-theme="dark"] .icon-moon { display: inline-block; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: inline-block; }

.hero-content {
  text-align: center;
  margin-bottom: 28px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.stat-card-highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-card) 100%);
}

.stat-card-highlight:hover {
  border-color: var(--success);
  box-shadow: var(--shadow-success-glow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--bg-glass);
  flex-shrink: 0;
}

.stat-icon.pink { background: rgba(236, 72, 153, 0.15); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); }
.stat-icon.blue { background: rgba(14, 165, 233, 0.15); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); }

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-text-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.25;
}

.stat-sublabel {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  line-height: 1.2;
  margin-top: 1px;
}

/* Split Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 1080px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* Responsive Single-Row Header Controls for Narrow Desktop & Laptop Screens */
@media (max-width: 1400px) and (min-width: 769px) {
  .nav-text-full {
    display: none !important;
  }
  .nav-text-short {
    display: inline !important;
  }
  .header-actions {
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }
  .btn-secondary-action,
  .btn-install-pwa {
    padding: 0 10px !important;
    font-size: 0.82rem !important;
    gap: 5px !important;
  }
  .btn-header-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 1140px) and (min-width: 769px) {
  .header-top-bar {
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }
  .header-top-row {
    gap: 4px !important;
  }
  .header-desktop-actions {
    gap: 3px !important;
  }
  .header-utility-controls {
    gap: 3px !important;
  }
  .header-nav-cluster {
    gap: 3px !important;
    width: auto !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }
  .btn-secondary-action,
  .btn-install-pwa {
    padding: 0 5px !important;
    font-size: 0.68rem !important;
    gap: 3px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
  }
  .btn-google-signin {
    padding: 0 6px !important;
    font-size: 0.70rem !important;
    height: 28px !important;
    min-height: 28px !important;
    gap: 4px !important;
  }
  .badge-count {
    min-width: 15px !important;
    height: 15px !important;
    padding: 0 3px !important;
    font-size: 0.62rem !important;
  }
  .btn-header-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 0.86rem !important;
  }
}

@media (max-width: 960px) and (min-width: 769px) {
  .header-top-bar {
    gap: 3px !important;
  }
  .header-top-row {
    gap: 3px !important;
  }
  .header-desktop-actions {
    gap: 2px !important;
  }
  .header-nav-cluster {
    gap: 2px !important;
  }
  .btn-secondary-action,
  .btn-install-pwa {
    padding: 0 4px !important;
    font-size: 0.64rem !important;
    gap: 2px !important;
    height: 27px !important;
    min-height: 27px !important;
  }
  .btn-google-signin {
    padding: 0 4px !important;
    font-size: 0.65rem !important;
    height: 27px !important;
    min-height: 27px !important;
  }
  .btn-header-icon {
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    min-height: 27px !important;
    font-size: 0.82rem !important;
  }
}

/* Panel Containers */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-main);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.pantry-panel {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-pill {
  padding: 3px 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-checked);
}

.pantry-header-buttons {
  display: flex;
  gap: 6px;
}

.btn-xs {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-xs:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-xs.btn-outline {
  background: transparent;
  border-color: var(--border-glass);
  color: var(--text-muted);
}

.btn-xs.btn-outline:hover {
  background: var(--bg-glass-hover);
  color: var(--text-main);
}

/* Search Box */
.search-box {
  position: relative;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  padding: 10px 36px 10px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.6;
}

.clear-input-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.clear-input-btn:hover {
  color: var(--text-main);
}

/* Quick Add Presets */
.presets-section {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.presets-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 8px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
}

.chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Ingredient Categories & Checkboxes */
.ingredient-list-container {
  overflow-y: auto;
  padding-right: 4px;
  flex-grow: 1;
}

.category-group {
  margin-bottom: 12px;
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  background: var(--bg-item);
  overflow: hidden;
  transition: border-color 0.2s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}

.category-group.open {
  border-color: var(--border-glass);
}

.category-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background-color 0.15s ease;
}

.category-header:hover {
  background: var(--bg-glass-hover);
}

.category-header-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-in-stock-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: var(--text-checked);
}

.category-chevron {
  font-size: 0.7rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.category-group.open .category-chevron {
  transform: rotate(180deg);
}

.category-items-list {
  padding: 6px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-group:not(.open) .category-items-list {
  display: none;
}

/* Ingredient Checkbox Item */
.ingredient-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-size: 0.85rem;
  user-select: none;
}

.ingredient-checkbox-item:hover {
  background: var(--bg-item-hover);
}

.ingredient-checkbox-item.checked {
  background: rgba(16, 185, 129, 0.1);
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
  background: var(--bg-input);
}

.ingredient-checkbox-item.checked .custom-checkbox {
  background: var(--success);
  border-color: var(--success);
}

.custom-checkbox::after {
  content: "✓";
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}

.ingredient-checkbox-item.checked .custom-checkbox::after {
  opacity: 1;
  transform: scale(1);
}

.ingredient-name-text {
  flex-grow: 1;
  transition: color 0.15s;
}

.ingredient-checkbox-item.checked .ingredient-name-text {
  color: var(--text-checked);
  font-weight: 600;
}

.ingredient-recipe-count {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Pantry Item Quantity Stepper */
.pantry-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 2px 4px;
  margin-left: 6px;
  margin-right: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pantry-qty-stepper:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(16, 185, 129, 0.55);
}

.btn-pantry-qty-step {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-pantry-qty-step:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.btn-pantry-qty-step:active {
  transform: scale(0.92);
}

.pantry-qty-val {
  background: transparent;
  border: none;
  color: #10b981;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 4px;
  cursor: pointer;
  letter-spacing: 0.02em;
  min-width: 24px;
  text-align: center;
  transition: color 0.15s ease;
  user-select: none;
}

.pantry-qty-val:hover {
  color: #34d399;
  text-decoration: underline;
}

.pantry-qty-modal-content {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.pantry-preset-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pantry-preset-chip:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
}

/* Right Panel: Recipes Explorer */
.recipes-panel {
  display: flex;
  flex-direction: column;
}

.recipes-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.recipe-search-box {
  flex-grow: 1;
  min-width: 260px;
  margin-bottom: 0;
}

.controls-actions-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-toggles-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Toggle Pill */
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toggle-pill input {
  display: none;
}

.toggle-pill:hover {
  background: var(--bg-glass-hover);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.toggle-pill:has(input:checked),
.toggle-pill.checked {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

/* Toggle Switch */
.toggle-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.toggle-container input {
  display: none;
}

.toggle-track {
  width: 38px;
  height: 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  position: relative;
  transition: background-color 0.2s, border-color 0.2s;
}

.toggle-track::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background-color 0.2s;
}

.toggle-container input:checked + .toggle-track {
  background: var(--success);
  border-color: var(--success);
}

.toggle-container input:checked + .toggle-track::before {
  transform: translateX(16px);
  background: #ffffff;
}

/* Sort Select */
.sort-select-wrapper select {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.sort-select-wrapper select:focus {
  border-color: var(--primary);
}

/* Category Tabs */
.category-tabs-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tab-btn {
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: var(--font-body);
}

.tab-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.tab-count {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
}

.tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
}

#customActionsContainer,
#tabCustomRecipes {
  display: none;
}

.custom-actions {
  display: inline-flex;
  align-items: center;
}

.btn-add-recipe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-add-recipe:hover {
  background: var(--bg-glass-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 26px;
  flex-wrap: wrap;
}

.results-summary {
  font-weight: 600;
}

.active-pantry-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  min-height: 18px;
  line-height: 1.4;
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  min-height: 400px;
  contain: layout style;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Recipe Card */
.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.recipe-card > div:first-child,
.recipe-card-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.recipe-card-collapsible-wrap {
  width: 100%;
}

.card-mobile-preview-strip {
  display: none;
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-card-hover);
}

.recipe-card.ready-to-make {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-card) 100%);
}

.recipe-card.ready-to-make:hover {
  border-color: var(--success);
  box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.4);
}

.recipe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
  min-height: 26px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.card-book-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.book-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

.book-tag.page-tag {
  font-size: 0.68rem;
  padding: 3px 8px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  color: var(--text-dim);
}

.book-tag.base-flavors { background: rgba(20, 184, 166, 0.18); color: #2dd4bf; border-color: rgba(20, 184, 166, 0.4); }
.book-tag.community-legends { background: rgba(249, 115, 22, 0.18); color: #fb923c; border-color: rgba(249, 115, 22, 0.4); }
.book-tag.fan-favorites { background: rgba(236, 72, 153, 0.15); color: #f472b6; border-color: rgba(236, 72, 153, 0.3); }
.book-tag.keto { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.book-tag.lactose-free { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border-color: rgba(6, 182, 212, 0.3); }
.book-tag.no-protein { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border-color: rgba(139, 92, 246, 0.3); }
.book-tag.custom { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }

/* Multi-Book Banner in Recipe Modal */
.multi-book-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.multi-book-banner strong {
  color: var(--text-main);
}

.card-actions-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
}

.favorite-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: transform 0.15s ease, color 0.15s ease;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.favorite-btn:hover {
  transform: scale(1.2);
  color: var(--primary);
}

.favorite-btn.is-favorite {
  color: var(--primary);
}

.card-share-btn {
  background: transparent;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: transform 0.15s ease, color 0.15s ease;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.card-share-btn:hover {
  transform: scale(1.2);
  color: var(--primary);
}

.card-share-btn.copied {
  color: #34d399 !important;
  transform: scale(1.2);
}

.card-video-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
  margin-right: 2px;
}

.card-video-btn:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.7));
}

.recipe-modal-video-card {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.recipe-modal-video-card.search-fallback {
  background: var(--bg-card);
  border-color: var(--border-item);
}

.video-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.video-card-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.video-card-details {
  display: flex;
  flex-direction: column;
}

.video-card-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.3;
}

.video-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-watch-creator-video {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-watch-creator-video:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.btn-watch-creator-video.tiktok {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-watch-creator-video.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.35);
}

.recipe-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

/* Match Status Banner */
.match-status-bar {
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.match-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.match-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.match-badge.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.match-badge.partial {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.match-badge.low {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.match-percent {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.match-progress-track {
  width: 100%;
  height: 5px;
  background: var(--bg-glass);
  border-radius: 999px;
  overflow: hidden;
}

.match-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.match-progress-fill.ready {
  background: var(--success);
}

/* Macro Pills */
.macro-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.macro-pill {
  background: var(--bg-glass);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  padding: 6px 3px;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.macro-pill-val {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.macro-pill-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.macro-pill.cal .macro-pill-val { color: #f472b6; }
.macro-pill.pro .macro-pill-val { color: #34d399; }
.macro-pill.carb .macro-pill-val { color: #fbbf24; }
.macro-pill.fat .macro-pill-val { color: #38bdf8; }

/* Ingredients Preview List */
.card-ingredients-preview {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.card-ing-item {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.card-ing-status {
  font-size: 0.8rem;
  flex-shrink: 0;
}

.card-ing-status.has { color: var(--success); }
.card-ing-status.miss { color: var(--text-dim); opacity: 0.5; }

.card-ing-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.card-ing-item.has .card-ing-text {
  color: var(--text-main);
  font-weight: 500;
}

.card-ing-item.miss .card-ing-text {
  color: var(--text-dim);
}

.card-more-ings {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Bottom */
.recipe-card-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-top: 10px;
  border-top: 1px solid var(--border-item);
}

.card-bottom-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.card-bottom-actions .btn-card-batch-prep,
.card-bottom-actions .card-prep-slot,
.card-bottom-actions .card-batch-prep-stepper,
.card-bottom-actions .btn-quick-freeze-card {
  flex: 0 0 auto;
}

.card-bottom-actions .btn-view-recipe {
  flex: 1;
  text-align: center;
  justify-content: center;
}

.spin-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  align-self: flex-start;
  white-space: nowrap;
}

.recipe-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.recipe-title-link:hover {
  color: var(--primary, #ec4899);
}

.btn-view-recipe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-view-recipe:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

/* Server-Side Rendered (SSR) Pre-Rendered Content for SEO & Crawlers */
.ssr-recipe-fallback {
  max-width: 860px;
  margin: 20px auto 30px auto;
  padding: 28px 24px;
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 16px);
  color: var(--text-main, #f8fafc);
  box-shadow: var(--shadow-glass, 0 8px 32px rgba(0, 0, 0, 0.2));
}

.ssr-recipe-fallback .ssr-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 6px 0 12px 0;
  color: var(--text-main, #ffffff);
  line-height: 1.25;
}

.ssr-recipe-fallback .ssr-badge-cat {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary, #ec4899);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.ssr-recipe-fallback .ssr-macros-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px 0;
}

.ssr-recipe-fallback .ssr-macro-pill {
  padding: 6px 14px;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 500;
}

.ssr-recipe-fallback .ssr-macro-pill.cal strong { color: #f97316; }
.ssr-recipe-fallback .ssr-macro-pill.pro strong { color: #10b981; }
.ssr-recipe-fallback .ssr-macro-pill.carb strong { color: #3b82f6; }
.ssr-recipe-fallback .ssr-macro-pill.fat strong { color: #a855f7; }

.ssr-recipe-fallback .ssr-description {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 20px;
}

.ssr-recipe-fallback .ssr-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
}

.ssr-recipe-fallback .ssr-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main, #ffffff);
}

.ssr-recipe-fallback .ssr-ingredients-list,
.ssr-recipe-fallback .ssr-instructions-list {
  padding-left: 22px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.ssr-recipe-fallback .ssr-ingredients-list li,
.ssr-recipe-fallback .ssr-instructions-list li {
  margin-bottom: 8px;
  color: var(--text-main, #f1f5f9);
}

.ssr-recipe-fallback .ssr-protip {
  background: rgba(236, 72, 153, 0.08);
  border-left: 4px solid var(--primary, #ec4899);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  margin-top: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.ssr-recipe-fallback .ssr-hub-links {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
}

.ssr-recipe-fallback .ssr-hub-links h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.ssr-recipe-fallback .ssr-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.ssr-recipe-fallback .ssr-hub-card {
  display: block;
  padding: 12px 14px;
  background: var(--bg-glass, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 8px);
  color: var(--text-main, #ffffff);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.ssr-recipe-fallback .ssr-hub-card:hover {
  background: var(--primary, #ec4899);
  border-color: var(--primary, #ec4899);
  color: #ffffff;
}

.ssr-recipe-fallback .ssr-recipe-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ssr-recipe-fallback .ssr-recipe-list-item {
  padding: 12px 14px;
  background: var(--bg-glass, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 8px);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.15s ease;
}

.ssr-recipe-fallback .ssr-recipe-list-item:hover {
  border-color: var(--primary, #ec4899);
  background: rgba(236, 72, 153, 0.05);
}

.ssr-recipe-fallback .ssr-recipe-item-name {
  font-weight: 700;
  color: var(--text-main, #ffffff);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.ssr-recipe-fallback .ssr-recipe-item-meta {
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
}

.ssr-recipe-fallback .ssr-faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.ssr-recipe-fallback .ssr-faq-item {
  padding: 16px;
  background: var(--bg-glass, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 8px);
}

.ssr-recipe-fallback .ssr-faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #ffffff);
  margin-bottom: 8px;
}

.ssr-recipe-fallback .ssr-faq-item p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary, #94a3b8);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-xl);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
}

/* Modals & Scroll Containment */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: contain !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(6, 8, 14, 0.88);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overscroll-behavior: none;
}

.modal-overlay:not(.active),
.modal-overlay:not(.active) * {
  pointer-events: none !important;
  visibility: hidden !important;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  overscroll-behavior: none;
}

.modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  padding: 32px;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
  z-index: 100;
  pointer-events: auto;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-header {
  margin-bottom: 20px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Modal Macros Grid */
.modal-macro-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  text-align: center;
}

@media (max-width: 600px) {
  .modal-macro-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.modal-macro-item .macro-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-macro-item .macro-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

/* Modal Section Headings */
.modal-section-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modal Ingredients List */
.modal-ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.modal-ing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  gap: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.modal-ing-row:hover {
  background: var(--bg-item-hover);
}

.modal-ing-row.in-pantry {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.22);
}

.modal-ing-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.modal-ing-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.modal-ing-name {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-main);
  line-height: 1.3;
  word-break: break-word;
}

.modal-ing-notes {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.25;
  word-break: break-word;
}

.modal-ing-amount-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 5px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.modal-ing-amount-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.modal-ing-amount-val {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
  white-space: nowrap;
}

.modal-ing-amount-val.empty {
  color: var(--text-dim);
  font-weight: 500;
}

.modal-ing-row.in-pantry .modal-ing-amount-box {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.modal-ing-row.in-pantry .modal-ing-amount-val {
  color: var(--text-checked);
}

/* Actions Toolbar */
.modal-ing-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Legacy group fallback */
.modal-ing-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.modal-ing-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
  min-height: 30px;
}

.modal-ing-toggle-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-main);
}

.modal-ing-toggle-btn.in-pantry {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.modal-ing-toggle-btn.in-pantry:hover {
  background: #059669;
  border-color: #059669;
}

@media (max-width: 600px) {
  .modal-ing-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }
  
  .modal-ing-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .modal-ing-amount-box {
    min-width: 72px;
    padding: 4px 10px;
  }

  .modal-ing-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
  }

  .modal-ing-actions > * {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .modal-ing-right-group {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Modal Instructions Steps */
.modal-instructions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.modal-step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s, background-color 0.2s;
}

.modal-step-item.completed {
  opacity: 0.55;
  text-decoration: line-through;
}

.step-num-badge {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.modal-step-item.completed .step-num-badge {
  background: var(--text-dim);
}

.step-text {
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Missing Items Alert Callout */
.missing-items-callout {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.missing-items-callout.all-ready {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.missing-items-callout.has-missing {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.missing-items-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 3px 0 8px;
  word-break: break-word;
}

/* Buttons */
.btn-primary {
  padding: 10px 20px;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--primary-glow);
  font-family: var(--font-body);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  color: #ffffff;
}

/* Forms */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  flex: 1;
}

.form-group.flex-2 { flex: 2; }
.form-group.flex-1 { flex: 1; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Shopping List */
.shopping-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 16px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 4px;
}

.shopping-quick-add-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

.shopping-quick-add-input-box {
  position: relative;
  flex: 1;
}

.shopping-quick-add-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.shopping-quick-add-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.shopping-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-modal);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.shopping-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-item);
  transition: all var(--transition-fast);
  user-select: none;
}

.shopping-autocomplete-item:last-child {
  border-bottom: none;
}

.shopping-autocomplete-item:hover,
.shopping-autocomplete-item.active {
  background: var(--bg-hover);
}

.shopping-autocomplete-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.shopping-autocomplete-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.shopping-autocomplete-name {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
  color: var(--text-main);
}

.shopping-autocomplete-cat {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.2;
}

.shopping-autocomplete-match {
  color: var(--primary);
  font-weight: 700;
}

.shopping-category-group {
  margin-bottom: 12px;
}

.shopping-category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-glass);
}

.shopping-cat-count {
  margin-left: auto;
  font-size: 0.72rem;
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text-dim);
}

.shopping-category-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shopping-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-item);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-item);
  transition: all var(--transition-fast);
}

.shopping-item-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.shopping-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.shopping-item-check-btn {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-check-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-dim);
  border-radius: 4px;
  display: inline-block;
  transition: all var(--transition-fast);
}

.shopping-item-check-btn:hover .shop-check-box {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.shopping-item-name {
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.25;
}

.shopping-item-recipes {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shopping-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}

.shopping-suggestions-card {
  margin-top: 16px;
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.shopping-suggestions-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  text-align: left;
}

.shopping-suggestions-content {
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-glass);
  max-height: 220px;
  overflow-y: auto;
}

.shopping-suggested-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-item);
}

.shopping-suggested-row:last-child {
  border-bottom: none;
}

.shopping-suggested-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.shopping-suggested-reason {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.shopping-empty-state {
  text-align: center;
  padding: 32px 14px;
}

.shopping-empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.shopping-empty-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Offline PWA Grocery Banner */
.offline-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.shopping-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.shopping-view-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
}

.btn-shop-view {
  background: transparent;
  border: none;
  color: var(--text-dim, #94a3b8);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-shop-view:hover {
  color: #f8fafc;
}

.btn-shop-view.active {
  background: var(--primary, #059669);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

/* In-Store Grocery Mode */
.store-mode-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(56, 189, 248, 0.12) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md, 12px);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-mode-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.store-mode-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-mode-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.store-wake-lock-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.store-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.store-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-aisle-group {
  margin-bottom: 18px;
}

.store-aisle-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.3px;
}

.store-aisle-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.store-item-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.store-item-card:active {
  transform: scale(0.99);
}

.store-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.store-check-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  background: rgba(15, 23, 42, 0.5);
}

.store-item-card:hover .store-check-circle {
  border-color: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.store-item-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.store-item-source {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-item-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.store-item-card:hover .store-item-tag {
  background: #10b981;
  color: #ffffff;
}

.store-found-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px dashed rgba(255, 255, 255, 0.12);
}

.store-found-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #34d399;
}

.store-found-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  margin-bottom: 6px;
  opacity: 0.75;
  transition: all 0.2s ease;
}

.store-found-item-card:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.8);
}

.store-found-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: line-through;
}

.btn-store-undo {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-store-undo:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.store-complete-card {
  text-align: center;
  padding: 24px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(56, 189, 248, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  margin-bottom: 16px;
}

.store-complete-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.shopping-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

body.modal-open .toast-container,
body.modal-open .cookie-consent-banner {
  display: none !important;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-modal);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Quick Nutrition & Macro Filter Chips
   ========================================================================== */
.quick-filter-chips-bar,
.condensed-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.filter-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-dropdown-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 6px 30px 6px 14px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px 11px;
}

[data-theme="light"] .filter-dropdown-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.filter-dropdown-select:hover {
  background-color: var(--bg-glass-hover);
  border-color: var(--border-highlight);
}

.filter-dropdown-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.filter-dropdown-select.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.filter-dropdown-select.active-craving {
  background-color: #ec4899;
  border-color: #ec4899;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.btn-clear-filters-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 999px;
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-clear-filters-pill:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  transform: translateY(-1px);
}

.quick-filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.filter-chip {
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--bg-glass-hover);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Recipe Card User Rating Badge */
.recipe-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  height: 24px;
  box-sizing: border-box;
  line-height: 1;
}

/* Recipe Card Author Pro Tip Indicator Badge (Hidden on main screen per user request) */
.card-protip-badge {
  display: none !important;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .card-protip-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   Recipe Modal: Scaling & Unit Mode Controls
   ========================================================================== */
.modal-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 18px;
}

.modal-option-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-option-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.segment-btn-group {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-item);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.segment-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.segment-btn:hover {
  color: var(--text-main);
}

.segment-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.deluxe-active-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f472b6;
  margin-bottom: 18px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Smart Substitution Chips */
.ing-sub-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.32);
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 3px;
  line-height: 1.25;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ing-sub-chip:hover {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.5);
}

/* One-Click Grocery Button in Modal Ingredient Row */
.modal-ing-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
  min-height: 30px;
}

.modal-ing-shop-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-main);
  border-color: #38bdf8;
}

.modal-ing-shop-btn.in-list {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Add All Missing Button in Missing Callout */
.btn-add-all-missing {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  cursor: pointer;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.btn-add-all-missing:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #f59e0b;
  color: #ffffff;
}

/* ==========================================================================
   Defrost 60-Second Bath Timer Widget
   ========================================================================== */
.step-timer-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 6px 0 2px 36px;
  gap: 10px;
  flex-wrap: wrap;
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-icon {
  font-size: 1.15rem;
}

.timer-countdown {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #06b6d4;
  letter-spacing: 0.03em;
  min-width: 44px;
}

.timer-countdown.pulsing {
  animation: timerPulse 1s infinite alternate;
}

@keyframes timerPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); color: #22d3ee; text-shadow: 0 0 10px rgba(34, 211, 238, 0.5); }
}

.timer-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timer-controls {
  display: flex;
  gap: 6px;
}

.btn-timer-action {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid #06b6d4;
  background: #06b6d4;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timer-action:hover {
  background: #0891b2;
}

.btn-timer-action.running {
  background: #f59e0b;
  border-color: #f59e0b;
}

.btn-timer-action.done {
  background: var(--success);
  border-color: var(--success);
}

.btn-timer-reset {
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-dim);
  cursor: pointer;
}

.btn-timer-reset:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Official Author Pro Tip Callout Card
   ========================================================================== */
.official-protip-card {
  margin: 20px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}

.official-protip-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.protip-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b45309;
  background: rgba(245, 158, 11, 0.22);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

[data-theme="dark"] .protip-badge-pill {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.45);
}

.protip-hack-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.official-protip-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-main);
}

/* ==========================================================================
   Creami Texture Troubleshooter Card
   ========================================================================== */
.spin-troubleshooter-card {
  margin: 20px 0;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.troubleshooter-header {
  margin-bottom: 10px;
}

.troubleshooter-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.troubleshooter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.trouble-item {
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.trouble-q {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
}

.trouble-a {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.trouble-a strong {
  color: var(--text-main);
}

/* ==========================================================================
   User Rating & Personal Notes Section
   ========================================================================== */
.recipe-user-feedback-section {
  margin: 22px 0 10px;
  padding: 16px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
}

.rating-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-subheading {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.rating-save-status {
  font-size: 0.76rem;
  color: var(--success);
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.rating-stars-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.star-rating {
  display: inline-flex;
  gap: 3px;
}

.star-rating .star {
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.star-rating .star:hover,
.star-rating .star.hover {
  color: #fde047;
  transform: scale(1.15);
}

.star-rating .star.selected {
  color: #fbbf24;
}

.rating-text-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.recipe-note-wrapper textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.recipe-note-wrapper textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* ==========================================================================
   Google Auth Header Button & User Profile Widget
   ========================================================================== */
.btn-google-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0 16px;
  height: 40px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-google-signin:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.2);
}

.btn-google-signin:active {
  transform: scale(0.97);
}

.user-profile-widget {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 4px 12px 4px 6px;
  height: 40px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: var(--bg-item);
}

.user-meta-col {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sync-indicator {
  font-size: 0.68rem;
  font-weight: 600;
  color: #10b981;
}

.btn-signout {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-signout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ==========================================================================
   Google Auth Modal Styling
   ========================================================================== */
.auth-modal-content {
  max-width: 440px;
  text-align: center;
}

.auth-icon-circle {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.auth-sync-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
  text-align: left;
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.perk-icon {
  font-size: 1.4rem;
}

.perk-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.perk-text strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.perk-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gsi-container {
  display: flex;
  justify-content: center;
  margin: 16px 0 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-item);
}

.auth-divider span {
  padding: 0 10px;
}

.quick-auth-form {
  text-align: left;
}

.auth-mode-tabs {
  display: flex;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  padding: 3px;
  margin: 14px 0 16px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.auth-switch-prompt {
  margin-top: 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 4px;
  font-size: 0.82rem;
}

.auth-switch-link:hover {
  color: #f472b6;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.auth-label-row label {
  margin-bottom: 0;
}

.auth-link-forgot {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-link-forgot:hover {
  color: #f472b6;
}

.auth-step-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
}

.auth-reset-notice {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: left;
}

.auth-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.25rem !important;
  letter-spacing: 0.28em;
  text-align: center;
  font-weight: 800;
}

.auth-error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
  text-align: left;
}

.auth-error-banner.visible {
  display: block;
}

/* Portable Custom Recipe Share Banner & Actions */
.shared-recipe-portable-banner {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16) 0%, rgba(139, 92, 246, 0.16) 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.shared-recipe-portable-banner .shared-banner-title {
  font-weight: 800;
  color: #f472b6;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shared-recipe-portable-banner .shared-banner-byline {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.btn-save-shared-recipe {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-save-shared-recipe:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-save-shared-recipe:disabled {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #a7f3d0 !important;
  cursor: default;
  box-shadow: none !important;
}

.quick-google-fallback-wrap {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-item);
  text-align: center;
}

.quick-google-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.quick-google-toggle:hover {
  color: var(--text-muted);
}

/* ==========================================================================
   Recipe Card Community Badges & Made Counters
   ========================================================================== */
.card-community-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  height: 24px;
  box-sizing: border-box;
  line-height: 1;
}

.card-community-rating .rating-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.card-made-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.made-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.made-pill.personal {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.made-pill.community {
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
}

/* ==========================================================================
   Batch Counter Tracker Section in Recipe Modal
   ========================================================================== */
.recipe-batch-tracker-card {
  margin: 18px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.06);
}

.batch-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.batch-tracker-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch-community-pill {
  font-size: 0.76rem;
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
}

.batch-counter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.batch-personal-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.batch-counter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.batch-count-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #10b981;
  line-height: 1;
}

.batch-times-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.batch-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-batch-action {
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-batch-minus {
  width: 38px;
  height: 38px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-batch-minus:hover:not(:disabled) {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-batch-minus:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-batch-plus {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-batch-plus:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.batch-btn-subtext {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.9;
}

/* ==========================================================================
   Recipe Overall Rating System & Community Reviews
   ========================================================================== */
.recipe-community-rating-card {
  margin: 22px 0 10px;
  padding: 18px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
}

.community-rating-overview {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-item);
}

@media (max-width: 520px) {
  .community-rating-overview {
    grid-template-columns: 1fr;
  }
}

.comm-score-box {
  text-align: center;
  padding: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.comm-score-big {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
  margin-bottom: 4px;
}

.comm-score-stars {
  font-size: 1rem;
  color: #fbbf24;
  margin-bottom: 4px;
}

.comm-score-count {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.comm-bars-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comm-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
}

.comm-bar-star {
  width: 22px;
  font-weight: 600;
  color: var(--text-muted);
}

.comm-bar-track {
  flex: 1;
  height: 7px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  overflow: hidden;
}

.comm-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.comm-bar-pct {
  width: 20px;
  text-align: right;
  color: var(--text-dim);
  font-weight: 600;
}

.personal-rating-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.personal-rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

/* ==========================================================================
   Creami Roulette ("Surprise Me" Spin the Wheel)
   ========================================================================== */
.btn-roulette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(236, 72, 153, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.btn-roulette:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.55);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-roulette:active {
  transform: translateY(0) scale(0.98);
}

.btn-roulette .roulette-icon {
  font-size: 1.15rem;
  display: inline-block;
  transition: transform 0.4s ease;
}

.btn-roulette.spinning .roulette-icon {
  animation: rouletteSpinAnimation 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes rouletteSpinAnimation {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Roulette Spin Modal */
#rouletteModalOverlay {
  overscroll-behavior: none;
}

.roulette-modal-content {
  max-width: 480px;
  text-align: center;
  padding: 28px 24px;
  border: 1px solid rgba(236, 72, 153, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(236, 72, 153, 0.2);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.roulette-title-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 999px;
  color: #f472b6;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.roulette-headline {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.roulette-subtext {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.roulette-slot-machine {
  background: var(--bg-input);
  border: 2px solid rgba(236, 72, 153, 0.4);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  margin: 16px 0 24px;
  box-shadow: inset 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 15px rgba(236, 72, 153, 0.15);
  overflow: hidden;
  position: relative;
}

.slot-item {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
  line-height: 1.25;
}

.slot-item.blur {
  filter: blur(2.5px);
  opacity: 0.75;
  transform: translateY(2px) scale(0.97);
}

.roulette-winner-announcement {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.roulette-winner-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.roulette-winner-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.roulette-winner-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.roulette-winner-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

.roulette-winner-actions button {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.roulette-winner-actions button:hover {
  transform: translateY(-2px);
}

/* Modal Winner Banner (When opened from Roulette) */
.roulette-winner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16), rgba(168, 85, 247, 0.16));
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  gap: 12px;
}

.roulette-winner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #f472b6;
}

.btn-modal-spin-again {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-modal-spin-again:hover {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   Craving Filter Chips (Roadmap Item 12)
   ========================================================================== */
.chip-divider {
  width: 1px;
  height: 20px;
  background: var(--border-glass);
  margin: 0 4px;
  display: inline-block;
  align-self: center;
}

.filter-chip.craving-chip {
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.25);
  color: var(--text-main);
}

.filter-chip.craving-chip:hover {
  background: rgba(236, 72, 153, 0.18);
  border-color: #ec4899;
  transform: translateY(-1px);
}

.filter-chip.craving-chip.active {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}

/* ==========================================================================
   Fitness & Macro Target Filters Panel (Roadmap Item 10)
   ========================================================================== */
.macro-toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
  color: #60a5fa;
}

.macro-toggle-chip:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #93c5fd;
}

.macro-toggle-chip.active-panel {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.25);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.macro-active-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.macro-sliders-panel {
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.macro-sliders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.macro-sliders-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.macro-header-icon {
  font-size: 1.4rem;
}

.macro-header-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-main);
}

.macro-sliders-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.macro-sliders-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.macro-filter-summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: #60a5fa;
}

.macro-sliders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .macro-sliders-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.macro-slider-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.macro-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.slider-display {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary);
}

.macro-range-input {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-input);
  outline: none;
}

.macro-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* ==========================================================================
   1-Tap Macro Clipboard Export (Roadmap Item 10)
   ========================================================================== */
.macro-export-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -16px;
  margin-bottom: 22px;
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 10px;
}

.btn-copy-macros {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: var(--bg-item);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy-macros:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-copy-macros.copied {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.macro-export-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   Mobile Friendliness, Bottom Sheet Modals & Touch Ergonomics (Roadmap Item 13)
   ========================================================================== */

/* Modal Drag Handle (for mobile sheet view) */
.modal-handle-bar {
  display: none;
  width: 44px;
  height: 5px;
  background: var(--border-glass);
  border-radius: 999px;
  margin: 0 auto 16px;
  transition: background-color 0.2s ease;
}

/* Mobile View Switcher (Above Main Layout) */
.mobile-section-switcher {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 5px;
  margin-bottom: 18px;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.mobile-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  touch-action: manipulation;
}

.mobile-tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.mobile-tab-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
}

.mobile-tab-btn.active .mobile-tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Sticky Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-modal);
  border-top: 1px solid var(--border-glass);
  z-index: 950;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius-md);
  position: relative;
  flex: 1;
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, transform 0.1s ease;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-body);
}

.bottom-nav-badge {
  position: absolute;
  top: 2px;
  right: 18%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Touch Ergonomics on Range Inputs */
.macro-range-input {
  touch-action: pan-y;
  height: 8px;
}

.macro-range-input::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
  border: 2px solid #ffffff;
  -webkit-appearance: none;
}

.macro-range-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
  border: 2px solid #ffffff;
}

/* Responsive Rules for Tablets and Phones (<= 768px) */
@media (max-width: 768px) {
  html {
    scrollbar-gutter: auto;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }

  body {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 1rem;
    line-height: 1.5;
  }

  .container {
    padding: 14px 14px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .main-layout {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
  }

  .panel {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Header & Top Bar - Two-Tier Balanced Mobile Header */
  .main-header {
    margin-bottom: 12px;
  }

  .header-top-bar {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-bottom: 8px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  /* Row 1: Profile on Left, Sound & Theme on Right */
  .header-top-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #authHeaderContainer {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
  }

  .header-utility-controls {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  .header-desktop-only {
    display: none !important;
  }

  .signin-text-desktop {
    display: none;
  }

  .signin-text-mobile {
    display: inline;
  }

  /* Row 2: Quick Feature Navigation Pills */
  .header-nav-cluster {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 2px 0 4px 0 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .header-nav-cluster::-webkit-scrollbar {
    display: none !important;
  }

  .header-nav-cluster .btn-secondary-action,
  .header-nav-cluster .btn-install-pwa {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
  }

  .header-nav-cluster .btn-install-pwa {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3) !important;
  }

  .header-nav-cluster .btn-admin-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.32) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    color: #fbbf24 !important;
  }

  [data-theme="light"] .header-nav-cluster .btn-admin-header {
    background: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
  }

  @media (max-width: 390px) {
    .header-nav-cluster {
      gap: 5px 3px !important;
    }
    .header-nav-cluster .btn-secondary-action,
    .header-nav-cluster .btn-install-pwa {
      padding: 0 5px !important;
      font-size: 0.68rem !important;
      gap: 3px !important;
    }
  }

  .btn-install-text-desktop {
    display: none !important;
  }

  .btn-install-text-mobile {
    display: inline !important;
  }

  .admin-text-desktop {
    display: none !important;
  }

  .admin-text-mobile {
    display: inline !important;
  }

  .creator-text-desktop {
    display: none !important;
  }

  .creator-text-mobile {
    display: inline !important;
  }

  .badge-text-desktop {
    display: none !important;
  }

  .feedback-text-desktop {
    display: none !important;
  }

  .feedback-text-mobile {
    display: inline !important;
  }

  .creators-text-desktop {
    display: none !important;
  }

  .creators-text-mobile {
    display: inline !important;
  }

  .gear-text-desktop {
    display: none !important;
  }

  .gear-text-mobile {
    display: inline !important;
  }

  .install-platform-tabs {
    flex-direction: column;
    gap: 6px;
  }

  .btn-header-icon,
  .btn-sound-toggle,
  .theme-toggle-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
  }

  .theme-label {
    display: none;
  }

  .btn-secondary-action {
    padding: 0 8px;
    font-size: 0.76rem;
    font-weight: 700;
    height: 32px;
  }

  .btn-google-signin {
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 600;
    height: 32px;
    min-height: 32px;
    gap: 4px;
  }

  .btn-google-signin .google-svg {
    width: 14px;
    height: 14px;
  }

  .user-profile-widget {
    padding: 3px 6px 3px 3px !important;
    height: 32px !important;
    min-height: 32px !important;
    gap: 5px !important;
    max-width: 100%;
    min-width: 0;
    border-radius: 999px !important;
  }

  .user-avatar-circle {
    width: 24px !important;
    height: 24px !important;
  }

  /* Hide person's name on mobile for compact, spacious header */
  .user-meta-col {
    display: none !important;
  }

  .user-name-text {
    display: none !important;
  }

  .user-sync-indicator {
    display: none !important;
  }

  .btn-signout {
    padding: 2px 7px !important;
    font-size: 0.68rem !important;
    height: 22px !important;
    line-height: 1 !important;
  }

  /* Hero Content - Sleek & Compact */
  .hero-content {
    margin-bottom: 8px;
  }

  .hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 2px;
  }

  .hero-subtitle {
    font-size: 0.84rem;
    line-height: 1.3;
    margin-bottom: 2px;
  }

  /* Compact Stats Dashboard Bar */
  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .stat-card-highlight {
    grid-column: 1 / -1 !important;
    order: -1;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 14px !important;
    gap: 12px !important;
  }

  .stat-card-highlight .stat-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.3rem !important;
    flex-shrink: 0;
  }

  .stat-card-highlight .stat-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
  }

  .stat-card-highlight .stat-num {
    font-size: 1.65rem !important;
    line-height: 1 !important;
  }

  .stat-card-highlight .stat-text-group {
    display: flex !important;
    flex-direction: column !important;
  }

  .stat-card-highlight .stat-label {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
  }

  .stat-card-highlight .stat-sublabel {
    font-size: 0.72rem !important;
    color: rgba(52, 211, 153, 0.9) !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    margin-top: 1px !important;
  }

  .stat-card {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    padding: 10px 12px !important;
    gap: 4px 8px !important;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  .stat-info {
    display: contents !important;
  }

  .stat-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 1.2rem !important;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }

  .stat-num {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap;
    overflow: visible;
  }

  .stat-text-group {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    margin-top: 2px !important;
  }

  .stat-label {
    font-size: 0.8rem !important;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.25;
    overflow: visible;
    text-overflow: clip;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: normal;
  }

  .stat-sublabel {
    font-size: 0.68rem !important;
    color: var(--text-dim);
    font-weight: 500;
    line-height: 1.15;
    margin-top: 1px;
  }



  /* Mobile Section Switcher & Bottom Nav Display */
  .mobile-section-switcher {
    display: flex;
    padding: 6px;
    margin-bottom: 20px;
    gap: 8px;
  }

  .mobile-tab-btn {
    font-size: 1.05rem;
    font-weight: 800;
    min-height: 50px;
    padding: 12px 16px;
    gap: 8px;
  }

  .mobile-tab-icon {
    font-size: 1.25rem;
  }

  .mobile-tab-count {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 3px 9px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  /* Panel Switching on Mobile */
  .pantry-panel.mobile-panel-hidden,
  .recipes-panel.mobile-panel-hidden {
    display: none !important;
  }

  .pantry-panel {
    position: static;
    max-height: none;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .recipes-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Recipes Explorer Controls */
  .recipes-controls-bar {
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .recipe-search-box {
    width: 100% !important;
    min-width: 0 !important;
  }

  .recipe-search-box input {
    font-size: 1rem !important;
    min-height: 48px;
    padding: 12px 16px 12px 42px;
  }

  .controls-actions-cluster {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .controls-actions-cluster .sort-select-wrapper {
    flex: 1 1 100%;
    min-width: 0;
  }

  .controls-actions-cluster .sort-select-wrapper select {
    width: 100%;
    min-height: 44px;
    font-size: 0.9rem !important;
    font-weight: 700;
    padding: 8px 12px;
  }

  .controls-actions-cluster .btn-roulette {
    flex: 1 1 auto;
    justify-content: center;
    width: auto;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
  }


  .filter-toggles-row {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .toggle-container {
    font-size: 0.92rem;
    font-weight: 600;
    min-height: 44px;
  }

  /* Smooth Horizontal Scroll for Tabs & Filter Chips with Rubber-Banding Prevention */
  .category-tabs-bar {
    margin-bottom: 14px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .category-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overscroll-behavior-x: contain !important;
    gap: 10px;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    min-height: 42px;
    padding: 9px 16px;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .condensed-filter-bar,
  .quick-filter-chips-bar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overscroll-behavior-x: contain !important;
    gap: 8px;
    margin-bottom: 14px;
  }

  .condensed-filter-bar::-webkit-scrollbar,
  .quick-filter-chips-bar::-webkit-scrollbar {
    display: none;
  }

  .toggle-pill,
  .filter-dropdown-select,
  .filter-chip {
    flex-shrink: 0;
    min-height: 38px;
  }

  .macro-toggle-chip {
    order: -1 !important;
  }

  .quick-filter-chips-bar::-webkit-scrollbar {
    display: none;
  }

  .quick-filter-label {
    font-size: 0.85rem;
    font-weight: 800;
  }

  .filter-chip {
    flex-shrink: 0;
    min-height: 42px;
    padding: 9px 16px;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .chip-divider {
    display: none;
  }

  /* Preset Chips in Pantry Horizontal Scroll */
  .presets-section {
    margin-bottom: 14px;
  }

  .presets-label {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .preset-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overscroll-behavior-x: contain !important;
    gap: 8px;
  }

  .preset-chips::-webkit-scrollbar {
    display: none;
  }

  .preset-chips .chip {
    flex-shrink: 0;
    min-height: 42px;
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 700;
  }

  /* Single Column Recipe Grid on Mobile / Tablets */
  .recipe-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    gap: 16px;
  }

  .recipe-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 13px 15px !important;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .recipe-card-top {
    margin-bottom: 6px !important;
  }

  .recipe-card-title {
    font-size: 1.15rem !important;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px !important;
  }

  .match-status-bar {
    margin-bottom: 6px !important;
  }

  /* In collapsed state on mobile: hide bulky details */
  .recipe-card:not(.mobile-expanded) .match-progress-track {
    display: none !important;
  }

  .recipe-card:not(.mobile-expanded) .recipe-card-collapsible-wrap,
  .recipe-card:not(.mobile-expanded) .recipe-card-bottom {
    display: none !important;
  }

  .card-mobile-preview-strip {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: #cbd5e1;
    user-select: none;
  }

  .mobile-preview-macros {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-expand-cue {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  /* When expanded on mobile */
  .recipe-card.mobile-expanded {
    padding: 18px 16px !important;
    border-color: rgba(236, 72, 153, 0.5) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  }

  .recipe-card.mobile-expanded .match-progress-track {
    display: block !important;
  }

  .recipe-card.mobile-expanded .card-mobile-preview-strip {
    border-top: none;
    margin-bottom: 8px;
  }

  .recipe-card.mobile-expanded .card-expand-cue {
    color: #94a3b8;
  }

  .recipe-card.mobile-expanded .recipe-card-collapsible-wrap {
    display: block !important;
    animation: fadeIn 0.2s ease;
  }

  .recipe-card.mobile-expanded .recipe-card-bottom {
    display: flex !important;
    flex-direction: column !important;
    margin-top: 14px !important;
  }

  .book-tag {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 12px;
  }

  .match-badge {
    font-size: 0.88rem;
    font-weight: 700;
    padding: 4px 10px;
  }

  .match-percent {
    font-size: 0.88rem;
    font-weight: 700;
  }

  .macro-pills {
    gap: 8px;
    margin-bottom: 16px;
  }

  .macro-pill {
    padding: 8px 4px;
  }

  .macro-pill-val {
    font-size: 1.02rem;
    font-weight: 800;
  }

  .macro-pill-label {
    font-size: 0.74rem;
    font-weight: 700;
  }

  .card-made-row .made-pill {
    font-size: 0.8rem;
    padding: 4px 10px;
  }

  .card-ing-item {
    font-size: 0.92rem;
    padding: 2px 0;
  }

  .card-ing-status {
    font-size: 0.95rem;
  }

  .card-more-ings {
    font-size: 0.82rem;
  }

  .spin-tag {
    font-size: 0.84rem;
    font-weight: 600;
  }

  .btn-view-recipe {
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 46px;
    padding: 10px 18px;
  }

  /* Touch Targets & Generous Sizing for Pantry Checkboxes */
  .panel-title {
    font-size: 1.35rem;
    font-weight: 800;
  }

  .pantry-header-buttons button {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 700;
  }

  .search-box input#ingredientSearch {
    font-size: 1rem !important;
    min-height: 48px;
    padding: 12px 16px 12px 42px;
  }

  .category-header {
    min-height: 52px;
    padding: 14px 16px;
  }

  .category-header-title {
    font-size: 1.05rem;
    font-weight: 800;
  }

  .category-in-stock-badge {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 3px 9px;
  }

  .category-chevron {
    font-size: 0.85rem;
  }

  .ingredient-checkbox-item {
    padding: 13px 14px;
    min-height: 50px;
    font-size: 1.02rem;
    touch-action: manipulation;
    gap: 14px;
  }

  .custom-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 7px;
    border-width: 2px;
  }

  .custom-checkbox::after {
    font-size: 0.95rem;
    font-weight: 800;
  }

  .ingredient-name-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
  }

  .ingredient-recipe-count {
    font-size: 0.82rem;
    font-weight: 600;
  }

  .pantry-qty-stepper {
    padding: 3px 6px;
    gap: 4px;
    margin-left: 4px;
    margin-right: 4px;
  }

  .btn-pantry-qty-step {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 0.95rem;
  }

  .pantry-qty-val {
    font-size: 0.88rem;
    min-width: 28px;
  }

  /* Bottom Navigation Touch Sizing */
  .bottom-nav-item {
    min-height: 54px;
    padding: 6px 4px;
  }

  .bottom-nav-icon {
    font-size: 1.35rem;
  }

  .bottom-nav-label {
    font-size: 0.76rem;
    font-weight: 700;
  }

  .bottom-nav-badge {
    font-size: 0.72rem;
    min-width: 18px;
    height: 18px;
  }

  /* Prevent iOS Safari Viewport Auto-Zoom on Input Focus */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Bottom Sheet Modal Transform on Small Screens (<= 640px) */
@media (max-width: 640px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .modal-content {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 88vh;
    max-height: 88dvh;
    max-height: calc(100dvh - 24px);
    width: 100%;
    padding: 20px 18px max(28px, calc(18px + env(safe-area-inset-bottom, 0px)));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: none;
    border-right: none;
    border-bottom: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .roulette-modal-content {
    padding: 16px 18px max(34px, calc(20px + env(safe-area-inset-bottom, 0px))) !important;
    max-height: 88dvh;
    max-height: calc(100dvh - 20px);
  }

  .roulette-modal-content .roulette-title-badge {
    margin-bottom: 6px;
    font-size: 0.72rem;
    padding: 3px 12px;
  }

  .roulette-modal-content .roulette-headline {
    font-size: 1.25rem;
    margin-bottom: 4px;
  }

  .roulette-modal-content .roulette-subtext {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }

  .roulette-modal-content .roulette-slot-machine {
    padding: 12px 14px;
    margin: 8px 0 10px;
  }

  .roulette-modal-content .slot-item {
    font-size: 1.15rem;
    min-height: 34px;
  }

  .roulette-modal-content .roulette-winner-announcement {
    padding: 12px 14px;
    margin-top: 8px;
  }

  .roulette-modal-content .roulette-winner-badge {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }

  .roulette-modal-content .roulette-winner-title {
    font-size: 1.15rem;
    margin-bottom: 2px;
  }

  .roulette-modal-content .roulette-winner-meta {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .roulette-modal-content .roulette-winner-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
  }

  .roulette-modal-content .roulette-winner-actions button {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 48px;
    border-radius: var(--radius-md);
  }

  .toast-container {
    top: 16px;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    align-items: center;
  }

  .modal-overlay.active .modal-content {
    transform: translateY(0);
  }

  .modal-handle-bar {
    display: block;
  }

  .modal-close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border-radius: 999px;
    font-size: 1.5rem;
  }

  .modal-title {
    font-size: 1.35rem;
    padding-right: 32px; /* ensure no overlap with close button */
  }

  .modal-subtitle {
    font-size: 0.84rem;
  }

  .modal-options-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .segment-btn-group {
    width: 100%;
  }

  .segment-btn {
    flex: 1;
    min-height: 40px;
    text-align: center;
  }

  .modal-macro-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
    padding: 12px 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .modal-macro-item {
    min-width: 0;
    overflow: hidden;
  }

  .modal-macro-item .macro-val {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.05rem;
  }

  .btn-copy-macros {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }

  .modal-footer button,
  .modal-footer .btn-primary,
  .modal-footer .btn-secondary {
    width: 100%;
    min-height: 44px;
  }
}

/* Desktop Guarantee: Always show both panels side-by-side above 768px */
@media (min-width: 769px) {
  .mobile-section-switcher,
  .mobile-bottom-nav {
    display: none !important;
  }

  .pantry-panel,
  .recipes-panel {
    display: flex !important;
  }
}

/* ==========================================================================
   Pints in the Freezer & 16-Hour Timer (Roadmap Item 8)
   ========================================================================== */

/* Ready Badge Pulse Glow */
.badge-count.ready,
.bottom-nav-badge.ready {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: badgePulseReady 2.4s infinite ease-in-out;
}

@keyframes badgePulseReady {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

/* Freezer Modal Content */
.freezer-modal-content {
  max-width: 680px;
  padding: 28px 24px;
}

.freezer-modal-header {
  margin-bottom: 20px;
}

.freezer-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.freezer-icon-badge {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  font-size: 1.7rem;
  flex-shrink: 0;
}

/* Native Freeze Timer Push Notification Banner (Roadmap Item 17) */
.freezer-notif-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.freezer-notif-card.active {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.25) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.freezer-notif-card.blocked {
  border-color: rgba(245, 158, 11, 0.4);
}

.freezer-notif-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.freezer-notif-bell {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.freezer-notif-card.active .freezer-notif-bell {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.freezer-notif-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.freezer-notif-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.freezer-notif-title-row strong {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.freezer-notif-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.freezer-notif-badge.off {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-muted);
}

.freezer-notif-badge.active {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.freezer-notif-badge.blocked {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.freezer-notif-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.35;
}

.freezer-notif-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-notif-action {
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.3) 100%);
  color: #e0f2fe;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-notif-action:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0.45) 100%);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.btn-notif-action.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.btn-notif-action.active:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-notif-test {
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-notif-test:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: #a855f7;
  color: #ffffff;
  transform: translateY(-1px);
}

.freezer-notif-optin-group {
  margin-top: 10px;
  margin-bottom: 12px;
}

.freezer-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.freezer-checkbox-label input[type="checkbox"] {
  accent-color: #ec4899;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.freezer-tag.notif-tag {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
}

.freezer-tag.notif-tag.sent {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

@keyframes highlightPulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  50% { box-shadow: 0 0 25px 5px rgba(56, 189, 248, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.highlight-pulse {
  animation: highlightPulseGlow 1.8s ease-in-out 3;
  border-color: #38bdf8 !important;
}

@media (max-width: 600px) {
  .freezer-notif-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .freezer-notif-actions {
    justify-content: flex-end;
  }
}

/* Quick Add / Log Pint Section */
.freezer-add-section {
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 22px;
}

.freezer-toggle-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(129, 140, 248, 0.12));
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  color: #38bdf8;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.freezer-toggle-add-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.freezer-add-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-item);
  animation: fadeInDown 0.2s ease;
}

.freezer-time-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-time-preset {
  padding: 5px 11px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-time-preset:hover {
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.btn-time-preset.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.freezer-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Freezer List Header */
.freezer-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.freezer-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.freezer-timer-legend {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Freezer Pint Cards List */
.freezer-pints-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.freezer-pint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.freezer-pint-card.ready {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.18);
}

.freezer-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.freezer-pint-title-group {
  flex: 1;
}

.freezer-pint-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}

.freezer-meta-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.freezer-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-item);
  background: var(--bg-glass);
  color: var(--text-muted);
}

.freezer-tag.size-standard {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

.freezer-tag.size-deluxe {
  color: #ec4899;
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.08);
}

/* Status Badges */
.freezer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.freezer-status-badge.chilling {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.freezer-status-badge.ready {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  animation: readyPulse 2.2s infinite ease-in-out;
}

@keyframes readyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

/* 16-Hour Countdown Progress Bar */
.freezer-countdown-row {
  margin: 12px 0 10px;
}

.freezer-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 5px;
}

.freezer-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.freezer-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 100%);
  transition: width 0.4s ease;
}

.freezer-progress-fill.ready {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.freezer-notes-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-highlight);
}

/* Card Action Buttons */
.freezer-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-glass);
}

.freezer-card-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-spin-enjoyed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
}

.btn-spin-enjoyed:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(16, 185, 129, 0.55);
}

.btn-freezer-mark-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 999px;
  color: #34d399;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-freezer-mark-ready:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-freezer-recipe {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-freezer-recipe:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

.btn-freezer-discard {
  padding: 6px 10px;
  font-size: 0.82rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-freezer-discard:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

/* Empty Freezer State */
.freezer-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-lg);
}

.freezer-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.8;
}

.freezer-empty-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.freezer-empty-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

/* Recipe Detail Modal Freezer Controls */
.recipe-modal-freezer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(129, 140, 248, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.86rem;
  color: #38bdf8;
  gap: 10px;
}

.recipe-modal-freezer-banner.ready {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(52, 211, 153, 0.14));
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-freeze-pint-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-freeze-pint-action:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.btn-share-recipe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-share-recipe:hover {
  background: rgba(236, 72, 153, 0.24);
  border-color: #ec4899;
  transform: translateY(-1px);
}

.btn-share-recipe.copied,
.btn-modal-meta-share.copied {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
}

.btn-modal-meta-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-left: auto;
}

.btn-modal-meta-share:hover {
  background: rgba(236, 72, 153, 0.22);
  border-color: #ec4899;
  transform: translateY(-1px);
}

/* ==========================================================================
   1-Tap Smart Ingredient Substitutions ("What Can I Swap?") (Roadmap Item 16)
   ========================================================================== */

/* Ingredient Row Swap Trigger Badge */
.ing-swap-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 11px;
  border-radius: 999px;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
  min-height: 30px;
}

.ing-swap-badge:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  color: #e9d5ff;
  transform: translateY(-1px);
}

.ing-swap-badge.active-swap {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.ing-active-swap-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 3px;
  max-width: fit-content;
}

.btn-ing-revert-swap {
  background: transparent;
  border: none;
  color: #f472b6;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
  font-size: 0.72rem;
  transition: color 0.15s ease;
}

.btn-ing-revert-swap:hover {
  color: #fb7185;
}

/* Swap Inspector Modal Content */
.swap-modal-content {
  max-width: 660px;
  padding: 28px 24px;
}

.swap-modal-header {
  margin-bottom: 18px;
}

.swap-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.swap-icon-badge {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-md);
  font-size: 1.6rem;
  flex-shrink: 0;
}

/* Selected Ingredient Focus Card */
.swap-focus-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.swap-focus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.swap-focus-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.swap-focus-category {
  font-size: 0.76rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}

.swap-focus-role {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.swap-active-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #34d399;
}

.btn-reset-swap {
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-swap:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #ffffff;
}

/* Swaps List Header */
.swap-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.swap-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.swap-legend-pill {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Swaps Options List & Cards */
.swap-options-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.swap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.swap-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.swap-card.is-active-swap {
  border-color: rgba(168, 85, 247, 0.6);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, var(--bg-card) 100%);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.25);
}

.swap-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.swap-card-title-group {
  flex: 1;
}

.swap-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.swap-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.swap-ratio-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.swap-pantry-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

/* Swap Details Grid */
.swap-details-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.swap-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-main);
  background: var(--bg-glass);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-item);
}

.swap-detail-item strong {
  color: var(--text-main);
  white-space: nowrap;
}

.swap-pro-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding: 8px 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  border-left: 3px solid #f59e0b;
}

/* Swap Card Actions */
.swap-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-glass);
}

.btn-apply-swap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(168, 85, 247, 0.35);
}

.btn-apply-swap:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(168, 85, 247, 0.55);
}

.btn-apply-swap.applied {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   Build-A-Pint Balancing Wizard & Creaminess Score (Roadmap Item 18)
   ========================================================================== */
.bap-modal-container {
  max-width: 820px;
}

.bap-header {
  text-align: center;
  margin-bottom: 12px;
}

.bap-header-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 999px;
  color: #c084fc;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.bap-mode-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin: 10px auto 20px;
  max-width: 480px;
}

.bap-mode-btn {
  flex: 1;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.bap-mode-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(236, 72, 153, 0.35);
}

/* Creaminess & Macro HUD Card */
.bap-hud-card {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3), inset 0 0 16px rgba(236, 72, 153, 0.06);
}

.bap-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.bap-score-box {
  flex: 1;
  min-width: 250px;
}

.bap-score-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.bap-score-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.bap-score-grade {
  font-size: 0.82rem;
  font-weight: 800;
  color: #34d399;
}

.bap-score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.bap-score-num {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(52, 211, 153, 0.45);
}

.bap-score-max {
  font-size: 1.05rem;
  color: var(--text-dim);
  font-weight: 700;
}

.bap-meter-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.bap-meter-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899 0%, #f59e0b 50%, #10b981 100%);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.bap-specs-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.bap-spec-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.bap-spec-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.bap-spin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 999px;
  color: #38bdf8;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 800;
}

.bap-freeze-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-item);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.bap-science-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #34d399;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-main);
  transition: all 0.25s ease;
}

.bap-macro-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bap-macro-cell {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
}

.bap-macro-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.bap-macro-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Config Bar (Title & Size) */
.bap-config-bar {
  display: grid;
  grid-template-columns: 1fr minmax(280px, auto);
  gap: 14px 18px;
  align-items: start;
  margin-bottom: 20px;
}

.bap-title-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bap-title-field label,
.bap-size-field label,
.bap-category-select-col label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.bap-input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bap-text-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.bap-text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.bap-autoname-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 9px 14px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bap-category-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-sizing: border-box;
}

.bap-category-select-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bap-select-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.bap-select-input:focus, #crCategory:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.bap-select-input:disabled, #crCategory:disabled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  opacity: 0.85;
}

.bap-category-hint-col {
  display: flex;
  align-items: center;
  min-width: 0;
}

.bap-category-hint {
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  display: block;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
}

.bap-category-hint.admin-hint {
  color: #fbbf24;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.bap-category-hint.creator-hint {
  color: #34d399;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.bap-category-hint.standard-hint {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
}

#crCategoryHint {
  font-size: 0.74rem;
  line-height: 1.35;
  margin-top: 4px;
  display: block;
}

#crCategoryHint.admin-hint {
  color: #f59e0b;
  font-weight: 600;
}

#crCategoryHint.creator-hint {
  color: #10b981;
  font-weight: 600;
}

#crCategoryHint.standard-hint {
  color: var(--text-dim);
}

.bap-size-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 280px;
}

.bap-size-toggle-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
  min-height: 42px;
  box-sizing: border-box;
}

.bap-size-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bap-size-btn.active {
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  font-weight: 800;
}

/* Step Navigation Pills */
.bap-step-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bap-step-pills::-webkit-scrollbar {
  display: none;
}

.bap-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-item);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.bap-step-pill.active {
  background: rgba(236, 72, 153, 0.18);
  border-color: rgba(236, 72, 153, 0.5);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.25);
}

.bap-pill-num {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.bap-step-pill.active .bap-pill-num {
  background: var(--primary);
  color: #ffffff;
}

/* Step Content Sections */
.bap-step-content {
  animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bap-section-header {
  margin-bottom: 14px;
}

.bap-section-header h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.bap-section-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.bap-subhead {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

/* Ingredient Cards Grid */
.bap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  user-select: none;
}

.bap-card:hover {
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.bap-card.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
}

.bap-card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border-item);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: transparent;
  transition: all 0.15s;
}

.bap-card.active .bap-card-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bap-card-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.bap-card-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
  padding-right: 20px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.bap-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.bap-card-macros {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
  width: fit-content;
}

.bap-card-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  margin-top: 6px;
}

.bap-stepper-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.bap-stepper-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.bap-stepper-val {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Custom Ingredient Creator in Wizard */
.bap-custom-ing-section {
  margin-top: 14px;
  margin-bottom: 20px;
}

.bap-btn-add-custom {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border-item);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.bap-btn-add-custom:hover {
  background: rgba(236, 72, 153, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

.bap-custom-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
  animation: bapFadeIn 0.25s ease-out;
}

@keyframes bapFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.bap-custom-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.bap-custom-form-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bap-custom-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.bap-custom-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.bap-custom-qty-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input, rgba(0, 0, 0, 0.3));
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  padding-right: 10px;
}

.bap-custom-qty-wrapper input {
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 0.9rem;
  width: 100%;
  outline: none;
}

.bap-custom-unit-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* Category Notice Box */
.bap-category-notice-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 12px 0 14px;
}

.bap-category-notice-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.bap-category-notice-label {
  color: var(--text-muted);
}

.bap-category-notice-val {
  font-weight: 800;
  color: #60a5fa;
}

.bap-category-notice-msg {
  font-size: 0.78rem;
  color: var(--text-secondary, #cbd5e1);
  margin: 0;
  line-height: 1.4;
}

.bap-custom-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.bap-card-remove-custom {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.15s;
  z-index: 2;
}

.bap-card-remove-custom:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

.bap-custom-tag {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  margin-left: 6px;
  text-transform: uppercase;
}

/* Personal Recipe Card Delete Button */
.card-delete-recipe-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  margin-right: 4px;
}

.card-delete-recipe-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(1.1);
  color: #ffffff;
}

.card-delete-recipe-btn.confirming {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* Wizard Footer Actions */
.bap-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-glass);
  margin-top: 20px;
}

.bap-save-btn {
  margin-left: auto;
  font-size: 0.95rem;
  padding: 12px 24px;
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.4);
}

/* Badge for recipes in browse cards with Creaminess Score */
.recipe-creaminess-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .bap-hud-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .bap-specs-box {
    align-items: stretch;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .bap-config-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bap-size-field {
    min-width: 0;
    width: 100%;
  }

  .bap-category-field {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

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

  .bap-wizard-footer {
    flex-wrap: wrap;
  }

  .bap-save-btn {
    width: 100%;
    margin-left: 0;
    order: -1;
  }
}

/* ==========================================================================
   User Management, Tiered Access & Admin Portal (Roadmap Item 15)
   ========================================================================== */

/* Admin Header Button */
.btn-admin-header.hidden,
.btn-admin-header[style*="display: none"],
#openAdminPortalBtn.hidden,
#openAdminPortalBtn[style*="display: none"] {
  display: none !important;
}

.btn-admin-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.25) 100%) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.btn-admin-header:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.45) 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35) !important;
}

.admin-text-desktop {
  display: inline;
}

.admin-text-mobile {
  display: none;
}

/* Accessible Only Filter Checkbox */
.access-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.access-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.access-filter-label:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--text-main);
}

.access-filter-label input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Locked Card Badges & Teaser */
.recipe-card.locked {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, var(--bg-card) 100%);
}

.locked-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  letter-spacing: 0.02em;
}

/* Locked Recipe Teaser Card in Modal */
.locked-recipe-teaser {
  margin: 20px 0;
  padding: 28px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.locked-teaser-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  animation: pulseLock 2.4s infinite ease-in-out;
}

@keyframes pulseLock {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.locked-teaser-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 8px;
}

.locked-teaser-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 18px;
  line-height: 1.5;
}

.locked-user-status {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 6px 14px;
  background: var(--bg-item);
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}

.locked-teaser-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Admin Portal Modal */
.admin-modal-content {
  max-width: min(980px, 94vw);
  width: 100%;
  padding: 28px 24px;
  box-sizing: border-box;
  overflow-x: hidden !important;
}

.admin-modal-content * {
  box-sizing: border-box;
}

.admin-modal-header {
  margin-bottom: 20px;
  width: 100%;
}

.admin-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
}

.admin-icon-badge {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  font-size: 1.8rem;
  flex-shrink: 0;
}

/* Admin Quick Stats */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 115px), 1fr));
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.admin-stat-card {
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.admin-stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fbbf24;
}

.admin-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Admin Toolbar */
.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.admin-search-wrap {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-search-input {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.admin-search-input:focus {
  border-color: #fbbf24;
}

.admin-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Admin User Directory List */
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
}

.admin-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.admin-user-card:hover {
  border-color: var(--border-highlight);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.admin-user-card.expanded {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  padding: 16px 18px;
}

.admin-user-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.admin-card-expand-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  padding: 5px 10px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.admin-user-summary-bar:hover .admin-card-expand-toggle {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.admin-user-card.expanded .admin-card-expand-toggle {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.admin-user-details-drawer {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.admin-user-card.expanded .admin-user-details-drawer {
  display: flex;
  animation: fadeIn 0.18s ease;
}

.admin-user-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.admin-user-info-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 220px;
  overflow: hidden;
}

.admin-user-summary-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.admin-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}

.admin-user-avatar-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
  border: 2px solid rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}

.admin-user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-user-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.admin-user-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-shelf-pill {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.admin-user-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-email-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  display: inline-block;
  vertical-align: middle;
}

.admin-joined-text {
  color: #64748b;
  font-size: 0.74rem;
  white-space: nowrap;
}

.admin-card-expand-toggle .label-short {
  display: none;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: flex-end;
  max-width: 100%;
}

.admin-role-select,
.admin-creator-select,
.admin-freezer-select {
  max-width: 100%;
  flex-shrink: 0;
}

.admin-user-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.admin-user-badge.admin {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.admin-user-badge.user {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-muted);
}

/* User Metadata Strip */
.admin-user-stats-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--text-dim);
  padding: 6px 10px;
  background: var(--bg-item);
  border-radius: var(--radius-sm);
  width: 100%;
  box-sizing: border-box;
}

/* Subscriptions & Category Access Section */
.admin-subs-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-item);
  padding-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.admin-subs-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.admin-subs-chips-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-sub-chip {
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-item);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-sub-chip:hover {
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.btn-sub-chip.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.btn-sub-chip.active.all-access {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(236, 72, 153, 0.25));
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
  font-weight: 800;
}

/* Admin Action Controls */
.admin-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-role-toggle {
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-role-toggle:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
}

.btn-admin-del-user {
  padding: 5px 8px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-del-user:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

.btn-admin-reset-pw {
  padding: 5px 8px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-reset-pw:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
}

/* Admin Directory Pagination */
.admin-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  margin-top: 16px;
}

.admin-pagination-info {
  font-size: 0.84rem;
  color: var(--text-muted, #94a3b8);
}

.admin-pagination-info strong {
  color: #f8fafc;
}

.admin-pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-pagination-nav {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-pagination-nav:hover:not(:disabled) {
  background: var(--primary, #059669);
  border-color: var(--primary, #059669);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-pagination-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.admin-page-indicator {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* ==========================================================================
   Admin Portal Responsive & Mobile Touch Scrolling Optimization
   ========================================================================== */
@media (max-width: 640px) {
  .admin-modal-content {
    max-height: 90dvh !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 16px 14px max(36px, calc(24px + env(safe-area-inset-bottom, 0px))) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain;
  }

  .admin-title-row {
    gap: 10px;
  }

  .admin-icon-badge {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }

  .admin-stats-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .admin-stat-card {
    padding: 10px 4px !important;
  }

  .admin-stat-num {
    font-size: 1.25rem !important;
  }

  .admin-stat-label {
    font-size: 0.62rem !important;
    letter-spacing: 0.02em;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 14px;
  }

  .admin-search-wrap {
    min-width: 100%;
    width: 100%;
  }

  .admin-search-input {
    font-size: 16px !important; /* Prevents iOS Safari auto-zoom */
    padding: 10px 12px;
  }

  .admin-filter-pills {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .admin-filter-pills .btn-time-preset {
    flex: 1;
    text-align: center;
    padding: 7px 4px;
    font-size: 0.74rem;
  }

  .admin-toolbar-actions {
    display: grid !important;
    grid-template-columns: 1fr 1.15fr 0.85fr;
    gap: 6px;
    width: 100%;
  }

  .admin-toolbar-actions .btn-secondary,
  .admin-toolbar-actions .btn-primary,
  .admin-toolbar-actions #adminRefreshUsersBtn {
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 4px !important;
    font-size: 0.76rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .admin-users-list {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
    padding-bottom: 24px;
    gap: 12px;
  }

  .admin-user-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .admin-user-card.expanded {
    padding: 14px 12px;
    gap: 12px;
  }

  .admin-user-summary-bar {
    align-items: flex-start;
    gap: 8px;
  }

  .admin-user-info-cluster {
    align-items: flex-start;
    gap: 10px;
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .admin-user-avatar,
  .admin-user-avatar-initials {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .admin-user-name {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
    word-break: normal;
  }

  .admin-user-badges-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 1px;
  }

  .admin-user-badge,
  .admin-shelf-pill {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
    border-radius: 4px;
    white-space: nowrap;
  }

  .admin-user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
    margin-top: 2px;
    word-break: normal;
  }

  .admin-email-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 130px;
    display: inline-block;
  }

  .admin-joined-text {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-card-expand-toggle {
    padding: 5px 8px;
    font-size: 0.72rem;
    align-self: flex-start;
    margin-top: 2px;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 4px;
  }

  .admin-card-expand-toggle .label-full {
    display: none;
  }

  .admin-card-expand-toggle .label-short {
    display: inline;
  }

  .admin-user-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-user-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .admin-user-actions select,
  .admin-user-actions button {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
    box-sizing: border-box;
  }

  .admin-user-actions .btn-role-toggle {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.76rem;
    min-height: 38px;
  }

  .admin-user-actions .btn-admin-del-user,
  .admin-user-actions .btn-admin-reset-pw {
    padding: 8px 12px;
    min-height: 38px;
  }

  .admin-user-stats-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 10px;
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .admin-subs-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .admin-subs-chips-wrap {
    width: 100%;
    gap: 6px;
  }

  .btn-sub-chip {
    font-size: 0.72rem;
    padding: 6px 10px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }
}

/* --- Header Sound Toggle & PWA Install Button (Roadmap Items 19 & 20) --- */
.btn-sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.btn-sound-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

.btn-sound-toggle:active {
  transform: scale(0.94);
}

.btn-install-pwa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  max-height: 38px;
  padding: 0 14px;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
}

.btn-install-pwa:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.55);
}

.btn-install-text-desktop {
  display: inline;
}

.btn-install-text-mobile {
  display: none;
}

/* --- App Footer (Roadmap Item 19) --- */
.app-footer {
  margin-top: 48px;
  padding: 28px 20px 40px;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
}

.footer-version-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.footer-link,
.footer-action-btn {
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease;
}

.footer-link:hover,
.footer-action-btn:hover {
  color: var(--primary);
}

.footer-dot {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 760px;
  line-height: 1.5;
}

/* --- Kitchen Data Backup Modal (Roadmap Item 20) --- */
.backup-modal-content {
  max-width: 580px;
}

.backup-card-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0;
}

.backup-card {
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backup-card.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.04);
}

.backup-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.backup-options-row {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-main);
  align-items: center;
}

.backup-file-input {
  display: none;
}

/* --- iOS Safari Install Guide Modal --- */
.ios-install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
}

.ios-step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.ios-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.ios-step-text {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.45;
}

/* --- Universal Install Guide Modal Tabs --- */
.install-platform-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-item);
  padding: 5px;
  border-radius: var(--radius-sm);
  margin: 16px 0 20px;
  border: 1px solid var(--border-glass);
}

.install-tab-btn {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.install-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.install-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
}

.install-steps-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 20px;
}

/* --- Cookie & Analytics Consent Banner (Google Consent Mode v2 Ready) --- */
.cookie-consent-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 880px;
  z-index: 900;
  background: var(--bg-modal);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 18px 22px;
  animation: slideUpCookie 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCookie {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.cookie-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-banner-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.cookie-banner-desc a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.86rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cookie-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.5);
}

.btn-cookie-essential {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg-item);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.86rem;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cookie-essential:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}

.btn-cookie-custom {
  padding: 9px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.84rem;
  border: none;
  cursor: pointer;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.btn-cookie-custom:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* --- Cookie Preferences Modal --- */
.cookie-modal-content {
  max-width: 580px;
}

.cookie-pref-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0;
}

.cookie-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-item);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.cookie-pref-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cookie-pref-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-pref-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.cookie-badge-always {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  border-radius: 999px;
  text-transform: uppercase;
}

.cookie-pref-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Custom iOS-style Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-glass);
  transition: 0.25s ease;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.cookie-switch input:checked + .cookie-slider {
  background: var(--primary);
  border-color: var(--primary);
}

.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(20px);
}

.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Mobile Responsive Adjustment */
@media (max-width: 768px) {
  .cookie-consent-banner {
    bottom: 74px; /* Above mobile sticky nav */
    padding: 16px;
    width: calc(100% - 20px);
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cookie-banner-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-cookie-accept,
  .btn-cookie-essential,
  .btn-cookie-custom {
    width: 100%;
    text-align: center;
    padding: 10px;
  }
}

/* ========================================================
   AVAILABLE FOR PURCHASE & RECIPE PACKS SHOWCASE
   ======================================================== */

/* Results Header Badge Button */
.btn-available-packs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.38);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-available-packs:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
  color: #fef08a;
}

.btn-packs-icon {
  font-size: 0.95rem;
}

/* Category Tab Lock Indicators */
.tab-lock-indicator {
  font-size: 0.72rem;
  margin-left: 5px;
  opacity: 0.8;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  transition: opacity 0.2s ease;
}

.tab-btn:hover .tab-lock-indicator {
  opacity: 1;
}

/* Category Pack Promo Hero Card */
.category-pack-promo {
  margin-bottom: 24px;
}

.pack-promo-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(245, 158, 11, 0.1);
}

.pack-promo-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 70%);
  pointer-events: none;
}

.pack-promo-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.pack-promo-icon {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  flex-shrink: 0;
}

.pack-promo-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.pack-promo-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.pack-promo-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 18px;
  max-width: 720px;
}

.pack-promo-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-pack-unlock {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #1e1e1e !important;
  font-weight: 800 !important;
  border: none !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease !important;
}

.btn-pack-unlock:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* General Available for Purchase Banner */
.purchase-available-banner {
  margin-top: 32px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35), 0 0 25px rgba(245, 158, 11, 0.08);
}

.purchase-banner-glow {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.purchase-banner-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 28px;
  z-index: 1;
}

.purchase-banner-icon {
  font-size: 2.4rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.purchase-banner-text {
  flex: 1;
}

.purchase-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.purchase-banner-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.purchase-banner-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.btn-purchase-cta {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1e1e1e;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn-purchase-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
  color: #000;
}

/* Recipe Packs Store Modal */
.recipe-packs-modal-content {
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px;
}

.recipe-packs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.recipe-pack-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.recipe-pack-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.recipe-pack-card.vip-bundle {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.pack-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.pack-card-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  flex-shrink: 0;
}

.pack-card-title-col {
  flex: 1;
}

.pack-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pack-card-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.pack-card-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.pack-card-badge.fan-fav { background: rgba(236, 72, 153, 0.18); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.pack-card-badge.keto { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.pack-card-badge.lactose { background: rgba(6, 182, 212, 0.18); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.35); }
.pack-card-badge.nopro { background: rgba(139, 92, 246, 0.18); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }
.pack-card-badge.vip { background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; border: none; font-weight: 900; }

.pack-card-tagline {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

.pack-card-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pack-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-item);
  padding-top: 12px;
}

.pack-status-available {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
}

.pack-status-active {
  font-size: 0.82rem;
  font-weight: 700;
  color: #34d399;
}

.btn-action-pack.vip-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.packs-modal-footer {
  text-align: center;
  border-top: 1px solid var(--border-item);
  padding-top: 16px;
  margin-top: 8px;
}

.packs-footer-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

@media (max-width: 640px) {
  .purchase-banner-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .btn-purchase-cta {
    width: 100%;
    text-align: center;
  }
  .pack-promo-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .pack-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-action-pack {
    width: 100%;
  }
  .creator-catalog-banner {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }
  .creator-banner-left {
    width: 100%;
  }
  .btn-creator-store-visit {
    width: 100% !important;
    min-height: 44px;
    display: flex !important;
    justify-content: center !important;
    box-sizing: border-box;
  }
  .creator-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .btn-browse-creator-books,
  .btn-creator-website-link {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }
}

/* ==========================================================================
   CREATOR ATTRIBUTION & E-BOOK STORE CARDS
   ========================================================================== */

.creator-attribution-card {
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(30, 41, 59, 0.6) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.creator-attribution-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.creator-attribution-icon {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  flex-shrink: 0;
}

.creator-attribution-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.creator-attribution-title {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.35;
}

.creator-attribution-title strong {
  color: #fbbf24;
}

.creator-book-page {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}

.creator-attribution-byline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.creator-attribution-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-creator-buy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.84rem;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-creator-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
  filter: brightness(1.05);
}

.btn-creator-bundle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24 !important;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 999px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-creator-bundle:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.6);
}

.creator-book-owned-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399 !important;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
  white-space: nowrap;
}

.creator-book-locked-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24 !important;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
  white-space: nowrap;
}

/* Creator pill on recipe cards */
.creator-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Clickable Social Links on Cards & Modals */
.creator-social-pills-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.creator-social-pills-wrap.compact {
  gap: 3px;
}

.social-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.social-pill-link.compact {
  padding: 2px 6px;
  font-size: 0.68rem;
}

.social-pill-link .social-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.social-pill-link.ig {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.18), rgba(253, 29, 29, 0.15));
  border: 1px solid rgba(225, 48, 108, 0.45);
  color: #f472b6;
}
.social-pill-link.ig:hover {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.35), rgba(253, 29, 29, 0.3));
  border-color: #f472b6;
  transform: translateY(-1px);
  color: #fff;
}

.social-pill-link.tt {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
.social-pill-link.tt:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  transform: translateY(-1px);
  color: #fff;
}

.social-pill-link.yt {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
}
.social-pill-link.yt:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #f87171;
  transform: translateY(-1px);
  color: #fff;
}

.social-pill-link.web {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
.social-pill-link.web:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #fbbf24;
  transform: translateY(-1px);
  color: #fff;
}

.card-creator-socials-bar {
  margin: 10px 0 6px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.card-creator-socials-label {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}
.card-creator-socials-label strong {
  color: #fbbf24;
}

.creator-attribution-socials {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.story-creator-socials-box {
  margin: 14px 0 16px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.story-creator-socials-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
}

.story-creator-socials-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Locked card store links */
.locked-creator-store-box {
  margin: 18px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.btn-creator-store-direct {
  width: 100%;
  max-width: 480px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff !important;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.btn-creator-store-direct:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-creator-bundle-direct {
  width: 100%;
  max-width: 480px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24 !important;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.btn-creator-bundle-direct:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.6);
}

.btn-pack-own-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-pack-own-link:hover {
  color: #fbbf24;
}

/* ==========================================================================
   MULTI-CREATOR DIRECTORY & CATALOG DRILL-DOWN STYLES
   ========================================================================== */

.creators-view-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.creators-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.creator-directory-card {
  background: var(--bg-surface-glass);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.creator-directory-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.creator-card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.creator-badge-featured {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.creator-book-count-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 999px;
}

.creator-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creator-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.4) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.creator-avatar-icon {
  font-size: 1.6rem;
}

.creator-card-info {
  display: flex;
  flex-direction: column;
}

.creator-name {
  font-size: 1.15rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.creator-brand {
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 600;
}

.creator-handle {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.78rem;
}

.creator-bio {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.creator-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.creator-stat-pill {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-item);
  color: var(--text-dim);
}

.creator-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.btn-browse-creator-books {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff !important;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 6;
  box-sizing: border-box;
}

.btn-browse-creator-books:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-browse-creator-books:active {
  transform: translateY(0);
}

.btn-browse-creator-books * {
  pointer-events: none;
}

.btn-creator-website-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 25;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24 !important;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-creator-website-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  position: relative;
  z-index: 2;
}

/* Expanded rectangular hit target covering the top-right corner and adjacent bounds */
.btn-creator-website-link::before {
  content: '';
  position: absolute;
  top: -14px;
  right: -14px;
  bottom: -10px;
  left: -10px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.001);
  pointer-events: auto !important;
  z-index: 1;
}

.btn-creator-website-link:hover,
.btn-creator-website-link:focus-visible,
.btn-creator-website-link:active {
  background: rgba(245, 158, 11, 0.3) !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.55) !important;
  transform: translateY(-1px);
}

.btn-creator-website-link:active {
  transform: translateY(0);
}

.btn-creator-website-link * {
  pointer-events: none !important;
}

/* Creator Partnership Callout Card */
.creator-partner-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  justify-content: center;
}

.creator-partner-icon {
  font-size: 2rem;
}

.creator-partner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.creator-partner-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
  max-width: 380px;
}

.btn-creator-partner-action {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-main) !important;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-creator-partner-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-creator-partner-action:active {
  transform: translateY(0);
}

.btn-creator-partner-action * {
  pointer-events: none;
}

/* Catalog View Top Bar */
.creator-catalog-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-item);
}

.btn-back-to-creators {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-item);
  color: var(--text-main);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-to-creators:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.creator-catalog-breadcrumbs {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.creator-catalog-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
}

.creator-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creator-banner-avatar {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.creator-banner-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.creator-banner-subtitle {
  font-size: 0.82rem;
  color: #fbbf24;
  margin: 2px 0 0;
}

.btn-creator-store-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 6;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.86rem;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.btn-creator-store-visit::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

.btn-creator-store-visit span {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.btn-creator-store-visit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-creator-store-visit:active {
  transform: translateY(0);
}

.btn-creator-store-visit * {
  pointer-events: none !important;
}

/* ==========================================================================
   Creator Perks & Ingredient Discounts Styling
   ========================================================================== */
.creator-perks-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(245, 158, 11, 0.35);
}

.creator-perks-header {
  margin-bottom: 14px;
}

.creator-perks-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.creator-perks-icon {
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px;
  border-radius: 10px;
}

.creator-perks-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.creator-perks-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 3px 0 0;
  line-height: 1.35;
}

.creator-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.creator-perk-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(30, 41, 59, 0.55) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.creator-perk-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
}

.perk-card-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.perk-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.perk-category-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.perk-discount-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.perk-brand-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2px 0 0;
}

.perk-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.perk-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.perk-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.perk-code-box:hover {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.7);
}

.perk-code-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  pointer-events: none;
}

.perk-code-val {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1px;
  pointer-events: none;
}

.btn-copy-perk-code {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  pointer-events: none;
}

.btn-copy-perk-code:hover {
  background: rgba(245, 158, 11, 0.35);
}

.btn-copy-perk-code.copied {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
}

.btn-perk-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-sm);
  color: var(--text-main) !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-perk-shop:hover {
  background: var(--bg-hover);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24 !important;
  transform: translateY(-1px);
}

.btn-perk-shop:active {
  transform: translateY(0);
}

.btn-perk-shop * {
  pointer-events: none;
}

/* Recipe Detail Modal: Author Perks Callout */
.recipe-creator-perks-callout {
  margin: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(30, 41, 59, 0.5) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.perks-callout-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.perks-callout-body {
  flex: 1;
  min-width: 220px;
  color: var(--text-muted);
  line-height: 1.35;
}

.perks-callout-body code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.85em;
}

.btn-view-creator-perks {
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-view-creator-perks:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
}

/* ==========================================================================
   ADMIN PORTAL UPGRADED ROLES & CLAIMS STYLES
   ========================================================================== */

.admin-tab-bar {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
  border-bottom: 1px solid var(--border-item);
  padding-bottom: 8px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.admin-tab-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 700;
}

.admin-tab-count {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.admin-stat-card.alert {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.admin-stat-card.alert .admin-stat-num {
  color: #fbbf24;
}

/* Role Selector in User Card */
.admin-role-select {
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-item);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.admin-role-select:hover,
.admin-role-select:focus {
  border-color: #34d399;
  outline: none;
}

.admin-role-select option {
  background: #1e293b;
  color: #fff;
}

/* Quick Access Presets */
.admin-presets-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-preset-all-access,
.btn-preset-grant-creator,
.btn-preset-grant-eli,
.btn-preset-grant-test,
.btn-preset-grant-all {
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-all-access:hover {
  background: rgba(245, 158, 11, 0.25);
}

.btn-preset-reset-free {
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-item);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-reset-free:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Access Claims & Orders Cards */
.admin-claims-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.claim-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color 0.2s ease;
}

.claim-card.pending {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(30, 41, 59, 0.4) 100%);
}

.claim-card.approved {
  border-color: rgba(16, 185, 129, 0.35);
  opacity: 0.85;
}

.claim-card.dismissed {
  border-color: rgba(255, 255, 255, 0.1);
  opacity: 0.6;
}

.claim-info-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 240px;
}

.claim-email {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.claim-details-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.claim-pack-badge {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.claim-badge-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.claim-badge-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.claim-badge-status.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.claim-badge-status.dismissed {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.claim-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-claim-approve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-claim-approve:hover {
  filter: brightness(1.08);
}

.btn-claim-dismiss {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-item);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-claim-dismiss:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Admin Toolbar Actions */
.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-admin-create-user {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  border: none;
}

/* Admin Create User Modal */
.admin-create-user-dialog {
  max-width: 580px;
  width: 95%;
  background: var(--bg-card);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xl);
}

.admin-create-user-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .admin-form-row {
    grid-template-columns: 1fr;
  }
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.admin-form-input,
.admin-form-select {
  padding: 10px 12px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-item);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-form-input:focus,
.admin-form-select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

.admin-form-select option {
  background: #1e293b;
  color: #fff;
}

/* ==========================================================================
   SUPER ADMIN ROLE MIMIC & VIEW-AS MODE (ahumpo7@gmail.com)
   ========================================================================== */

/* Top Active Impersonation Alert Banner */
.mimic-active-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: linear-gradient(90deg, #92400e 0%, #b45309 30%, #d97706 70%, #92400e 100%);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(254, 240, 138, 0.35);
  animation: mimicBannerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mimicBannerSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mimic-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mimic-banner-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mimic-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
  animation: mimicPulse 1.8s infinite;
}

@keyframes mimicPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mimic-current-pill {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(254, 240, 138, 0.4);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 800;
  color: #fef08a;
}

.mimic-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-mimic-action {
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.btn-mimic-action:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.btn-mimic-action.revert {
  background: #fff;
  color: #92400e;
  border-color: #fff;
  font-weight: 800;
}

.btn-mimic-action.revert:hover {
  background: #fef3c7;
  color: #78350f;
}

/* Floating Mimic Trigger Pill */
.mimic-trigger-pill {
  position: fixed;
  bottom: 22px;
  left: 20px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mimic-trigger-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #f59e0b;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.mimic-trigger-pill.mimic-active {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.95) 0%, rgba(120, 53, 15, 0.95) 100%);
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  animation: mimicPulseBorder 2.5s infinite;
}

@keyframes mimicPulseBorder {
  0%, 100% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(245, 158, 11, 0.65), 0 0 14px rgba(251, 191, 36, 0.6); }
}

@media (max-width: 768px) {
  .mimic-trigger-pill {
    bottom: 74px; /* Positioned just above the mobile bottom nav bar */
    left: 14px;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* Mimic Role Selection Modal */
.mimic-modal-content {
  max-width: 540px !important;
  padding: 24px !important;
}

.mimic-modal-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mimic-roles-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.mimic-role-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-md, 12px);
  background: var(--bg-surface, #1e293b);
  border: 1px solid var(--border-item, rgba(255, 255, 255, 0.08));
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mimic-role-card:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
}

.mimic-role-card.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 0 0 1px #f59e0b;
}

.mimic-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mimic-role-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.mimic-role-info {
  flex: 1;
}

.mimic-role-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin-bottom: 2px;
}

.mimic-role-desc {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-secondary, #94a3b8);
}

.mimic-check-indicator {
  display: none;
  color: #f59e0b;
  font-weight: 900;
  font-size: 1.1rem;
}

.mimic-role-card.active .mimic-check-indicator {
  display: inline;
}

.mimic-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-item, rgba(255, 255, 255, 0.08));
  padding-top: 14px;
}

/* Admin Portal Mimic Card */
.admin-portal-mimic-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.admin-mimic-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-mimic-icon {
  font-size: 1.4rem;
}

.admin-mimic-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fbbf24;
}

.admin-mimic-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary, #94a3b8);
}

.admin-mimic-buttons-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-mimic-buttons-row .btn-mimic-select {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-item, rgba(255, 255, 255, 0.1));
  background: var(--bg-surface, #1e293b);
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-mimic-buttons-row .btn-mimic-select:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

.admin-mimic-buttons-row .btn-mimic-select.active {
  background: #f59e0b !important;
  color: #1e1e24 !important;
  border-color: #f59e0b !important;
  font-weight: 800 !important;
}

/* ==========================================================================
   CLAIM E-BOOK ACCESS & VERIFICATION SYSTEM (Roadmap Item 15)
   ========================================================================== */

.claim-modal-content {
  max-width: 520px !important;
  padding: 24px !important;
}

.claim-modal-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.claim-pack-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(30, 41, 59, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.claim-pack-icon {
  font-size: 1.6rem;
}

.claim-pack-info {
  display: flex;
  flex-direction: column;
}

.claim-pack-label {
  font-size: 0.76rem;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.claim-pack-name {
  font-size: 1rem;
  color: #fbbf24;
  font-weight: 800;
}

.claim-field-hint {
  font-size: 0.74rem;
  font-weight: normal;
  color: var(--text-secondary, #94a3b8);
  margin-left: 4px;
}

.claim-access-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.claim-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-item, rgba(255, 255, 255, 0.08));
}

/* Pending Indicator Card inside Locked Recipe Teaser */
.claim-pending-indicator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin-top: 14px;
  text-align: left;
}

.claim-pending-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: pendingSpin 3s infinite ease-in-out;
}

@keyframes pendingSpin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(15deg); }
}

.claim-pending-text-wrap {
  flex: 1;
}

.claim-pending-text-wrap strong {
  display: block;
  font-size: 0.88rem;
  color: #fbbf24;
  margin-bottom: 2px;
}

.claim-pending-text-wrap p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.35;
}

/* Badge in Packs Modal */
.badge-claim-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Admin Portal Claim Card Verification Details */
.claim-verification-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 0.82rem;
  border-left: 3px solid #f59e0b;
}

.claim-verification-details code {
  background: rgba(245, 158, 11, 0.2);
  color: #fef08a;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* Curated SEO Landing Banner */
.seo-category-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-md, 12px);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.seo-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.seo-banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.seo-banner-text strong {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.seo-banner-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.4;
}

.seo-clear-btn {
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

/* User Feedback Modal — High Opacity, High Contrast, Solid UI */
#feedbackModalOverlay {
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feedback-modal-content,
.feedback-modal-dialog {
  background: #131728 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  max-width: 540px;
  width: 92%;
  padding: 30px 26px;
  box-sizing: border-box;
  color: #f8fafc;
  opacity: 1 !important;
  transform: translateY(0);
}

.feedback-modal-content .modal-title {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
  letter-spacing: -0.01em;
}

.feedback-modal-content .modal-subtitle {
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
  margin: 6px 0 0 !important;
  line-height: 1.45 !important;
}

.feedback-form .admin-form-label {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  display: block;
  margin-bottom: 6px;
}

.feedback-category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.feedback-category-pills .btn-time-preset {
  background: #1e2538 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.feedback-category-pills .btn-time-preset:hover {
  background: #2a344d !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.feedback-category-pills .btn-time-preset.active {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35) !important;
  font-weight: 700 !important;
}

.feedback-stars-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.feedback-star-btn {
  background: none;
  border: none;
  font-size: 1.85rem;
  color: #334155;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 2px 4px;
  line-height: 1;
}

.feedback-star-btn:hover {
  transform: scale(1.22);
}

.feedback-star-btn.active {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}

.feedback-form .admin-form-input {
  background: #181d30 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  padding: 12px 14px !important;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  font-family: inherit;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feedback-form .admin-form-input::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

.feedback-form .admin-form-input:focus {
  border-color: #ec4899 !important;
  background: #1d233a !important;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  outline: none !important;
}

.feedback-modal-content .modal-close {
  color: #94a3b8;
  font-size: 1.7rem;
  transition: color 0.15s ease, transform 0.15s ease;
  top: 16px;
  right: 18px;
}

.feedback-modal-content .modal-close:hover {
  color: #ffffff;
  transform: scale(1.12);
}

#feedbackModalOverlay .btn-secondary {
  background: #1e2538;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.18s ease;
}

#feedbackModalOverlay .btn-secondary:hover {
  background: #2a344d;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

#feedbackModalOverlay .btn-primary {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  transition: all 0.18s ease;
}

#feedbackModalOverlay .btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
}

/* Admin Portal Feedback Cards */
.admin-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-feedback-card {
  background: var(--bg-item, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.admin-feedback-card:hover {
  border-color: rgba(236, 72, 153, 0.4);
}

.admin-feedback-card.status-reviewed {
  opacity: 0.8;
  border-left: 3px solid #10b981;
}

.admin-feedback-card.status-dismissed {
  opacity: 0.6;
  border-left: 3px solid #6b7280;
}

.admin-feedback-card.status-pending {
  border-left: 3px solid #f59e0b;
}

.feedback-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-submitter-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.feedback-user-email {
  font-size: 0.8rem;
  color: var(--text-dim, #94a3b8);
}

.feedback-meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-feedback-cat {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-feedback-status {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-feedback-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-feedback-status.reviewed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-feedback-status.dismissed {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.35);
}

.feedback-card-body {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 14px;
  border-radius: 8px;
  word-break: break-word;
}

.feedback-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.feedback-actions-row {
  display: flex;
  gap: 8px;
}

/* Homepage SEO FAQ & Reference Guide Section */
.home-seo-faq-section {
  margin: 40px auto 20px auto;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.home-seo-faq-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-glass);
}

.home-seo-faq-header {
  text-align: center;
  margin-bottom: 24px;
}

.home-seo-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(236, 72, 153, 0.1);
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

.home-seo-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.25;
}

.home-seo-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

.home-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(236, 72, 153, 0.4);
  background: rgba(255, 255, 255, 0.03);
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '▾';
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-glass);
  padding-top: 10px;
}

.faq-inline-link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.faq-inline-link:hover {
  color: #f472b6;
}

.home-seo-hubs-bar {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-glass);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hubs-bar-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.hubs-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hubs-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.hubs-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

@media (max-width: 768px) {
  .home-seo-faq-inner {
    padding: 20px 16px;
  }
  .home-seo-title {
    font-size: 1.35rem;
  }
  .faq-question {
    font-size: 0.92rem;
  }
  .faq-answer {
    font-size: 0.86rem;
  }
}

/* ==========================================================================
   ✨ Passwordless Magic Link & Auth Polish
   ========================================================================== */
.magic-success-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
  text-align: left;
}

.magic-success-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.magic-success-box strong {
  display: block;
  color: #34d399;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.magic-success-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   🥫 Guest Visitor Pantry Matcher Conversion Hook
   ========================================================================== */
.guest-pantry-conversion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 16px 0 20px 0;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.08);
}

.guest-pantry-icon {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guest-pantry-content {
  flex: 1;
  min-width: 0;
}

.guest-pantry-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.guest-pantry-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-guest-pantry-cta {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.btn-guest-pantry-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.5);
}

@media (max-width: 640px) {
  .guest-pantry-conversion-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .btn-guest-pantry-cta {
    width: 100%;
    text-align: center;
    padding: 11px;
  }
}

/* ==========================================================================
   📸 Story & Pint Card Generator Modal
   ========================================================================== */
.btn-story-card-share {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
  margin-left: 6px;
}

.btn-story-card-share:hover {
  background: rgba(139, 92, 246, 0.28) !important;
  border-color: rgba(139, 92, 246, 0.6) !important;
}

.story-card-modal-content {
  max-width: 480px !important;
  text-align: center;
  padding: 24px 22px !important;
}

.story-card-modal-header {
  margin-bottom: 16px;
}

.story-ratio-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  background: var(--bg-surface-elevated, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px;
  max-width: 300px;
  margin: 0 auto 18px auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ratio-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ratio-btn.active {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.45);
}

.story-theme-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.story-theme-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 420px;
}

.theme-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.theme-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  color: #ffffff;
  background: rgba(30, 41, 59, 0.9);
}

.theme-pill-btn.active {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.04);
}

.theme-pill-btn[data-theme="berry"].active {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  box-shadow: 0 3px 14px rgba(236, 72, 153, 0.55);
}

.theme-pill-btn[data-theme="chocolate"].active {
  background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
  box-shadow: 0 3px 14px rgba(245, 158, 11, 0.5);
}

.theme-pill-btn[data-theme="glacier"].active {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  box-shadow: 0 3px 14px rgba(6, 182, 212, 0.55);
}

.theme-pill-btn[data-theme="sunset"].active {
  background: linear-gradient(135deg, #ea580c 0%, #e11d48 100%);
  box-shadow: 0 3px 14px rgba(249, 115, 22, 0.55);
}

.theme-pill-btn[data-theme="matcha"].active {
  background: linear-gradient(135deg, #65a30d 0%, #059669 100%);
  box-shadow: 0 3px 14px rgba(132, 204, 22, 0.55);
}

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-berry { background: #f43f5e; box-shadow: 0 0 6px #f43f5e; }
.dot-chocolate { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.dot-glacier { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.dot-sunset { background: #fb923c; box-shadow: 0 0 6px #fb923c; }
.dot-matcha { background: #a3e635; box-shadow: 0 0 6px #a3e635; }

/* Story Card Options & Elements Toggle Bar */
.story-options-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -6px;
  margin-bottom: 16px;
}

.story-option-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  user-select: none;
}

.story-option-pill:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-1px);
}

.story-option-pill.active {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.3) 0%, rgba(251, 146, 60, 0.18) 100%);
  border-color: #fb923c;
  color: #fed7aa;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.35);
}

.story-option-pill .option-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.story-option-pill .option-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.65rem;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.story-option-pill.active .option-check {
  background: #ea580c;
  color: #ffffff;
  font-weight: 800;
}

.story-canvas-preview-wrapper {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 20px auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.story-card-preview-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 54vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 35px rgba(236, 72, 153, 0.35);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: auto !important;
  -webkit-user-select: auto !important;
  -webkit-touch-callout: default !important;
  pointer-events: auto;
  cursor: pointer;
}

.story-card-preview-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.9), 0 0 45px rgba(236, 72, 153, 0.45);
}

.story-loading-indicator {
  position: absolute;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.story-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.story-actions-row #btnShareStoryNative {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
  font-weight: 800;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.story-actions-row #btnShareStoryNative:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.55);
}

.story-actions-row #btnDownloadStoryImage {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.story-actions-row #btnDownloadStoryImage:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* --- Beta Staging Sandbox Ribbon --- */
.beta-ribbon-bar {
  display: none !important;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  color: #ffffff;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  position: sticky;
  top: 0;
  z-index: 10000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

body.is-beta-env .beta-ribbon-bar,
html.is-beta-env .beta-ribbon-bar {
  display: flex !important;
}

.beta-ribbon-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.beta-badge {
  background: rgba(0, 0, 0, 0.35);
  color: #a5f3fc;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid rgba(165, 243, 252, 0.4);
}

.beta-text {
  color: #f1f5f9;
  letter-spacing: 0.01em;
}

.beta-exit-link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.9;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.beta-exit-link:hover {
  opacity: 1;
  color: #fed7aa;
}

/* ==========================================================================
   Virtual Freezer Shelf Widget & Multi-Container Slots (Beta Staging)
   ========================================================================== */

.freezer-shelf-widget {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 41, 59, 0.65) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.freezer-shelf-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  opacity: 0.8;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  cursor: pointer;
  user-select: none;
}

.shelf-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1 1 auto;
}

.shelf-icon {
  font-size: 1.6rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.shelf-title-text {
  display: flex;
  flex-direction: column;
}

.shelf-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.01em;
}

.shelf-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.shelf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

.shelf-slots-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
  flex-wrap: nowrap;
}

.shelf-slots-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.btn-slot-cap {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}

.btn-slot-cap:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-slot-cap.active {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.btn-slot-cap.locked-cap {
  background: rgba(15, 23, 42, 0.45);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  padding: 3px 7px;
}

.btn-shelf-toggle-collapse {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  min-width: 38px;
  min-height: 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
  touch-action: manipulation;
}

.btn-shelf-toggle-collapse:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: scale(1.05);
}

/* Slots Grid */
.shelf-slots-wrapper {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.shelf-slots-wrapper.collapsed {
  display: none;
}

.shelf-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  contain: layout style;
}

/* Individual Slot Card */
.shelf-slot-card {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 155px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 155px;
}

.shelf-slot-card:hover {
  transform: translateY(-2px);
}

/* Empty Slot State */
.shelf-slot-card.empty {
  border: 1.5px dashed rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.35);
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.shelf-slot-card.empty:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.04);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.1);
}

.slot-empty-icon {
  font-size: 1.5rem;
  color: #38bdf8;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
}

.shelf-slot-card.empty:hover .slot-empty-icon {
  transform: scale(1.15);
}

.slot-empty-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.slot-empty-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

.btn-slot-fill {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shelf-slot-card.empty:hover .btn-slot-fill {
  background: #38bdf8;
  color: #0f172a;
}

/* Locked Paywall Teaser Slot State */
.shelf-slot-card.locked-teaser {
  border: 1.5px dashed rgba(245, 158, 11, 0.4);
  background: rgba(30, 27, 75, 0.35);
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.shelf-slot-card.locked-teaser:hover {
  border-color: rgba(245, 158, 11, 0.8);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.18);
  transform: translateY(-2px);
}

.shelf-slot-card.locked-teaser:hover .btn-slot-fill {
  background: #f59e0b;
  color: #0f172a;
}

/* Chilling Slot State */
.shelf-slot-card.chilling {
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
}

.slot-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.slot-header-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.slot-number-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.slot-status-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.slot-status-pill.chilling {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.slot-status-pill.ready {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.5);
  animation: pulsePill 2s infinite;
}

@keyframes pulsePill {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

.slot-recipe-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.25;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

.slot-meta-info {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
}

.slot-progress-container {
  margin-bottom: 10px;
}

.slot-progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.slot-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.slot-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.btn-slot-action {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.btn-slot-recipe {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.btn-slot-recipe:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-slot-mark-ready {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-slot-mark-ready:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.btn-slot-discard {
  background: transparent;
  color: #64748b;
  padding: 4px 6px;
}

.btn-slot-discard:hover {
  color: #f87171;
}

/* Ready Slot State */
.shelf-slot-card.ready {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.8) 0%, rgba(6, 78, 59, 0.25) 100%);
  box-shadow: 0 6px 25px rgba(34, 197, 94, 0.18);
}

.btn-slot-spin-ready {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-slot-spin-ready:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Recipe Card & Modal Quick Put in Freezer Button */
.btn-quick-freeze-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-freeze-card:hover {
  background: #38bdf8;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-freeze-slot-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.btn-freeze-slot-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

/* Quick Slot Fill Modal */
.slot-fill-modal-content {
  max-width: 480px;
  width: 92%;
}

.slot-fill-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slot-fill-body {
  padding-top: 14px;
}

.slot-fill-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Slot Fill Recipe & Mix-In Preview Area */
.slot-fill-recipe-preview {
  margin-top: 8px;
  margin-bottom: 14px;
}

.slot-fill-mixin-alert {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 12px 14px;
}

.slot-fill-mixin-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.slot-fill-mixin-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.slot-fill-mixin-title-wrap {
  display: flex;
  flex-direction: column;
}

.slot-fill-mixin-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.02em;
}

.slot-fill-mixin-sub {
  font-size: 0.72rem;
  color: #fde68a;
  font-weight: 600;
}

.slot-fill-mixin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.slot-fill-mixin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 6px;
  padding: 5px 8px;
}

.slot-fill-mixin-item .mixin-item-qty {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.slot-fill-mixin-item .mixin-item-name {
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
}

.slot-fill-mixin-instructions {
  font-size: 0.76rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
  line-height: 1.35;
}

.slot-fill-nomixin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.slot-fill-cycle-badge {
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.slot-fill-custom-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #e2e8f0;
}

/* Shelf Slot Card Mix-In Badge */
.slot-mixin-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 6px;
  padding: 3px 6px;
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: #fde68a;
  line-height: 1.25;
}

.slot-mixin-badge .mixin-badge-icon {
  font-size: 0.82rem;
  flex-shrink: 0;
}

.slot-mixin-badge .mixin-badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-mixin-badge .mixin-badge-text strong {
  color: #fbbf24;
  font-weight: 700;
}

/* Spin Log Modal Mix-in Callout */
.spin-recipe-mixin-callout {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.spin-recipe-mixin-callout .spin-mixin-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.spin-recipe-mixin-callout .spin-mixin-title {
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.88rem;
}

.spin-recipe-mixin-callout .spin-mixin-name {
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.95rem;
}

.spin-recipe-mixin-callout .spin-mixin-instruction {
  margin: 5px 0 0 0;
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .freezer-shelf-widget {
    padding: 14px 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .shelf-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .btn-shelf-batch-prep {
    flex: 1 1 auto;
    justify-content: center;
  }
  .shelf-slots-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 5px 10px;
    order: 3;
  }
  .btn-slot-cap {
    flex: 1 1 0;
    padding: 5px 6px;
    font-size: 0.8rem;
  }
  .shelf-slots-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 12px;
    width: 100%;
  }
  .shelf-slot-card {
    min-height: 135px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .shelf-slots-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .shelf-slot-card {
    min-height: auto;
    padding: 12px 14px;
  }
  .shelf-slot-card.empty {
    min-height: 120px;
    padding: 14px;
  }
}

/* ==========================================================================
   Sunday Batch Prep & Consolidated Grocery List (Beta Staging)
   ========================================================================== */

/* Floating Batch Prep Dock */
.batch-prep-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 680px;
  z-index: 9995;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(49, 46, 129, 0.95) 100%);
  border: 1px solid rgba(165, 180, 252, 0.35);
  border-radius: var(--radius-lg, 16px);
  padding: 10px 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(99, 102, 241, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideUpDock 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpDock {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.batch-prep-dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.batch-prep-dock-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-prep-badge {
  background: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(165, 180, 252, 0.3);
}

.batch-prep-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.batch-prep-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-batch-dock-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-batch-dock-clear:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.btn-batch-dock-open {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: 1px solid rgba(165, 180, 252, 0.4);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-batch-dock-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.55);
}

.batch-prep-arrow {
  transition: transform 0.15s ease;
}

.btn-batch-dock-open:hover .batch-prep-arrow {
  transform: translateX(3px);
}

/* Recipe Card Batch Prep Button */
.btn-card-batch-prep {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #a5b4fc;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-batch-prep:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
}

.btn-card-batch-prep.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.btn-modal-batch-prep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 10px 16px;
  border-radius: var(--radius-md, 10px);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-batch-prep:hover {
  background: rgba(99, 102, 241, 0.26);
  color: #ffffff;
}

.btn-modal-batch-prep.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: #818cf8;
  color: #ffffff;
}

/* Batch Prep Modal Content */
.batch-prep-modal-content {
  max-width: 720px;
  width: 94%;
  height: min(90vh, 860px);
  max-height: 90vh;
  max-height: 90dvh;
  padding: 16px 22px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden !important; /* Prevents the main/outer scrollbar completely */
}

.batch-prep-modal-content .modal-header {
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.batch-prep-modal-content .modal-title {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.2;
}

.batch-prep-modal-content .modal-subtitle {
  font-size: 0.76rem;
  margin: 2px 0 0;
  line-height: 1.25;
}

.batch-prep-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-prep-icon-badge {
  font-size: 1.2rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.batch-prep-modal-body {
  padding-top: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* No scrollbar on outer body */
  max-height: none;
}

.batch-prep-section {
  margin-bottom: 10px;
}

.batch-prep-section.batch-prep-queued-section {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.batch-prep-section.batch-prep-list-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.batch-prep-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.batch-prep-section-header h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

.batch-prep-pantry-match {
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

/* Queued Pints Strip */
.batch-prep-pints-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.batch-pint-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  flex-shrink: 0;
  position: relative;
}

.batch-pint-chip-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.batch-pint-chip-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-pint-chip-scale {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 1px;
}

/* Batch Pint Chip Actions (Add another & Remove) */
.batch-pint-chip-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.btn-batch-chip-add {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-batch-chip-add:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: scale(1.08);
}

.btn-batch-chip-remove {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-batch-chip-remove:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
  transform: scale(1.08);
}

/* Card Batch Prep Stepper (v5.8 Multi-Pint Prep) */
.card-prep-slot {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.card-batch-prep-stepper {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.28) 0%, rgba(124, 58, 237, 0.28) 100%);
  border: 1px solid rgba(129, 140, 248, 0.5);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
  height: 28px;
}

.btn-prep-step {
  background: transparent;
  border: none;
  color: #c7d2fe;
  font-size: 0.9rem;
  font-weight: 800;
  width: 24px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  padding: 0;
}

.btn-prep-step:hover {
  background: rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

.btn-prep-step.dec:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.prep-step-count {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 28px;
  white-space: nowrap;
}

.prep-step-count:hover {
  text-decoration: underline;
  color: #e0e7ff;
}

/* Modal Batch Prep Stepper */
.modal-batch-prep-stepper {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22) 0%, rgba(124, 58, 237, 0.22) 100%);
  border: 1px solid rgba(129, 140, 248, 0.45);
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  height: 40px;
}

.btn-modal-prep-step {
  background: transparent;
  border: none;
  color: #c7d2fe;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0 14px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-modal-prep-step:hover {
  background: rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.btn-modal-prep-step.dec:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.modal-prep-step-label {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0 10px;
  height: 100%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-prep-step-label:hover {
  text-decoration: underline;
  color: #e0e7ff;
}

[data-theme="light"] .card-batch-prep-stepper {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: #4338ca;
  color: #ffffff;
}

[data-theme="light"] .btn-prep-step {
  color: #e0e7ff;
}

[data-theme="light"] .prep-step-count {
  color: #ffffff;
}

[data-theme="light"] .modal-batch-prep-stepper {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: #4338ca;
  color: #ffffff;
}

/* Shelf & Freezer Modal Batch Prep Buttons & Banner */
.btn-shelf-batch-prep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #e0e7ff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-shelf-batch-prep:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45) 0%, rgba(168, 85, 247, 0.45) 100%);
  border-color: rgba(99, 102, 241, 0.8);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.freezer-batch-prep-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.freezer-batch-prep-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.freezer-batch-prep-banner-icon {
  font-size: 1.6rem;
}

.freezer-batch-prep-banner-info strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #c7d2fe;
}

.freezer-batch-prep-banner-info p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.btn-batch-banner-action {
  padding: 8px 14px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Freezer Modal Standalone Paywall / Upgrade Banner */
.freezer-upgrade-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(14, 165, 233, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.freezer-upgrade-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.freezer-upgrade-banner-icon {
  font-size: 1.6rem;
}

.freezer-upgrade-banner-info strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #e0f2fe;
}

.freezer-upgrade-banner-info p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.btn-freezer-upgrade-action {
  padding: 8px 14px;
  font-size: 0.85rem;
  white-space: nowrap;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-freezer-upgrade-action:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

.batch-quick-add-controls {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.batch-quick-add-select {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.82rem;
  outline: none;
}

.batch-quick-add-select:focus {
  border-color: #6366f1;
}

.btn-batch-sampler-quick {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-batch-sampler-quick:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.7);
  color: #ffffff;
}

/* Grocery Groups - The single dedicated scrollable list */
.batch-prep-grocery-groups {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.45) transparent;
}

.batch-prep-grocery-groups::-webkit-scrollbar {
  width: 6px;
}

.batch-prep-grocery-groups::-webkit-scrollbar-track {
  background: transparent;
}

.batch-prep-grocery-groups::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}

.batch-prep-grocery-groups::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

.batch-prep-group {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}

.batch-prep-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.batch-prep-group-title.missing {
  color: #f59e0b;
}

.batch-prep-group-title.in-stock {
  color: #10b981;
}

.btn-batch-add-all-shop {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-batch-add-all-shop:hover {
  background: #f59e0b;
  color: #0f172a;
}

.btn-batch-add-all-shop.in-list {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.btn-batch-add-all-shop.in-list:hover {
  background: rgba(16, 185, 129, 0.28);
  color: #ffffff;
}

.btn-batch-item-toggle-shop {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-batch-item-toggle-shop:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.btn-batch-item-toggle-shop.in-list {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.45);
  color: #34d399;
}

.btn-batch-item-toggle-shop.in-list:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.batch-grocery-item-row.is-in-shop-list {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.batch-prep-items-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.batch-grocery-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.batch-grocery-item-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.batch-grocery-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.batch-grocery-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-grocery-item-used {
  font-size: 0.66rem;
  color: #64748b;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.batch-grocery-item-qty {
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
}

.batch-prep-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.batch-prep-footer .batch-footer-btn-secondary {
  flex: 0 1 auto;
  padding: 8px 12px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.batch-prep-footer .batch-footer-btn-primary {
  flex: 1 1 auto;
  padding: 8px 14px;
  font-size: 0.84rem;
  white-space: nowrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .batch-prep-modal-content {
    width: 96%;
    height: 94vh;
    height: 94dvh;
    max-height: 94vh;
    padding: 12px 12px 10px;
  }
  .batch-prep-modal-content .modal-subtitle {
    display: none;
  }
  .modal-footer.batch-prep-footer {
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-top: 8px;
  }
  .modal-footer.batch-prep-footer .batch-footer-btn-secondary {
    width: auto !important;
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.75rem;
    flex: 0 1 auto;
  }
  .modal-footer.batch-prep-footer .batch-footer-btn-primary {
    width: auto !important;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.8rem;
    flex: 1 1 auto;
  }
}

@media (max-width: 768px) {
  .batch-prep-dock {
    bottom: calc(var(--bottom-nav-height, 64px) + 10px);
    width: 95%;
    padding: 8px 12px;
  }
}

.btn-batch-dock-prep {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-batch-dock-prep:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   Kitchen Assembly Mode (Sunday Batch Prep Guided Flow)
   ========================================================================== */
.assembly-modal-content {
  max-width: 840px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl, 20px);
  padding: 0;
  overflow: hidden;
}

.assembly-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 27, 75, 0.6);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.assembly-header .modal-title {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.2;
}

.assembly-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assembly-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.assembly-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.assembly-screen-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.assembly-pints-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* 4-Step Assembly Bar */
.assembly-step-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.assembly-step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 7px 6px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
}

.assembly-step-btn .step-num {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.assembly-step-btn .step-txt {
  overflow: hidden;
  text-overflow: ellipsis;
}

.assembly-step-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.assembly-step-btn.active .step-num {
  background: #ffffff;
  color: #4f46e5;
  font-weight: 800;
}

.assembly-step-btn.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.assembly-step-btn.completed .step-num {
  background: #10b981;
  color: #ffffff;
}

.assembly-body {
  padding: 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
  max-height: calc(92vh - 180px);
}

@media (max-width: 640px) {
  .assembly-modal-content {
    width: 96%;
    max-height: 94vh;
    max-height: 94dvh;
  }
  .assembly-header {
    padding: 12px 12px 10px;
    gap: 8px;
  }
  .assembly-step-bar {
    gap: 5px;
  }
  .assembly-step-btn {
    padding: 6px 4px;
    font-size: 0.73rem;
    gap: 4px;
    border-radius: 8px;
  }
  .assembly-step-btn .step-num {
    width: 17px;
    height: 17px;
    font-size: 0.66rem;
  }
  .assembly-body {
    padding: 12px 12px;
  }
}

.assembly-pints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.assembly-pint-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md, 12px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.assembly-pint-card.done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.assembly-pint-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.assembly-pint-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-pint-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.assembly-pint-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-assembly-pint-remove {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-assembly-pint-remove:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.assembly-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assembly-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.assembly-item-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.assembly-item-row.checked {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #94a3b8;
  text-decoration: line-through;
}

.assembly-item-row.checked .assembly-item-qty {
  color: #64748b;
}

.assembly-item-name {
  font-weight: 600;
  color: #f1f5f9;
}

.assembly-item-qty {
  font-weight: 700;
  color: #38bdf8;
  white-space: nowrap;
}

.assembly-card-check-btn {
  margin-top: auto;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  transition: all 0.15s ease;
}

.assembly-card-check-btn.done {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

/* Froth Technique Stage Card */
.assembly-technique-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.assembly-tech-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.assembly-tech-step-icon {
  font-size: 1.6rem;
  background: rgba(99, 102, 241, 0.15);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.assembly-tech-step-text strong {
  color: #f8fafc;
  font-size: 0.96rem;
  display: block;
  margin-bottom: 3px;
}

.assembly-tech-step-text p {
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

/* Freeze Stage Card */
.assembly-freeze-stage-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.assembly-freeze-icon {
  font-size: 3rem;
  animation: pulseFreeze 2s infinite ease-in-out;
}

@keyframes pulseFreeze {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Freeze Stage Pint Config Grid & Cards */
.assembly-freeze-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.assembly-freeze-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.assembly-freeze-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.assembly-batch-time-bar {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.assembly-footer {
  padding: 12px 20px;
  margin-top: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 27, 75, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .modal-footer.assembly-footer {
    flex-direction: row !important;
    padding: 10px 12px;
    gap: 8px;
    margin-top: 0 !important;
  }
  .modal-footer.assembly-footer .btn-secondary {
    width: auto !important;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
    flex: 0 1 auto;
  }
  .modal-footer.assembly-footer .btn-primary {
    width: auto !important;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.82rem;
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ==========================================================================
   Interactive Spin Log & Habit Streaks Modal
   ========================================================================== */
.spin-log-modal-content {
  max-width: 580px;
  width: min(95%, 580px);
  max-height: min(90vh, 90dvh) !important;
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl, 20px);
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important; /* Zero main scrollbar: perfectly fits page */
  box-sizing: border-box;
}

.spin-log-modal-content .modal-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  margin-bottom: 0;
  position: relative;
}

.spin-log-modal-content .modal-close {
  top: 14px;
  right: 18px;
  z-index: 100 !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #e2e8f0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.15s ease;
}

.spin-log-modal-content .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.05);
}

.spin-log-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spin-log-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}

.spin-log-body {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto; /* Only ONE scrollbar on instructions & form */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.spin-log-summary-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Spin Log Warm Water Bath Timer Widget */
.spin-log-timer-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(14, 165, 233, 0.08) 100%);
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.1);
}

.spin-log-timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spin-log-timer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spin-log-timer-icon {
  font-size: 1.55rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(6, 182, 212, 0.4));
}

.spin-log-timer-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f0f9ff;
  letter-spacing: -0.01em;
}

.spin-log-timer-sub {
  display: block;
  font-size: 0.74rem;
  color: #93c5fd;
  line-height: 1.3;
  margin-top: 1px;
}

.spin-log-timer-badge {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #22d3ee;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(6, 182, 212, 0.35);
  min-width: 54px;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.spin-log-timer-badge.pulsing {
  animation: timerPulse 1s infinite alternate;
  background: rgba(6, 182, 212, 0.32);
  border-color: #38bdf8;
  color: #38bdf8;
}

.spin-log-timer-badge.done {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.spin-log-timer-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.spin-log-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4 0%, #38bdf8 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.spin-log-timer-bar.done {
  background: #10b981;
}

.spin-log-timer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.spin-log-timer-presets {
  display: flex;
  gap: 6px;
}

.timer-preset-btn {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.timer-preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.timer-preset-btn.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
  color: #22d3ee;
}

.spin-log-timer-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-timer-primary {
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #06b6d4;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.btn-timer-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-timer-primary.running {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn-timer-primary.done {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-timer-ghost {
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timer-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.spin-log-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spin-log-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.spin-cycles-selector,
.spin-respin-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cycle-pill,
.respin-pill {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cycle-pill:hover,
.respin-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cycle-pill.active {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.respin-pill.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-color: #a5b4fc;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.spin-log-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  color: #f8fafc;
  font-size: 0.88rem;
}

.spin-log-input:focus {
  outline: none;
  border-color: #818cf8;
}

.spin-star-rating {
  display: flex;
  gap: 8px;
}

.spin-star-rating .star-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.35;
  transition: all 0.12s ease;
  padding: 0;
}

.spin-star-rating .star-btn.active {
  opacity: 1;
  transform: scale(1.08);
}

.spin-streak-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.streak-flame {
  font-size: 2rem;
  animation: pulseFlame 1.8s infinite ease-in-out;
}

@keyframes pulseFlame {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(4deg); }
}

.streak-text-group strong {
  display: block;
  font-size: 0.94rem;
  color: #fef08a;
}

.streak-text-group span {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.spin-log-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.spin-log-footer .btn-cancel-spin-modal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.spin-log-footer .btn-cancel-spin-modal:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

@media (max-width: 768px) {
  .spin-log-modal-content {
    width: 95% !important;
    max-height: 94vh !important;
    max-height: 94dvh !important;
    border-radius: 16px;
  }
  .spin-log-modal-content .modal-header {
    padding: 14px 16px 10px;
  }
  .spin-log-icon-badge {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }
  .spin-log-modal-content .modal-title {
    font-size: 1.1rem;
  }
  .spin-log-modal-content .modal-subtitle {
    font-size: 0.72rem;
  }
  .spin-log-body {
    padding: 14px 16px;
    gap: 14px;
  }
  .spin-log-footer {
    padding: 10px 14px;
  }
  .spin-log-footer .btn-secondary {
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
    flex: 0 1 auto;
  }
  .spin-log-footer .btn-primary {
    padding: 8px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ==========================================================================
   Creator Platform & Storefront Studio (Path B)
   ========================================================================== */
.btn-creator-header.hidden,
.btn-creator-header[style*="display: none"],
#openCreatorPortalBtn.hidden,
#openCreatorPortalBtn[style*="display: none"] {
  display: none !important;
}

.btn-creator-header {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-creator-header:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
  border-color: #f472b6;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-batch-prep-pack {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-batch-prep-pack:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.creator-portal-modal-content {
  max-width: 860px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(236, 72, 153, 0.2);
  border-radius: var(--radius-xl, 20px);
  padding: 0;
  overflow: hidden;
}

.creator-portal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: calc(92vh - 160px);
}

.creator-studio-hero-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.7) 0%, rgba(49, 46, 129, 0.5) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.creator-studio-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.creator-studio-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
}

.creator-studio-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.creator-studio-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.creator-studio-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.creator-verified-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.creator-studio-brand {
  font-size: 0.84rem;
  color: #c7d2fe;
}

.creator-studio-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.creator-studio-slug {
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
}

.btn-studio-copy-slug,
.btn-studio-view-public {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-studio-copy-slug {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

.btn-studio-copy-slug:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-studio-view-public {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.btn-studio-view-public:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

/* Creator Analytics Grid */
.creator-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.creator-analytic-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.creator-analytic-card .analytic-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.creator-analytic-card .analytic-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f8fafc;
}

.creator-analytic-card .analytic-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
}

.creator-analytic-card .analytic-sub {
  font-size: 0.72rem;
  color: #64748b;
}

.creator-studio-actions-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.creator-studio-actions-bar button {
  flex: 1;
  min-width: 220px;
  padding: 12px 18px;
  font-size: 0.9rem;
}

/* Creator Section */
.creator-studio-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.creator-studio-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.creator-studio-section-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.creator-studio-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.creator-collections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.creator-collection-row {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.collection-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.collection-row-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
}

.collection-row-meta {
  font-size: 0.76rem;
  color: #94a3b8;
}

.collection-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.creator-perks-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.perk-compact-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
}

.perk-compact-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(30, 41, 59, 0.75);
}

.perk-compact-code {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
  letter-spacing: 0.5px;
}

.btn-studio-edit-perk {
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-studio-delete-perk {
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-studio-edit-perk:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.btn-studio-delete-perk:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #ffffff !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

.creator-portal-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 27, 75, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.creator-footer-note {
  font-size: 0.8rem;
  color: #a5b4fc;
  flex: 1;
}

/* --- Pint Lid Color Customization (Amazon Multi-Pack Lids) --- */
.lid-color-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lid-color-swatches-grid {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.lid-swatch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.lid-swatch-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.lid-swatch-btn.active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px var(--swatch-glow, rgba(56, 189, 248, 0.35));
  color: #ffffff;
}

.lid-swatch-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

/* Shelf Slot Card Lid Accent & Pill */
.slot-lid-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.slot-lid-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.slot-lid-pill:hover {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.45);
}

.lid-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.freezer-tag.lid-color-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 700;
}

.freezer-tag.lid-color-tag:hover {
  transform: scale(1.05);
}

/* Floating Back to Top Button */
.btn-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(16, 185, 129, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  pointer-events: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.btn-back-to-top:hover {
  background: var(--primary, #059669);
  border-color: #34d399;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45);
}

.btn-back-to-top:active {
  transform: scale(0.96);
}

.btt-icon {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-back-to-top:hover .btt-icon {
  transform: translateY(-2px);
}

body.modal-open .btn-back-to-top {
  display: none !important;
}

@media (max-width: 768px) {
  .btn-back-to-top {
    bottom: calc(var(--bottom-nav-height, 64px) + 16px);
    right: 16px;
    padding: 9px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .btn-back-to-top {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
  }
  .btn-back-to-top .btt-text {
    display: none;
  }
}

/* --- Phase 1 Gamification: Chef Badges & Milestones --- */
.stat-card.stat-card-interactive {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card.stat-card-interactive:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.stat-card.stat-card-interactive:active {
  transform: scale(0.98);
}

.stat-icon.gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.btn-badges-header {
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.btn-badges-header:hover {
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25) !important;
}

.badges-modal-content {
  max-width: 680px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(245, 158, 11, 0.15);
}

.badges-modal-header {
  margin-bottom: 14px;
  text-align: center;
}

.badges-header-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.badges-progress-container {
  background: var(--bg-card);
  border: 1px solid var(--border-item);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0 16px;
  text-align: left;
}

.badges-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.badges-progress-rank {
  font-weight: 700;
  color: #fbbf24;
}

.badges-progress-count {
  font-weight: 600;
  color: var(--text-dim);
}

.badges-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.badges-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899, #f59e0b, #10b981);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.badges-tab-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.btn-badge-tab {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-item);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-badge-tab:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.btn-badge-tab.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.badges-modal-body {
  flex-grow: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 4px 28px 4px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: min-content;
  gap: 12px;
  margin-bottom: 16px;
}

.badge-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-item);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  min-height: fit-content;
  height: auto;
  overflow: visible;
  box-sizing: border-box;
}

.badge-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.badge-card.unlocked {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(236, 72, 153, 0.04));
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.badge-card.unlocked::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ec4899, #f59e0b);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.badge-card.locked {
  opacity: 0.72;
}

.badge-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-item);
}

.badge-card.unlocked .badge-icon-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(236, 72, 153, 0.15));
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.badge-card.locked .badge-icon-box {
  filter: grayscale(0.8);
}

.badge-info-col {
  flex-grow: 1;
  min-width: 0;
}

.badge-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.badge-title-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  padding-bottom: 2px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-cat-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.badge-card.unlocked .badge-cat-tag {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.badge-desc-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.badge-progress-wrap {
  margin-top: 4px;
}

.badge-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 4px;
  line-height: 1.3;
}

.badge-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.badge-progress-fill-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
}

.badge-unlocked-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  line-height: 1.3;
  padding-bottom: 2px;
}

.badges-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-item);
}

@media (max-width: 768px) {
  .badges-modal-content {
    max-height: 88dvh;
    padding: 18px 16px;
  }
  .badges-modal-body {
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    gap: 10px;
    padding: 6px 2px 28px 2px;
  }
}

/* ==========================================================================
   Admin Portal Analytics & Pulse Panel
   ========================================================================== */
.admin-analytics-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.admin-analytics-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
}

.admin-analytics-kpi-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.admin-analytics-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary);
}

.admin-analytics-kpi-card.green::before { background: #10b981; }
.admin-analytics-kpi-card.cyan::before { background: #06b6d4; }
.admin-analytics-kpi-card.amber::before { background: #f59e0b; }

.admin-analytics-kpi-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}

.admin-analytics-kpi-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.admin-analytics-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-analytics-grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}

.admin-analytics-block {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-analytics-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.admin-analytics-block-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-analytics-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.82rem;
}

.admin-analytics-row-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-analytics-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin: 0 12px;
  overflow: hidden;
}

.admin-analytics-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
}

.admin-analytics-badge-count {
  font-weight: 700;
  color: #f472b6;
  font-size: 0.78rem;
  background: rgba(236, 72, 153, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}


/* ==========================================================================
   Admin Content Creator Controls & Visibility Toggle Styles
   ========================================================================== */

.admin-creators-hero {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 16px);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-main, 0 4px 20px rgba(0, 0, 0, 0.25));
}

.admin-creators-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-creators-hero-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.admin-creators-hero-title .hero-badge-icon {
  font-size: 2rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-creators-hero-title h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 0 0 4px;
}

.admin-creators-hero-title p {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
  margin: 0;
  max-width: 620px;
}

.admin-creators-master-toggle-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-item, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  padding: 12px 18px;
  margin-left: auto;
}

.master-toggle-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.master-toggle-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
}

.master-toggle-subtitle {
  font-size: 0.74rem;
  color: var(--text-dim, #64748b);
  margin-top: 2px;
}

/* Modern Accessible Toggle Switch */
.creator-toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.creator-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.creator-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(148, 163, 184, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 26px;
}

.creator-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.creator-toggle-switch input:checked + .creator-toggle-slider {
  background-color: #10b981;
  border-color: #059669;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.creator-toggle-switch input:checked + .creator-toggle-slider:before {
  transform: translateX(20px);
}

.creator-toggle-switch input:focus-visible + .creator-toggle-slider {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

.creator-toggle-switch input:disabled + .creator-toggle-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

.creator-toggle-switch.master-switch {
  width: 54px;
  height: 30px;
}

.creator-toggle-switch.master-switch .creator-toggle-slider:before {
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
}

.creator-toggle-switch.master-switch input:checked + .creator-toggle-slider:before {
  transform: translateX(24px);
}

/* Creator Grid & Cards */
.admin-creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-creator-card {
  background: var(--bg-card, rgba(30, 41, 59, 0.6));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
}

.admin-creator-card:hover {
  border-color: var(--border-highlight, rgba(255, 255, 255, 0.2));
  background: var(--bg-card-hover, rgba(30, 41, 59, 0.8));
}

.admin-creator-card.disabled {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.04);
}

.admin-creator-card.disabled:hover {
  border-color: rgba(239, 68, 68, 0.5);
}

.creator-card-top-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.creator-avatar-badge {
  font-size: 1.8rem;
  background: var(--bg-item, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.creator-id-info {
  flex: 1;
  min-width: 0;
}

.creator-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.creator-name-row .creator-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 0;
}

.creator-name-row .creator-handle {
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 600;
}

.creator-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
  letter-spacing: 0.02em;
}

.creator-status-pill.pill-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.creator-status-pill.pill-disabled {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.creator-brand-line {
  font-size: 0.8rem;
  color: var(--text-dim, #94a3b8);
  margin-top: 2px;
}

.creator-bio-text {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
  margin: 0;
}

.creator-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}

.creator-metric-pill {
  display: flex;
  flex-direction: column;
}

.creator-metric-pill .metric-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fbbf24;
}

.creator-metric-pill .metric-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.creator-books-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.creator-books-preview .preview-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.creator-books-preview .preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.creator-book-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.creator-disabled-callout {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #fca5a5;
  line-height: 1.4;
}

.creator-active-callout {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #86efac;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .admin-creators-hero-content {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-creators-master-toggle-card {
    margin-left: 0;
    justify-content: space-between;
  }
  .admin-creators-grid {
    grid-template-columns: 1fr;
  }
  .creator-metrics-row {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 8px;
  }
}

/* ==========================================================================
   Creator Storefront Announcement, Link-in-Bio Hub & Creator Tools
   ========================================================================== */

/* Pinned Store Announcement Banner */
.creator-catalog-announcement-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeInDown 0.3s ease;
}

.announcement-pill-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  text-transform: uppercase;
}

.announcement-content-text {
  margin: 0;
  font-size: 0.88rem;
  color: #fef3c7;
  line-height: 1.45;
  font-weight: 500;
}

/* Link-in-Bio Hub Container */
.creator-link-in-bio-hub {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.creator-social-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.creator-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  transition: all 0.15s ease;
}

.creator-social-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.creator-social-pill.ig {
  border-color: rgba(244, 114, 182, 0.35);
  color: #f472b6;
}

.creator-social-pill.tiktok {
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.creator-social-pill.yt {
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.creator-social-pill.web {
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.creator-hub-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-catalog-match-pantry {
  flex: 1;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.15s ease;
}

.btn-catalog-match-pantry:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-1px);
}

/* Featured Pint Highlight Card */
.catalog-featured-pint-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.featured-pint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.featured-pint-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.featured-pint-spins {
  font-size: 0.72rem;
  color: #fbbf24;
  font-weight: 700;
}

.featured-pint-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.featured-pint-icon {
  font-size: 2rem;
  line-height: 1;
}

.featured-pint-info {
  flex: 1;
  min-width: 0;
}

.featured-pint-title {
  margin: 0 0 2px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-pint-macros {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.featured-pint-spin-tag {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 2px;
}

.btn-featured-view {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

/* Pantry Demand Radar */
.pantry-demand-insight-banner {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #bae6fd;
  line-height: 1.45;
}

.pantry-demand-radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.pantry-demand-item {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s ease;
}

.pantry-demand-item:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.pantry-demand-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pantry-demand-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pantry-demand-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.pantry-demand-badge.very-high {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.pantry-demand-badge.high {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde047;
}

.pantry-demand-badge.moderate {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.pantry-demand-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.pantry-demand-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #ec4899 100%);
  transition: width 0.4s ease;
}

.pantry-demand-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Modals: Smart Paste & Social Caption */
#smartPasteModalOverlay,
#socialCaptionModalOverlay {
  z-index: 10005;
}

.smart-paste-modal-content,
.social-caption-modal-content {
  max-width: 620px;
  width: 94%;
}

.social-caption-platform-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.caption-tab-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.caption-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.caption-tab-btn.active {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.35);
  color: #f472b6;
}

.btn-studio-caption-copy {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-studio-caption-copy:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* Creators Explore Action Button (Results Header / Access Bar) */
.btn-creators-explore-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 999px;
  color: #c084fc !important;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.btn-creators-explore-action:hover {
  background: rgba(168, 85, 247, 0.28);
  border-color: #a855f7;
  color: #f3e8ff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.btn-creators-explore-action:active {
  transform: translateY(0) scale(0.98);
}

.btn-creators-explore-action .creators-explore-icon {
  font-size: 0.95rem;
}

[data-theme="light"] .btn-creators-explore-action {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7c3aed !important;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.1);
}

[data-theme="light"] .btn-creators-explore-action:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #6d28d9 !important;
}

/* Creator Studio Signature 4-Pint Sampler Editor */
.creator-sampler-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.sampler-slot-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.sampler-slot-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(15, 23, 42, 0.85);
}

.sampler-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sampler-slot-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.sampler-slot-select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(12, 14, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 10px;
  color: #f8fafc;
  font-size: 0.84rem;
  cursor: pointer;
  outline: none;
}

.sampler-slot-select:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.sampler-slot-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px;
  min-height: 48px;
}

.sampler-slot-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.4rem;
}

.sampler-slot-info {
  flex: 1;
  min-width: 0;
}

.sampler-slot-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sampler-slot-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Sampler Preview Modal */
.sampler-preview-modal-content {
  max-width: 660px !important;
  width: 92% !important;
  background: #0f172a !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(168, 85, 247, 0.15) !important;
  border-radius: 16px !important;
  padding: 22px !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
}

.sampler-preview-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 10px;
}

.sampler-macro-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.sampler-macro-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sampler-macro-val {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.sampler-macro-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sampler-macro-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.sampler-pints-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.sampler-pint-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.sampler-pint-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(168, 85, 247, 0.3);
}

.sampler-pint-card.selected {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.08);
}

.sampler-pint-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #a855f7;
  cursor: pointer;
  flex-shrink: 0;
}

.sampler-pint-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.6rem;
}

.sampler-pint-details {
  flex: 1;
  min-width: 0;
}

.sampler-pint-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sampler-pint-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sampler-pint-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 3px;
  flex-wrap: wrap;
}

.sampler-pint-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #cbd5e1;
}

.sampler-pint-macros {
  font-weight: 700;
  color: #38bdf8;
}

.sampler-pint-link {
  font-size: 0.75rem;
  color: #c084fc;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0;
}

.sampler-pint-link:hover {
  text-decoration: underline;
  color: #e9d5ff;
}

.sampler-preview-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.sampler-preview-toggle-group {
  display: flex;
  align-items: center;
}

.btn-sampler-toggle-all,
#btnSamplerToggleAll,
.btn-text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md, 10px);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  user-select: none;
}

.btn-sampler-toggle-all:hover,
#btnSamplerToggleAll:hover,
.btn-text-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(192, 132, 252, 0.4);
  color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-sampler-toggle-all:active,
#btnSamplerToggleAll:active,
.btn-text-action:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.07);
}

.sampler-toggle-icon {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
}

.sampler-preview-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sampler-preview-btn-group .btn-secondary,
.btn-sampler-cancel {
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 10px);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sampler-preview-btn-group .btn-secondary:hover,
.btn-sampler-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.sampler-preview-btn-group .btn-primary,
.btn-sampler-confirm {
  padding: 9px 18px;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md, 10px);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.sampler-preview-btn-group .btn-primary:hover,
.btn-sampler-confirm:hover {
  background: linear-gradient(135deg, #b56bf8 0%, #8b5cf6 100%);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .sampler-preview-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .sampler-preview-toggle-group,
  .btn-sampler-toggle-all,
  #btnSamplerToggleAll {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .sampler-preview-btn-group {
    width: 100%;
    flex-direction: column-reverse;
    gap: 8px;
  }
  .sampler-preview-btn-group button {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
}

/* Creator Studio Multi-Sampler Tabs & Controls */
.creator-sampler-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.studio-sampler-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 8px);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.studio-sampler-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.studio-sampler-tab-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(124, 58, 237, 0.2) 100%);
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

.studio-sampler-tab-btn .tab-badge-count,
.studio-sampler-tab-btn .tab-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  color: #cbd5e1;
}

.btn-studio-add-sampler {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md, 8px);
  color: #c084fc;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-studio-add-sampler:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #c084fc;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Storefront Multiple Samplers Showcase */
.catalog-samplers-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-catalog-sampler-card {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md, 10px);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  font-family: inherit;
  flex: 1;
  min-width: 180px;
}

.btn-catalog-sampler-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
  color: #ffffff;
}

.btn-catalog-sampler-card .sampler-card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-catalog-sampler-card .sampler-card-tag {
  font-size: 0.7rem;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   Amazon Associates Monetization & Creami Gear Guide (Option C)
   ========================================================================== */

/* Header Gear Guide Button */
.btn-gear-header {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.38) !important;
  color: #fde68a !important;
}

.btn-gear-header:hover {
  background: rgba(245, 158, 11, 0.24) !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-gear-header {
  background: #fffbeb !important;
  border-color: #fcd34d !important;
  color: #b45309 !important;
}

[data-theme="light"] .btn-gear-header:hover {
  background: #fef3c7 !important;
  color: #92400e !important;
}

/* Gear Guide Modal Structure */
.gear-modal-content {
  background: #111424 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  max-width: 900px !important;
  width: 94% !important;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px !important;
  box-sizing: border-box;
  color: #f8fafc;
}

[data-theme="light"] .gear-modal-content {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18) !important;
}

.gear-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

[data-theme="light"] .gear-modal-header {
  border-bottom-color: #e2e8f0;
}

.gear-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.gear-icon-badge {
  font-size: 2.2rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.gear-partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e1b4b;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.gear-category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0 6px 0;
  max-width: 100%;
}

.gear-category-pills::-webkit-scrollbar {
  display: none;
}

.gear-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: #181d30;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #cbd5e1;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.18s ease;
  user-select: none;
}

[data-theme="light"] .gear-cat-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.gear-cat-pill:hover {
  background: #232a42;
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="light"] .gear-cat-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.gear-cat-pill.active {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

@media (max-width: 600px) {
  .gear-category-pills {
    gap: 6px;
    padding: 2px 0 6px 0;
  }
  .gear-cat-pill {
    padding: 5px 10px;
    font-size: 0.74rem;
    gap: 4px;
  }
}

/* Gear Products Grid & Cards */
.gear-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.gear-product-card {
  background: #171c30;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s;
}

[data-theme="light"] .gear-product-card {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.gear-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 158, 11, 0.5);
}

[data-theme="light"] .gear-product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gear-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.gear-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

[data-theme="light"] .gear-icon-box {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.gear-card-pills-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  max-width: calc(100% - 52px);
}

.gear-badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

[data-theme="light"] .gear-badge-pill {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.gear-rating-pill {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .gear-rating-pill {
  color: #64748b;
}

.gear-item-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

[data-theme="light"] .gear-item-title {
  color: #0f172a;
}

.gear-item-desc {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0 0 12px 0;
  flex: 1;
}

[data-theme="light"] .gear-item-desc {
  color: #475569;
}

.gear-protip-callout {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 8px 10px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: #fde68a;
  line-height: 1.4;
}

[data-theme="light"] .gear-protip-callout {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.gear-protip-callout strong {
  color: #fbbf24;
  display: block;
  margin-bottom: 2px;
}

[data-theme="light"] .gear-protip-callout strong {
  color: #b45309;
}

.gear-card-footer {
  margin-top: auto;
  padding-top: 10px;
}

.btn-amazon-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e1b4b !important;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.btn-amazon-buy:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(245, 158, 11, 0.45);
}

.btn-amazon-buy:active {
  transform: translateY(0);
}

.btn-amazon-buy .amazon-cta-icon {
  font-size: 1.1rem;
}

/* Mandatory FTC Disclosure Card */
.gear-ftc-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0 10px;
}

[data-theme="light"] .gear-ftc-card {
  background: #fffbeb;
  border-color: #fde68a;
}

.gear-ftc-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.gear-ftc-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #cbd5e1;
}

[data-theme="light"] .gear-ftc-text {
  color: #78350f;
}

.gear-ftc-text strong {
  display: block;
  color: #fbbf24;
  margin-bottom: 2px;
}

[data-theme="light"] .gear-ftc-text strong {
  color: #92400e;
}

/* Shopping List Modal Solid Content */
.shopping-modal-content {
  background: #111424 !important;
  color: #f8fafc;
}

[data-theme="light"] .shopping-modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Shopping List Contextual Amazon Integration */
.shopping-gear-callout-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0 16px;
  flex-wrap: wrap;
}

[data-theme="light"] .shopping-gear-callout-banner {
  background: #fffbeb;
  border-color: #fde68a;
}

.shopping-gear-callout-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 240px;
}

.gear-banner-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.shopping-gear-callout-info strong {
  display: block;
  font-size: 0.88rem;
  color: #f8fafc;
}

[data-theme="light"] .shopping-gear-callout-info strong {
  color: #0f172a;
}

.shopping-gear-callout-info span {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

[data-theme="light"] .shopping-gear-callout-info span {
  color: #64748b;
}

.btn-shopping-gear-trigger {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e1b4b;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  transition: all 0.18s ease;
}

.btn-shopping-gear-trigger:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000;
  transform: translateY(-1px);
}

.btn-amazon-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 6px;
  color: #fde68a !important;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.btn-amazon-link:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
  color: #ffffff !important;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-amazon-link {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309 !important;
}

[data-theme="light"] .btn-amazon-link:hover {
  background: #fef3c7;
  color: #92400e !important;
}

.store-item-amazon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  color: #fde68a !important;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

[data-theme="light"] .store-item-amazon-btn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309 !important;
}

.shopping-affiliate-ftc-note {
  text-align: center;
  padding: 10px 14px 2px;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}

[data-theme="light"] .shopping-affiliate-ftc-note {
  color: #94a3b8;
}

/* Freezer Pints Amazon Callout */
.freezer-amazon-pints-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0 16px;
  flex-wrap: wrap;
}

[data-theme="light"] .freezer-amazon-pints-callout {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.freezer-amazon-pints-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 240px;
}

.freezer-amazon-pints-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.freezer-amazon-pints-info strong {
  display: block;
  font-size: 0.88rem;
  color: #f8fafc;
}

[data-theme="light"] .freezer-amazon-pints-info strong {
  color: #0f172a;
}

.freezer-amazon-pints-info span {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

[data-theme="light"] .freezer-amazon-pints-info span {
  color: #64748b;
}

.btn-amazon-pints-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff !important;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.35);
  transition: all 0.18s ease;
}

.btn-amazon-pints-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.5);
  color: #ffffff !important;
}

/* Recipe Detail Modal Recommended Gear */
.recipe-gear-callout-card {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

[data-theme="light"] .recipe-gear-callout-card {
  background: #fffbeb;
  border-color: #fde68a;
}

.recipe-gear-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.recipe-gear-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.recipe-gear-header-text strong {
  display: block;
  font-size: 0.9rem;
  color: #f8fafc;
}

[data-theme="light"] .recipe-gear-header-text strong {
  color: #0f172a;
}

.recipe-gear-header-text span {
  font-size: 0.78rem;
  color: #94a3b8;
}

[data-theme="light"] .recipe-gear-header-text span {
  color: #64748b;
}

.recipe-gear-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-gear-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  color: #fde68a !important;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.recipe-gear-pill:hover {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.6);
  color: #ffffff !important;
  transform: translateY(-1px);
}

[data-theme="light"] .recipe-gear-pill {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309 !important;
}

.btn-recipe-open-gear-modal {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #ea580c;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
  transition: all 0.18s ease;
}

.btn-recipe-open-gear-modal:hover {
  background: #c2410c;
  transform: translateY(-1px);
}





/* Production safety guard: never display beta ribbon on live */
body:not(.is-beta-env) #betaSandboxRibbon,
#betaSandboxRibbon.hidden {
  display: none !important;
}
