/* ===================================================================
   我们的日记 · 视觉系统
   复古丝网印 × 编辑排版：有限色板 / 纸张质感 / 唯一焦点 / 主动留白
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* —— 纸 —— */
  --paper: #F3EDE3;
  --sheet: #FBF8F1;
  --rule: #DCCFBB;
  --rule-soft: #E8DFCE;

  /* —— 墨 —— */
  --ink: #221D19;
  --ink-2: #5B524A;
  --ink-3: #6E655A;

  /* —— 套印色（整个界面只保留三种印色）—— */
  --red: #B8412C;
  --red-deep: #9A3320;
  --gold: #BE8F38;

  /* 标题 / 大数字：优先思源宋体（在线），依次回退系统里最好的中文衬线 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", "Times New Roman", serif;
  /* 正文 / 界面文字：各平台最优中文无衬线 */
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r: 3px;
  --pad: 24px;
  --maxw: 880px;

  /* —— 排版系统（设置里可切换，见文件末尾 body.type-1/2/3）—— */
  --ff-couple: var(--serif);
  --fs-couple: clamp(19px, 4.4vw, 26px);
  --ls-couple: 1.4px;
  --ff-days: var(--serif);
  --fs-days: clamp(60px, 15vw, 96px);
  --fw-days: 500;
  --ls-days: -2px;
  --ff-title: var(--serif);
  --fs-title: 21px;
  --ls-title: .4px;
  --fs-body: 14.5px;
  --lh-body: 1.85;
  --ls-body: .2px;
  --head-align: left;
  --head-justify: flex-start;
  --text-max: 34em;
}

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 纸面：两层极淡的色晕，避免死板平涂 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 900px 420px at 10% -8%, rgba(190, 143, 56, .11), transparent 62%),
    radial-gradient(ellipse 820px 400px at 104% 6%, rgba(184, 65, 44, .06), transparent 58%);
}

/* 纸面：印刷颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}

.app {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: 48px;
}

/* ===================== 顶部 ===================== */
.hero {
  position: relative;
  padding: 30px var(--pad) 34px;
  border-bottom: 2px solid var(--ink);
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.hero-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.kicker-sep { color: var(--red); margin: 0 5px; }

/* 云端同步状态点 */
.sync-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--rule);
  vertical-align: middle;
}
.sync-dot.on { background: var(--ink-3); }
.sync-dot.busy { background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }
.sync-dot.err { background: var(--red); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.couple {
  display: flex;
  align-items: baseline;
  justify-content: var(--head-justify);
  gap: 11px;
  margin: 0 0 30px;
  font-family: var(--ff-couple);
  font-size: var(--fs-couple);
  font-weight: 500;
  letter-spacing: var(--ls-couple);
  line-height: 1.25;
  color: var(--ink);
}
.couple .heart {
  font-size: 13px;
  color: var(--red);
  transform: translateY(-3px);
}

.hero-days { margin-bottom: 22px; }
.days-label {
  margin-bottom: 5px;
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--ink-3);
  text-align: var(--head-align);
}
.days-num {
  display: flex;
  align-items: baseline;
  justify-content: var(--head-justify);
  gap: 9px;
  font-family: var(--ff-days);
  font-size: var(--fs-days);
  font-weight: var(--fw-days);
  line-height: .95;
  letter-spacing: var(--ls-days);
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.days-num small {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--ink-3);
}

.hero-meta {
  position: relative;
  padding-top: 18px;
  font-size: 13px;
  letter-spacing: .4px;
  color: var(--ink-2);
  text-align: var(--head-align);
}
.hero-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 2px;
  background: var(--ink);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--red); border-color: var(--red); }
.icon-btn svg { display: block; }

/* ===================== 导航 ===================== */
.tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 28px;
  padding: 0 var(--pad);
  background: rgba(243, 237, 227, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: 0 0 auto;
  padding: 15px 0 13px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 1px;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s;
}
.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  transition: background .2s;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); font-weight: 600; }
.tab.active::after { background: var(--red); }

/* ===================== 面板 ===================== */
.main { padding: 30px var(--pad) 0; }
.panel { display: none; }
.panel.active { display: block; animation: rise .3s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===================== 时间轴 ===================== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.search-input { flex: 1 1 200px; }
.toolbar select { flex: 0 0 auto; width: auto; min-width: 106px; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 10px;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--rule) 0 5px, transparent 5px 10px);
}

.date-label {
  position: relative;
  margin: 26px 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--ink-3);
  text-align: var(--head-align);
}
.date-label:first-child { margin-top: 0; }
.date-label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: 9px;
  background: var(--red);
  vertical-align: middle;
  transform: translateY(-1px);
}

/* 套准标记式的方块节点，不用圆点 */
.entry { position: relative; margin-bottom: 10px; }
.entry::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 22px;
  width: 9px;
  height: 9px;
  background: var(--red);
}
.entry.is-b::before { background: var(--ink); }

.entry-card {
  padding: 16px 18px 14px;
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  transition: border-color .2s;
}
.entry-card:hover { border-color: var(--rule); }

.entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
/* 描边标签，比实心胶囊更克制 */
.author-tag {
  padding: 2px 9px;
  border: 1px solid var(--red);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--red);
}
.entry.is-b .author-tag { border-color: var(--ink); color: var(--ink); }
.mood-tag { font-size: 12px; letter-spacing: .3px; color: var(--ink-2); }
.entry-time {
  margin-left: auto;
  font-size: 11.5px;
  letter-spacing: .5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.entry-title {
  margin: 0 0 7px;
  font-family: var(--ff-title);
  font-size: var(--fs-title);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: var(--ls-title);
  color: var(--ink);
}
.entry-body {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  max-width: var(--text-max);
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.entry-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.entry-imgs img {
  display: block;
  width: 106px;
  height: 106px;
  object-fit: cover;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  cursor: zoom-in;
  transition: opacity .2s;
}
.entry-imgs img:hover { opacity: .86; }

.entry-foot {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
}
.link-btn {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .8px;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .18s;
}
.link-btn:hover { color: var(--red); }
.link-btn.danger:hover { color: var(--red-deep); }

/* ===================== 表单 ===================== */
.form {
  padding: 22px 22px 24px;
  margin-bottom: 14px;
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
}
.form-title {
  margin: 0 0 20px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: var(--ink);
}
.editing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding: 9px 13px;
  background: #FAF4E6;
  border: 1px solid #DFCDA6;
  border-left: 3px solid var(--gold);
  border-radius: 2px;
  font-size: 12.5px;
  color: #8A6C2E;
}
/* hidden 属性会被 display:flex 覆盖，必须显式还原 */
.editing-bar[hidden] { display: none; }

.field { margin-bottom: 17px; }
.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink-3);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type="text"], input[type="date"], input[type="password"], input:not([type]), textarea, select {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  outline: none;
  transition: border-color .18s;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); }
input::placeholder, textarea::placeholder { color: #B3A899; }
textarea { min-height: 170px; resize: vertical; line-height: 1.85; }
select {
  cursor: pointer;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236E655A' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 15px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .4px;
  color: var(--ink-2);
  cursor: pointer;
  transition: .18s;
}
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
}

.uploader { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.upload-btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px dashed var(--rule);
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: .5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: .18s;
}
.upload-btn:hover { border-style: solid; border-color: var(--red); color: var(--red); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  background: var(--paper);
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 19px;
  height: 19px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: rgba(34, 29, 25, .72);
  color: #fff;
  font-size: 12px;
  line-height: 19px;
  cursor: pointer;
}
.thumb button:hover { background: var(--red-deep); }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.hint { font-size: 12px; letter-spacing: .5px; color: var(--red); }

/* ===================== 按钮 ===================== */
.btn-primary {
  padding: 12px 28px;
  border: none;
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 1.8px;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--red-deep); }
.btn-block { width: 100%; }

.btn-ghost {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .8px;
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition: .18s;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-danger {
  padding: 11px 20px;
  border: 1px solid #D6BBB2;
  border-radius: 2px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .8px;
  color: #A5452F;
  cursor: pointer;
  transition: .18s;
}
.btn-danger:hover { background: #F7E9E4; border-color: #C1948A; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===================== 空状态 ===================== */
.empty { padding: 60px 20px; text-align: center; color: var(--ink-3); }
.empty-ico { margin-bottom: 12px; font-size: 30px; opacity: .4; }
.empty p { margin: 0 0 20px; font-size: 13.5px; letter-spacing: .5px; }

/* ===================== 纪念日 ===================== */
.anniv-hero {
  padding: 24px 24px 26px;
  margin-bottom: 16px;
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--red);
  border-radius: var(--r);
}
.anniv-hero .big-line { font-size: 13.5px; letter-spacing: .5px; color: var(--ink-2); }
.anniv-hero .big-line b {
  padding: 0 6px;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.anniv-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  font-size: 13.5px;
  color: var(--ink-2);
}
.anniv-count .target {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.anniv-count .date { font-size: 11.5px; letter-spacing: .6px; color: var(--ink-3); }
.anniv-count.today { color: #8A6C2E; }
.anniv-count.today .target { color: var(--gold); }

.anniv-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 9px;
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
}
.anniv-item .a-name { font-size: 14.5px; font-weight: 600; letter-spacing: .3px; color: var(--ink); }
.anniv-item .a-date { margin-top: 3px; font-size: 11.5px; letter-spacing: .6px; color: var(--ink-3); }
.anniv-item .a-right { margin-left: auto; text-align: right; }
.anniv-item .a-days {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: -.5px;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.anniv-item .a-days small {
  margin-left: 3px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0;
  color: var(--ink-3);
}
.anniv-item .a-days.today { color: var(--gold); }
.anniv-item .a-days.past {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink-3);
}
.anniv-item .a-del {
  padding: 4px 2px;
  border: none;
  background: none;
  font-size: 14px;
  color: #B9AC9B;
  cursor: pointer;
  transition: color .18s;
}
.anniv-item .a-del:hover { color: var(--red); }

/* ===================== 设置 / 统计 ===================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}
.stat {
  padding: 13px 15px;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 11.5px; letter-spacing: .6px; color: var(--ink-3); }
.tip { margin: 16px 0 0; font-size: 12px; line-height: 1.8; color: var(--ink-3); }

/* ===================== 查看记录 ===================== */
.visit-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.vs-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
}
.vs-name { flex: 1 1 100%; font-size: 12px; letter-spacing: .8px; color: var(--ink-3); }
.vs-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.vs-num small { font-size: 11px; color: var(--ink-3); letter-spacing: .5px; }
.vs-last { margin-left: auto; font-size: 11.5px; color: var(--ink-3); text-align: right; }

.visit-list { margin-top: 2px; border-top: 1px solid var(--rule-soft); }
.visit-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12px;
}
.visit-who { color: var(--ink); letter-spacing: .6px; }
.visit-time { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.visit-empty { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }

.ver-line {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
  font-size: 11.5px;
  letter-spacing: 1.3px;
  color: var(--ink-3);
}
.ver-line span { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ===================== 引导 ===================== */
.onboard {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--paper);
}
.onboard[hidden] { display: none; }
.onboard-card {
  width: 100%;
  max-width: 378px;
  padding: 34px 28px 26px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  border-radius: var(--r);
  box-shadow: 0 10px 40px rgba(34, 29, 25, .10);
  animation: rise .4s ease both;
}
.onboard-heart { margin-bottom: 14px; font-size: 16px; line-height: 1; color: var(--red); }
.onboard-card h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--ink);
}
.onboard-sub { margin: 0 0 24px; font-size: 12.5px; line-height: 1.7; letter-spacing: .4px; color: var(--ink-3); }
.onboard-tip { margin: 18px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--ink-3); }

/* ===================== 密码门 ===================== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--paper);
}
.gate[hidden] { display: none; }
.gate-card {
  width: 100%;
  max-width: 378px;
  padding: 34px 28px 26px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  border-radius: var(--r);
  box-shadow: 0 10px 40px rgba(34, 29, 25, .10);
  animation: rise .4s ease both;
}
.gate-card.shake { animation: shake .38s ease both; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  38% { transform: translateX(6px); }
  58% { transform: translateX(-4px); }
  78% { transform: translateX(2px); }
}
.gate-mark {
  margin-bottom: 14px;
  font-size: 18px;
  line-height: 1;
  color: var(--red);
}
.gate-title {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--ink);
}
.gate-kicker {
  margin-bottom: 26px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--ink-3);
}
.gate-err {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12.5px;
  letter-spacing: .5px;
  color: var(--red);
}
.gate-tip {
  margin: 12px 0 0;
  font-size: 11.5px;
  letter-spacing: .6px;
  color: var(--ink-3);
}

/* ===================== 浮层 ===================== */
/* 自定义确认框（内嵌页面里系统 confirm 会被屏蔽） */
.modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(34, 29, 25, .42);
  animation: fadeIn .18s ease both;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 336px;
  padding: 26px 24px 20px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  border-radius: var(--r);
  box-shadow: 0 14px 44px rgba(34, 29, 25, .24);
  animation: rise .22s ease both;
}
.modal-msg {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 400;
  max-width: 82vw;
  padding: 11px 22px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: .8px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: .28s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(28, 23, 20, .9);
  cursor: zoom-out;
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 2px; }

/* ===================== 页脚 ===================== */
.foot {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  font-size: 11px;
  letter-spacing: 2.2px;
  text-align: center;
  color: var(--ink-3);
}

/* ===================== 响应式 ===================== */
@media (max-width: 560px) {
  :root { --pad: 18px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .hero { padding-top: 24px; padding-bottom: 28px; }
  .couple { gap: 9px; letter-spacing: 1px; }
  .days-num { letter-spacing: -1px; }
  .tabs { gap: 22px; }
  .main { padding-top: 24px; }
  .form { padding: 18px 16px 20px; }
  .search-input { flex: 1 1 100%; }
  .toolbar select { flex: 1 1 calc(50% - 5px); }
  .entry-time { width: 100%; margin-left: 0; }
  .entry-imgs img { width: 86px; height: 86px; }
  .anniv-hero { padding: 20px 18px 22px; }
}

/* ===================== 评论 ===================== */
.cmt { margin-top: 14px; border-top: 1px solid var(--rule-soft); padding-top: 11px; }
.cmt-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; letter-spacing: .6px; color: var(--ink-3);
}
.cmt-toggle:hover { color: var(--ink); }
.cmt-toggle b { font-weight: 500; color: var(--red); }
.cmt-body { margin-top: 11px; }
.cmt-body[hidden] { display: none; }
.cmt-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 11px; }
.cmt-item { font-size: 13px; line-height: 1.75; }
.cmt-meta { font-size: 11px; letter-spacing: .6px; color: var(--ink-3); margin-right: 7px; }
.cmt-meta b { font-weight: 500; color: var(--ink-2); }
.cmt-text { color: var(--ink-2); word-break: break-word; }
.cmt-del {
  background: none; border: none; padding: 0 0 0 8px; cursor: pointer;
  font-family: inherit; font-size: 11px; color: var(--ink-3);
}
.cmt-del:hover { color: var(--red); }
.cmt-form { display: flex; gap: 8px; }
.cmt-input {
  flex: 1; min-width: 0; padding: 7px 10px;
  border: 1px solid var(--rule); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 13px;
}
.cmt-input:focus { outline: none; border-color: var(--red); }
.cmt-send {
  padding: 7px 14px; border: none; border-radius: 2px;
  background: var(--red); color: #FFF;
  font-family: inherit; font-size: 12.5px; letter-spacing: .6px; cursor: pointer;
}
.cmt-send:hover { background: var(--red-deep); }
body.theme-c .cmt-send { color: #14161A; }
.cmt-empty { font-size: 12px; color: var(--ink-3); }

/* ===================== 配色主题 ===================== */
body.theme-b {
  --paper: #F2F4F1;
  --sheet: #FFFFFF;
  --rule: #DFE4DE;
  --rule-soft: #E6EBE5;
  --ink: #20262A;
  --ink-2: #565E63;
  --ink-3: #98A0A6;
  --red: #5C7A6B;
  --red-deep: #48614F;
  --gold: #7E9A88;
}
body.theme-b::before {
  background-image:
    radial-gradient(ellipse 900px 420px at 10% -8%, rgba(92,122,107,.10), transparent 62%),
    radial-gradient(ellipse 820px 400px at 104% 6%, rgba(92,122,107,.05), transparent 58%);
}
body.theme-c {
  --paper: #14161A;
  --sheet: #1B1E23;
  --rule: #262A31;
  --rule-soft: #2A2E34;
  --ink: #EDEAE4;
  --ink-2: #B9B4AC;
  --ink-3: #7E848B;
  --red: #C9A227;
  --red-deep: #A8861D;
  --gold: #C9A227;
}
body.theme-c::before {
  background-image:
    radial-gradient(ellipse 900px 420px at 10% -8%, rgba(201,162,39,.10), transparent 62%),
    radial-gradient(ellipse 820px 400px at 104% 6%, rgba(201,162,39,.05), transparent 58%);
}
body.theme-c::after { opacity: .035; }

/* ===================== 排版系统 ===================== */
body.type-2 {
  --ff-couple: var(--sans);
  --fs-couple: clamp(20px, 4.6vw, 27px);
  --ls-couple: .4px;
  --ff-days: var(--sans);
  --fw-days: 300;
  --ls-days: -3px;
  --ff-title: var(--sans);
  --ls-title: 0;
  --lh-body: 1.9;
  --ls-body: .1px;
}
body.type-3 {
  --ls-couple: 2.5px;
  --fs-days: clamp(52px, 13vw, 78px);
  --fw-days: 400;
  --ls-days: 1px;
  --fs-title: 22px;
  --ls-title: 1px;
  --lh-body: 2.15;
  --ls-body: .6px;
  --head-align: center;
  --head-justify: center;
  --text-max: 30em;
}

/* ===================== 外观选择：色点预览 ===================== */
.theme-pills .pill { display: inline-flex; align-items: center; gap: 6px; }
.pill[data-theme]::before {
  content: ""; display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; border: 1px solid var(--rule);
}
.pill[data-theme="a"]::before { background: #F3EDE3; }
.pill[data-theme="b"]::before { background: #F2F4F1; }
.pill[data-theme="c"]::before { background: #14161A; }
