:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #131316;
  --panel-2: #1c1b1e;
  --panel-3: #282529;
  --text: #f7f2eb;
  --muted: #a69b94;
  --accent: #f0dfca;
  --accent-2: #f0aa80;
  --accent-text: #171312;
  --link: #f0aa80;
  --danger: #ff707b;
  --border: rgba(246, 225, 205, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 12% -10%, rgba(240, 170, 128, .09), transparent 31rem),
    radial-gradient(circle at 108% 42%, rgba(240, 223, 202, .035), transparent 28rem),
    var(--bg);
}
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, .feature-button, .entry-card, .more-card { transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
button:active, .feature-button:active, .more-card:active { transform: scale(.97); }

.app-shell { min-height: 100vh; max-width: 680px; margin: 0 auto; padding: env(safe-area-inset-top) 16px calc(82px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 2px 16px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.fullscreen-button { width: 46px; height: 46px; border-radius: 16px; border: 1px solid var(--border); background: #1a191b; color: var(--accent); font-size: 24px; line-height: 1; }
.topbar h1 { margin: 2px 0 0; font-size: 28px; letter-spacing: -0.04em; }
.eyebrow { margin: 0; font-size: 10px; letter-spacing: .18em; color: var(--accent); font-weight: 800; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-text); font-weight: 900; box-shadow: 0 10px 32px rgba(217,255,67,.18); animation: avatar-in .6s cubic-bezier(.2,.8,.2,1) both; }
.menu-button { width: 46px; height: 46px; display: grid; align-content: center; justify-items: end; gap: 5px; padding: 0 12px; border-radius: 16px; border: 1px solid rgba(217,255,67,.18); background: linear-gradient(145deg, var(--panel-2), var(--panel)); box-shadow: 0 10px 32px rgba(0,0,0,.28); }
.menu-button span { display: block; height: 2px; border-radius: 3px; background: var(--accent); transition: width .18s ease, transform .18s ease; }
.menu-button span:nth-child(1) { width: 20px; }
.menu-button span:nth-child(2) { width: 14px; }
.menu-button span:nth-child(3) { width: 18px; }
.menu-button:active span:nth-child(2) { width: 20px; }
.content { min-height: calc(100vh - 170px); }
.screen { display: none; }
.screen.active { display: block; }
.screen.active > * { animation: rise .38s cubic-bezier(.2,.8,.2,1) both; }
.screen.active > *:nth-child(2) { animation-delay: .04s; }
.screen.active > *:nth-child(3) { animation-delay: .08s; }
.screen.active > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes avatar-in { from { opacity: 0; transform: rotate(-12deg) scale(.75); } }

.banner { margin-bottom: 14px; padding: 12px 14px; border-radius: 15px; background: rgba(255, 179, 79, .14); color: #ffd18f; font-size: 13px; line-height: 1.4; border: 1px solid rgba(255,179,79,.2); }
.hidden, .visually-hidden { display: none !important; }

.hero-card { position: relative; overflow: hidden; display: flex; align-items: end; justify-content: space-between; min-height: 145px; padding: 24px; border-radius: 28px; background: radial-gradient(circle at 88% 18%, rgba(217,255,67,.24), transparent 35%), linear-gradient(145deg, #182018, #0d110e 72%); box-shadow: var(--shadow); border: 1px solid rgba(217,255,67,.13); }
.hero-card::after { content: ""; position: absolute; width: 140px; height: 140px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -50px; top: -55px; }
.hero-card h2 { max-width: 260px; margin: 6px 0 0; font-size: clamp(24px, 7vw, 34px); letter-spacing: -.045em; line-height: 1.05; }
.muted, .hint { color: var(--muted); }
.hero-card .muted { margin: 0; font-size: 13px; }
.quick-pill { z-index: 1; border: 0; background: var(--accent); color: var(--accent-text); padding: 11px 15px; border-radius: 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 10px 30px rgba(217,255,67,.16); }

.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-top: 14px; }
.summary-card { min-height: 112px; padding: 17px; border-radius: 22px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); box-shadow: 0 10px 34px rgba(0,0,0,.18); }
.summary-card:hover { border-color: rgba(217,255,67,.24); transform: translateY(-2px); }
.summary-card.wide { grid-column: 1 / -1; min-height: 96px; }
.summary-card .label { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.summary-card strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.summary-card small { color: var(--muted); }
.summary-card .accent { color: var(--accent); }
.skeleton-grid::before, .skeleton-grid::after { content: ""; height: 112px; border-radius: 22px; background: linear-gradient(90deg, var(--panel), var(--panel-2), var(--panel)); background-size: 200% 100%; animation: pulse 1.4s infinite; }
@keyframes pulse { to { background-position: -200% 0; } }

.section-heading, .screen-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 13px; }
.screen-title { margin-top: 8px; }
.screen-title > div { display: flex; align-items: center; gap: 12px; }
.screen-title h2, .section-heading h3 { margin: 0; letter-spacing: -.035em; }
.screen-title h2 { font-size: 27px; }
.section-icon { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; background: var(--panel); }
.coral { background: rgba(255,115,99,.16); } .mint { background: rgba(240,170,128,.13); }
.violet { background: rgba(162,132,255,.16); } .yellow { background: rgba(255,208,92,.15); }
.lime { background: rgba(240,170,128,.13); } .orange { background: rgba(255,138,61,.16); }
.text-button, .close-button, .primary-icon { border: 0; background: transparent; }
.text-button { color: var(--link); font-size: 13px; }
.primary-icon { width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: var(--accent-text); font-size: 25px; }

.entry-list { display: grid; gap: 10px; }
.entry-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 15px; border-radius: 19px; background: linear-gradient(145deg, var(--panel), #0b0e0c); border: 1px solid var(--border); animation: card-in .35s cubic-bezier(.2,.8,.2,1) both; }
.entry-card:nth-child(2) { animation-delay: .035s; } .entry-card:nth-child(3) { animation-delay: .07s; } .entry-card:nth-child(4) { animation-delay: .105s; }
.entry-card:active { border-color: rgba(217,255,67,.24); transform: scale(.985); }
@keyframes card-in { from { opacity: 0; transform: translateY(9px); } }
.entry-icon { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--panel-2); }
.entry-main { min-width: 0; }
.entry-main b, .entry-main p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-main p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.entry-value { text-align: right; font-weight: 800; }
.entry-value small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; }
.approx-badge { display: inline-flex; margin-top: 5px; padding: 3px 7px; font-size: 10px; border-radius: 8px; color: #ffd18f; background: rgba(255,179,79,.12); }
.edit-calories { grid-column: 2 / -1; justify-self: start; border: 0; background: transparent; color: var(--link); padding: 0; font-size: 12px; }
.empty-state { text-align: center; padding: 44px 18px; color: var(--muted); border: 1px dashed var(--border); border-radius: 22px; }

.calendar-card { max-width: 720px; padding: 17px 12px 14px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(150deg, #201d1e, #111113 75%); box-shadow: 0 20px 45px rgba(0,0,0,.24); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 5px 15px; }
.calendar-toolbar strong { font-size: 19px; text-transform: capitalize; letter-spacing: -.03em; }
.calendar-toolbar button { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; border: 1px solid var(--border); background: var(--panel-2); font-size: 26px; line-height: 1; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekdays { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.calendar-weekdays span { padding: 6px 0; }
.calendar-day { position: relative; min-width: 0; min-height: 43px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 13px; background: rgba(255,255,255,.035); font-size: 14px; font-weight: 700; }
.calendar-day.today { border-color: rgba(240,170,128,.55); }
.calendar-day.has-events { background: linear-gradient(145deg, rgba(240,223,202,.32), rgba(240,170,128,.18)); border-color: rgba(240,223,202,.42); color: #fff4e8; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.calendar-day.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 7px 18px rgba(240,223,202,.14); }
.calendar-day.selected.has-events { box-shadow: 0 0 0 2px rgba(240,170,128,.5), 0 10px 24px rgba(240,223,202,.22); }
.calendar-day i { position: absolute; right: 3px; bottom: 2px; min-width: 14px; height: 14px; padding: 1px 3px; border-radius: 8px; background: var(--accent-2); color: #1d1512; font-size: 9px; font-style: normal; line-height: 12px; }
.calendar-day.selected i { background: #312822; color: var(--accent); }
.calendar-day-header { max-width: 720px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 23px 2px 12px; }
.calendar-day-header h3, .calendar-undated h3 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.calendar-create { max-width: 720px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 15px; }
.calendar-create button { min-width: 0; min-height: 47px; padding: 8px 5px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel-2); font-size: clamp(11px, 2.6vw, 14px); font-weight: 800; overflow-wrap: anywhere; }
.calendar-create button:active { border-color: var(--accent); }
.calendar-undated { margin-top: 28px; }
.calendar-undated h3 { margin-bottom: 12px; color: var(--muted); }
@media (max-width: 480px) { .calendar-create { grid-template-columns: repeat(2, minmax(0, 1fr)); } .calendar-create button:last-child { grid-column: 1 / -1; } }
@media (max-width: 360px) { .calendar-card { padding-inline: 8px; } .calendar-days, .calendar-weekdays { gap: 2px; } .calendar-day { min-height: 39px; } }

.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 8px; }
.food-actions .feature-button:first-child { grid-column: 1 / -1; }
.feature-button { display: grid; place-items: center; min-height: 48px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-weight: 800; text-align: center; }
.feature-button.secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.feature-button.secondary:hover { border-color: rgba(217,255,67,.28); background: var(--panel-2); }
.camera-button { position: relative; overflow: hidden; }
.hint { font-size: 12px; line-height: 1.45; margin: 10px 3px 18px; }
.metric-highlight { min-height: 120px; display: grid; place-items: center; margin: 18px 0; border-radius: 25px; background: radial-gradient(circle at 50% 0, rgba(98,230,181,.22), transparent 65%), var(--panel); border: 1px solid var(--border); }
.metric-highlight strong { font-size: 42px; letter-spacing: -.06em; }
.metric-highlight small { color: var(--muted); margin-left: 6px; }
.privacy-card { padding: 15px; margin: 15px 0 18px; border-radius: 17px; background: rgba(217,255,67,.07); color: #dfffa0; border: 1px solid rgba(217,255,67,.12); font-size: 13px; line-height: 1.45; }

.more-grid { display: grid; gap: 11px; margin-top: 18px; }
.more-card { display: grid; grid-template-columns: 48px 1fr; text-align: left; gap: 2px 12px; align-items: center; padding: 17px; border-radius: 20px; border: 1px solid var(--border); background: var(--panel); }
.more-card span { grid-row: 1 / 3; font-size: 24px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--panel-2); }
.more-card b { font-size: 16px; }
.more-card small { color: var(--muted); }
.about-card { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 20px; border-radius: 22px; background: linear-gradient(145deg, var(--panel-2), #101510); }
.logo-mark { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 900; }
.about-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; width: min(100%, 680px); transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(9,12,9,.9); backdrop-filter: blur(24px); border-top: 1px solid rgba(217,255,67,.1); }
.nav-item { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; gap: 4px; min-height: 54px; }
.nav-item span { font-size: 19px; }
.nav-item small { font-size: 10px; }
.nav-item.active { color: var(--accent); text-shadow: 0 0 18px rgba(217,255,67,.35); }
.fab { position: fixed; z-index: 25; right: max(20px, calc((100vw - 650px) / 2)); bottom: calc(20px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 18px; border: 0; background: var(--accent); color: var(--accent-text); font-size: 30px; box-shadow: 0 14px 38px rgba(217,255,67,.18); animation: fab-float 3s ease-in-out infinite; }
@keyframes fab-float { 50% { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(217,255,67,.23); } }

.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: end; justify-content: center; }
.modal.open { display: flex; }
.modal.open .modal-backdrop { animation: fade-in .22s ease both; }
.modal.open .modal-sheet { animation: sheet-up .35s cubic-bezier(.2,.85,.2,1) both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.58); backdrop-filter: blur(6px); }
.modal-sheet { position: relative; width: min(100%, 680px); max-height: 90vh; overflow-y: auto; padding: 9px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--panel); box-shadow: var(--shadow); }
.modal-handle { width: 42px; height: 4px; margin: 0 auto 17px; border-radius: 4px; background: rgba(255,255,255,.18); }
.modal-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }
.modal-header h2 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.04em; }
.close-button { font-size: 28px; color: var(--muted); }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 14px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--border); outline: 0; color: var(--text); background: var(--bg); border-radius: 15px; padding: 14px; }
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,255,67,.1); }
.field small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.submit-button { min-height: 50px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-weight: 900; margin-top: 3px; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: #eef7f3; color: #0c1a14; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s; font-size: 13px; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.voice-button { grid-template-columns: auto 1fr; gap: 9px; }
.voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(255,138,61,.45); }
.voice-button.recording { color: #fff2e8; border-color: rgba(255,138,61,.5); background: rgba(255,138,61,.12); }
.voice-button.recording .voice-dot { animation: record-pulse 1.15s ease-out infinite; }
.voice-status { min-height: 18px; transition: color .2s ease; }
@keyframes record-pulse { 70% { box-shadow: 0 0 0 9px rgba(255,138,61,0); } 100% { box-shadow: 0 0 0 0 rgba(255,138,61,0); } }

.menu-backdrop { position: fixed; inset: 0; z-index: 59; width: 100%; border: 0; background: rgba(0,0,0,.64); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.side-menu { position: fixed; z-index: 60; top: 0; right: 0; width: min(88vw, 390px); height: 100dvh; padding: calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(160deg, #171d18, #090c0a 58%); border-left: 1px solid rgba(217,255,67,.13); box-shadow: -24px 0 80px rgba(0,0,0,.58); transform: translateX(104%); transition: transform .38s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
body.menu-open { overflow: hidden; }
body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open .side-menu { transform: translateX(0); }
.side-menu-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 3px 20px; }
.side-menu-head h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.04em; }
.side-menu-nav { display: grid; gap: 8px; }
.menu-item { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; width: 100%; padding: 13px; text-align: left; border-radius: 18px; border: 1px solid transparent; background: transparent; }
.menu-item > span { grid-row: 1 / 3; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--panel-2); font-size: 20px; }
.menu-item b { font-size: 16px; }
.menu-item small { color: var(--muted); font-size: 12px; }
.menu-item.active { background: rgba(217,255,67,.08); border-color: rgba(217,255,67,.16); color: var(--accent); }
.menu-item.active small { color: #bac79f; }

.coach-hero { position: relative; overflow: hidden; margin: 14px 0; padding: 22px; border-radius: 25px; background: radial-gradient(circle at 90% 10%, rgba(217,255,67,.18), transparent 38%), linear-gradient(145deg, #171e17, #0d110e); border: 1px solid rgba(217,255,67,.13); }
.coach-hero h3 { position: relative; z-index: 1; max-width: 310px; margin: 9px 0 8px; font-size: 23px; line-height: 1.1; letter-spacing: -.035em; }
.coach-hero > p:last-child { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.coach-orbit { position: absolute; right: -44px; top: -52px; width: 150px; height: 150px; border: 1px solid rgba(217,255,67,.23); border-radius: 50%; box-shadow: inset 0 0 45px rgba(217,255,67,.05); animation: orbit-pulse 4s ease-in-out infinite; }
@keyframes orbit-pulse { 50% { transform: scale(1.08) rotate(12deg); opacity: .7; } }
.coach-prompts { display: flex; gap: 8px; margin: 10px 0 14px; overflow-x: auto; scrollbar-width: none; }
.coach-prompts::-webkit-scrollbar { display: none; }
.coach-prompts button { flex: 0 0 auto; padding: 10px 13px; border-radius: 13px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 13px; }
.coach-prompts button:hover { border-color: rgba(217,255,67,.3); }
.coach-messages { display: grid; gap: 10px; min-height: 170px; max-height: 48vh; overflow-y: auto; padding: 14px 4px; scroll-behavior: smooth; }
.coach-message { width: fit-content; max-width: 88%; padding: 12px 14px; border-radius: 17px; line-height: 1.48; white-space: pre-wrap; animation: card-in .3s ease both; }
.coach-message.assistant { justify-self: start; background: var(--panel-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.coach-message.user { justify-self: end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 5px; }
.coach-message.thinking { color: var(--muted); }
.coach-message.thinking::after { content: ""; display: inline-block; width: 18px; height: 5px; margin-left: 7px; background: radial-gradient(circle, var(--accent) 2px, transparent 3px) 0 0 / 6px 6px; animation: thinking 1s linear infinite; }
@keyframes thinking { to { background-position: 6px 0; } }
.coach-form { display: grid; grid-template-columns: 1fr 48px; gap: 9px; padding: 7px; border-radius: 19px; background: var(--panel); border: 1px solid var(--border); }
.coach-form textarea { min-height: 48px; max-height: 120px; resize: none; padding: 12px 8px; border: 0; outline: 0; color: var(--text); background: transparent; line-height: 1.4; }
.coach-form button { width: 48px; height: 48px; align-self: end; border: 0; border-radius: 15px; background: var(--accent); color: var(--accent-text); font-size: 20px; font-weight: 900; }
.coach-note { margin: 10px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

/* Баланс 2: свой графитовый ритм, без нижней навигации. */
.app-shell { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.topbar { padding-top: 24px; }
.topbar h1 { font-size: 29px; font-weight: 820; }
.eyebrow { color: var(--accent-2); }
.menu-button { background: #1a191b; border-color: rgba(240,223,202,.2); }
.menu-button span { background: var(--accent); }
.hero-card { min-height: 250px; align-items: center; background: linear-gradient(132deg, #222024, #121214 64%, #241b1a); border-color: rgba(240,223,202,.14); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-self: stretch; justify-content: space-between; width: 100%; gap: 36px; }
.hero-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, black); }
.hero-card::after { width: 190px; height: 190px; border-color: rgba(240,223,202,.1); right: -48px; top: -64px; }
.hero-card h2 { position: relative; z-index: 2; max-width: 290px; font-size: clamp(27px, 7vw, 38px); }
.today-date {
  margin: 0;
  position: relative;
  z-index: 2;
  color: var(--text);
  letter-spacing: -.035em;
  font-size: clamp(29px, 8.5vw, 39px);
  line-height: 1.06;
  font-weight: 900;
}
.hero-symbol-mask { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-symbol { position: absolute; right: 18px; top: 55px; width: 80px; height: 80px; animation: symbol-turn 18s linear infinite; }
.hero-symbol span { position: absolute; width: 35px; height: 35px; border-radius: 13px 5px 13px 5px; background: linear-gradient(135deg, #f3e4d4, #b7a39a); box-shadow: 0 8px 24px rgba(240,170,128,.18); }
.hero-symbol span:nth-child(1) { left: 0; top: 0; transform: rotate(12deg); }
.hero-symbol span:nth-child(2) { right: 0; top: 0; transform: rotate(100deg); }
.hero-symbol span:nth-child(3) { left: 0; bottom: 0; transform: rotate(-80deg); }
.hero-symbol span:nth-child(4) { right: 0; bottom: 0; transform: rotate(190deg); }
@keyframes symbol-turn { to { transform: rotate(360deg); } }
.capture-card { position: relative; width: 100%; margin: 14px 0 0; z-index: 3; padding: 17px; border-radius: 21px; border: 1px solid rgba(240,223,202,.18); background: #1a191b; box-shadow: 0 20px 46px rgba(0,0,0,.35); animation: capture-enter .55s cubic-bezier(.18,.8,.25,1) both; }
@keyframes capture-enter { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.capture-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.capture-index, .section-number { color: var(--accent-2); font-weight: 800; letter-spacing: .1em; }
.capture-card textarea { display: block; width: 100%; min-height: 88px; margin: 11px 0; padding: 7px 0; resize: vertical; outline: 0; border: 0; color: var(--text); background: transparent; font-size: 17px; line-height: 1.4; }
.capture-card textarea::placeholder { color: #b9aea7; }
.capture-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.capture-actions button { min-height: 42px; border-radius: 13px; border: 1px solid var(--border); padding: 0 14px; font-weight: 760; }
.capture-mic { background: #252225; color: var(--accent-2); }
.capture-mic.recording { animation: record-pulse 1.2s ease-in-out infinite; border-color: var(--accent-2); }
.capture-submit { background: var(--accent); color: var(--accent-text); }
.capture-submit span { margin-left: 8px; }
.capture-status { margin: 8px 0 0; min-height: 0; color: var(--muted); font-size: 12px; }
.capture-status:empty { display: none; }
.summary-grid { margin-top: 22px; }
.summary-grid > .empty-state { grid-column: 1 / -1; }
.summary-card { background: linear-gradient(145deg, #1b191b, #111113); border-color: rgba(240,223,202,.1); }
.summary-card:hover { border-color: rgba(240,170,128,.35); }
.summary-card .accent { color: var(--accent-2); }
.section-heading h3 { font-size: 17px; }
.section-number { font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dashboard-grid button { position: relative; min-height: 112px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; overflow: hidden; padding: 15px; border-radius: 20px; border: 1px solid rgba(240,223,202,.11); background: linear-gradient(145deg, #1d1b1e, #111113); text-align: left; animation: tile-reveal .5s cubic-bezier(.2,.8,.2,1) both; }
.dashboard-grid button:nth-child(2n) { animation-delay: .07s; }
.dashboard-grid button:nth-child(3n) { animation-delay: .14s; }
.dashboard-grid button::after { content: ""; position: absolute; width: 120px; height: 120px; right: -80px; top: -75px; border: 1px solid rgba(240,223,202,.13); border-radius: 50%; transition: transform .5s ease; }
.dashboard-grid button:active::after { transform: scale(1.6); }
.dashboard-grid button span { color: var(--muted); font-size: 10px; letter-spacing: .1em; font-weight: 800; }
.dashboard-grid button b { font-size: 21px; letter-spacing: -.035em; }
.dashboard-grid button em { position: absolute; right: 16px; bottom: 15px; color: var(--accent-2); font-style: normal; font-size: 19px; }
@keyframes tile-reveal { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.section-icon.copper { color: var(--accent-2); background: rgba(240,170,128,.12); }
.primary-icon, .feature-button, .quick-pill, .fab, .submit-button, .coach-form button { background: var(--accent); color: var(--accent-text); box-shadow: 0 10px 34px rgba(240,170,128,.08); }
.feature-button.secondary { background: #1a191b; color: var(--text); }
.entry-card { background: linear-gradient(145deg, #1c1a1d, #121214); }
.entry-card.completed { opacity: .6; }
.entry-card.completed .entry-main b { text-decoration: line-through; }
.entry-main .macro-line { display: block; margin-top: 5px; color: var(--accent-2); font-size: 11px; white-space: normal; }
.complete-button { grid-column: 2 / -1; justify-self: start; border: 1px solid var(--border); border-radius: 10px; background: #282326; color: var(--accent-2); padding: 6px 11px; font-size: 12px; }
.water-card, .trend-panel, .ask-hero, .ask-answer, .profile-form { margin: 18px 0; padding: 19px; border-radius: 22px; border: 1px solid rgba(240,223,202,.13); background: linear-gradient(145deg, #1d1b1e, #121214); }
.goal-card { margin: 18px 0; padding: 19px; border-radius: 22px; border: 1px solid rgba(240,223,202,.13); background: linear-gradient(145deg, #1d1b1e, #121214); }
.goal-card > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.goal-card > div:first-child span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.goal-card strong { font-size: 23px; white-space: nowrap; }
.goal-track { height: 7px; margin-top: 16px; overflow: hidden; border-radius: 9px; background: #383236; }
.goal-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent-2); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.goal-card .hint { margin-bottom: 0; }
.water-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.water-card-top span, .trend-heading span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.water-card-top strong { font-size: 23px; }
.water-track { height: 7px; margin: 16px 0 7px; overflow: hidden; border-radius: 9px; background: #383236; }
.water-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent-2); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.water-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.water-actions button { padding: 9px 4px; border: 1px solid var(--border); border-radius: 11px; background: #262326; font-size: 12px; font-weight: 700; }
.trend-heading { display: grid; gap: 6px; }
.trend-heading b { font-size: 22px; }
.trend-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; height: 164px; margin-top: 22px; }
.trend-day { display: grid; grid-template-rows: 1fr auto; justify-items: center; min-width: 0; }
.trend-bar { width: 100%; max-width: 28px; height: 100%; display: flex; align-items: end; border-radius: 9px; background: #292629; overflow: hidden; }
.trend-bar i { width: 100%; min-height: 3px; border-radius: inherit; background: linear-gradient(0deg, #bb765b, #f0dfca); animation: bar-grow .65s ease both; transform-origin: bottom; }
@keyframes bar-grow { from { transform: scaleY(0); } }
.trend-day small { color: var(--muted); font-size: 10px; margin-top: 7px; }
.trend-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.trend-metrics > div { padding: 15px; border-radius: 17px; background: var(--panel); border: 1px solid var(--border); }
.trend-metrics span { color: var(--muted); font-size: 11px; }
.trend-metrics b { display: block; margin-top: 9px; font-size: 20px; }
.ask-hero { color: var(--muted); line-height: 1.5; }
.ask-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ask-form input, .profile-form input { width: 100%; min-width: 0; min-height: 47px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; outline: 0; color: var(--text); background: #100f11; }
.ask-form button { border: 0; border-radius: 13px; padding: 0 12px; background: var(--accent); color: var(--accent-text); font-weight: 800; }
.ask-answer { min-height: 86px; color: var(--text); line-height: 1.5; white-space: pre-wrap; animation: tile-reveal .35s ease both; }
.profile-form { display: grid; gap: 14px; }
.profile-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.profile-form button { margin-top: 7px; }
.privacy-card { background: rgba(240,170,128,.07); color: var(--accent); border-color: rgba(240,170,128,.18); }
.entry-card:active, .feature-button.secondary:hover, .coach-prompts button:hover { border-color: rgba(240,170,128,.3); }
.metric-highlight { background: radial-gradient(circle at 50% 0, rgba(240,170,128,.16), transparent 65%), var(--panel); }
.side-menu { background: linear-gradient(160deg, #201d20, #101012 70%); border-left-color: rgba(240,223,202,.18); transition: transform .46s cubic-bezier(.16,.92,.24,1.05); }
.menu-item.active { background: rgba(240,223,202,.1); border-color: rgba(240,223,202,.19); color: var(--accent); }
.menu-item.active small { color: var(--muted); }
.menu-item > span { background: #292427; }
.coach-hero { background: radial-gradient(circle at 90% 10%, rgba(240,170,128,.2), transparent 38%), linear-gradient(145deg, #231d1e, #101012); border-color: rgba(240,223,202,.15); }
.coach-orbit { border-color: rgba(240,170,128,.33); box-shadow: inset 0 0 45px rgba(240,170,128,.08); }
.coach-message.user { background: var(--accent); }
.field input:focus, .field textarea:focus, .field select:focus, .ask-form input:focus, .profile-form input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(240,170,128,.1); }
.toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
.fab { display: none; background: #e9b394; border-radius: 50%; }
body.on-today .fab { display: block; }

/* Сдержанная глубина: объём появляется от света и тени, не от яркого цвета. */
.feature-button, .capture-submit, .submit-button, .primary-icon, .fab,
.coach-form button, .ask-form button {
  background: linear-gradient(155deg, #fff2df 0%, #e7c6ab 55%, #bf987d 100%);
  border: 1px solid rgba(255,244,229,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -3px 0 rgba(102,62,46,.14),
    0 7px 0 rgba(85,53,46,.45), 0 15px 28px rgba(0,0,0,.27);
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.feature-button:active, .capture-submit:active, .submit-button:active,
.primary-icon:active, .fab:active, .coach-form button:active, .ask-form button:active {
  transform: translateY(5px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 rgba(85,53,46,.45), 0 6px 15px rgba(0,0,0,.2);
}
.feature-button.secondary, .capture-mic, .water-actions button, .coach-prompts button {
  background: linear-gradient(155deg, #302b2e, #1d1b1e 65%, #171517);
  border: 1px solid rgba(240,223,202,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 0 rgba(0,0,0,.3), 0 10px 20px rgba(0,0,0,.18);
  color: var(--text);
}
.dashboard-grid button {
  background: linear-gradient(150deg, #2a272b 0%, #1a191c 55%, #121214 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -3px 0 rgba(0,0,0,.16),
    0 7px 0 rgba(0,0,0,.28), 0 18px 28px rgba(0,0,0,.18);
}
.dashboard-grid button:active { transform: translateY(5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 rgba(0,0,0,.25); }
.dashboard-grid button b { display: block; max-width: 100%; padding-right: 24px; font-size: clamp(18px, 2vw, 24px); line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }
.menu-item b, .menu-item small, .entry-main b, .entry-main p, .summary-card small { overflow-wrap: anywhere; }
.entry-main b { white-space: normal; line-height: 1.3; }
.feature-button, .capture-actions button, .water-actions button, .coach-prompts button,
.menu-item, .summary-card, .dashboard-grid button { min-width: 0; }
.feature-button, .capture-actions button, .water-actions button, .coach-prompts button { overflow-wrap: anywhere; line-height: 1.25; }

@media (max-width: 430px) {
  .today-date { max-width: 100%; }
  .hero-symbol-mask {
    inset: 0;
    z-index: 0;
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.25) 60%, #000 100%);
    mask-image: linear-gradient(90deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.25) 60%, #000 100%);
  }
  .hero-symbol { right: -70px; top: -25px; width: 320px; height: 320px; opacity: .42; }
  .hero-symbol span { width: 43%; height: 43%; border-radius: 26px 9px 26px 9px; }
  .capture-card { min-height: 215px; display: flex; flex-direction: column; justify-content: space-between; }
  .capture-top > span:last-child { max-width: 42%; text-align: right; }
  .dashboard-grid button { min-height: 110px; }
  .dashboard-grid button b { font-size: clamp(17px, 5vw, 21px); }
  .summary-card { padding: 14px; }
  .summary-card strong { font-size: clamp(21px, 6vw, 25px); }
}

@media (min-width: 560px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-card.wide { grid-column: auto; }
}

@media (min-width: 700px) {
  .app-shell { max-width: none; padding: 24px 30px 110px; }
  .topbar { padding: 8px 4px 25px; }
  .topbar h1 { font-size: 34px; }
  .hero-card { min-height: 230px; padding: 32px; }
  .hero-card h2 { max-width: 540px; font-size: clamp(34px, 4vw, 52px); }
  .hero-symbol { width: 104px; height: 104px; right: 34px; top: 68px; }
  .hero-symbol span { width: 45px; height: 45px; }
  .capture-card { margin-left: 24px; margin-right: 24px; }
  .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fab { right: 30px; bottom: 30px; }
  .screen-title h2 { font-size: 34px; }
  .side-menu { width: min(42vw, 430px); }
}

@media (min-width: 1050px) {
  .app-shell { padding: 30px clamp(36px, 4vw, 80px) 110px; }
  .screen.active[data-screen="today"] {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(350px, .65fr);
    column-gap: 22px;
    row-gap: 18px;
  }
  .screen[data-screen="today"] .today-date { grid-column: 1 / -1; }
  .screen[data-screen="today"] .hero-card { grid-column: 1; min-height: 260px; }
  .screen[data-screen="today"] .capture-card {
    grid-column: 2;
    min-height: 260px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .screen[data-screen="today"] .capture-card textarea { flex: 1; }
  .screen[data-screen="today"] .summary-grid,
  .screen[data-screen="today"] .section-heading,
  .screen[data-screen="today"] .dashboard-grid,
  .screen[data-screen="today"] .entry-list { grid-column: 1 / -1; margin-top: 0; }
  .summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid button { min-height: 145px; padding: 20px; }
  .screen[data-screen="today"] .entry-list,
  .screen[data-screen="calendar"] .entry-list,
  .screen[data-screen="note"] .entry-list,
  .screen[data-screen="idea"] .entry-list,
  .screen[data-screen="diary"] .entry-list,
  .screen[data-screen="habit"] .entry-list,
  .screen[data-screen="finance"] .entry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen.active[data-screen="food"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .screen[data-screen="food"] .screen-title,
  .screen[data-screen="food"] .action-row,
  .screen[data-screen="food"] > .hint,
  .screen[data-screen="food"] .entry-list { grid-column: 1 / -1; }
  .screen[data-screen="food"] .goal-card { grid-column: 1; }
  .screen[data-screen="food"] .water-card { grid-column: 2; }
  .food-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .food-actions .feature-button:first-child { grid-column: auto; }
  .screen[data-screen="food"] .entry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coach-hero, .coach-prompts, .coach-messages, .coach-form, .coach-note,
  .ask-hero, .ask-form, .ask-answer, .profile-form { max-width: 980px; }
  .side-menu { width: min(31vw, 450px); }
  .modal { align-items: center; padding: 24px; }
  .modal-sheet { width: min(100%, 620px); max-height: min(90vh, 850px); border-radius: 26px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
