:root {
  --bg: #f4f1e9;
  --surface: #fffdf7;
  --surface-2: #ece7dc;
  --text: #25251f;
  --muted: #7d7b70;
  --line: rgba(37, 37, 31, .14);
  --accent: #bd5b3f;
  --accent-ink: #fffaf2;
  --shadow: 0 24px 70px rgba(40, 35, 24, .12);
  --radius: 18px;
  --font-sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  color-scheme: light;
}

body[data-theme="chronicle"] {
  --bg: #11130f;
  --surface: #1a1d17;
  --surface-2: #23271f;
  --text: #f1f1e8;
  --muted: #a6ac9c;
  --line: rgba(241, 241, 232, .15);
  --accent: #d7ff72;
  --accent-ink: #17200c;
  --shadow: 0 30px 90px rgba(0, 0, 0, .38);
  --radius: 4px;
  color-scheme: dark;
}

body[data-theme="daybook"] {
  --bg: #f1ece1;
  --surface: #fbf7ee;
  --surface-2: #e8dfcf;
  --text: #352f27;
  --muted: #8b8071;
  --line: rgba(53, 47, 39, .16);
  --accent: #bd5b3f;
  --accent-ink: #fff8ee;
  --shadow: 0 22px 60px rgba(75, 58, 35, .13);
  --radius: 2px;
}

body[data-theme="moments"] {
  --bg: #f5f4fb;
  --surface: #ffffff;
  --surface-2: #ece9fa;
  --text: #25233a;
  --muted: #827e97;
  --line: rgba(37, 35, 58, .11);
  --accent: #6b5cff;
  --accent-ink: #ffffff;
  --shadow: 0 24px 70px rgba(67, 54, 133, .13);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
body.is-locked { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon.small { width: 16px; height: 16px; }
.icon.large { width: 26px; height: 26px; }
.muted { color: var(--muted); }
.serif { font-family: var(--font-serif); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.boot-screen { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 24px; }
.boot-mark { font-family: var(--font-serif); font-size: 44px; line-height: 1.05; letter-spacing: .12em; }
.boot-line { width: 120px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.boot-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: boot 1.4s ease-in-out infinite; }
.boot-screen p { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .16em; }
@keyframes boot { to { transform: translateX(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(1360px, calc(100% - 64px));
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; width: max-content; text-align: left; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--text);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 17px;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 14px; font-weight: 650; letter-spacing: .08em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .19em; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-button { border: 0; background: none; padding: 9px 15px; color: var(--muted); font-size: 13px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-button:hover, .nav-button.active { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: background .2s, transform .2s, border-color .2s;
}
.icon-button:hover { background: var(--surface-2); border-color: var(--text); transform: translateY(-1px); }
.icon-button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.write-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 17px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  transition: transform .2s, opacity .2s;
}
.write-button:hover { transform: translateY(-2px); opacity: .88; }
.write-button .icon { width: 16px; height: 16px; }
.mobile-menu-button { display: none; }

.site-main { min-height: 70vh; }
.section { width: min(1220px, calc(100% - 80px)); margin: 0 auto; padding: 100px 0; }
.section.wide { width: min(1360px, calc(100% - 64px)); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 46px; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(32px, 4vw, 58px); line-height: 1.05; letter-spacing: -.045em; font-weight: 620; }
.section-heading p { max-width: 370px; margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.text-link { display: inline-flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 650; letter-spacing: .04em; }
.text-link .icon { width: 16px; height: 16px; transition: transform .2s; }
.text-link:hover .icon { transform: translateX(4px); }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.pill .icon { width: 13px; height: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.tag + .tag::before { content: "/"; margin-right: 7px; opacity: .45; }

.stats-ribbon { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-inner { width: min(1220px, calc(100% - 80px)); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 24px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: clamp(28px, 3vw, 42px); line-height: 1; font-weight: 560; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; letter-spacing: .14em; }

/* Chronicle */
.chronicle-hero { position: relative; min-height: min(860px, calc(100svh - 78px)); overflow: hidden; background: #151912; color: #f4f4e9; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; animation: hero-in 1.4s ease both; }
@keyframes hero-in { from { transform: scale(1.06); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 12, 7, .78) 0%, rgba(9, 12, 7, .24) 55%, rgba(9, 12, 7, .12)), linear-gradient(0deg, rgba(9, 12, 7, .78), transparent 48%); }
.chronicle-hero .hero-content { position: relative; z-index: 2; width: min(1360px, calc(100% - 96px)); min-height: min(860px, calc(100svh - 78px)); margin: 0 auto; padding: 90px 0 54px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-kicker { display: flex; align-items: center; gap: 14px; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(244, 244, 233, .7); }
.hero-kicker .line { width: 54px; height: 1px; background: currentColor; }
.chronicle-title { max-width: 1050px; margin: 30px 0 40px; font-size: clamp(68px, 10.2vw, 154px); font-weight: 590; line-height: .88; letter-spacing: -.075em; }
.chronicle-title em { font-family: var(--font-serif); font-weight: 400; color: #d7ff72; }
.hero-description { max-width: 450px; margin: 0; color: rgba(244, 244, 233, .74); font-size: 14px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.primary-button, .secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 11px 22px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  transition: transform .2s, background .2s, color .2s;
}
.primary-button { background: #d7ff72; color: #17200c; }
.primary-button:hover { transform: translateY(-2px); background: #e3ff9b; }
.secondary-button { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .05); color: #f4f4e9; backdrop-filter: blur(10px); }
.secondary-button:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.hero-location { display: grid; gap: 5px; color: rgba(244, 244, 233, .7); font-size: 10px; letter-spacing: .12em; }
.hero-location strong { color: #f4f4e9; font-size: 12px; font-weight: 500; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; color: rgba(244, 244, 233, .62); font-size: 9px; letter-spacing: .2em; writing-mode: vertical-rl; }
.scroll-cue::after { content: ""; width: 1px; height: 56px; background: rgba(255, 255, 255, .4); }
.chronicle-section { padding-top: 120px; }
.year-block + .year-block { margin-top: 110px; }
.year-label { display: flex; align-items: baseline; gap: 18px; margin-bottom: 42px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.year-label strong { font-size: clamp(52px, 7vw, 94px); line-height: .9; font-weight: 520; letter-spacing: -.06em; }
.year-label span { color: var(--muted); font-size: 10px; letter-spacing: .17em; }
.timeline-entry { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(36px, 7vw, 100px); align-items: center; padding: 54px 0; animation: rise .6s ease both; }
.timeline-entry + .timeline-entry { border-top: 1px solid var(--line); }
.timeline-entry:nth-child(even) .timeline-image { order: 2; }
.timeline-image { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 0; background: var(--surface-2); }
.timeline-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .5s; }
.timeline-image:hover img { transform: scale(1.035); filter: brightness(.92); }
.image-count { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; background: rgba(10, 12, 8, .62); color: #fff; font-size: 10px; backdrop-filter: blur(10px); }
.image-count .icon { width: 13px; height: 13px; }
.timeline-copy { max-width: 420px; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.entry-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
.timeline-copy h3 { margin: 20px 0 18px; font-family: var(--font-serif); font-size: clamp(32px, 3.6vw, 54px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
.title-button { padding: 0; border: 0; background: none; text-align: left; }
.title-button:hover { color: var(--accent); }
.timeline-copy p { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.95; }
.timeline-copy .tag-row { margin-bottom: 28px; }
.footprint-teaser { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); padding: clamp(32px, 5vw, 68px); }
.footprint-teaser::after { content: "MAP"; position: absolute; right: -20px; bottom: -60px; color: var(--surface-2); font-size: 200px; font-weight: 800; line-height: 1; letter-spacing: -.08em; pointer-events: none; }
.footprint-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; }
.footprint-grid h2 { margin: 12px 0 20px; font-size: clamp(38px, 5vw, 70px); line-height: 1; letter-spacing: -.055em; font-weight: 560; }
.footprint-grid p { max-width: 420px; color: var(--muted); }
.route-line { display: flex; align-items: center; gap: 0; margin: 30px 0; }
.route-stop { display: grid; justify-items: center; gap: 8px; min-width: 70px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.route-stop i { width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); }
.route-stop:first-child i, .route-stop:last-child i { background: var(--accent); }
.route-segment { flex: 1; height: 1px; background: var(--line); margin-bottom: 22px; }

/* Daybook */
body[data-theme="daybook"] .site-header { background: rgba(241, 236, 225, .91); }
body[data-theme="daybook"] .header-inner { min-height: 84px; }
body[data-theme="daybook"] .brand-mark { border-radius: 0; transform: rotate(-4deg); }
body[data-theme="daybook"] .nav-button.active { background: transparent; color: var(--accent); border-bottom: 1px solid var(--accent); border-radius: 0; }
body[data-theme="daybook"] .write-button { border-radius: 2px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.daybook-hero { width: min(1220px, calc(100% - 80px)); margin: 0 auto; padding: 74px 0 90px; display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(320px, .85fr); gap: clamp(30px, 5vw, 72px); align-items: center; }
.date-stamp { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); padding-right: 26px; }
.date-stamp .month { color: var(--accent); font-family: var(--font-serif); font-size: 15px; letter-spacing: .18em; writing-mode: vertical-rl; }
.date-stamp .day { font-family: var(--font-serif); font-size: clamp(66px, 7vw, 100px); line-height: .85; letter-spacing: -.08em; }
.date-stamp .year { color: var(--muted); font-size: 10px; letter-spacing: .2em; }
.daybook-title { margin: 18px 0 26px; font-family: var(--font-serif); font-size: clamp(52px, 6.6vw, 96px); font-weight: 500; line-height: 1.02; letter-spacing: -.055em; }
.daybook-title em { color: var(--accent); font-weight: 400; }
.daybook-intro { max-width: 480px; margin: 0; color: var(--muted); font-family: var(--font-serif); font-size: 16px; line-height: 2; }
.daybook-hero .hero-actions { margin-top: 34px; }
body[data-theme="daybook"] .primary-button { background: var(--accent); color: var(--accent-ink); border-radius: 2px; }
body[data-theme="daybook"] .secondary-button { color: var(--text); border-color: var(--line); background: transparent; border-radius: 2px; }
.polaroid-stack { position: relative; padding: 18px 18px 54px; background: #fffdf8; box-shadow: 0 22px 50px rgba(70, 53, 29, .17); transform: rotate(3deg); }
.polaroid-stack::before { content: ""; position: absolute; inset: 8px -10px -9px 9px; border: 1px solid rgba(70, 53, 29, .12); background: #f4eddf; z-index: -1; transform: rotate(-5deg); }
.polaroid-stack img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.84) contrast(.96); }
.polaroid-note { position: absolute; left: 26px; right: 26px; bottom: 16px; display: flex; justify-content: space-between; color: #6f6456; font-family: var(--font-serif); font-size: 11px; }
.polaroid-tape { position: absolute; width: 92px; height: 25px; top: -10px; left: calc(50% - 46px); background: rgba(218, 198, 157, .62); transform: rotate(-4deg); backdrop-filter: blur(2px); }
.journal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.journal-toolbar p { margin: 0; color: var(--muted); font-family: var(--font-serif); font-size: 13px; }
.journal-year-nav { display: flex; gap: 8px; }
.journal-year-nav button { border: 0; background: none; color: var(--muted); padding: 5px 10px; font-size: 11px; }
.journal-year-nav button.active { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.journal-entry { display: grid; grid-template-columns: 92px minmax(240px, .8fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 58px); align-items: center; padding: 52px 0; border-bottom: 1px solid var(--line); animation: rise .6s ease both; }
.journal-date { align-self: start; display: grid; justify-items: start; padding-top: 4px; }
.journal-date strong { font-family: var(--font-serif); font-size: 48px; font-weight: 400; line-height: 1; letter-spacing: -.05em; }
.journal-date span { margin-top: 8px; color: var(--accent); font-size: 10px; letter-spacing: .16em; }
.journal-date small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.journal-photo { position: relative; padding: 10px 10px 34px; border: 0; background: #fffdf8; box-shadow: 0 12px 30px rgba(70, 53, 29, .11); transform: rotate(-1.4deg); transition: transform .3s; }
.journal-photo:hover { transform: rotate(0) translateY(-4px); }
.journal-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; filter: saturate(.8); }
.journal-photo span { position: absolute; left: 18px; bottom: 10px; color: #7d7162; font-family: var(--font-serif); font-size: 10px; }
.journal-copy h3 { margin: 14px 0 16px; font-family: var(--font-serif); font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.journal-copy p { margin: 0 0 20px; color: var(--muted); font-family: var(--font-serif); font-size: 14px; line-height: 2; }
.journal-copy .entry-meta { font-family: var(--font-sans); }
.journal-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.weather-mark { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 10px; letter-spacing: .08em; }
.journal-quote { position: relative; width: min(920px, calc(100% - 80px)); margin: 120px auto; padding: 70px 40px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.journal-quote::before { content: "“"; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); color: var(--accent); font-family: Georgia, serif; font-size: 70px; line-height: 1; opacity: .5; }
.journal-quote p { margin: 0; font-family: var(--font-serif); font-size: clamp(25px, 3.5vw, 42px); line-height: 1.6; letter-spacing: .02em; }
.journal-quote small { display: block; margin-top: 24px; color: var(--muted); font-size: 10px; letter-spacing: .18em; }

/* Moments */
body[data-theme="moments"] .header-inner { min-height: 76px; }
body[data-theme="moments"] .brand-mark { border: 0; background: var(--accent); color: #fff; border-radius: 12px; transform: rotate(-6deg); }
body[data-theme="moments"] .nav-button.active { background: var(--surface-2); color: var(--accent); }
body[data-theme="moments"] .write-button { border-radius: 14px; background: var(--accent); color: #fff; border-color: var(--accent); }
.moments-hero { position: relative; width: min(1360px, calc(100% - 64px)); min-height: 620px; margin: 28px auto 0; overflow: hidden; border-radius: 34px; background: linear-gradient(135deg, #e8e3ff 0%, #f3edff 45%, #dff4ed 100%); color: #28233f; }
.moments-hero::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: rgba(255, 255, 255, .48); top: -220px; right: 18%; filter: blur(2px); }
.moments-hero-inner { position: relative; z-index: 2; min-height: 620px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding: 64px clamp(34px, 6vw, 90px); }
.moments-title { margin: 22px 0; font-size: clamp(52px, 6.4vw, 92px); line-height: .98; letter-spacing: -.065em; font-weight: 680; }
.moments-title span { color: var(--accent); }
.moments-description { max-width: 430px; color: #716b86; font-size: 14px; }
.moments-search { max-width: 440px; margin-top: 32px; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border: 1px solid rgba(57, 49, 91, .1); border-radius: 18px; background: rgba(255, 255, 255, .75); box-shadow: 0 14px 40px rgba(80, 66, 140, .08); backdrop-filter: blur(12px); }
.moments-search .icon { color: #827a9c; }
.moments-search button { flex: 1; border: 0; background: none; text-align: left; color: #8b849d; padding: 8px 0; font-size: 12px; }
.moments-search kbd { border: 1px solid rgba(57, 49, 91, .12); border-radius: 7px; padding: 2px 7px; color: #8b849d; font: 10px var(--font-sans); }
.moments-collage { position: relative; height: 480px; }
.collage-card { position: absolute; overflow: hidden; border: 7px solid rgba(255, 255, 255, .9); border-radius: 22px; box-shadow: 0 24px 50px rgba(74, 58, 130, .18); }
.collage-card img { width: 100%; height: 100%; object-fit: cover; }
.collage-card.one { width: 56%; height: 66%; left: 2%; top: 6%; transform: rotate(-7deg); }
.collage-card.two { width: 49%; height: 52%; right: 0; top: 0; transform: rotate(6deg); }
.collage-card.three { width: 52%; height: 48%; right: 5%; bottom: 0; transform: rotate(-3deg); }
.collage-badge { position: absolute; left: 42%; bottom: 6%; z-index: 3; display: grid; place-items: center; width: 100px; height: 100px; border-radius: 50%; background: #d7ff72; color: #29321b; font-size: 10px; font-weight: 700; line-height: 1.5; letter-spacing: .08em; text-align: center; transform: rotate(9deg); box-shadow: 0 10px 30px rgba(56, 65, 35, .15); }
.moments-section { padding-top: 84px; }
.moments-section .section-heading h2 { font-size: clamp(36px, 4vw, 58px); }
.masonry { columns: 3; column-gap: 22px; }
.moment-card { display: inline-block; width: 100%; margin: 0 0 22px; break-inside: avoid; overflow: hidden; border-radius: 22px; background: var(--surface); box-shadow: 0 8px 26px rgba(67, 54, 133, .06); animation: rise .6s ease both; }
.moment-photo { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: var(--surface-2); }
.moment-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.moment-photo::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(24, 20, 43, .64)); opacity: 0; transition: opacity .3s; }
.moment-photo:hover img { transform: scale(1.045); }
.moment-photo:hover::after { opacity: 1; }
.moment-overlay { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 18px; display: flex; justify-content: space-between; align-items: flex-end; color: #fff; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; text-align: left; }
.moment-photo:hover .moment-overlay { opacity: 1; transform: translateY(0); }
.moment-overlay strong { font-size: 17px; font-weight: 550; }
.moment-overlay span { font-size: 10px; opacity: .76; }
.moment-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 18px; }
.moment-info h3 { margin: 0 0 4px; font-size: 14px; font-weight: 620; letter-spacing: -.01em; }
.moment-info p { margin: 0; color: var(--muted); font-size: 10px; }
.favorite-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.favorite-button .icon { width: 16px; height: 16px; }
.favorite-button.active { background: #ffe5eb; color: #e75a7c; }
.favorite-button.active .icon { fill: currentColor; }

/* Shared views */
.album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.album-card { position: relative; min-height: 390px; overflow: hidden; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface-2); text-align: left; }
.album-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.album-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 14, 10, .78), transparent 66%); }
.album-card:hover img { transform: scale(1.04); }
.album-card-copy { position: absolute; z-index: 2; left: 30px; right: 30px; bottom: 28px; color: #fff; }
.album-card-copy small { font-size: 9px; letter-spacing: .16em; opacity: .7; }
.album-card-copy h3 { margin: 8px 0; font-family: var(--font-serif); font-size: 34px; font-weight: 500; }
.album-card-copy p { margin: 0; font-size: 12px; opacity: .72; }
.album-card-arrow { position: absolute; z-index: 2; right: 26px; top: 26px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: #fff; backdrop-filter: blur(8px); }
.album-detail-hero { position: relative; min-height: 440px; display: flex; align-items: flex-end; overflow: hidden; }
.album-detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,8,.8), rgba(10,12,8,.08)); }
.album-detail-copy { position: relative; z-index: 2; width: min(1220px, calc(100% - 80px)); margin: 0 auto; padding: 80px 0 54px; color: #fff; }
.album-detail-copy h1 { margin: 10px 0; font-family: var(--font-serif); font-size: clamp(52px, 7vw, 92px); font-weight: 500; line-height: 1; }
.album-detail-copy p { max-width: 500px; opacity: .75; }
.back-button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.back-button:hover { color: var(--text); }
.empty-state { padding: 90px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state .icon { width: 34px; height: 34px; color: var(--muted); }
.empty-state h3 { margin: 18px 0 8px; font-size: 22px; font-weight: 550; }
.empty-state p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .6fr); gap: 34px; align-items: start; }
.map-canvas { position: relative; min-height: 580px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 35%), var(--surface); }
.map-canvas::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 58px 58px; opacity: .32; }
.map-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-route { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 8; opacity: .6; }
.map-marker { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 5px; border: 0; background: none; padding: 0; }
.map-marker i { width: 14px; height: 14px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .2s; }
.map-marker:hover i { transform: scale(1.4); }
.map-marker span { padding: 3px 7px; border-radius: 5px; background: var(--bg); font-size: 9px; white-space: nowrap; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.map-caption { position: absolute; left: 22px; bottom: 20px; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.location-list { display: grid; gap: 0; }
.location-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; width: 100%; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.location-item .number { font-family: var(--font-serif); font-size: 24px; color: var(--muted); }
.location-item strong { display: block; font-size: 13px; font-weight: 600; }
.location-item small { color: var(--muted); font-size: 10px; }
.location-item .icon { width: 15px; height: 15px; color: var(--muted); }
.map-note { margin-top: 24px; padding: 18px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: 11px; }

.about-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: clamp(50px, 8vw, 120px); align-items: start; }
.about-profile { position: sticky; top: 120px; }
.about-avatar { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; filter: saturate(.7); }
.about-profile h1 { margin: 28px 0 8px; font-family: var(--font-serif); font-size: 54px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.about-profile .handle { color: var(--accent); font-size: 11px; letter-spacing: .12em; }
.about-profile p { max-width: 320px; color: var(--muted); }
.about-block + .about-block { margin-top: 54px; padding-top: 54px; border-top: 1px solid var(--line); }
.about-block h2 { margin: 10px 0 20px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -.04em; font-weight: 570; }
.about-block p { color: var(--muted); line-height: 2; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
.feature-item { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature-item .icon { color: var(--accent); }
.feature-item h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 620; }
.feature-item p { margin: 0; font-size: 11px; line-height: 1.8; }
.theme-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.theme-link { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 10px 16px; font-size: 11px; }
.theme-link:hover { border-color: var(--accent); }
.theme-link b { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 9px; }

/* Detail */
.detail-page { width: min(1220px, calc(100% - 80px)); margin: 0 auto; padding: 46px 0 110px; }
.detail-topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 38px; }
.detail-actions { display: flex; gap: 8px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.detail-cover { width: 100%; max-height: 690px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.detail-copy .entry-meta { margin-bottom: 22px; }
.detail-copy h1 { margin: 0 0 24px; font-family: var(--font-serif); font-size: clamp(48px, 6vw, 82px); font-weight: 500; line-height: 1.04; letter-spacing: -.055em; }
.detail-lead { margin: 0; color: var(--muted); font-family: var(--font-serif); font-size: 17px; line-height: 2; }
.detail-tags { margin-top: 30px; }
.detail-body { max-width: 720px; margin: 90px auto 0; }
.detail-body .paragraphs p { margin: 0 0 28px; font-family: var(--font-serif); font-size: 18px; line-height: 2.15; }
.detail-body .paragraphs p:first-child::first-letter { float: left; margin: 8px 12px 0 0; color: var(--accent); font-size: 68px; line-height: .72; }
.detail-signature { display: flex; align-items: center; gap: 14px; margin-top: 50px; color: var(--muted); font-size: 11px; }
.detail-signature::before { content: ""; width: 50px; height: 1px; background: var(--line); }
.detail-gallery { margin-top: 100px; }
.detail-gallery .section-heading h2 { font-size: 36px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gallery-item { position: relative; padding: 0; border: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.gallery-item:nth-child(3n) { grid-column: span 2; aspect-ratio: 16 / 8; }
.gallery-item { aspect-ratio: 4 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(0,0,0,.62)); color: #fff; font-size: 11px; text-align: left; }
.detail-bottom-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 90px; padding-top: 26px; border-top: 1px solid var(--line); }

/* Overlays */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(8, 10, 7, .62); backdrop-filter: blur(12px); animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.dialog { width: min(520px, 100%); max-height: calc(100svh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); background: var(--surface); box-shadow: var(--shadow); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 17px; font-weight: 620; letter-spacing: -.02em; }
.dialog-body { padding: 26px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--line); }
.auth-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 50%; background: var(--surface-2); color: var(--accent); }
.auth-dialog h2 { margin: 0 0 10px; font-family: var(--font-serif); font-size: 32px; font-weight: 500; }
.auth-dialog p { margin: 0 0 24px; color: var(--muted); font-size: 12px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .1em; }
.field input, .field textarea, .field select, .search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  padding: 11px 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus, .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.field small { color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.danger-button { min-height: 42px; border: 1px solid #d85c5c; border-radius: 999px; background: transparent; color: #d85c5c; padding: 9px 16px; font-size: 11px; }
.danger-button:hover { background: #d85c5c; color: #fff; }
.ghost-button { min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: transparent; padding: 9px 16px; font-size: 11px; }
.ghost-button:hover { background: var(--surface-2); }
.primary-button[disabled] { opacity: .55; cursor: wait; transform: none; }

.search-dialog { width: min(920px, 100%); height: min(760px, calc(100svh - 48px)); display: flex; flex-direction: column; }
.search-top { padding: 26px 30px 20px; border-bottom: 1px solid var(--line); }
.search-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.search-heading h2 { margin: 0; font-family: var(--font-serif); font-size: 32px; font-weight: 500; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .search-input { padding: 14px 48px 14px 46px; font-size: 14px; }
.search-box kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font: 10px var(--font-sans); }
.search-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.search-filters select { min-width: 120px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); padding: 7px 28px 7px 12px; font-size: 11px; }
.filter-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); padding: 7px 12px; font-size: 11px; }
.filter-toggle.active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.filter-toggle .icon { width: 13px; height: 13px; }
.search-results { flex: 1; overflow: auto; padding: 12px 30px 28px; }
.search-result { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.search-result img { width: 92px; height: 68px; object-fit: cover; border-radius: 8px; }
.search-result h3 { margin: 0 0 5px; font-size: 14px; font-weight: 600; }
.search-result p { margin: 0; color: var(--muted); font-size: 11px; }
.search-result .icon { color: var(--muted); }
.search-empty { padding: 70px 10px; text-align: center; color: var(--muted); }

.composer-dialog { width: min(860px, 100%); }
.composer-form { padding: 26px 30px 30px; }
.upload-zone { position: relative; display: grid; place-items: center; min-height: 140px; margin-bottom: 20px; border: 1px dashed var(--line); border-radius: 14px; background: var(--bg); text-align: center; transition: border-color .2s, background .2s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .icon { color: var(--accent); }
.upload-zone strong { display: block; margin-top: 10px; font-size: 12px; font-weight: 600; }
.upload-zone small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.upload-previews { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 22px; }
.upload-preview { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 9px; background: var(--surface-2); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview button { position: absolute; right: 5px; top: 5px; width: 23px; height: 23px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.64); color: #fff; }
.upload-preview button .icon { width: 13px; height: 13px; }
.composer-note { margin: 0 0 20px; padding: 12px 14px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 10px; }

.lightbox { position: fixed; inset: 0; z-index: 130; display: grid; grid-template-rows: auto 1fr auto; background: rgba(7, 8, 6, .97); color: #f5f5ef; animation: fade-in .2s ease; }
.lightbox-header, .lightbox-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 28px; }
.lightbox-header span, .lightbox-footer span { color: rgba(255,255,255,.6); font-size: 10px; letter-spacing: .12em; }
.lightbox-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 0 80px; }
.lightbox-stage img { max-width: 100%; max-height: calc(100svh - 190px); object-fit: contain; box-shadow: 0 20px 70px rgba(0,0,0,.4); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.05); color: #fff; }
.lightbox-nav:hover { background: rgba(255,255,255,.15); }
.lightbox-nav.prev { left: 22px; }
.lightbox-nav.next { right: 22px; }
.lightbox-footer { justify-content: center; min-height: 66px; }
.lightbox-footer p { margin: 0; color: rgba(255,255,255,.75); font-family: var(--font-serif); font-size: 13px; text-align: center; }
.lightbox .icon-button { color: #fff; border-color: rgba(255,255,255,.25); }

.memory { position: fixed; inset: 0; z-index: 140; overflow: hidden; background: #0b0d09; color: #fff; animation: fade-in .35s ease; }
.memory-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(.85); }
.memory::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,7,4,.9), transparent 65%), linear-gradient(90deg, rgba(5,7,4,.35), transparent); }
.memory-content { position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: 34px clamp(24px, 6vw, 90px) 42px; }
.memory-top { display: flex; justify-content: space-between; align-items: center; }
.memory-top span { font-size: 10px; letter-spacing: .2em; color: rgba(255,255,255,.66); }
.memory-copy { max-width: 800px; margin-bottom: 7vh; }
.memory-copy .entry-meta { color: rgba(255,255,255,.65); }
.memory-copy h1 { margin: 18px 0; font-family: var(--font-serif); font-size: clamp(54px, 8vw, 116px); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
.memory-copy p { max-width: 580px; margin: 0; color: rgba(255,255,255,.74); font-family: var(--font-serif); font-size: 16px; line-height: 1.9; }
.memory-controls { display: flex; align-items: center; gap: 14px; }
.memory-controls .icon-button { color: #fff; border-color: rgba(255,255,255,.28); }
.memory-progress { display: flex; flex: 1; gap: 5px; margin-left: 16px; }
.memory-progress i { flex: 1; height: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.memory-progress i.active { background: #d7ff72; }
.memory-controls .counter { min-width: 46px; color: rgba(255,255,255,.65); font-size: 10px; letter-spacing: .12em; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.auth-tabs button { border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 9px; font-size: 11px; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.account-links { display: flex; flex-wrap: wrap; gap: 10px; }
.account-links .primary-button, .account-links .secondary-button { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.account-role { display: inline-flex; margin-top: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); font-size: 10px; }
.detail-author { margin: 18px 0 0; color: var(--muted); font-size: 11px; }
.detail-author .visibility-label { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); color: var(--accent); }

/* Footer and switcher */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { width: min(1220px, calc(100% - 80px)); margin: 0 auto; padding: 42px 0; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.footer-brand { display: grid; gap: 4px; }
.footer-brand strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.footer-brand span, .footer-meta { color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.footer-meta { display: flex; align-items: center; gap: 16px; }
.footer-meta a { text-decoration: none; border-bottom: 1px solid var(--line); }
.theme-switch { position: fixed; z-index: 60; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 12px 40px rgba(0,0,0,.13); backdrop-filter: blur(18px); }
.theme-switch-label { padding: 0 9px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.theme-switch button { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); padding: 8px 12px; font-size: 10px; transition: background .2s, color .2s; }
.theme-switch button b { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 8px; }
.theme-switch button.active { background: var(--text); color: var(--bg); }
body[data-theme="moments"] .theme-switch { bottom: 18px; }
body[data-theme="moments"] .site-footer { padding-bottom: 80px; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 86px; transform: translate(-50%, 12px); max-width: calc(100% - 40px); padding: 11px 18px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: #f4f1e9; color: #25251f; }

@media (max-width: 1050px) {
  .header-inner { width: calc(100% - 40px); grid-template-columns: auto 1fr auto; gap: 16px; }
  .main-nav { justify-content: center; }
  .nav-button { padding: 8px 10px; }
  .section, .daybook-hero, .detail-page, .footer-inner { width: calc(100% - 56px); }
  .chronicle-hero .hero-content { width: calc(100% - 64px); }
  .daybook-hero { grid-template-columns: 100px minmax(0, 1fr); }
  .polaroid-stack { display: none; }
  .timeline-entry { gap: 42px; }
  .journal-entry { grid-template-columns: 72px minmax(200px, .8fr) minmax(250px, 1fr); gap: 28px; }
  .moments-hero-inner { grid-template-columns: 1fr 1fr; padding: 54px 42px; }
  .moments-collage { height: 410px; }
  .masonry { columns: 2; }
  .map-layout { grid-template-columns: 1fr; }
  .location-list { grid-template-columns: repeat(2, 1fr); gap: 0 28px; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 68px; grid-template-columns: auto 1fr auto; }
  .brand-copy small { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .main-nav { position: fixed; z-index: 70; left: 16px; right: 16px; bottom: 82px; display: none; grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
  .main-nav.open { display: grid; }
  .nav-button { padding: 10px 4px; font-size: 11px; }
  .mobile-menu-button { display: inline-grid; }
  .header-actions { gap: 6px; }
  .header-actions .icon-button { width: 36px; height: 36px; }
  .write-button { width: 36px; height: 36px; min-height: 36px; padding: 0; justify-content: center; }
  .write-button span { display: none; }
  .section, .section.wide, .daybook-hero, .detail-page, .footer-inner { width: calc(100% - 36px); }
  .section { padding: 70px 0; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading p { margin-top: 16px; }
  .stats-inner { width: calc(100% - 36px); grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 22px 16px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat:nth-child(3) { padding-left: 0; }
  .stat strong { font-size: 30px; }
  .chronicle-hero, .chronicle-hero .hero-content { min-height: calc(100svh - 68px); }
  .chronicle-hero .hero-content { width: calc(100% - 36px); padding: 56px 0 34px; }
  .chronicle-title { font-size: clamp(58px, 18vw, 92px); margin-top: 50px; }
  .hero-description { max-width: 310px; font-size: 12px; }
  .hero-bottom { align-items: flex-end; }
  .scroll-cue { display: none; }
  .hero-actions { gap: 9px; }
  .primary-button, .secondary-button { min-height: 44px; padding: 10px 17px; font-size: 11px; }
  .timeline-entry, .timeline-entry:nth-child(even) { grid-template-columns: 1fr; gap: 26px; padding: 38px 0; }
  .timeline-entry:nth-child(even) .timeline-image { order: 0; }
  .timeline-copy h3 { font-size: 36px; }
  .year-block + .year-block { margin-top: 70px; }
  .year-label { margin-bottom: 20px; }
  .footprint-teaser { padding: 30px 24px; }
  .footprint-grid { grid-template-columns: 1fr; gap: 24px; }
  .route-stop { min-width: 52px; font-size: 8px; }
  .daybook-hero { grid-template-columns: 1fr; padding: 50px 0 64px; gap: 24px; }
  .date-stamp { display: none; }
  .daybook-title { font-size: clamp(50px, 14vw, 74px); }
  .journal-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .journal-entry { grid-template-columns: 54px 1fr; gap: 18px; padding: 34px 0; }
  .journal-photo { grid-column: 2; grid-row: 1; padding: 7px 7px 28px; }
  .journal-date { grid-column: 1; grid-row: 1; }
  .journal-date strong { font-size: 34px; }
  .journal-copy { grid-column: 2; }
  .journal-copy h3 { font-size: 30px; }
  .journal-quote { width: calc(100% - 36px); margin: 80px auto; padding: 56px 12px; }
  .moments-hero { width: calc(100% - 24px); min-height: auto; margin-top: 12px; border-radius: 24px; }
  .moments-hero-inner { min-height: auto; grid-template-columns: 1fr; padding: 42px 24px 30px; }
  .moments-title { font-size: clamp(48px, 14vw, 70px); }
  .moments-collage { height: 340px; margin-top: 12px; }
  .collage-card { border-width: 5px; border-radius: 16px; }
  .collage-badge { width: 78px; height: 78px; font-size: 8px; }
  .moments-search { margin-top: 24px; }
  .masonry { columns: 1; }
  .moment-card { margin-bottom: 16px; }
  .album-grid { grid-template-columns: 1fr; }
  .album-card { min-height: 330px; }
  .map-canvas { min-height: 430px; }
  .location-list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .about-profile { position: static; }
  .about-avatar { width: 110px; height: 110px; }
  .about-profile h1 { font-size: 44px; }
  .feature-list { grid-template-columns: 1fr; }
  .detail-topbar { align-items: flex-start; }
  .detail-actions { flex-wrap: wrap; justify-content: flex-end; }
  .detail-hero { grid-template-columns: 1fr; gap: 34px; }
  .detail-cover { aspect-ratio: 4 / 3; max-height: 520px; }
  .detail-copy h1 { font-size: 50px; }
  .detail-body { margin-top: 60px; }
  .detail-body .paragraphs p { font-size: 16px; }
  .detail-gallery { margin-top: 70px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:nth-child(3n) { grid-column: auto; aspect-ratio: 4 / 3; }
  .detail-bottom-nav { flex-direction: column; }
  .overlay { padding: 12px; }
  .dialog { max-height: calc(100svh - 24px); }
  .dialog-header { padding: 18px 20px; }
  .dialog-body, .composer-form { padding: 20px; }
  .dialog-footer { padding: 16px 20px; }
  .search-dialog { height: calc(100svh - 24px); }
  .search-top { padding: 20px; }
  .search-results { padding: 8px 20px 20px; }
  .search-result { grid-template-columns: 72px 1fr auto; gap: 12px; }
  .search-result img { width: 72px; height: 58px; }
  .search-filters select { min-width: calc(50% - 8px); flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .upload-previews { grid-template-columns: repeat(3, 1fr); }
  .lightbox-header, .lightbox-footer { padding: 14px 16px; }
  .lightbox-stage { padding: 0 16px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .memory-content { padding: 22px 20px 28px; }
  .memory-copy h1 { font-size: 52px; }
  .memory-copy p { font-size: 13px; }
  .memory-progress { margin-left: 4px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 18px; }
  .footer-meta { flex-wrap: wrap; }
  .theme-switch { bottom: 16px; }
  .theme-switch-label { display: none; }
  .theme-switch button { padding: 7px 10px; }
  .toast { bottom: 76px; }
}

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