:root {
  --ink: #1b2836;
  --ink-2: #4d6375;
  --ink-3: #5b7185; /* v0.9 提深：sand 底 4.6:1 / paper 底 5.1:1，满足 WCAG AA 小字 */
  --line: #dbe6ee;
  --sea: #1c7da6;
  --sea-deep: #11537a;
  --sea-soft: #dceef7;
  --sky: #ecf5fa;
  --mint: #4a9d7f;
  --sand: #f7f4ee;
  --paper: #ffffff;
  --gold: #ad7d1e;
  --gold-soft: #f9f1dc;
  --rose: #b34f4c;
  --rose-soft: #faecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,40,60,.06), 0 10px 26px rgba(15,40,60,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink);
  background:
    radial-gradient(1200px 320px at 85% -80px, #e4f1f8 0%, transparent 60%),
    var(--sand);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

/* ================= header ================= */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(249, 247, 242, .86);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  transition: background .2s, box-shadow .2s;
}
/* v0.10：滚动后加深，给内容让出层次（JS 加 .is-stuck） */
.site-head.is-stuck {
  background: rgba(249, 247, 242, .96);
  box-shadow: 0 1px 0 rgba(15,40,60,.02), 0 10px 24px rgba(15,40,60,.07);
}
/* 阅读进度：页头底部 2px，JS 注入 .read-bar > i（SPEC §6 v0.10） */
.read-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.read-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--sea), var(--mint)); transition: width .1s linear; }
@media (prefers-reduced-motion: reduce) { .read-bar i { transition: none; } }

.head-inner { max-width: 1040px; margin: 0 auto; padding: 8px 18px 0; }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.brand { display: flex; align-items: baseline; gap: 9px; font-weight: 800; font-size: 16.5px; color: var(--ink); letter-spacing: .3px; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 500; font-size: 11.5px; color: var(--ink-3); letter-spacing: .5px; }
.ver-chip { margin-left: auto; font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.site-foot .ver-chip { margin-left: 8px; padding: 1px 7px; }

/* 行程切换按钮 */
.trip-switch { display: flex; gap: 4px; margin-left: 12px; flex: 0 0 auto; }
.trip-switch .sw-back { font-size: 12px; color: var(--ink-3); padding: 5px 6px 5px 0; white-space: nowrap; }
.trip-switch .sw-back:hover { text-decoration: none; color: var(--sea-deep); }
.trip-switch a, .trip-switch span {
  font-size: 12px; line-height: 1; padding: 6px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.trip-switch span.on { background: var(--sea); border-color: var(--sea); color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(28,125,166,.22); }
.trip-switch a:hover { text-decoration: none; border-color: var(--sea); color: var(--sea-deep); }
@media (max-width: 560px) {
  .trip-switch a, .trip-switch span { padding: 5px 9px; font-size: 11.5px; }
  /* 移动端页头换行排布：标题独占一行防中文逐字竖排（坑：trip-switch 不收缩 + ver-chip nowrap 挤压 brand） */
  .head-row { flex-wrap: wrap; row-gap: 7px; }
  .brand { flex: 1 0 100%; white-space: nowrap; font-size: 15px; }
  .brand small { font-size: 11px; }
  .trip-switch { margin-left: 0; flex: 1 1 auto; flex-wrap: wrap; row-gap: 6px; }
}

/* 分组导航（SPEC §6 三级层次：组名 / 普通页 / 日程胶囊） */
.nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 4px 0 7px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-group { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.nav-lab {
  font-size: 10.5px; font-weight: 700; color: var(--ink-3); letter-spacing: 2.4px;
  white-space: nowrap; padding-right: 9px; margin-right: 4px; border-right: 1px solid var(--line);
}
.nav-sep { width: 1px; height: 14px; background: var(--line); flex: 0 0 auto; opacity: .6; margin: 0 3px; }
.nav-item {
  position: relative; flex: 0 0 auto; padding: 7px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(28,125,166,.07); text-decoration: none; color: var(--sea-deep); }
.nav-item.on { color: var(--sea-deep); font-weight: 700; background: transparent; box-shadow: none; }
.nav-item.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px;
  border-radius: 2px; background: var(--sea);
}
.nav-days { display: flex; gap: 4px; flex: 0 0 auto; padding-left: 2px; }
.nav-pill {
  flex: 0 0 auto; min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line); white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.nav-pill:hover { border-color: var(--sea); color: var(--sea-deep); text-decoration: none; background: var(--sky); }
.nav-pill.on { background: var(--sea); border-color: var(--sea); color: #fff; box-shadow: 0 2px 8px rgba(28,125,166,.22); }
@media (max-width: 760px) {
  .nav {
    flex-wrap: nowrap; padding-right: 26px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  }
  .nav-sep { display: none; }
  .nav-lab { letter-spacing: 1.6px; padding-right: 7px; }
  .nav-item { padding: 8px 11px; }
  .nav-pill { padding: 7px 11px; min-width: 36px; }
}

/* ================= hero ================= */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #dceef7 0%, #f3ece0 100%); }
.hero-inner { max-width: 1040px; margin: 0 auto; padding: 34px 18px 0; position: relative; z-index: 2; }
.hero h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.35; letter-spacing: 1px; }
.hero .sub { margin: 0; color: var(--ink-2); font-size: 15px; }
.hero .scenery { display: block; width: 100%; height: auto; margin-top: 16px; }
@media (min-width: 760px) { .hero h1 { font-size: 38px; } .hero-inner { padding-top: 46px; } }

/* ================= page title ================= */
/* v0.9：内页统一头部——上行期次胶囊（可选）+ 主标题 + 元信息，底部 hairline 收口 */
.page-title { max-width: 1040px; margin: 0 auto; padding: 28px 18px 18px; border-bottom: 1px solid var(--line); }
.page-title h1 {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  margin: 0 0 8px; font-size: clamp(22px, 2.5vw, 27px); line-height: 1.4; letter-spacing: .3px;
}
.page-title .pt-no {
  flex: 0 0 auto; font-family: "Songti SC", "Noto Serif SC", STSong, serif;
  font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--sea-deep);
  background: var(--sea-soft); border: 1px solid #c5e0ee; border-radius: 999px; padding: 2px 10px;
}
.page-title h1 .tag { font-size: 11px; }
.page-title p { margin: 0; color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }

/* weather chip */
.wx {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 12px; font-size: 13.5px; color: var(--ink-2);
}
.wx .ico { font-size: 15px; }
.wx.rain { border-color: #eccfcf; background: var(--rose-soft); }

/* ================= kpi ================= */
.kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin: 22px 0; }
@media (min-width: 760px) { .kpi { grid-template-columns: repeat(4, 1fr); } }
.kpi > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 13px; box-shadow: var(--shadow); }
.kpi dt { margin: 0 0 2px; font-size: 11px; color: var(--ink-3); letter-spacing: 1.5px; }
.kpi dd { margin: 0; font-size: 22px; font-weight: 800; color: var(--sea-deep); font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.kpi dd span { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.kpi dd.warn { color: var(--rose); }
.kpi dd.good { color: var(--mint); }

/* ================= sections ================= */
section { margin: 30px 0; }
/* v0.9：短条 + 基线对齐，取代通高 4px 粗竖条 */
h2.sec {
  position: relative; margin: 0 0 16px; padding-left: 14px;
  font-size: 18.5px; line-height: 1.45; letter-spacing: .5px;
}
h2.sec::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 3px; height: .82em; border-radius: 2px;
  background: linear-gradient(180deg, var(--sea) 0%, rgba(28,125,166,.18) 100%);
}
h2.sec small { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 8px; }
h3 { font-size: 16px; margin: 18px 0 8px; }

/* ================= cards ================= */
.cards { display: grid; gap: 13px; }
@media (min-width: 660px) { .cards.cols-2 { grid-template-columns: 1fr 1fr; } .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px 15px; box-shadow: var(--shadow); color: inherit;
}
a.card { transition: transform .16s, border-color .16s, box-shadow .16s; }
a.card:hover { text-decoration: none; border-color: var(--sea); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,40,60,.06), 0 14px 32px rgba(15,40,60,.12); }
.card .day { font-size: 11.5px; color: var(--gold); font-weight: 800; letter-spacing: 2px; }
.card h3 { margin: 3px 0 6px; font-size: 17.5px; letter-spacing: .3px; }
.card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.card .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #eef3f7; }

.tag {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--sky); color: var(--sea-deep); border: 1px solid #cadfef;
}
.tag.gold { background: var(--gold-soft); color: #86620f; border-color: #ecdcb2; }
.tag.rose { background: var(--rose-soft); color: #8f3a38; border-color: #eecbcb; }
.tag.green { background: #e8f4ee; color: #33684f; border-color: #cbe4d6; }
.tag.dim { background: #f1f4f7; color: var(--ink-2); border-color: var(--line); }

/* ================= tables ================= */
.table-scroll { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
caption { text-align: left; padding: 12px 16px 0; font-weight: 700; color: var(--ink-2); }
th, td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--sky); color: var(--sea-deep); font-weight: 700; white-space: nowrap; border-bottom: 2px solid #cadfef; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fcfaf6; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f5fafd; }
tbody tr.total:hover, tbody tr.subhead:hover { background: #eff6fa; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { background: #eff6fa; font-weight: 800; color: var(--sea-deep); border-top: 2px solid #cadfef; }
tr.subhead td { background: var(--gold-soft); font-weight: 700; color: #86620f; }
td.sub, td.cat { font-weight: 700; color: var(--sea-deep); }

/* ================= timeline (day pages) ================= */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px 14px 18px; margin-bottom: 11px;
  box-shadow: var(--shadow); border-left: 4px solid var(--sea);
  transition: opacity .25s;
}
.tl-item.free { border-left-color: var(--mint); }
.tl-item.move { border-left-color: var(--gold); }
/* v0.13：勾选完成保持正常视觉，仅用金额旁的「已发生」标签示意 */
.tl-head { display: flex; align-items: flex-start; gap: 11px; }
.tl-check { margin: 4px 0 0; width: 20px; height: 20px; accent-color: var(--mint); flex: 0 0 auto; cursor: pointer; }
.tl-head h3 { margin: 0; font-size: 16px; flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.tl-time { font-weight: 800; color: var(--sea-deep); font-variant-numeric: tabular-nums; font-size: 15px; cursor: pointer; border-bottom: 1px dashed transparent; }
.tl-time:hover { border-bottom-color: var(--ink-3); }
.tl-time-input {
  font: inherit; font-size: 15px; font-weight: 800; color: var(--sea-deep);
  width: 118px; padding: 0 5px; border: 1px solid var(--sea); border-radius: 7px;
  background: #fff; font-variant-numeric: tabular-nums;
}
.tl-time-input:focus { outline: none; box-shadow: 0 0 0 3px var(--sea-soft); }
.tl-cost { margin-left: auto; font-size: 13px; color: var(--gold); font-weight: 800; white-space: nowrap; }
/* v0.12：类别徽章（.tl-head 内，金额右侧；与账本分类同源） */
.tl-cat {
  flex: 0 0 auto; align-self: center; margin-left: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--sea-deep);
  background: var(--sea-soft); border: 1px solid #c5e0ee; border-radius: 999px;
  padding: 1px 9px; white-space: nowrap; line-height: 1.6;
}
/* v0.13：状态胶囊——勾选=已发生（绿）、没经历=未发生（玫瑰）、默认不显示 */
.tl-state {
  flex: 0 0 auto; align-self: center; display: none;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  border-radius: 999px; padding: 1px 9px; white-space: nowrap; line-height: 1.6;
}
.tl-state.is-done { display: inline-block; color: #2f6b4d; background: #e6f3ec; border: 1px solid #bfe0cc; }
.tl-state.is-missed { display: inline-block; color: #8f3a38; background: var(--rose-soft); border: 1px solid #eecbcb; }
@media (max-width: 560px) { .tl-cat, .tl-state { font-size: 10px; padding: 1px 7px; } }
.tl-body { margin-left: 31px; }
.tl-item p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); }
.tl-tip { margin: 9px 0 0; padding: 8px 11px; background: var(--sky); border-radius: 8px; font-size: 13.5px; color: var(--sea-deep); }
.tl-tip::before { content: "贴士 "; font-weight: 800; color: var(--sea); }

/* 逐项费用编辑（SPEC §8：预计可改、实际可填，勾选即入账） */
.tl-money {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 9px 0 0 31px; padding: 7px 11px;
  background: #f8fbfd; border: 1px solid #e6eff5; border-radius: 10px;
  font-size: 12.5px; color: var(--ink-3);
}
.tl-money label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tl-money input.money {
  width: 82px; padding: 3px 7px; text-align: right; font-size: 13.5px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.tl-money input.money:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }
.tl-money input.money[data-act] { background: #fffaf0; }

/* ================= v0.7 行程三态 / 自定义卡（SPEC §8 / §9） ================= */
/* 没经历：降透明 + 标题划线，与 done 视觉区分（灰、不再入账） */
.tl-item.missed { opacity: .55; border-left-color: var(--ink-3); }
.tl-item.missed .tl-head h3 { color: var(--ink-3); }
.tl-item.missed .tl-head h3 span.tl-time { text-decoration: line-through; }
.tl-item.missed .tl-check { opacity: .45; }

/* 卡内操作区：没经历 / 修改 / 删除 */
.tl-ops { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 0 31px; }
.tl-skip, .tl-del, .tl-edit {
  font-size: 12px; line-height: 1; padding: 5px 12px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  transition: all .15s;
}
.tl-skip:hover { border-color: var(--rose); color: var(--rose); background: var(--rose-soft); }
.tl-skip.on { background: var(--rose-soft); border-color: #eecbcb; color: #8f3a38; font-weight: 700; }
.tl-del { color: var(--ink-3); }
.tl-del:hover { border-color: var(--rose); color: var(--rose); background: var(--rose-soft); }
.tl-edit:hover { border-color: var(--sea); color: var(--sea-deep); background: var(--sky); }

/* v0.13：编辑自定义卡的提示条（读回表单时出现） */
.tl-add-editing {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 0 0 11px; padding: 7px 11px;
  background: var(--gold-soft); border: 1px solid #eddcb8; border-radius: 9px;
  font-size: 12.5px; color: #7a5b12;
}
.tl-add-editing strong { color: #6b4f0e; }

/* 新增行程卡表单 */
.tl-add {
  background: linear-gradient(180deg, #fcfdff 0%, #f6fafc 100%);
  border: 1px dashed #c3d7e5; border-radius: var(--radius);
  padding: 15px 17px; margin: 4px 0 18px; box-shadow: none;
}
.tl-add h4 { margin: 0 0 10px; font-size: 14.5px; color: var(--sea-deep); letter-spacing: .5px; }
.tl-add-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 660px) { .tl-add-grid { grid-template-columns: 108px 1fr 128px 108px auto; align-items: end; } }
/* v0.12：详情 / 贴士跨整行 */
.tl-add-grid .full { grid-column: 1 / -1; }
.tl-add-grid .full input { width: 100%; }
.tl-add-grid label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.tl-add-grid input, .tl-add-grid select {
  width: 100%; padding: 7px 9px; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; background: #fdfcf9;
}
.tl-add-grid input:focus, .tl-add-grid select:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }
.tl-add-grid .btn { justify-self: start; }
.tl-add small { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-3); }

/* ================= v0.8 门面（根 index.html，SPEC §2.1 / §9） ================= */
.cover-page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 460px at 10% -150px, #e2f0f8 0%, transparent 62%),
    radial-gradient(820px 420px at 98% 2%, #f8eed8 0%, transparent 58%),
    var(--sand);
}

.cover-bar {
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; gap: 26px;
  border-bottom: 1px solid var(--line);
}
.cover-mark { font-size: 15px; font-weight: 800; letter-spacing: 3px; color: var(--ink); }
.cover-mark:hover { text-decoration: none; }
.cover-nav { display: flex; gap: 24px; margin-left: auto; }
.cover-nav a { font-size: 13px; letter-spacing: 1px; color: var(--ink-2); }
.cover-nav a:hover { color: var(--sea-deep); text-decoration: none; }
.cover-year {
  padding-left: 22px; border-left: 1px solid var(--line);
  font-size: 11px; letter-spacing: 2px; color: var(--ink-3);
}

/* 扉页：左文右叠卡 */
.cover-hero {
  max-width: 1120px; margin: 0 auto; padding: 76px 24px 62px;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 64px; align-items: center;
}
.cover-eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 24px;
  font-size: 11px; font-weight: 700; letter-spacing: 4px; color: var(--ink-3);
}
.cover-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--sea); }
.cover-title {
  margin: 0; font-weight: 700; letter-spacing: .01em;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif;
  font-size: clamp(36px, 5vw, 60px); line-height: 1.24;
}
.cover-title em { font-style: normal; color: var(--sea-deep); }
.cover-title em::after {
  content: ""; display: block; width: 64px; height: 3px; margin-top: 16px;
  border-radius: 2px; background: linear-gradient(90deg, var(--sea), rgba(28,125,166,0));
}
.cover-sub { margin: 22px 0 0; max-width: 30em; font-size: 15.5px; line-height: 1.9; color: var(--ink-2);}
.cover-meta {
  display: flex; gap: 0; margin: 38px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.cover-meta > div { flex: 1; }
.cover-meta dt { font-size: 11px; letter-spacing: 2px; color: var(--ink-3); }
.cover-meta dd {
  margin: 6px 0 0; color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", STSong, serif;
  font-size: 26px; font-variant-numeric: tabular-nums;
}

/* 三层错位叠卡：纯装饰 */
.cover-stack { position: relative; height: 350px; }
.stack-card {
  position: absolute; left: 6%; right: 6%; height: 200px; border-radius: 18px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 24px;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.stack-card.s3 {
  top: 0; transform: rotate(-4deg) scale(.92);
  background: linear-gradient(150deg, #fbf4e4, #f6ecd6);
  border: 1px solid rgba(173,125,30,.14); box-shadow: 0 14px 30px rgba(15,40,60,.06);
}
.stack-card.s2 {
  top: 30px; transform: rotate(2.4deg) scale(.96);
  background: linear-gradient(150deg, #f0f6f9, #e6eff4);
  border: 1px solid rgba(28,125,166,.12); box-shadow: 0 16px 34px rgba(15,40,60,.07);
}
.stack-card.s3 span, .stack-card.s2 span { font-size: 12px; letter-spacing: 3px; color: var(--ink-3); }
.stack-card.s1 {
  top: 70px; left: 3%; right: 3%; height: 220px; transform: rotate(-1deg);
  background: linear-gradient(155deg, #ffffff 0%, #f5fafd 100%);
  border: 1px solid #d9e8f1;
  box-shadow: 0 2px 4px rgba(15,40,60,.05), 0 26px 54px rgba(17,83,122,.16);
}
.cover-stack:hover .stack-card.s3 { transform: rotate(-6deg) scale(.92) translateY(-6px); }
.cover-stack:hover .stack-card.s2 { transform: rotate(4deg) scale(.96) translateY(-3px); }
.cover-stack:hover .stack-card.s1 { transform: rotate(-1deg) translateY(-8px); }
.stack-ridge { position: absolute; top: 18px; right: 20px; width: 150px; height: auto; opacity: .9; }
.stack-tag {
  align-self: flex-start; margin-bottom: 10px;
  font-size: 11px; letter-spacing: 1.5px; color: var(--sea-deep);
  background: var(--sea-soft); border: 1px solid #c5e0ee; border-radius: 999px; padding: 3px 10px;
}
.stack-name {
  font-family: "Songti SC", "Noto Serif SC", STSong, serif;
  font-size: 26px; font-weight: 700; letter-spacing: 2px; color: var(--ink);
}
.stack-line { margin-top: 6px; font-size: 12.5px; letter-spacing: 1px; color: var(--ink-3); }

/* 栏目索引 */
.cover-index { max-width: 1120px; margin: 0 auto; padding: 0 24px 64px; }
.cover-index-h {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px;
  font-size: 13px; font-weight: 700; letter-spacing: 3px; color: var(--ink-2);
}
.cover-index-h small { font-size: 11px; font-weight: 500; letter-spacing: 2px; color: var(--ink-3); text-transform: uppercase; }
.idx { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.idx-row { border-bottom: 1px solid var(--line); }
.idx-link {
  display: grid; grid-template-columns: 56px 1fr 84px; align-items: center; gap: 18px;
  padding: 22px 8px; color: inherit;
  transition: background .2s, padding-left .2s;
}
a.idx-link:hover {
  text-decoration: none; padding-left: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.3));
}
.idx-no {
  font-family: "Songti SC", "Noto Serif SC", STSong, serif;
  font-size: 13px; letter-spacing: 2px; color: var(--ink-3);
}
.idx-title { display: flex; align-items: center; gap: 10px; }
.idx-name { display: block; font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.idx-desc { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.idx-state {
  font-size: 11px; letter-spacing: 1.5px; padding: 3px 10px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); white-space: nowrap;
}
.is-live .idx-state { color: var(--sea-deep); background: var(--sea-soft); border-color: #c5e0ee; }
.idx-go {
  justify-self: end; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--sea);
  transition: transform .2s;
}
a.idx-link:hover .idx-go { transform: translateX(5px); }
.is-soon .idx-link { opacity: .58; cursor: default; }

.cover-foot {
  max-width: 1120px; margin: 0 auto; padding: 20px 24px 30px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: 12px; letter-spacing: .5px; color: var(--ink-3);
}

@keyframes coverRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cover-lead { animation: coverRise .65s cubic-bezier(.2,.7,.3,1) both; }
.cover-stack { animation: coverRise .85s .08s cubic-bezier(.2,.7,.3,1) both; }
.idx-row { animation: coverRise .55s cubic-bezier(.2,.7,.3,1) both; }
.idx-row:nth-child(1) { animation-delay: .16s; }
.idx-row:nth-child(2) { animation-delay: .24s; }
.idx-row:nth-child(3) { animation-delay: .32s; }

@media (max-width: 900px) {
  .cover-hero { grid-template-columns: 1fr; gap: 46px; padding: 52px 22px 44px; }
  .cover-stack { height: 300px; max-width: 420px; width: 100%; }
  .cover-meta dd { font-size: 22px; }
}
@media (max-width: 620px) {
  .cover-bar { padding: 14px 18px; gap: 14px; }
  .cover-nav { gap: 14px; }
  .cover-nav a { font-size: 12px; }
  .cover-year { display: none; }
  .cover-sub br { display: none; }
  .cover-index { padding: 0 18px 48px; }
  .idx-link, .is-soon .idx-link { grid-template-columns: 26px 1fr; gap: 12px; padding: 16px 4px; }
  .idx-desc, .idx-go { display: none; }
  .idx-title { gap: 8px; }
  .idx-name { font-size: 18px; }
  .cover-foot { padding: 18px 18px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-lead, .cover-stack, .idx-row { animation: none; }
  .stack-card, .idx-link, .idx-go { transition: none; }
}

/* day progress bar */
.day-progress {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 15px; box-shadow: var(--shadow); font-size: 13.5px; color: var(--ink-2);
}
.day-progress .bar { flex: 1; height: 8px; border-radius: 999px; background: #e8eef3; overflow: hidden; min-width: 80px; }
.day-progress .bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--sea)); transition: width .35s; }
.day-progress b { color: var(--sea-deep); font-variant-numeric: tabular-nums; }

/* notes box */
.notes {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 15px; margin: 18px 0;
}
.notes label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.notes textarea {
  width: 100%; min-height: 74px; resize: vertical; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; font-size: 14px; line-height: 1.6; color: var(--ink);
  background: #fdfcf9;
}
.notes textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }
.notes .saved { font-size: 12px; color: var(--mint); margin-left: 8px; font-weight: 400; }

/* day summary strip */
.day-sum { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.day-sum > div {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 14px; font-size: 13.5px; box-shadow: var(--shadow);
}
.day-sum b { color: var(--sea-deep); font-variant-numeric: tabular-nums; }

/* ================= forms ================= */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 17px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .form-grid { grid-template-columns: repeat(3, 1fr); } .form-grid .wide { grid-column: span 2; } }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px;
  font-size: 14px; color: var(--ink); background: #fdfcf9;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }

.btn {
  display: inline-block; font: inherit; font-size: 13.5px; padding: 7px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-2); cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--sea); color: var(--sea-deep); text-decoration: none; }
.btn.primary { background: var(--sea); border-color: var(--sea); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--sea-deep); color: #fff; }
.btn.danger { border-color: #eecbcb; color: var(--rose); }
.btn.danger:hover { background: var(--rose-soft); }
.btn.mini { font-size: 12px; padding: 3px 10px; }

/* ================= analysis bars ================= */
.chart { display: grid; gap: 10px; }
.chart .c-row { display: grid; grid-template-columns: 120px 1fr 86px; gap: 10px; align-items: center; font-size: 13.5px; }
.chart .c-row .lab { color: var(--ink-2); white-space: nowrap; }
.chart .c-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--sea-deep); }
.chart .track { position: relative; height: 22px; background: #e9eff4; border-radius: 6px; overflow: hidden; }
.chart .track .plan { position: absolute; inset: 0; background: #d9e8f2; }
.chart .track .plan i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, #c6dcea 0 6px, transparent 6px 12px); }
.chart .track .act { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--sea), var(--mint)); border-radius: 6px; transition: width .4s; min-width: 0; }
.chart .legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.chart .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ring */
.ring { display: flex; align-items: center; gap: 14px; }
.ring svg { flex: 0 0 auto; }
.ring .r-lab b { display: block; font-size: 20px; color: var(--sea-deep); font-variant-numeric: tabular-nums; }
.ring .r-lab { font-size: 13px; color: var(--ink-2); }

/* 预算执行条 + 计划/实际色差（SPEC §9 v0.4 新增） */
.run-bar { display: grid; gap: 8px; }
.run-top, .run-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.run-top b, .run-foot b { color: var(--sea-deep); font-variant-numeric: tabular-nums; }
.run-bar .track { height: 12px; border-radius: 999px; background: #e9eff4; overflow: hidden; }
.run-bar .track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--sea), var(--mint)); transition: width .4s; }
.run-bar .track i.over { background: linear-gradient(90deg, var(--gold), var(--rose)); }
.num.good, .run-top .good, .run-foot .good { color: var(--mint); font-weight: 700; }
.num.warn, .run-top .warn, .run-foot .warn { color: var(--rose); font-weight: 700; }

/* 预算页每日卡片头 */
.bd-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.bd-h a { color: var(--sea-deep); font-weight: 600; }
.bd-h a:hover { text-decoration: none; color: var(--sea); }
.bd-h b { font-size: 15px; }
.bd-h > span { color: var(--sea-deep); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-h span small { color: var(--ink-3); font-weight: 400; font-size: 12px; }

/* ================= photos ================= */
.photo-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.photo-tabs::-webkit-scrollbar { display: none; }
.photo-tabs a { flex: 0 0 auto; padding: 5px 14px; border-radius: 999px; font-size: 13.5px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); }
.photo-tabs a.on { background: var(--sea); border-color: var(--sea); color: #fff; }
.photo-tabs a:hover { text-decoration: none; border-color: var(--sea); }

.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 660px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.photo-item img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-item .meta { padding: 7px 10px 9px; font-size: 12px; color: var(--ink-2); }
.photo-item .meta b { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 1px; }
.photo-item .del { position: absolute; top: 7px; right: 7px; }

.dropzone {
  display: block; /* 动态照片页把 .dropzone 用在 <label> 上：inline 盒子包 block 子元素会文字重叠，必须转块级 */
  border: 2px dashed #bcd3e2; border-radius: var(--radius); background: var(--paper);
  padding: 26px 18px; text-align: center; color: var(--ink-2); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--sea); background: var(--sky); }
.dropzone b { color: var(--sea-deep); }
.dropzone small { display: block; color: var(--ink-3); margin-top: 3px; }

.mode-banner { background: var(--gold-soft); border: 1px solid #ecdcb2; color: #86620f; border-radius: 10px; padding: 9px 13px; font-size: 13.5px; margin-bottom: 14px; }
.mode-banner.local { background: var(--sky); border-color: #cadfef; color: var(--sea-deep); }

/* ================= checklist ================= */
.ck { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 660px) { .ck { grid-template-columns: 1fr 1fr; } }
.ck li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.ck label { display: flex; gap: 11px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.ck input { margin: 4px 0 0; width: 17px; height: 17px; accent-color: var(--sea); flex: 0 0 auto; }
.ck .t { display: block; font-weight: 700; font-size: 14px; }
.ck .d { display: block; font-size: 13.5px; color: var(--ink-2); }
.ck input:checked ~ div .t { color: var(--ink-3); text-decoration: line-through; }
.ck-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.ck-bar .btn { margin-left: auto; }

/* editable number cells */
.cellnum { width: 84px; font-size: 14px; text-align: right; padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.cellnum:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }

/* ================= notes/alerts ================= */
.note {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 12px 15px; font-size: 14.5px; color: var(--ink-2);
  margin: 14px 0; box-shadow: var(--shadow);
}
.note strong { color: var(--ink); }
.note.warn { border-left-color: var(--rose); }
.note.good { border-left-color: var(--mint); }
.note ol, .note ul { margin: 8px 0 0; padding-left: 20px; }
.note li { margin: 5px 0; }

/* ================= 帮助提示（SPEC §6/§9 v0.11） ================= */
.help { position: relative; display: inline-flex; vertical-align: -2px; margin-left: 4px; }
.help-btn {
  width: 18px; height: 18px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-3);
  font-family: Georgia, "Times New Roman", serif; font-size: 11.5px; font-weight: 700; font-style: italic;
  line-height: 1; cursor: help;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
}
.help-btn:hover, .help.open .help-btn { border-color: var(--sea); color: var(--sea-deep); background: var(--sky); }
.help-pop {
  position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%);
  display: none; width: max-content; max-width: 280px; z-index: 70;
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); box-shadow: var(--shadow);
  font-size: 12.5px; line-height: 1.65; color: var(--ink-2); text-align: left; white-space: normal;
}
.help-pop::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--paper);
}
.help.open .help-pop { display: block; }
/* 悬停预览；Esc/点外部关闭后加 .dismissed 抑制，移出后恢复 */
@media (hover: hover) { .help:hover:not(.dismissed) .help-pop { display: block; } }
@media (max-width: 560px) { .help-pop { max-width: 78vw; } }

/* ================= 空状态（SPEC §9 v0.11） ================= */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 20px; text-align: center;
  background: var(--sky); border: 1px dashed #c5ddea; border-radius: var(--radius);
  color: var(--ink-2);
}
.empty-ico { font-size: 26px; line-height: 1.2; }
.empty strong { font-size: 14.5px; color: var(--ink); }
.empty p { margin: 0; max-width: 380px; font-size: 13px; }
.empty .btn { margin-top: 6px; }

/* 总览卡打卡进度（v0.11）；完成时转绿 */
.day-done.is-done { background: #e8f4ee; color: #33684f; border-color: #cbe4d6; }

/* ================= pager & footer ================= */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 8px; }
.pager a {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.pager a:hover { text-decoration: none; border-color: var(--sea); color: var(--sea-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
.pager .lbl { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 400; letter-spacing: 1.5px; color: var(--ink-3); }
.pager .next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

.site-foot { margin-top: 44px; border-top: 1px solid var(--line); background: #efe9df; padding: 18px 16px 28px; font-size: 13px; color: var(--ink-3); text-align: center; }
.site-foot a { color: var(--ink-2); }
.site-foot .foot-row { max-width: 1040px; margin: 0 auto; }
.site-foot .icp { margin-top: 6px; font-size: 12px; letter-spacing: .3px; }
.site-foot .icp a { color: var(--ink-3); }
.site-foot .icp a:hover { color: var(--sea-deep); }
.cover-foot .icp a, .auth-foot .icp a { color: inherit; }

/* ================= 集合层：分类页章节版式（SPEC §2.1） ================= */
.mast { max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }
.mast-top {
  display: flex; align-items: center; gap: 10px; padding: 20px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: 1.5px; color: var(--ink-3);
}
.mast-top a { color: var(--ink-2); }
.mast-top a:hover { color: var(--sea-deep); text-decoration: none; }
.mast-sep { color: #c3d3de; }
.mast-no {
  margin-left: auto;
  font-family: "Songti SC", "Noto Serif SC", STSong, serif;
  font-size: 11px; letter-spacing: 3px;
}
.mast-body {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: end;
  padding: 38px 0 30px;
}
.mast-title { margin: 0; font-size: clamp(24px, 3.1vw, 34px); line-height: 1.45; letter-spacing: .02em; }
.mast-sub { margin: 14px 0 0; max-width: 34em; font-size: 14.5px; color: var(--ink-2); }
.mast-facts { margin: 0; padding-left: 26px; border-left: 1px solid var(--line); display: grid; gap: 13px; }
.mast-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.mast-facts dt { font-size: 11px; letter-spacing: 2px; color: var(--ink-3); }
.mast-facts dd { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.mast-band { height: 74px; overflow: hidden; border-top: 1px solid var(--line); opacity: .6; }
.mast-band svg { display: block; width: 100%; height: 74px; }
.mast > section { margin-top: 34px; }
@media (max-width: 860px) {
  .mast { padding: 0 18px 40px; }
  .mast-body { grid-template-columns: 1fr; gap: 26px; padding: 30px 0 22px; }
  .mast-facts {
    padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line);
    grid-template-columns: repeat(3, 1fr); gap: 10px;
  }
  .mast-facts > div { display: block; }
  .mast-facts dd { margin-top: 4px; }
  .mast-band { height: 54px; }
  .mast-band svg { height: 54px; }
}

/* ================= v0.9 行程扉页（travel/<trip>/index.html，SPEC §2.1 第三级） ================= */
.trip-mast { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.tm-top {
  display: flex; align-items: center; gap: 9px; padding: 18px 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: 1.5px; color: var(--ink-3);
}
.tm-top a { color: var(--ink-2); }
.tm-top a:hover { color: var(--sea-deep); text-decoration: none; }
.tm-no {
  margin-left: auto;
  font-family: "Songti SC", "Noto Serif SC", STSong, serif;
  font-size: 11px; letter-spacing: 3px;
}
.tm-body { display: grid; grid-template-columns: 1.35fr .65fr; gap: 44px; align-items: end; padding: 30px 0 26px; }
.tm-eyebrow {
  display: flex; align-items: center; gap: 11px; margin: 0 0 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 3px; color: var(--ink-3);
}
.tm-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--sea); }
.tm-title {
  margin: 0; font-weight: 700; letter-spacing: .02em;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif;
  font-size: clamp(24px, 3.2vw, 36px); line-height: 1.4;
}
.tm-sub { margin: 12px 0 0; max-width: 32em; font-size: 14.5px; color: var(--ink-2); }
.tm-facts { margin: 0; padding-left: 24px; border-left: 1px solid var(--line); display: grid; gap: 11px; }
.tm-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.tm-facts dt { font-size: 11px; letter-spacing: 2px; color: var(--ink-3); }
.tm-facts dd { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); text-align: right; }
.tm-band { height: 66px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); opacity: .55; }
.tm-band svg { display: block; width: 100%; height: 66px; }
@media (max-width: 860px) {
  .tm-body { grid-template-columns: 1fr; gap: 22px; padding: 24px 0 20px; }
  .tm-facts {
    padding: 13px 0 0; border-left: 0; border-top: 1px solid var(--line);
    grid-template-columns: repeat(3, 1fr); gap: 10px;
  }
  .tm-facts > div { display: block; }
  .tm-facts dd { text-align: left; margin-top: 3px; }
  .tm-band, .tm-band svg { height: 48px; }
}
@media (max-width: 560px) {
  .tm-title { font-size: 23px; }
  .tm-eyebrow { letter-spacing: 2px; }
}

.hub-grid { display: grid; gap: 15px; }
@media (min-width: 660px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .hub-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-grid .tile.feature { grid-column: span 2; grid-row: span 1; }
}

.tile {
  position: relative; display: block; color: inherit;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
a.tile:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--sea); box-shadow: 0 3px 6px rgba(15,40,60,.06), 0 16px 36px rgba(15,40,60,.13); }
.tile-ico {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px; font-size: 24px;
  background: var(--sky); border: 1px solid #d8ebf5;
}
.tile h3 { margin: 12px 0 6px; font-size: 18px; letter-spacing: .5px; }
.tile p { margin: 0; font-size: 14px; color: var(--ink-2); }
.tile .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* 主推位：渐变实底 */
a.tile.feature, .tile.feature {
  color: #fff; border: 0;
  background: linear-gradient(135deg, var(--sea) 0%, var(--sea-deep) 100%);
  box-shadow: 0 2px 6px rgba(17,83,122,.25), 0 18px 40px rgba(17,83,122,.28);
}
.tile.feature .tile-ico { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.32); }
.tile.feature p { color: rgba(255,255,255,.86); }
.tile.feature .tag { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.tile.feature .tile-go { color: #fff; }
.tile-go { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--sea); letter-spacing: 1px; }

/* 占位分类 */
.tile-soon { opacity: .62; border-style: dashed; box-shadow: none; }
.tile-soon .tile-ico { background: #f1f4f7; border-color: var(--line); }
.tile-flag {
  position: absolute; top: 10px; right: 12px; font-size: 11px; color: var(--ink-3);
  background: #f1f4f7; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.tile-soon:hover { transform: none; border-color: var(--ink-3); }

/* ================= v0.10 交互与可达性（SPEC §6 / §9） ================= */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 6px;
}
/* 时间线卡片内的键盘焦点：整卡描边（勾选/改时间/跳过后立刻可见） */
.tl-item:focus-within { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(28,125,166,.12), var(--shadow); }
/* 速览卡 hover 时标题随主色，强化“可点”暗示 */
a.card:hover h3 { color: var(--sea-deep); }

/* ================= v0.15 同步提示（SPEC §17.4） ================= */
/* 服务器不可用 / 写失败时出现在页面底部，不遮挡页头；打印时由 .no-print 隐藏 */
.sync-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  max-width: 640px; margin: 0 auto;
  background: var(--ink); color: #fff;
  font-size: 13px; line-height: 1.6;
  padding: 9px 14px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,40,60,.28);
}
@media (max-width: 560px) { .sync-banner { font-size: 12px; left: 10px; right: 10px; } }
/* 提示条出现时给页面留底部空间，避免 fixed 浮层盖住页脚（68px ≈ 提示条高 + 下边距 + 余量） */
body.has-sync-banner { padding-bottom: 68px; }

/* ================= print ================= */
@media print {
  body { background: #fff; font-size: 12px; }
  body.has-sync-banner { padding-bottom: 0 !important; } /* 打印无浮层，不留空白 */
  .site-head, .site-foot, .pager, .btn, .ck-bar .btn, .no-print, .photo-tabs, .dropzone,
  .tl-money, .tl-ops, .tl-skip, .tl-del, .tl-edit, .tl-add, .tl-time-input,
  .help, .help-pop, .empty, .tl-state { display: none !important; }
  .wrap, .page-title, .hero-inner { max-width: none; padding-left: 0; padding-right: 0; }
  .hero { background: none; border: 0; }
  .hero .scenery { display: none; }
  .card, .tl-item, .note, .table-scroll, .kpi > div, .ck li, .form-card { box-shadow: none; break-inside: avoid; }
  .table-scroll { overflow: visible; border: 0; }
  table { min-width: 0; }
  a { color: inherit; }
}

/* ================= v0.17 账号入口 ================= */
.user-tools, .collection-account, .admin-nav {
  display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-3);
}
.user-tools { margin-left: auto; }
.user-tools form, .collection-account form, .admin-nav form, .error-actions form { margin: 0; }
.user-tools button, .collection-account button, .admin-nav button {
  appearance: none; border: 0; background: transparent; padding: 0; color: var(--sea);
  font-size: inherit; cursor: pointer;
}
.user-tools a, .collection-account a, .admin-nav a { color: var(--ink-2); }
.user-tools a:hover, .collection-account a:hover, .admin-nav a:hover { color: var(--sea-deep); }
.collection-account { max-width: 1120px; margin: 0 auto; padding: 14px 24px 0; justify-content: flex-end; }
.collection-account-inline { padding-top: 18px; }
.tile-idx {
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 13px; background: var(--sky); border: 1px solid #d8ebf5;
  font-family: "Songti SC", "Noto Serif SC", STSong, serif; font-size: 18px; color: var(--sea-deep);
}
.tile.feature .tile-idx { color: #fff; background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.28); }
.flash { max-width: 1040px; margin: 12px auto 0; padding: 9px 14px; border-radius: 10px; font-size: 13px; }
.flash.success { color: #27644f; background: #e5f3ed; border: 1px solid #c6e3d6; }
.flash.error { color: #8d3937; background: var(--rose-soft); border: 1px solid #eccfcf; }
@media (max-width: 560px) {
  .user-tools { flex: 1 0 100%; justify-content: flex-end; flex-wrap: wrap; }
  .collection-account { padding: 12px 18px 0; gap: 10px; flex-wrap: wrap; }
}

/* ================= v0.17 登录与改密：山湖暮色 / 三层景深 ================= */
body.auth-page {
  min-height: 100vh; min-height: 100svh; margin: 0; overflow-x: hidden;
  color: #f7f4ef; background: #18232d; -webkit-font-smoothing: antialiased;
}
.auth-scene, .auth-shade { position: fixed; inset: 0; pointer-events: none; }
.auth-scene {
  background-color: #334656;
  background-image: url("https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=breathtaking%20realistic%20mountain%20lake%20at%20blue%20hour%2C%20dramatic%20twilight%20clouds%2C%20soft%20rose%20and%20amber%20horizon%2C%20dark%20forest%20silhouette%2C%20reflections%20on%20calm%20water%2C%20cinematic%20atmospheric%20perspective%2C%20serene%20romantic%20mood%2C%20high%20detail%20natural%20landscape%20photography%2C%20no%20people%2C%20no%20buildings%2C%20no%20text&image_size=landscape_16_9");
  background-size: cover; background-position: center 54%; transform: scale(1.025);
}
.auth-shade {
  background:
    radial-gradient(ellipse at 50% 34%, rgba(238,190,163,.10) 0%, transparent 42%),
    linear-gradient(110deg, rgba(8,18,29,.64) 0%, rgba(15,22,35,.18) 50%, rgba(10,16,28,.58) 100%),
    linear-gradient(180deg, rgba(10,17,28,.20) 0%, rgba(7,13,23,.18) 44%, rgba(6,12,21,.72) 100%);
}
.auth-main {
  position: relative; z-index: 2; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; padding: 40px 22px;
}
.auth-card {
  position: relative; width: min(100%, 440px); overflow: hidden;
  padding: 38px 40px 30px; border: 1px solid rgba(255,255,255,.23); border-radius: 26px;
  background: linear-gradient(145deg, rgba(35,42,53,.72), rgba(24,30,41,.52));
  box-shadow: 0 32px 90px rgba(3,9,18,.42), 0 4px 20px rgba(3,9,18,.22), inset 0 1px 0 rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(24px) saturate(1.12); backdrop-filter: blur(24px) saturate(1.12);
  animation: auth-arrive .7s cubic-bezier(.2,.72,.22,1) both;
}
.auth-card::before {
  content: ""; position: absolute; left: 34px; right: 34px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,231,211,.78), transparent);
}
.auth-card-compact { width: min(100%, 460px); }
.auth-brand { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; letter-spacing: 1.4px; }
.auth-brand-mark {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(244,214,187,.58); color: #f3d6bd;
  font-family: Georgia, serif; font-size: 15px; font-weight: 400;
}
.auth-brand-en { margin-left: auto; color: rgba(244,241,237,.48); font-size: 8px; font-weight: 500; letter-spacing: 1.5px; }
.auth-kicker { margin: 34px 0 10px; color: #e6bfa4; font-size: 10px; font-weight: 700; letter-spacing: 3.4px; }
.auth-card h1 {
  margin: 0; color: #fffaf5; font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif;
  font-size: 34px; font-weight: 600; line-height: 1.42; letter-spacing: 1.5px;
}
.auth-card h1 em { color: #f0ceb3; font-style: normal; }
.auth-intro { margin: 13px 0 27px; color: rgba(247,244,239,.68); font-size: 13px; line-height: 1.8; }
.auth-form { display: grid; gap: 17px; }
.auth-group label { display: block; margin: 0 0 7px; color: rgba(255,250,245,.88); font-size: 12px; letter-spacing: .6px; }
.auth-field {
  display: flex; align-items: center; gap: 11px; min-height: 50px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.19); border-radius: 12px;
  background: rgba(255,255,255,.075); transition: border-color .18s, background .18s, box-shadow .18s;
}
.auth-field:focus-within { border-color: #efc8aa; background: rgba(255,255,255,.11); box-shadow: 0 0 0 3px rgba(239,200,170,.15); }
.auth-field svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: rgba(247,235,226,.68); stroke-width: 1.5; stroke-linecap: round; }
.auth-field input {
  width: 100%; min-width: 0; height: 48px; padding: 0; border: 0; outline: 0;
  color: #fffaf5; background: transparent; font-size: 16px; line-height: 48px;
}
.auth-field input::placeholder { color: rgba(247,244,239,.43); }
.auth-field input:-webkit-autofill { -webkit-text-fill-color: #fffaf5; box-shadow: 0 0 0 1000px #42434a inset; }
.auth-field input:focus-visible { outline: 0; }
.auth-field:has(input:focus-visible) { outline: 2px solid #f0ceb3; outline-offset: 3px; }
.auth-error {
  margin: -8px 0 18px; padding: 10px 12px; border: 1px solid rgba(255,183,174,.35); border-radius: 10px;
  color: #ffd4cc; background: rgba(135,48,48,.26); font-size: 13px;
}
.auth-rule { margin: -5px 0 0; color: rgba(247,244,239,.60); font-size: 12px; line-height: 1.65; }
.auth-submit {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px;
  margin-top: 4px; padding: 0 19px; border: 1px solid rgba(255,236,220,.40); border-radius: 12px;
  color: #2e2927; background: linear-gradient(105deg, #f1d4b6 0%, #e5b18f 52%, #d9977e 100%);
  box-shadow: 0 8px 24px rgba(218,145,113,.20); font-size: 14px; font-weight: 800; letter-spacing: 1px;
  cursor: pointer; transition: transform .18s, box-shadow .18s, filter .18s;
}
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.035); box-shadow: 0 11px 28px rgba(218,145,113,.28); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:focus-visible, .auth-secondary button:focus-visible { outline: 2px solid #fff0df; outline-offset: 3px; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; color: rgba(247,244,239,.44); font-size: 10px; letter-spacing: .5px; }
.auth-foot span { display: inline-flex; align-items: center; gap: 6px; }
.auth-foot i { width: 5px; height: 5px; border-radius: 50%; background: #a8c9b9; box-shadow: 0 0 0 3px rgba(168,201,185,.10); }
.auth-secondary { margin-top: 20px; text-align: center; }
.auth-secondary button { min-height: 44px; border: 0; color: rgba(255,250,245,.66); background: transparent; font-size: 12px; cursor: pointer; }
.auth-scene-note { position: fixed; z-index: 2; left: 30px; bottom: 24px; margin: 0; color: rgba(255,255,255,.45); font-family: "Songti SC", STSong, serif; font-size: 12px; letter-spacing: 2px; }
@keyframes auth-arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 520px) {
  .auth-main { padding: 24px 17px; }
  .auth-card { padding: 29px 23px 24px; border-radius: 22px; }
  .auth-card h1 { font-size: 30px; letter-spacing: 1px; }
  .auth-kicker { margin-top: 28px; }
  .auth-intro { margin-bottom: 23px; }
  .auth-scene-note { display: none; }
  .auth-scene { background-position: 58% center; }
}
@media (max-width: 350px) { .auth-brand-en { display: none; } .auth-card { padding-left: 20px; padding-right: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
  .auth-scene { transform: none; }
  .auth-field, .auth-submit { transition: none; }
}

/* ================= v0.17 错误页与账号管理 ================= */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { width: min(100%, 560px); padding: 38px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.error-code { margin: 0; color: var(--sea); font-family: Georgia, serif; font-size: 56px; line-height: 1; }
.error-card h1 { margin: 18px 0 10px; font-size: 24px; }
.error-card > p:not(.error-code) { color: var(--ink-2); }
.error-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.admin-page { background: var(--sand); }
.admin-head { max-width: 1120px; margin: 0 auto; padding: 34px 24px 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; border-bottom: 1px solid var(--line); }
.admin-head h1 { margin: 4px 0 6px; font-family: "Songti SC", "Noto Serif SC", STSong, serif; font-size: 32px; }
.admin-head p { margin: 0; color: var(--ink-2); font-size: 14px; }
.admin-head .admin-eyebrow { color: var(--sea); font-size: 10px; font-weight: 700; letter-spacing: 2.4px; }
.admin-nav { flex-wrap: wrap; justify-content: flex-end; }
.admin-main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 10px; }
.admin-messages { margin-bottom: 18px; }
.admin-message { margin: 0 0 8px; padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.admin-message.success { color: #27644f; background: #e5f3ed; border: 1px solid #c6e3d6; }
.admin-message.error { color: #8d3937; background: var(--rose-soft); border: 1px solid #eccfcf; }
.admin-create, .admin-user { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.admin-list { margin-top: 32px; }
.admin-section-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.admin-section-title > span { color: var(--sea); font-family: Georgia, serif; font-size: 24px; }
.admin-section-title h2 { margin: 0 0 3px; font-size: 20px; }
.admin-section-title p { margin: 0; color: var(--ink-3); font-size: 13px; }
.admin-create-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: end; }
.admin-create-form > label, .admin-panel > label { display: grid; gap: 6px; color: var(--ink-2); font-size: 12px; }
.admin-create-form input:not([type="checkbox"]), .admin-panel input:not([type="checkbox"]) {
  width: 100%; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); background: #fff; font-size: 16px;
}
.admin-create-form small, .admin-panel small, .admin-panel > p { color: var(--ink-3); font-size: 11px; line-height: 1.55; }
.admin-check { display: flex !important; align-items: center; gap: 8px !important; min-height: 44px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.admin-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--sea); }
.admin-check.is-disabled { opacity: .45; cursor: not-allowed; }
.admin-users { display: grid; gap: 18px; }
.admin-user-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-user-head h3 { margin: 0 0 3px; font-size: 18px; }
.admin-user-head h3 small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.admin-user-head p { margin: 0; color: var(--ink-3); font-size: 12px; }
.admin-user-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 16px; margin-top: 18px; }
/* v0.18.2 账号列表：整张卡片作为进入详情的链接，仅展示基础信息 */
.admin-user-link { display: block; text-decoration: none; color: inherit; transition: border-color .18s, transform .18s, box-shadow .18s; }
.admin-user-link:hover, .admin-user-link:focus-visible { border-color: var(--sea); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(20,40,60,.12); }
.admin-user-link .admin-user-head { padding-bottom: 0; border-bottom: 0; }
.admin-user-go { color: var(--sea); font-size: 13px; font-weight: 600; white-space: nowrap; }
.admin-user-link .admin-summary { margin-top: 6px; color: var(--ink-3); font-size: 12px; }
.admin-panel { padding: 17px; border-radius: 13px; background: var(--sky); border: 1px solid var(--line); }
.admin-panel h4 { margin: 0 0 12px; font-size: 14px; }
.admin-panel > p { margin: 8px 0 12px; }
/* v0.20.0 登录 IP 记录：按 IP 聚合表 + 可折叠明细（设备 UA 单行省略，避免撑破面板） */
.admin-logins { margin-top: 16px; }
.admin-logins h4 small { margin-left: 6px; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.admin-login-alert { padding: 8px 11px; border-radius: 9px; background: var(--gold-soft); border: 1px solid #eddcb4; color: #7c5a12; }
.admin-login-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 12.5px; }
.admin-login-table th, .admin-login-table td { padding: 6px 9px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-login-table th { color: var(--ink-3); font-weight: 600; font-size: 11.5px; letter-spacing: .4px; }
.admin-login-table td:first-child code { font-size: 12.5px; }
.admin-login-detail summary { cursor: pointer; color: var(--sea-deep); font-size: 12.5px; }
.admin-login-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; }
.admin-login-list li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.admin-login-list li .t { color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-login-list li .ua { flex: 1 1 auto; min-width: 0; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .admin-login-list li { flex-wrap: wrap; gap: 2px 8px; } .admin-login-list li .ua { flex: 1 0 100%; } }
.admin-access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-access fieldset { min-width: 0; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.55); }
.admin-access legend { padding: 0 5px; color: var(--ink-3); font-size: 11px; }
@media (max-width: 820px) {
  .admin-head { align-items: flex-start; flex-direction: column; }
  .admin-nav { justify-content: flex-start; }
  .admin-create-form { grid-template-columns: 1fr 1fr; }
  .admin-user-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .admin-head, .admin-main { padding-left: 16px; padding-right: 16px; }
  .admin-create, .admin-user { padding: 18px 15px; }
  .admin-create-form, .admin-access-grid { grid-template-columns: 1fr; }
  .admin-user-head { flex-direction: column; }
  .error-card { padding: 28px 20px; }
}

/* ================= v0.18 内容管理 ================= */
/* 复用 .admin-* 卡片/标题/按钮体系；以下只补内容页特有的布局与表格控件 */
.content-page .admin-head h1 small { color: var(--ink-3); font-size: 16px; font-weight: 500; margin-left: 6px; }
.content-back { margin: 0 0 18px; font-size: 13px; }
.content-back a { color: var(--ink-3); }
.content-back a:hover { color: var(--sea-deep); }

/* 表单：标签在上、控件撑满，与 .admin-panel 控件同高（44px）保证移动端易点 */
.content-form { display: grid; gap: 14px; }
.content-form > label { display: grid; gap: 6px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.content-form input:not([type="checkbox"]), .content-form select, .content-form textarea {
  width: 100%; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); background: #fff; font-size: 15px; box-sizing: border-box;
}
.content-form textarea { min-height: 72px; resize: vertical; font-family: inherit; }
.content-form input:focus, .content-form select:focus, .content-form textarea:focus {
  outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft);
}
.content-form h4 { margin: 0; font-size: 14px; color: var(--sea-deep); }
.content-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.content-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: end; }

/* 行内子表单（新增/编辑块）：浅蓝面板，与 .admin-panel 同色系 */
.content-inline-form { margin-top: 18px; padding: 16px; border-radius: 13px; background: var(--sky); border: 1px solid var(--line); }
.content-inline-form + .content-inline-form { margin-top: 14px; }
.content-hint { color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.content-hint.is-json { color: #8a5a1b; background: #fbf1dc; border: 1px solid #f0d9a8; border-radius: 6px; padding: 2px 8px; }

/* 危险操作表单（恢复默认 / 删除）：警示边框 */
.content-danger-form { margin-top: 18px; padding: 16px; border-radius: 13px; background: #fff7f7; border: 1px solid #f0d6d6; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.content-danger-form .btn.danger { margin-left: auto; }

/* 小按钮：表格行内操作，保持 ≥40px 触控高度 */
.btn.small { font-size: 12.5px; padding: 6px 11px; min-height: 40px; border-radius: 8px; }
.content-page .btn { display: inline-flex; align-items: center; justify-content: center; }

/* 行程卡片 / 页面卡片 */
.content-trip-grid, .content-page-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.content-trip-card, .content-page-card {
  display: block; padding: 18px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); color: inherit; position: relative;
}
.content-trip-card:hover, .content-page-card:hover { text-decoration: none; border-color: var(--sea); transform: translateY(-2px); }
.content-trip-card h3 { margin: 0 0 6px; font-size: 17px; }
.content-trip-card h3 small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.content-trip-card p { margin: 0; color: var(--ink-2); font-size: 13px; }
.content-trip-card .content-cta { display: block; margin-top: 14px; color: var(--sea); font-size: 13px; font-weight: 700; }
.content-page-card { display: flex; flex-direction: column; gap: 6px; }
.content-page-card strong { font-size: 14px; }
.content-page-card small { color: var(--ink-3); font-size: 11.5px; }
.content-tag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #f1f4f7; color: var(--ink-2); border: 1px solid var(--line); }
.content-tag.on { background: var(--sea-soft); color: var(--sea-deep); border-color: #c5e0ee; }
.content-empty { padding: 24px; text-align: center; color: var(--ink-3); font-size: 14px; background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; }

/* 数据表格：可横向滚动，避免窄屏溢出；行内输入控件略紧凑 */
.content-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.content-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.content-table th, .content-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.content-table thead th { background: var(--sky); color: var(--sea-deep); font-weight: 700; white-space: nowrap; border-bottom: 2px solid #cadfef; }
.content-table tbody tr:last-child td { border-bottom: none; }
.content-table tbody tr.is-editing { background: #fffbf0; }
.content-table input, .content-table select { min-height: 38px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; width: 100%; box-sizing: border-box; }
.content-table code { font-size: 12px; background: var(--sky); padding: 1px 6px; border-radius: 5px; }
.content-row-ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.content-row-ops form { display: inline-flex; gap: 4px; margin: 0; }

@media (max-width: 820px) {
  .content-grid-3 { grid-template-columns: 1fr 1fr; }
  .content-trip-grid, .content-page-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .content-grid-2, .content-grid-3 { grid-template-columns: 1fr; }
  .content-trip-grid, .content-page-grid { grid-template-columns: 1fr; }
  .content-danger-form { flex-direction: column; align-items: stretch; }
  .content-danger-form .btn.danger { margin-left: 0; }
  .content-table { min-width: 480px; }
  .content-row-ops { gap: 4px; }
  .btn.small { min-height: 44px; padding: 8px 12px; }  /* 窄屏触控目标 ≥44px */
}
@media (max-width: 390px) {
  .content-form input, .content-form select, .content-form textarea { font-size: 16px; }  /* 防 iOS 缩放 */
  .content-table { min-width: 440px; }
}

/* v0.18.1 行程页页脚「编辑此页」入口：仅登录态由 base.html 渲染（current_user + travel 模块），
   本地 file:// 预览无 Jinja 上下文 → 这段 HTML 根本不存在，故不会破坏静态预览（T3/AC-5）。 */
.edit-this { display: inline-block; font-size: 12.5px; color: var(--ink-3); margin-right: 16px; vertical-align: middle; }
.edit-this a { color: var(--sea-deep); }
.edit-this a:hover { color: var(--sea); }

/* ================= Phase 5 照片墙（v0.19.0，SPEC §12） =================
   版式对齐磁盘静态 photos.html：上传卡复用 .form-card/.form-grid/.field/.dropzone，
   照片墙复用 .photo-tabs/.photo-grid/.photo-item；这里只补本页专属的两级筛选、角标与灯箱。 */
.photo-wall { padding-bottom: 40px; }
/* 上传表单三列：日期 / 类别 / 说明（说明更宽）。通用 .form-grid 在 ≥760 是 3 等列且 .wide 跨 2 列，
   本页只有 3 个字段，那样会留一个空位，故在本页范围内改成 1fr 1fr 2fr。 */
.photo-wall .form-grid { grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) {
  .photo-wall .form-grid { grid-template-columns: 1fr 1fr 2fr; }
  .photo-wall .form-grid .wide { grid-column: auto; }
}

/* 上传：虚线框内的隐藏 file 控件 + 底部动作行 */
.dropzone input[type=file] { display: none; }
.photo-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.photo-picked { min-width: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 筛选第一排（日期，主分类）：沿用 .photo-tabs 胶囊外观，但元素是 button */
.photo-tabs button { flex: 0 0 auto; font: inherit; font-size: 13.5px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.photo-tabs button:hover { border-color: var(--sea); }
.photo-tabs button.on { background: var(--sea); border-color: var(--sea); color: #fff; font-weight: 700; }
.photo-tabs .n { margin-left: 3px; font-size: 11px; opacity: .72; }

/* 筛选第二排（类别，次分类）：整行更小、带行首标签 */
.photo-filter-row { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.photo-filter-row > .lab { flex: 0 0 auto; font-size: 12px; color: var(--ink-3); }
.photo-filter-row .photo-tabs { margin-bottom: 0; padding-bottom: 0; }
.photo-tabs.sub button { font-size: 12.5px; padding: 3px 11px; }

/* 照片卡：复用 .photo-item 外框，图上叠日期角标，图下是说明 + 类别 + 折叠编辑 */
.photo-item .photo-open { display: block; width: 100%; padding: 0; border: 0; background: var(--sky); cursor: zoom-in; }
.photo-day { position: absolute; top: 8px; left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(12, 62, 88, .68); }
.photo-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--sea-soft); color: var(--sea-deep); }
.photo-sub { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }
.photo-ops { margin-top: 6px; }
.photo-ops summary { cursor: pointer; font-size: 12px; color: var(--ink-3); }
.photo-edit-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.photo-edit-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-3); }
.photo-edit-form select, .photo-edit-form input { min-height: 34px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fdfcf9; }
.photo-item[hidden] { display: none; }

/* 空状态：筛选后为空与「一张都没传」的文案由 JS 切换 */
.photo-empty { border: 2px dashed #bcd3e2; border-radius: var(--radius); background: var(--paper); padding: 34px 18px; text-align: center; color: var(--ink-2); }
.photo-empty b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--sea-deep); }
.photo-empty small { color: var(--ink-3); }
.photo-empty[hidden] { display: none; }

/* 大图预览（lightbox）：hidden 属性优先，避免被 display:flex 覆盖 */
.photo-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 46px 56px 64px; background: rgba(8, 16, 24, .93); }
.photo-lightbox[hidden] { display: none; }
.plb-img { max-width: 100%; max-height: calc(100vh - 130px); object-fit: contain; border-radius: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.plb-close, .plb-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; border-radius: 10px; line-height: 1; }
.plb-close { top: 12px; right: 14px; width: 40px; height: 40px; font-size: 18px; }
.plb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 64px; font-size: 30px; }
.plb-nav.prev { left: 8px; }
.plb-nav.next { right: 8px; }
.plb-close:hover, .plb-nav:hover { background: rgba(255,255,255,.26); }
.plb-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 13px; color: #d7e6f1; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent); }
.plb-bar a { color: #9fd4ee; }
body.photo-lb-open { overflow: hidden; }

@media (max-width: 560px) {
  .photo-lightbox { padding: 54px 8px 72px; }
  .plb-nav { width: 36px; height: 52px; font-size: 24px; }
  .photo-tabs button { min-height: 36px; }      /* 触控目标 */
  .photo-form-actions { justify-content: space-between; }
  .photo-picked { flex: 1 1 auto; }
  .photo-filter-row { align-items: flex-start; }
}
