*,
   *::before,
   *::after {
  box-sizing: border-box !important;
}

/* Hide "My Allergen Profile" box (not used) */
#allergens-tab-pane #allergen-profile,
#allergen-profile.pf-ap {
  display: none !important;
}

@media (max-width: 1024px) {
  html,
     body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .container {
    padding: 20px 16px !important;
  }

  .header h1 {
    font-size: 2.5rem !important;
    margin-bottom: 8px !important;
  }

  .header .subtitle {
    font-size: 1rem !important;
  }

  .main-tabs {
    padding: 6px !important;
    gap: 8px !important;
  }

  .main-tab {
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
  }

  .search-area-container .search-container {
    padding: 12px 16px !important;
  }

  .search-area-container .search-container .card-title {
    font-size: 1rem !important;
  }

  .search-area-container .search-container .card-subtitle {
    font-size: 0.8rem !important;
  }

  .browse-results-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .browse-results-grid > .card.results-container,
     .browse-results-grid > :nth-child(2) {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .card {
    padding: 14px !important;
  }

  .card-header {
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
  }

  .browse-ingredients-layout {
    gap: 18px !important;
  }

  .goals-chips {
    max-height: 200px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .subcategories-grid {
    max-height: 300px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .ingredients-grid-compact {
    max-height: 400px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .selected-summary {
    padding: 10px 14px !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
  }

  .results-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .results-container .results-body {
    padding: 14px !important;
  }

  .main-tabs,
     .results-container .tabs,
     .tabs {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
  }

  .main-tabs > *,
     .results-container .tabs > *,
     .tabs > * {
    flex: 0 0 auto !important;
  }
}

@media (max-width: 768px) {
  .browse-results-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .container {
    padding: 12px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .header {
    margin-bottom: 24px !important;
  }

  .header h1 {
    font-size: 2rem !important;
    margin-bottom: 6px !important;
  }

  .header .subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 12px !important;
  }

  .header .badge {
    font-size: 0.8rem !important;
    padding: 6px 16px !important;
  }

  .main-tabs-container {
    margin-bottom: 20px !important;
    padding: 0 4px !important;
  }

  .main-tabs {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
    padding: 6px 2px 8px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .main-tabs > * {
    flex: 0 0 auto !important;
  }

  .main-tab {
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
    white-space: nowrap !important;
  }

  .search-area-container {
    padding: 0 !important;
    margin-bottom: 20px !important;
  }

  .search-area-container .search-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
  }

  .pf-search-row {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .pf-input-wrapper {
    width: 100% !important;
  }

  .pf-search-row #analyze-btn {
    width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
  }

  .search-area-container .search-container .card-header {
    padding: 10px 0 !important;
    margin-bottom: 10px !important;
  }

  .search-area-container .search-container .card-title {
    font-size: 0.95rem !important;
  }

  .search-area-container .search-container .card-subtitle {
    font-size: 0.8rem !important;
  }

  .search-area-container .ingredients-textarea {
    min-height: 100px !important;
    padding: 12px !important;
    font-size: 16px !important;
    width: 100% !important;
  }

  .search-area-container .search-container #analyze-btn,
     #analyze-btn {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    min-height: 44px !important;
    margin-top: 12px !important;
  }

  .selected-summary {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 14px !important;
  }

  .selected-item {
    width: 100% !important;
    font-size: 0.85rem !important;
  }

  .browse-ingredients-layout {
    gap: 16px !important;
  }

  .goals-section {
    margin-bottom: 16px !important;
  }

  .section-header-compact {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .section-title-compact {
    font-size: 1rem !important;
  }

  .search-input-compact {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
    padding: 10px 12px !important;
  }

  .goals-chips {
    max-height: 180px !important;
    overflow-y: auto !important;
    padding: 8px !important;
  }

  .goal-chip {
    font-size: 0.85rem !important;
    padding: 8px 14px !important;
  }

  .subcategories-section {
    margin-bottom: 16px !important;
  }

  .subcategories-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 8px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    padding: 8px !important;
  }

  .ingredients-section {
    margin-bottom: 16px !important;
  }

  .ingredients-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 8px !important;
    max-height: 350px !important;
    overflow-y: auto !important;
  }

  .subsection-title {
    font-size: 0.9rem !important;
    margin-bottom: 8px !important;
  }

  .results-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .results-container .results-header {
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  .results-container .card-title {
    font-size: 0.95rem !important;
    margin: 0 !important;
  }

  .status-indicator {
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: rgba(14, 165, 164, 0.05) !important;
  }

  #status-text {
    font-size: 0.75rem !important;
  }

  .results-container .tabs,
     .tabs {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
    padding: 6px 2px 8px !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }

  .results-container .tabs > *,
     .tabs > * {
    flex: 0 0 auto !important;
  }

  .results-container .tabs .tab,
     .tabs .tab,
     .results-container .tabs button,
     .tabs button {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    min-height: 40px !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .pf-ap {
    padding: 10px !important;
    margin: 8px !important;
    border-radius: 10px !important;
  }

  .pf-ap-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .pf-ap-title {
    font-size: 0.9rem !important;
  }

  .pf-ap-sub {
    font-size: 0.75rem !important;
  }

  .pf-ap-clear {
    align-self: flex-end !important;
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
  }

  .pf-ap-chips {
    gap: 6px !important;
    margin-top: 8px !important;
  }

  .results-container .results-body,
     .results-body {
    padding: 12px 14px !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: auto !important;
  }

  .card {
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }

  .card-header {
    padding: 10px 0 8px 0 !important;
    margin-bottom: 10px !important;
  }

  #smoothie-tab-content .search-container {
    padding: 12px 14px !important;
  }

  #smoothie-tab-content .search-section {
    margin-bottom: 16px !important;
  }

  #smoothie-tab-content .search-input,
     #smoothie-tab-content select {
    font-size: 16px !important;
    padding: 10px 12px !important;
    width: 100% !important;
  }

  #smoothie-tab-content #build-smoothie-btn,
     #smoothie-tab-content #clear-smoothie-btn {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  #smoothie-tab-content #build-smoothie-btn {
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  #smoothie-tab-content #clear-smoothie-btn {
    width: 100% !important;
  }

  #smoothie-presets {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #feedback-modal {
    padding: 0 !important;
  }

  #feedback-modal > div {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    padding: 20px 16px !important;
  }

  .results-container .results-body table,
     .results-container .results-body pre,
     .results-container .results-body code {
    max-width: 100% !important;
    overflow-x: auto !important;
    display: block !important;
  }

  .results-container .results-body table {
    white-space: nowrap !important;
  }

  .results-container .results-body pre,
     .results-container .results-body code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  #allergens-results-body .pf-a-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  #smoothie-tab-content .main-content-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  #allergens-results-body .pf-a-okCallout .t1 {
    font-size: 0.95rem !important;
  }

  #allergens-results-body .pf-a-okCallout .t2 {
    font-size: 0.8rem !important;
  }

  #allergens-results-body .pf-a-sectionTitle {
    font-size: 0.9rem !important;
  }

  #allergens-results-body .pf-a-muted {
    font-size: 0.82rem !important;
  }

  #allergens-results-body .pf-a-chip {
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
  }

  #allergens-results-body details summary {
    font-size: 0.85rem !important;
  }

  #allergens-results-body .pf-a-list li {
    font-size: 0.78rem !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px 12px !important;
  }

  .header h1 {
    font-size: 1.75rem !important;
  }

  .header .subtitle {
    font-size: 0.85rem !important;
  }

  .main-tabs {
    gap: 6px !important;
    padding: 5px 2px 6px !important;
  }

  .main-tab {
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
  }

  .search-area-container .search-container {
    padding: 8px !important;
  }

  .pf-search-row {
    gap: 8px !important;
  }

  .card {
    padding: 10px 12px !important;
  }

  .card-header {
    padding: 8px 0 6px 0 !important;
  }

  .selected-summary {
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .selected-item {
    font-size: 0.8rem !important;
  }

  .subcategories-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 6px !important;
  }

  .ingredients-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 6px !important;
  }

  .results-container .tabs .tab,
     .tabs .tab {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
  }

  .results-container .results-body {
    padding: 10px 12px !important;
  }

  .goal-chip {
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
  }

  .section-title-compact {
    font-size: 0.95rem !important;
  }

  .subsection-title {
    font-size: 0.85rem !important;
  }
}

@media (max-width: 768px) {
  button,
     .main-tab,
     .tab,
     .goal-chip,
     .btn-primary,
     #analyze-btn,
     #build-smoothie-btn,
     #clear-smoothie-btn {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  input[type="text"],
     input[type="email"],
     input[type="search"],
     textarea,
     select {
    font-size: 16px !important;
    min-height: 44px !important;
  }

  body,
     .card-title,
     .card-subtitle,
     .section-title-compact {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
}

@media (max-width: 1024px) {
  .browse-results-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: start !important;
  }

  .browse-results-grid > .card {
    min-width: 0 !important;
    width: 100% !important;
  }

  .browse-ingredients-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #smoothie-tab-content .main-content-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

@media (max-width: 768px) {
  .main-tabs,
     .results-container .tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .main-tabs > *,
     .results-container .tabs > * {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .results-container .results-body {
    overflow-x: auto !important;
  }
}

@media (max-width: 1024px) {
  #category-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  #category-list .goal-chip {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 14px 12px !important;
    font-size: 1rem !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
  }
}

@media (max-width: 480px) {
  #category-list {
    gap: 10px !important;
  }

  #category-list .goal-chip {
    padding: 12px 10px !important;
    font-size: 0.95rem !important;
  }
}

@media (max-width: 1024px) {
  #ingredient-tab-content .browse-ingredients-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #ingredient-tab-content #category-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  #ingredient-tab-content #category-list .goal-chip {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 768px) {
  .browse-results-grid > .card {
    padding: 14px !important;
  }

  #ingredient-tab-content #category-list {
    gap: 10px !important;
  }

  #ingredient-tab-content #category-list .goal-chip {
    padding: 10px 10px !important;
    font-size: 0.95rem !important;
    border-radius: 18px !important;
  }

  #ingredient-tab-content .section-title-compact {
    margin-bottom: 10px !important;
  }

  #ingredient-tab-content #category-list {
    display: flex !important;
    flex-wrap: wrap !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
  }

  #ingredient-tab-content #category-list .goal-chip {
    font-size: 12.8px !important;
    padding: 6px 12px !important;
    flex: 1 1 calc(50% - 8px) !important;
    max-width: calc(50% - 8px) !important;
    width: auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
}

.pf-results-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.pf-results-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.pf-results-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.18);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pf-results-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.pf-results-sheet-title {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
}

.pf-results-close {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

.pf-results-sheet-body {
  padding: 12px 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1025px) {
  #pf-results-modal {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  /* Mobile/tablet: hide inline Analysis Results ONLY before first analysis */
  body:not(.pf-has-analysis) #ingredient-results-card {
    display: none !important;
  }

  /* When results card is hidden, remove the empty 2nd column */
  body:not(.pf-has-analysis) .browse-results-grid {
    grid-template-columns: 1fr !important;
  }

  #pf-results-modal[aria-hidden="true"] {
    display: none !important;
  }

  #pf-results-modal[aria-hidden="false"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
  }

  #pf-results-modal #ingredient-results-card {
    display: flex !important;
  }
}

html.pf-modal-open,
   body.pf-modal-open {
  overflow: hidden !important;
  height: 100% !important;
}

body.pf-modal-open {
  position: fixed !important;
  width: 100% !important;
}

.pf-results-backdrop {
  touch-action: none;
}

.pf-results-sheet,
   .pf-results-sheet-body {
  overscroll-behavior: contain;
}

@media (max-width: 480px) {
  .pf-results-sheet {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    border-radius: 18px !important;
    max-height: 72vh !important;
  }

  .pf-results-sheet::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
    margin: 10px auto 0;
  }

  .pf-results-sheet-header {
    padding: 10px 12px !important;
  }

  .pf-results-sheet-title {
    font-size: 1.25rem !important;
  }

  .pf-results-close {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
  }

  .pf-results-sheet-body {
    padding: 8px 10px !important;
  }

  .pf-results-sheet-body .results-container {
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  #pf-results-modal .pf-results-sheet-body .results-container .tabs .tab,
     #pf-results-modal .results-container .tabs .tab,
     #pf-results-modal .tabs .tab,
     #pf-results-modal .tabs button[data-tab] {
    font-size: 1rem !important;
  }
}

@media (max-width: 768px) {
  .pf-results-sheet {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    border-radius: 18px !important;
    max-height: 70vh !important;
  }

  .pf-results-sheet-body {
    padding: 10px 12px !important;
  }
}

@media (max-width: 480px) {
  .pf-results-sheet {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    max-height: 64vh !important;
  }

  .pf-results-sheet-body {
    padding: 8px 10px !important;
  }
}

#pf-results-modal .pf-results-sheet-body .results-container {
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

#pf-results-modal .pf-results-sheet-body .results-container .results-header {
  display: none !important;
}

#pf-results-modal .pf-results-sheet-body .results-container .tabs {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 8px 0;
  margin: 0 0 8px 0;
  z-index: 2;
}

#pf-results-modal .pf-results-sheet-body .results-container .results-body {
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

@media (max-width: 1024px) {
  .pf-results-sheet {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100% - 24px) !important;
    max-width: 520px !important;
    max-height: 78vh !important;
    border-radius: 18px !important;
  }

  .pf-results-sheet::before {
    display: none !important;
  }

  .pf-results-sheet {
    top: 12px !important;
    bottom: 12px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    max-height: none !important;
  }

  #pf-results-modal .pf-results-sheet-body {
    padding: 10px 12px !important;
  }

  #pf-results-modal .nutrition-results-card {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #pf-results-modal .nutrition-results-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
  }

  #pf-results-modal .nutrition-selected-chip,
     #pf-results-modal .nutrition-ing-pill {
    max-width: 100% !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 10px 0 8px 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    background: transparent !important;
    padding: 10px 10px !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    min-height: auto !important;
  }

  #pf-results-modal .nutrition-tile-compact .top {
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.78rem !important;
    letter-spacing: 0.04em !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    font-size: 1.1rem !important;
    line-height: 1.1 !important;
  }

  #pf-results-modal .nutrition-tile-compact .unit {
    font-size: 0.85rem !important;
  }

  #pf-results-modal .results-container .tabs {
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 0 !important;
  }

  #pf-results-modal .results-container .tab-pane {
    padding: 0 !important;
    margin: 0 !important;
  }

  #pf-results-modal .pf-hb2-header-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  #pf-results-modal table {
    font-size: 0.9rem !important;
  }
}

@media (max-width: 360px) {
  #pf-results-modal .nutrition-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 1024px) {
  #pf-results-modal .nutrition-title,
     #pf-results-modal .nutrition-results-top .nutrition-title,
     #pf-results-modal .nutrition-results-card h2,
     #pf-results-modal .nutrition-results-card h3,
     #pf-results-modal .nutrition-title h3 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    margin: 0 0 6px 0 !important;
  }

  #pf-results-modal .nutrition-results-card,
     #pf-results-modal .nutrition-results-card * {
    letter-spacing: normal !important;
  }

  #pf-results-modal .nutrition-ing-pill,
     #pf-results-modal .nutrition-selected-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: fit-content !important;
    max-width: 100% !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    font-size: 0.9rem !important;
    line-height: 1.1 !important;
  }

  #pf-results-modal .nutrition-ing-pill .name,
     #pf-results-modal .nutrition-selected-chip .name {
    font-weight: 700 !important;
  }

  #pf-results-modal .nutrition-ing-pill .serving,
     #pf-results-modal .nutrition-selected-chip .serving {
    font-size: 0.85rem !important;
    opacity: 0.8 !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    gap: 8px !important;
    margin-top: 10px !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    padding: 8px 9px !important;
    border-radius: 12px !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    font-size: 1rem !important;
    line-height: 1.05 !important;
  }

  #pf-results-modal .nutrition-tile-compact .unit {
    font-size: 0.82rem !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 12px 0 8px 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    box-shadow: none !important;
    min-height: 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact .top {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.78rem !important;
    letter-spacing: 0.04em !important;
    opacity: 0.85 !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  #pf-results-modal .nutrition-tile-compact .unit {
    font-size: 0.85rem !important;
    opacity: 0.85 !important;
  }

  #pf-results-modal .nutrition-ing-pill,
     #pf-results-modal .nutrition-selected-chip {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    display: inline-flex !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    align-items: center !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    width: 100% !important;
    max-width: 420px !important;
  }
}

@media (max-width: 480px) {
  #pf-results-modal .nutrition-tile-compact {
    max-width: 360px !important;
  }
}

@media (max-width: 1024px) {
  #pf-results-modal .nutrition-summary-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
    margin: 12px 0 8px 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    width: calc(100% - 16px) !important;
    max-width: 380px !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
  }

  #pf-results-modal .nutrition-tile-compact .top {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.78rem !important;
    letter-spacing: 0.04em !important;
    opacity: 0.85 !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    margin: 0 !important;
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  #pf-results-modal .nutrition-tile-compact .unit {
    font-size: 0.85rem !important;
    opacity: 0.85 !important;
  }
}

@media (max-width: 480px) {
  #pf-results-modal .nutrition-tile-compact {
    max-width: 340px !important;
    padding: 9px 11px !important;
  }
}

@media (max-width: 1024px) {
  #pf-results-modal .nutrition-tile-compact .top {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    text-align: right !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    text-align: left !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    display: block !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 10px auto 0 auto !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 16px !important;
    background: #fff !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 6px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  #pf-results-modal .nutrition-tile-compact:not(:last-child) {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  }

  #pf-results-modal .nutrition-tile-compact .top {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  #pf-results-modal .nutrition-tile-compact .top > span:first-child {
    font-size: 1rem !important;
    line-height: 1 !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    opacity: 0.75 !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  #pf-results-modal .nutrition-tile-compact .unit {
    font-size: 0.85rem !important;
    opacity: 0.75 !important;
  }
}

@media (max-width: 480px) {
  #pf-results-modal .nutrition-summary-grid {
    max-width: 340px !important;
  }
}

@media (max-width: 1024px) {
  #pf-results-modal .nutrition-results-card {
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  #pf-results-modal .nutrition-results-top {
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
    gap: 6px !important;
  }

  #pf-results-modal .nutrition-title,
     #pf-results-modal .nutrition-results-top h2,
     #pf-results-modal .nutrition-results-top h3 {
    margin: 0 !important;
    line-height: 1.15 !important;
  }

  #pf-results-modal .nutrition-results-top p {
    margin: 0 !important;
    line-height: 1.25 !important;
  }

  #pf-results-modal .nutrition-ing-pill,
     #pf-results-modal .nutrition-selected-chip {
    margin-top: 6px !important;
  }

  #pf-results-modal .nutrition-results-top {
    padding: 8px 0 8px !important;
    margin: 0 0 10px 0 !important;
    gap: 6px !important;
    min-height: 0 !important;
  }

  #pf-results-modal .nutrition-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #pf-results-modal .nutrition-title h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.5rem !important;
    line-height: 1.15 !important;
  }

  #pf-results-modal .nutrition-title p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.25 !important;
    opacity: 0.8 !important;
  }

  #pf-results-modal .nutrition-title .badge {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
  }

  #pf-results-modal .nutrition-selected-chip,
     #pf-results-modal .nutrition-ing-pill {
    margin-top: 6px !important;
  }

  #pf-results-modal .nutrition-results-card {
    padding: 14px 14px 12px !important;
    text-align: left !important;
  }

  #pf-results-modal .nutrition-results-top {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 6px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
  }

  #pf-results-modal .nutrition-title .badge {
    display: none !important;
  }

  #pf-results-modal .nutrition-title {
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
  }

  #pf-results-modal .nutrition-title h3 {
    margin: 0 !important;
    font-size: 1.5rem !important;
    line-height: 1.15 !important;
  }

  #pf-results-modal .nutrition-title p {
    margin: 0 !important;
    font-size: 0.92rem !important;
    line-height: 1.25 !important;
    opacity: 0.8 !important;
  }

  #pf-results-modal .nutrition-selected-chip,
     #pf-results-modal .nutrition-ing-pill {
    margin-top: 4px !important;
  }

  #pf-results-modal #allergens-tab-pane {
    padding: 0 !important;
  }

  #pf-results-modal #allergen-profile,
     #pf-results-modal #allergens-results-body {
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  #pf-results-modal #allergen-profile {
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 16px !important;
    background: #fff !important;
    padding: 10px 12px !important;
    margin: 10px auto 12px auto !important;
    box-shadow: none !important;
  }

  #pf-results-modal #allergen-profile .pf-ap-title {
    font-size: 0.95rem !important;
    line-height: 1.15 !important;
    margin: 0 0 6px 0 !important;
  }

  #pf-results-modal #allergen-profile * {
    max-width: 100%;
  }

  #pf-results-modal #allergen-profile p,
     #pf-results-modal #allergen-profile h3,
     #pf-results-modal #allergen-profile h4 {
    margin: 6px 0 !important;
  }

  #pf-results-modal #allergens-results-body {
    padding: 0 !important;
  }

  #pf-results-modal #allergens-results-body [class*="card"],
     #pf-results-modal #allergens-results-body [class*="panel"],
     #pf-results-modal #allergens-results-body [class*="box"] {
    box-shadow: none !important;
  }

  #pf-results-modal #allergens-results-body ul,
     #pf-results-modal #allergens-results-body ol {
    padding-left: 18px !important;
    margin: 8px 0 !important;
  }

  #pf-results-modal #allergens-results-body table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #pf-results-modal #allergens-tab-pane h2,
     #pf-results-modal #allergens-tab-pane h3 {
    margin: 8px 0 !important;
    line-height: 1.15 !important;
  }

  #pf-results-modal #allergens-tab-pane {
    padding: 0 !important;
  }

  #pf-results-modal #allergens-results-body,
     #pf-results-modal #allergen-profile {
    width: calc(100% - 16px) !important;
    max-width: 360px !important;
    margin: 10px auto !important;
  }

  #pf-results-modal #allergen-profile {
    padding: 10px 12px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  #pf-results-modal #allergen-profile .pf-ap-title {
    margin: 0 0 6px 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.15 !important;
  }

  #pf-results-modal #allergens-results-body {
    padding: 0 !important;
  }

  #pf-results-modal .pf-allergen-inline {
    width: calc(100% - 16px) !important;
    max-width: 360px !important;
    margin: 10px auto !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  #pf-results-modal .allergen-list {
    width: calc(100% - 16px) !important;
    max-width: 360px !important;
    margin: 10px auto !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  #pf-results-modal .allergen-badge {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 6px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  #pf-results-modal .allergen-badge:not(:last-child) {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  }

  #pf-results-modal .allergen-badge * {
    max-width: 100% !important;
  }

  #pf-results-modal #allergens-results-body ul,
     #pf-results-modal #allergens-results-body ol {
    margin: 8px 0 !important;
    padding-left: 18px !important;
  }

  #pf-results-modal #allergens-results-body table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #pf-results-modal .pf-results-sheet {
    max-height: calc(100dvh - 24px) !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-results-modal .pf-results-sheet-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain !important;
    touch-action: pan-y;
  }

  #pf-results-modal .pf-results-sheet-body {
    overflow: hidden !important;
    min-height: 0 !important;
    padding: 12px 14px !important;
  }

  #pf-results-modal #ingredient-results-card {
    height: calc(100dvh - 170px) !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-results-modal #ingredient-results-card .tabs {
    flex: 0 0 auto !important;
  }

  #pf-results-modal #ingredient-results-card .tab-pane.active {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-results-modal #ingredient-results-card .tab-pane.active .results-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain !important;
  }

  #pf-results-modal #allergens-results-body {
    overflow-y: auto !important;
  }

  #pf-results-modal .pf-results-sheet-body {
    overflow: hidden !important;
    min-height: 0 !important;
  }

  #pf-results-modal #ingredient-results-card {
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-results-modal #ingredient-results-card .results-header,
     #pf-results-modal #ingredient-results-card .tabs {
    flex: 0 0 auto !important;
  }

  #pf-results-modal #ingredient-results-card .tab-pane.active {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain !important;
    padding-bottom: 12px !important;
  }

  #pf-results-modal #ingredient-results-card .tab-pane .results-body {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  #pf-results-modal .pf-results-sheet {
    width: min(94vw, 420px) !important;
    max-height: min(92dvh, 760px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-results-modal .pf-results-sheet-body {
    overflow: hidden !important;
    min-height: 0 !important;
  }

  #pf-results-modal .results-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  #pf-results-modal .pf-results-sheet-body .results-container .tabs {
    flex: 0 0 auto !important;
  }

  #pf-results-modal .pf-results-sheet-body .results-container .tab-pane.active {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #pf-results-modal .tab-pane.active .results-body {
    overflow-y: auto !important;
    flex: 1 !important;
    min-height: 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #pf-results-modal
       .pf-results-sheet-body
       .results-container
       .tab-pane.active
       .results-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain !important;
  }

  #pf-results-modal .pf-results-sheet {
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  #pf-results-modal .pf-results-sheet-header {
    padding: 12px 14px !important;
  }

  #pf-results-modal .pf-results-sheet-title {
    font-size: 1.375rem !important;
    font-weight: 800 !important;
  }

  @media (max-width: 768px) {
    #pf-results-modal .pf-results-sheet-title {
      font-size: 1.25rem !important;
    }
  }

  #pf-results-modal .pf-results-close {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
  }

  #pf-results-modal .pf-results-sheet-body {
    padding: 0 !important;
  }

  #pf-results-modal .pf-results-sheet-body .results-container {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  #pf-results-modal .pf-results-sheet-body .results-container .tabs {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
    background: #fff !important;
  }

  #pf-results-modal .pf-results-sheet-body .results-container .tabs .tab,
     #pf-results-modal .results-container .tabs .tab,
     #pf-results-modal .tabs .tab,
     #pf-results-modal .tabs button[data-tab] {
    padding: 8px 12px !important;
    font-size: 1rem !important;
    border-radius: 999px !important;
  }

  #pf-results-modal
       .pf-results-sheet-body
       .results-container
       .tab-pane.active
       .results-body {
    padding: 12px 12px 16px !important;
  }

  #pf-results-modal .nutrition-title h3,
     #pf-results-modal .pf-a-title,
     #pf-results-modal .pf-hb2-title {
    font-size: 1.5rem !important;
  }

  #pf-results-modal .nutrition-results-card {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
  }

  #pf-results-modal .nutrition-results-top {
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
    align-items: flex-start !important;
  }

  #pf-results-modal .nutrition-title .badge {
    display: none !important;
  }

  #pf-results-modal .nutrition-title h3 {
    font-size: 1.5rem !important;
    margin: 0 !important;
    line-height: 1.2 !important;
  }

  #pf-results-modal .nutrition-title p {
    font-size: 0.88rem !important;
    margin: 6px 0 0 0 !important;
    opacity: 0.85 !important;
  }

  #pf-results-modal .nutrition-selected-chip,
     #pf-results-modal .nutrition-ing-pill {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    border-radius: 16px !important;
    padding: 10px 12px !important;
    min-height: auto !important;
  }

  #pf-results-modal .nutrition-tile-compact .top {
    gap: 6px !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.8rem !important;
    letter-spacing: 0.04em !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    font-size: 1.08rem !important;
    line-height: 1.15 !important;
  }
}

@media (max-width: 360px) {
  #pf-results-modal .nutrition-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 1024px) {
  #pf-results-modal .pf-ing-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    border-radius: 0 !important;
    white-space: nowrap !important;
    gap: 0 !important;
  }

  #pf-results-modal .pf-ing-pill__sep {
    margin: 0 8px !important;
    opacity: 0.55 !important;
  }

  #pf-results-modal .pf-ing-pill__name {
    display: inline !important;
  }

  #pf-results-modal .pf-ing-pill__serving {
    display: inline !important;
  }

  #pf-results-modal .nutrition-selected-chip .pf-ing-pill__name {
    font-weight: 900 !important;
    font-size: 0.92rem !important;
    color: #0f172a !important;
  }

  #pf-results-modal .nutrition-selected-chip .pf-ing-pill__serving {
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    color: rgba(15, 23, 42, 0.6) !important;
  }

  #pf-results-modal .nutrition-selected-chip,
     #pf-results-modal .pf-a-chip,
     #pf-results-modal .pf-hb2-chip,
     #pf-results-modal .nutrition-ing-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(14, 165, 164, 0.25) !important;
    background: transparent !important;
    width: fit-content !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  #pf-results-modal .nutrition-selected-chip .name,
     #pf-results-modal .pf-a-chip .name,
     #pf-results-modal .pf-hb2-chip .name,
     #pf-results-modal .nutrition-ing-pill .name,
     #pf-results-modal .pf-ing-pill__name {
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 700 !important;
  }

  #pf-results-modal .nutrition-selected-chip .serving,
     #pf-results-modal .pf-a-chip .serving,
     #pf-results-modal .pf-hb2-chip .serving,
     #pf-results-modal .nutrition-ing-pill .serving,
     #pf-results-modal .pf-ing-pill__serving {
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 600 !important;
    opacity: 0.75 !important;
  }

  #pf-results-modal .pf-ing-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(14, 165, 164, 0.25) !important;
    background: transparent !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    width: fit-content !important;
    max-width: 100% !important;
    white-space: nowrap !important;
  }

  #pf-results-modal .pf-ing-pill__name {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #pf-results-modal .pf-ing-pill__sep {
    margin: 0 8px !important;
    opacity: 0.55 !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 6px;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__badge {
    margin: 6px auto 10px auto;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__badge
       .allergen-badge {
    width: 150px;
    height: 150px;
    max-width: 150px;
    margin: 0;
    transform: none;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__badge
       .pf-a-pill-dot {
    display: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing {
    margin: 0 auto 16px auto;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__copy {
    margin: 0 auto 10px auto;
    max-width: 360px;
    width: 100%;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__copy
       .pf-a-title {
    font-size: 1.5rem !important;
    margin: 0 0 6px 0 !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__copy
       .pf-a-subtitle {
    margin: 0 !important;
  }

  #pf-results-modal #allergens-results-body {
    overflow: visible !important;
    padding: 14px 12px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-wrap {
    margin: 0 !important;
    max-width: 100% !important;
    gap: 14px !important;
  }

  #pf-results-modal #allergens-results-body .pf-allergen-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-top: 6px !important;
    margin-bottom: 0 !important;
  }

  #pf-results-modal
       #allergens-results-body
       .pf-allergen-hero__badge
       .pf-a-pill-dot {
    display: none !important;
  }

  #pf-results-modal #allergens-results-body .pf-allergen-hero__badge {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 6px auto 10px auto !important;
  }

  #pf-results-modal #allergens-results-body .pf-allergen-hero__ing {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto 16px auto !important;
  }

  #pf-results-modal #allergens-results-body .pf-allergen-hero__copy {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto 10px auto !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-title {
    font-size: 1.5rem !important;
    margin-bottom: 6px !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-subtitle {
    font-size: 0.85rem !important;
    margin-top: 4px !important;
    max-width: 100% !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-subchips {
    margin-top: 8px !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-grid {
    margin-top: 8px !important;
    gap: 12px !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-card {
    padding: 12px 14px !important;
    margin: 0 !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc {
    width: 100% !important;
    margin-top: 12px !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-btn {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    font-weight: 800 !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    background: #fff !important;
    cursor: pointer !important;
    text-align: left !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-btn > span:last-child {
    transition: transform 0.2s ease !important;
  }

  #pf-results-modal
       #allergens-results-body
       .pf-a-acc-btn[aria-expanded="true"]
       > span:last-child {
    transform: rotate(180deg) !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-panel {
    padding: 12px 14px !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    border-top: 0 !important;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
    background: #fff !important;
    display: block !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-panel[hidden] {
    display: none !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-panel .pf-a-tags {
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-panel .pf-a-list {
    margin: 0 !important;
    padding-left: 18px !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-acc-panel .pf-a-list li {
    margin: 8px 0 !important;
    line-height: 1.5 !important;
  }

  #pf-results-modal #allergens-results-body img,
     #pf-results-modal #allergens-results-body svg,
     #pf-results-modal #allergens-results-body canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  #pf-results-modal #allergens-results-body .pf-a-wrap,
     #pf-results-modal #allergens-results-body .pf-a-header,
     #pf-results-modal #allergens-results-body .pf-a-grid,
     #pf-results-modal #allergens-results-body .pf-a-card,
     #pf-results-modal #allergens-results-body .pf-a-acc {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #pf-results-modal #health-benefits-results-body .pf-hb2-title {
    font-size: 1.5rem !important;
  }

  #pf-results-modal #nutrition-results-body {
    padding: 12px 10px 14px !important;
  }

  #pf-results-modal .nutrition-results-card {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  #pf-results-modal .nutrition-results-top {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #pf-results-modal .nutrition-title {
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-results-modal .nutrition-title h3 {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    color: #0f172a !important;
  }

  #pf-results-modal .nutrition-title p {
    font-size: 0.875rem !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    color: rgba(15, 23, 42, 0.65) !important;
  }

  #pf-results-modal .nutrition-title .badge {
    display: none !important;
  }

  #pf-results-modal .nutrition-selected-chip {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
  }

  #pf-results-modal .nutrition-summary-grid {
    margin: 12px 0 0 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #pf-results-modal .nutrition-tile-compact {
    background: transparent !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    margin: 0 !important;
    min-height: auto !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
  }

  #pf-results-modal .nutrition-tile-compact .top {
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  #pf-results-modal .nutrition-tile-compact .label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    color: rgba(15, 23, 42, 0.7) !important;
  }

  #pf-results-modal .nutrition-tile-compact .value {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #0f172a !important;
  }

  #pf-results-modal .nutrition-ingredients-list {
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
  }

  #pf-results-modal .nutrition-ingredients-list .nutrition-ing-pill {
    margin: 0 4px 6px 0 !important;
  }

  #pf-results-modal .nutrition-results-card > * {
    margin-top: 0 !important;
  }

  #pf-results-modal .nutrition-results-card > * + * {
    margin-top: 14px !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .allergen-badge {
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    background: #fff !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       > * {
    border-radius: 999px !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       .pf-a-chip {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(14, 165, 164, 0.22) !important;
    background: transparent !important;
    border-radius: 999px !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       .pf-a-chip
       .pf-ing-pill {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       .nutrition-selected-chip
       .pf-ing-pill,
     #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       .nutrition-ing-pill {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  #pf-results-modal .pf-ing-pill {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    padding: 10px 14px !important;
    border: 2px solid rgba(14, 165, 164, 0.22) !important;
    background: transparent !important;
    border-radius: 999px !important;
    box-shadow: none !important;
  }

  #pf-results-modal .pf-ing-pill__sep {
    margin: 0 8px !important;
    opacity: 0.55 !important;
  }

  #pf-results-modal .nutrition-selected-chip,
     #pf-results-modal .nutrition-ing-pill,
     #pf-results-modal .pf-a-chip,
     #pf-results-modal .pf-hb2-chip {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  #pf-results-modal #allergens-results-body .pf-allergen-inline {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    background: #fff !important;
    border-radius: 16px !important;
    width: fit-content !important;
    max-width: 92% !important;
    margin: 0 auto 14px auto !important;
  }

  #pf-results-modal #allergens-results-body .allergen-badge {
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    border-radius: 18px !important;
    aspect-ratio: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08) !important;
    max-width: min(92%, 340px) !important;
    margin: 10px auto 14px auto !important;
    text-align: center !important;
  }

  #pf-results-modal #allergens-results-body .allergen-badge * {
    max-width: 100% !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-top: 12px !important;
    gap: 0 !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__copy {
    order: 1 !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto 20px auto !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__copy
       .pf-a-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin: 0 0 8px 0 !important;
    color: #0f172a !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__copy
       .pf-a-subtitle {
    font-size: 0.9rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__badge {
    order: 2 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto 16px auto !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__badge
       .allergen-badge {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 12px 18px !important;
    border: 1px solid rgba(15, 23, 42, 0.15) !important;
    border-radius: 999px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
    max-width: calc(100% - 24px) !important;
    margin: 0 !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__badge
       .pf-a-pill-dot {
    display: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing {
    order: 3 !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       .pf-a-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(14, 165, 164, 0.35) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       .pf-a-chip
       .pf-ing-pill {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #allergens-results-body
       .pf-allergen-hero__ing
       > .pf-ing-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(14, 165, 164, 0.35) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-top: 12px !important;
    gap: 0 !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__copy {
    order: 1 !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto 20px auto !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__copy
       .nutrition-title {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    align-items: center !important;
    text-align: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__copy
       .nutrition-title
       .badge {
    display: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__copy
       .nutrition-title
       h3 {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin: 0 0 8px 0 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__copy
       .nutrition-title
       p {
    font-size: 0.9rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__ing {
    order: 2 !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__ing
       .nutrition-selected-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(14, 165, 164, 0.35) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #nutrition-results-body
       .pf-nutrition-hero__ing
       .nutrition-selected-chip
       .pf-ing-pill {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-top: 12px !important;
    gap: 0 !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero__copy {
    order: 1 !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto 20px auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    align-items: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero__copy
       .pf-hb2-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    text-align: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero__copy
       .pf-hb2-subtitle {
    font-size: 0.9rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero__ing {
    order: 2 !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero__ing
       .pf-hb2-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(14, 165, 164, 0.35) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }

  #pf-results-modal[aria-hidden="false"]
       #health-benefits-results-body
       .pf-hb2-hero__ing
       .pf-hb2-chip
       .pf-ing-pill {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
}

#pf-smoothie-modal[aria-hidden="true"] {
  display: none !important;
}

#pf-smoothie-modal[aria-hidden="false"] {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
  background: rgba(0, 0, 0, 0.35) !important;
}

@media (max-width: 1024px) {
  #smoothie-results-card.pf-smoothie-hidden {
    display: none !important;
  }

  #pf-smoothie-modal .pf-results-sheet {
    width: min(94vw, 420px) !important;
    max-height: min(92dvh, 760px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #pf-smoothie-sheet-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #pf-smoothie-modal[aria-hidden="false"] #smoothie-results-card {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
  }

  #pf-smoothie-modal .results-body {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 10px 12px !important;
    white-space: normal !important;
    font-family: inherit !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

@media (min-width: 1025px) {
  #smoothie-results-card.pf-smoothie-hidden {
    display: flex !important;
  }
}

.sn-actions {
  display: flex !important;
  gap: 12px !important;
  align-items: stretch !important;
  flex-wrap: wrap !important;
}

.sn-actions #build-smoothie-btn {
  height: 52px !important;
  border-radius: 18px !important;
  white-space: nowrap !important;
  flex: 1 1 220px !important;
  min-width: 220px !important;
  width: auto !important;
}

.sn-actions #smoothie-clear-btn {
  height: 52px !important;
  border-radius: 18px !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  min-width: 140px !important;
  width: auto !important;
}

@media (max-width: 520px) {
  .sn-actions {
    flex-direction: column !important;
  }

  .sn-actions #build-smoothie-btn,
     .sn-actions #smoothie-clear-btn {
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
  }
}

.ss-edit-modal .ssm-modal-card {
  max-width: 860px !important;
  width: 94vw !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.ss-edit-modal .ssm-modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
}

.ss-edit-modal .ssm-modal-title {
  flex: 1 !important;
  text-align: left !important;
}

.ss-edit-modal .ssm-modal-close {
  flex: 0 0 auto !important;
}

.ss-edit-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: 70dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.ss-edit-summary {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 12px !important;
  font-size: 0.85rem !important;
}

.ss-edit-summary span {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.8rem !important;
}

.ss-edit-modal .ssm-row {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 14px 16px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  margin-bottom: 8px;
}

.ss-edit-modal .ssm-row:first-child {
  border-top: none !important;
}

.ss-edit-modal .ssm-info {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ss-edit-modal .ssm-name {
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
}

.ss-edit-modal .ssm-meta {
  opacity: 0.75 !important;
  font-size: 0.85rem !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ss-edit-modal .ssm-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 6px !important;
}

.ss-edit-modal .ssm-qty {
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.ss-edit-modal .ssm-qty .ss-qty-control {
  height: 44px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.04) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
}

.ss-edit-modal .ssm-qty .ss-qty-btn {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 100% !important;
  border: none !important;
  background: transparent !important;
  color: rgba(15, 23, 42, 0.7) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.15s ease !important;
}

.ss-edit-modal .ssm-qty .ss-qty-btn:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.08) !important;
}

.ss-edit-modal .ssm-qty .ss-qty-btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

.ss-edit-modal .ssm-qty .ss-qty-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: rgba(15, 23, 42, 0.9) !important;
  padding: 0 4px !important;
}

.ss-edit-modal .ss-remove-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  color: rgba(239, 68, 68, 0.9) !important;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  flex: 0 0 44px !important;
}

.ss-edit-modal .ss-remove-btn:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

@media (max-width: 1024px) {
  #smoothie-tab-content .sb-ing-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }

  #smoothie-tab-content .sb-ing-header > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  #smoothie-tab-content .sb-ing-header .ssm-edit-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  #smoothie-tab-content .ssm-chipstrip {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    padding-right: 8px !important;
  }

  #smoothie-tab-content .ssm-chip {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 520px) {
  #smoothie-tab-content .sb-ing-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #smoothie-tab-content .sb-ing-header > div:first-child {
    width: 100% !important;
  }

  #smoothie-tab-content .sb-ing-header .ssm-edit-btn {
    width: 100% !important;
    margin-top: 8px !important;
  }
}

@media (max-width: 1024px) {
  #smoothie-tab-content .ssm-summary,
     #smoothie-tab-content .ssm-summary-header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #smoothie-tab-content .ssm-summary {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #smoothie-tab-content .ssm-summary,
     #smoothie-tab-content .ssm-summary-header,
     #smoothie-tab-content .ssm-summary-body,
     #smoothie-tab-content .ssm-summary-footer,
     #smoothie-tab-content .sb-ing-header {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  #smoothie-tab-content .ssm-summary {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
  }

  #smoothie-tab-content .ssm-summary-header.sb-ing-header {
    width: auto !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }

  #smoothie-tab-content .ssm-summary-header.sb-ing-header button {
    max-width: 100% !important;
  }

  #smoothie-tab-content .ssm-summary-pills {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-right: 12px !important;
  }

  #smoothie-tab-content .ssm-summary-pills > * {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 520px) {
  #smoothie-tab-content .ssm-summary-header.sb-ing-header button {
    width: 100% !important;
  }
}

@media (max-width: 1024px) {
  #smoothie-tab-content {
    overflow-x: hidden !important;
  }

  #smoothie-tab-content .ssm-summary-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #smoothie-tab-content .ssm-summary-header,
     #smoothie-tab-content .ssm-summary-title,
     #smoothie-tab-content .ssm-summary-meta {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #smoothie-tab-content .ssm-chipstrip {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .sn-ing-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    flex-wrap: unset !important;
  }

  .sn-ing-pill {
    display: flex !important;
    align-items: center !important;
    height: 44px !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    box-shadow: none !important;
    gap: 6px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .sn-ing-pill__name {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #78350f !important;
  }

  .sn-ing-pill__badges {
    display: none !important;
  }

  .sn-ing-pill__sep {
    flex-shrink: 0 !important;
    font-size: 0.75rem !important;
    color: #92400e !important;
    opacity: 0.7 !important;
  }

  .sn-ing-pill__amt {
    flex-shrink: 0 !important;
    font-size: 0.75rem !important;
    color: #92400e !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }

  #smoothie-tab-content .sn-card.sn-card--warm {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #smoothie-tab-content .sn-card.sn-card--warm .sn-body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #smoothie-tab-content .sn-card.sn-card--warm #smoothie-ingredients-panel {
    height: auto !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #smoothie-tab-content .sn-card.sn-card--warm .sn-ing-grid {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
  }
}

#smoothie-tab-content #smoothie-results-body.results-body,
   #pf-smoothie-sheet-body #smoothie-results-body.results-body {
  padding: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  display: block !important;
}

#pf-smoothie-sheet-body.pf-results-sheet-body {
  padding: 0 !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"]
     #smoothie-results-card {
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"]
     #smoothie-results-body {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"] .sn-card {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: flex-start !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"]
     .sn-card.sn-card--warm {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"]
     .sn-card.sn-card--warm
     .sn-body {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"]
     #smoothie-ingredients-panel {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pf-results-sheet[role="dialog"][aria-label="Smoothie Nutrition"]
     .sn-card.sn-card--warm
     .sn-ing-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

@media (min-width: 1025px) {
  #smoothie-tab-content .main-content-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 725px !important;
    gap: 25px !important;
    align-items: start !important;
  }

  #smoothie-tab-content #pf-smoothie-card-home {
    display: none !important;
  }

  #smoothie-tab-content .main-content-grid > .card.search-container {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
  }

  #smoothie-tab-content #smoothie-results-card {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    width: 725px !important;
    max-width: 725px !important;
    min-width: 725px !important;
  }

  #smoothie-tab-content .main-content-grid {
    align-items: stretch !important;
  }

  #smoothie-tab-content .main-content-grid > .card.search-container,
     #smoothie-tab-content #smoothie-results-card {
    align-self: stretch !important;
    height: 100% !important;
  }

  #smoothie-tab-content .main-content-grid > .card.search-container {
    display: flex !important;
    flex-direction: column !important;
  }

  #smoothie-tab-content #smoothie-results-card {
    display: flex !important;
    flex-direction: column !important;
  }

  #smoothie-tab-content #smoothie-results-card .results-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  #smoothie-results-card .sn-grid {
    align-items: stretch !important;
  }

  #smoothie-results-card .sn-grid > .sn-card {
    height: 100% !important;
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  #smoothie-results-card .sn-grid > .sn-card > .sn-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  #smoothie-results-card .sn-grid > .sn-card {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.08) !important;
    overflow: hidden !important;
  }

  #smoothie-results-card .sn-grid > .sn-card::before {
    content: "" !important;
    display: block !important;
    height: 6px !important;
  }

  #smoothie-results-card .sn-grid > .sn-card.sn-card--warm::before {
    background: linear-gradient(
         90deg,
         rgba(245, 158, 11, 0.95),
         rgba(249, 115, 22, 0.95)
       ) !important;
  }

  #smoothie-results-card .sn-grid > .sn-card.sn-card--cool::before {
    background: linear-gradient(
         90deg,
         rgba(56, 189, 248, 0.95),
         rgba(59, 130, 246, 0.95)
       ) !important;
  }

  #smoothie-results-card .sn-grid > .sn-card .sn-head {
    padding: 16px 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(6px) !important;
  }

  #smoothie-results-card .sn-grid > .sn-card .sn-title {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    line-height: 1.15 !important;
  }

  #smoothie-results-card .sn-grid > .sn-card .sn-meta {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: rgba(15, 23, 42, 0.72) !important;
    background: rgba(15, 23, 42, 0.06) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  #smoothie-results-card .sn-grid > .sn-card .sn-body {
    padding: 16px 18px !important;
  }

  #smoothie-results-card .sn-grid > .sn-card.sn-card--cool .sn-body {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  #smoothie-results-card
       .sn-grid
       > .sn-card.sn-card--warm
       #smoothie-ingredients-panel {
    padding: 2px !important;
  }

  #smoothie-results-card .sn-grid {
    align-items: stretch !important;
  }

  #smoothie-results-card .sn-grid > .sn-card {
    height: 100% !important;
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  #smoothie-results-card .sn-grid > .sn-card > .sn-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
}

#smoothie-results-card .sn-grid {
  align-items: stretch;
}

#smoothie-results-card .sn-grid .sn-card {
  display: flex;
  flex-direction: column;
}

#smoothie-results-card .sn-grid .sn-card .sn-body {
  flex: 1 1 auto;
}

#smoothie-results-card .sn-grid .sn-card--cool .sn-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#smoothie-results-card #smoothie-yield-panel {
  width: 100%;
}

#smoothie-results-card .sn-grid .sn-card--cool .sn-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

#smoothie-results-card .sn-card--cool #smoothie-yield-panel {
  margin-top: auto !important;
  margin-bottom: auto !important;
}

@media (min-width: 1025px) {
  #smoothie-tab-content .main-content-grid {
    align-items: start !important;
  }

  #smoothie-tab-content .main-content-grid > .card.search-container {
    align-self: start !important;
  }

  #smoothie-tab-content .main-content-grid {
    align-items: start !important;
  }

  #smoothie-tab-content .main-content-grid > .card.search-container {
    align-self: start !important;
    height: auto !important;
    min-height: unset !important;
  }

  #smoothie-tab-content .card.search-container .sn-actions {
    margin-top: 16px !important;
  }
}

#smoothie-tab-content .sn-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  align-items: stretch !important;
}

#smoothie-tab-content #build-smoothie-btn,
   #smoothie-tab-content #smoothie-clear-btn {
  height: 64px !important;
  padding: 0 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  flex: 1 1 auto !important;
}

#smoothie-tab-content .card.search-container .sn-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
}

#smoothie-tab-content .card.search-container .sn-actions > #build-smoothie-btn,
   #smoothie-tab-content .card.search-container .sn-actions > #smoothie-clear-btn {
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding: 0 22px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  flex: 1 1 auto !important;
}

#ingredient-tab-content #ingredient-list,
   #ingredient-tab-content #recommended-list {
  text-transform: capitalize;
}

@media (max-width: 640px) {
  #ingredient-tab-content #ingredient-list button,
     #ingredient-tab-content #recommended-list button {
    height: auto !important;
    align-self: center !important;
    min-height: clamp(34px, 9vw, 44px) !important;
    padding: 0 clamp(12px, 3.5vw, 16px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
    white-space: nowrap;
  }

  #ingredient-tab-content #ingredient-list > *,
     #ingredient-tab-content #recommended-list > * {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  #ingredient-tab-content #ingredient-list > * > :first-child:not(button),
     #ingredient-tab-content #recommended-list > * > :first-child:not(button) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 768px) {
  .pf-navbar {
    position: relative;
    padding: 14px 20px !important;
    flex-wrap: nowrap !important;
  }

  .pf-navbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: relative;
  }

  .pf-navbar .navbar-brand {
    width: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }

  .pf-nav-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
  }

  .pf-nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
    flex-shrink: 0;
  }

  .pf-nav-burger span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  .pf-nav-check:checked ~ .pf-nav-burger span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .pf-nav-check:checked ~ .pf-nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .pf-nav-check:checked ~ .pf-nav-burger span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
  }

  .pf-nav-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 10px;
    padding: 20px;
    z-index: 1000;
    flex-direction: column;
    gap: 20px;
  }

  .pf-nav-check:checked ~ .pf-nav-collapse {
    display: flex;
  }

  .pf-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .pf-nav-links a {
    color: #0f172a;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
  }

  .pf-nav-links a:hover {
    background: rgba(14, 165, 164, 0.1);
    color: #0ea5a4;
  }

  .pf-nav-auth {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
  }

  .pf-nav-auth a {
    color: #0f172a !important;
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: inline-block;
    width: auto;
  }

  .pf-nav-auth a:hover,
     .pf-nav-auth a:focus,
     .pf-nav-auth a:active,
     .pf-nav-auth a:visited {
    color: #0ea5a4 !important;
    text-decoration: none !important;
    background: rgba(14, 165, 164, 0.1);
  }

  .pf-nav-auth span:not(.pf-nav-sep) {
    color: #64748b;
    font-size: 0.9rem;
    padding: 0;
    flex: 1 1 100%;
  }

  .pf-nav-sep {
    color: #64748b;
    opacity: 0.5;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 4px;
    flex-shrink: 0;
  }

  .navbar-nav,
     .navbar-auth {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .pf-nav-burger {
    display: none;
  }

  .pf-nav-collapse {
    display: flex !important;
    position: static;
    background: transparent;
    box-shadow: none;
    margin-top: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 0;
    width: auto;
  }

  .pf-nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
    font-size: 0.95rem;
    width: auto;
  }

  .pf-nav-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .pf-nav-links a:hover {
    opacity: 1;
    text-decoration: underline;
    background: transparent;
    color: white;
  }

  .pf-nav-auth {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: white;
    width: auto;
    padding-top: 0;
    border-top: none;
  }

  .pf-nav-auth a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .pf-nav-auth a:hover {
    opacity: 1;
    text-decoration: underline;
    background: transparent;
    color: white;
  }

  .pf-nav-auth span {
    opacity: 0.7;
    color: white;
    padding: 0;
  }
}

#nutrition-tab-pane {
  min-height: 0 !important;
}

#nutrition-results-body.results-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding: 12px 14px !important;
  overflow-y: visible !important;
  max-height: none !important;
  height: auto !important;
}

#nutrition-results-body.results-body .nutrition-results-card {
  margin: 0 !important;
}

#nutrition-results-body.results-body .nutrition-results-top {
  margin: 0 !important;
}

#nutrition-results-body.results-body .nutrition-summary-grid {
  margin-top: 8px !important;
  gap: 8px !important;
}

@media (max-width: 768px) {
  #nutrition-results-body.results-body {
    padding: 10px 12px !important;
  }

  #nutrition-results-body.results-body .nutrition-tile-compact {
    padding: 8px 10px !important;
  }
}

#nutrition-results-body.results-body {
  padding: 12px !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  font-family: inherit !important;
  line-height: 1.45 !important;
  background: transparent !important;
  border: none !important;
}

#allergens-results-body > .pf-a-wrap {
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  border-radius: var(--radius) !important;
  padding: 16px !important;
  box-shadow: var(--shadow-sm) !important;
  margin: 0 !important;
}

#allergens-results-body > .pf-a-wrap .pf-allergen-hero {
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  grid-template-areas: "copy badge"
       "copy ing";
  gap: 10px 12px !important;
  align-items: start !important;
}

#allergens-results-body > .pf-a-wrap .pf-allergen-hero__copy {
  grid-area: copy;
}

#allergens-results-body > .pf-a-wrap .pf-allergen-hero__badge {
  grid-area: badge;
  justify-self: end;
  align-self: start;
  margin: 0 !important;
}

#allergens-results-body > .pf-a-wrap .pf-allergen-hero__ing {
  grid-area: ing;
  justify-self: end;
  align-self: start;
  margin: 0 !important;
}

#allergens-results-body .pf-a-headRight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

#allergens-results-body .pf-a-body {
  display: grid;
  gap: 12px;
  padding-top: 10px;
}

#allergens-results-body .pf-a-okCallout {
  border: 1px solid rgba(34, 160, 107, 0.25);
  background: rgba(34, 160, 107, 0.08);
  border-radius: 14px;
  padding: 14px;
  font-weight: 700;
  color: #0f172a;
}

#allergens-results-body .pf-a-okCallout .t1 {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

#allergens-results-body .pf-a-okCallout .t2 {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

#allergens-results-body .pf-a-section {
  display: grid;
  gap: 10px;
}

#allergens-results-body .pf-a-sectionTitle {
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

#allergens-results-body .pf-a-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#allergens-results-body details.pf-a-details {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
}

#allergens-results-body details.pf-a-details > summary {
  cursor: pointer;
  font-weight: 800;
  color: #0f172a;
  list-style: none;
}

#allergens-results-body details.pf-a-details > summary::-webkit-details-marker {
  display: none;
}

#allergens-results-body .pf-a-detailsBody {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

:root {
  --pf-bg-1: rgba(36, 140, 138, 0.94);
  --pf-bg-2: rgba(52, 168, 165, 0.9);
  --pf-border: rgba(255, 255, 255, 0.18);
  --pf-text: #ffffff;
  --pf-glow: rgba(0, 0, 0, 0.15);
  --pf-font: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
}

.pf-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: linear-gradient(90deg, var(--pf-bg-2), var(--pf-bg-1));
  border-bottom: 1px solid var(--pf-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  font-family: var(--pf-font);
}

.pf-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pf-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pf-text);
}

.pf-brand__text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(to bottom, #ffffff, #e0f2f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pf-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--pf-border);
  background: rgba(255, 255, 255, 0.1);
  color: var(--pf-text);
}

.pf-nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--pf-border);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.pf-nav__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
}

.pf-nav__menu {
  display: flex;
  align-items: center;
  gap: 18px;
}

.pf-nav__links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pf-nav__link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  opacity: 0.85;
}

.pf-nav__link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.pf-nav__link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: white;
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: right;
}

.pf-nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.pf-nav__link:active {
  transform: translateY(1px);
}

.pf-nav__auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.92);
  transition: background 160ms ease,
       border-color 160ms ease,
       transform 160ms ease;
}

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

.pf-btn--ghost {
  background: transparent;
  border-color: var(--pf-border);
}

.pf-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pf-btn--primary {
  background: #ffffff;
  color: #0ea5a4 !important;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.pf-btn--primary:hover {
  background: #f0fdfa;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.pf-nav__who {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 860px) {
  .pf-nav__toggle {
    display: inline-block;
  }

  .pf-nav__menu {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--pf-border);
    background: rgba(0, 0, 0, 0.14);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pf-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .pf-nav__link {
    padding: 12px 12px;
    background: rgba(255, 255, 255, 0.06);
  }

  .pf-nav__auth {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-nav__auth .pf-btn {
    width: 100%;
  }

  .pf-header.is-open .pf-nav__menu {
    display: flex;
  }
}

#pf-results-modal .nutrition-ing-pill .name,
   #pf-results-modal .pf-ing-pill__name {
  text-transform: capitalize;
}

#pf-results-modal .sn-ing-pill__name {
  text-transform: capitalize;
}

.nutrition-ing-pill .name,
   .pf-ing-pill__name,
   .sn-ing-pill__name {
  text-transform: capitalize !important;
}

.pf-hb2-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-hb2-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-hb2-hero__ing {
  display: flex;
}

.pf-a-detailsBody {
  display: flex;
}

.pf-a-list {
  display: flex;
  flex-direction: column;
}

.nutrition-title {
  display: flex;
}

.normal_gapping {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-analysis-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: auto;
  max-height: 577px;
  border: 1px solid rgba(14, 165, 164, 0.1);
}

.pf-analysis-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
       0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pf-analysis-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(14, 165, 164, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.pf-analysis-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-analysis-title::before {
  content: "";
  display: block;
  width: 5px;
  height: 24px;
  background: #0ea5a4;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(14, 165, 164, 0.4);
}

.pf-analysis-tabs {
  display: flex;
  padding: 0 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafbfc;
  gap: 32px;
}

.pf-analysis-tab {
  background: none;
  border: none;
  padding: 16px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pf-analysis-tab:hover {
  color: #0ea5a4;
}

.pf-analysis-tab.active {
  color: #0ea5a4;
}

.pf-analysis-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #0ea5a4;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 6px rgba(14, 165, 164, 0.3);
}

.pf-analysis-tab-icon {
  font-size: 1.1rem;
  filter: grayscale(100%);
  transition: filter 0.2s ease;
}

.pf-analysis-tab:hover .pf-analysis-tab-icon,
   .pf-analysis-tab.active .pf-analysis-tab-icon {
  filter: grayscale(0%);
}

.pf-analysis-content {
  padding: 0;
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

.pf-analysis-pane {
  padding: 24px;
}

.pf-tab-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.pf-tab-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
       0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.pf-tab-header {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pf-tab-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.pf-tab-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}

.pf-nut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.pf-nut-tile {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease,
       box-shadow 0.2s ease;
}

.pf-nut-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  border-color: rgba(14, 165, 164, 0.2);
}

.pf-nut-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
}

.pf-nut-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.pf-nut-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.pf-nut-unit {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 700;
  margin-left: 2px;
}

.pf-all-banner {
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pf-all-banner.safe {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  color: #047857;
}

.pf-all-banner.unsafe {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.pf-all-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-all-text {
  flex: 1;
}

.pf-all-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pf-all-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.pf-all-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-all-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.pf-all-chip.found {
  background: #fff1f2;
  border-color: #fecaca;
  color: #e11d48;
}

.pf-all-chip.safe {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.pf-hb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pf-hb-card {
  background: #ffffff;
  border: 1px solid rgba(14, 165, 164, 0.15);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.pf-hb-card:hover {
  box-shadow: 0 8px 20px rgba(14, 165, 164, 0.08);
  transform: translateY(-2px);
  border-color: rgba(14, 165, 164, 0.4);
}

.pf-hb-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #0ea5a4;
}

.pf-hb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pf-hb-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.pf-hb-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0ea5a4;
  background: rgba(14, 165, 164, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 164, 0.1);
}

.pf-hb-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

.pf-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: rgba(14, 165, 164, 0.03);
  border-radius: 12px;
  border: 1px dashed rgba(14, 165, 164, 0.2);
  color: #64748b;
}

.pf-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.8;
}

.pf-empty-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.pf-empty-text strong {
  color: #0f172a;
  font-weight: 700;
}

.pf-hb2-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pf-hb2-acc-btn:hover {
  background: #f1f5f9;
  color: #0ea5a4;
}

.pf-hb2-acc-btn[aria-expanded="true"] {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

.pf-hb2-nutrients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 8px;
}

.pf-hb2-nutr {
  display: inline-block;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
}

.pf-ap {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.pf-ap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pf-ap-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 4px;
}

.pf-ap-sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.pf-ap-clear {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.pf-ap-clear:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.pf-ap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-ap-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

.pf-ap-chip button {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.pf-ap-chip button:hover {
  color: #ef4444;
}

.selected-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(
       135deg,
       rgba(14, 165, 164, 0.1) 0%,
       rgba(14, 165, 164, 0.1) 100%
     );
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.ingredient-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25) !important;
}

.ingredient-chip .remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-weight: bold;
}

.ingredient-chip .remove-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

.ingredient-chip .quantity-btn:hover {
  background: #fde68a !important;
  transform: scale(1.05);
}

.ingredient-chip .unit-select:hover {
  border-color: #d97706 !important;
}

.search-container .selected-ingredients {
  flex-shrink: 0;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.nutrition-empty {
  border: 1px dashed rgba(15, 23, 42, 0.1);
  background: rgba(14, 165, 164, 0.03);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 2px;
  text-align: center;
  min-height: 100px;
  align-content: center;
  margin-top: 8px;
}

.nutrition-empty-title {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.nutrition-empty-text {
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.35;
  font-size: 0.78rem;
}

.nutrition-empty-text strong {
  color: #0f172a;
  font-weight: 800;
}

.nutrition-empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
  display: block;
}

#smoothie-tab-content .main-content-grid {
  display: grid !important;
  gap: 24px !important;
  align-items: start !important;
}

@media (min-width: 1025px) {
  #smoothie-tab-content .main-content-grid {
    grid-template-columns: 45% 55% !important;
  }
}

#smoothie-tab-content .search-container.card {
  padding: 24px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
       0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  background: #ffffff !important;
}

#smoothie-tab-content .search-container .card-header {
  border-bottom: 1px solid #f1f5f9 !important;
  padding-bottom: 16px !important;
  margin-bottom: 20px !important;
}

#smoothie-tab-content .card-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.025em !important;
}

#smoothie-tab-content .card-subtitle {
  font-size: 0.9rem !important;
  color: #64748b !important;
  margin-top: 4px !important;
}

#smoothie-tab-content .search-section {
  margin-bottom: 20px !important;
}

#smoothie-tab-content .textarea-label {
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-weight: 700 !important;
  color: #475569 !important;
  margin-bottom: 8px !important;
  display: block !important;
}

#smoothie-tab-content .search-input,
   #smoothie-tab-content select,
   #smoothie-ingredient-search {
  height: 48px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  width: 100% !important;
}

#smoothie-tab-content .search-input:focus,
   #smoothie-tab-content select:focus,
   #smoothie-ingredient-search:focus {
  background-color: #ffffff !important;
  border-color: #0ea5a4 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1) !important;
  outline: none !important;
}

#smoothie-tab-content #build-smoothie-btn {
  width: 100% !important;
  height: 52px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0ea5a4 0%, #0b7f7e 100%) !important;
  box-shadow: 0 4px 12px rgba(14, 165, 164, 0.25) !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  margin-top: 24px !important;
  transition: transform 0.1s ease,
       box-shadow 0.2s ease !important;
}

#smoothie-tab-content #build-smoothie-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(14, 165, 164, 0.3) !important;
}

#smoothie-tab-content #build-smoothie-btn:disabled {
  background: #cbd5e1 !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
  cursor: default !important;
  transform: none !important;
}

#smoothie-tab-content #smoothie-clear-btn {
  width: 100% !important;
  margin-top: 12px !important;
  padding: 12px !important;
  background: transparent !important;
  border: 1px dashed #cbd5e1 !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
}

#smoothie-tab-content #smoothie-clear-btn:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: #fef2f2 !important;
}

#smoothie-selected-ingredients {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#smoothie-tab-content .smoothie-ingredient-row {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition: border-color 0.2s !important;
}

#smoothie-tab-content .smoothie-ingredient-row:hover {
  border-color: #e2e8f0 !important;
}

#smoothie-tab-content .smoothie-ingredient-name {
  font-weight: 600 !important;
  color: #334155 !important;
  font-size: 0.95rem !important;
}

#smoothie-tab-content .smoothie-quantity-control {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  height: 32px !important;
}

#smoothie-tab-content .smoothie-quantity-btn {
  width: 28px !important;
  background: transparent !important;
  color: #64748b !important;
}

#smoothie-tab-content .smoothie-quantity-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

#smoothie-tab-content .smoothie-remove-btn {
  color: #94a3b8 !important;
  margin-left: 12px !important;
  padding: 4px !important;
  border-radius: 50% !important;
  transition: all 0.2s !important;
}

#smoothie-tab-content .smoothie-remove-btn:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

#smoothie-tab-content .results-container {
  padding: 0 !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  background: #ffffff !important;
  overflow: hidden !important;
  height: fit-content !important;
}

#smoothie-tab-content .results-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #ffffff !important;
}

#smoothie-tab-content .results-header .card-title {
  margin: 0 !important;
  font-size: 1.1rem !important;
}

#smoothie-tab-content .status-indicator {
  padding: 6px 12px !important;
  background: #f0fdfa !important;
  border: 1px solid #ccfbf1 !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#smoothie-tab-content .status-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background-color: #14b8a6 !important;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2) !important;
}

#smoothie-tab-content #smoothie-status-text {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #0d9488 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

#smoothie-tab-content .results-body {
  padding: 24px !important;
  background: #ffffff !important;
}

#smoothie-tab-content .vmr-table-wrapper table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#smoothie-tab-content .vmr-table-wrapper th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
  padding: 12px 16px !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

#smoothie-tab-content .vmr-table-wrapper td {
  padding: 14px 16px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #334155 !important;
  font-size: 0.9rem !important;
}

#smoothie-tab-content .vmr-table-wrapper tr:last-child td {
  border-bottom: none !important;
}

#smoothie-tab-content .vmr-table-wrapper tr:hover td {
  background-color: #f8fafc !important;
}

#smoothie-results-body div[style*="text-align: center"] {
  padding: 60px 20px !important;
}

.sn-card {
  padding: 24px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  background: #ffffff !important;
  margin-bottom: 24px !important;
}

.sn-head,
   .sn-summary {
  padding-bottom: 16px !important;
  margin-bottom: 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.sn-title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}

.sn-ing-grid {
  gap: 12px !important;
}

.sn-ing-pill {
  padding: 8px 14px !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#smoothie-yield-panel {
  padding: 4px 0 !important;
}

.sn-body > div[style*="linear-gradient(135deg, #ecfdf5"] {
  margin-bottom: 24px !important;
  padding: 16px 20px !important;
  border-radius: 12px !important;
}

.vmr-table-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.vmr-table-wrapper th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
  padding: 14px 20px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.vmr-table-wrapper td {
  padding: 16px 20px !important;
  color: #334155 !important;
  font-size: 0.95rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.vmr-table-wrapper tr:last-child td {
  border-bottom: none !important;
}

.sn-tabs {
  margin-bottom: 20px !important;
  gap: 8px !important;
}

.sn-tab {
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
}

@media (min-width: 1025px) {
  .sn-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    align-items: start !important;
  }

  .sn-grid .sn-card {
    margin-bottom: 0 !important;
    height: 100% !important;
  }
}

.nutrition-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  padding-bottom: 8px !important;
  width: 100% !important;
}

.nutrition-tile {
  width: 100% !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-left-width: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03) !important;
  background: #ffffff !important;
  transition: transform 0.2s ease,
       box-shadow 0.2s ease !important;
}

.nutrition-tile:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06) !important;
}

.nutrition-tile {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.nutrition-tile > div:first-child {
  gap: 12px !important;
}

.nutrition-tile .icon {
  font-size: 1.25rem !important;
  background: rgba(0, 0, 0, 0.03) !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

.nutrition-tile .label {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
}

.nutrition-tile > div:last-child {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
}

.nutrition-tile .unit {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
}

@media (max-width: 360px) {
  .nutrition-grid {
    grid-template-columns: 1fr !important;
  }
}

#build-smoothie-btn {
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  background: linear-gradient(135deg, #0d9488 0%, #115e59 100%) !important;
  box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.25) !important;
  border: none !important;
}

#build-smoothie-btn:hover {
  box-shadow: 0 6px 10px -2px rgba(13, 148, 136, 0.35) !important;
  transform: translateY(-1px) !important;
}

#smoothie-results-body > div[style*="text-align: center"] {
  min-height: 400px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  background: #fcfcfc !important;
  border-radius: 12px !important;
  border: 2px dashed #e2e8f0 !important;
  margin: 10px !important;
}

.sn-tabs {
  background: #f1f5f9 !important;
  padding: 6px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  gap: 0 !important;
  border: none !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03) !important;
}

.sn-tab {
  background: transparent !important;
  color: #64748b !important;
  font-weight: 600 !important;
  padding: 10px 24px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  border: none !important;
}

.sn-tab:hover {
  color: #334155 !important;
}

.sn-tab.active {
  background: #ffffff !important;
  color: #0d9488 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.sn-ing-pill {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  padding: 8px 12px !important;
  border-radius: 20px !important;
  transition: transform 0.15s ease !important;
}

.sn-ing-pill:hover {
  transform: translateY(-1px) !important;
  border-color: #cbd5e1 !important;
}

#smoothie-results-body div[style*="font-size: 3rem"] {
  font-size: 4rem !important;
  margin-bottom: 24px !important;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
     0% {
       transform: translateY(0px);
     }
     50% {
       transform: translateY(-10px);
     }
     100% {
       transform: translateY(0px);
     }
   }

.preset-mini-card > div:first-child {
  color: #334155 !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  font-weight: 600 !important;
}

.preset-mini-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.preset-mini-card:hover {
  background: #ffffff !important;
  border-color: #0d9488 !important;
}

.preset-name {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  margin-right: 8px !important;
  display: block !important;
  min-width: 0 !important;
}

@media (max-width: 768px) {
  .pf-analysis-tabs {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .pf-analysis-tab {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 16px !important;
  }

  .pf-analysis-tab-icon {
    margin-right: 8px !important;
  }

  .sn-ing-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .sn-ing-pill {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
  }

  .sn-ing-pill__sep {
    display: none !important;
  }

  .sn-ing-pill__name {
    font-size: 0.95rem !important;
  }

  .sn-serving-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .sn-serving-row > div {
    width: 100% !important;
  }

  .sn-serving-row > div:first-child {
    margin-bottom: 4px;
  }
}

.feedback-fab {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 10001 !important;
  padding: 12px 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  background: #fff !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.feedback-fab:hover {
  background: #f8fafc !important;
}

button.feedback-open:not(.feedback-fab) {
  display: none !important;
}

@media (max-width: 1024px) {
  .smoothie-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    flex-direction: unset !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  .smoothie-metrics-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 12px 10px !important;
    border-radius: 8px !important;
    height: auto !important;
    min-height: 75px !important;
    gap: 6px !important;
    border-left-width: 3px !important;
  }

  .smoothie-metrics-row > div:first-child {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .smoothie-metrics-row .label {
    font-size: 0.65rem !important;
    white-space: nowrap !important;
  }

  .smoothie-metrics-row .value {
    align-self: flex-start !important;
    font-size: 1.1rem !important;
    margin-top: 2px !important;
    display: flex !important;
    align-items: baseline !important;
  }

  .smoothie-metrics-row .unit {
    font-size: 0.7rem !important;
    margin-left: 4px !important;
  }
}

@media (max-width: 480px) {
  .smoothie-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .smoothie-metrics-row {
    padding: 10px 8px !important;
    min-height: 65px !important;
  }

  .smoothie-metrics-row .icon {
    font-size: 0.9rem !important;
  }

  .smoothie-metrics-row .label {
    font-size: 0.6rem !important;
  }

  .smoothie-metrics-row .value {
    font-size: 1rem !important;
  }
}

#smoothie-selected-ingredients {
  display: none;
  flex-direction: column;
  gap: 8px;
  width: 100% !important;
}

.ssm-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.ssm-row:hover {
  background: #f8fafc !important;
  border-color: rgba(14, 165, 164, 0.2) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

.ssm-info {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ssm-name {
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ssm-meta {
  font-size: 0.78rem !important;
  color: #64748b !important;
  white-space: nowrap !important;
}

.ssm-tags {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}

.ssm-qty {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.ss-qty-control {
  display: flex !important;
  align-items: center !important;
  border: 1.5px solid #f59e0b !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: white !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15) !important;
}

.ss-qty-btn {
  border: none !important;
  background: #fef3c7 !important;
  color: #92400e !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s !important;
}

.ss-qty-btn:hover:not(:disabled) {
  background: #fde68a !important;
}

.ss-qty-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.ss-qty-input {
  width: 44px !important;
  height: 32px !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  text-align: center !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #78350f !important;
  background: white !important;
}

.ss-remove-btn {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border: none !important;
  border-radius: 8px !important;
  width: 32px !important;
  height: 32px !important;
  cursor: pointer !important;
  font-size: 1.2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.ss-remove-btn:hover {
  background: #ef4444 !important;
  color: white !important;
  transform: scale(1.05) !important;
}

@media (max-width: 640px) {
  .ssm-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .ssm-info {
    width: 100% !important;
    flex: none !important;
  }

  .ssm-qty {
    flex: 1 !important;
  }

  .ss-qty-control {
    width: 100% !important;
    max-width: 140px !important;
  }

  .ss-qty-btn {
    flex: 1 !important;
  }
}

.ss-qty-input::-webkit-inner-spin-button,
   .ss-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

.ss-qty-input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.ssm-summary-card {
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#smoothie-tab-content .results-container .results-body,
   #smoothie-tab-content .results-body {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  font-family: inherit !important;
  white-space: normal !important;
  line-height: 1.5 !important;
  padding: 16px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 0.95rem !important;
}

#smoothie-tab-content .sn-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
}

#smoothie-tab-content .sn-tab {
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

#smoothie-tab-content .sn-tab:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.03);
  border-radius: 10px 10px 0 0;
}

#smoothie-tab-content .sn-tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

#smoothie-tab-content .sn-nutrition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

#smoothie-tab-content .sn-nutrition-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

#smoothie-tab-content .sn-emoji {
  font-size: 1.2rem;
}

#smoothie-tab-content .sn-title {
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

#smoothie-tab-content .sn-subtitle {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 2px;
}

#smoothie-tab-content .sn-usda-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #6ee7b7;
  background: #ecfdf5;
  font-size: 0.75rem;
  color: #047857;
}

#smoothie-tab-content .sn-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#smoothie-tab-content .sn-qty {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
}

#smoothie-tab-content .sn-qty-btn {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
  color: var(--text-primary);
}

#smoothie-tab-content .sn-qty-btn:hover {
  background: rgba(0,0,0,0.04);
}

#smoothie-tab-content .sn-qty-btn.decrement {
  border-right: 1px solid var(--border);
}

#smoothie-tab-content .sn-qty-btn.increment {
  border-left: 1px solid var(--border);
}

#smoothie-tab-content .sn-qty-input {
  width: 64px;
  padding: 6px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

#smoothie-tab-content .vmr-card {
  padding: 10px 12px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #ef4444;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

#smoothie-tab-content .vmr-summary-row {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #7f1d1d;
  line-height: 1.4;
}

#smoothie-tab-content .vmr-summary-row::-webkit-details-marker {
  display: none;
}

#smoothie-tab-content .vmr-summary-row::before {
  content: "Ã¢â€“Â¶";
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

#smoothie-tab-content .vmr-card[open] .vmr-summary-row::before {
  transform: rotate(90deg);
}

#smoothie-tab-content .vmr-title {
  font-size: 0.75rem;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

#smoothie-tab-content .vmr-table-wrapper {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 10px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#smoothie-tab-content .vmr-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

#smoothie-tab-content .vmr-table-wrapper thead tr {
  background: rgba(0, 0, 0, 0.2);
}

#smoothie-tab-content .vmr-table-wrapper th {
  padding: 10px 12px;
  font-size: 0.75rem;
  color: white;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#smoothie-tab-content .vmr-table-wrapper th:last-child {
  text-align: center;
}

#smoothie-tab-content .vmr-table-wrapper tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#smoothie-tab-content .vmr-table-wrapper tbody tr:last-child {
  border-bottom: none;
}

#smoothie-tab-content .vmr-table-wrapper td {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: white;
}

#smoothie-tab-content .vmr-table-wrapper td:last-child {
  text-align: center;
  font-weight: 600;
}

#smoothie-tab-content .ss-panel {
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 0;
  margin-top: 15px;
  overflow: hidden;
}

#smoothie-tab-content .ss-panel summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

#smoothie-tab-content .ss-panel summary::-webkit-details-marker {
  display: none;
}

#smoothie-tab-content .ss-panel summary::before {
  content: "Ã¢â€“Â¶";
  font-size: 0.7rem;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

#smoothie-tab-content .ss-panel[open] summary::before {
  transform: rotate(90deg);
}

#smoothie-tab-content .ss-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#smoothie-tab-content .ss-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  white-space: nowrap;
}

#smoothie-tab-content .ss-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

#smoothie-tab-content .ss-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

#smoothie-tab-content .ss-yield {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.85rem;
}

#smoothie-tab-content .ss-chipstrip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

#smoothie-tab-content .ss-chipstrip::-webkit-scrollbar {
  height: 4px;
}

#smoothie-tab-content .ss-chipstrip::-webkit-scrollbar-track {
  background: transparent;
}

#smoothie-tab-content .ss-chipstrip::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 2px;
}

#smoothie-tab-content .ss-chip {
  flex-shrink: 0;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

#smoothie-tab-content .ss-chip-name {
  font-weight: 600;
  color: #0f172a;
}

#smoothie-tab-content .ss-chip-portion {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

#smoothie-tab-content .ss-details {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0;
}

#smoothie-tab-content .ss-list-scroll {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}

#smoothie-tab-content .ss-list-scroll::-webkit-scrollbar {
  width: 6px;
}

#smoothie-tab-content .ss-list-scroll::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

#smoothie-tab-content .ss-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 3px;
}

#smoothie-tab-content .ss-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  min-height: 44px;
  max-height: 52px;
  transition: background 0.15s ease;
}

#smoothie-tab-content .ss-row:last-child {
  border-bottom: none;
}

#smoothie-tab-content .ss-row:hover {
  background: rgba(14, 165, 164, 0.03);
}

#smoothie-tab-content .ss-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#smoothie-tab-content .ss-row-name {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#smoothie-tab-content .ss-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

#smoothie-tab-content .ss-tag {
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

#smoothie-tab-content .ss-portion {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-left: 6px;
}

#smoothie-tab-content .ss-row-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#smoothie-tab-content .ss-qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid #f59e0b;
  border-radius: 6px;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

#smoothie-tab-content .ss-qty-btn {
  border: none;
  background: #fef3c7;
  color: #92400e;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

#smoothie-tab-content .ss-qty-btn:hover:not(:disabled) {
  background: #fde68a;
}

#smoothie-tab-content .ss-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#smoothie-tab-content .ss-qty-input {
  width: 42px;
  padding: 3px 2px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #78350f;
  background: white;
}

#smoothie-tab-content .ss-remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

#smoothie-tab-content .ss-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

#smoothie-tab-content .ss-info-messages {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.8rem;
}

#smoothie-tab-content .ssm-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#smoothie-tab-content .ssm-summary-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  white-space: nowrap;
}

#smoothie-tab-content .ssm-summary-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  margin-top: 4px;
}

#smoothie-tab-content .ssm-summary-meta-item {
  white-space: nowrap;
}

#smoothie-tab-content .ssm-chipstrip {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

#smoothie-tab-content .ssm-chipstrip::-webkit-scrollbar {
  height: 4px;
}

#smoothie-tab-content .ssm-chipstrip::-webkit-scrollbar-track {
  background: transparent;
}

#smoothie-tab-content .ssm-chipstrip::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 2px;
}

#smoothie-tab-content .ssm-chip {
  flex-shrink: 0;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

#smoothie-tab-content .ssm-chip-name {
  font-weight: 600;
  color: #0f172a;
}

#smoothie-tab-content .ssm-chip-portion {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

#smoothie-tab-content .ssm-edit-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#smoothie-tab-content .ssm-edit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(14, 165, 164, 0.3);
}

#smoothie-tab-content .ssm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#smoothie-tab-content .ssm-modal.ssm-modal-open {
  display: flex;
}

#smoothie-tab-content .ssm-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

#smoothie-tab-content .ssm-modal-card {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

#smoothie-tab-content .ssm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

#smoothie-tab-content .ssm-modal-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
}

#smoothie-tab-content .ssm-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#smoothie-tab-content .ssm-modal-close:hover {
  background: var(--bg-secondary);
  color: #0f172a;
}

#smoothie-tab-content .ssm-modal-scroll {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 20px 20px;
}

#smoothie-tab-content .ssm-modal-scroll::-webkit-scrollbar {
  width: 6px;
}

#smoothie-tab-content .ssm-modal-scroll::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

#smoothie-tab-content .ssm-modal-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 3px;
}

#smoothie-tab-content .ssm-modal-scroll .ss-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  min-height: 44px;
  max-height: 52px;
  transition: background 0.15s ease;
}

#smoothie-tab-content .ssm-modal-scroll .ss-row:last-child {
  border-bottom: none;
}

#smoothie-tab-content .ssm-modal-scroll .ss-row:hover {
  background: rgba(14, 165, 164, 0.03);
}

#smoothie-tab-content .ssm-modal-scroll .ss-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#smoothie-tab-content .ssm-modal-scroll .ss-row-name {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#smoothie-tab-content .ssm-modal-scroll .ss-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

#smoothie-tab-content .ssm-modal-scroll .ss-tag {
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

#smoothie-tab-content .ssm-modal-scroll .ss-portion {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-left: 6px;
}

#smoothie-tab-content .ssm-modal-scroll .ss-row-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#smoothie-tab-content .ssm-modal-scroll .ss-qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid #f59e0b;
  border-radius: 6px;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

#smoothie-tab-content .ssm-modal-scroll .ss-qty-btn {
  border: none;
  background: #fef3c7;
  color: #92400e;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

#smoothie-tab-content .ssm-modal-scroll .ss-qty-btn:hover:not(:disabled) {
  background: #fde68a;
}

#smoothie-tab-content .ssm-modal-scroll .ss-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#smoothie-tab-content .ssm-modal-scroll .ss-qty-input {
  width: 42px;
  padding: 3px 2px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #78350f;
  background: white;
}

#smoothie-tab-content .ssm-modal-scroll .ss-remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

#smoothie-tab-content .ssm-modal-scroll .ss-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

@media (max-width: 640px) {
  #smoothie-tab-content .ssm-modal {
    padding: 0;
  }

  #smoothie-tab-content .ssm-modal-card {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

.preset-mini-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.preset-mini-card:hover {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 4px 12px rgba(14, 165, 164, 0.1);
  transform: translateY(-1px);
}

.preset-info-trigger {
  color: var(--primary);
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-info-trigger:hover {
  opacity: 1;
}

.preset-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  width: 260px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 1000;
  pointer-events: none;
  transition: all 0.2s ease;
}

.preset-info-trigger:hover .preset-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.preset-tooltip::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.smoothie-metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 12px !important;
  margin: 12px 0 !important;
  padding: 0 !important;
}

.smoothie-metrics-tile {
  background: white !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
  height: 64px !important;
}

.smoothie-metrics-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08) !important;
  border-color: var(--primary) !important;
}

.smoothie-metrics-tile .left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.smoothie-metrics-tile .icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(0,0,0,0.03);
}

.smoothie-metrics-tile .label {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.smoothie-metrics-tile .right {
  text-align: right;
}

.smoothie-metrics-tile .value {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
}

.smoothie-metrics-tile .unit {
  font-size: 0.75rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  margin-left: 2px !important;
}

@media (max-width: 1024px) {
  .smoothie-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 600px) {
  .pf-analysis-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sn-tabs {
    flex-direction: column;
  }

  .pf-tab-header {
    flex-direction: column;
  }

  .smoothie-metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .smoothie-metrics-tile {
    height: 58px !important;
    padding: 10px 14px !important;
  }

  .smoothie-metrics-tile .icon-wrap {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  .smoothie-metrics-tile .value {
    font-size: 1.05rem !important;
  }
}

@media (max-width: 1024px) {
  .pf-results-backdrop,
     .pf-results-sheet {
    width: 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

.pf-ing-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  line-height: 1;
}

.pf-ing-pill__name {
  font-weight: 800;
  color: #0f172a;
}

.pf-ing-pill__sep {
  color: #94a3b8;
  font-weight: 800;
}

.pf-ing-pill__serving {
  color: #94a3b8;
  font-weight: 700;
}

@media (min-width: 1025px) {
  .nutrition-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    white-space: nowrap;
    border: 2px solid rgba(14,165,164,0.22);
    background: #fff;
    border-radius: 999px;
  }

  .nutrition-selected-chip .pf-ing-pill {
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

#ingredient-search-card .ingredients-textarea {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 6px 10px !important;
  line-height: 20px !important;
  box-sizing: border-box !important;
  overflow-y: hidden !important;
  resize: none !important;
}

#ingredient-search-card .pf-search-row {
  align-items: center !important;
}

#ingredient-tab-content .tab-pane.active {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

#ingredient-tab-content .tab-pane.active .results-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 24px !important;
}

#ingredient-tab-content #nutrition-results-body,
#ingredient-tab-content #allergens-results-body,
#ingredient-tab-content #health-benefits-results-body {
  display: block !important;
  max-height: none !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 24px !important;
}

#pf-results-sheet-body .tab-pane.active {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

#pf-results-sheet-body .tab-pane.active .results-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 24px !important;
}

html body #ingredient-tab-content #nutrition-results-body.results-body,
html body #ingredient-tab-content #allergens-results-body.results-body,
html body #ingredient-tab-content #health-benefits-results-body.results-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: clamp(260px, 55vh, 620px) !important;
  padding-bottom: 28px !important;
  -webkit-overflow-scrolling: touch;
}

html body #ingredient-tab-content .tab-pane.active {
  overflow: hidden !important;
  min-height: 0 !important;
}

html body #ingredient-tab-content .tab-pane.active .results-body {
  min-height: 0 !important;
}

#ingredient-tab-content .results-container {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

#ingredient-tab-content .results-container .tab-pane {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#ingredient-tab-content .results-container .tab-pane.active .results-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: clamp(260px, 55vh, 620px) !important;
  -webkit-overflow-scrolling: touch;
}

#ingredient-tab-content #nutrition-results-body.results-body,
#ingredient-tab-content #allergens-results-body.results-body,
#ingredient-tab-content #health-benefits-results-body.results-body {
  height: auto !important;
  max-height: unset !important;
  overflow: unset !important;
}

/* ============================================
   MOBILE: Compact Nutrition Summary tiles
   (results modal + inline results card)
   ============================================ */
@media (max-width: 1024px) {

  /* Force clean 2-column grid on mobile */
  #pf-results-modal .pf-nut-grid,
  #ingredient-results-card .pf-nut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  /* Smaller, tighter tiles */
  #pf-results-modal .pf-nut-tile,
  #ingredient-results-card .pf-nut-tile {
    padding: 10px 10px !important;
    border-radius: 10px !important;
  }

  #pf-results-modal .pf-nut-icon,
  #ingredient-results-card .pf-nut-icon {
    font-size: 1.15rem !important;
    margin-bottom: 4px !important;
  }

  #pf-results-modal .pf-nut-label,
  #ingredient-results-card .pf-nut-label {
    font-size: 0.65rem !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 2px !important;
  }

  #pf-results-modal .pf-nut-value,
  #ingredient-results-card .pf-nut-value {
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
  }

  #pf-results-modal .pf-nut-unit,
  #ingredient-results-card .pf-nut-unit {
    font-size: 0.75rem !important;
    margin-left: 3px !important;
    font-weight: 700 !important;
    opacity: 0.85 !important;
  }

  /* Make header feel tighter on mobile */
  #pf-results-modal .pf-tab-header,
  #ingredient-results-card .pf-tab-header {
    gap: 10px !important;
    padding-bottom: 10px !important;
  }

  /* The chip can be huge on mobile — compact it */
  #pf-results-modal .nutrition-selected-chip,
  #ingredient-results-card .nutrition-selected-chip {
    font-size: 0.82rem !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
  }
}

/* Touch devices: kill hover lift (looks weird on mobile) */
@media (hover: none) {
  #pf-results-modal .pf-nut-tile:hover,
  #ingredient-results-card .pf-nut-tile:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Very small phones: slightly tighter */
@media (max-width: 390px) {
  #pf-results-modal .pf-nut-value,
  #ingredient-results-card .pf-nut-value {
    font-size: 0.98rem !important;
  }

  #pf-results-modal .pf-nut-icon,
  #ingredient-results-card .pf-nut-icon {
    font-size: 1.05rem !important;
  }
}

/* ============================================
   MOBILE: Center Nutrition Summary pill (chip)
   ============================================ */
@media (max-width: 1024px) {

  /* Nutrition tab header: stack + center on mobile */
  #pf-results-modal #nutrition-results-body .pf-tab-header,
  #ingredient-results-card #nutrition-results-body .pf-tab-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Center the chip itself */
  #pf-results-modal #nutrition-results-body .pf-tab-header .nutrition-selected-chip,
  #ingredient-results-card #nutrition-results-body .pf-tab-header .nutrition-selected-chip {
    margin: 8px auto 0 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-self: center !important;
  }
}

/* =========================================================
   Allergen tab (mobile): compact + centered + clean grid
   Applies to inline results + results modal
   ========================================================= */
@media (max-width: 768px) {

  /* Stack header + center the ingredient pill */
  #ingredient-results-card .pf-tab-header,
  #pf-results-modal .pf-tab-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
  }

  #ingredient-results-card .pf-tab-header .nutrition-selected-chip,
  #pf-results-modal .pf-tab-header .nutrition-selected-chip {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* Slightly smaller pill on mobile */
  #ingredient-results-card .nutrition-selected-chip .pf-ing-pill,
  #pf-results-modal .nutrition-selected-chip .pf-ing-pill {
    padding: 10px 14px !important;
    max-width: 100% !important;
  }

  /* Banner becomes compact */
  #ingredient-results-card .pf-all-banner,
  #pf-results-modal .pf-all-banner {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }

  #ingredient-results-card .pf-all-icon,
  #pf-results-modal .pf-all-icon {
    font-size: 1.6rem !important;
    line-height: 1 !important;
  }

  #ingredient-results-card .pf-all-title,
  #pf-results-modal .pf-all-title {
    font-size: 1.05rem !important;
    line-height: 1.2 !important;
  }

  #ingredient-results-card .pf-all-subtitle,
  #pf-results-modal .pf-all-subtitle {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
  }

  /* Section spacing (replaces your inline styles) */
  #ingredient-results-card .pf-all-section,
  #pf-results-modal .pf-all-section {
    margin-top: 14px !important;
  }

  #ingredient-results-card .pf-all-section-title,
  #pf-results-modal .pf-all-section-title {
    margin-bottom: 10px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 0.95rem !important;
    text-align: left !important;
  }

  /* Chips grid: 2 columns, tighter */
  #ingredient-results-card .pf-all-grid,
  #pf-results-modal .pf-all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Chips: less padding so they don't look huge */
  #ingredient-results-card .pf-all-chip,
  #pf-results-modal .pf-all-chip {
    padding: 10px 10px !important;
    border-radius: 14px !important;
    font-size: 0.9rem !important;
    gap: 8px !important;
  }
}