/* ─── CWC DESIGN SYSTEM: 2026 WORLD-CLASS CATERING & CULINARY UI ─── */
:root {
  --bg-primary: #09090b;
  --bg-secondary: #121215;
  --bg-surface: #18181b;
  --bg-elevated: #242429;
  --border-subtle: #27272a;
  --border-active: #3f3f46;
  --border-focus: #52525b;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --brand-amber: #d97706;
  --brand-amber-hover: #b45309;
  --brand-amber-light: rgba(217, 119, 6, 0.12);
  --brand-amber-glow: rgba(217, 119, 6, 0.35);
  --card-radius: 16px;
  --pill-radius: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light {
  --bg-primary: #fcfcfc;
  --bg-secondary: #f4f4f5;
  --bg-surface: #ffffff;
  --bg-elevated: #f0f0f2;
  --border-subtle: #e4e4e7;
  --border-active: #d4d4d8;
  --border-focus: #a1a1aa;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --brand-amber-light: rgba(217, 119, 6, 0.1);
  --brand-amber-glow: rgba(217, 119, 6, 0.2);
}

/* ─── BASE RESET ─── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Phosphor Bold Icon Universal Fix */
.ph-bold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

/* ─── MAIN CONTAINER (ZERO NOISE) ─── */
.main-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 14px 110px;
}

/* ─── 2 PER ROW RECIPE GRID (POLISHED COMPACT LUXURY) ─── */
.recipe-grid.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  user-select: none;
}

.recipe-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.recipe-card:active {
  transform: scale(0.975);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipe-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-gradient-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 24, 27, 0.85) 0%, rgba(24, 24, 27, 0.2) 35%, transparent 60%);
  pointer-events: none;
}

.card-code-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fbbf24;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  z-index: 2;
}

.card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
}

.card-category-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--brand-amber);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title {
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

/* ─── FLOATING BOTTOM BIT PILL NAV BAR ─── */
.floating-pill-bottom {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 28px);
  max-width: 460px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.omni-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: rgba(24, 24, 27, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pill-radius);
  padding: 6px 8px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

body.theme-light .omni-bar {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 35px -8px rgba(0, 0, 0, 0.14);
}

.omni-bar:focus-within {
  border-color: var(--brand-amber);
  box-shadow: 0 16px 35px -5px rgba(217, 119, 6, 0.35);
}

.dot-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.dot-btn:active {
  transform: scale(0.92);
}

.dot-amber {
  background: var(--brand-amber-light);
  color: var(--brand-amber);
  border: 1.5px solid var(--brand-amber);
}

.dot-amber:hover {
  background: var(--brand-amber);
  color: #ffffff;
  box-shadow: 0 0 14px var(--brand-amber-glow);
}

.dot-obsidian {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1.5px solid var(--border-subtle);
}

.dot-obsidian:hover {
  background: var(--brand-amber);
  color: #ffffff;
  border-color: var(--brand-amber);
  box-shadow: 0 0 14px var(--brand-amber-glow);
}

.omni-search {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  position: relative;
}

.search-icon {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
  margin-left: 6px;
}

#omni-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 6px 0;
}

#omni-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

/* ─── MODAL OVERLAYS (MENU & TOOLS) ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { transform: scale(0.95) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-sheet-handle {
  display: none;
  width: 40px;
  height: 4px;
  border-radius: 9999px;
  background: var(--border-active);
  margin: 10px auto 4px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-amber);
  letter-spacing: 1px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.modal-nav-card, .modal-tools-card {
  width: 100%;
  max-width: 460px;
}

.modal-body {
  padding: 18px;
}

.section-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.category-pills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-pills-grid .pill {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.category-pills-grid .pill:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.category-pills-grid .pill.active {
  background: var(--brand-amber);
  color: #ffffff;
  border-color: var(--brand-amber);
  box-shadow: 0 4px 12px var(--brand-amber-glow);
}

.menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 18px 0;
}

.nav-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.nav-item:hover {
  border-color: var(--brand-amber);
  transform: translateX(4px);
}

.nav-item.active {
  border-color: var(--brand-amber);
  background: var(--brand-amber-light);
}

.nav-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--brand-amber);
  flex-shrink: 0;
}

.nav-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-title {
  font-size: 13.5px;
  font-weight: 750;
}

.nav-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

.badge-active {
  font-size: 9.5px;
  font-weight: 800;
  background: var(--brand-amber);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--pill-radius);
}

.nav-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Tools Modal */
.tool-section {
  margin-bottom: 20px;
}

.tool-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 4px;
}

.tool-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.scaler-buttons, .theme-toggle-wrapper {
  display: flex;
  gap: 6px;
}

.scale-btn, .theme-btn {
  flex: 1;
  padding: 9px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.scale-btn:hover, .theme-btn:hover {
  border-color: var(--brand-amber);
  color: var(--text-primary);
}

.scale-btn.active, .theme-btn.active {
  background: var(--brand-amber);
  color: #ffffff;
  border-color: var(--brand-amber);
}

.bank-card {
  background: linear-gradient(135deg, #18181c 0%, #121215 100%);
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bank-name {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand-amber);
  letter-spacing: 0.5px;
}

.bank-acc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
}

.bank-owner {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.bank-price {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* ─── FULLSCREEN RECIPE VIEW (100% DIRECT FULLSCREEN, ZERO DRAWER) ─── */
.recipe-fullscreen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-primary);
  z-index: 2500;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipe-fullscreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.985);
}

.fullscreen-container {
  max-width: 820px;
  min-height: 100%;
  margin: 0 auto;
  background: var(--bg-primary);
  padding-bottom: 90px;
  position: relative;
}

/* Floating Action Nav Bar */
.fullscreen-nav-bar {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.fullscreen-back-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 8px 14px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.fullscreen-back-btn i {
  font-size: 14px;
}

.fullscreen-back-btn:hover {
  background: var(--brand-amber);
  border-color: var(--brand-amber);
}

.fullscreen-back-btn:active {
  transform: scale(0.94);
}

.fullscreen-nav-actions {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.cook-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  box-shadow: 0 4px 14px var(--brand-amber-glow);
  transition: var(--transition);
}

.cook-btn i {
  font-size: 14px;
}

.cook-btn:hover {
  transform: translateY(-1px);
}

.cook-btn:active {
  transform: scale(0.95);
}

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 20, 0.75);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 12px;
  font-weight: 750;
  padding: 8px 13px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  transition: var(--transition);
}

.print-btn i {
  font-size: 14px;
}

.print-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Detail Hero */
.detail-hero {
  position: relative;
  width: 100%;
  height: 380px;
  background: var(--bg-elevated);
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary) 5%, rgba(9, 9, 11, 0.75) 45%, transparent 75%);
}

.detail-hero-info {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
}

.detail-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.detail-badge-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 800;
  background: var(--brand-amber);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.detail-badge-cat {
  font-size: 10.5px;
  font-weight: 750;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-title {
  font-size: 24px;
  font-weight: 850;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.detail-content {
  padding: 16px 18px 40px;
}

/* Compact Micro Meta (Swiss Leica Standard, Zero Emojis) */
.detail-micro-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 5px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--pill-radius);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.micro-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.micro-item i {
  color: var(--brand-amber);
  font-size: 13px;
}

.micro-item strong {
  color: var(--text-primary);
  font-weight: 750;
}

.micro-sep {
  color: var(--border-active);
  font-size: 11px;
}

/* ─── TABBED VIEW SEGMENTED CONTROLS ─── */
.recipe-tab-bar {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 20px;
}

.recipe-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.recipe-tab-btn i {
  font-size: 15px;
}

.recipe-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.recipe-tab-btn.active {
  background: var(--brand-amber);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--brand-amber-glow);
}

.recipe-tab-btn.hidden {
  display: none !important;
}

.recipe-tab-pane {
  display: none;
  animation: tabFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipe-tab-pane.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-pane-header {
  margin-bottom: 12px;
}

.tab-pane-header h3 {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sub-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Ingredients: Interactive Activation Cards */
.ing-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ing-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-amber);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 10px;
}

.ing-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-primary);
}

.ing-card:hover {
  border-color: var(--border-active);
  background: #1f1f24;
}

.ing-card:active {
  transform: scale(0.985);
}

.ing-indicator {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: transparent;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 11px;
}

.ing-card.activated {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.35);
}

.ing-card.activated .ing-indicator {
  background: var(--brand-amber);
  border-color: var(--brand-amber);
  color: #ffffff;
}

.ing-card.activated .ing-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Steps List */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-primary);
}

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  background: rgba(217, 119, 6, 0.15);
  color: var(--brand-amber);
  border: 1px solid rgba(217, 119, 6, 0.3);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-desc {
  flex: 1;
}

/* Tips Box */
.tips-box {
  padding: 16px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(217, 119, 6, 0.03) 100%);
  border: 1.5px solid var(--brand-amber);
  border-radius: 12px;
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-amber);
  margin-bottom: 6px;
}

.tips-header i {
  font-size: 16px;
}

#detail-notes-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── FULLSCREEN KITCHEN COOK MODE WITH 9:16 PORTRAIT VIDEO ─── */
.cook-mode-overlay {
  background: #000000 !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  z-index: 3000;
}

.cook-mode-container {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: 540px;
  margin: 0 auto;
  overflow-y: auto;
}

.cook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cook-exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 750;
  padding: 7px 14px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  transition: var(--transition);
}

.cook-exit-btn i {
  font-size: 14px;
}

.cook-exit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cook-wakelock-badge {
  font-size: 11px;
  color: #10b981;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.cook-wakelock-badge i {
  font-size: 14px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.cook-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: 4px 0 16px;
  width: 100%;
}

.cook-recipe-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-amber);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.cook-recipe-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  max-width: 95%;
  letter-spacing: -0.01em;
}

/* 9:16 Portrait Video Box */
.cook-video-box {
  width: 100%;
  max-width: 210px;
  margin: 0 auto 16px;
}

.cook-video-aspect {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 38vh;
  background: #121215;
  border: 1.5px solid #27272a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cook-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cook-video-player.hidden {
  display: none;
}

.cook-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1a1a20 0%, #0d0d10 100%);
  color: var(--text-muted);
  padding: 16px;
  text-align: center;
}

.cook-video-placeholder.hidden {
  display: none;
}

.video-play-pulse {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-amber);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 0 20px var(--brand-amber-glow);
}

.video-ratio-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--brand-amber);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.cook-youtube-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
}

.cook-youtube-player.hidden {
  display: none;
}

/* Detail Video Tab & Aspect */
.detail-video-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 10px 0 20px;
}

.detail-video-aspect {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 580px;
  background: #09090b;
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.detail-youtube-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.detail-youtube-player.hidden {
  display: none;
}

.detail-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1a1a20 0%, #0d0d10 100%);
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
}

.detail-video-placeholder.hidden {
  display: none;
}

.detail-playlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-amber);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--pill-radius);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  margin-top: 14px;
  box-shadow: 0 4px 16px var(--brand-amber-glow);
  transition: var(--transition);
}

.detail-playlist-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--brand-amber-glow);
}

/* Video badge on recipe card */
.card-video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(180, 83, 9, 0.92);
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.card-video-badge i {
  font-size: 9px;
}

/* Step Card */
.cook-card {
  background: #141418;
  border: 1.5px solid #27272a;
  border-radius: 16px;
  padding: 20px 18px;
  width: 100%;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cook-step-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-amber);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.cook-step-text {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
}

.cook-nav-bar {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.cook-nav-btn {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 750;
  cursor: pointer;
  background: #1e1e24;
  color: #a1a1aa;
  border: 1px solid #27272a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.cook-nav-btn i {
  font-size: 15px;
}

.cook-nav-btn.active {
  background: var(--brand-amber);
  color: #ffffff;
  border-color: var(--brand-amber);
  box-shadow: 0 8px 24px var(--brand-amber-glow);
}

/* ─── DEDICATED A4 PRINT SHEET (100% CWC MASTER BLUEPRINT) ─── */
#print-sheet {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm 9mm 5mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #ffffff !important;
    color: #18181b !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: static !important;
  }

  /* Completely eliminate any non-print elements from DOM layout flow */
  body > *:not(#print-sheet) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
  }

  /* Force dedicated A4 print sheet to start at (0,0) on Page 1 */
  #print-sheet {
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #18181b !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-page {
    width: 100% !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Masthead */
  .print-masthead {
    border-bottom: 1.5px solid #18181b;
    padding-bottom: 3px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .print-masthead-brand {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7.8pt;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #18181b;
    text-transform: uppercase;
  }

  .print-masthead-sub {
    font-size: 6.8pt;
    color: #71717a;
    margin-top: 1px;
  }

  .print-masthead-meta {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 7.2pt;
    color: #52525b;
  }

  .print-masthead-meta strong {
    color: #b45309;
    font-weight: 800;
  }

  .print-masthead-rights {
    font-size: 6pt;
    color: #a1a1aa;
    letter-spacing: 0.05em;
  }

  /* Hero Row */
  .print-hero-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    border-bottom: 1px solid #e4e4e7;
    padding-bottom: 5px;
  }

  .print-recipe-title {
    font-size: 15pt;
    line-height: 1.12;
    font-weight: 850;
    color: #18181b;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
    text-transform: uppercase;
  }

  .print-recipe-subhead {
    font-size: 7.5pt;
    color: #52525b;
    font-style: italic;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .print-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
  }

  .print-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fafaf9;
    border: 1px solid #e4e4e7;
    padding: 1.5px 5px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 6.8pt;
    color: #18181b;
  }

  .print-meta-label {
    color: #71717a;
    font-size: 6.2pt;
    font-weight: 700;
  }

  .print-hero-thumb {
    width: 100px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #d4d4d8;
    background: #f4f4f5;
  }

  .print-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 2-Column Recipe Grid */
  .print-recipe-grid {
    display: grid;
    grid-template-columns: 66mm 1fr;
    gap: 12px;
    flex: 1;
  }

  /* Column 1: Ingredients */
  .print-col-ingredients {
    border-right: 1px dashed #d4d4d8;
    padding-right: 8px;
  }

  .print-section-heading {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7.8pt;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b45309;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .print-section-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e4e7;
  }

  .print-sub-section {
    font-size: 7.2pt;
    font-weight: 800;
    color: #18181b;
    margin: 4px 0 2px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .print-ing-list {
    list-style: none;
    margin-bottom: 3px;
  }

  .print-ing-item {
    font-size: 7.2pt;
    line-height: 1.22;
    margin-bottom: 2px;
    display: flex;
    align-items: flex-start;
    gap: 4.5px;
    color: #27272a;
  }

  .print-checkbox {
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 1.2px solid #71717a;
    border-radius: 2px;
    margin-top: 1.5px;
    flex-shrink: 0;
  }

  /* Column 2: Steps */
  .print-col-steps {
    padding-left: 2px;
  }

  .print-step-group-title {
    font-size: 7.2pt;
    font-weight: 800;
    color: #18181b;
    margin-bottom: 2px;
    text-transform: uppercase;
  }

  .print-step-item {
    font-size: 7.4pt;
    line-height: 1.24;
    margin-bottom: 2.2px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    color: #18181b;
    break-inside: avoid;
  }

  .print-step-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 6pt;
    font-weight: 800;
    background: #27272a;
    color: #ffffff;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .print-step-text {
    flex: 1;
  }

  /* Tip Box */
  .print-tip-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 3px;
    padding: 4px 7px;
    margin-top: 4px;
    font-size: 6.9pt;
    line-height: 1.24;
    color: #78350f;
    break-inside: avoid;
  }

  .print-tip-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7pt;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5px;
    color: #b45309;
  }

  /* Footer */
  .print-footer {
    border-top: 1px solid #e4e4e7;
    padding-top: 4px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 6.2pt;
    color: #71717a;
    font-family: 'JetBrains Mono', monospace;
  }
}

/* ─── MOBILE BREAKPOINTS (<= 600px) ─── */
@media (max-width: 600px) {
  .floating-pill-bottom {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 18px);
  }

  .main-container {
    padding: 10px 8px 90px;
  }

  .recipe-grid.grid-2-col {
    gap: 8px;
  }

  .card-body {
    padding: 8px 10px 10px;
  }

  .card-title {
    font-size: 12px;
    font-weight: 750;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    width: 100%;
    animation: drawerSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

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

  .detail-hero {
    height: 270px;
  }

  .detail-title {
    font-size: 19px;
  }

  .detail-content {
    padding: 14px 12px 36px;
  }

  .recipe-tab-btn {
    font-size: 11px;
    padding: 9px 3px;
    gap: 4px;
  }

  .cook-video-box {
    max-width: 180px;
  }

  .cook-card {
    padding: 18px 14px;
    min-height: 120px;
  }

  .cook-step-text {
    font-size: 16px;
  }
}
