/* ===================== 时光回忆 · 全站样式（藏青 + 琥珀金） ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1F3347;        /* 深藏青 */
  --navy-2: #2A435C;      /* 藏青-亮 */
  --gold: #C9A24B;        /* 琥珀金 */
  --gold-deep: #A97F2B;   /* 金-深 */
  --gold-pale: #F4E9D2;   /* 金-浅 */
  --paper: #F6F1E7;       /* 暖纸白 */
  --paper-2: #EFE7D8;     /* 纸-深 */
  --card: #FFFFFF;
  --ink: #2C3E50;         /* 正文深蓝灰 */
  --ink-2: #54677A;       /* 次级 */
  --ink-3: #8A99A8;       /* 弱化 */
  --line: #E4DAC6;        /* 分隔线 */
  --max: 960px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  font-size: 15.5px; line-height: 1.85; color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 顶部（深色横条，与字符工坊的白色 sticky 不同） ---------- */
.site-header {
  background: var(--navy);
  color: #EDE6D6;
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-ico { font-size: 20px; }
.brand-name {
  font-size: 17px; font-weight: 700; letter-spacing: 0.06em;
  color: #F7F0DF; white-space: nowrap;
}
.brand-name em { color: var(--gold); font-style: normal; }
.site-nav { display: flex; gap: 2px; }
.site-nav a {
  font-size: 14px; color: #C9D3DE; padding: 7px 13px; border-radius: 6px;
  transition: color .18s, background .18s;
}
.site-nav a:hover, .site-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.site-nav a.active { box-shadow: inset 0 -2px 0 var(--gold); }
.menu-btn {
  display: none; background: none; border: none; padding: 8px;
  cursor: pointer; color: #F7F0DF; border-radius: 8px;
}
.menu-btn:hover { background: rgba(255,255,255,.1); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- 面包屑 ---------- */
.crumb { padding: 22px 0 6px; font-size: 13px; color: var(--ink-3); }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--gold-deep); }
.crumb .sep { margin: 0 8px; color: var(--line); }
.crumb .now { color: var(--ink-2); }

/* ---------- 首页 Hero（大时钟） ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 70%);
  color: #EDE6D6;
  padding: 54px 0 58px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(201,162,75,.25);
  box-shadow: 0 0 0 40px rgba(201,162,75,.08), 0 0 0 80px rgba(201,162,75,.05);
  pointer-events: none;
}
.hero-hi { font-size: 13.5px; color: var(--gold); letter-spacing: .18em; margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(24px, 4vw, 34px); font-weight: 700; line-height: 1.5;
  color: #F7F0DF; letter-spacing: .03em; margin-bottom: 14px;
}
.hero h1 span { color: var(--gold); }
.hero-desc { font-size: 14.5px; line-height: 2; color: #B9C6D4; max-width: 620px; }
.clock-card {
  margin-top: 28px; max-width: 420px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(201,162,75,.35);
  border-radius: 14px; padding: 18px 24px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 20px;
}
.clock-time {
  font-size: 34px; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: 2px; line-height: 1.2;
}
.clock-date { font-size: 13px; color: var(--gold); margin-top: 4px; letter-spacing: .04em; }
.clock-tick { font-size: 24px; color: var(--gold); animation: tick 1s steps(2) infinite; }
@keyframes tick { 50% { opacity: .25; } }

/* ---------- 区块 ---------- */
.section { padding: 40px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding-bottom: 12px;
  border-bottom: 2px solid var(--navy); margin-bottom: 20px;
}
.section-head h2 { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: .06em; }
.section-head h2::before { content: "◆ "; color: var(--gold); font-size: 13px; }
.section-head a.more { font-size: 13px; color: var(--gold-deep); }
.section-head a.more:hover { text-decoration: underline; }

/* ---------- 工具条目（时间轴式横排） ---------- */
.tool-list { display: flex; flex-direction: column; gap: 14px; }
.tool-item {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 16px 22px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tool-item:hover {
  transform: translateX(4px);
  border-left-color: var(--gold-deep);
  box-shadow: 0 8px 22px rgba(31,51,71,.1);
}
.tool-item .idx {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px; color: var(--gold-deep); font-weight: 700; width: 44px; flex-shrink: 0;
}
.tool-item .ico {
  font-size: 26px; width: 48px; height: 48px; flex-shrink: 0;
  background: var(--gold-pale); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.tool-item .info { flex: 1; min-width: 0; }
.tool-item .info h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.tool-item .info p { font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.tool-item .go { font-size: 13px; color: var(--gold-deep); flex-shrink: 0; font-weight: 600; }

/* ---------- 文章列表 ---------- */
.art-list { display: flex; flex-direction: column; }
.art-item {
  display: block; padding: 15px 4px; border-bottom: 1px dashed var(--line);
}
.art-item:last-child { border-bottom: none; }
.art-item .t { font-size: 15.5px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.art-item .t:hover { color: var(--gold-deep); }
.art-item .d { font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.art-item .tag {
  display: inline-block; font-size: 11.5px; color: var(--gold-deep);
  background: var(--gold-pale); border-radius: 999px; padding: 0 9px;
  margin-right: 8px; vertical-align: 1px;
}

/* ---------- 页头（子页） ---------- */
.page-head { padding: 40px 0 10px; }
.page-head h1 {
  font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; color: var(--navy);
  line-height: 1.5; margin-bottom: 10px; letter-spacing: .02em;
}
.page-head .lead { font-size: 14.5px; color: var(--ink-3); line-height: 1.9; max-width: 640px; }

/* ---------- 工具操作台 ---------- */
.workbench {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 26px 28px; margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(31,51,71,.05);
}
.wb-label {
  font-size: 13px; font-weight: 700; color: var(--gold-deep);
  letter-spacing: .08em; margin-bottom: 10px;
}
.wb-label::after { content: " ─────"; color: var(--line); font-weight: 400; }
.wb-body textarea, .wb-body input[type="text"], .wb-body input[type="date"], .wb-body input[type="datetime-local"], .wb-body select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: #FDFBF6; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px;
  transition: border-color .18s; outline: none;
  appearance: none; -webkit-appearance: none;
}
.wb-body textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
.wb-body textarea:focus, .wb-body input:focus, .wb-body select:focus {
  border-color: var(--gold); background: #fff;
}
.wb-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 22px; font-family: inherit; font-size: 14px;
  font-weight: 600; color: #fff; background: var(--navy); border: none;
  border-radius: 8px; cursor: pointer; transition: background .18s, transform .1s;
}
.btn:hover { background: var(--navy-2); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--gold-pale); color: var(--gold-deep); }
.btn-ghost:hover { background: #EBDDBB; }
.wb-result {
  margin-top: 14px; padding: 14px 16px;
  background: var(--gold-pale); border: 1px dashed var(--gold);
  border-radius: 8px; font-size: 15px; color: var(--ink); line-height: 1.8;
  white-space: pre-wrap; word-break: break-all; min-height: 46px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.wb-result.empty { color: var(--ink-3); background: var(--paper-2); border-style: solid; border-color: var(--line); font-family: inherit; }
.wb-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

/* ---------- 说明卡 ---------- */
.note-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 10px; padding: 18px 22px; margin-bottom: 24px;
  font-size: 14px; color: var(--ink-2); line-height: 1.95;
}
.note-card h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 10px; letter-spacing: .04em; }
.note-card p { margin-bottom: 10px; }
.note-card p:last-child { margin-bottom: 0; }
.note-card code {
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px;
  background: #fff; color: var(--gold-deep); padding: 1px 6px; border-radius: 4px;
}

/* ---------- 文章正文 ---------- */
.article-wrap { padding: 8px 0 40px; }
.article-body { font-size: 15.5px; line-height: 2.05; color: var(--ink-2); max-width: 680px; }
.article-body p { margin-bottom: 18px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body code {
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 13.5px;
  background: var(--gold-pale); color: var(--gold-deep); padding: 1px 6px; border-radius: 4px;
}
.article-body strong { color: var(--navy); }

/* ---------- 关于 / 条款 ---------- */
.plain { padding: 8px 0 40px; max-width: 680px; }
.plain p { font-size: 15px; line-height: 2.05; color: var(--ink-2); margin-bottom: 16px; }
.plain p:last-child { margin-bottom: 0; }
.plain h2 {
  font-size: 17px; font-weight: 700; color: var(--navy);
  margin: 28px 0 14px; letter-spacing: .04em;
}
.plain h2::before { content: "◆ "; color: var(--gold); font-size: 12px; }
.plain h2:first-child { margin-top: 0; }

/* ---------- 页脚（深色） ---------- */
.site-footer {
  background: var(--navy); color: #B9C6D4;
  margin-top: 44px; padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; line-height: 2.1;
}
.foot-line { font-size: 14px; color: #F7F0DF; letter-spacing: .06em; margin-bottom: 6px; }
.foot-beian {
  display: inline-block; color: #B9C6D4;
  border-bottom: 1px dashed rgba(201,162,75,.5); padding-bottom: 1px;
  transition: color .18s, border-color .18s;
}
.foot-beian:hover { color: var(--gold); border-color: var(--gold); }
.foot-links { font-size: 12.5px; margin-top: 4px; }
.foot-links a { color: #B9C6D4; transition: color .18s; }
.foot-links a:hover { color: var(--gold); }
.foot-links .sep { margin: 0 8px; color: rgba(185,198,212,.35); }
.foot-copy { font-size: 12.5px; margin-top: 4px; color: #8A99A8; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .header-inner { padding: 0 18px; }
  .menu-btn { display: block; }
  .site-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--navy-2); border-top: 1px solid rgba(201,162,75,.3);
    flex-direction: column; gap: 2px; padding: 8px 12px 14px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 14px; font-size: 15px; }
  .wrap, .header-inner { padding: 0 18px; }
  .hero { padding: 38px 0 42px; }
  .clock-card { padding: 14px 18px; gap: 14px; }
  .clock-time { font-size: 27px; }
  .section { padding: 28px 0; }
  .tool-item { gap: 12px; padding: 13px 16px; }
  .tool-item .idx { width: 32px; font-size: 18px; }
  .tool-item .ico { width: 40px; height: 40px; font-size: 20px; }
  .tool-item .go { display: none; }
  .workbench { padding: 20px 18px; }
}
