/* Экраны Diary поверх общего стиля Aurora (styles.css). Только классы — CSP запрещает встроенные стили. */
:root { --you: #8b7bff; --guess: #2dd4bf; }

main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
h1 { font-size: 22px; margin: 0; }
h3 { font-size: 15px; margin: 0; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link { background: none; border: 0; color: var(--accent); padding: 8px 0; min-height: 44px; font-weight: 600; }
.link.small, .small { font-size: 13px; }
.hidden { display: none !important; }
.wide { width: 100%; margin-top: 14px; }
.hint { font-size: 13px; margin: 10px 4px; }
.struck { text-decoration: line-through; color: var(--hint); }
.summary { margin: 10px 0 0; line-height: 1.45; font-style: italic; }

/* Записи */
.entries { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.entry { cursor: pointer; list-style: none; }
.entry-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.time { font-weight: 700; }
.entry-text { margin: 8px 0 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.full-text { margin: 10px 0 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.observer { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--hint); line-height: 1.45; }
.idea-line { margin: 8px 0 0; font-size: 14px; }
.idea-text { line-height: 1.4; overflow-wrap: anywhere; }
.idea { align-items: flex-start; }

/* Чипы шкал: сплошной — «you», контур — «guess» */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 4px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--glass-border); }
.chip.you { background: var(--you); color: #fff; border-color: transparent; }
.chip-x { margin-left: 6px; background: none; border: 0; color: inherit; font-size: 15px; min-width: 24px; min-height: 24px; padding: 0; }
.chip.guess { background: transparent; border-color: var(--guess); color: var(--text); border-style: dashed; }

/* Переключатели */
.seg { display: flex; gap: 6px; margin: 4px 0 10px; }
.seg-btn { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--card); font-weight: 600; }
.seg-btn.on { background: linear-gradient(135deg, var(--violet-1), var(--violet-2)); color: var(--accent-text); border-color: transparent; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 44px; }
.check-line input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }

/* Степпер шкалы (кнопки 44×44 — удобно пальцу) */
.stepper { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stepper:last-of-type { border-bottom: 0; }
.step-label { flex: 1 1 120px; display: flex; flex-direction: column; }
.step-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--card); font-size: 22px; line-height: 1; }
.step-value { min-width: 64px; text-align: center; font-weight: 700; font-size: 17px; }
.btn.small { min-height: 40px; padding: 0 14px; }

/* Графики */
.chart { margin-top: 10px; }
.chart-svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { fill: var(--hint); font-size: 9px; }
.chart-svg .line { fill: none; stroke-width: 2; }
.chart-svg .line.you { stroke: var(--you); }
.chart-svg .line.guess { stroke: var(--guess); stroke-dasharray: 4 3; }
.chart-svg .dot.you { fill: var(--you); }
.chart-svg .dot.guess { fill: var(--bg); stroke: var(--guess); stroke-width: 2; }
.legend { font-size: 13px; display: flex; gap: 12px; margin: 0 4px; }
.lg.you { color: var(--you); }
.lg.guess { color: var(--guess); }

/* Нижние вкладки */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(10, 15, 42, 0.86); border-top: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
:root[data-theme="telegram"] .tabbar { background: var(--bg); }
.tab { flex: 1; max-width: 150px; min-height: 52px; border: 0; background: none; color: var(--hint); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; gap: 2px; }
.tab-icon { font-size: 20px; }
.tab.on { color: var(--text); background: var(--card); }
.day { cursor: pointer; }
