@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600&family=Noto+Serif+SC:wght@400;500;600&display=swap');

:root {
  --bg: #1d1914;
  --surface: #2a241c;
  --surface-high: #372e23;
  --divider: #493d2e;
  --text-1: #f0e7d8;
  --text-2: #b9ac98;
  --text-3: #877a68;
  --accent: #c9b6e8;
  --accent-deep: #b7a0dc;
  --warm: #f0c98c;
  --danger: #e3a09a;
  --sidebar-width: 232px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 74% 5%, rgba(240,201,140,.10), transparent 30%), radial-gradient(circle at 12% 80%, rgba(240,201,140,.035), transparent 26%);
  z-index: -1;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  border-right: 1px solid var(--divider);
  padding: 42px 28px 28px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  background: rgba(14,17,22,.94);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; border: 1px solid #3b354f; border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.brand-mark svg { width: 22px; }
.brand strong { display: block; font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: .16em; }
.brand small { display: block; margin-top: 4px; font-size: 8px; color: var(--text-3); letter-spacing: .19em; }
.main-nav { margin-top: 72px; display: grid; gap: 10px; }
.nav-item { border: 0; background: transparent; display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 14px; border-radius: 10px; color: var(--text-2); text-align: left; transition: background .2s, color .2s; }
.nav-item svg { width: 19px; }
.nav-item:hover { background: rgba(255,255,255,.025); color: var(--text-1); }
.nav-item.is-active { background: var(--surface-high); color: var(--text-1); }
.nav-item.is-active svg { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sidebar-note { margin: auto 0 60px; padding-left: 10px; color: var(--text-3); }
.tiny-star { display: block; color: var(--warm); font-size: 28px; font-weight: 400; margin-bottom: 20px; opacity: .8; }
.sidebar-note p { font-family: var(--serif); font-size: 13px; line-height: 2.1; letter-spacing: .08em; margin: 0; }
.sidebar-bottom { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 10px; letter-spacing: .06em; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .65; }

.main-content { margin-left: var(--sidebar-width); min-height: 100vh; padding: 0 7.2vw; }
.topbar { height: 104px; max-width: 1100px; margin: auto; display: flex; align-items: center; justify-content: flex-end; }
.mobile-brand { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.quiet-button { border: 0; background: transparent; display: flex; align-items: center; gap: 9px; color: var(--text-3); font-size: 12px; padding: 10px 0; transition: color .2s; }
.quiet-button:hover { color: var(--text-1); }
.quiet-button svg { width: 17px; }
kbd { font-family: var(--sans); font-size: 9px; border: 1px solid var(--divider); border-radius: 4px; color: var(--text-3); padding: 2px 5px; margin-left: 6px; }
.new-dream-button { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 15px; border: 1px solid #403952; background: rgba(139,124,246,.055); border-radius: 9px; color: #c0b6f8; font-size: 12px; transition: background .2s, border-color .2s; }
.new-dream-button:hover { background: rgba(139,124,246,.12); border-color: #625680; }
.new-dream-button svg { width: 15px; }
.view { max-width: 1100px; margin: 0 auto; animation: appear .35s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.archive-intro { padding: 54px 0 64px; }
.eyebrow { margin: 0 0 24px; font-size: 9px; font-weight: 500; letter-spacing: .25em; color: var(--accent); }
h1 { font-family: var(--serif); font-size: clamp(34px, 3.35vw, 52px); line-height: 1.45; font-weight: 500; letter-spacing: .03em; margin: 0; }
.intro-copy { color: var(--text-2); font-family: var(--serif); font-size: 15px; line-height: 2.15; letter-spacing: .04em; margin: 25px 0 27px; }
.archive-meta { display: flex; align-items: center; gap: 13px; font-size: 10px; letter-spacing: .08em; color: var(--text-3); }
.archive-meta i { display: block; width: 2px; height: 2px; border-radius: 50%; background: var(--text-3); }
.timeline-tools { display: flex; justify-content: space-between; align-items: center; padding: 0 0 22px 128px; border-bottom: 1px solid var(--divider); }
.filter-group { display: flex; gap: 6px; }
.filter-chip { border: 0; background: transparent; color: var(--text-3); border-radius: 30px; padding: 7px 14px; font-size: 11px; transition: .2s; }
.filter-chip:hover { color: var(--text-1); }
.filter-chip.is-active { background: var(--surface-high); color: var(--text-1); }
.reading-note { color: var(--text-3); font-size: 10px; letter-spacing: .08em; }
.timeline { padding-top: 4px; }
.year-group { position: relative; }
.year-heading { margin: 0; padding: 47px 0 25px; width: 94px; color: var(--text-3); font-size: 11px; font-weight: 400; letter-spacing: .13em; font-variant-numeric: tabular-nums; }
.dream-entry { position: relative; display: grid; grid-template-columns: 94px minmax(0, 720px); column-gap: 34px; padding: 18px 0 58px; }
.dream-entry::before { content: ""; position: absolute; left: 93px; top: 20px; bottom: 0; width: 1px; background: var(--divider); }
.dream-entry::after { content: ""; position: absolute; left: 90px; top: 28px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-deep); box-shadow: 0 0 0 6px var(--bg); }
.entry-date { padding-top: 1px; text-align: left; color: var(--text-2); font-variant-numeric: tabular-nums; }
.entry-date strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 400; }
.entry-date span { display: block; color: var(--text-3); font-size: 9px; margin-top: 7px; letter-spacing: .04em; }
.entry-body { padding-left: 0; }
.entry-kicker { color: var(--text-3); font-size: 9px; letter-spacing: .12em; margin-bottom: 12px; }
.entry-title { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .035em; line-height: 1.6; margin: 0 0 16px; }
.entry-title button { border: 0; padding: 0; background: none; font: inherit; text-align: left; transition: color .2s; }
.entry-title button:hover { color: var(--accent); }
.entry-excerpt { color: #aeb4bf; font-family: var(--serif); font-size: 14px; line-height: 2.15; letter-spacing: .035em; margin: 0; }
.entry-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 21px; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tag { border: 1px solid var(--divider); border-radius: 20px; padding: 3px 9px; color: var(--text-3); font-size: 9px; }
.tag.special { color: var(--accent); border-color: #3c3654; background: rgba(139,124,246,.05); }
.tag.nightmare { color: var(--danger); border-color: #493237; background: rgba(224,138,138,.04); }
.read-button { flex-shrink: 0; border: 0; background: transparent; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; font-size: 10px; padding: 5px 0 5px 10px; transition: color .2s; }
.read-button svg { width: 14px; transition: transform .2s; }
.read-button:hover { color: var(--accent); }
.read-button:hover svg { transform: translateX(3px); }
.empty-state { padding: 80px 0 100px 128px; text-align: center; color: var(--text-3); }
.empty-state svg { width: 34px; height: 34px; }
.empty-state p { font-family: var(--serif); font-size: 14px; }
.text-button { border: 0; background: none; color: var(--accent); font-size: 12px; }

.calendar-intro { padding: 54px 0 48px; }
.calendar-intro p:last-child { color: var(--text-2); font-family: var(--serif); line-height: 1.9; margin-top: 20px; }
.calendar-layout { display: grid; grid-template-columns: minmax(430px, 1.35fr) minmax(280px, 1fr); gap: 26px; align-items: stretch; }
.calendar-panel, .day-dreams { border: 1px solid var(--divider); border-radius: 16px; background: rgba(23,27,35,.55); }
.calendar-panel { padding: 30px 32px 24px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.calendar-header h2 { font-family: var(--serif); font-weight: 500; font-size: 17px; letter-spacing: .06em; margin: 0; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-3); border-radius: 8px; transition: .2s; }
.icon-button:hover { color: var(--text-1); background: var(--surface-high); }
.icon-button svg { width: 17px; }
.flip { transform: rotate(180deg); }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays { color: var(--text-3); font-size: 9px; text-align: center; margin-bottom: 10px; }
.calendar-day { position: relative; aspect-ratio: 1.12; border: 0; background: transparent; color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; font-size: 11px; font-variant-numeric: tabular-nums; }
.calendar-day:not(:disabled):hover { background: var(--surface-high); color: var(--text-1); }
.calendar-day.is-outside { color: #404751; }
.calendar-day:disabled { cursor: default; }
.calendar-day.is-today .day-number { outline: 1px solid #665b88; outline-offset: 4px; border-radius: 50%; }
.calendar-day.is-selected { background: rgba(139,124,246,.13); color: #d6ceff; }
.day-dots { display: flex; gap: 3px; height: 3px; }
.day-dots i { display: block; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; }
.calendar-legend { border-top: 1px solid var(--divider); margin-top: 20px; padding-top: 18px; display: flex; gap: 22px; color: var(--text-3); font-size: 9px; }
.calendar-legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.legend-ring { width: 8px; height: 8px; border: 1px solid #665b88; border-radius: 50%; }
.day-dreams { padding: 32px; }
.day-dreams-empty { height: 100%; min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-orbit { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #383145; border-radius: 50%; transform: rotate(-25deg); margin-bottom: 25px; }
.empty-orbit::before { content: ""; width: 31px; height: 31px; border: 1px solid #544765; border-radius: 50%; }
.empty-orbit i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); transform: translate(25px, -8px); }
.day-dreams-empty h3 { font-family: var(--serif); font-size: 14px; font-weight: 400; color: var(--text-2); margin: 0 0 12px; }
.day-dreams-empty p { font-size: 10px; color: var(--text-3); margin: 0; }
.selected-date { color: var(--accent); font-size: 9px; letter-spacing: .12em; margin: 0 0 20px; }
.day-card { border-top: 1px solid var(--divider); padding: 24px 0; }
.day-card:first-of-type { border-top: 0; padding-top: 0; }
.day-card h3 { font-family: var(--serif); font-size: 19px; font-weight: 500; margin: 0 0 12px; }
.day-card p { color: var(--text-2); font-family: var(--serif); font-size: 12px; line-height: 1.9; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.month-note { margin: 25px 0 70px; padding: 19px 24px; border-left: 2px solid #6f5f49; background: rgba(245,200,138,.025); color: var(--text-3); font-size: 11px; line-height: 1.8; }
.month-note strong { color: var(--warm); font-weight: 400; }

.article-view { max-width: 820px; }
.article-topline { padding: 30px 0 52px; display: flex; justify-content: space-between; }
.back-button, .edit-button, .quote-button { border: 0; background: transparent; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; font-size: 11px; padding: 8px 0; }
.back-button:hover, .edit-button:hover { color: var(--text-1); }
.back-button svg, .edit-button svg, .quote-button svg { width: 16px; }
.article-actions { display: flex; align-items: center; gap: 18px; }
.quote-button { color: #b9a17f; }
.quote-button:hover { color: var(--warm); }
.delete-button { border: 0; background: transparent; color: var(--text-3); font-size: 11px; padding: 8px 0; }
.delete-button:hover { color: var(--danger); }
.article-header { padding-bottom: 40px; border-bottom: 1px solid var(--divider); }
.article-header .eyebrow { margin-bottom: 20px; }
.article-header h1 { font-size: clamp(30px, 3vw, 44px); }
.article-meta { margin-top: 22px; color: var(--text-3); font-size: 10px; display: flex; gap: 14px; align-items: center; }
.article-body { padding: 42px 0 32px; }
.article-body p { font-family: var(--serif); font-size: 16px; color: #c5c8cf; line-height: 2.35; letter-spacing: .045em; margin: 0 0 26px; }
.article-footer-tags { padding-bottom: 50px; }
.article-pagination { border-top: 1px solid var(--divider); display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 30px 0 70px; }
.article-pagination button { border: 0; background: transparent; text-align: left; padding: 0; }
.article-pagination button:last-child { text-align: right; }
.article-pagination span { color: var(--text-3); display: block; font-size: 9px; margin-bottom: 9px; }
.article-pagination strong { font-family: var(--serif); font-size: 13px; font-weight: 400; color: var(--text-2); }
.article-pagination button:hover strong { color: var(--accent); }

.site-footer { max-width: 1100px; margin: 40px auto 0; border-top: 1px solid var(--divider); padding: 27px 0 35px; display: flex; justify-content: space-between; color: var(--text-3); font-size: 9px; letter-spacing: .07em; }

dialog { color: var(--text-1); background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; padding: 0; box-shadow: 0 25px 90px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(4,6,9,.76); backdrop-filter: blur(5px); }
.search-dialog { width: min(620px, calc(100vw - 32px)); margin-top: 13vh; }
.search-box { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.search-box > svg { color: var(--text-3); width: 19px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-1); font-size: 14px; }
.search-box input::placeholder { color: var(--text-3); }
.search-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.search-result { width: 100%; display: block; border: 0; background: transparent; border-radius: 9px; padding: 13px 14px; text-align: left; }
.search-result:hover, .search-result:focus { background: var(--surface-high); }
.search-result time { color: var(--text-3); font-size: 9px; }
.search-result strong { display: block; font-family: var(--serif); font-size: 14px; font-weight: 500; margin: 5px 0; }
.search-result p { margin: 0; color: var(--text-3); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { color: var(--text-3); text-align: center; font-family: var(--serif); font-size: 12px; padding: 45px 20px; }
.search-hint { display: flex; justify-content: space-between; border-top: 1px solid var(--divider); padding: 10px 17px; color: var(--text-3); font-size: 9px; }

.share-dialog { width: min(560px, calc(100vw - 32px)); padding: 30px; }
.share-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 27px; }
.share-header .eyebrow { margin-bottom: 10px; }
.share-header h2 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.share-quote-label { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--text-2); font-size: 11px; }
.share-quote-label small { color: var(--text-3); font-size: 9px; }
#shareQuote { width: 100%; resize: vertical; min-height: 145px; border: 1px solid var(--divider); border-radius: 12px; outline: 0; background: var(--surface-high); color: #ddcfba; padding: 17px; font-family: var(--serif); font-size: 13px; line-height: 2; }
#shareQuote:focus { border-color: #8c7150; }
.share-source { display: flex; gap: 14px; margin: 15px 0 25px; color: var(--text-3); font-size: 9px; line-height: 1.7; }
.share-source span:first-child { flex-shrink: 0; }
#shareSource { overflow-wrap: anywhere; }
.share-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.share-platform, .copy-quote-button { border: 1px solid var(--divider); border-radius: 9px; background: transparent; color: var(--text-2); padding: 10px 15px; font-size: 11px; }
.share-platform:hover { border-color: #806848; color: var(--warm); }
.copy-quote-button { margin-left: auto; border-color: #806848; background: rgba(240,201,140,.07); color: var(--warm); }
.share-note { margin: 16px 0 0; color: var(--text-3); font-size: 9px; line-height: 1.8; }

.editor-dialog { width: min(680px, calc(100vw - 32px)); max-height: 90vh; overflow-y: auto; }
.editor-dialog form { padding: 32px; }
.editor-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.editor-header .eyebrow { margin-bottom: 10px; }
.editor-header h2 { font-family: var(--serif); font-size: 23px; font-weight: 500; margin: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor-dialog label:not(.check-label) { display: block; margin-bottom: 20px; }
.editor-dialog label > span { display: block; font-size: 11px; color: var(--text-2); margin-bottom: 9px; }
.editor-dialog label small { color: var(--text-3); font-size: 9px; }
.editor-dialog input[type="text"], .editor-dialog input[type="date"], .editor-dialog input[type="time"], .editor-dialog textarea, .editor-dialog select { width: 100%; border: 1px solid var(--divider); background: var(--surface-high); border-radius: 9px; padding: 11px 13px; outline: 0; color: var(--text-1); color-scheme: dark; font-size: 12px; transition: border-color .2s; }
.editor-dialog input:focus, .editor-dialog textarea:focus, .editor-dialog select:focus { border-color: #61557f; }
.editor-dialog textarea { resize: vertical; min-height: 160px; line-height: 1.9; font-family: var(--serif); }
.editor-dialog input::placeholder, .editor-dialog textarea::placeholder { color: var(--text-3); }
.dream-options { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.check-label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); }
.check-label input { accent-color: var(--accent-deep); }
.check-label span { margin: 0 !important; }
.emotion-label { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 10px; }
.emotion-label select { width: auto; padding: 7px 9px; }
.editor-footer { border-top: 1px solid var(--divider); margin-top: 28px; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.editor-footer p { margin: 0; color: var(--text-3); font-size: 9px; line-height: 1.6; }
.save-button { flex-shrink: 0; border: 0; border-radius: 9px; background: var(--accent-deep); color: #12121a; display: flex; align-items: center; gap: 15px; padding: 11px 17px; font-size: 11px; font-weight: 500; }
.save-button svg { width: 15px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 15px); background: var(--surface-high); border: 1px solid var(--divider); color: var(--text-1); border-radius: 10px; padding: 12px 20px; font-size: 11px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.sidebar { background: rgba(26,23,19,.95); }
.brand-mark { color: var(--warm); border-color: #594a35; background: rgba(240,201,140,.035); }
.nav-item.is-active { background: #30291f; }
.nav-item.is-active svg { color: var(--warm); }
.status-dot { background: var(--warm); }
.new-dream-button { border-color: #655238; background: rgba(240,201,140,.07); color: var(--warm); }
.new-dream-button:hover { background: rgba(240,201,140,.13); border-color: #8a6d46; }
.archive-intro { position: relative; padding-right: 165px; }
.eyebrow { color: #c8a879; }
.night-keepsake { position: absolute; right: 12px; top: 48px; width: 130px; display: flex; flex-direction: column; align-items: center; gap: 17px; color: var(--warm); }
.moon-halo { position: relative; width: 104px; height: 104px; display: grid; place-items: center; border: 1px solid #594a35; border-radius: 50%; background: radial-gradient(circle, rgba(240,201,140,.09), rgba(240,201,140,.015) 65%); box-shadow: 0 0 55px rgba(240,201,140,.07); }
.moon-halo::before { content: ""; position: absolute; width: 124px; height: 48px; border: 1px solid rgba(240,201,140,.16); border-radius: 50%; transform: rotate(-24deg); }
.moon-halo::after { content: "✦"; position: absolute; right: -17px; top: 3px; color: var(--warm); font-size: 13px; }
.moon-halo svg { width: 37px; height: 37px; stroke-width: 1.2; }
.night-keepsake > span { color: #a8967c; font-family: var(--serif); font-size: 11px; letter-spacing: .16em; }
.intro-copy { color: #c2b39d; }
.timeline .dream-entry { padding: 0 0 26px; }
.timeline .dream-entry::before { top: 0; bottom: 26px; }
.timeline .dream-entry::after { top: 36px; background: var(--warm); box-shadow: 0 0 0 6px var(--bg); }
.entry-date { padding-top: 28px; }
.entry-date strong { color: #d4c3aa; }
.entry-body { padding: 24px 27px; border: 1px solid var(--divider); border-radius: 17px; background: var(--surface); transition: border-color .22s, background .22s; }
.timeline .dream-entry:hover .entry-body { border-color: #6b573d; background: #30281e; }
.entry-title { color: #f1e5d3; }
.entry-excerpt { color: #c9bca7; line-height: 2.05; }
.entry-kicker { color: #96856d; }
.tag { border-color: #473d2f; color: #a79780; background: rgba(255,255,255,.012); }
.tag.special { color: var(--accent); border-color: #554765; background: rgba(201,182,232,.055); }
.read-button { color: #ae9574; }
.read-button:hover, .entry-title button:hover { color: var(--warm); }
.filter-chip.is-active { background: #342c21; color: #e5d5bd; }
.calendar-panel, .day-dreams { background: rgba(42,36,28,.92); border-color: #514331; }
.calendar-day.is-selected { background: rgba(240,201,140,.12); color: #f4dbb2; }
.calendar-day.is-today .day-number, .legend-ring { outline-color: #8c7150; border-color: #8c7150; }
.empty-orbit { border-color: #594a35; }
.empty-orbit::before { border-color: #776143; }
.empty-orbit i { background: var(--warm); }
.month-note { background: rgba(240,201,140,.04); border-left-color: #94754d; }
#articleContent > article { padding: 38px 44px; border: 1px solid var(--divider); border-radius: 18px; background: var(--surface); }
.article-header { border-color: #463b2c; }
.article-body p { color: #d6c8b3; }
.article-footer-tags { padding-bottom: 0; }
.save-button { background: var(--warm); color: #2b2116; }
.editor-dialog input:focus, .editor-dialog textarea:focus, .editor-dialog select:focus { border-color: #8c7150; }

@media (max-width: 760px) {
  .archive-intro { padding-right: 0; }
  .night-keepsake { display: none; }
  .timeline .dream-entry { padding: 0 0 18px; }
  .entry-date { padding-top: 0; }
  .entry-body { padding: 21px 20px; border-radius: 15px; }
  #articleContent > article { padding: 28px 22px; }
}

@media (min-width: 1500px) {
  :root { --sidebar-width: 260px; }
  .sidebar { padding-left: 36px; padding-right: 36px; }
  .main-content { padding: 0 8vw; }
  .archive-intro { padding-top: 70px; }
}

.mobile-nav { display: none; }
@media (max-width: 760px) {
  .mobile-nav { position: fixed; display: flex; z-index: 20; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 5px; border: 1px solid var(--divider); border-radius: 14px; background: rgba(42,35,26,.97); backdrop-filter: blur(12px); }
  .mobile-nav .nav-item { width: 112px; justify-content: center; padding: 10px 16px; margin: 0; }
  .mobile-nav .nav-item svg { width: 17px; }
  .site-footer { margin-bottom: 72px; }
}

@media (max-width: 1050px) {
  :root { --sidebar-width: 196px; }
  .sidebar { padding: 34px 20px 25px; }
  .main-content { padding: 0 5vw; }
  .calendar-layout { grid-template-columns: 1fr; }
  .day-dreams-empty { min-height: 220px; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }
  /* 底部悬浮导航高 54px + 距底 16px，共约 70px。留 96px 安全边距，
     否则最后一张卡片的正文会被它压住。 */
  .main-content { margin-left: 0; padding: 0 22px 96px; }
  .topbar { height: 76px; justify-content: space-between; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand svg { color: var(--accent); width: 19px; }
  .mobile-brand strong { font-family: var(--serif); font-weight: 500; letter-spacing: .12em; }
  .quiet-button span, .quiet-button kbd { display: none; }
  .topbar-actions { gap: 16px; }
  .new-dream-button { width: 36px; padding: 0; justify-content: center; }
  .new-dream-button span { display: none; }
  .archive-intro, .calendar-intro { padding: 42px 0 45px; }
  h1 { font-size: 32px; }
  .intro-copy { font-size: 13px; }
  .desktop-break { display: none; }
  .timeline-tools { padding-left: 0; flex-wrap: wrap; gap: 10px; }
  .timeline-tools-right { gap: 8px; }
  .reading-note { display: none; }
  .tool-button { padding: 5px 10px; }
  .year-heading { width: auto; padding: 34px 0 10px; }
  .dream-entry { grid-template-columns: 1fr; padding: 22px 0 44px; }
  .dream-entry::before, .dream-entry::after { display: none; }
  .entry-date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 13px; }
  .entry-date strong { font-size: 12px; font-family: var(--sans); }
  .entry-date span { margin: 0; }
  .entry-title { font-size: 22px; }
  .entry-excerpt { font-size: 13px; }
  .entry-kicker { display: none; }
  .empty-state { padding-left: 0; }
  .calendar-panel { padding: 22px 14px 18px; }
  .calendar-day { aspect-ratio: 1; }
  .day-dreams { padding: 25px; }
  .article-topline { padding-bottom: 35px; }
  .article-body p { font-size: 15px; }
  .site-footer { margin-top: 20px; gap: 20px; }
  .site-footer span:last-child { display: none; }
  .editor-dialog form { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .editor-footer { align-items: flex-end; }
  .emotion-label { margin-left: 0; }
}

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

/* ── 可编辑版新增（2026-11-05）────────────────────────────────────── */
/* 时间轴卡片上的「编辑 / 删除」：默认淡出，hover 或触屏设备常显。
   手机没有 hover，所以用 @media (hover: none) 让它一直可见，否则点不到。 */
.entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.entry-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity .2s; }
.dream-entry:hover .entry-actions, .entry-actions:focus-within { opacity: 1; }
.entry-action { border: 0; background: transparent; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 4px 6px; border-radius: 4px; transition: color .2s, background .2s; }
.entry-action svg { width: 13px; }
.entry-action:hover { color: var(--accent); background: rgba(255,255,255,.04); }
.entry-action.is-danger:hover { color: var(--danger); background: rgba(224,138,138,.08); }
@media (hover: none) { .entry-actions { opacity: 1; } }

/* 手机上「编辑 / 删除」的可点区域偏小（原 30px 高）。触控目标建议 ≥44px，
   用上下加大 padding 撑开命中区，视觉上仍保持轻巧。 */
@media (max-width: 760px) {
  .entry-action { font-size: 11px; padding: 12px 8px; margin: -6px 0; }
}

.timeline-tools-right { display: flex; align-items: center; gap: 14px; }
.tool-button { border: 1px solid var(--divider); background: transparent; color: var(--text-3); border-radius: 20px; padding: 5px 12px; font-size: 10px; letter-spacing: .04em; transition: .2s; }
.tool-button:hover { color: var(--text-1); border-color: #443a52; }
.tool-button.is-danger:hover { color: var(--danger); border-color: #493237; }

/* ── 后端同步状态 & 登录/退出（2026-11-14） ───────────────────────── */
.jm-sync {
  font-size: 10px; letter-spacing: .06em; color: var(--text-3);
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--divider);
  transition: .2s; white-space: nowrap;
}
.jm-sync.is-busy { color: var(--warm); border-color: #4a3b30; }
.jm-sync.is-warn { color: var(--warm); border-color: #4a3b30; }
.jm-sync.is-bad  { color: var(--danger); border-color: #493237; }
/* 游客：告诉读者「你在看，但不能改」 */
.jm-sync.is-guest { color: #8fb3d9; border-color: #34435c; }
.jm-exit {
  font-size: 10px; letter-spacing: .06em; color: var(--text-3);
  text-decoration: none; padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--divider); transition: .2s;
}
.jm-exit:hover { color: var(--text-1); border-color: #443a52; }
/* 游客的「登录」：用暖色，让人一眼看见该往哪儿点 */
.jm-login {
  font-size: 10px; letter-spacing: .08em; color: #2b3241;
  text-decoration: none; padding: 6px 14px; border-radius: 20px;
  background: var(--warm); border: 1px solid transparent;
  font-weight: 600; transition: .2s;
}
.jm-login:hover { filter: brightness(1.08); }
@media (max-width: 720px) {
  .jm-sync { display: none; }          /* 手机上顶栏太挤，状态靠 toast 提示 */
  .jm-exit { padding: 8px 12px; }
}
