/* Дневник успеха — дизайн «Тихое золото» */
:root {
  color-scheme: dark;
  --canvas: #070708;
  --obsidian: #0a0a0b;
  --graphite: #171717;
  --graphite-soft: #1e1d1b;
  --gold: #c3a05c;
  --gold-soft: #ddc58f;
  --ivory: #f5f0e6;
  --muted: #9c958b;
  --faint: #8a857d;
  --line: rgba(195, 160, 92, 0.22);
  --line-soft: rgba(245, 240, 230, 0.1);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ivory);
  background: var(--canvas);
  font: 14px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
a { color: var(--gold-soft); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }

/* ---------- Каркас: сайдбар и основная область ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  display: flex;
  flex-direction: column;
  padding: 27px 21px 22px;
  border-right: 1px solid var(--line-soft);
  background: #0d0d0e;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ivory); }
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.05;
}
.brand-seal {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 17px;
}

.side-nav { display: grid; gap: 7px; margin-top: 54px; }
.side-nav button {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 9px;
  color: var(--faint);
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.side-nav button:hover { color: var(--ivory); background: rgba(245, 240, 230, 0.04); }
.side-nav button.active { color: var(--gold-soft); background: rgba(195, 160, 92, 0.08); }

.side-bottom { margin-top: auto; }
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 2px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
}
.profile small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--graphite);
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 18px;
}
.side-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.mobile-topbar { display: none; }

main { margin-left: 230px; padding: 0 40px; max-width: 1640px; }

header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.breadcrumb { font-size: 11px; color: var(--muted); }
.breadcrumb span:first-child { margin: 0 12px; color: #53504b; }
.breadcrumb span:last-child { color: var(--ivory); }
.reminder-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 10px;
}
.reminder-chip:hover { background: rgba(195, 160, 92, 0.07); }
.tiny-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

#content { padding-top: 8px; min-height: calc(100vh - 155px); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 35px;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 9px;
}

/* ---------- Типографика и общие элементы ---------- */

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
}
.page-heading { margin: 28px 0 30px; }
.page-heading h1 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.page-heading p { color: var(--muted); font-size: 12px; }

.notice {
  margin-bottom: 24px;
  padding: 15px 19px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(195, 160, 92, 0.06);
  color: #d6c49c;
  font-size: 11px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--graphite);
}
.muted { color: var(--muted); font-size: 10px; }

/* ---------- Главный экран: круг дня ---------- */

.greeting { margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.today-title {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(360px, 1.1fr);
  gap: 42px;
  align-items: start;
  margin-top: 20px;
}

.ring-panel { text-align: center; padding-top: 10px; }

.progress-wrap {
  position: relative;
  width: clamp(240px, 24vw, 316px);
  aspect-ratio: 1;
  margin: 16px auto 18px;
}
.progress-ring { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; }
.progress-ring::before,
.progress-ring::after {
  content: "";
  position: absolute;
  inset: 6.1%;
  border: 1px solid rgba(245, 240, 230, 0.04);
  border-radius: inherit;
}
.progress-ring::after { inset: 12.6%; }

.ring-center {
  position: absolute;
  inset: 17.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0d0d0e;
  box-shadow: inset 0 0 0 1px rgba(245, 240, 230, 0.04);
}
.ring-center strong {
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: clamp(52px, 5vw, 64px);
  font-weight: 500;
  line-height: 0.8;
}
.ring-center span { margin-top: 13px; color: var(--muted); font-size: 12px; }

.orbit-node {
  position: absolute;
  z-index: 2;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--obsidian);
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 15px;
  transition: background 350ms ease, color 350ms ease, transform 350ms ease;
}
.orbit-node.earned { color: #15110a; background: var(--gold-soft); }
.orbit-node.one { top: 5%; left: 16.5%; }
.orbit-node.two { top: 20%; right: 5.5%; }
.orbit-node.three { right: 12%; bottom: 11.5%; }

.ring-caption {
  max-width: 310px;
  min-height: 38px;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.action-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  max-width: 380px;
  margin: 0 auto;
}
.primary-action, .secondary-action { min-height: 50px; border-radius: 13px; font-size: 13px; }
.primary-action {
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  color: #0b0b0c;
  font-weight: 600;
}
.primary-action:hover { background: #ecd9a8; border-color: #ecd9a8; }
.secondary-action { border: 1px solid var(--line); background: transparent; color: var(--ivory); }
.secondary-action:hover { background: rgba(195, 160, 92, 0.07); }

.today-column { padding-left: 35px; border-left: 1px solid var(--line-soft); }

.entries-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
}
.entries-head h3 { margin: 0; font-family: var(--serif); font-size: 25px; font-weight: 500; }
.entries-head span { color: var(--muted); font-size: 11px; }

/* ---------- Записи успехов ---------- */

.entries { display: grid; }
.entry {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}
.entry-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #17120a;
  font-family: var(--serif);
  font-size: 13px;
}
.entry-body { min-width: 0; }
.entry p { margin: 0 0 7px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--faint); font-size: 10px; }
.entry-tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(195, 160, 92, 0.05);
  color: var(--gold-soft);
  font-size: 9px;
}
.entry-actions { display: flex; align-items: flex-start; gap: 2px; }
.icon-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 19px;
}
.icon-button:hover { background: rgba(245, 240, 230, 0.06); color: var(--gold-soft); }
.icon-button.selected { color: var(--gold-soft); }

.empty {
  padding: 29px 24px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.empty strong { display: block; margin-bottom: 8px; color: var(--ivory); font-family: var(--serif); font-size: 26px; font-weight: 500; }
.empty p { margin-bottom: 16px; }

.archive-note { margin: 14px 0; color: var(--muted); font-size: 10px; }

/* ---------- Вспомогательный ряд главного экрана ---------- */

.support-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 42px;
}
.support-row .stats { grid-template-columns: 1fr; align-content: start; }

.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; font-size: 12px; }
.calendar-controls { display: flex; gap: 2px; }
.calendar-controls button { width: 30px; height: 30px; color: var(--muted); font-size: 18px; border-radius: 8px; }
.calendar-controls button:hover { color: var(--gold-soft); background: rgba(245, 240, 230, 0.05); }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.weekdays { margin-bottom: 10px; color: var(--faint); font-size: 9px; }
.days { gap: 5px 2px; }
.day {
  position: relative;
  width: 32px;
  height: 32px;
  justify-self: center;
  border-radius: 50%;
  color: var(--ivory);
  font-size: 10px;
}
.day:hover { background: rgba(245, 240, 230, 0.06); }
.day.is-today { border: 1px solid var(--gold); color: var(--gold-soft); background: rgba(195, 160, 92, 0.06); }
.day.selected { background: var(--gold-soft); color: #15110a; }
.day.has-entry:after {
  content: '✧';
  position: absolute;
  left: 11px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 10px;
  height: 10px;
  border: 1px solid #e8d3a2;
  border-radius: 50%;
  background: var(--gold);
  color: #3d2c12;
  font: 8px/1 Georgia, serif;
}
.day.selected.has-entry:after { background: var(--gold); }
.calendar-key {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}
.mini-coin {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px dashed #6a5b3f;
  border-radius: 50%;
  color: #87734c;
  font-family: var(--serif);
  font-size: 11px;
}
.mini-coin.earned {
  border-style: solid;
  border-color: #e8d3a2;
  background: var(--gold);
  color: #30230f;
}

.note-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1d1b16, #131211);
  border-color: var(--line);
}
.note-panel .eyebrow { margin-bottom: 12px; }
.note-panel h2 { margin-bottom: 10px; font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.15; }
.note-panel p { margin: 0; color: #b3aa99; font-size: 11px; }
.note-sign { display: block; margin-top: auto; padding-top: 15px; color: var(--gold-soft); font: italic 19px var(--serif); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 17px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--graphite); }
.stat strong { display: block; color: var(--gold-soft); font-family: var(--serif); font-size: 34px; font-weight: 500; }
.stat span { color: var(--muted); font-size: 9px; }

/* ---------- Страница календаря ---------- */

.calendar-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.wide-calendar .day { width: 62px; height: 62px; border-radius: 12px; font-size: 15px; }
.wide-calendar .day.has-entry:after { left: 25px; bottom: 4px; width: 14px; height: 14px; font-size: 11px; }
.wide-calendar .weekdays { font-size: 11px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 29px 0 17px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.section-head small { color: var(--muted); font-size: 10px; }
.mobile-word { display: none; }

/* ---------- Итоги ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 25px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--obsidian);
}
.tabs button { min-height: 38px; padding: 0 18px; border-radius: 999px; color: var(--muted); font-size: 12px; }
.tabs button.active { background: var(--gold-soft); color: #0a0a0b; font-weight: 600; }
.period-control { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.period-control button { width: 36px; height: 36px; border: 1px solid var(--line-soft); border-radius: 9px; }
.period-control button:hover { color: var(--gold-soft); border-color: var(--line); }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.report-stats .stat { padding: 24px; }
.report-stats .stat strong { font-size: 46px; }
.report-list { display: grid; gap: 20px; margin-top: 18px; }
.report-list h3 { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.report-list p { font-size: 12px; color: var(--muted); }

/* ---------- Добрые слова и цели ---------- */

.quote-card {
  margin-bottom: 15px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--graphite-soft);
}
.quote-card blockquote {
  margin: 0 0 15px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.quote-card small { color: var(--gold-soft); font-size: 10px; }

.goal-card {
  margin-bottom: 15px;
  padding: 21px 23px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold);
  border-radius: 13px;
  background: var(--graphite);
}
.goal-card.done { border-left-color: var(--line); background: var(--graphite-soft); opacity: 0.9; }
.goal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.goal-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.goal-meta { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.goal-steps { margin-top: 13px; border-top: 1px solid var(--line-soft); }
.goal-steps p {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.goal-steps p:last-child { border-bottom: 0; }
.goal-steps small { margin-left: auto; flex-shrink: 0; color: var(--faint); font-size: 9px; }
.entry-coin {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #17120a;
  font-family: var(--serif);
  font-size: 10px;
}
.goal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.goal-actions .secondary { min-height: 40px; font-size: 11px; }
.goal-mark { color: var(--gold-soft); }

.goal-hint {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 17px;
  border: 1px solid rgba(195, 160, 92, 0.35);
  border-radius: 13px;
  background: rgba(195, 160, 92, 0.06);
}
.goal-hint p { margin: 0; font-size: 12px; line-height: 1.5; }
.goal-arrow { color: var(--gold-soft); flex-shrink: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: inherit; color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--gold); }

.goal-progress-list { display: grid; gap: 14px; margin-top: 16px; }
.goal-progress { padding: 16px 18px; border: 1px solid var(--line-soft); border-left: 2px solid var(--gold); border-radius: 13px; background: var(--graphite); }
.goal-progress h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.goal-progress p { margin: 6px 0 0; font-size: 12px; }
.goal-progress .goal-last { display: flex; align-items: baseline; gap: 9px; color: var(--gold-soft); }
.goal-progress .goal-last small { margin-left: auto; flex-shrink: 0; color: var(--faint); font-size: 9px; }
.look-back .goal-steps { margin-top: 14px; }

/* ---------- Настройки ---------- */

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.settings-grid .panel { padding: 26px; }
.settings-grid h2 { margin-bottom: 12px; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.settings-grid p { color: var(--muted); font-size: 11px; }
label { display: block; margin: 17px 0 7px; color: #c3bfb6; font-size: 11px; }
input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  outline: none;
  background: #0d0d0e;
  color: var(--ivory);
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); }
textarea { min-height: 110px; resize: vertical; }
.status-label {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 9px;
}
.integration { padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.integration:last-child { border: 0; }
.integration-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.integration strong { font-size: 12px; }
.integration p { margin: 9px 0 0; }
.inline-form { margin-top: 22px; }
.storage-note { margin-top: 18px; color: var(--muted); font-size: 10px; }
.book-list { padding-left: 20px; color: var(--muted); font-size: 12px; }
.book-list li { padding: 8px 0; }

/* ---------- Кнопки общего назначения ---------- */

.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 13px;
  font-size: 12px;
}
.primary { border: 1px solid var(--gold-soft); background: var(--gold-soft); color: #0b0b0c; font-weight: 700; }
.primary:hover { background: #ecd9a8; border-color: #ecd9a8; }
.secondary { border: 1px solid var(--line); background: transparent; color: var(--gold-soft); }
.secondary:hover { background: rgba(195, 160, 92, 0.07); }
.full { width: 100%; margin-top: 24px; }

/* ---------- Диалоги и уведомления ---------- */

dialog {
  width: calc(100% - 32px);
  max-width: 590px;
  max-height: 90vh;
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #161512;
  color: var(--ivory);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.dialog-top .eyebrow { margin: 0; }
dialog h2 { margin-top: 15px; font-family: var(--serif); font-size: 34px; font-weight: 500; }
dialog p { color: var(--muted); font-size: 12px; }
.record-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.record-row span { color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.voice-active { color: #e8b8aa !important; border-color: #e8b8aa !important; }

#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  z-index: 1000;
  max-width: 90vw;
  padding: 13px 23px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #19150e;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: 0.2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%); }

#celebration { padding: 45px 35px; text-align: center; }
.celebration-close { position: absolute; top: 10px; right: 10px; }
.celebration-coins { margin-bottom: 20px; color: var(--gold-soft); font: 100px/1 var(--serif); }
#celebration h2 { font-size: 40px; }
#celebration p { margin: 20px 0 27px; line-height: 1.9; }

/* ---------- Нижняя навигация (мобильная) ---------- */

.bottom-nav { display: none; }

/* ---------- Адаптив ---------- */

@media (max-width: 1180px) {
  .sidebar { width: 200px; padding-left: 15px; padding-right: 15px; }
  main { margin-left: 200px; padding: 0 26px; }
  .today-grid { grid-template-columns: 1fr; gap: 26px; }
  .today-column { padding-left: 0; border-left: 0; }
  .support-row { grid-template-columns: 1fr 1fr; }
  .support-row .panel:first-child { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
  .calendar-layout { grid-template-columns: 1fr; }
  .wide-calendar .day { width: 50px; height: 50px; }
  .wide-calendar .day.has-entry:after { left: 18px; }
}

@media (max-width: 700px) {
  .sidebar { display: none; }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(10, 10, 11, 0.94);
    backdrop-filter: blur(12px);
  }
  .mobile-topbar .brand-mark { font-size: 19px; }
  .mobile-topbar .avatar { width: 34px; height: 34px; font-size: 16px; }

  main { margin: 0; padding: 0 20px 96px; }
  header, footer { display: none; }

  .bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 10px 6px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line-soft);
    background: rgba(13, 13, 14, 0.96);
    backdrop-filter: blur(12px);
  }
  .bottom-nav button {
    min-height: 48px;
    padding: 4px 2px;
    color: var(--faint);
    background: transparent;
    font-size: 9px;
    border-radius: 0;
  }
  .bottom-nav button::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    margin: 0 auto 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
  }
  .bottom-nav button.active { color: var(--gold-soft); }
  .bottom-nav button.active::before { background: currentColor; }

  .greeting { margin-top: 20px; }
  .progress-wrap { width: min(246px, 68vw); }
  .entries-head h3 { font-size: 22px; }
  .entry { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 12px 0; }
  .entry-number { width: 22px; height: 22px; font-size: 12px; }
  .entry p { font-size: 12px; }
  .entry-actions { flex-direction: column; }
  .entry-actions .icon-button { width: 28px; min-width: 28px; height: 28px; font-size: 16px; }

  .support-row { grid-template-columns: 1fr; margin-top: 34px; }
  .support-row .stats { grid-template-columns: 1fr 1fr; }

  .page-heading h1 { font-size: 32px; }
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1; padding: 0 10px; }
  .report-stats { gap: 8px; }
  .report-stats .stat { padding: 14px; }
  .report-stats .stat strong { font-size: 32px; }
  .quote-card blockquote { font-size: 21px; }
  .settings-grid .panel { padding: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .record-row { flex-direction: column; align-items: flex-start; gap: 7px; }
  dialog { padding: 24px; }
  #celebration h2 { font-size: 32px; }
  .wide-calendar .day { width: 40px; height: 46px; }
  .wide-calendar .day.has-entry:after { left: 13px; bottom: 1px; }
  .day.has-entry:after { left: 11px; }
  .calendar-controls button { width: 36px; height: 36px; }
  #toast { bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

.sync-line { margin-top: 12px; min-height: 16px; }

.sync-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.05em; color: var(--muted); }
.sync-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.sync-chip.synced { color: var(--gold); }
.sync-chip.syncing { color: var(--gold-soft); }
.sync-chip.offline { color: #b08080; }
