/* ==========================================
   LOCAL FONTS (100% OFFLINE SUPPORT)
   ========================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-400.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-800.ttf') format('truetype');
}

/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  --bg-primary: #FFFFFF;
  --bg-card: #FFFFFF;
  --accent: #FF5A36;
  --accent-hover: #E04B27;
  --accent-light: #FFEFEA;
  --text-main: #1A1A1A;
  --text-muted: #626262;
  --border-color: #ECEAE4;
  --border-dark: #1A1A1A;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);

  --card-ratio: 3 / 2;
  /* Default card image aspect ratio (3:2) */

  --header-height: 60px;

  /* Logo Badge Colors (Light Mode) */
  --logo-badge-bg: #FFFFFF;
  --logo-badge-border: #ECEAE4;
  --logo-badge-shadow: rgba(0, 0, 0, 0.06);
}


/* Dark Mode Theme Overrides */
body.dark-mode {
  --bg-primary: #121212;
  --bg-card: #1E1E1E;
  --text-main: #F5F5F5;
  --text-muted: #A5A5A5;
  --border-color: #2D2D2D;
  --border-dark: #F5F5F5;
  --accent-light: rgba(255, 90, 54, 0.16);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);

  /* Logo Badge Colors (Dark Mode) */
  --logo-badge-bg: #121212;
  --logo-badge-border: #2D2D2D;
  --logo-badge-shadow: rgba(0, 0, 0, 0.4);
}


body.dark-mode .header,
body.dark-mode .header-container,
body.dark-mode .header.scrolled,
body.dark-mode .header.scrolled .header-container {
  background-color: #121212 !important;
  border-bottom-color: #2D2D2D !important;
}

body.dark-mode .btn-mobile-search-toggle,
body.dark-mode .btn-theme-toggle {
  background-color: #1E1E1E !important;
  border-color: #2D2D2D !important;
  color: #F5F5F5 !important;
}

body.dark-mode .search-input-wrapper {
  background: transparent !important;
}

body.dark-mode .search-bar input {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  border-color: #333333 !important;
  border-radius: 6px !important;
}

body.dark-mode .header-container.search-expanded .search-input-wrapper {
  background-color: #1E1E1E !important;
  border-color: #333333 !important;
  border-radius: 4px !important;
}

body.dark-mode .side-nav {
  background-color: #181818;
}

body.dark-mode #shorts-view,
body.dark-mode .shorts-immersive-layout,
body.dark-mode .shorts-immersive-feed {
  background-color: #0A0A0A !important;
}

body.dark-mode .btn-shorts-back {
  background: rgba(30, 30, 30, 0.92);
  color: #FFFFFF;
  border-color: #333333;
}

body.dark-mode .hero-image-container {
  background-color: #1A1A1A;
}

body.dark-mode .gallery-nav-btn {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #F5F5F5;
}

body.dark-mode .gallery-nav-btn:hover {
  background: #F5F5F5;
  color: #121212;
}

body.dark-mode .thumb-btn {
  background-color: #2A2A2A;
  border-color: #333333;
}

body.dark-mode .thumb-btn.active {
  border-color: var(--accent);
}

body.dark-mode .recipe-media-container {
  background-color: var(--bg-card);
  border-bottom-color: #2D2D2D;
}

body.dark-mode .recipe-gallery-thumbs {
  background-color: var(--bg-card);
  border-bottom-color: #2D2D2D;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 4px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-theme-toggle:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: none;
}

.btn-theme-toggle .icon-sun {
  display: none !important;
}

.btn-theme-toggle .icon-moon {
  display: block !important;
}

body.dark-mode .btn-theme-toggle .icon-moon,
.btn-theme-toggle.is-dark .icon-moon {
  display: none !important;
}

body.dark-mode .btn-theme-toggle .icon-sun,
.btn-theme-toggle.is-dark .icon-sun {
  display: block !important;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*,
*:hover,
*:focus,
*:focus-visible,
*:active {
  outline: none !important;
}

html {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border-color);
  transition: all 0.3s ease;
}

.header.scrolled {
  background-color: rgba(250, 249, 246, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.header-container {
  width: 100%;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.header.scrolled .header-container {
  padding: 8px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-center {
  flex-grow: 1;
  display: flex;
  align-items: center;
  max-width: none;
  margin: 0 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--text-main);
  border: none;
  padding: 0;
  border-radius: 0;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  transform: none;
  opacity: 0.9;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: var(--logo-badge-bg);
  border: 1.5px solid var(--logo-badge-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: none;
  transition: none;
  flex-shrink: 0;
}

.logo:hover .logo-badge {
  transform: none;
  box-shadow: none;
}

.logo-badge .logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}



.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-text .accent-text {
  color: var(--accent);
  font-weight: 800;
}

/* User Avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Side */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  flex-grow: 0;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon-header {
  background: transparent;
  border: 1.5px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-header:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* Hide collapse cross icon button on desktop */
.btn-collapse-search {
  display: none !important;
}

/* Premium Search Bar */
.search-bar {
  flex-grow: 1 !important;
  width: 100% !important;
  max-width: none !important;
  transition: all 0.3s ease;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
}

.search-bar input {
  width: 100%;
  height: 38px;
  padding: 0 16px 0 48px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.035);
  border: 1.5px solid transparent;
  border-radius: 6px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-bar input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.search-bar input:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.search-bar input:focus {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: none !important;
  outline: none !important;
}

.search-bar input:focus+.search-icon {
  color: var(--accent);
  transform: translateY(-50%) scale(1.05);
}

/* ==========================================
   DESKTOP SEARCH SUGGESTIONS DROPDOWN
   ========================================== */
.desktop-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  min-width: 380px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  max-height: min(580px, 82vh);
  display: flex;
  flex-direction: column;
  animation: desktopSearchSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.desktop-search-dropdown,
.desktop-search-dropdown *,
.desktop-search-content,
.desktop-search-content * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.desktop-search-dropdown::-webkit-scrollbar,
.desktop-search-dropdown *::-webkit-scrollbar,
.desktop-search-content::-webkit-scrollbar,
.desktop-search-content *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
}

.desktop-search-dropdown::-webkit-scrollbar-thumb,
.desktop-search-dropdown *::-webkit-scrollbar-thumb,
.desktop-search-content::-webkit-scrollbar-thumb,
.desktop-search-content *::-webkit-scrollbar-thumb {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.desktop-search-dropdown::-webkit-scrollbar-track,
.desktop-search-dropdown *::-webkit-scrollbar-track,
.desktop-search-content::-webkit-scrollbar-track,
.desktop-search-content *::-webkit-scrollbar-track {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.desktop-search-dropdown::-webkit-scrollbar-button,
.desktop-search-dropdown *::-webkit-scrollbar-button,
.desktop-search-content::-webkit-scrollbar-button,
.desktop-search-content *::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

@media (max-width: 768px) {
  .desktop-search-dropdown {
    display: none !important;
  }
}

@keyframes desktopSearchSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.desktop-search-content {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(540px, 78vh);
  padding: 8px 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.desktop-search-section {
  padding: 8px 14px 4px 14px;
}

.desktop-search-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Keyword suggestions tags */
.desktop-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.desktop-search-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

body.dark-mode .desktop-search-tag {
  background: rgba(255, 255, 255, 0.06);
}

.desktop-search-tag:hover,
.desktop-search-tag.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.desktop-search-tag .tag-search-icon {
  color: var(--text-muted);
  stroke: currentColor;
  opacity: 0.75;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.desktop-search-tag:hover .tag-search-icon,
.desktop-search-tag.selected .tag-search-icon {
  color: var(--accent);
  stroke: var(--accent);
  opacity: 1;
}

/* Category pills */
.desktop-search-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.desktop-search-cat-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 90, 54, 0.08);
  color: var(--accent);
  border: 1px solid rgba(255, 90, 54, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.desktop-search-cat-chip:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Divider between sections */
.desktop-search-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 14px;
}

/* Recipe Results List */
.desktop-search-results-list {
  display: flex;
  flex-direction: column;
}

.desktop-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.desktop-search-item:hover,
.desktop-search-item.selected {
  background: rgba(0, 0, 0, 0.035);
  border-left-color: var(--accent);
}

body.dark-mode .desktop-search-item:hover,
body.dark-mode .desktop-search-item.selected {
  background: rgba(255, 255, 255, 0.05);
}

.desktop-search-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.desktop-search-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-search-item-title mark {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  padding: 0;
}

.desktop-search-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-search-item-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 1px 6px;
  border-radius: 4px;
}

.desktop-search-arrow {
  color: var(--text-muted);
  opacity: 0.6;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.desktop-search-item:hover .desktop-search-arrow,
.desktop-search-item.selected .desktop-search-arrow {
  transform: translateX(3px);
  color: var(--accent);
  opacity: 1;
}

/* Footer "View all results" */
.desktop-search-footer {
  padding: 9px 14px;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

body.dark-mode .desktop-search-footer {
  background: rgba(255, 255, 255, 0.02);
}

.desktop-search-footer:hover,
.desktop-search-footer.selected {
  background: var(--accent-light);
  color: var(--accent);
}

.desktop-search-footer strong {
  color: var(--accent);
}

.desktop-search-kbd {
  font-size: 10.5px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

body.dark-mode .desktop-search-kbd {
  background: rgba(255, 255, 255, 0.1);
}

/* Empty state */
.desktop-search-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.desktop-search-empty-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

/* ==========================================
   HAMBURGER MENU TOGGLE BUTTON
   (Hidden on desktop, visible on mobile only)
   ========================================== */
.btn-menu-toggle {
  display: none !important;
  background: transparent;
  border: 1.5px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: 4px;
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.btn-menu-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* ==========================================
   LEFT SIDEBAR NAVIGATION
   ========================================== */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 72px;
  height: 100vh;
  background-color: var(--bg-card);
  border-right: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  z-index: 90;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.side-nav::-webkit-scrollbar,
.side-nav *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.side-nav,
.side-nav * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.side-nav-header {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

/* On desktop, left sidebar always stays compact at 72px and never expands */
@media (min-width: 769px) {
  .side-nav,
  .side-nav.expanded,
  body.sidebar-expanded .side-nav {
    width: 72px !important;
    align-items: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .side-nav.expanded .side-nav-item,
  body.sidebar-expanded .side-nav .side-nav-item {
    flex-direction: column !important;
    width: 56px !important;
    font-size: 10.5px !important;
    text-align: center !important;
    gap: 4px !important;
    padding: 12px 8px !important;
  }

  body.sidebar-expanded .container {
    margin-left: max(72px, 72px + (100vw - 72px - var(--container-max-width)) / 2) !important;
    margin-right: max(0px, (100vw - 72px - var(--container-max-width)) / 2) !important;
  }

  body.sidebar-expanded h1 {
    font-size: inherit !important;
  }
}

.side-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  width: 56px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  white-space: nowrap;
  overflow: hidden;
}

/* Expanded item styles */
.side-nav.expanded .side-nav-item {
  flex-direction: row;
  width: 100%;
  gap: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  text-align: left;
}

.side-nav-item:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.03);
}

.side-nav-item.active {
  color: var(--accent);
  background-color: rgba(255, 90, 54, 0.08);
}

.side-nav-item.active svg {
  stroke: var(--accent);
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION
   ========================================== */
.bottom-nav {
  display: none;
  /* Hidden on desktop */
}

/* ==========================================
   LAYOUT CONTAINER
   ========================================== */
.container {
  --container-max-width: 1200px;
  width: auto;
  max-width: var(--container-max-width);
  margin-left: 72px;
  padding: 0 24px;
  box-sizing: border-box;
  transition: margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), margin-right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex: 1 0 auto;
  margin-bottom: 24px;
}

@media (min-width: 769px) {
  .container {
    padding: 0 56px;
    margin-left: max(72px, 72px + (100vw - 72px - var(--container-max-width)) / 2);
    margin-right: max(0px, (100vw - 72px - var(--container-max-width)) / 2);
  }
}

/* Fluid typography container query handles this automatically */

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
  margin-top: 32px;
}

.primary-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ==========================================
   CARDS (RECIPE DETAILS)
   ========================================== */
.card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  overflow: visible;
  box-shadow: none;
  transition: var(--transition);
}

/* Recipe Breadcrumb (inside header info, above title) */
.recipe-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 0 14px;
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 12px;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

/* Recipe Header Info (Title + Author + Rating above hero image) */
.recipe-header-info {
  padding: 32px 40px 16px;
  border-bottom: none;
}

.recipe-header-info h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

/* Author Byline (below title, above image) */
.recipe-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.byline-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s ease;
}

.byline-avatar:hover {
  transform: scale(1.08);
  border-color: var(--accent);
}

.byline-avatar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.byline-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.byline-prefix {
  color: var(--text-muted);
  font-weight: 400;
}

.byline-author-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.byline-author-link:hover {
  color: var(--accent-hover);
  opacity: 0.9;
}

.byline-separator {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 2px;
}

.byline-date {
  color: var(--text-muted);
  font-weight: 400;
}

/* Star Rating Row (filled/empty stars like NYT Cooking) */
.rating-stars-row {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-right: 4px;
  cursor: pointer;
}

.rating-star.filled {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.rating-star.half {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
}

.rating-star.empty {
  color: #D1D5DB;
  font-size: 18px;
  line-height: 1;
  opacity: 0.9;
  transition: color 0.2s ease;
}

body.dark-mode .rating-star.empty,
[data-theme="dark"] .rating-star.empty {
  color: #4B5563;
}

.rating-stars-row.is-unrated .rating-star.empty {
  color: #D1D5DB;
}

body.dark-mode .rating-stars-row.is-unrated .rating-star.empty,
[data-theme="dark"] .rating-stars-row.is-unrated .rating-star.empty {
  color: #4B5563;
}

.rating-stars-row.is-unrated:hover .rating-star.empty {
  color: var(--accent);
}

.recipe-rating-compact .rating-score {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.recipe-rating-compact .rating-score:hover {
  color: var(--accent);
}

.recipe-rating-compact .rating-count {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.recipe-rating-compact .rating-count:hover {
  color: var(--accent);
  text-decoration: underline;
}

.recipe-rating-compact .rating-count.is-unrated {
  color: var(--text-muted);
  font-size: 13.5px;
}

.recipe-rating-compact .rating-count.is-unrated:hover {
  color: var(--accent);
}

/* ==========================================
   RECIPE ACTION BAR (Save / Rate / Print / Share above image)
   ========================================== */
.recipe-actions-bar {
  display: inline-flex;
  align-items: stretch;
  background-color: #F6F4ED;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 4px;
  max-width: 100%;
}

body.dark-mode .recipe-actions-bar,
[data-theme="dark"] .recipe-actions-bar {
  background-color: #1E1E1E;
  border-color: #2D2D2D;
}

.recipe-actions-bar .action-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
  padding: 11px 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

/* 1. SAVE BUTTON */
.recipe-actions-bar #btnSave,
.recipe-actions-bar .btn-action-save {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  padding: 11px 22px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.recipe-actions-bar #btnSave:hover,
.recipe-actions-bar .btn-action-save:hover {
  background-color: var(--accent-hover) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

.recipe-actions-bar #btnSave.saved,
.recipe-actions-bar .btn-action-save.saved {
  background-color: #d13816 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

.recipe-actions-bar #btnSave .heart-icon,
.recipe-actions-bar .btn-action-save .heart-icon,
.recipe-actions-bar #btnSave svg.star-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  fill: #ffffff !important;
  stroke: #1a1a1a !important;
}

.recipe-actions-bar #btnSave.saved .heart-icon,
.recipe-actions-bar .btn-action-save.saved .heart-icon,
.recipe-actions-bar #btnSave.saved svg.star-icon {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* 2. DIVIDER */
.recipe-actions-bar .action-bar-divider {
  width: 1px;
  height: 22px;
  align-self: center;
  background-color: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

body.dark-mode .recipe-actions-bar .action-bar-divider,
[data-theme="dark"] .recipe-actions-bar .action-bar-divider {
  background-color: rgba(255, 255, 255, 0.14);
}

/* 3. ITEM BUTTONS (Rate, Print, Share) */
.recipe-actions-bar .btn-action-item,
.recipe-actions-bar #btnRate,
.recipe-actions-bar #btnPrint,
.recipe-actions-bar #btnShare {
  color: #1A1A1A !important;
  background: transparent;
}

.recipe-actions-bar .btn-action-item:hover,
.recipe-actions-bar #btnRate:hover,
.recipe-actions-bar #btnPrint:hover,
.recipe-actions-bar #btnShare:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--accent) !important;
}

body.dark-mode .recipe-actions-bar .btn-action-item,
body.dark-mode .recipe-actions-bar #btnRate,
body.dark-mode .recipe-actions-bar #btnPrint,
body.dark-mode .recipe-actions-bar #btnShare,
[data-theme="dark"] .recipe-actions-bar .btn-action-item,
[data-theme="dark"] .recipe-actions-bar #btnRate,
[data-theme="dark"] .recipe-actions-bar #btnPrint,
[data-theme="dark"] .recipe-actions-bar #btnShare {
  color: #F5F5F5 !important;
}

body.dark-mode .recipe-actions-bar .btn-action-item:hover,
body.dark-mode .recipe-actions-bar #btnRate:hover,
body.dark-mode .recipe-actions-bar #btnPrint:hover,
body.dark-mode .recipe-actions-bar #btnShare:hover,
[data-theme="dark"] .recipe-actions-bar .btn-action-item:hover,
[data-theme="dark"] .recipe-actions-bar #btnRate:hover,
[data-theme="dark"] .recipe-actions-bar #btnPrint:hover,
[data-theme="dark"] .recipe-actions-bar #btnShare:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--accent) !important;
}

.recipe-actions-bar .btn-text {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.recipe-actions-bar svg {
  flex-shrink: 0;
}

.card.recipe-detail {
  overflow: visible !important;
}

.card:hover {
  box-shadow: none;
}

/* Recipe Media Container (Single Main Hero Image) */
.recipe-media-container {
  display: block;
  width: 100%;
  padding: 12px 40px 10px;
  background-color: var(--bg-card);
  border-bottom: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Recipe Hero Image Container */
.hero-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--border-color);
  border-radius: 4px;
  box-shadow: none;
}

.recipe-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease-in-out;
  opacity: 1;
}

.card:hover .recipe-hero-img {
  transform: none;
}

/* Gallery Navigation Arrows */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.hero-image-container:hover .gallery-nav-btn,
.gallery-nav-btn:focus-visible {
  opacity: 1;
}

.gallery-nav-btn:hover {
  background: #FFFFFF;
  color: var(--accent);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

body.dark-mode .gallery-nav-btn {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #F5F5F5;
}

body.dark-mode .gallery-nav-btn:hover {
  background: #1E1E1E;
  color: var(--accent);
}

.prev-btn {
  left: 16px;
}

.next-btn {
  right: 16px;
}

/* Gallery Photo Counter Badge */
.gallery-photo-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  user-select: none;
  transition: opacity 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.gallery-photo-badge svg {
  stroke: #FFFFFF;
  flex-shrink: 0;
}

/* Gallery Dots Indicator */
.gallery-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-dots .dot:hover {
  background: rgba(255, 255, 255, 0.9);
}

.gallery-dots .dot.active {
  background: #FFFFFF;
  transform: scale(1.15);
  width: 18px;
  border-radius: 4px;
}

/* Horizontal Thumbnails Strip (Beneath Hero Image) */
.recipe-gallery-thumbs-wrapper {
  width: 100%;
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.recipe-gallery-thumbs {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  padding: 4px 6px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.recipe-gallery-thumbs::-webkit-scrollbar {
  height: 5px;
}

.recipe-gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.recipe-gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.thumb-btn {
  position: relative;
  flex: 0 0 auto;
  width: 76px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  background-color: var(--border-color);
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: none;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.2s ease;
  opacity: 0.8;
}

.thumb-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb-btn:hover img {
  opacity: 1;
}

.thumb-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgba(255, 90, 54, 0.25);
  transform: scale(1.04);
}

.thumb-btn.active img {
  opacity: 1;
}

.thumb-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.recipe-badges {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-tag {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* Card Body */
.card-body {
  padding: 8px 40px 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  width: fit-content;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.eyebrow:hover {
  opacity: 0.85;
  color: var(--accent-hover);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--accent);
}

h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 18px;
  transition: font-size 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Recipe Meta Grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  background-color: var(--bg-primary);
  overflow: hidden;
  margin-bottom: 32px;
}

.meta-item {
  padding: 16px;
  text-align: center;
  border-right: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-item:last-child {
  border-right: none;
}

.meta-item .val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.meta-item .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--text-main);
  color: var(--bg-card);
  border: 1.5px solid var(--text-main);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.02);
}

.btn-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-primary.saved {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.btn-primary.saved .star-icon {
  fill: currentColor;
}

/* Premium Recipe Actions Panel */
.recipe-actions-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  padding: 14px 20px;
  margin-bottom: 32px;
  box-shadow: none;
  transition: var(--transition);
}

.recipe-actions-panel:hover {
  box-shadow: none;
}

.recipe-actions-panel .main-actions {
  display: flex;
  flex: 1;
  gap: 12px;
}

/* Individual premium action buttons */
.recipe-actions-panel .main-actions .btn {
  flex: 1;
  /* Make all buttons same width */
  min-width: max-content;
  white-space: nowrap !important;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
}

/* Save button specific */
.recipe-actions-panel #btnSave {
  background: var(--bg-primary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.recipe-actions-panel #btnSave:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  background: var(--bg-card);
  box-shadow: none;
}

.recipe-actions-panel #btnSave.saved {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

.recipe-actions-panel #btnSave.saved .star-icon {
  fill: var(--accent);
}

/* Share & Like button specific */
.recipe-actions-panel #btnShare,
.recipe-actions-panel #btnLike {
  background: var(--bg-primary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.recipe-actions-panel #btnShare:hover {
  border-color: var(--text-main);
  background: var(--bg-card);
  box-shadow: none;
}

.recipe-actions-panel #btnLike:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: #FEF2F2;
  box-shadow: none;
}

.recipe-actions-panel #btnLike.liked {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #EF4444;
  box-shadow: none;
}

.recipe-actions-panel #btnLike.liked .heart-icon {
  fill: #EF4444;
  animation: heartPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Divider styling */
.recipe-actions-panel .divider {
  width: 1.5px;
  height: 32px;
  background-color: var(--border-color);
  align-self: center;
}

/* Social media shares container */
.recipe-actions-panel .social-shares {
  display: flex;
  gap: 10px;
}

/* Social Buttons */
.btn-social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-social svg {
  transition: transform 0.2s ease;
}

.btn-social:hover svg {
  transform: scale(1.15);
}

/* Brand specific styling & hovers */
.btn-pinterest {
  color: #E60023;
  background-color: #FFF0F2;
  border-color: #FFD6DC;
}

.btn-pinterest:hover {
  background-color: #E60023;
  border-color: #E60023;
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(230, 0, 35, 0.3);
  transform: translateY(-2px);
}

.btn-facebook {
  color: #1877F2;
  background-color: #EEF5FE;
  border-color: #D2E4FD;
}

.btn-facebook:hover {
  background-color: #1877F2;
  border-color: #1877F2;
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(24, 119, 242, 0.3);
  transform: translateY(-2px);
}

.btn-twitter {
  color: #000000;
  background-color: #F3F4F6;
  border-color: #E5E7EB;
}

.btn-twitter:hover {
  background-color: #000000;
  border-color: #000000;
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Icon animations */
.recipe-actions-panel .main-actions .btn svg {
  transition: opacity 0.2s ease;
}

.recipe-actions-panel .main-actions .btn:hover svg {
  transform: none;
}

/* Heart pop animation */
@keyframes heartPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

/* ==========================================
   RECIPE DETAIL COMPACT RATING & ACTIONS
   ========================================== */
.recipe-rating-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-main);
}

.recipe-actions-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  padding: 10px 14px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s ease;
}

.recipe-actions-panel:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.recipe-actions-panel .main-actions {
  display: flex;
  flex: 1;
  gap: 10px;
}

.recipe-actions-panel .main-actions .btn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
}

.recipe-actions-panel #btnSave {
  background: var(--bg-primary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.recipe-actions-panel #btnSave:hover,
.recipe-actions-panel #btnPrint:hover,
.recipe-actions-panel #btnShare:hover {
  border-color: var(--text-main);
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.recipe-actions-panel #btnSave.saved {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-light);
}

.recipe-actions-panel #btnSave.saved:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.recipe-actions-panel #btnSave.saved .star-icon {
  fill: var(--accent);
}

@media (max-width: 768px) {
  .recipe-actions-panel {
    padding: 10px;
    gap: 8px;
    margin-bottom: 20px;
  }

  .recipe-actions-panel .main-actions {
    gap: 8px;
  }

  .recipe-actions-panel .main-actions .btn {
    padding: 10px 8px;
    height: 42px;
    font-size: 13px;
    border-radius: 4px;
  }
}

/* ==========================================
   3-STAT META GRID (Prep | Cook | Difficulty)
   ========================================== */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 14px 0;
  margin-bottom: 28px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-right: 1.5px solid var(--border-color);
  text-align: center;
}

.meta-item:last-child {
  border-right: none;
}

.meta-item .val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.meta-item .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================
   STICKY NAVIGATION BAR & READING PROGRESS
   ========================================== */
.jumpnav-wrap {
  position: sticky;
  top: var(--header-height, 62px);
  z-index: 80;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-left: -40px;
  margin-right: -40px;
  width: calc(100% + 80px);
  padding: 2px 40px;
  box-sizing: border-box;
  overflow: hidden;
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

body.dark-mode .jumpnav-wrap {
  background-color: rgba(30, 30, 30, 0.96);
}

.jumpnav-wrap.is-scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.jumpnav {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  padding: 1px 0;
  box-sizing: border-box;
}

.jumpnav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.jumpnav a {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  user-select: none;
  border: 1.5px solid transparent;
  background-color: transparent;
  box-sizing: border-box;
}

.jumpnav a:hover {
  color: var(--text-main);
  background-color: var(--bg-primary);
  border-color: var(--border-color);
}

.jumpnav a.active {
  color: var(--accent);
  background-color: var(--accent-light);
  border-color: rgba(255, 90, 54, 0.3);
  font-weight: 700;
}

/* Tab item count badge */
.nav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-muted);
  border: 1.5px solid var(--border-color);
  transition: all 0.2s ease;
  line-height: 1;
}

.jumpnav a:hover .nav-count {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.jumpnav a.active .nav-count {
  background: rgba(255, 90, 54, 0.18);
  color: var(--accent);
  border-color: rgba(255, 90, 54, 0.4);
  font-weight: 800;
}

/* Numbered point indicator in TOC */
.nav-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.85;
  transition: all 0.2s ease;
}

.jumpnav a:hover .nav-num {
  color: var(--text-main);
  opacity: 1;
}

.jumpnav a.active .nav-num {
  color: var(--accent);
  font-weight: 800;
  opacity: 1;
}

/* Heading Number Styling */
.heading-num {
  color: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  margin-right: 6px;
}

/* Reading / scroll progress bar */
.jumpnav-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: transparent;
  overflow: hidden;
  pointer-events: none;
}

.jumpnav-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #FF8566);
  border-radius: 0 99px 99px 0;
  transition: width 0.08s linear;
}

/* ==========================================
   RECIPE SECTIONS
   ========================================== */
.recipe-sections {
  padding-top: 4px;
}

section.block {
  padding: 32px 0 24px 0;
  border-bottom: none;
  scroll-margin-top: 135px;
}

section.block:last-of-type {
  border-bottom: none;
}

section.block h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header h2 {
  margin-bottom: 0;
}

/* 1. OVERVIEW & WHY LOVE IT */
.overview-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 68ch;
}

.why-love-it-card {
  margin-top: 22px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  padding: 18px 22px;
}

.why-love-it-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.why-heart-icon {
  color: var(--accent);
}

.why-love-it-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.why-love-it-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.55;
}

.why-bullet-check {
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1.55;
}

/* 2. INGREDIENTS CHECKLIST & STEPPER */
.servings-stepper-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepper-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.servings-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 4px;
  gap: 6px;
}

.btn-stepper {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-stepper:hover {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.stepper-count {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--text-main);
}

.checklist-hint {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.ingredients-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ingredient-item {
  display: block;
  position: relative;
  padding: 3px 0 3px 18px;
  border: none !important;
  border-bottom: none !important;
  cursor: default;
  user-select: text;
  font-size: 15.5px;
  line-height: 1.5;
}

.ingredient-item:last-child {
  border-bottom: none !important;
}

.ingredient-check {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  display: inline-block;
  position: absolute;
  left: 0;
  top: 9px;
  margin: 0;
}

.ingredient-check svg {
  display: none !important;
}

.ingredient-item .ingredient-qty,
.ingredient-item .qty {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  display: inline;
  margin-right: 5px;
}

.ingredient-item .ingredient-qty:empty,
.ingredient-item .qty:empty {
  display: none;
}

.ingredient-item .ingredient-name,
.ingredient-item .name {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 400;
  color: var(--text-main);
  display: inline;
}


/* 3. INSTRUCTIONS - CLEAN MINIMALIST LIST */
.serving-tag,
.steps-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  background-color: var(--bg-primary);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.instructions-steps-wrap,
.instructions-clean-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 12px 0 0 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-card-item,
.instruction-clean-item,
.step-item {
  list-style: none !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px 0 !important;
  border-bottom: none !important;
  cursor: default !important;
  user-select: text !important;
  gap: 12px !important;
}

.step-card-item:last-child,
.instruction-clean-item:last-child,
.step-item:last-child {
  border-bottom: none !important;
  padding-bottom: 8px !important;
}

.step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-badge-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.step-num-badge {
  font-family: var(--font-mono) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  background: var(--accent-light) !important;
  padding: 3px 9px !important;
  border-radius: 4px !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  flex-shrink: 0 !important;
}

.step-card-title {
  font-family: var(--font-display) !important;
  font-size: 16.5px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* Step Interactive Timer Button */
.step-timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1.5px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  outline: none;
}

.step-timer-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.step-timer-btn.running {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  animation: timerPulse 2s infinite ease-in-out;
}

.step-timer-btn.running svg {
  animation: timerSpin 3s linear infinite;
}

.step-timer-btn.finished {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
}

@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255, 90, 54, 0); }
}

@keyframes timerSpin {
  100% { transform: rotate(360deg); }
}


.step-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.step-card-text {
  width: 100%;
}

.step-card-text .step-instruction-text,
.step-instruction-text {
  font-family: var(--font-sans) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
}

.step-card-media {
  width: 100%;
  max-width: 100%;
}

.step-image-frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 480px;
  border-radius: 4px;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
}

.step-image-frame img,
.step-image-frame .step-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 680px) {
  .step-card-body {
    gap: 14px;
  }

  .step-image-frame {
    max-height: 320px;
  }
}

/* 4. NUTRITION SECTION */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.nutrition-card {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 16px 10px;
  text-align: center;
  min-width: 0;
}

.nutrition-card .value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.nutrition-card .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
  display: block;
}

/* NUTRITION TOGGLE BUTTON */
.nutrition-toggle-wrap {
  display: flex;
  align-items: center;
  margin-top: 14px;
}

.btn-nutrition-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.btn-nutrition-toggle:hover {
  color: var(--accent-hover);
}

.btn-nutrition-toggle:hover span {
  text-decoration: underline;
}

.nutrition-toggle-arrow {
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-nutrition-toggle.is-active .nutrition-toggle-arrow {
  transform: rotate(180deg);
}

/* FULL NUTRITION BREAKDOWN CARD (FDA STYLE) */
.full-nutrition-card {
  display: none;
  width: 100%;
  margin-top: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 22px 26px;
  box-sizing: border-box;
}

.full-nutrition-card.is-visible {
  display: block;
  animation: fadeInNutrition 0.25s ease forwards;
}

@keyframes fadeInNutrition {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.full-nutrition-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.nut-dv-header-row {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border-color);
}

.nut-dv-header {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.full-nutrition-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

.nut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
  box-sizing: border-box;
}

.nut-row:last-child {
  border-bottom: 1px solid var(--border-color);
}

.nut-item-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.nut-name {
  color: var(--text-main);
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 15px;
  white-space: nowrap;
}

.nut-val {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-main);
  font-size: 15px;
  white-space: nowrap;
}

.nut-dv {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-main);
  text-align: right;
  white-space: nowrap;
  font-size: 15px;
  min-width: 36px;
}

.nut-footnote {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 12px 0 0 0;
  padding-top: 4px;
}

@media (max-width: 680px) {
  .full-nutrition-card {
    padding: 16px 14px;
  }

  .nut-row {
    padding: 8.5px 0;
    gap: 8px;
    font-size: 13.5px;
  }

  .nut-name,
  .nut-val,
  .nut-dv,
  .nut-dv-header {
    font-size: 13.5px;
  }
}

/* 5. QUESTIONS & COMMUNITY */
.community-rating-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 6px;
}

.community-summary-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  gap: 16px;
}

.score-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.big-score {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.score-stars {
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.score-count {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1;
}

.community-actions-col {
  display: flex;
  align-items: center;
}

.btn-community-write {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  height: 38px;
  border-radius: 6px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.btn-community-write:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
  transform: translateY(-1px);
}

.btn-community-write.already-reviewed {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-community-write.already-reviewed:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
  transform: translateY(-1px);
}

.composer-word-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 2px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
}

.btn-community-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-community-act:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-community-act.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.community-composer-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 24px;
  animation: fadeIn 0.25s ease;
}

.composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.composer-header h4 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.btn-close-composer {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-close-composer:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.rating-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.picker-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.interactive-stars {
  display: flex;
  gap: 4px;
}

.star-pick {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--border-color);
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-pick.active,
.star-pick:hover {
  color: var(--accent);
}

/* Remove scrollbars from textareas and inputs */
textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"] {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
textarea::-webkit-scrollbar,
input::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.composer-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
  resize: vertical;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.composer-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.composer-word-counter {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-submit-comment {
  padding: 8px 20px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.community-thread {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.community-empty-state {
  text-align: center;
  padding: 38px 24px;
  background: var(--bg-primary);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0;
}

.community-empty-state .empty-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.community-empty-state .empty-state-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
}

.community-empty-state .empty-state-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.55;
}

.community-empty-state .btn-first-review {
  margin-top: 6px;
  padding: 9px 22px;
  font-size: 13.5px;
  border-radius: 6px;
  font-weight: 600;
  background-color: var(--accent);
  color: #FFFFFF;
  border: 1.5px solid var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.community-empty-state .btn-first-review:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 90, 54, 0.28);
}

.comment-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 18px 20px;
}

.comment-card.is-own-review {
  position: relative;
}

.your-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--border-color);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-family: var(--font-sans);
}

.comment-main {
  display: flex;
  gap: 14px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-primary);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.comment-content {
  flex: 1;
}

.comment-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  width: 100%;
}

.comment-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.25;
  word-break: break-word;
}

.comment-rating-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

.user-rating-wrap {
  display: inline-flex;
  align-items: center;
}

.user-rating {
  color: var(--accent);
  font-size: 12.5px;
  letter-spacing: 1px;
  line-height: 1;
}

.comment-time-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.verified-cook-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.comment-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  padding-top: 1px;
  margin-left: auto;
}

.comment-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 10px;
}

.comment-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  width: 100%;
}

.btn-vote-helpful,
.btn-comment-reply,
.btn-comment-edit,
.btn-comment-delete {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.btn-vote-helpful svg,
.btn-comment-reply svg,
.btn-comment-edit svg,
.btn-comment-delete svg {
  flex-shrink: 0;
}

.btn-vote-helpful .vote-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
}

.btn-vote-helpful:hover,
.btn-comment-reply:hover,
.btn-comment-edit:hover {
  color: var(--accent);
  background: var(--bg-card);
}

.btn-comment-delete:hover {
  color: #e53e3e;
  background: rgba(229, 62, 62, 0.08);
}

.btn-vote-helpful.voted {
  color: var(--accent);
  font-weight: 700;
}

.btn-toggle-replies {
  background: var(--accent-light);
  border: 1px solid rgba(255, 90, 54, 0.25);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.btn-toggle-replies:hover {
  background: rgba(255, 90, 54, 0.22);
  border-color: var(--accent);
}

.btn-toggle-replies svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-toggle-replies.active svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   REVIEW REPLIES (THREADED / INLINE)
   ========================================================================== */
.comment-replies-list {
  margin-top: 14px;
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-reply-card,
.author-reply-card,
.reply-card,
.comment-card.reply-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px;
  margin-top: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.comment-reply-card:hover,
.author-reply-card:hover,
.reply-card:hover,
.comment-card.reply-card:hover {
  border-color: var(--border-color) !important;
  box-shadow: none !important;
}

.author-reply-card {
  border-left: 3px solid var(--accent) !important;
  background: var(--bg-card);
}

.comment-reply-avatar,
.author-reply-avatar,
.comment-card.reply-card .comment-avatar {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.author-reply-avatar {
  border-color: var(--accent) !important;
}

.comment-reply-avatar img,
.author-reply-avatar img,
.comment-card.reply-card .comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comment-reply-content,
.author-reply-content,
.comment-card.reply-card .comment-content {
  flex: 1;
  min-width: 0;
}

.comment-reply-header,
.author-reply-header,
.comment-card.reply-card .comment-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  margin-bottom: 6px !important;
  width: 100%;
  flex-wrap: wrap;
}

.comment-reply-user-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reply-user-name,
.author-name,
.comment-card.reply-card .user-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.25;
}

.author-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.reply-target-badge {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reply-target-badge strong {
  color: var(--accent);
  font-weight: 600;
}

.reply-time,
.comment-card.reply-card .comment-time {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.comment-reply-text,
.author-reply-text,
.comment-card.reply-card .comment-text {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-main);
  margin: 0 0 6px 0 !important;
  word-break: break-word;
}

/* INLINE REPLY COMPOSER BOX */
.inline-reply-box {
  margin-top: 14px;
  margin-left: 28px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.reply-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.replying-to-label {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.reply-target-tag {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-light);
  padding: 2px 7px;
  border-radius: 6px;
}

.btn-cancel-reply-x {
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-cancel-reply-x:hover {
  color: var(--text-main);
  background: var(--bg-primary);
}

.reply-box-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-textarea {
  width: 100%;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  background: var(--bg-primary);
  color: var(--text-main);
  box-sizing: border-box;
  resize: vertical;
  min-height: 54px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.reply-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}

.reply-box-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-cancel-reply-text {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-cancel-reply-text:hover {
  color: var(--text-main);
  background: var(--bg-primary);
}

.btn-submit-reply {
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit-reply:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   REVIEWS & REPLIES LAZY-LOADING SKELETON UI & SHIMMER ANIMATION
   ========================================================================== */
.reviews-loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.skeleton-comment-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-sizing: border-box;
}

.skeleton-reply-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-sizing: border-box;
  width: 100%;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-avatar.reply {
  width: 34px;
  height: 34px;
}

.skeleton-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
}

.skeleton-line.short {
  width: 30%;
  max-width: 120px;
}

.skeleton-line.mid {
  width: 60%;
}

.skeleton-line.mini {
  width: 20%;
  max-width: 80px;
  height: 10px;
}

.skeleton-line.text {
  width: 92%;
}

/* Modern Shimmer Wave Effect */
@keyframes spoteliShimmerWave {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    var(--border-color) 0%,
    rgba(255, 255, 255, 0.75) 50%,
    var(--border-color) 100%
  );
  background-size: 200% 100%;
  animation: spoteliShimmerWave 1.6s ease-in-out infinite;
}

[data-theme="dark"] .skeleton-shimmer,
body.dark-mode .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.13) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
}

.replies-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* ========================================================
   RECIPE CARD SKELETON UI & PROGRESSIVE LOADING
   ======================================================== */
.pin-skeleton {
  pointer-events: none;
  cursor: default;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.pin-skeleton .pin-img-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: var(--card-ratio);
  background-color: var(--border-color);
}

.pin-skeleton .pin-info {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  gap: 8px;
}

.pin-skeleton .skeleton-title {
  width: 78%;
  height: 16px;
  border-radius: 4px;
}

.pin-skeleton .skeleton-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.pin-skeleton .skeleton-tag {
  width: 35%;
  height: 12px;
  border-radius: 4px;
}

.pin-skeleton .skeleton-badge {
  width: 20%;
  height: 12px;
  border-radius: 4px;
}

body.dark-mode .pin-skeleton .pin-img-wrapper,
[data-theme="dark"] .pin-skeleton .pin-img-wrapper {
  background-color: rgba(255, 255, 255, 0.06);
}

.fade-in {
  animation: spoteliFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spoteliFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .comment-replies-list {
    margin-left: 12px;
    padding-left: 10px;
  }

  .inline-reply-box {
    margin-left: 12px;
    padding: 10px 12px;
  }
}

/* COMMUNITY TOOLBAR & FILTER TABS */
.community-toolbar {
  margin-bottom: 20px;
}

.community-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-community-filter {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-community-filter:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.btn-community-filter.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(255, 90, 54, 0.4);
  font-weight: 700;
}

/* COMMUNITY LOAD MORE BUTTON */
.community-load-more-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.btn-load-more-comments {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-load-more-comments:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.bottom-feed-wrapper {
  margin-top: 48px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-dark);
  padding-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
  /* ensures responsiveness on tablet/mobile */
}

.feed-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ratio-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ratio-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.ratio-buttons {
  display: flex;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.btn-ratio {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.btn-ratio:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.03);
}

.btn-ratio.active {
  color: var(--bg-card);
  background-color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feed-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.feed-subtitle-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Unified Pins Grid */
.pins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}



/* Individual Pin Design (Modern Feed Card - Static, No Hover Transform/Border) */
.pin,
.pin:hover,
.pin:focus,
.pin:active,
.pin:visited {
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  container-type: inline-size;
  text-decoration: none !important;
}

.pin-img-wrapper,
.pin-img-wrapper:hover,
.pin:hover .pin-img-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--border-color);
  border-radius: 6px;
  aspect-ratio: var(--card-ratio);
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  transform: none !important;
}

.pin-img,
.pin-img:hover,
.pin:hover .pin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: none !important;
  outline: none !important;
  transform: none !important;
}

/* Time Overlay Badge (Top Left) */
.pin-badge-time {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.01em;
}

.pin-badge-time svg {
  fill: #FFD600;
  color: #FFD600;
  flex-shrink: 0;
}

/* Time Overlay Badge (Bottom Right Brand Orange Pill) */
.pin-badge-rating {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(255, 90, 54, 0.35);
}

.pin-badge-rating svg {
  stroke: #FFFFFF;
  color: #FFFFFF;
  flex-shrink: 0;
}

.pin-info {
  padding: 10px 4px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.pin-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 4.8cqw, 18px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.pin:hover .pin-title {
  color: var(--text-main);
}

.pin-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

.pin-cuisine {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.pin-saves {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.85;
}

.pin-saves.liked {
  color: #EF4444;
}

.pin-saves svg {
  color: var(--accent);
  fill: var(--accent);
}

.pin-saves.liked svg {
  color: #EF4444;
  fill: #EF4444;
}

.pin-rating {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
}

.pin-rating svg,
.pin-rating .pin-star-icon {
  color: var(--accent);
  fill: var(--accent);
  flex-shrink: 0;
}

.pin-rating-new {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.85;
}

.pin-review-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 1px;
}

/* ==========================================
   SIDEBAR (DESKTOP MODE)
   ========================================== */
.sidebar-layout {
  width: 100%;
  align-self: stretch;
  /* Stretch sidebar layout to the full height of the row */
}

.sidebar {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-sticky-wrapper {
  height: 100%;
  /* Enable height boundary for child sticky widgets to slide */
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar Info Widgets */
.sidebar-widget {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  padding: 24px;
  box-shadow: none;
  transition: none;
}

.sidebar-widget:hover {
  box-shadow: none;
  border-color: var(--border-color);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
  transition: none;
}

.sidebar-widget:hover .widget-title {
  border-color: var(--border-color);
}

/* Author Widget Details */
.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  user-select: none;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s ease;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.author-info-link:hover .author-avatar {
  transform: scale(1.06);
  border-color: var(--accent);
}

.author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-main);
  display: block;
}

.author-title {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.author-bio {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Kitchen Tools List */
.tools-list {
  list-style: none;
}

.tools-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.tools-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tool-icon {
  color: var(--accent);
  flex-shrink: 0;
}

/* Dietary Tag Pills */
.dietary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diet-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.dietary-tags a:hover .diet-tag,
.diet-tag:hover {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: rgba(255, 90, 54, 0.35);
  transform: none;
}

/* Sidebar Compact Related Recipes Grid (.visuals-grid) */
.visuals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.visuals-grid .pin {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.visuals-grid .pin-img-wrapper {
  border-radius: 4px;
  aspect-ratio: var(--card-ratio);
}

.visuals-grid .pin-img {
  border-radius: 4px;
}

.visuals-grid .pin-badge-rating {
  bottom: 6px;
  right: 6px;
  font-size: 10px;
  padding: 2px 6px;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(255, 90, 54, 0.25);
}

.visuals-grid .pin-badge-rating svg {
  width: 9px;
  height: 9px;
}

.visuals-grid .pin-info {
  padding: 6px 0 0 0;
  gap: 2px;
}

.visuals-grid .pin-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-line-clamp: 2;
}

.visuals-grid .pin-sub-row {
  margin-top: 1px;
}

.visuals-grid .pin-cuisine {
  font-size: 11px;
}

.visuals-grid .pin-saves {
  font-size: 10px;
}

.diet-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
}

/* ==========================================
   MORE VISUALS — 2×2 PIN GRID (SIDEBAR)
   ========================================== */
.visuals-widget {
  position: sticky;
  top: 80px;
  z-index: 10;
  padding: 12px;
  /* Reduced from 24px to give recipe cards more horizontal space */
}

.visuals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  /* Reduced from 12px */
}

/* Compact overrides for pin cards inside the sidebar */
.visuals-grid .pin-info {
  padding: 8px;
  /* Reduced from 10px */
  gap: 4px;
}

.visuals-grid .pin-title {
  font-size: 12px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: auto;
}

.visuals-grid .pin-tag {
  font-size: 9px !important;
}

.visuals-grid .pin-meta {
  font-size: 10px !important;
  padding-top: 6px;
}

/* Collapsible Recipe Content Toggle */
.collapsible-recipe-content {
  display: none;
}

.recipe-detail.expanded .collapsible-recipe-content {
  display: block;
}

.recipe-detail.expanded .expand-btn-wrapper {
  display: none;
}

.expand-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.btn-expand {
  width: auto;
  background-color: var(--bg-primary);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-expand:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.12);
}

.btn-expand .chevron-icon {
  transition: transform 0.3s ease;
}

.recipe-detail.expanded .btn-expand .chevron-icon {
  transform: rotate(180deg);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1.5px solid var(--border-color);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */

/* Tablet view styling */
@media (max-width: 1100px) {
  .header-nav {
    display: none;
    /* Hide navigation links to fit logo and search bar properly */
  }

  .recipe-media-container {
    flex-direction: column;
    gap: 16px;
  }

  .recipe-gallery-thumbs {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  /* Keep 2-column layout on desktop/laptop down to 850px */
}

@media (max-width: 850px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sidebar-layout {
    border-top: 1.5px solid var(--border-color);
    padding-top: 32px;
  }

  .sidebar-sticky-wrapper {
    position: static;
  }

  .bottom-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Small screens: Mobile view */
@media (max-width: 768px) {

  /* MOBILE 100% WIDTH REQUIREMENT
     Remove left and right padding to occupy full width edge-to-edge. */
  .container {
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    /* Remove sidebar offset on mobile */
  }

  /* Keep page content and headings completely static when mobile sidebar drawer opens (no jumping or size changes) */
  body.sidebar-expanded .container,
  body.sidebar-expanded .view-container,
  body.sidebar-expanded .main-layout,
  body.sidebar-expanded .primary-content {
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
  }

  body.sidebar-expanded h1,
  body.sidebar-expanded h2,
  body.sidebar-expanded h3,
  body.sidebar-expanded .recipe-header-info h1,
  body.sidebar-expanded .page-title {
    font-size: 26px !important;
    line-height: 1.22 !important;
    transform: none !important;
  }

  /* Show hamburger button on mobile */
  .btn-menu-toggle {
    display: flex !important;
  }

  /* Slide-in sidebar drawer on mobile */
  .side-nav,
  .side-nav.expanded,
  body.sidebar-expanded .side-nav {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px !important;
    max-width: 85vw;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 1050;
    flex-direction: column;
    align-items: stretch !important;
    padding: 0 !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .side-nav {
    transform: translateX(-100%);
  }

  /* When sidebar is expanded/open on mobile */
  .side-nav.expanded,
  body.sidebar-expanded .side-nav {
    transform: translateX(0);
  }

  /* Mobile sidebar top header */
  .side-nav-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 64px;
    padding: 0 16px 0 20px;
    border-bottom: 1.5px solid var(--border-color);
    margin-bottom: 8px;
    flex-shrink: 0;
  }

  .side-nav-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .side-nav-header .logo-text {
    display: inline-block !important;
    font-size: 18px;
  }

  .btn-close-sidebar {
    margin-left: auto;
    background: transparent;
    border: 1.5px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .btn-close-sidebar:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: var(--accent-light);
  }

  /* Mobile item layout inside drawer */
  .side-nav-item,
  .side-nav.expanded .side-nav-item {
    flex-direction: row;
    width: 100%;
    gap: 14px;
    padding: 14px 20px;
    font-size: 15px;
    text-align: left;
    border-radius: 0;
  }

  /* Backdrop overlay for mobile drawer */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-backdrop.active,
  body.sidebar-expanded .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }



  /* Disable header scroll animations on mobile for crisp, clear scrolling */
  .header,
  .header-container,
  .header.scrolled,
  .header.scrolled .header-container {
    transition: none !important;
    animation: none !important;
    background-color: var(--bg-primary) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    margin-left: 0;
  }

  .header-container {
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .btn-menu-toggle {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .logo {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .logo-badge {
    width: 36px !important;
    height: 36px !important;
    border-radius: 4px !important;
  }

  .logo-text {
    display: inline-block !important;
    font-size: 19px !important;
    font-family: var(--font-display) !important;
    font-weight: 800 !important;
  }

  .header-center {
    display: none !important;
  }

  .btn-collapse-search {
    display: none;
  }

  /* Expanding Header Search Bar on Mobile */
  .header-container.search-expanded .header-left,
  .header-container.search-expanded .header-right {
    display: none !important;
  }

  .header-container.search-expanded .header-center {
    display: flex !important;
    width: 100% !important;
    flex-grow: 1 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .header-container.search-expanded .search-bar {
    display: flex !important;
    width: 100% !important;
    flex-grow: 1 !important;
  }

  .header-container.search-expanded .search-input-wrapper {
    display: flex !important;
    width: 100% !important;
    height: 44px !important;
    border-radius: 4px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    padding: 0 10px 0 14px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
  }

  .header-container.search-expanded .search-input-wrapper input {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 16px !important;
    background: transparent !important;
    color: var(--text-main) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .header-container.search-expanded .btn-collapse-search {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .header-container.search-expanded .btn-collapse-search:hover {
    color: var(--accent);
  }

  .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  .btn-mobile-search-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 4px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: var(--transition) !important;
  }

  .user-avatar,
  .avatar-img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 4px !important;
  }

  .view-container,
  .main-layout,
  .primary-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .main-layout {
    margin-top: 0;
    gap: 0;
  }

  /* Make cards occupy full width on mobile with no border/radius for bleed effect */
  .card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .recipe-media-container {
    display: flex;
    flex-direction: column;
    padding: 6px 16px 6px;
    border-bottom: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .gallery-nav-btn {
    opacity: 1;
    /* Always show navigation arrows on touch screens */
    width: 36px;
    height: 36px;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .recipe-gallery-thumbs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
    background-color: transparent;
    border-bottom: none;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .recipe-gallery-thumbs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .thumb-btn {
    flex: 0 0 auto;
    width: 68px;
    height: 50px;
    border-radius: 6px;
  }

  .gallery-photo-badge {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 4px 10px;
  }

  .hero-image-container {
    border-radius: 8px;
    aspect-ratio: 3 / 2;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .recipe-breadcrumb {
    padding: 0 0 10px;
    font-size: 12px;
  }

  .breadcrumb-current {
    max-width: 180px;
  }

  .recipe-header-info {
    padding: 20px 16px 12px;
    border-bottom: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .recipe-actions-bar {
    display: flex;
    width: 100%;
    margin-top: 16px;
    box-sizing: border-box;
  }

  .recipe-actions-bar .action-bar-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 4px;
    font-size: 11px;
    letter-spacing: 0.03em;
    gap: 5px;
  }

  .recipe-actions-bar #btnSave,
  .recipe-actions-bar .btn-action-save {
    padding: 10px 6px;
  }

  .recipe-actions-bar svg {
    width: 13px;
    height: 13px;
  }

  .recipe-byline {
    font-size: 13px;
  }

  .rating-star.filled,
  .rating-star.half,
  .rating-star.empty {
    font-size: 16px;
  }

  .card-body {
    padding: 6px 16px 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  h1,
  .recipe-header-info h1 {
    font-size: 26px;
    line-height: 1.22;
    margin-bottom: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .meta-grid {
    grid-template-columns: repeat(3, 1fr);
    border-radius: 8px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 0;
  }

  .meta-item {
    border-right: 1.5px solid var(--border-color) !important;
    border-top: none !important;
    padding: 4px 6px !important;
  }

  .meta-item:last-child {
    border-right: none !important;
  }

  /* Sticky Jump Navigation on Mobile - Full bleed touch scroll without page overflow */
  .jumpnav-wrap {
    display: block !important;
    position: sticky !important;
    top: var(--header-height, 56px) !important;
    z-index: 80 !important;
    background-color: var(--bg-card) !important;
    border-top: 1.5px solid var(--border-color) !important;
    border-bottom: 1.5px solid var(--border-color) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
    max-width: 100vw !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.dark-mode .jumpnav-wrap {
    background-color: rgba(30, 30, 30, 0.96) !important;
  }

  .jumpnav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    touch-action: pan-x pan-y !important;
  }

  .jumpnav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .jumpnav a {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 6px 13px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    border: 1.5px solid transparent !important;
    background-color: transparent !important;
    user-select: none !important;
    transition: var(--transition) !important;
    transform: none !important;
  }

  .jumpnav a:hover,
  .jumpnav a:active {
    color: var(--text-main) !important;
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
  }

  .jumpnav a.active {
    color: var(--accent) !important;
    background-color: var(--accent-light) !important;
    border-color: rgba(255, 90, 54, 0.3) !important;
    font-weight: 700 !important;
  }

  .jumpnav-progress-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2.5px !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  section.block {
    padding: 24px 0 20px 0;
    scroll-margin-top: 115px;
    /* Offset so section headings are not hidden under fixed mobile header and sticky jumpnav */
  }

  /* Ingredients mobile view */
  .ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Nutrition mobile grid - 2 by 2 */
  .nutrition-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nutrition-card {
    min-width: 0 !important;
    padding: 14px 10px !important;
    box-sizing: border-box !important;
  }

  .nutrition-card .value {
    font-size: clamp(18px, 5vw, 22px) !important;
    white-space: nowrap !important;
  }

  .nutrition-card .label {
    font-size: clamp(9.5px, 2.5vw, 11px) !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Community summary box on mobile */
  .community-summary-box {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 8px;
    gap: 14px;
    margin-bottom: 20px;
  }

  .score-col {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .big-score {
    font-size: 26px;
    line-height: 1;
  }

  .score-stars {
    font-size: 15px;
    line-height: 1;
  }

  .score-count {
    font-size: 13px;
    line-height: 1;
  }

  .community-actions-col {
    width: 100%;
  }

  .btn-community-write {
    width: 100%;
    height: 42px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    justify-content: center;
  }

  .community-composer-card {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
  }

  .composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .comment-card {
    padding: 15px 16px;
    border-radius: 8px;
  }

  .comment-main {
    gap: 12px;
  }

  .comment-avatar {
    width: 38px;
    height: 38px;
  }

  /* Feed container adjustments on mobile */
  .sidebar-layout {
    padding: 32px 16px;
  }

  .bottom-feed-wrapper {
    padding: 12px 16px 32px 16px;
    margin-top: 0;
  }

  .explore-feed-section {
    padding: 24px 16px 0 16px;
  }

  .pin-info {
    padding: 12px;
  }

  .pin-title {
    font-size: 14px;
  }

  .ratio-label {
    display: none;
    /* Hide Card Ratio: label on mobile */
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-top: 28px;
    padding: 0 16px 32px 16px;
    box-sizing: border-box;
  }

  /* Profile panel mobile spacing */
  .profile-header-card {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  .profile-tabs-wrapper {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }

  .profile-feed-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ==========================================
   SMALL DESKTOP & TABLET OPTIMIZATIONS
   ========================================== */

/* Small Desktop Layout Adjustments (769px - 1366px) */
@media (max-width: 1366px) and (min-width: 851px) {
  .container {
    --container-max-width: 1180px;
    padding: 0 48px;
  }

  .main-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
  }
}

/* Jumpnav Navigation Tabs Adaptability (Tablet & Medium Screens) */
@media (max-width: 1024px) and (min-width: 769px) {
  .jumpnav {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 2px 0 !important;
  }

  .jumpnav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .jumpnav a {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }
}

/* Sidebar Visuals Grid - Tablet (768px - 1100px) */
@media (max-width: 1100px) {
  .visuals-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

/* Sidebar Visuals Grid - Mobile */
@media (max-width: 768px) {
  .visuals-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Heading & Typography Scaling */
@media (max-width: 1200px) and (min-width: 769px) {
  h1 {
    font-size: 34px;
  }

  .meta-item {
    padding: 12px 8px;
  }

  .meta-item .val {
    font-size: 18px;
  }
}

/* Active Video segment tabs */
.active-video-tab {
  background-color: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

/* ==========================================
   EXPLORE FEED & DUAL VIEW STYLES
   ========================================== */

/* Fade-in Animation for Switching Views */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.view-container {
  animation: fadeInScale 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

#details-view {
  animation: none !important;
}

/* Explore Hero Banner */
.explore-hero {
  background: linear-gradient(135deg, #FFEFEA 0%, #FFF8F6 50%, #FAF9F6 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  padding: 48px 40px;
  margin-top: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.explore-hero::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 90, 54, 0.06) 0%, rgba(255, 90, 54, 0) 70%);
  pointer-events: none;
}

.explore-hero .hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  display: inline-block;
}

.explore-hero h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.explore-hero p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 60ch;
}

/* Category Chips */
.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  margin-top: 28px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.chip {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  padding: 10px 22px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  user-select: none;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
  transform: translateY(-1px);
}

.chip.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg-card);
  box-shadow: 0 4px 14px rgba(255, 90, 54, 0.25);
}

/* Explore Grid & Bottom Feed */
.explore-grid,
.bottom-feed {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
}

/* Infinite Scroll Loader & Indicators */
.infinite-scroll-status {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0 40px;
  min-height: 48px;
}

.infinite-scroll-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinLoader 0.75s linear infinite;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}

.infinite-scroll-end {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
}

/* Add custom pin badging for saved state */
.pin-img-wrapper .pin-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 2;
}

/* Details Page Back Navigation Row */
.details-back-nav {
  margin-top: 24px;
  margin-bottom: 8px;
}

.btn-back {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-main) !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.btn-back:hover {
  border-color: var(--text-main) !important;
  background-color: rgba(0, 0, 0, 0.02) !important;
  box-shadow: var(--shadow-hover);
}

.btn-back svg {
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-back:hover svg {
  transform: translateX(-4px);
}

/* Dynamic container state toggling overrides */
.no-results-wide {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  border: 1.5px dashed var(--border-color);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  background-color: var(--bg-card);
  box-shadow: var(--shadow);
}

.explore-feed-section {
  padding-top: 32px;
}

/* Responsive Grid Columns adjustments */
@media (max-width: 1200px) {

  .explore-grid,
  .pins-grid,
  .bottom-feed {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {

  .explore-grid,
  .pins-grid,
  .bottom-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .explore-hero {
    padding: 36px 28px;
  }

  .explore-hero h2 {
    font-size: 30px;
  }
}

@media (max-width: 768px) {

  .explore-grid,
  .pins-grid,
  .bottom-feed {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }

  .explore-hero {
    padding: 24px 20px;
    margin: 16px 16px 24px 16px;
  }

  .explore-hero h2 {
    font-size: 24px;
  }

  .explore-hero p {
    font-size: 14px;
  }

  .chip {
    padding: 8px 16px;
    font-size: 12.5px;
  }
}

@media (max-width: 480px) {

  .explore-grid,
  .pins-grid,
  .bottom-feed {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .pin-badge-time {
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 10.5px;
  }

  .pin-badge-rating {
    bottom: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .pin-info {
    padding: 8px 2px 2px 2px;
  }

  .pin-title {
    font-size: 14px;
  }

  .pin-cuisine {
    font-size: 12px;
  }
}

/* ==========================================
   FEATURED CHEF COLLECTIONS SECTION
   ========================================== */

.collections-section {
  margin-top: 24px;
  margin-bottom: 32px;
}

.collections-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  width: 100%;
  padding: 4px 0 16px 0;
}

@media (max-width: 1200px) {
  .collections-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .collections-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.collection-card {
  width: 100%;
  height: 130px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
  background-color: var(--bg-card);
}


.collection-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.collection-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.collection-card:hover .collection-img {
  transform: scale(1.08);
}

.collection-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #ffffff;
}

.collection-badge {
  align-self: flex-start;
  background: rgba(255, 90, 54, 0.9);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.collection-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.collection-subtitle {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.shorts-section {
  margin-top: 32px;
  padding: 0;
  margin-bottom: 24px;
}

.shorts-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px 2px;
  width: 100%;
}

.shorts-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}


.short-card {
  flex: 0 0 170px !important;
  width: 170px !important;
  height: 302.22px !important;
  aspect-ratio: 9 / 16 !important;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  background-color: #000;
}

.short-card:hover {
  transform: none;
  box-shadow: none !important;
}

.short-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}



.short-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #ffffff;
  z-index: 2;
}

.short-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.short-views {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.short-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.3);
  z-index: 3;
}

.short-play-btn svg {
  fill: currentColor;
  margin-left: 3px;
  /* Center play triangle */
}



/* Shorts Modal Player */
.shorts-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1100;
  /* Higher than header sticky elements */
  display: none;
  align-items: center;
  justify-content: center;
}

.shorts-modal.visible {
  display: flex;
}

.shorts-modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.shorts-modal-content {
  position: relative;
  width: 360px;
  height: 640px;
  max-width: 95vw;
  max-height: 90vh;
  background-color: #000000;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  z-index: 10;
  animation: modalEnter 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.shorts-video-wrapper {
  flex-grow: 1;
  position: relative;
  width: 100%;
  height: calc(100% - 64px);
}

.shorts-video-wrapper iframe,
.shorts-modal-img {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.shorts-modal-title {
  padding: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  font-size: 15px;
  background-color: #111111;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  transition: all 0.25s ease;
  line-height: 1;
  padding-bottom: 4px;
  /* Align cross vertically */
}

.btn-close-modal:hover {
  background-color: rgba(255, 90, 54, 0.9);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* Shorts mobile styling overrides */
@media (max-width: 768px) {
  .shorts-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    width: 100%;
  }

  .short-card {
    flex: 0 0 145px !important;
    width: 145px !important;
    height: 257.77px !important;
    aspect-ratio: 9 / 16 !important;
  }

  /* Show all cards scrolling horizontally on mobile */
  .short-card:nth-child(n+5) {
    display: block;
  }

  .shorts-section {
    padding: 0 16px;
    margin-top: 24px;
  }
}

/* Shorts Modal Footer styling */
.shorts-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: #111111;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.shorts-modal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.shorts-modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  font-size: 14.5px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.shorts-modal-views {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.btn-modal-recipe {
  background: var(--accent) !important;
  border: none !important;
  color: #ffffff !important;
  padding: 10px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.3) !important;
  transition: all 0.25s ease !important;
}

.btn-modal-recipe:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(255, 90, 54, 0.4) !important;
}

#shorts-view {
  background-color: #FFFFFF;
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
  position: relative;
  overflow: hidden;
}

/* Floating Top-Left Back Button for Shorts View (Anchored in Top Header Bar) */
.btn-shorts-back {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-shorts-back:hover {
  background: #FFFFFF;
  color: var(--accent);
  border-color: var(--accent);
  transform: translateX(-3px) scale(1.03);
  box-shadow: 0 6px 22px rgba(255, 90, 54, 0.2);
}

.btn-shorts-back svg {
  transition: transform 0.2s ease;
}

.btn-shorts-back:hover svg {
  transform: translateX(-2px);
}

/* Dedicated Immersive Shorts View Styles (YouTube Shorts & Instagram Reels Style) */
.shorts-immersive-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
  background-color: #FFFFFF;
}

.shorts-immersive-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  height: calc(100vh - 64px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  padding: 16px 0 16px 0;
  scrollbar-width: none;
  /* Firefox */
  background-color: #FFFFFF;
}

.shorts-immersive-feed::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.immersive-card-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  position: relative;
}

.immersive-short-card {
  position: relative;
  height: min(700px, calc(100vh - 84px)) !important;
  aspect-ratio: 9 / 16 !important;
  /* Strict 9:16 vertical ratio */
  width: auto !important;
  max-width: 95vw !important;
  border-radius: 6px;
  overflow: hidden;
  background-color: #000000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  border: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease;
}

.immersive-short-card:hover {
  border-color: var(--accent);
}

.video-container-wrapper {
  flex-grow: 1;
  width: 100%;
  height: 100%;
}

.immersive-iframe,
.immersive-img {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.immersive-short-card:hover .immersive-img {
  transform: scale(1.03);
}

.immersive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
  z-index: 5;
}

.immersive-info {
  pointer-events: auto;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90%;
}

.immersive-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.immersive-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
}

.immersive-author-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11.5px;
}

.immersive-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.immersive-views {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Action buttons sitting outside on the right (YouTube Shorts style) */
.immersive-actions {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  z-index: 10;
  margin-bottom: 24px;
}

.immersive-action-btn {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.immersive-action-btn svg {
  transition: transform 0.2s ease;
}

.immersive-action-btn:hover {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.18);
}

.immersive-action-btn:hover svg {
  transform: scale(1.1);
}

.immersive-action-btn .action-label {
  position: absolute;
  top: 52px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}

.immersive-action-btn.btn-like.liked {
  background-color: #EF4444;
  border-color: #EF4444;
  color: #ffffff;
}

.immersive-action-btn.btn-like.liked .action-label {
  color: #EF4444;
}

.immersive-action-btn.btn-save.saved {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.immersive-action-btn.btn-save.saved .action-label {
  color: var(--accent);
}

/* Snapping & full screen 100% width & height on mobile */
@media (max-width: 768px) {
  .shorts-immersive-layout {
    padding: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
  }

  .shorts-immersive-feed {
    gap: 0;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    padding: 0;
    scrollbar-width: none;
    background-color: #FFFFFF;
  }

  .shorts-immersive-feed::-webkit-scrollbar {
    display: none;
  }

  .immersive-card-wrapper {
    position: relative;
    gap: 0;
    width: 100% !important;
    height: calc(100vh - 64px) !important;
    height: calc(100dvh - 64px) !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    flex-shrink: 0;
  }

  .immersive-short-card {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    scroll-snap-align: start !important;
    box-shadow: none !important;
  }

  .btn-shorts-back {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 1000;
    padding: 8px 16px 8px 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  }

  .btn-shorts-back svg {
    width: 20px;
    height: 20px;
  }

  .immersive-actions {
    position: absolute;
    right: 18px;
    bottom: 70px;
    z-index: 15;
    margin-bottom: 0;
    gap: 50px;
  }

  .immersive-action-btn {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 52px;
    height: 52px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  }

  .immersive-action-btn svg {
    width: 26px;
    height: 26px;
  }

  .immersive-action-btn .action-label {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-size: 10.5px;
    top: 56px;
    font-weight: 700;
  }

  .immersive-overlay {
    padding: 24px 18px 36px 18px;
  }

  .immersive-author-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .immersive-author-name {
    font-size: 13.5px;
  }

  .immersive-title {
    font-size: 15.5px;
  }

  /* On mobile: Hide text search bar in header, show mobile search icon button */
  .header-center .search-bar {
    display: none !important;
  }

  .btn-mobile-search-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
  }

  .btn-mobile-search-toggle:hover,
  .btn-mobile-search-toggle:active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
  }
}

/* Desktop default: Hide mobile search toggle and overlay */
.btn-mobile-search-toggle {
  display: none;
}

/* ==========================================
   FULL SCREEN MOBILE SEARCH OVERLAY STYLES
   ========================================== */
.mobile-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-primary);
  z-index: 100000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.mobile-search-overlay.active {
  display: flex !important;
  animation: mobileSearchFadeIn 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes mobileSearchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  border-bottom: 1.5px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.btn-close-mobile-search {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-close-mobile-search:hover,
.btn-close-mobile-search:active {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.mobile-search-input-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 0 14px;
  height: 48px;
  transition: var(--transition);
}

.mobile-search-overlay .search-icon {
  display: none !important;
}

.mobile-search-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
  background-color: var(--bg-card);
}

.mobile-search-input-wrapper input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
}

.btn-clear-mobile-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.mobile-search-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-search-body,
.mobile-search-body * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.mobile-search-body::-webkit-scrollbar,
.mobile-search-body *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
}

.mobile-search-body::-webkit-scrollbar-thumb,
.mobile-search-body *::-webkit-scrollbar-thumb,
.mobile-search-body::-webkit-scrollbar-track,
.mobile-search-body *::-webkit-scrollbar-track {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.mobile-search-body::-webkit-scrollbar-button,
.mobile-search-body *::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.search-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.search-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-tag {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.search-tag:hover,
.search-tag:active {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.mobile-search-results-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.mobile-search-item:hover,
.mobile-search-item:active {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(255, 90, 54, 0.12);
  transform: translateY(-1px);
}

.mobile-search-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.mobile-search-item:hover .mobile-search-arrow {
  color: var(--accent);
  opacity: 1;
  transform: translateX(3px);
}

.mobile-search-thumb {
  display: none !important;
}

.mobile-search-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.mobile-search-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.3;
}

.mobile-search-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================
   DARK MODE OVERRIDES FOR MOBILE SEARCH
   ========================================== */
body.dark-mode .btn-mobile-search-toggle {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .mobile-search-overlay {
  background-color: var(--bg-primary) !important;
}

body.dark-mode .mobile-search-header {
  background-color: var(--bg-card) !important;
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode .btn-close-mobile-search {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-mode .mobile-search-input-wrapper {
  background-color: var(--bg-primary);
  border-color: var(--border-color);
}

body.dark-mode .mobile-search-input-wrapper:focus-within {
  background-color: var(--bg-card);
  border-color: var(--accent);
}

body.dark-mode .mobile-search-input-wrapper input {
  color: var(--text-main);
}

body.dark-mode .search-tag {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

body.dark-mode .search-tag:hover,
body.dark-mode .search-tag:active {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

body.dark-mode .mobile-search-item {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

body.dark-mode .mobile-search-title {
  color: var(--text-main);
}

body.dark-mode .mobile-search-meta {
  color: var(--text-muted);
}


/* Desktop-only hover interactions - Disabled transforms & hover borders */
@media (hover: hover) and (min-width: 769px) {

  .pin:hover,
  .bottom-feed .pin:hover,
  .visuals-grid .pin:hover,
  .side-related-spots .pin:hover {
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
  }

  .short-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
  }
}

/* ==========================================
   USER PROFILE PANEL STYLES
   ========================================== */
.profile-header-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 20px 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-color);
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.profile-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-tabs-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  border-bottom: 1.5px solid var(--border-color);
}

.profile-tabs {
  display: flex;
  gap: 32px;
}

.profile-tab {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 12px 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.25s ease;
}

.profile-tab:hover {
  color: var(--text-main);
}

.profile-tab.active {
  color: var(--accent);
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 6px;
}

/* Edit Profile & Logout Action Buttons */
.profile-actions-wrapper {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn-profile-edit,
.btn-profile-logout {
  background: var(--bg-primary);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-profile-edit:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1.5px);
}

.btn-profile-logout:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: #FEF2F2;
  transform: translateY(-1.5px);
}

/* ==========================================
   UTILITY CLASSES (JS-free styling)
   ========================================== */

/* Theme toggle icon visibility (Mobile & Desktop) */
.btn-theme-toggle .icon-sun,
#btnDarkModeToggle .icon-sun {
  display: none !important;
}

.btn-theme-toggle .icon-moon,
#btnDarkModeToggle .icon-moon {
  display: block !important;
}

body.dark-mode .btn-theme-toggle .icon-moon,
body.dark-mode #btnDarkModeToggle .icon-moon,
.btn-theme-toggle.is-dark .icon-moon,
#btnDarkModeToggle.is-dark .icon-moon {
  display: none !important;
}

body.dark-mode .btn-theme-toggle .icon-sun,
body.dark-mode #btnDarkModeToggle .icon-sun,
.btn-theme-toggle.is-dark .icon-sun,
#btnDarkModeToggle.is-dark .icon-sun {
  display: block !important;
}

/* Clickable cursor */
.clickable {
  cursor: pointer;
}

/* Hero image gallery fade transition */
.recipe-hero-img {
  transition: opacity 0.15s ease;
}

.recipe-hero-img.fading {
  opacity: 0.4;
}

/* Grid empty state */
/* Grid empty state */
.grid-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 15px;
}

/* ==========================================
   PREMIUM AUTH MODAL STYLING
   ========================================== */

/* Auth Modal Content Container override */
#authModal .shorts-modal-content {
  max-width: 400px;
  width: calc(100% - 32px);
  padding: 24px;
  border-radius: 6px;
  background-color: var(--bg-card);
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
  animation: modalEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hide scrollbar for Chrome/Safari inside the modal */
#authModal .shorts-modal-content::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Auth Modal Backdrop Fade-in */
#authModal .shorts-modal-backdrop {
  animation: authBackdropFade 0.3s ease forwards;
}

@keyframes authBackdropFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Close button positioning and styling */
#authModal .btn-close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

#authModal .btn-close-modal:hover {
  background: var(--accent-light);
  color: var(--accent);
  transform: rotate(90deg);
}

/* Tab Switcher Layout */
.auth-tabs-container {
  display: flex;
  background: var(--bg-primary);
  padding: 4px;
  border-radius: 4px;
  margin-bottom: 16px;
  gap: 4px;
  border: 1.5px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  text-align: center;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-tab:hover:not(.active) {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.02);
}

/* Form Styles */
.auth-form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.auth-form-group.last {
  margin-bottom: 20px;
}

.auth-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  /* Extra left padding for input icon */
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  transition: var(--transition);
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--accent-light);
}

/* Input Icon styling */
.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.auth-input:focus+.auth-input-icon {
  color: var(--accent);
}

/* Submit Button */
.auth-btn-submit {
  width: 100%;
  height: 46px;
  border-radius: 4px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid var(--accent);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  outline: none;
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.2);
}

.auth-btn-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.3);
}

.auth-btn-submit:active {
  transform: translateY(0);
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px;
  color: var(--text-muted);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Google OAuth Button */
.btn-google-auth {
  width: 100%;
  height: 44px;
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-google-auth:hover {
  border-color: #4285F4;
  background: var(--bg-primary);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

.btn-google-auth:active {
  transform: translateY(0);
}

.btn-google-auth .google-icon {
  flex-shrink: 0;
}

/* Slide animation for switching tabs */
.auth-form-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.auth-form-container {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  width: 200%;
}

.auth-form-slide {
  width: 50%;
  flex-shrink: 0;
  padding: 2px;
  box-sizing: border-box;
  transition: opacity 0.35s ease;
}

.auth-form-slide.inactive {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================
   AUTHOR PROFILE HOVER STYLES
   ========================================== */
.author-info-link:hover .author-name {
  color: var(--accent) !important;
}

.author-info-link:hover .author-info {
  opacity: 0.85;
}

/* ==========================================
   EDIT PROFILE MODAL PREMIUM STYLES
   ========================================== */
.edit-profile-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.edit-profile-input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
}

.edit-profile-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
  transition: all 0.25s ease;
}

.edit-profile-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
}

/* ==========================================
   SETTINGS PAGE STYLING
   ========================================== */
.settings-page-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

.settings-card {
  text-align: left;
  padding: 32px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

@media (max-width: 576px) {
  .settings-page-wrapper {
    padding: 24px 8px;
  }

  .settings-card {
    padding: 20px;
    border-radius: 6px;
  }
}

/* ==========================================
   CREATOR PAGE STYLING
   ========================================== */
.creator-page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

.creator-card {
  text-align: left;
  padding: 32px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

@media (max-width: 576px) {
  .creator-page-wrapper {
    padding: 24px 8px;
  }

  .creator-card {
    padding: 20px;
    border-radius: 6px;
  }
}

/* Fix dropdown options readability in dark/light themes */
select option {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
}

/* Custom premium select styling (replaces default Chrome select arrow) */
select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF5A36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px !important;
  padding-right: 32px !important;
  cursor: pointer !important;
}

/* Hide spin button arrows on number inputs globally (Chrome, Safari, Edge, Opera) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Hide spin button arrows on Firefox */
input[type="number"] {
  -moz-appearance: textfield !important;
}

/* ==========================================
   BRAND FOOTER & DOCUMENT PAGES STYLING
   ========================================== */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1.5px solid var(--border-color);
  padding: 20px 24px;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;

  /* Sidebar padding offsets to prevent content truncation */
  padding-left: calc(72px + 24px);
  transition: padding-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .logo {
  display: inline-flex;
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1.5px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-social-link {
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
}

.footer-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer {
    padding: 20px 16px !important;
  }

  .footer-inner {
    flex-direction: column !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .footer-copyright {
    text-align: center !important;
    width: 100% !important;
  }

  .footer-nav-links {
    justify-content: center !important;
    width: 100% !important;
  }
}

/* Informational Brand Pages (About, Contact, Terms, Privacy) */
.doc-page-wrapper {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 16px 40px 16px;
  box-sizing: border-box;
}

.doc-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  padding: 48px;
  box-shadow: var(--shadow);
}

.doc-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 8px;
  text-align: left;
}

.doc-subtitle {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 32px;
  text-align: left;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 24px;
}

.doc-content {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  text-align: left;
}

.doc-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 32px;
  margin-bottom: 12px;
}

.doc-content p {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.doc-content ul {
  margin-top: 0;
  margin-bottom: 20px;
  padding-left: 20px;
  color: var(--text-muted);
}

.doc-content li {
  margin-bottom: 8px;
}

/* Contact page specific styling */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method-card {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.contact-method-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.contact-icon-wrapper {
  background: var(--bg-card);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-method-details h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.contact-method-details p {
  font-family: var(--font-sans);
  font-size: 13.5px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .doc-card {
    padding: 24px;
    border-radius: 6px;
  }

  .doc-title {
    font-size: 26px;
  }
}

/* ==========================================
   SHARED CATEGORY CARDS STYLING
   ========================================== */
.categories-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

@media (min-width: 1025px) {
  .categories-page-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .categories-header {
    padding: 0 16px;
  }

  .categories-page-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
  }

  .category-page-card {
    height: 72px !important;
    border-radius: 4px !important;
  }

  .category-page-title {
    font-size: 14px !important;
  }
}

.category-page-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  border-radius: 3px;
  padding: 16px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  text-decoration: none;
  background-color: var(--bg-card);
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-page-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.category-page-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  text-align: center;
  line-height: 1.3;
  transition: color 0.25s ease;
}

.category-page-card:hover .category-page-title {
  color: var(--accent);
}

/* ==========================================
   EXPLORE TAGS COMPACT CONTAINER (Categories Page)
   ========================================== */
.explore-tags-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  margin-top: 14px;
  margin-bottom: 32px;
}

.explore-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.explore-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.explore-tag-pill .tag-hash {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 12px;
}

.explore-tag-pill:hover {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: rgba(255, 90, 54, 0.4);
  transform: translateY(-1.5px);
}

@media (max-width: 768px) {
  .explore-tags-card {
    margin-left: 16px;
    margin-right: 16px;
    padding: 14px 16px;
  }
}

/* ==========================================
   HORIZONTAL SCROLLABLE GRID
   ========================================== */
.horizontal-scroll-grid {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  gap: 20px !important;
  padding-bottom: 16px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.horizontal-scroll-grid::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll-grid::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.horizontal-scroll-grid::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.horizontal-scroll-grid::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.horizontal-scroll-grid .pin {
  flex: 0 0 282px !important;
  width: 282px !important;
  margin-bottom: 0 !important;
}

@media (max-width: 1366px) and (min-width: 769px) {
  .horizontal-scroll-grid .pin {
    flex: 0 0 250px !important;
    width: 250px !important;
  }
}

@media (max-width: 768px) {
  .horizontal-scroll-grid .pin {
    flex: 0 0 calc((100vw - 46px) / 2) !important;
    width: calc((100vw - 46px) / 2) !important;
  }
}

/* Screen Reader Only Utility for Semantic Headings */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Print-only elements hidden on screen */
.print-only-header,
.print-only-footer {
  display: none;
}

/* ==========================================================================
   RECIPE PRINT STYLES: MINIMALISTIC, IMAGE-FREE, ORANGE-ACCENTED PRINT SHEET
   ========================================================================== */
@media print {
  @page {
    margin: 1.2cm 1.5cm;
    size: auto;
  }

  /* Universal exact print color reproduction */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 1. FORCE PURE WHITE THEME & DARK TEXT REGARDLESS OF DARK OR LIGHT MODE */
  :root,
  html,
  body,
  body.dark-mode,
  [data-theme="dark"] {
    --bg-primary: #ffffff !important;
    --bg-card: #ffffff !important;
    --text-main: #1a1a1a !important;
    --text-muted: #555555 !important;
    --border-color: #e5e5e5 !important;
    --border-dark: #1a1a1a !important;
    --accent: #ff5a36 !important;
    --accent-hover: #e04b27 !important;
    --accent-light: #fff5f2 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10pt !important;
    line-height: 1.45 !important;
    font-family: var(--font-sans), 'Inter', -apple-system, sans-serif !important;
  }

  /* Neutralize any dark-mode background or white text overrides */
  body.dark-mode *,
  [data-theme="dark"] * {
    background-color: transparent !important;
    color: #1a1a1a !important;
    border-color: #e5e5e5 !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  /* Enforce black/dark text default for all text elements */
  h1, h2, h3, h4, h5, h6, p, span, div, li, strong, b, time, a {
    color: #1a1a1a !important;
  }

  /* 2. COMPLETELY EXCLUDE ALL IMAGES & MEDIA */
  img,
  picture,
  video,
  canvas,
  .recipe-media-container,
  .hero-image-container,
  .recipe-hero-img,
  .recipe-gallery-thumbs-wrapper,
  .gallery-dots,
  .step-card-media,
  .step-img,
  .step-image-frame,
  .author-avatar,
  .avatar-img {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  /* 3. COMPLETELY HIDE LEFT SIDEBAR, RIGHT SIDEBAR, BOTTOM & SITE CHROME */
  .side-nav,
  #sideNav,
  nav.side-nav,
  .side-nav-header,
  .side-nav-item,
  .btn-close-sidebar,
  .nav-sidebar,
  .drawer-overlay,
  .sidebar,
  aside.sidebar,
  .sidebar-widget,
  .bottom-feed-wrapper,
  .bottom-feed,
  .section-title-wrapper,
  .footer,
  footer,
  .site-footer,
  .bottom-nav,
  .print-only-footer,
  .header,
  .header-container,
  .mobile-search-overlay,
  .profile-modal,
  .profile-backdrop,
  .toast,
  .scroll-to-top,
  .btn-theme-toggle,
  .view-options,
  #btnMobileSearchToggle,
  .recipe-breadcrumb,
  .recipe-actions-bar,
  #recipeActionsBar,
  .jumpnav-wrap,
  #recipeJumpNav,
  #sec-community,
  .nutrition-toggle-wrap,
  #btnNutritionToggle,
  .servings-stepper .btn-stepper,
  .scale-presets-wrap,
  .ing-checkbox,
  .custom-checkbox-box,
  .btn-comment-reply,
  .btn-vote-helpful,
  .modal,
  #communityDrawer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
  }

  /* 4. FULL-WIDTH CLEAN ARTICLE CONTAINER (RESET LEFT SIDEBAR MARGINS) */
  body,
  .container,
  .view-container,
  .main-layout,
  .primary-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    float: none !important;
  }

  #recipeDetailCard,
  .card.recipe-detail {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #ffffff !important;
    box-shadow: none !important;
    page-break-inside: auto;
  }

  .card-body {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  /* 5. MINIMALISTIC PRINT BRAND HEADER (WITH ORANGE ACCENT) */
  .print-only-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    padding-bottom: 8px !important;
    margin-bottom: 16px !important;
    border-bottom: 2px solid #ff5a36 !important;
  }

  body.dark-mode .print-only-header,
  [data-theme="dark"] .print-only-header {
    border-bottom: 2px solid #ff5a36 !important;
  }

  .print-brand-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .print-logo-text {
    font-size: 20pt !important;
    font-weight: 800 !important;
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif !important;
    color: #1a1a1a !important;
    line-height: 1 !important;
    letter-spacing: -0.5px !important;
  }

  .print-logo-accent,
  body.dark-mode .print-logo-accent,
  [data-theme="dark"] .print-logo-accent {
    color: #ff5a36 !important;
  }

  .print-tagline {
    font-size: 8pt !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #777777 !important;
    font-weight: 600 !important;
  }

  .print-brand-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
  }

  .print-badge-category,
  body.dark-mode .print-badge-category,
  [data-theme="dark"] .print-badge-category {
    font-size: 8.5pt !important;
    font-weight: 700 !important;
    color: #ff5a36 !important;
    background: #fff5f2 !important;
    background-color: #fff5f2 !important;
    border: 1px solid #ff5a36 !important;
    padding: 2px 10px !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
  }

  .print-site-link {
    font-size: 8pt !important;
    color: #888888 !important;
  }

  /* 6. RECIPE TITLE, BYLINE & COMPACT RATING */
  .recipe-header-info {
    margin-bottom: 12px !important;
    padding: 0 !important;
  }

  #detailTitle {
    font-size: 20pt !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    margin: 0 0 6px 0 !important;
    color: #1a1a1a !important;
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif !important;
  }

  .recipe-byline {
    font-size: 9.5pt !important;
    color: #555555 !important;
    margin-bottom: 6px !important;
  }

  .byline-prefix {
    color: #777777 !important;
  }

  .byline-author-link {
    font-weight: 600 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  .byline-separator {
    color: #999999 !important;
    margin: 0 4px !important;
  }

  .byline-date {
    color: #555555 !important;
  }

  .recipe-rating-compact {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 9pt !important;
    margin-bottom: 10px !important;
  }

  .rating-stars-row .rating-star.filled,
  .rating-stars-row .rating-star.half,
  body.dark-mode .rating-stars-row .rating-star.filled,
  body.dark-mode .rating-stars-row .rating-star.half,
  [data-theme="dark"] .rating-stars-row .rating-star.filled,
  [data-theme="dark"] .rating-stars-row .rating-star.half {
    color: #ff5a36 !important;
  }

  .rating-stars-row .rating-star.empty {
    color: #cccccc !important;
  }

  .rating-score {
    font-weight: 700 !important;
    color: #1a1a1a !important;
  }

  .rating-count {
    color: #666666 !important;
    text-decoration: none !important;
  }

  /* 7. MINIMALIST RECIPE STATS BAR (INK-FRIENDLY & CLEAN) */
  .meta-grid {
    display: flex !important;
    justify-content: space-around !important;
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    background: #fafafa !important;
    background-color: #fafafa !important;
    padding: 8px 12px !important;
    margin: 10px 0 16px 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .meta-item {
    border: none !important;
    padding: 2px 10px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .meta-item .val {
    font-size: 11.5pt !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    font-family: var(--font-display), sans-serif !important;
  }

  .meta-item .lbl {
    font-size: 7.5pt !important;
    text-transform: uppercase !important;
    color: #777777 !important;
    font-weight: 600 !important;
    letter-spacing: 0.6px !important;
  }

  /* 8. OVERVIEW & HIGHLIGHTS */
  #sec-overview {
    margin: 12px 0 !important;
  }

  #sec-overview h2,
  #sec-ingredients h2,
  #sec-instructions h2,
  #sec-nutrition h2 {
    font-size: 12.5pt !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif !important;
    margin: 14px 0 8px 0 !important;
  }

  .heading-num,
  body.dark-mode .heading-num,
  [data-theme="dark"] .heading-num {
    color: #ff5a36 !important;
    margin-right: 4px !important;
  }

  .overview-text {
    font-size: 9.5pt !important;
    line-height: 1.5 !important;
    color: #222222 !important;
    margin: 0 0 10px 0 !important;
  }

  .why-love-it-card {
    border-left: 3px solid #ff5a36 !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    background: #fff9f7 !important;
    background-color: #fff9f7 !important;
    padding: 8px 12px !important;
    border-radius: 0 4px 4px 0 !important;
    margin: 10px 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .why-love-it-title,
  body.dark-mode .why-love-it-title,
  [data-theme="dark"] .why-love-it-title {
    font-size: 9.5pt !important;
    font-weight: 700 !important;
    color: #ff5a36 !important;
    margin: 0 0 4px 0 !important;
  }

  .why-love-it-title svg {
    display: none !important;
  }

  .why-love-it-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .why-love-it-list li {
    font-size: 9pt !important;
    color: #2a2a2a !important;
    padding: 2px 0 !important;
    display: flex !important;
    gap: 6px !important;
  }

  .why-bullet-check,
  body.dark-mode .why-bullet-check,
  [data-theme="dark"] .why-bullet-check {
    color: #ff5a36 !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
  }

  /* 9. INGREDIENTS (2-COLUMN CLEAN LIST WITH ORANGE BULLETS) */
  #sec-ingredients {
    margin-top: 16px !important;
    break-inside: auto;
  }

  #sec-ingredients .section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    border-bottom: 1.5px solid #ff5a36 !important;
    padding-bottom: 4px !important;
    margin-bottom: 10px !important;
  }

  body.dark-mode #sec-ingredients .section-header,
  [data-theme="dark"] #sec-ingredients .section-header {
    border-bottom: 1.5px solid #ff5a36 !important;
  }

  #sec-ingredients h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .servings-stepper-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 9pt !important;
    color: #666666 !important;
  }

  .servings-stepper {
    display: inline !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  .stepper-count {
    font-weight: 700 !important;
    color: #1a1a1a !important;
  }

  .ingredients-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ingredient-item {
    display: block !important;
    position: relative !important;
    padding: 3px 0 3px 16px !important;
    border-bottom: 1px dotted #e5e5e5 !important;
    font-size: 9.5pt !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ingredient-check,
  body.dark-mode .ingredient-check,
  [data-theme="dark"] .ingredient-check {
    display: inline-flex !important;
    position: absolute !important;
    left: 0 !important;
    top: 7px !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ff5a36 !important;
    flex-shrink: 0 !important;
  }

  .ingredient-check svg {
    display: inline-block !important;
    width: 10px !important;
    height: 10px !important;
    stroke: #ff5a36 !important;
  }

  .ingredient-qty {
    display: inline !important;
    margin-right: 4px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    white-space: normal !important;
  }

  .ingredient-name {
    display: inline !important;
    color: #2a2a2a !important;
  }

  /* 10. INSTRUCTIONS (MINIMALIST NUMBERED STEPS WITH ORANGE BADGES) */
  #sec-instructions {
    margin-top: 18px !important;
    break-inside: auto;
  }

  #sec-instructions .section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    border-bottom: 1.5px solid #ff5a36 !important;
    padding-bottom: 4px !important;
    margin-bottom: 12px !important;
  }

  body.dark-mode #sec-instructions .section-header,
  [data-theme="dark"] #sec-instructions .section-header {
    border-bottom: 1.5px solid #ff5a36 !important;
  }

  #sec-instructions h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .steps-count-badge {
    font-size: 8.5pt !important;
    color: #777777 !important;
    font-weight: 600 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .instructions-steps-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .step-card-item {
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 6px 0 8px 0 !important;
    margin: 0 !important;
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .step-card-header {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .step-badge-title {
    margin: 0 !important;
    padding: 0 !important;
  }

  .step-num-badge,
  body.dark-mode .step-num-badge,
  [data-theme="dark"] .step-num-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ff5a36 !important;
    background-color: #ff5a36 !important;
    color: #ffffff !important;
    font-size: 8pt !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .step-card-body {
    flex: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .step-card-text {
    padding: 0 !important;
    margin: 0 !important;
  }

  .step-instruction-text {
    font-size: 9.5pt !important;
    line-height: 1.48 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
  }

  /* 11. NUTRITION: SUMMARY ROW & EXPANDED FULL DETAILS BREAKDOWN */
  #sec-nutrition {
    margin-top: 16px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #sec-nutrition .section-header {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    border-bottom: 1.5px solid #ff5a36 !important;
    padding-bottom: 4px !important;
    margin-bottom: 8px !important;
  }

  body.dark-mode #sec-nutrition .section-header,
  [data-theme="dark"] #sec-nutrition .section-header {
    border-bottom: 1.5px solid #ff5a36 !important;
  }

  #sec-nutrition h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .serving-tag {
    font-size: 7.5pt !important;
    color: #777777 !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
  }

  .nutrition-grid {
    display: flex !important;
    gap: 8px !important;
    margin: 6px 0 10px 0 !important;
  }

  .nutrition-card {
    flex: 1 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    padding: 5px 8px !important;
    text-align: center !important;
    background: #fafafa !important;
    background-color: #fafafa !important;
  }

  .nutrition-card .value,
  body.dark-mode .nutrition-card .value,
  [data-theme="dark"] .nutrition-card .value {
    font-size: 11pt !important;
    font-weight: 700 !important;
    color: #ff5a36 !important;
    display: block !important;
    font-family: var(--font-display), sans-serif !important;
  }

  .nutrition-card .label {
    font-size: 7.5pt !important;
    color: #666666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  /* FULL NUTRITION DETAILS BREAKDOWN (ALWAYS EXPANDED IN PRINT) */
  .full-nutrition-card,
  #fullNutritionDrawer {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
    margin-top: 10px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    background: #fafafa !important;
    background-color: #fafafa !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .full-nutrition-heading {
    font-size: 10pt !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 6px 0 !important;
  }

  .nut-dv-header-row {
    display: flex !important;
    justify-content: flex-end !important;
    font-size: 7.5pt !important;
    color: #777777 !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important;
    padding-bottom: 2px !important;
    border-bottom: 1px solid #e0e0e0 !important;
  }

  .full-nutrition-table {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px 20px !important;
  }

  .nut-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding: 3px 0 !important;
    border-bottom: 1px dotted #e8e8e8 !important;
    font-size: 8.5pt !important;
  }

  .nut-item-left {
    display: flex !important;
    gap: 4px !important;
  }

  .nut-name {
    font-weight: 600 !important;
    color: #2a2a2a !important;
  }

  .nut-val {
    color: #1a1a1a !important;
  }

  .nut-dv,
  body.dark-mode .nut-dv,
  [data-theme="dark"] .nut-dv {
    font-weight: 700 !important;
    color: #ff5a36 !important;
  }

  .nut-footnote {
    font-size: 7pt !important;
    color: #777777 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
  }
}