.nutrition-preview { padding-block: clamp(42px, 6vw, 76px); border-bottom: 1px solid var(--line); }
.nutrition-preview .section-heading { align-items: start; }
.nutrition-preview .section-heading p { margin-top: 12px; }
.nutrition-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 24px; }
.nutrition-topic { border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: 18px; text-decoration: none; display: grid; align-content: start; gap: 7px; }
.nutrition-topic:hover { background: var(--gold-pale); border-color: var(--gold-ink); }
.nutrition-topic strong { font: 850 1.15rem/1.2 var(--display); }
.nutrition-topic span { color: var(--muted); font-size: .94rem; }

.nutrition-hero { background: #fff0bd; color: var(--ink); border-bottom: 7px solid var(--gold); }
.nutrition-hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 28px 56px; padding-block: clamp(42px, 7vw, 92px); }
.nutrition-hero h1 { font-size: clamp(3.5rem, 7vw, 6.5rem); margin: 0; }
.nutrition-hero h1 em { color: #825110; background: none; }
.nutrition-hero p { max-width: 28rem; font-size: clamp(1.07rem, 2.1vw, 1.4rem); color: var(--muted); }
.nutrition-layout { display: grid; grid-template-columns: minmax(11rem, .7fr) minmax(0, 2fr); gap: clamp(24px, 6vw, 84px); padding-block: clamp(34px, 6vw, 70px); }
.nutrition-nav { position: sticky; top: 25px; align-self: start; border-top: 3px solid var(--gold); display: grid; padding: 7px 0; }
.nutrition-nav a { padding: 9px 0; text-underline-offset: .22em; text-decoration-color: var(--line); line-height: 1.25; font-weight: 700; }
.nutrition-nav a:hover { text-decoration-color: var(--gold-ink); color: var(--gold-ink); }
.nutrition-articles { min-width: 0; max-width: 48rem; }
.nutrition-article { padding-bottom: 34px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.nutrition-article:target h2 { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: .17em; text-underline-offset: .13em; }
.nutrition-article h2, .nutrition-order h2 { font-size: clamp(1.85rem, 4vw, 3.3rem); line-height: 1.02; font-weight: 900; letter-spacing: -.05em; margin-bottom: 14px; }
.nutrition-article h3 { margin-top: 21px; font-size: 1.3rem; line-height: 1.2; }
.nutrition-article p { margin-top: 10px; }
.nutrition-nav a, .nutrition-article p { overflow-wrap: anywhere; }
.result-reading { color: var(--gold-ink); text-underline-offset: .19em; }
.nutrition-article .button { margin-top: 17px; }
.transition-table { width: 100%; max-width: 30rem; table-layout: fixed; border-collapse: collapse; margin: 18px 0; text-align: left; }
.transition-table caption { text-align: left; margin-bottom: 7px; font-weight: 750; }
.transition-table th, .transition-table td { background: var(--white); padding: 8px 10px; border: 1px solid var(--line); }
.transition-table th { font-weight: 700; }
.transition-table thead th, .transition-table tbody td:last-child { background: var(--gold-pale); }
.nutrition-note, .nutrition-order { background: var(--gold-pale); border-left: 4px solid var(--gold); border-radius: 6px; padding: clamp(15px, 3vw, 25px); }
.nutrition-note { margin-top: 14px; }
.nutrition-note p { margin-top: 4px; }
.nutrition-order-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.nutrition-order-actions .button-outline { background: var(--white); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.menu-dish .button { justify-self: start; font-size: .91rem; min-height: 42px; margin-top: 4px; padding-inline: 12px; }

@media (max-width: 850px) {
  .nutrition-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 670px) {
  .nutrition-hero-inner, .nutrition-layout { grid-template-columns: 1fr; }
  .nutrition-nav { position: static; padding-inline: 12px; background: var(--gold-pale); }
  .nutrition-nav a { min-height: 40px; }
  .nutrition-topic { padding: 13px; }
}

.nutrition-hero-content .button { margin-top: 18px; }
.nutrition-preview-actions, .nutrition-article-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.nutrition-chat { width: min(560px, 100% - 24px); height: min(630px, 100dvh - 24px); max-height: none; max-width: none; background: var(--white); }
.chat-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; }
.chat-header { min-width: 0; padding: 19px 63px 17px 22px; background: var(--ink); color: var(--paper); }
.chat-header h2 { color: var(--gold); font-size: clamp(1.4rem, 5.3vw, 1.9rem); font-weight: 850; line-height: 1.05; letter-spacing: -.036em; }
.chat-header p { margin-top: 5px; color: #e4dbc5; font-size: .94rem; }
.chat-close { border: 1px solid #d9cba78c; background: var(--ink); color: var(--paper); }
.chat-close:hover { color: var(--gold); }
.chat-close:focus-visible { outline-color: var(--gold); }
.chat-log { overflow: auto; overscroll-behavior: contain; padding: 16px 18px; }
.chat-log:focus-visible { outline-offset: -3px; }
.chat-message { width: fit-content; max-width: min(92%, 30rem); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; margin-bottom: 10px; background: var(--paper); overflow-wrap: anywhere; }
.chat-message-user { margin-left: auto; background: var(--gold-pale); border-color: transparent; }
.chat-message a { display: block; color: var(--gold-ink); font-size: .92rem; font-weight: 700; text-underline-offset: .2em; margin-top: 6px; }
.chat-controls { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.chat-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chat-choice { min-height: 38px; border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; background: var(--white); color: var(--ink); font-size: .93rem; font-weight: 700; line-height: 1.25; }
.chat-choice:hover { background: var(--gold-pale); border-color: var(--gold-ink); }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.chat-form input { width: 100%; min-width: 0; border: 1px solid #c6b99d; border-radius: 5px; padding: 0 10px; color: var(--ink); background: #fffffb; }
.chat-form input::placeholder { color: var(--muted); }
@media (max-width: 480px) {
  .chat-log { padding-inline: 12px; }
  .chat-controls { padding-inline: 11px; }
  .chat-form .button { padding-inline: 10px; font-size: .94rem; }
  .chat-header { padding-left: 16px; }
}

.chat-profile { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; background: var(--gold-pale); border-bottom: 1px solid var(--line); padding: 8px 18px; font-size: .91rem; }
.chat-profile span { font-weight: 700; overflow-wrap: anywhere; }
.chat-profile a, .result-dish h3 a { color: var(--gold-ink); text-underline-offset: .19em; }
.chat-log { grid-row: 3; }
.chat-controls { grid-row: 4; }
.profile-notice { color: var(--muted); margin: -7px 0 14px; }
.menu-dish:target { outline: 3px solid var(--gold-ink); outline-offset: 3px; }

.bowl-portrait { position: relative; align-self: center; min-width: 0; margin: 0; overflow: hidden; border-radius: 9px; background: var(--gold-pale); }
.bowl-portrait img { display: block; width: 100%; height: auto; }
.bowl-portrait .bowl-logo { position: absolute; width: 20%; left: 50.7%; top: 72.5%; transform: translate(-50%, -56%) rotate(-1deg); color: #231708; opacity: .88; }
.nutrition-hero-inner { align-items: center; }
.nutrition-hero-content { margin-top: 20px; }
.nutrition-preview-lead { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: 19px 36px; }
.nutrition-preview-lead .section-heading { align-content: center; }
.nutrition-preview-photo { width: min(420px, 100%); justify-self: end; }
.nutrition-article { display: flow-root; }
.article-photo { width: min(32%, 210px); float: right; margin: 0 0 11px 20px; border-radius: 8px; aspect-ratio: 3 / 4; background: var(--gold-pale) url("media/nutrition-scenes.webp") 0 0 / 200% 100% no-repeat; }
.article-coat { background-position: 100% 0; }
.article-ingredients { aspect-ratio: 512 / 549; background-image: url("media/dishes.webp"); background-size: 300% auto; background-position: 100% 100%; }
.chat-header { display: flex; gap: 13px; align-items: center; }
.chat-avatar { display: block; width: 50px; height: 50px; flex: 0 0 50px; border-radius: 50%; object-fit: cover; object-position: right center; border: 2px solid var(--gold); }
.play-teaser { margin-top: 19px; padding: clamp(19px, 5vw, 34px); background: #e6f4ce; color: #253716; border-radius: 9px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; align-items: center; }
.play-teaser h2 { color: #253716; font-size: clamp(1.65rem, 3.9vw, 3rem); font-weight: 900; letter-spacing: -.05em; line-height: 1; margin-bottom: 7px; }
.play-teaser p { color: var(--muted); }
@media (max-width: 670px) {
  .nutrition-preview-lead { grid-template-columns: 1fr; }
  .nutrition-preview-photo { width: 100%; justify-self: auto; }
  .article-photo { margin-left: 13px; width: 36%; }
}
@media (max-width: 370px) {
  .chat-avatar { width: 39px; height: 39px; flex-basis: 39px; }
  .chat-header { gap: 8px; }
}
