:root {
  /* 全站字号下限 12px，层级靠 12/13/14/15/16/18/19 这几档拉开，不要再往下加更小的值 */
  color-scheme: dark;
  --bg: #111513;
  --panel: #191f1c;
  --panel2: #202824;
  --text: #e6e8df;
  --muted: #9ba79d;
  --line: #303a33;
  --green: #b8d2b5;
  --moss: #718d73;
  --gold: #e5c990;
  --rose: #e8a5a0;
  --serif: 'Songti SC', 'Noto Serif CJK SC', SimSun, Georgia, serif;
  --sans: system-ui, -apple-system, 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 10%, #26342a 0, transparent 38rem), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  min-height: 100vh;
}
button, a { font: inherit; }
button { color: inherit; }

.sky { position: absolute; inset: 0 0 auto; height: 580px; overflow: hidden; pointer-events: none; opacity: .6; }
.sky span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #d8e3cf; box-shadow: 0 0 9px #d8e3cf; animation: twinkle 6s ease-in-out infinite; }
.sky span:nth-child(1) { left: 18%; top: 92px; }
.sky span:nth-child(2) { left: 82%; top: 130px; animation-delay: 1.4s; }
.sky span:nth-child(3) { left: 72%; top: 47px; width: 2px; height: 2px; animation-delay: 2.8s; }
.sky span:nth-child(4) { left: 27%; top: 201px; width: 2px; height: 2px; animation-delay: 4.2s; }
.sky span:nth-child(5) { left: 91%; top: 258px; width: 2px; height: 2px; animation-delay: 3.4s; }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.topbar { position: relative; z-index: 1; max-width: 1080px; margin: auto; padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 19px; }
.brand-mark { font-family: var(--sans); color: var(--green); font-size: 23px; }
.topnav { display: flex; align-items: center; gap: 20px; }
.nav-link { background: none; border: 0; color: var(--muted); text-decoration: none; font-size: 14px; cursor: pointer; padding: 2px 0; }
.nav-link:hover { color: var(--green); }

main { position: relative; max-width: 810px; margin: auto; padding: 0 30px; }

.hero { text-align: center; padding: 76px 0 62px; }
.eyebrow { font-size: 13px; letter-spacing: .13em; color: #b6c7b5; text-transform: uppercase; }
.live-dot { display: inline-block; width: 6px; height: 6px; background: #a8c89e; border-radius: 50%; margin: 0 8px 1px 0; box-shadow: 0 0 10px #a8c89e; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 8vw, 82px); line-height: 1.32; letter-spacing: .03em; margin: 25px 0 20px; }
.hero h1 em { font-weight: 400; color: var(--green); font-style: normal; }
.intro { color: var(--muted); font-size: 16px; line-height: 2; margin: 0 0 31px; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.write-cta, .wander-cta { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; text-decoration: none; }
.write-cta { min-width: 176px; padding: 12px 22px; background: var(--green); color: #17201a; border-radius: 3px; font-weight: 600; font-size: 15px; }
.write-cta:hover { background: #c8dfc5; }
.wander-cta { background: none; color: #c4cfbd; border-bottom: 1px solid #556454; padding: 4px 2px 5px; cursor: pointer; font-size: 14px; }
.wander-cta:hover { color: #e7d19c; border-color: #e7d19c; }

/* 今日一问：写框上方的一行提示 */
.daily-prompt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 18px; padding: 11px 14px; border: 1px dashed #43523f; background: #1b231e; }
.daily-prompt-label { flex: none; font-size: 12px; letter-spacing: .12em; color: #b09a6a; border: 1px solid #5d5335; border-radius: 2px; padding: 2px 7px; }
.daily-prompt-question { flex: 1; min-width: 170px; margin: 0; font: 14px/1.7 var(--serif); color: #d3dbc9; }
.daily-prompt-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.daily-prompt-answer { background: none; border: 1px solid #7b9578; color: #d7e5d1; padding: 4px 11px; font-size: 12px; cursor: pointer; border-radius: 2px; }
.daily-prompt-answer:hover { background: #263329; border-color: #9db89a; }
.daily-prompt-link { color: #8d9a8c; font-size: 12px; text-decoration: none; white-space: nowrap; }
.daily-prompt-link:hover { color: var(--gold); }

/* 今天的回答 */
.daily-echo { border-top: 1px solid #2e3931; padding: 48px 0 8px; }
.daily-echo-question { font: 400 16px/1.8 var(--serif); color: #dfe5d7; margin: -6px 0 18px; letter-spacing: .02em; }
.daily-answers { display: grid; gap: 14px; }
.daily-answer { font: 14px/1.9 var(--serif); color: #d3d8cd; border-left: 2px solid #445343; padding-left: 14px; margin: 0; }
.daily-answer time { display: block; font: 12px var(--sans); color: #7f8d81; margin-top: 5px; }
.daily-empty { color: #8a978c; font: 13px var(--serif); margin: 0; }


/* 写留言 */
.write-panel { border: 1px solid #354039; background: linear-gradient(145deg, rgba(31, 41, 34, .9), rgba(24, 30, 27, .94)); padding: 30px 32px 27px; box-shadow: 0 24px 60px #080a091f; }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.section-index { font-size: 12px; color: #95ae92; letter-spacing: .12em; }
.section-heading h2 { font: 500 18px var(--serif); margin: 0; letter-spacing: .04em; }
.answer-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 7px 8px 7px 12px; border: 1px dashed #5b7359; background: #1e2822; color: #c9dbc3; font-size: 12px; }
.answer-chip button { background: none; border: 0; color: #9fb19c; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.answer-chip button:hover { color: var(--rose); }
textarea { display: block; width: 100%; min-height: 132px; resize: vertical; border: 1px solid #39453c; background: #141a16; color: var(--text); padding: 17px 18px; font: 15px/1.8 var(--serif); outline: none; }
textarea::placeholder { color: #748078; }
textarea:focus { border-color: #819b80; }
.form-meta { display: flex; justify-content: space-between; color: #7f8c82; font-size: 12px; padding: 8px 1px 0; }
.mood-row, .capsule-row { display: flex; align-items: center; gap: 8px; margin: 18px 0 16px; flex-wrap: wrap; }
.capsule-row { margin-top: 0; }
.mood-label { color: var(--muted); font-size: 13px; margin-right: 3px; }
.mood-chip, .capsule-chip { border: 1px solid #39433c; background: transparent; color: #a8b1a8; padding: 5px 11px; font-size: 12px; border-radius: 20px; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.mood-chip:hover, .mood-chip.selected, .capsule-chip:hover, .capsule-chip.selected { border-color: #718c70; color: #d6e3d0; background: #263329; }
.capsule-chip { border-radius: 2px; font-size: 12px; padding: 5px 10px; }
.capsule-hint { margin: -6px 0 12px; font-size: 12px; color: #c2a86f; }
.turnstile-wrap { margin: 0 0 14px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.privacy-note { margin: 0; color: #89958c; font-size: 12px; }
.submit-button { flex: none; background: #c2d5ba; border: 0; color: #1a241b; padding: 10px 17px; cursor: pointer; font-size: 13px; font-weight: 600; }
.submit-button:disabled { opacity: .48; cursor: not-allowed; }
.submit-button:not(:disabled):hover { background: #d4e4cd; }
.form-status { min-height: 20px; margin: 8px 0 0; color: var(--green); font-size: 13px; }
.form-status.error { color: #edac9b; }
.honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* 暗号 */
.claim-row { display: flex; align-items: center; gap: 10px; margin: 0 0 7px; flex-wrap: wrap; }
.claim-input-wrap { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.claim-input-wrap input { flex: 1; min-width: 0; border: 1px solid #39453c; background: #141a16; color: var(--text); padding: 8px 11px; font: 14px ui-monospace, SFMono-Regular, Consolas, monospace; outline: none; }
.claim-input-wrap input:focus { border-color: #819b80; }
.claim-input-wrap input::placeholder { color: #748078; font-family: var(--sans); }
.claim-toggle, .claim-generate { flex: none; background: none; border: 1px solid #39433c; color: #a8b1a8; padding: 6px 10px; font-size: 12px; cursor: pointer; border-radius: 2px; white-space: nowrap; }
.claim-toggle:hover, .claim-generate:hover { border-color: #718c70; color: #d6e3d0; background: #263329; }
.claim-hint { margin: 0 0 14px; font-size: 12px; line-height: 1.8; color: #8a978c; }
.claim-hint strong { color: #c2a86f; font-weight: 500; }

/* 留言墙 */
.wall { padding: 64px 0 46px; }
.wall-heading { justify-content: space-between; align-items: end; margin-bottom: 22px; }
.wall-heading > div { display: flex; align-items: center; gap: 13px; }
.wall-subtitle { font-size: 12px; color: #7f8b81; }
.post-list { display: grid; gap: 12px; }
.post-card { border: 1px solid #2d3730; background: rgba(25, 31, 28, .8); padding: 20px 23px 16px; transition: border-color .2s, transform .2s; scroll-margin-top: 18px; }
.post-card:target, .post-card.highlight { border-color: #83987a; }
.post-card:hover { border-color: #526452; }
.post-card.fresh { animation: settle .9s ease-out; }
@keyframes settle { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.post-topline { display: flex; align-items: center; justify-content: space-between; color: #8c9b8d; font-size: 12px; }
.post-mood { color: #b6c9ae; }
.post-body { font: 15px/1.95 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; margin: 13px 0 18px; color: #e1e4dc; }
.post-capsule { margin: -8px 0 14px; font-size: 12px; color: #b09a6a; letter-spacing: .03em; }
.post-actions { display: flex; align-items: center; gap: 17px; border-top: 1px solid #2b342e; padding-top: 11px; }
.reaction-button, .share-button, .report-button { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: #9ba79d; font-size: 12px; cursor: pointer; padding: 2px; }
.reaction-button:hover, .reaction-button.reacted { color: var(--rose); }
.reaction-button > span:first-child { font-size: 16px; }
.share-button { margin-left: auto; }
.share-button:hover { color: var(--green); }
.report-button { color: #747f76; }
.report-button:hover { color: #e3b797; }
.loading-state, .empty-state { padding: 36px 15px; text-align: center; color: #859087; border: 1px dashed #354039; font: 14px var(--serif); }
.wall-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.load-more { margin: 18px auto 0; border: 1px solid #47554a; background: transparent; color: #c2d0bf; padding: 8px 18px; cursor: pointer; font-size: 13px; }
.load-more:hover { border-color: #9eb397; }
.waiting-note { margin: 6px 0 0; font-size: 12px; color: #b09a6a; }
.new-pill { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; border: 1px solid #7b9578; background: #1d2721; color: #d9e7d3; padding: 9px 20px; border-radius: 20px; font-size: 13px; cursor: pointer; box-shadow: 0 10px 30px #00000066; }
.new-pill:hover { background: #263329; }

/* 年轮 */
.rings { border-top: 1px solid #2e3931; padding: 52px 0 44px; }
.rings-body { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.ring-figure { position: relative; width: 220px; height: 220px; flex: none; }
.ring-figure svg { width: 100%; height: 100%; display: block; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; pointer-events: none; }
.ring-center span { font: 300 40px/1 var(--serif); color: #dbe6d3; }
.ring-center small { font-size: 12px; color: #869383; letter-spacing: .1em; }
.rings-text { flex: 1; min-width: 220px; }
.weather { font: 16px/1.9 var(--serif); color: #d4ddcc; margin: 0 0 12px; }
.ring-stats { font-size: 13px; color: #96a297; margin: 0 0 10px; }
.ring-stats b { color: #cfdcc8; font-weight: 500; }
.ring-legend { font-size: 12px; color: #6f7c72; margin: 0; }

.about { border-top: 1px solid #2e3931; padding: 28px 0 40px; display: flex; gap: 16px; color: #98a39a; font: 13px/2 var(--serif); }
.about p { margin: 0; }
footer { max-width: 810px; margin: auto; padding: 0 30px 26px; display: flex; justify-content: space-between; color: #667268; font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.noscript { text-align: center; color: #b09a6a; font-size: 13px; }

/* 漫游 */
.wander { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; }
.wander[hidden] { display: none; }
.wander-backdrop { position: absolute; inset: 0; background: #070a08e0; backdrop-filter: blur(6px); }
.wander-card { position: relative; width: min(620px, 100%); max-height: 84vh; display: flex; flex-direction: column; border: 1px solid #43503f; background: linear-gradient(160deg, #1d2620, #151b18); box-shadow: 0 40px 90px #00000099; padding: 22px 26px 20px; animation: drift .45s ease-out; }
@keyframes drift { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.wander-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-right: 30px; }
.wander-label { font-size: 12px; letter-spacing: .2em; color: var(--gold); }
.wander-moods { display: flex; gap: 6px; flex-wrap: wrap; }
.wander-mood { background: none; border: 1px solid #39433c; color: #94a294; font-size: 12px; padding: 4px 9px; border-radius: 20px; cursor: pointer; }
.wander-mood.selected, .wander-mood:hover { border-color: #7d9679; color: #d6e3d0; }
.wander-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: #8d9a8e; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.wander-close:hover { color: var(--rose); }
.wander-body-wrap { overflow-y: auto; padding: 34px 2px 26px; }
.wander-body { font: 400 21px/2 var(--serif); color: #eef0e4; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wander-body.is-new { animation: fadein .4s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.wander-meta { margin: 18px 0 0; font-size: 12px; color: #869383; }
.wander-actions { display: flex; align-items: center; gap: 12px; border-top: 1px solid #303a2f; padding-top: 15px; }
.wander-fav { background: none; border: 1px solid #3d4a3c; color: #a8b6a6; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.wander-fav:hover:not(:disabled) { border-color: #7d9679; color: #d6e3d0; }
.wander-fav.on { color: var(--gold); border-color: #7a6a42; }
.wander-next { margin-left: auto; background: #c2d5ba; border: 0; color: #1a241b; padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
.wander-next:hover { background: #d4e4cd; }
.wander-foot { margin: 12px 0 0; font-size: 12px; color: #6f7c72; }

/* 我的留言 */
.mine-card { max-width: 680px; }
.mine-title { color: #a9b6a8; font-size: 13px; }
.mine-change { display: none; background: none; border: 0; color: var(--green); font-size: 12px; padding: 2px 0; cursor: pointer; }
.mine-change:hover { color: #d4e4cd; }
.mine-form { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.mine-form .claim-input-wrap { flex: 1; min-width: 190px; }
.mine-submit { flex: none; background: #c2d5ba; border: 0; color: #1a241b; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 2px; }
.mine-submit:hover { background: #d4e4cd; }
.mine-submit:disabled, .mine-submit[aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
.mine-hint { margin: 0 0 12px; font-size: 12px; line-height: 1.8; color: #8a978c; }
.mine-status { min-height: 20px; margin: 0 0 10px; font-size: 13px; color: var(--green); }
.mine-status.error { color: #edac9b; }
/* order 让「再看更多」在视觉上回到列表下面，但 DOM 里排在列表前面，键盘一次 Tab 就能到。 */
.mine-results { order: 1; flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 10px; padding-right: 2px; }
.mine-results:focus-visible { outline: 1px solid #7d9679; outline-offset: 2px; }
.mine-item { border: 1px solid #2d3730; background: rgba(25, 31, 28, .72); padding: 14px 16px 12px; }
/* 「再看更多」追加后，第一条新卡片停在可视区顶部并短暂描边：告诉你从这一条接着读。 */
.mine-item.is-new { animation: mine-item-in 1.6s ease-out; }
@keyframes mine-item-in {
  from { border-color: #8fae87; background: rgba(58, 84, 60, .5); }
  to { border-color: #2d3730; background: rgba(25, 31, 28, .72); }
}
.mine-item-top { display: flex; justify-content: space-between; gap: 10px; color: #8c9b8d; font-size: 12px; }
.mine-item-body { font: 14px/1.9 var(--serif); color: #e1e4dc; white-space: pre-wrap; overflow-wrap: anywhere; margin: 9px 0 11px; }
.mine-item-actions { display: flex; align-items: center; gap: 14px; border-top: 1px solid #2b342e; padding-top: 9px; }
.mine-item-actions button { background: none; border: 0; color: #9ba79d; font-size: 12px; cursor: pointer; padding: 2px; }
.mine-item-actions button:hover { color: var(--green); }
.mine-item-note { margin: 9px 0 0; font-size: 12px; line-height: 1.8; color: #8a978c; }
.mine-item-locked { border-style: dashed; }
.mine-item-hidden { opacity: .8; }
.mine-empty { padding: 28px 15px; text-align: center; color: #859087; border: 1px dashed #354039; font: 14px var(--serif); }
.mine-more { order: 2; flex: none; align-self: center; margin: 14px auto 0; border: 1px solid #47554a; background: transparent; color: #c2d0bf; padding: 8px 18px; cursor: pointer; font-size: 13px; }
.mine-more:hover { border-color: #9eb397; }
.mine-more.is-done { color: #7f8c80; border-color: #39433c; cursor: default; }
.mine-more.is-done:hover { border-color: #39433c; }

@media (max-width: 600px) {
  .topbar { padding: 18px 20px; }
  .topnav { gap: 14px; }
  main { padding: 0 18px; }
  .hero { padding: 52px 0 46px; }
  .hero h1 { font-size: 54px; }
  .intro { font-size: 14px; }
  .daily-prompt { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
  .daily-prompt-actions { grid-column: 1 / -1; justify-content: flex-start; gap: 16px; }
  .write-panel { padding: 22px 18px 19px; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .submit-button { width: 100%; }
  .claim-input-wrap { min-width: 0; }
  .mine-form { align-items: stretch; flex-direction: column; }
  .mine-form .claim-input-wrap { min-width: 0; }
  .mine-submit { width: 100%; }
  /* 手机上查过之后收起输入区，把高度让给结果；「换个暗号」可以把表单叫回来。 */
  .mine-card.has-results .mine-form,
  .mine-card.has-results .mine-hint { display: none; }
  .mine-card.has-results .mine-change { display: inline-block; }
  .wall { padding: 50px 0 38px; }
  .wall-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .post-card { padding: 17px 16px 14px; }
  .post-body { font-size: 14px; }
  .rings-body { gap: 24px; justify-content: center; }
  .ring-figure { width: 190px; height: 190px; }
  .rings-text { min-width: 100%; text-align: center; }
  .wander { padding: 14px; }
  .wander-card { padding: 18px 18px 16px; max-height: 88vh; }
  .wander-body { font-size: 18px; }
  footer { padding: 0 18px 20px; gap: 18px; }
  .desktop-only { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
