:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #fffefa;
  --surface-muted: #f0eee7;
  --ink: #252923;
  --muted: #73776e;
  --line: #e5e1d7;
  --accent: #355d4b;
  --accent-hover: #284b3b;
  --accent-soft: #e5eee7;
  --warning: #9a5b20;
  --warning-soft: #f8ecdc;
  --danger: #a13d32;
  --danger-soft: #fae9e6;
  --shadow: 0 12px 40px rgba(37, 41, 35, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-width: 320px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(53, 93, 75, .24); outline-offset: 2px; }
.app-shell { max-width: 900px; margin: 0 auto; min-height: 100vh; padding: 0 24px 30px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--accent); color: white; font-size: 23px; font-weight: 700; box-shadow: 0 5px 12px rgba(53, 93, 75, .15); }
.brand-copy { flex: 1; min-width: 0; }
.brand-copy h1 { font-size: 19px; margin: 0; letter-spacing: .02em; }
.brand-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.primary-button, .secondary-button, .danger-button { border: 1px solid transparent; border-radius: 12px; padding: 11px 15px; min-height: 42px; font-weight: 650; font-size: 14px; transition: background .15s ease, transform .15s ease; }
.primary-button { background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-hover); }
.primary-button:active, .secondary-button:active, .danger-button:active { transform: translateY(1px); }
.header-add span { font-size: 18px; margin-right: 4px; }
.secondary-button { background: var(--surface); color: var(--ink); border-color: var(--line); }
.secondary-button:hover { background: var(--surface-muted); }
.danger-button { background: var(--danger-soft); color: var(--danger); }
.text-button { background: transparent; color: var(--accent); border: 0; padding: 7px 4px; font-size: 13px; font-weight: 650; }
.text-button:hover { text-decoration: underline; }
main { padding: 26px 0 24px; }
.view-section { min-height: 350px; }
.hidden { display: none !important; }
.fatal-error { margin: 20px 0; padding: 18px; border: 1px solid #d9a5a0; border-radius: 14px; background: #fff2f0; color: #812f2a; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
button:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-heading h2 { font-size: clamp(25px, 4vw, 32px); letter-spacing: -.035em; margin: 3px 0 0; line-height: 1.2; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-subtitle { color: var(--muted); margin: 9px 0 0; font-size: 14px; line-height: 1.6; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 17px 18px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.stat-card .stat-label { color: var(--muted); font-size: 13px; }
.stat-card .stat-number { margin-top: 5px; font-size: 29px; font-weight: 750; letter-spacing: -.04em; }
.stat-card .stat-foot { margin-top: 3px; color: var(--muted); font-size: 11px; }
.stat-card.warning .stat-number { color: var(--warning); }
.content-stack { display: flex; flex-direction: column; gap: 24px; }
.list-section { display: flex; flex-direction: column; gap: 10px; }
.list-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.list-section-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.section-count { display: inline-grid; place-items: center; min-width: 26px; height: 25px; padding: 0 7px; background: var(--surface-muted); color: var(--muted); border-radius: 999px; font-size: 12px; font-weight: 700; }
.section-count.warning { color: var(--warning); background: var(--warning-soft); }
.record-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 17px 18px; box-shadow: 0 2px 6px rgba(37, 41, 35, .02); }
.record-card.overdue-card { border-left: 3px solid #c78c4c; }
.record-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.record-title { margin: 0; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.record-source { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.status-pill { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 999px; padding: 5px 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-pill.warning { background: var(--warning-soft); color: var(--warning); }
.status-pill.muted { background: var(--surface-muted); color: var(--muted); }
.record-details { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.record-detail { display: inline-flex; align-items: center; gap: 5px; }
.record-note { margin: 11px 0 0; color: #555a51; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-body-preview { margin: 10px 0 0; padding: 10px 12px; background: #f8f7f2; border-radius: 10px; color: #555a51; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #eeebe3; }
.record-actions .primary-button, .record-actions .secondary-button, .record-actions .danger-button { min-height: 36px; padding: 8px 11px; font-size: 12px; border-radius: 10px; }
.record-actions .text-button { margin-left: auto; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 18px; background: rgba(255, 254, 250, .68); border: 1px dashed #d9d5ca; border-radius: 16px; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 21px; margin-bottom: 12px; }
.empty-state h3 { margin: 0; font-size: 16px; }
.empty-state p { max-width: 350px; color: var(--muted); font-size: 13px; line-height: 1.65; margin: 7px 0 0; }
.mobile-add { display: none; }
.bottom-nav { display: flex; gap: 6px; padding: 7px; background: #eeece4; border-radius: 16px; margin-top: 16px; }
.nav-item { display: flex; justify-content: center; align-items: center; gap: 8px; flex: 1; min-height: 44px; padding: 8px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 650; }
.nav-item.active { background: var(--surface); color: var(--accent); box-shadow: 0 2px 6px rgba(37, 41, 35, .05); }
.nav-icon { font-size: 17px; line-height: 1; }
.app-footer { padding: 18px 0 4px; text-align: center; }
.app-footer p { color: #85877f; font-size: 11px; line-height: 1.55; margin: 3px 0; }
.app-dialog { width: min(540px, calc(100vw - 28px)); max-height: min(88vh, 850px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; }
.app-dialog::backdrop { background: rgba(25, 30, 26, .38); backdrop-filter: blur(3px); }
.app-dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.dialog-heading h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.03em; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-muted); color: var(--muted); font-size: 24px; line-height: 1; }
.field-label { display: flex; align-items: center; gap: 8px; margin: 16px 0 7px; font-size: 13px; font-weight: 700; }
.required { color: var(--danger); font-size: 11px; font-weight: 600; }
.optional { color: var(--muted); font-size: 11px; font-weight: 500; }
.text-input { display: block; width: 100%; min-height: 43px; border: 1px solid #dcd8ce; border-radius: 11px; background: #fff; padding: 10px 12px; color: var(--ink); font-size: 14px; }
.text-input::placeholder { color: #a1a39b; }
.textarea-small { min-height: 60px; resize: vertical; }
textarea.text-input { resize: vertical; line-height: 1.6; }
.time-input { max-width: 220px; }
.field-help { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.start-time-panel { margin-top: 18px; padding: 12px 13px; background: #f5f4ee; border-radius: 12px; }
.start-time-panel .field-label { margin-top: 0; }
.start-time-panel .time-input { margin-top: 8px; }
.start-time-panel .date-input { margin-top: 8px; }
.stage-selection-panel { margin-top: 12px; }
.stage-selection-help { margin-top: -2px; margin-bottom: 12px; }
.stage-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.stage-option { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 10px; border: 1px solid #dfddd3; border-radius: 10px; background: #fffefa; color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.stage-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.stage-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }
.dialog-description { color: var(--muted); font-size: 13px; line-height: 1.7; margin: -8px 0 12px; }
.form-error { color: var(--danger); font-size: 12px; min-height: 0; margin: 10px 0 0; line-height: 1.5; }
.form-error:empty { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px; background: #27352d; color: #fff; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 600px) {
  .app-shell { padding: 0 15px calc(18px + env(safe-area-inset-bottom)); }
  .topbar { padding: 17px 0 18px; gap: 10px; }
  .brand-mark { width: 41px; height: 41px; border-radius: 13px; }
  .brand-copy h1 { font-size: 17px; }
  .brand-copy p { font-size: 11px; }
  .header-add { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  main { padding-top: 23px; }
  .page-heading { margin-bottom: 19px; }
  .page-subtitle { font-size: 13px; }
  .stats-grid { gap: 9px; margin-bottom: 23px; }
  .stat-card { padding: 14px; border-radius: 14px; }
  .stat-card .stat-number { font-size: 26px; }
  .record-card { padding: 15px; border-radius: 14px; }
  .record-title { font-size: 16px; }
  .record-actions { gap: 7px; }
  .record-actions .text-button { margin-left: 0; }
  .bottom-nav { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 20px; box-shadow: 0 5px 18px rgba(37, 41, 35, .08); }
  .nav-item { flex-direction: column; gap: 3px; font-size: 10px; min-height: 48px; }
  .nav-icon { font-size: 17px; }
  .app-footer { padding-bottom: 16px; }
  .app-dialog form { padding: 20px 17px; }
  .dialog-heading h2 { font-size: 21px; }
  .stage-options { grid-template-columns: 1fr; }
  .mobile-add { display: inline-block; padding: 9px 11px; min-height: 37px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Monthly review calendar */
.calendar-panel { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 6px rgba(37, 41, 35, .02); }
.calendar-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.calendar-toolbar h3 { flex: 1; text-align: center; margin: 0; font-size: 18px; letter-spacing: -.02em; }
.calendar-nav-button { width: 38px; min-width: 38px; min-height: 36px; padding: 4px; font-size: 24px; line-height: 1; }
.calendar-today-button { white-space: nowrap; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { gap: 5px; margin-bottom: 5px; }
.calendar-weekdays span { text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; padding: 7px 0; }
.calendar-grid { gap: 5px; }
.calendar-day { min-width: 0; min-height: 105px; padding: 5px 4px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fffefa; overflow: hidden; }
.calendar-day-empty { border-color: transparent; background: transparent; }
.calendar-day.is-today { border-color: #9ab2a2; background: #f3f8f3; }
.calendar-day.selected { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.calendar-day.has-overdue { border-color: #e4c59e; }
.calendar-day-number { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 3px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 12px; font-weight: 700; }
.calendar-day.is-today .calendar-day-number { background: var(--accent); color: white; }
.calendar-day.selected .calendar-day-number { box-shadow: inset 0 0 0 1px var(--accent); }
.calendar-day-events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calendar-event { display: flex; align-items: center; gap: 3px; width: 100%; min-width: 0; border: 0; border-radius: 4px; padding: 3px 2px; background: #e7efe8; color: #315441; text-align: left; font-size: 10px; line-height: 1.25; cursor: pointer; }
.calendar-event:hover { filter: brightness(.97); }
.calendar-event-overdue { background: var(--warning-soft); color: #85501d; }
.calendar-event-projected { opacity: .83; }
.calendar-event-mark { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.calendar-event-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more { padding: 1px 2px; color: var(--muted); font-size: 10px; }
.calendar-legend { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; background: #5f806a; }
.legend-dot.overdue-dot { background: #b77a34; }
.calendar-day-detail { margin-top: 25px; }
.calendar-day-detail > .list-section-heading { margin-bottom: 12px; }
.calendar-detail-card { padding: 16px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.calendar-detail-card.overdue-card { border-left: 3px solid #c78c4c; }
.calendar-detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.calendar-detail-top h4 { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.calendar-detail-top p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.calendar-detail-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 13px; padding-top: 11px; border-top: 1px solid #eeebe3; color: var(--muted); font-size: 12px; }
.calendar-detail-bottom .text-button { margin-left: auto; }
.calendar-footnote { margin: 13px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
@media (max-width: 600px) {
  .calendar-panel { padding: 9px; border-radius: 14px; }
  .calendar-toolbar { gap: 5px; margin-bottom: 11px; }
  .calendar-toolbar h3 { font-size: 16px; }
  .calendar-nav-button { width: 32px; min-width: 32px; min-height: 33px; }
  .calendar-today-button { padding: 6px 4px; font-size: 12px; }
  .calendar-weekdays { gap: 3px; }
  .calendar-grid { gap: 3px; }
  .calendar-day { min-height: 79px; padding: 3px 2px 4px; border-radius: 7px; }
  .calendar-day-number { width: 23px; height: 23px; margin-bottom: 2px; font-size: 11px; }
  .calendar-day-events { gap: 2px; }
  .calendar-event { gap: 2px; padding: 3px 1px; font-size: 9px; }
  .calendar-event-mark { flex-basis: 4px; width: 4px; height: 4px; }
  .calendar-more { font-size: 9px; }
  .calendar-weekdays span { font-size: 10px; }
  .calendar-detail-card { padding: 14px; }
  .calendar-detail-top { gap: 7px; }
  .calendar-detail-top h4 { font-size: 14px; }
  .calendar-detail-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }
  .calendar-detail-bottom .text-button { margin-left: 0; }
}

/* Local backup and export tools */
.data-tools-panel { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.data-tools-heading h3 { margin: 0; font-size: 15px; }
.data-tools-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.data-tools-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.data-tools-actions button { min-height: 38px; }
.data-tools-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.restore-dialog-content { padding: 24px; }
.restore-warning { padding: 12px 13px; margin: 13px 0; border-radius: 10px; background: var(--warning-soft); color: #704719; font-size: 12px; line-height: 1.7; }
.restore-safety-button { width: 100%; margin-top: 3px; }
.restore-confirm-label { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; color: var(--ink); font-size: 12px; line-height: 1.6; }
.restore-confirm-label input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; accent-color: var(--accent); }
#confirm-restore-button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) {
  .data-tools-panel { padding: 13px; }
  .data-tools-actions { align-items: stretch; flex-direction: column; }
  .data-tools-actions button { width: 100%; }
  .restore-dialog-content { padding: 20px 17px; }
  .restore-dialog-content .dialog-actions { flex-direction: column-reverse; }
  .restore-dialog-content .dialog-actions button { width: 100%; }
}


.action-explanation { padding: 13px 14px; margin: 10px 0 15px; border-radius: 12px; border: 1px solid #e5e0d4; background: #f7f5ef; color: var(--ink); font-size: 12px; line-height: 1.75; }
.action-explanation p { margin: 0 0 9px; }
.action-explanation p:last-child { margin-bottom: 0; }
.action-explanation strong { color: #3c5144; }
.action-example { padding-top: 9px; border-top: 1px solid #e5e0d4; color: var(--muted); }
.action-preview { margin: 13px 0 0; padding: 11px 12px; border-radius: 10px; background: #eaf1e9; color: #2e5140; font-size: 12px; line-height: 1.65; font-weight: 650; }
.stage-option span { display: flex; flex-direction: column; gap: 2px; }
.stage-option small { font-size: 11px; font-weight: 500; color: var(--muted); }

.list-section-description { margin: -5px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* 1.0 navigation, sync state, settings and guide */
.sync-strip { display: flex; align-items: center; gap: 9px; width: 100%; margin: -8px 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.sync-strip > span:nth-child(2) { flex: 1; }
.sync-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #aaa79f; }
.sync-strip[data-state="synced"] .sync-dot { background: #4d8060; }
.sync-strip[data-state="syncing"] .sync-dot { background: #4f7196; animation: sync-pulse 1.2s infinite; }
.sync-strip[data-state="waiting"] .sync-dot { background: #b77a34; }
.sync-strip[data-state="conflict"] .sync-dot { background: #b24a3b; }
@keyframes sync-pulse { 50% { opacity: .35; } }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -14px 0 26px; }
.settings-panel { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.settings-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.settings-heading h3 { margin: 2px 0 0; font-size: 18px; }
.sync-state-badge { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 700; }
.settings-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-details summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 700; }
.conflict-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 13px; padding: 12px; border-radius: 10px; background: var(--warning-soft); color: #704719; font-size: 12px; }
.status-stack { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; }
.guide-content { display: grid; gap: 14px; }
.guide-content section { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.guide-content h3 { margin: 0 0 9px; color: #314d3d; font-size: 17px; }
.guide-content p, .guide-content li { color: #555a51; font-size: 14px; line-height: 1.85; }
.guide-content p { margin: 0 0 9px; }
.guide-content p:last-child { margin-bottom: 0; }
.guide-content ol { margin: 0; padding-left: 21px; }
.guide-note { padding: 11px 12px; border-radius: 9px; background: var(--warning-soft); color: #704719 !important; }
.conflict-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.conflict-compare section { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); }
.conflict-compare h3 { margin: 0 0 7px; font-size: 13px; }
.conflict-compare p { margin: 0 0 6px; overflow-wrap: anywhere; font-size: 13px; }
.conflict-compare small { color: var(--muted); font-size: 10px; }
.stage-option input:disabled + span { opacity: .45; }

@media (max-width: 600px) {
  .nav-item { padding-inline: 4px; }
  .quick-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .quick-actions button:first-child { grid-column: 1 / -1; }
  .settings-panel { padding: 14px; }
  .conflict-summary { align-items: stretch; flex-direction: column; }
  .conflict-compare { grid-template-columns: 1fr; }
  .guide-content section { padding: 15px; }
}

/* Personal cloud sync panel */
.cloud-sync-panel { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cloud-sync-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cloud-sync-heading h3 { margin: 0; font-size: 16px; }
.cloud-sync-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.cloud-status-dot { width: 10px; height: 10px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #b9b6ad; }
.cloud-sync-status { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-muted); color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.cloud-setup-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cloud-setup-details summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 700; padding: 6px 0; }
.cloud-setup-details > .secondary-button { margin-top: 12px; }
.cloud-auth-fields { margin-top: 14px; }
.cloud-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cloud-auth-actions > button { flex: 0 1 auto; }
.record-body-detail { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f8f7f2; color: #555a51; }
.record-body-detail summary { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 700; }
.record-body-full { margin-top: 9px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
@media (max-width: 600px) {
  .cloud-sync-panel { padding: 13px; }
  .cloud-auth-actions { display: grid; grid-template-columns: 1fr; }
  .cloud-auth-actions > button { width: 100%; }
  .record-body-full { font-size: 14px; line-height: 1.75; }
}
