/* ============================================================
   Переиспользуемые компоненты экранов — Earthy Organic
   Органичные (асимметричные «blob») border-radius, тёплые тени,
   SVG-волна как разделитель.
   ============================================================ */

/* --- Иконка формы (контейнер 22px) --- */
.ico { width: 22px; height: 22px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; }

/* --- Статус-бар телефона (имитация) --- */
.statusbar {
  height: 54px;
  flex: 0 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 6px;
  font-family: var(--font-base);
  font-size: 14px; font-weight: 600;
  color: var(--color-dark);
  z-index: 5;
}
.statusbar--light { color: var(--color-white); }
.statusbar__icons { display: flex; gap: 5px; align-items: center; }

/* --- App bar --- */
.appbar {
  height: 60px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-grey);
}
.appbar__title { font-size: 18px; font-weight: 600; color: var(--color-dark); flex: 1; }
.appbar__back, .appbar__action {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-lite-grey); border: none; cursor: pointer;
  color: var(--color-dark);
}

/* --- Bottom navigation --- */
.bottomnav {
  flex: 0 0 auto;
  height: 72px;
  background: var(--color-white);
  border-top: 1px solid var(--color-grey);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--color-grey-icons);
  font-size: 9px; font-weight: 600;
  background: none; border: none; cursor: pointer; font-family: var(--font-base);
}
.bottomnav__item--active { color: var(--color-green-dark); }
.bottomnav__item--add { position: relative; }
.bottomnav__add-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--btn-red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(186, 126, 110, .35);
  margin-top: -18px;
  font-size: 26px; font-weight: 300;
}

/* --- Карточка: ОРГАНИЧНЫЙ асимметричный blob-radius --- */
.card {
  background: var(--color-white);
  border-radius: 32px 18px 30px 22px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

/* --- SVG-волна как разделитель (тонкая линия морской волны) ---
   Использование: <div class="wave-divider"></div> */
.wave-divider {
  width: 100%;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 7 Q 15 0, 30 7 T 60 7 T 90 7 T 120 7' fill='none' stroke='%23A3C6C4' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 14px;
  opacity: .7;
}

/* --- Лист-разделитель (декоративный SVG-лист) ---
   Использование: <div class="leaf-divider"></div> */
.leaf-divider {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  color: var(--color-primary);
  font-family: var(--font-hand);
  font-size: 22px;
}
.leaf-divider::before, .leaf-divider::after {
  content: '';
  flex: 1; height: 2px;
  background: currentColor;
  opacity: .3;
  border-radius: 2px;
}

.hidden { display: none !important; }

/* --- Общий каркас новых продуктовых экранов --- */
.appbar-e {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 4px;
}
.appbar-e h1 {
  flex: 1; font-size: 17px; font-weight: 600; color: var(--color-dark);
}
.back-btn, .round-action {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-white); border: 1px solid var(--color-grey);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--color-dark); flex: 0 0 auto;
  cursor: pointer; font-family: var(--font-base);
}
.screen-scroll {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  overflow-y: auto; background: var(--screen-bg);
}
.screen-body { padding: 8px 16px 22px; flex: 1; }
.section-kicker {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--color-dark-grey); margin: 14px 0 8px;
}
.soft-card {
  background: var(--color-white); border: 1px solid var(--feat-border);
  border-radius: 24px 14px 20px 16px; padding: 14px;
  box-shadow: var(--shadow-task);
}
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--color-grey); border-radius: var(--radius-pill);
  background: var(--color-white); color: var(--color-dark-grey);
  font-size: 10px; padding: 5px 9px;
}
.chip--active { background: var(--sage-dark); border-color: var(--sage-dark); color: var(--color-white); }
.chip--sea { background: rgba(163,198,196,.28); border-color: rgba(163,198,196,.55); color: #2c5250; }
.notice {
  border: 1px solid rgba(163,198,196,.55); border-radius: 20px 12px 18px 14px;
  background: rgba(163,198,196,.2); color: var(--color-dark);
  font-size: 11px; line-height: 1.45; padding: 11px 13px;
}
.notice--clay { background: rgba(186,126,110,.12); border-color: rgba(186,126,110,.34); }
.sticky-actions {
  position: sticky; bottom: 0; padding: 12px 16px 16px;
  background: linear-gradient(0deg,var(--screen-bg) 70%,transparent);
  z-index: 5;
}
.avatar-fallback {
  width: 100%; height: 100%; border-radius: inherit;
  display: flex; align-items: center; justify-content: center;
  background: var(--sea); color: var(--sage-dark);
  font-family: var(--font-hand); font-size: 22px; font-weight: 700;
  object-fit: cover;
}
.voice-btn {
  width: 42px; height: 42px; border: 1px solid var(--color-grey);
  border-radius: 50%; background: var(--color-white); color: var(--sage-dark);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
}
.voice-btn.is-recording { background: var(--btn-red); color: var(--color-white); border-color: var(--btn-red); }

/* --- Кружок баланса внимания (переиспользуется на home.html и tasks.html) --- */
.balance-ring { display: block; overflow: visible; }
.balance-ring__track { fill: none; stroke: rgba(0,0,0,.08); }
.balance-ring__fill { fill: none; stroke-linecap: round; }
.balance-ring__label { font-family: var(--font-base); font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.balance-ring--sm { width: 28px; height: 28px; }
.balance-ring--sm .balance-ring__track,
.balance-ring--sm .balance-ring__fill { stroke-width: 3; }
.balance-ring--sm .balance-ring__label { font-size: 10px; }
.balance-ring--md { width: 40px; height: 40px; }
.balance-ring--md .balance-ring__track,
.balance-ring--md .balance-ring__fill { stroke-width: 3; }
.balance-ring--md .balance-ring__label { font-size: 11px; }
.balance-ring--ok .balance-ring__fill { stroke: var(--sage); }
.balance-ring--ok .balance-ring__label { fill: var(--sage-dark); }
.balance-ring--warn .balance-ring__fill { stroke: var(--color-yellow); }
.balance-ring--warn .balance-ring__label { fill: #8a6a1f; }
.balance-ring--danger .balance-ring__fill { stroke: var(--btn-red); }
.balance-ring--danger .balance-ring__label { fill: var(--btn-red); }
.microcopy { font-size: 10px; color: var(--color-dark-grey); line-height: 1.4; }
