/* === RESET === */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  font-feature-settings: "ss01", "cv11";
  font-size: 17px;
  color: #2a1d3a;
  background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 50%, #c2e9fb 100%);
  background-attachment: fixed;
}
body {
  min-height: 100vh; line-height: 1.5;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

#app { max-width: 480px; margin: 0 auto; padding: 18px 16px; }
header {
  text-align: center; padding: 20px 4px 14px;
  margin-bottom: 18px;
  color: #2a1d3a;
  position: relative;
}
.stats-icon {
  position: absolute;
  top: 24px; right: 4px;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(149, 128, 191, 0.15);
}
.stats-icon:hover { background: rgba(255, 255, 255, 0.7); transform: scale(1.05); }
.stats-icon:active { transform: scale(0.95); }
h1 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  color: #2a1d3a;
  line-height: 1.1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap;
}
h1 .h-emoji {
  font-size: 24px;
  -webkit-text-fill-color: initial;
  background: none;
}
h1 .h-text {
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle { color: #6b5a7d; font-size: 14px; margin-top: 4px; font-weight: 500; }
main { display: flex; flex-direction: column; gap: 14px; }

.card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 18px 18px;
  border-radius: 24px;
  box-shadow:
    0 8px 32px rgba(149, 128, 191, 0.15),
    0 1px 2px rgba(255, 255, 255, 0.5) inset;
}
.card h3 {
  font-size: 16px; font-weight: 600; margin-bottom: 12px;
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
  text-align: center;
}
.hidden { display: none !important; }

textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 12px 14px;
  font-size: 16px; font-family: inherit; resize: none; outline: none;
  color: #2a1d3a;
  border-radius: 16px;
  transition: all 0.2s ease;
}
textarea::placeholder { color: #8a7aa0; }
textarea:focus {
  border-color: rgba(255, 94, 156, 0.5);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 94, 156, 0.1);
}
.input-buttons { display: flex; gap: 8px; margin-top: 12px; }
.input-buttons-3 { gap: 6px; }
.btn-emoji {
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px; font-size: 14px;
  color: #2a1d3a; cursor: pointer;
  font-family: inherit; font-weight: 500;
  border-radius: 16px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-emoji:hover { background: rgba(255, 255, 255, 0.7); transform: translateY(-1px); }
.btn-emoji:active { transform: translateY(0); }
.input-buttons-3 .btn-emoji { font-size: 13px; padding: 10px 2px; }
.emotion-inline { margin-top: 14px; margin-bottom: 6px; }

.btn-voice-stop {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, #ff5e5e 0%, #ff8e53 100%);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.voice-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 8px;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #ff5e9c 0%, #ff8e53 100%);
  color: #fff;
  border: 0;
  padding: 16px; font-size: 16px; font-weight: 600;
  margin-top: 14px; cursor: pointer; min-height: 52px;
  font-family: inherit; border-radius: 18px;
  letter-spacing: 0.01em;
  box-shadow:
    0 8px 20px rgba(255, 94, 156, 0.35),
    0 1px 2px rgba(255, 255, 255, 0.4) inset;
  transition: all 0.2s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(255, 94, 156, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  color: #2a1d3a;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px;
  font-size: 14px; margin-top: 10px; cursor: pointer;
  min-height: 44px; font-family: inherit; font-weight: 500;
  border-radius: 16px;
  transition: all 0.2s ease;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.7); }

.meta-label {
  font-size: 14px; color: #6b5a7d;
  margin: 14px 0 8px; font-weight: 500;
}
.emotion-grid, .fullness, .context {
  display: grid; gap: 6px; margin-bottom: 6px;
}
.emotion-grid { grid-template-columns: repeat(4, 1fr); }
.fullness { grid-template-columns: repeat(5, 1fr); }
.context { grid-template-columns: repeat(4, 1fr); }
.emotion-grid button, .fullness button, .context button {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 18px; cursor: pointer; font-family: inherit;
  border-radius: 16px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.emotion-grid button { font-size: 26px; }
.emotion-grid button:hover, .fullness button:hover, .context button:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.05);
}
.emotion-grid button.selected, .fullness button.selected, .context button.selected {
  background: linear-gradient(135deg, #ff5e9c 0%, #ff8e53 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 94, 156, 0.35);
  transform: scale(1.05);
}

#today-list { list-style: none; margin-bottom: 12px; }
#today-list li {
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 15px;
  display: flex; gap: 12px; align-items: flex-start;
}
#today-list li:last-child { border-bottom: none; }
#today-list time {
  color: #6b5a7d; font-size: 12px; margin-right: 6px; flex-shrink: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#today-list .li-body { flex: 1; min-width: 0; }
#today-list .li-text { line-height: 1.5; color: #2a1d3a; }
#today-list .li-meta { color: #6b5a7d; font-size: 12px; margin-top: 4px; }

/* === SWIPE TO DELETE (iOS-style) === */
.li-swipe {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;  /* Разрешаем вертикальный скролл, горизонтальный берём сами */
  user-select: none;
  -webkit-user-select: none;
}
.li-swipe .li-content {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%;
  background: transparent;
  transition: transform 0.2s ease;
  will-change: transform;
  position: relative; z-index: 1;  /* НИЖЕ чем delete-bg, чтобы клик после свайпа проходил на красный */
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.li-swipe.no-transition .li-content { transition: none; }
/* Когда свайпнули — пропускаем клики сквозь контент */
.li-swipe[data-swiped="1"] .li-content { pointer-events: none; }
.li-swipe .li-delete-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff5e5e 0%, #ff3050 100%);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 24px;
  color: #fff; font-weight: 700; font-size: 15px;
  z-index: 2;  /* ВЫШЕ контента — клик после свайпа попадает сюда */
  opacity: 0;
  transition: opacity 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  pointer-events: none;  /* по умолчанию клики НЕ проходят */
}
.li-swipe[data-swiped="1"] .li-delete-bg { pointer-events: auto; opacity: 1; }

.photo-preview {
  margin-top: 12px; position: relative; display: inline-block;
}
.photo-preview img {
  width: 96px; height: 96px; object-fit: cover; display: block;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(149, 128, 191, 0.2);
}
.btn-clear {
  position: absolute; top: -6px; right: -6px;
  width: 26px; height: 26px;
  background: #2a1d3a; color: white;
  border: 2px solid white; font-size: 14px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0; font-weight: 500;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(42, 29, 58, 0.3);
}

.kbju {
  display: inline-block; margin-top: 6px; padding: 4px 10px;
  background: linear-gradient(135deg, rgba(255, 94, 156, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: #2a1d3a; font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
}
.kbju-empty {
  display: inline-block; margin-top: 6px; padding: 4px 10px;
  background: rgba(255, 255, 255, 0.4); color: #8a7aa0; font-size: 11px;
  border-radius: 10px;
}
.thumb {
  width: 44px; height: 44px; object-fit: cover; flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

#week-result {
  margin-top: 12px; padding: 14px;
  background: rgba(255, 255, 255, 0.4);
  font-size: 14px; line-height: 1.6;
  white-space: pre-wrap;
  border-radius: 16px;
  color: #2a1d3a;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* === MODAL === */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal.hidden { display: none !important; }
.modal-overlay { position: absolute; inset: 0; background: rgba(42, 29, 58, 0.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  width: 100%; max-width: 480px;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  padding: 24px 20px;
  max-height: 85vh; overflow-y: auto;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(149, 128, 191, 0.2);
}
.modal-content h2 {
  font-size: 22px; font-weight: 700; margin-bottom: 18px; text-align: center;
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.modal-close {
  position: absolute !important; top: 14px !important; right: 14px !important;
  width: 32px !important; height: 32px !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.5) !important;
  color: #2a1d3a !important; border-radius: 50% !important;
  font-size: 16px !important; font-weight: 500 !important;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.export-all-link {
  display: block; text-align: center; text-decoration: none;
  margin-top: 18px; color: #ff5e9c; text-decoration: none; font-weight: 600;
}

.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 8px;
  margin-top: 20px;
}
.stats-summary {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 4px;
}
.stats-streak {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: #2a1d3a;
  padding: 8px 4px;
}
.stats-streak span:first-child { font-size: 18px; }
.calendar-weekday {
  text-align: center; font-size: 11px; color: #6b5a7d;
  padding: 4px 0; font-weight: 600;
}
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.4);
  font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: default; border-radius: 12px;
  color: #2a1d3a;
  transition: all 0.2s ease;
}
.cal-day.has-logs {
  background: linear-gradient(135deg, rgba(255, 94, 156, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  cursor: pointer; font-weight: 600;
}
.cal-day.has-logs:hover { transform: scale(1.05); }
.cal-day.today {
  background: linear-gradient(135deg, #ff5e9c 0%, #ff8e53 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 94, 156, 0.4);
  font-weight: 700;
}
.cal-day-num { line-height: 1; }
.cal-day-count { font-size: 9px; opacity: 0.7; margin-top: 2px; }
.cal-day.empty { background: transparent; border: none; }

.streak {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 15px; font-weight: 600;
  color: #2a1d3a;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(149, 128, 191, 0.12);
}
.export-link {
  color: #ff5e9c; text-decoration: none; font-size: 13px; font-weight: 600;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
footer {
  text-align: center; color: #6b5a7d; font-size: 12px;
  padding: 24px 0; font-weight: 500;
}

/* === KBJU SECTION === */
.kbju-section-head {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 10px;
  position: relative;
}
.kbju-section-head h3 {
  font-size: 17px; font-weight: 700; margin: 0;
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
  text-align: center;
}
.kbju-close {
  position: absolute !important; right: 0; top: 0;
  width: 28px !important; height: 28px !important;
  background: rgba(255, 255, 255, 0.5) !important; color: #2a1d3a !important;
  font-size: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 50% !important;
  font-weight: 500 !important;
}
.kbju-empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 8px 0 4px;
  text-align: center;
}
.kbju-empty-emoji { font-size: 48px; line-height: 1; }
.kbju-empty-text {
  color: #6b5a7d; font-size: 14px;
  line-height: 1.5; max-width: 280px;
}
.kbju-empty-buttons {
  display: flex; gap: 8px; width: 100%;
  margin-top: 4px;
}
.kbju-empty-buttons .btn-secondary { margin-top: 0; flex: 1; }

/* === MOTIVATION === */
.motivation .card,
.motivation {
  text-align: center;
}
.motivation-text {
  font-size: 16px; line-height: 1.55;
  color: #2a1d3a; font-weight: 500;
  padding: 4px 4px 14px;
  min-height: 48px;
  font-style: italic;
  text-align: center;
}
.kbju-section-body {
  display: flex; gap: 14px; align-items: flex-start;
}
.kbju-photo {
  flex-shrink: 0; width: 120px; height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(149, 128, 191, 0.2);
}
.kbju-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.kbju-result { flex: 1; min-width: 0; }
.kbju-name {
  font-size: 17px; font-weight: 700; color: #2a1d3a; margin-bottom: 6px;
  word-wrap: break-word; letter-spacing: -0.01em;
}
.kbju-kcal {
  font-size: 32px; font-weight: 700; color: #2a1d3a; margin-bottom: 10px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kbju-kcal span { font-size: 32px; }
.kbju-macros {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.kbju-macros > div {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-align: center; padding: 8px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.5);
}
.kbju-macros > div:last-child { border-right: none; }
.kbju-macros span {
  font-size: 15px; font-weight: 700; color: #2a1d3a;
  font-variant-numeric: tabular-nums;
}
.kbju-macros small {
  font-size: 10px; color: #6b5a7d; font-weight: 500;
}
.kbju-note {
  font-size: 11px; color: #6b5a7d; text-align: left;
  margin-top: 4px; font-weight: 500;
}
@media (max-width: 400px) {
  /* На узких экранах 3 кнопки в хедере (FAQ + login/stats + account) занимают 144px.
     Прячем текст «Лента дня», оставляем только эмодзи-стикер. */
  h1 .h-text { display: none; }
}
@media (max-width: 360px) {
  .kbju-section-body { flex-direction: column; align-items: stretch; }
  .kbju-photo { width: 100%; height: 160px; }
  .kbju-result { text-align: left; }
}

/* === Observers (мама/тренер) — Round 3 === */
.observers-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.observers-head h3 { margin: 0; font-size: 17px; }
.btn-toggle-block {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 18px; font-weight: 600; line-height: 1;
  color: #6b5a7d; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.btn-toggle-block:hover { background: rgba(255, 255, 255, 0.75); color: #ff5e9c; }
.btn-toggle-block:active { transform: scale(0.92); }
.observers-hint { font-size: 13px; color: #6b5a7d; margin: 0 0 12px 0; line-height: 1.4; }
.observers-input { display: flex; gap: 8px; margin-bottom: 8px; }
.observers-input input {
  flex: 1; padding: 10px 12px; border: 1.5px solid #ffd6e0; border-radius: 10px;
  font-size: 14px; background: #fff; min-width: 0;
}
.observers-input input:focus { outline: none; border-color: #ff8e9e; }
.observers-input select {
  padding: 10px; border: 1.5px solid #ffd6e0; border-radius: 10px;
  font-size: 14px; background: #fff; cursor: pointer;
}
#btn-invite-observer { width: 100%; margin-bottom: 12px; }
.invite-result {
  background: #fff5f7; border: 1.5px dashed #ff8e9e; border-radius: 12px;
  padding: 14px; margin-bottom: 12px; text-align: center;
}
.invite-result p { margin: 0 0 8px 0; font-size: 14px; }
.invite-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px; font-weight: 600; letter-spacing: 0.5px;
  color: #ff5e9c; background: white; padding: 10px;
  border-radius: 8px; margin: 8px 0;
  word-break: break-all; line-height: 1.4;
}
.invite-code.is-url { font-size: 13px; }
.invite-hint { font-size: 12px; color: #6b5a7d; }
.invite-hint code {
  background: #fff; padding: 2px 6px; border-radius: 4px;
  font-size: 12px; color: #ff5e9c;
}
.observers-list { display: flex; flex-direction: column; gap: 6px; }
.observers-empty {
  font-size: 13px; color: #999; text-align: center; padding: 12px 0; margin: 0;
}
.observer-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  background: #fff5f7; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  gap: 10px; flex-wrap: wrap;
}
.observer-item.pending { background: #fffbe6; border: 1px dashed #f0c040; }
.observer-info { flex: 1 1 100%; min-width: 0; }
.observer-url {
  font-size: 11px; color: #6b5a7d; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.observer-url a { color: #ff5e9c; text-decoration: none; }
.observer-url a:hover { text-decoration: underline; }
.observer-actions {
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
  flex-wrap: wrap; width: 100%;
}
.btn-observer-action {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 94, 156, 0.25);
  border-radius: 10px;
  padding: 6px 12px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
  color: #2a1d3a;
  font-family: inherit;
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap;
}
.btn-observer-action:hover { background: rgba(255, 255, 255, 0.9); }
.btn-observer-action:active { transform: scale(0.97); }
.btn-observer-action.btn-rotate { color: #8a5a00; border-color: rgba(240, 160, 0, 0.4); }
.btn-observer-action.btn-rotate:hover { background: rgba(255, 248, 220, 0.9); }
.btn-observer-action.btn-delete { color: #c44; border-color: rgba(204, 68, 68, 0.3); }
.btn-observer-action.btn-delete:hover { background: rgba(255, 240, 240, 0.9); }
.observer-status { font-size: 12px; color: #6b5a7d; margin-left: 6px; }
.observer-status.ok { color: #2a9d4a; }
.observer-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px; font-weight: 700; color: #f0a000; letter-spacing: 2px;
}

/* === ВЕС === */
.weight-current {
  text-align: center;
  padding: 8px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}
.weight-current-kg {
  font-size: 38px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.weight-current-kg .kg-suffix {
  font-size: 18px; font-weight: 600; color: #6b5a7d;
  -webkit-text-fill-color: #6b5a7d; margin-left: 4px;
}
.weight-current-meta {
  font-size: 12px; color: #6b5a7d; margin-top: 6px; font-weight: 500;
}
.weight-delta {
  display: inline-block; margin-left: 6px;
  font-size: 12px; font-weight: 600;
  padding: 2px 6px; border-radius: 6px;
}
.weight-delta.down { color: #2a9d4a; background: rgba(42, 157, 74, 0.12); }
.weight-delta.up   { color: #c44;     background: rgba(204, 68, 68, 0.12); }
.weight-delta.flat { color: #6b5a7d;  background: rgba(107, 90, 125, 0.12); }
.weight-current-empty {
  font-size: 13px; color: #999; text-align: center; padding: 8px 0;
}
.weight-input-row { display: flex; gap: 8px; align-items: stretch; }
.weight-input-row input {
  flex: 1; min-width: 0;
  padding: 12px 14px; font-size: 20px; font-weight: 600;
  border: 1.5px solid #ffd6e0; border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  outline: none; text-align: center;
}
.weight-input-row input:focus { border-color: #ff8e9e; }
.weight-last { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.weight-last-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 245, 247, 0.6); padding: 8px 12px; border-radius: 10px;
  font-size: 13px;
}
.weight-last-date { color: #6b5a7d; font-weight: 500; }
.weight-last-kg { font-weight: 700; color: #2a1d3a; font-variant-numeric: tabular-nums; }
.weight-last-del {
  background: none; border: none; color: #c44; cursor: pointer;
  font-size: 14px; padding: 2px 6px; line-height: 1;
}
.weight-last-note { color: #6b5a7d; font-size: 12px; font-style: italic; margin-top: 2px; }

/* === ТРЕНИРОВКИ === */
.workout-stats {
  text-align: center; padding: 6px 0 12px;
  font-size: 13px; color: #6b5a7d; font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}
.workout-stats b {
  background: linear-gradient(135deg, #ff5e9c 0%, #8b5cf6 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.workout-input-row { display: flex; gap: 6px; align-items: stretch; }
.workout-input-row select,
.workout-input-row input {
  padding: 12px 10px; font-size: 14px;
  border: 1.5px solid #ffd6e0; border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  font-family: inherit; outline: none;
}
.workout-input-row select { flex: 2; cursor: pointer; }
.workout-input-row input  { flex: 1; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.workout-input-row select:focus,
.workout-input-row input:focus { border-color: #ff8e9e; }
.workout-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.workout-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 245, 247, 0.6); padding: 10px 12px; border-radius: 12px;
  font-size: 13px;
}
.workout-row .wtype { font-weight: 600; color: #2a1d3a; }
.workout-row .wmin  { color: #ff5e9c; font-weight: 700; font-variant-numeric: tabular-nums; }
.workout-row .wdate { color: #6b5a7d; font-size: 12px; margin-left: auto; }
.workout-row .wnote { color: #6b5a7d; font-size: 12px; font-style: italic; flex-basis: 100%; margin-top: 2px; }
.workout-row .wdel  {
  background: none; border: none; color: #c44; cursor: pointer;
  font-size: 14px; padding: 2px 6px; line-height: 1;
}

/* === Вода (water-section) === */
.water-today {
  text-align: center; padding: 6px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  margin-bottom: 14px;
}
.water-today-amount {
  font-size: 36px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #4fb6ff 0%, #6ee7d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.water-today-unit { font-size: 18px; margin-left: 4px; opacity: .8; }
.water-today-goal { color: #6b5a7d; font-size: 13px; margin-top: 4px; }
.water-progress {
  height: 8px; background: rgba(255,255,255,0.5);
  border-radius: 8px; margin-top: 10px; overflow: hidden;
}
.water-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(135deg, #4fb6ff 0%, #6ee7d4 100%);
  border-radius: 8px; transition: width .3s ease;
}
.water-buttons {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.btn-water-add {
  flex: 1; padding: 12px 4px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,0.6); color: #2a6a9a;
  border: 1.5px solid #cfe6f5; border-radius: 14px;
  cursor: pointer; font-family: inherit;
}
.btn-water-add:active { background: #d4ecfa; }
.water-custom-row { display: flex; gap: 6px; margin-bottom: 12px; }
.water-custom-row input {
  flex: 1; padding: 12px 10px; font-size: 14px;
  border: 1.5px solid #cfe6f5; border-radius: 14px;
  background: rgba(255,255,255,0.7);
  font-family: inherit; outline: none;
  text-align: center; font-variant-numeric: tabular-nums;
}
.water-custom-row input:focus { border-color: #4fb6ff; }
.water-custom-row button { width: auto; padding: 12px 16px; }
.water-last { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.water-last-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(245, 252, 255, 0.6); padding: 10px 12px; border-radius: 12px;
  font-size: 13px;
}
.water-last-ml { font-weight: 600; color: #2a6a9a; font-variant-numeric: tabular-nums; }
.water-last-date { color: #6b5a7d; font-size: 12px; margin-left: auto; }
.btn-water-delete {
  background: none; border: none; color: #c44; cursor: pointer;
  font-size: 14px; padding: 2px 6px; line-height: 1;
}

.workout-empty {
  font-size: 13px; color: #999; text-align: center; padding: 8px 0;
}
