/* UI refinement: one vocabulary for all screens and interaction states. */
:root {
  --fs-body: 16px; --fs-title: 18px; --fs-wordmark: 24px; --fs-h1: 24px;
  --lh-body: 1.45; --text-2: #b1b1b8; --text-3: #a0a0a8;
  --page-pad: 20px; --r-card: 14px; --r-field: 12px;
  --z-nav: 20; --z-overlay: 40; --z-toast: 60;
  --focus: #8bacff;
}
:root[data-theme="light"] { --text-2: #51515b; --text-3: #62626d; --focus: #284fc4; }
body { font-size: 16px; }
button, input, select, textarea { font: inherit; }
button, summary, [role="button"] { touch-action: manipulation; }
button:not(.tab), input:not([type="file"]):not([type="hidden"]), select { min-height: 44px; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px;
}
button { transition: background-color 160ms ease-out, color 160ms ease-out, opacity 160ms ease-out; }
button:hover:not(:disabled) { filter: brightness(1.08); }
button:active:not(:disabled) { opacity: .75; }
h1, h2, h3 { text-wrap: balance; }
.wordmark, .screen-title { letter-spacing: -.025em; line-height: 1.2; font-weight: 650; text-transform: none; }
.headline { align-items: center; min-height: 52px; margin-bottom: 16px; }
.headline .wordmark { margin: 0; }
.screen { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.screen__scroll { scrollbar-width: thin; scrollbar-color: var(--border) transparent; padding-bottom: 20px; }
.home-modes, .subtabs { margin-bottom: 20px; }
.subtab, .home-mode { min-height: 44px; padding: 10px 12px; font-size: 14px; white-space: nowrap; }
.icon-btn, .compact-more, .row-action, .goal__ms-more, .chat-more, .backbtn { min-width: 44px; min-height: 44px; }
.icon-btn svg { width: 22px; height: 22px; }
.label { font-size: 15px; color: var(--text); letter-spacing: 0; margin-top: 24px; margin-bottom: 12px; }
.home-date { color: var(--text-2); font-size: 15px; margin: 2px 0 14px; }
.priority-row { padding: 14px 0; }
.priority__title { font-size: 17px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.priority__mark { border: 0; background: transparent; padding: 0; color: var(--text); cursor: pointer; }
.priority__menu { color: var(--text-2); }
.priority-tracker { margin: 12px 0 28px; padding-top: 12px; }
.priority-tracker__head { font-size: 14px; }
.priority-tracker__week { gap: 12px; }
.day-brief { border-top: 0; margin-top: 24px; }
.body-line__advice, .body-line__rhythm { font-size: 14px; font-weight: 400; color: var(--text-2); }
.summary-card { border: 0; padding: 0; background: none; }
.empty-state { padding: 28px 0; max-width: 52ch; }
.empty-state h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.3; font-weight: 600; }
.empty-state p { margin: 0 0 20px; color: var(--text-2); line-height: 1.55; }
.empty-state .cta { display: inline-flex; width: auto; min-width: 140px; }
.stub-note { color: var(--text-2); font-size: 15px; line-height: 1.5; padding: 20px 0; }
.cta { min-height: 48px; border-radius: 12px; padding: 12px 18px; font-size: 16px; font-weight: 600; }
.cta--ghost { border: 1px solid var(--border); background: transparent; color: var(--text); }
.cta--danger { background: #b82932; color: #fff; }
.cta + .cta { margin-top: 0; }
.ui-input, .goal__input, textarea, .gc__field { border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 16px; color: var(--text); background: var(--surface-2); min-width: 0; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
.ui-input:focus, .goal__input:focus, .gc__field:focus { border-color: var(--focus); }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; min-width: 0; }
.form-field label { display: block; color: var(--text); font-size: 14px; font-weight: 500; }
.form-field textarea { min-height: 96px; resize: vertical; }
.ui-form { padding-top: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-error { font-size: 14px; color: #ff8d93; line-height: 1.4; margin: 10px 0 16px; }
:root[data-theme="light"] .form-error { color: #ac1e29; }
.form-actions { display: flex; gap: 10px; padding-top: 8px; align-items: stretch; }
.form-actions .cta { flex: 1; }
.form-actions .cta--ghost { flex: 0 0 auto; min-width: 100px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dialog-head h2, .pick-sheet h2 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0; }
.ui-msg { margin: 0 0 24px; font-size: 18px; line-height: 1.5; }
.pick-overlay, .settings-sheet { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgb(0 0 0 / .58); padding: 16px; display: flex; align-items: flex-end; justify-content: center; }
.pick-sheet, .settings-sheet__inner { width: 100%; max-width: 540px; max-height: min(90dvh, 840px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; margin: 0; box-shadow: 0 12px 50px rgb(0 0 0 / .18); }
.pick-sheet:focus, .settings-sheet__inner:focus { outline: none; }
.settings-sheet__inner .label:first-child { margin-top: 0; }
.settings-sheet__inner > .cta { margin-top: 16px; }
.settings-section { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--border); }
.settings-section:last-of-type { border-bottom: 0; }
.settings-section > summary { font-size: 16px; font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; }
.settings-section > summary::after { content: '+'; color: var(--text-2); font-size: 20px; }
.settings-section[open] > summary::after { content: '−'; }
.settings-section > summary::-webkit-details-marker { display: none; }
.settings-section > .label { margin-top: 16px; }
.settings-diag { font-size: 14px; line-height: 1.6; }
.swatch { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
.switch { min-height: 44px; padding: 7px 0; background-clip: content-box; }
.switch__title { font-size: 15px; font-weight: 500; }
.switch__hint { display: none; }
.switch-row { padding: 14px 0; }
.toast { z-index: var(--z-toast); max-width: min(420px, calc(100vw - 32px)); font-size: 15px; }
.task-toolbar { margin-bottom: 12px; }
.task-summary { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 18px; }
.task-summary__value { font-size: 15px; font-weight: 500; }
.task-summary__label { font-size: 14px; }
.task-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; padding: 12px 0; min-height: 68px; align-items: center; }
.task-check { width: 44px; min-height: 44px; border: 0; background: transparent; display: grid; place-items: center; padding: 0; color: var(--text); }
.task-row__box { width: 23px; height: 23px; border-radius: 7px; border: 1.5px solid var(--text-3); display: grid; place-items: center; }
.task-row--done .task-row__box { background: var(--accent); border-color: var(--accent); color: #000; }
.task-main { border: 0; background: none; padding: 4px 8px 4px 0; text-align: left; color: var(--text); line-height: 1.4; }
.task-row__title { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.task-meta { display: block; font-size: 14px; color: var(--text-2); margin-top: 4px; }
.task-row--done .task-row__title { text-decoration: line-through; color: var(--text-2); }
.search-field { margin: 4px 0 16px; }
.search-field input { padding-left: 14px; background: var(--surface); }
.goal__form { padding: 20px; }
.goal__form > .form-field:last-of-type { margin-bottom: 0; }
.goal__card { border: 0; background: none; border-radius: 0; border-bottom: 1px solid var(--border); padding: 18px 0; }
.goal__head { min-height: 48px; }
.goal__ms { min-height: 52px; }
.goal__num { display: none; }
.goal__title { font-size: 17px; line-height: 1.4; }
.goal__sub, .goal__ms-sub { font-size: 14px; line-height: 1.4; }
.goal__btn { min-height: 44px; min-width: 44px; }
.goal__path-title { font-size: 20px; }
.gc__head { align-items: center; margin-bottom: 20px; }
.gc__close { width: 44px; height: 44px; }
.gc__title { width: 100%; min-height: 52px; font-size: 20px; padding: 12px 0; }
.gc__row { gap: 12px; }
.gc__row > span { font-size: 15px; }
.gc__toggle { min-height: 44px; min-width: 50px; }
.gc__colors { gap: 10px; flex-wrap: wrap; }
.gc__field { width: auto; max-width: 100%; }
.wo-goal__val { font-size: 19px; }
.wo-goal__pct { display: none; }
.wo-week-summary { margin-bottom: 22px; }
.wo-plan-row, .wo-past, .workout-preview .setrow { min-width: 0; overflow: visible; }
.setrow { gap: 12px; min-height: 54px; }
.setrow__day { min-width: 0; overflow-wrap: anywhere; }
.setrow__val { flex: 0 0 auto; white-space: nowrap; font-size: 15px; }
.wo-past__title, .wo-plan-row__title { white-space: normal; line-height: 1.4; }
.wo-cta-row { gap: 10px; }
.fuel__totals { padding: 18px; }
.fuel__empty { text-align: left; padding: 12px 0 24px; color: var(--text); }
.fuel__empty-hint { font-size: 15px; line-height: 1.5; color: var(--text-2); margin-top: 8px; }
.fuel__footer, .fuel__actions { gap: 10px; }
.chat-model-chip { min-height: 44px; font-size: 14px; padding: 8px 10px; background: transparent; }
.chat-title { font-size: 20px; }
.chat-input { border-radius: 16px; min-height: 48px; }
.chat-input textarea, #chat-text { font-size: 16px; line-height: 1.45; }
.msg { max-width: 94%; padding: 14px 16px; line-height: 1.5; overflow-wrap: anywhere; }
.msg--bot { border: 0; background: var(--surface); }
.msg--user { max-width: 88%; }
.rich-text p { margin: 0 0 12px; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text h3 { font-size: 17px; line-height: 1.35; margin: 18px 0 8px; }
.rich-text h3:first-child { margin-top: 0; }
.rich-text ul, .rich-text ol { margin: 8px 0 14px; padding-left: 20px; }
.rich-text li { margin-bottom: 5px; }
.rich-text a { color: var(--focus); text-underline-offset: 3px; }
.rich-text pre { white-space: pre; overflow-x: auto; padding: 12px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.rich-text code { font-size: .9em; font-family: ui-monospace, monospace; }
.chat-item { min-height: 70px; }
.chat-item__title { font-size: 17px; font-weight: 500; }
.chat-attach__x { min-width: 44px; min-height: 44px; }
.chat-new-message { position: absolute; bottom: 84px; right: 22px; width: auto; z-index: 5; }
.tabbar { z-index: var(--z-nav); }
.is-telegram .screen { padding-top: calc(12px + var(--tg-top, 0px)); }
.is-telegram .tabbar { padding-bottom: max(var(--sab), var(--tg-bottom, 0px)); height: calc(var(--tabbar-h) + max(var(--sab), var(--tg-bottom, 0px))); }
.keyboard-open .app { bottom: auto; height: var(--keyboard-height); }
.keyboard-open .tabbar { display: none; }
.keyboard-open .pick-overlay, .keyboard-open .settings-sheet { height: var(--keyboard-height); bottom: auto; padding: 8px; }
.keyboard-open .pick-sheet, .keyboard-open .settings-sheet__inner { max-height: calc(var(--keyboard-height) - 16px); }
@media (max-width: 360px) {
  :root { --page-pad: 16px; }
  .headline { gap: 8px; }
  .subtab, .home-mode { padding-left: 9px; padding-right: 9px; font-size: 13px; }
  .pick-overlay, .settings-sheet { padding: 8px; }
  .pick-sheet, .settings-sheet__inner { padding: 18px; }
  .form-actions { flex-wrap: wrap; }
}
@media (min-width: 700px) {
  .pick-overlay, .settings-sheet { align-items: center; }
}
@media (min-width: 900px) {
  :root { --app-max: 1320px; --page-pad: 40px; }
  .app { display: grid; grid-template-columns: 188px minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
  .screen { grid-column: 2; grid-row: 1; padding: 30px 40px 20px; width: 100%; }
  .screen > .headline, .screen > .home-modes, .screen > .screen__scroll { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
  .tabbar { grid-column: 1; grid-row: 1; position: static; height: auto; width: auto; border-top: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 30px 16px; gap: 8px; }
  .tabbar::before { content: 'Эгида'; font-size: 22px; font-weight: 650; padding: 6px 12px 28px; color: var(--text); }
  .tab { flex: 0 0 auto; min-height: 48px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px; border-radius: 10px; }
  .tab--active { background: var(--surface-2); }
  .tab__label { font-size: 15px; }
  .tab svg { width: 21px; height: 21px; }
  .home-modes { justify-content: flex-start; }
  .home-mode { flex: 0 0 auto; min-width: 130px; }
  #body-view, #fuel-view, #work-view { width: 100%; max-width: 860px; margin: 0 auto; }
  #chat-view { max-width: 860px; width: 100%; margin: 0 auto; }
  .goal__form { max-width: 640px; }
  .msg { max-width: 76%; }
  .is-telegram .tabbar { height: auto; padding-bottom: 20px; }
  .toast { left: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0); white-space: nowrap; border: 0 !important; }
.form-title { font-size: 22px; margin: 0 0 22px; }
.task-detail-actions { margin: 4px 0 20px; }
.danger-action { color: #ff9095 !important; }
:root[data-theme="light"] .danger-action { color: #b3222d !important; }
.work-kinds .subtab { flex: 1; }
.control-view { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.control-kinds { margin-top: 0; }
.control-kinds .subtab { flex: 1; }
.control-toolbar { min-height: 52px; display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.control-filter { min-height: 36px; padding: 6px 12px; border: 0; border-radius: 18px; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; }
.control-filter--active { background: var(--surface-2); color: var(--text); }
.control-add { width: auto; margin-left: auto; min-height: 44px; padding-inline: 18px; }
.control-list { padding-top: 6px; }
.control-row { padding: 17px 0; border-bottom: 1px solid var(--border); }
.control-row:last-child { border-bottom: 0; }
.control-row--closed { opacity: .62; }
.control-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.control-status { font-size: 13px; font-weight: 700; color: var(--text-2); }
.control-row--overdue .control-status { color: #ff8d93; }
:root[data-theme="light"] .control-row--overdue .control-status { color: #ac1e29; }
.control-deadline { color: var(--text-2); font-size: 13px; text-align: right; }
.control-row__title { font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.control-source-link { display: block; min-height: 44px; width: 100%; padding: 10px 0; border: 0; background: none; color: var(--text-2); text-align: left; font: inherit; font-size: 14px; }
.control-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.control-actions .goal__btn { min-height: 44px; padding-inline: 14px; }
.control-loading { padding: 28px 0; color: var(--text-2); }
.control-source { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; margin: 18px 0; }
.control-source__date { color: var(--text-2); margin-top: 14px; font-size: 14px; }
.settings-fact { font-weight: 600; padding: 14px 0 8px; }
.settings-note { color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 6px 0 12px; }
.source-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.source-row:last-child { border-bottom: 0; }
.source-row__title { font-weight: 600; overflow-wrap: anywhere; }
.source-disabled, .policy-details { margin: 10px 0; }
.source-disabled > summary, .policy-details > summary { min-height: 44px; display: flex; align-items: center; color: var(--text-2); cursor: pointer; }
.runtime-failure { color: #ff8d93; font-size: 14px; line-height: 1.45; margin: 6px 0; }
:root[data-theme="light"] .runtime-failure { color: #ac1e29; }
.task-toolbar__filters { display: flex; gap: 4px; width: 100%; }
.task-filter { flex: 1; padding: 9px 8px; font-size: 14px; }
.goal__form { border: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.opt-row { min-height: 52px; font-size: 16px; padding: 12px 0; text-align: left; }
.switch-row__hint { display: none; }
.switch::after { top: 11px; }
.chat-chip { min-height: 44px; }
.chat-head { min-height: 52px; align-items: center; }
.chat-head .detail-head__title { font-size: 19px; line-height: 1.35; overflow-wrap: anywhere; }
.chat-head__main { min-width: 0; }
.chat-head .backbtn, .chat-more { flex-shrink: 0; }
.loading-state { padding: 28px 0; color: var(--text-2); font-size: 15px; }
.body-advice { font-size: 16px; line-height: 1.55; margin: 24px 0; }
button.recovery-ring { display: flex; margin: 8px auto 26px; padding: 0; border: 0; color: var(--text); }
.recovery-ring__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; }
button.tile { display: flex; flex-direction: column; align-items: flex-start; border: 0; border-bottom: 1px solid var(--border); text-align: left; border-radius: 0; background: none; color: var(--text); gap: 10px; padding: 18px 12px; }
.tile__value { font-size: 26px; }
.tiles { gap: 0 16px; }
.gc__head h2 { font-size: 20px; margin: 0; flex: 1; }
.gc__save { width: auto; flex: 0 0 auto; }
.gc-date-field { grid-column: 1 / -1; }
.gc__field { width: 100%; min-width: 0; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
:root[data-theme="light"] { --accent: #2b7c28; --accent-dim: #21561f; }
:root[data-theme="light"][data-accent="green"] { --accent: #2b7c28; }
:root[data-theme="light"][data-accent="orange"] { --accent: #9b560e; }
:root[data-theme="light"][data-accent="cyan"] { --accent: #06748c; }
:root[data-theme="light"][data-accent="blue"] { --accent: #2e57bf; }
:root[data-theme="light"][data-accent="red"] { --accent: #b32a34; }
.card.goal { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 20px 0; }
.goal__rank { display: none; }
.goal__add-ms .form-field { flex: 1; }
.priority { grid-template-columns: 44px minmax(0,1fr) 44px; }
.priority__mark { min-width: 44px; }
.form-actions .cta, .form-actions .cta--ghost { flex: 1 1 0; min-width: 0; width: auto; }
.settings-sheet__inner .form-actions .cta + .cta { margin-top: 0; }
#body-view .setrow { display: flex; min-width: 0; }
#body-view .setrow__day { flex: 1 1 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
#body-view .setrow__val { flex: 0 0 auto; font-size: 14px; }
.goal__form .settings-section { padding: 6px 0 12px; }
@media (min-width: 900px) {
  .chat-open .tabbar { display: flex; }
  .mg__event, .mg__ev { font-size: 12px; min-height: 18px; line-height: 18px; }
}
.mg__cell { appearance: none; text-align: left; font: inherit; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: transparent; color: var(--text); min-width: 0; }
.mg__cell--out { opacity: 1; }
.mg__cell--out .mg__num { color: var(--text-3); }
.mg__ev.is-past, .tg__ev.is-past, .ev.is-past { opacity: 1; }
.gc-colored .tg__ev-time { color: inherit; opacity: 1; }
#chat-view { position: relative; }
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
.gc-colored .tg__ev-title, .gc-colored .tg__ev-time { color: inherit; }
.progress-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0 20px; font-size: 15px; color: var(--text-2); }
.progress-summary__value { font-size: 22px; color: var(--text); }
.habit-stat { border: 0; background: none; padding: 12px 0; }
.gc__toggle::after { top: 10px; }
.app-navigation { flex: none; min-height: 0; }
.screen:not([hidden]) { animation: none; }
.card:active, .tile:active, .tab:active { transform: none; }
.mg__ev { font-size: 10px; line-height: 1.3; min-height: 14px; }
.mg__more { font-size: 10px; }
.rec { z-index: var(--z-overlay); }
@media (min-width: 900px) {
  .app-navigation { grid-column: 1; grid-row: 1; height: 100%; }
  .app-navigation .tabbar { height: 100%; }
  .mg__ev { font-size: 12px; min-height: 18px; line-height: 18px; }
}
.is-native[data-theme="light"] body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); pointer-events: none; background: #000; z-index: 70; }
button.tg__allday-ev { border: 0; padding: 10px 12px; width: 100%; text-align: left; }
.ex-row { width: 100%; border: 0; background: transparent; text-align: left; color: var(--text); padding: 10px 0; }
#body-view .card:has(> .ex-row) { padding: 4px 0; margin: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
.pick-sheet > .cta + .cta { margin-top: 10px; }
.equipment-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.equipment-option { flex: 1 1 auto; min-width: 90px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; color: var(--text-2); background: transparent; padding: 12px; }
.equipment-option--active { color: var(--cta-fg); background: var(--cta-bg); border-color: var(--cta-bg); }
.equipment-option svg { width: 20px; height: 20px; }
.wheels--single { position: relative; width: 100%; margin-top: 12px; padding-bottom: 20px; }
.chat-attach__name { display: block; font-size: 14px; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-telegram .settings-sheet, .is-telegram .pick-overlay { padding-top: max(16px,var(--tg-top,0px)); padding-bottom: max(16px,var(--tg-bottom,0px)); }
.is-telegram .pick-sheet, .is-telegram .settings-sheet__inner { max-height: calc(100dvh - var(--tg-top,0px) - var(--tg-bottom,0px) - 32px); }
.is-telegram.keyboard-open .pick-sheet, .is-telegram.keyboard-open .settings-sheet__inner { max-height: calc(var(--keyboard-height) - var(--tg-top,0px) - 28px); }
@media (min-width: 600px) and (max-width: 899px) { :root { --app-max: 760px; --page-pad: 32px; } }
.form-error, .ui-msg { overflow-wrap: anywhere; }
.dialog-note { font-size: 14px; line-height: 1.5; color: var(--text-2); margin: 0 0 16px; }
.message-photo { display: block; padding: 0; border: 0; background: none; max-width: 100%; cursor: zoom-in; }
.image-preview { display: block; max-width: 100%; max-height: 70dvh; object-fit: contain; }

/* Destructive controls remain readable on both button surfaces. */
.control-actions .goal__btn--danger { color: #ff9095; }
:root[data-theme="light"] .control-actions .goal__btn--danger { color: #a51e29; }
