        body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; background-color: var(--bg-body); color: var(--text-main); margin: 0; padding: 16px 16px calc(90px + max(env(safe-area-inset-bottom, 0px), var(--sa-bottom, 0px))) 16px; padding-top: calc(72px + max(env(safe-area-inset-top, 0px), var(--sa-top, 0px))); }
        .container { max-width: 600px; margin: 0 auto; }


        .week-period { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-sizing: border-box; }
        .week-plan-row { display: grid; grid-template-columns: max-content 1px minmax(0, 1fr); column-gap: 16px; align-items: center; }
        .week-title { font-size: 20px; font-weight: 600; color: #ffffff; letter-spacing: -0.3px; line-height: 1.3; text-align: left; white-space: nowrap; }
        .week-plan-sep { width: 1px; align-self: stretch; min-height: 36px; background: var(--border-soft); }
        .plan-side { min-width: 0; text-align: right; }
        .plan-label { font-size: 15px; font-weight: 600; color: #ffffff; letter-spacing: -0.2px; line-height: 1.3; margin: 0; }
        .plan-dates { font-size: 15px; font-weight: 500; color: var(--text-sub); letter-spacing: -0.2px; line-height: 1.3; margin: 6px 0 0; }

        .meal-card { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
        .rules-card, .day-card { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
        .rules-toggle, .day-toggle { width: 100%; margin: 0; padding: 14px 16px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 12px; -webkit-tap-highlight-color: transparent; }
        .rules-toggle { justify-content: flex-start; }
        .rules-card:not(.is-open) > .rules-toggle { min-height: 40px; padding: 0 16px; }
        .rules-name-ban { font-size: 14px; font-weight: 700; color: #c45b5b; letter-spacing: 0.04em; }
        .rules-name-lim { font-size: 14px; font-weight: 700; color: #f39c12; letter-spacing: 0.04em; }
        .rules-name-sep { width: 1px; height: 16px; background: var(--border-soft); flex: 0 0 auto; }
        .fold-chevron { margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--text-sub); border-bottom: 1.5px solid var(--text-sub); transform: rotate(45deg); flex: 0 0 auto; }
        .is-open > .rules-toggle .fold-chevron, .is-open > .day-toggle .fold-chevron { transform: rotate(-135deg); margin-top: 4px; }
        .rules-card.is-open { position: relative; }
        .rules-card.is-open > .rules-toggle { position: absolute; top: 6px; right: 8px; width: auto; padding: 8px; }
        .rules-card.is-open > .rules-toggle .rules-name-ban,
        .rules-card.is-open > .rules-toggle .rules-name-lim,
        .rules-card.is-open > .rules-toggle .rules-name-sep { display: none; }
        .rules-body, .day-body { display: none; padding: 0 16px 16px; }
        .rules-card.is-open > .rules-body { padding-top: 16px; }
        .is-open > .rules-body, .is-open > .day-body { display: block; }
        .rules-label { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
        .rules-label-ban { color: #c45b5b; }
        .rules-label-lim { color: #f39c12; margin-top: 14px; }
        .rules-label-com { color: var(--text-sub); margin-top: 14px; font-size: 14px; }
        .rules-com { color: var(--text-sub); font-size: 14px; }
        .rules-line { height: 1px; background: var(--border-soft); margin: 8px 0 10px; }
        .rules-item { font-size: 15px; line-height: 1.4; margin: 0 0 6px; color: var(--text-main); }
        .rules-item.is-empty { color: var(--text-sub); }
        .day-toggle { color: var(--text-sub); font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 11px; padding-bottom: 11px; }
        .day-body { padding-bottom: 10px; }
        .day-body .meal-desc { line-height: 1.45; }
        .day-body .meal-desc + .meal-desc { margin-top: 10px; }
        .meal-time { font-size: 14px; font-weight: bold; color: var(--text-sub); text-transform: uppercase; margin-bottom: 2px; }
        .meal-subtitle { font-size: 11px; color: var(--text-sub); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px; }
        .meal-desc { font-size: 14px; color: var(--text-main); line-height: 1.5; }
        
        .meal-inline-title { color: var(--text-sub); font-weight: bold; text-transform: uppercase; }

        .empty-state { text-align: center; color: var(--text-sub); padding: 40px 20px; line-height: 1.6; font-size: 15px; }

        .card { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
        .question-label { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: #ffffff; display: block; }
        .chat-hint { font-size: 12px; color: var(--text-sub); margin-top: -8px; margin-bottom: 12px; }
        .chat-box { background: #12161b; border: 1px solid var(--border-soft); border-radius: 12px; height: 250px; max-height: 250px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
        .chat-msg { background: var(--surface-field); padding: 10px 14px; border-radius: 12px; border-bottom-right-radius: 0; align-self: flex-end; max-width: 85%; font-size: 13px; color: #fff; line-height: 1.4; flex-shrink: 0; }
        .chat-msg-in { align-self: flex-start; border-bottom-right-radius: 12px; border-bottom-left-radius: 0; background: #262d36; }
        .chat-input-wrapper { display: flex; gap: 8px; }
        .chat-input { flex-grow: 1; min-width: 0; background: var(--surface-field); border: 1px solid var(--border-soft); color: #fff; height: 40px; padding: 0 12px; line-height: 38px; border-radius: 8px; font-size: 16px; outline: none; box-sizing: border-box; }
        .chat-input:focus { border-color: var(--brand-green); }
        .chat-send { background: var(--surface-field); color: #dfe8f0; border: 1px solid #3a4756; padding: 0 20px; border-radius: 12px; font-weight: bold; cursor: pointer; box-sizing: border-box; transition: transform 0.08s ease, filter 0.08s ease; -webkit-tap-highlight-color: transparent; }
        /* :active убран — единый отклик нажатия живёт в tokens.css */

