/* ============================================================
   我们的小岛 · 样式
   简洁 · 留白 · 暖调 · 微动效
   ============================================================ */

:root {
  --bg: #f7f2ea;
  --bg-tint-1: #f3e8dd;
  --bg-tint-2: #e9efe6;
  --surface: #fffdfa;
  --surface-2: #fbf6ee;
  --ink: #2b2723;
  --ink-2: #6b6157;
  --ink-3: #9d9287;
  --line: #e8dfd3;
  --line-strong: #d9cdbd;
  --accent: #b4856b;
  --accent-soft: #f0e0d4;
  --sage: #8b9a7d;
  --sage-soft: #e3e9dc;
  --gold: #c6a15b;
  --danger: #b45f52;
  --shadow-sm: 0 1px 2px rgba(43, 39, 35, 0.05);
  --shadow: 0 2px 4px rgba(43, 39, 35, 0.04), 0 14px 34px rgba(43, 39, 35, 0.07);
  --shadow-lg: 0 8px 24px rgba(43, 39, 35, 0.1), 0 30px 70px rgba(43, 39, 35, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #131216;
  --bg-tint-1: #1a161c;
  --bg-tint-2: #14191a;
  --surface: #1c1b21;
  --surface-2: #232128;
  --ink: #ece6de;
  --ink-2: #a89e93;
  --ink-3: #746c63;
  --line: #2c2a32;
  --line-strong: #3a3742;
  --accent: #d3a48c;
  --accent-soft: #33262a;
  --sage: #9fae93;
  --sage-soft: #232b25;
  --gold: #d8b877;
  --danger: #d28275;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.55), 0 40px 80px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: -2;
  background:
    radial-gradient(46rem 32rem at 12% -8%, var(--bg-tint-1) 0%, transparent 62%),
    radial-gradient(40rem 30rem at 92% 4%, var(--bg-tint-2) 0%, transparent 58%),
    radial-gradient(38rem 30rem at 60% 108%, var(--bg-tint-1) 0%, transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent-soft); color: var(--ink); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; font-family: var(--serif); letter-spacing: 0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* ───────── 通用控件 ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn[disabled] { opacity: 0.5; cursor: default; }

.btn-primary {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #000; }
[data-theme="dark"] .btn-primary { background: var(--accent); color: #1a1714; }
[data-theme="dark"] .btn-primary:hover { background: #e0b39b; }

.btn-ghost { border-color: var(--line-strong); color: var(--ink-2); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }

.btn-soft { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.btn-soft:hover { color: var(--ink); border-color: var(--line-strong); }

.btn-danger { color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: rgba(180, 95, 82, 0.08); border-color: var(--danger); }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-3); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[type="color"] {
  width: 84px;
  height: 44px;
  padding: 3px;
  border-radius: 12px;
  cursor: pointer;
  background: var(--surface);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── 登录 ───────── */

.gate {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  gap: 22px;
}

.gate-card {
  width: 100%;
  max-width: 392px;
  padding: 40px 32px 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.gate-mark { color: var(--accent); display: flex; justify-content: center; margin-bottom: 14px; }
.gate-title { font-size: 27px; letter-spacing: 0.08em; margin-bottom: 6px; }
.gate-sub { color: var(--ink-3); font-size: 13.5px; letter-spacing: 0.08em; margin-bottom: 22px; }

.gate-roster { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.roster-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 20px 10px;
  min-width: 92px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.roster-pick:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.roster-pick.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.roster-pick .rp-emoji { font-size: 22px; line-height: 1; }
.roster-pick .rp-name { font-size: 12.5px; color: var(--ink-2); letter-spacing: 0.06em; }

.gate-form { text-align: left; }
.gate-error {
  color: var(--danger);
  font-size: 13px;
  margin: -4px 0 12px;
  text-align: center;
}
.gate-hint { margin-top: 16px; font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.08em; }
.gate-foot { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.1em; opacity: 0.8; }

/* ───────── 顶栏 ───────── */

.shell { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right));
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, var(--bg) 55%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--line); background: var(--bg); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent) 0%, var(--accent) 42%, transparent 44%),
              linear-gradient(140deg, var(--sage), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.brand-text { font-family: var(--serif); font-size: 16.5px; letter-spacing: 0.14em; }

.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: 0.05em;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.is-active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 6px 14px; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.me-chip {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.me-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ───────── 主视图 ───────── */

.view {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 24px 96px;
  outline: none;
}

.reveal { animation: rise 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.reveal-d1 { animation-delay: 0.06s; }
.reveal-d2 { animation-delay: 0.12s; }
.reveal-d3 { animation-delay: 0.18s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 16px;
}
.section-head h2 { font-size: 19px; letter-spacing: 0.1em; }
.section-head .more { font-size: 13px; color: var(--ink-3); letter-spacing: 0.08em; }
.section-head .more:hover { color: var(--accent); }

/* ───────── 首页 ───────── */

.hero {
  position: relative;
  padding: 54px 8px 44px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 42px;
  height: 1px;
  background: var(--line-strong);
  transform: translateX(-50%);
}
.hero-kicker {
  font-size: 11.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(30px, 5.2vw, 46px);
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.hero-sub {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: 0.16em;
}

.hero-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-sm);
}
.stat {
  background: var(--surface);
  padding: 18px 16px 16px;
  text-align: center;
}
.stat .num { font-family: var(--serif); font-size: 24px; letter-spacing: 0.02em; }
.stat .lbl { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.16em; margin-top: 4px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.tile-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }

.quick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.quick .q-ico {
  width: 42px; height: 42px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); flex-shrink: 0;
}
.quick .q-ico.sage { background: var(--sage-soft); color: var(--sage); }
.quick h3 { font-size: 15.5px; letter-spacing: 0.06em; margin-bottom: 2px; }
.quick p { font-size: 12.5px; color: var(--ink-3); }

.next-trip {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px 26px;
  flex-wrap: wrap;
}
.next-trip .nt-count {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.next-trip .nt-unit { font-size: 12px; color: var(--ink-3); letter-spacing: 0.16em; margin-left: 4px; }
.next-trip h3 { font-size: 18px; margin-bottom: 4px; letter-spacing: 0.06em; }
.next-trip .nt-meta { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.06em; }

.photo-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.photo-strip figure {
  margin: 0;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.photo-strip figure:hover { transform: translateY(-3px) scale(1.015); box-shadow: var(--shadow); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
}
.empty strong { display: block; font-family: var(--serif); font-size: 16px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }

/* ───────── 动态 ───────── */

.composer { padding: 20px 22px; margin-bottom: 22px; }
.composer .c-top { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.avatar.lg { width: 46px; height: 46px; font-size: 21px; }
.avatar.sm { width: 30px; height: 30px; font-size: 14px; }

.composer textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.75;
  resize: none;
  outline: none;
  min-height: 62px;
  padding: 8px 0 0;
  font-family: var(--sans);
}
.composer textarea::placeholder { color: var(--ink-3); }

.composer .c-moods { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.composer .c-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.composer .c-foot .spacer { flex: 1; }

.attach-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.attach-strip .att {
  position: relative;
  width: 74px; height: 74px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.attach-strip img { width: 100%; height: 100%; object-fit: cover; }
.attach-strip .att button {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 11px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.post { padding: 20px 22px; margin-bottom: 16px; }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.post-head .who { font-size: 14px; letter-spacing: 0.04em; }
.post-head .when { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.05em; }
.post-head .dot { color: var(--line-strong); margin: 0 6px; }
.post-mood { font-size: 12.5px; color: var(--accent); letter-spacing: 0.06em; }
.post-body { font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.post-photos {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
}
.post-photos.n1 { grid-template-columns: 1fr; max-width: 460px; }
.post-photos.n2 { grid-template-columns: 1fr 1fr; }
.post-photos.n3 { grid-template-columns: 1fr 1fr 1fr; }
.post-photos.n4 { grid-template-columns: 1fr 1fr; }
.post-photos.n5, .post-photos.n6, .post-photos.n7, .post-photos.n8, .post-photos.n9 { grid-template-columns: repeat(3, 1fr); }
.post-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  cursor: zoom-in;
  background: var(--surface-2);
  transition: opacity 0.2s ease;
}
.post-photos.n1 img { aspect-ratio: auto; max-height: 520px; object-fit: cover; }
.post-photos img:hover { opacity: 0.94; }

.post-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.post-foot .spacer { flex: 1; }
.like-btn, .cmt-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.like-btn:hover, .cmt-btn:hover { background: var(--surface-2); color: var(--ink-2); }
.like-btn.is-on { color: var(--accent); }
.like-btn.is-on svg { fill: currentColor; }

.comments { margin-top: 12px; display: none; }
.comments.is-open { display: block; }
.comments .cmt {
  display: flex; gap: 9px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  animation: rise 0.3s ease both;
}
.comments .cmt .who { color: var(--ink-2); margin-right: 6px; }
.comments .cmt .t { flex: 1; word-break: break-word; }
.comments .cmt .del {
  border: none; background: transparent; color: var(--ink-3);
  cursor: pointer; font-size: 12px; opacity: 0; transition: opacity 0.15s;
}
.comments .cmt:hover .del { opacity: 1; }
.cmt-form { display: flex; gap: 8px; margin-top: 10px; }
.cmt-form input {
  flex: 1;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
}
.cmt-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ───────── 相册 ───────── */

.album-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dropzone {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.masonry { columns: 3; column-gap: 12px; }
.masonry figure {
  margin: 0 0 12px;
  break-inside: avoid;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  position: relative;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.masonry figure:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.masonry .ph-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 16, 14, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.masonry figure:hover .ph-del { opacity: 1; transform: none; }
.masonry .ph-del:hover { background: rgba(180, 95, 82, 0.92); }
@media (hover: none) {
  .masonry .ph-del { opacity: 0.85; transform: none; }
}
.masonry img { width: 100%; display: block; }
.masonry figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 12px 10px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masonry figure:hover figcaption { opacity: 1; }

/* ───────── 行程 ───────── */

.trip-list { display: grid; gap: 14px; }
.trip-card {
  display: flex;
  gap: 18px;
  padding: 20px 22px;
  align-items: flex-start;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.trip-bar { width: 4px; align-self: stretch; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.trip-card h3 { font-size: 17.5px; letter-spacing: 0.05em; margin-bottom: 5px; }
.trip-meta { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.06em; display: flex; gap: 12px; flex-wrap: wrap; }
.trip-card .grow { flex: 1; min-width: 0; }
.trip-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  margin-top: 12px;
  overflow: hidden;
}
.trip-progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s ease; }

.trip-head { padding: 26px 28px; margin-bottom: 20px; }
.trip-head h1 { font-size: 26px; letter-spacing: 0.06em; margin-bottom: 8px; }
.trip-head .th-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; letter-spacing: 0.06em; }
.trip-head .th-note { margin-top: 14px; color: var(--ink-2); font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.trip-head .th-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.day-group { margin-bottom: 22px; }
.day-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.day-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-label b { font-weight: 500; color: var(--ink-2); font-size: 13px; letter-spacing: 0.1em; }

.stop {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
  align-items: flex-start;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.stop:hover { border-color: var(--line-strong); }
.stop.is-done { opacity: 0.55; }
.stop.is-done .stop-title { text-decoration: line-through; }
.stop .check {
  width: 20px; height: 20px; flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all 0.18s ease;
}
.stop .check:hover { border-color: var(--accent); }
.stop.is-done .check { background: var(--sage); border-color: var(--sage); color: #fff; }
.stop .stop-time {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-3);
  min-width: 44px;
  padding-top: 2px;
  letter-spacing: 0.04em;
}
.stop .stop-main { flex: 1; min-width: 0; }
.stop .stop-title { font-size: 14.5px; letter-spacing: 0.03em; }
.stop .stop-note { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; white-space: pre-wrap; }
.stop .stop-del {
  border: none; background: transparent; color: var(--ink-3);
  cursor: pointer; opacity: 0; transition: opacity 0.15s; font-size: 13px;
}
.stop:hover .stop-del { opacity: 1; }

.add-stop { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.add-stop input {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
}
.add-stop input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.add-stop .w-time { width: 84px; }
.add-stop .w-title { flex: 1; min-width: 150px; }

/* ───────── 我的 ───────── */

.panel { padding: 24px 26px; margin-bottom: 16px; }
.panel h2 { font-size: 16px; letter-spacing: 0.1em; margin-bottom: 4px; }
.panel .panel-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 18px; letter-spacing: 0.04em; }

.profile-row { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-row .p-name { font-family: var(--serif); font-size: 21px; letter-spacing: 0.06em; }
.profile-row .p-sub { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.08em; }

.emoji-picker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.emoji-picker button {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.16s ease;
}
.emoji-picker button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.emoji-picker button.is-on { border-color: var(--accent); background: var(--accent-soft); }

.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-3); letter-spacing: 0.06em; }
.kv .v { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ───────── 灯箱 ───────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 14, 13, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  backdrop-filter: blur(8px);
  animation: fade 0.22s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-figure img {
  max-width: 100%;
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: zoom 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes zoom { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lb-cap { color: rgba(255, 255, 255, 0.82); font-size: 13px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.lb-del {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.lb-del:hover { background: rgba(180, 95, 82, 0.55); border-color: rgba(255, 255, 255, 0.4); }
.lb-meta { color: rgba(255, 255, 255, 0.42); font-size: 12px; }
.lb-close, .lb-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s ease, transform 0.18s ease;
}
.lb-close { top: 20px; right: 22px; width: 40px; height: 40px; font-size: 15px; }
.lb-nav { top: 50%; width: 46px; height: 46px; font-size: 24px; transform: translateY(-50%); line-height: 1; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.16); }

/* ───────── 弹窗 / 提示 ───────── */

.modal-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 15, 0.42);
  backdrop-filter: blur(3px);
  pointer-events: auto;
  animation: fade 0.2s ease both;
}
.modal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 64px);
  overflow: auto;
  padding: 26px 26px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: pop 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal h3 { font-size: 18px; letter-spacing: 0.08em; margin-bottom: 16px; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(8px);
  z-index: 120;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(30, 26, 23, 0.94);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ───────── 底栏（移动端） ───────── */

.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(150%);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0 4px;
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  border-radius: 12px;
  transition: color 0.18s ease;
}
.tabbar a.is-active { color: var(--accent); }

/* ───────── 响应式 ───────── */

@media (max-width: 860px) {
  .masonry { columns: 2; }
  .photo-strip { grid-template-columns: repeat(4, 1fr); }
  .nav { margin-left: 6px; }
  .nav a { padding: 7px 11px; font-size: 13.5px; }
}

@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .topbar { padding: 11px 16px; gap: 10px; }
  .nav { display: none; }
  .brand-text { font-size: 15px; }
  .view { padding: 8px 16px 110px; }
  .tabbar { display: flex; }
  .hero { padding: 36px 4px 34px; }
  .hero::after { bottom: 16px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .tile-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .post, .composer, .panel { padding: 18px 16px; }
  .trip-head { padding: 20px 18px; }
  .trip-head h1 { font-size: 22px; }
  .lb-nav { width: 38px; height: 38px; font-size: 20px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .masonry { column-gap: 8px; }
  .masonry figure { margin-bottom: 8px; }
  .gate-card { padding: 30px 22px 24px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ───────── 倒计时卡片（首页） ───────── */
.countdown-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}
.count-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.count-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.count-card .cc-ico { font-size: 22px; line-height: 1; }
.count-card .cc-main { min-width: 0; }
.count-card .cc-title {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.count-card .cc-days {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.count-card .cc-days span { font-size: 12px; color: var(--ink-3); margin-left: 4px; letter-spacing: 0.1em; }

@media (max-width: 680px) {
  .countdown-row { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
}

/* ───────── 相册月份筛选 ───────── */
.album-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.album-chips .chip { font-variant-numeric: tabular-nums; }

/* ───────── 操作记录 ───────── */
.audit-list {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.audit-row {
  display: grid;
  grid-template-columns: 76px 84px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.audit-row:last-child { border-bottom: none; }
.audit-row.is-bad .audit-act { color: var(--danger); }
.audit-time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.audit-who { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-act { color: var(--ink); }
.audit-detail { color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.audit-empty { color: var(--ink-3); font-size: 13px; }

@media (max-width: 680px) {
  .audit-row { grid-template-columns: 70px 1fr; }
  .audit-who { display: none; }
}

/* ───────── 纪念日 / 节日页 ───────── */
.dates-head {
  padding: 28px 30px;
  margin-bottom: 18px;
  background:
    radial-gradient(28rem 14rem at 12% 0%, var(--accent-soft) 0%, transparent 65%),
    var(--surface);
}
.dh-kicker { font-size: 11.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.dh-title { font-size: clamp(24px, 3.6vw, 32px); letter-spacing: 0.04em; }
.dh-title em { font-style: normal; color: var(--accent); font-variant-numeric: tabular-nums; padding: 0 3px; }
.dh-sub { margin-top: 10px; color: var(--ink-2); font-size: 13px; letter-spacing: 0.04em; }

.date-list { display: grid; gap: 10px; margin-bottom: 22px; }
.date-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.date-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.date-row.is-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dr-ico { font-size: 22px; line-height: 1; flex-shrink: 0; }
.dr-main { flex: 1; min-width: 0; }
.dr-title { font-size: 15px; letter-spacing: 0.03em; }
.dr-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.03em; }
.dr-days { font-family: var(--serif); font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-unit { font-size: 12px; color: var(--ink-3); margin-left: 3px; letter-spacing: 0.08em; }
.dr-today { font-size: 14px; color: var(--accent); letter-spacing: 0.1em; }
.dr-del {
  border: none; background: transparent; color: var(--ink-3);
  cursor: pointer; font-size: 13px; opacity: 0; transition: opacity 0.15s ease;
  padding: 4px 6px;
}
.date-row:hover .dr-del { opacity: 1; }
@media (hover: none) { .dr-del { opacity: 0.7; } }

.event-form { display: block; }
.event-form .field-row { margin-top: 0; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.lunar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lunar-row select {
  padding: 11px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  outline: none;
}
.lunar-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lunar-row .chip { user-select: none; }
.lunar-row .chip input { margin-right: 5px; }

@media (max-width: 680px) {
  .dates-head { padding: 22px 18px; }
  .date-row { padding: 14px 14px; gap: 10px; }
  .dr-days { font-size: 17px; }
  .tabbar a { font-size: 10px; }
}

/* 农历生日行：别被 .field select{width:100%} 撑成一列 */
.lunar-row select {
  width: auto;
  flex: 1 1 72px;
  min-width: 82px;
}
.lunar-row .chip { white-space: nowrap; flex: 0 0 auto; }

/* ───────── 头像（照片 / 表情） ───────── */
.avatar.has-img {
  padding: 0;
  overflow: hidden;
  background: var(--surface-2);
}
.avatar.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar.xl { width: 92px; height: 92px; font-size: 42px; }
.avatar.lg { width: 56px; height: 56px; font-size: 25px; }
.me-chip.has-img { padding: 0; overflow: hidden; }
.me-chip img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.profile-row .avatar.has-img { box-shadow: 0 0 0 3px var(--accent-soft); }

@media (max-width: 680px) {
  .avatar.xl { width: 76px; height: 76px; font-size: 34px; }
}
.me-chip .avatar { width: 34px; height: 34px; border: none; background: transparent; }
.me-chip .avatar.has-img { width: 34px; height: 34px; }
