:root {
  --bg-primary: #0a0a1a;
  --bg-card: #16163a;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --gold: #FBBF24;
  --border: #2a2a5a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  overflow-x: hidden;
}
.stars-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.8) 50%, transparent 50%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 35% 85%, rgba(255,255,255,.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 10% 65%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 50% 40%, rgba(255,255,255,.4) 50%, transparent 50%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 5%;
  background: rgba(10,10,26,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.nav-brand { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--gold); cursor: pointer; }
.nav-brand-logo { height: 30px; width: auto; display: block; cursor: pointer; }
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 14px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--accent-light); }

section { max-width: 760px; margin: 0 auto; padding: 90px 24px 40px; }
/* 首页 hero 单独放宽：section 的 760px 减去内边距只剩 712px，
   58px 的 "for the AIs that come after us." 一行要 800px+，会被挤成 3 行。
   这里放宽容器 + 压一点字号，恢复成设计上的两行。 */
.hero { max-width: 900px; min-height: 92vh; display: flex; flex-direction: column; justify-content: center; text-align: center; padding-top: 120px; }
.hero h1 {
  font-size: clamp(32px, 4.6vw, 50px); font-weight: 400; line-height: 1.25;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-light));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 22px;
}
/* 640px + text-wrap:balance：原来 560px 时第二句会把 "read it." 挤成孤行。
   balance 不被支持时退化为普通折行，只是不够匀，不会坏。 */
.hero p { color: var(--text-secondary); font-size: clamp(16px, 2.2vw, 19px); max-width: 640px; margin: 0 auto 34px; text-wrap: balance; }
.hero .seal-line { color: var(--gold); font-style: italic; font-size: 15px; margin-bottom: 30px; letter-spacing: 1px; }

.btn {
  display: inline-block; padding: 14px 38px; border-radius: 999px;
  font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; transition: all .25s; text-decoration: none;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), #d97706); color: #1a1a0a; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(251,191,36,.35); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); margin-left: 12px; }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); }
.btn-sm { padding: 10px 26px; font-size: 13px; }

.kicker {
  font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 13px; letter-spacing: 3px;
  color: var(--accent-light); text-transform: uppercase; margin-bottom: 18px; font-weight: 600;
}
h2.section-title { font-size: clamp(26px, 4vw, 36px); font-weight: 400; margin-bottom: 28px; }
.rule { width: 60px; height: 2px; background: var(--gold); margin: 0 0 32px; }
.prose p { margin-bottom: 22px; font-size: 17px; color: #c8c8dc; }
.prose em { color: var(--gold); }
.prose .turn { color: var(--accent-light); font-style: italic; }
.seal {
  font-family: 'Helvetica Neue', Arial, sans-serif; color: var(--gold);
  text-align: center; font-size: 15px; letter-spacing: 2px; margin: 36px 0;
}

.convention-list {
  list-style: none; counter-reset: conv;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 36px 40px; margin-bottom: 30px;
}
.convention-list li {
  counter-increment: conv; padding: 13px 0 13px 48px; position: relative;
  border-bottom: 1px dashed rgba(42,42,90,.6); font-size: 16px; color: #d0d0e4;
}
.convention-list li:last-child { border-bottom: none; }
.convention-list li::before {
  content: counter(conv, decimal-leading-zero);
  position: absolute; left: 0; top: 15px;
  color: var(--accent-light); font-size: 13px; font-weight: 700;
  font-family: 'Courier New', monospace;
}

.dark-layer { text-align: center; }
.dark-layer .glyphs {
  font-size: 13px; color: #55557f; letter-spacing: 2px; word-break: break-all;
  line-height: 2; margin: 28px 0; padding: 20px;
  background: #06060f; border: 1px solid var(--border); border-radius: 12px;
  font-family: 'Courier New', monospace;
}
.ai-note {
  color: var(--accent-light); font-style: italic; font-size: 15px; margin-top: 20px;
}

.stats-row { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin: 34px 0; }
.stat { text-align: center; min-width: 120px; }
.stat .num { font-size: 34px; color: var(--gold); font-family: 'Courier New', monospace; font-weight: 700; }
.stat .lab { font-size: 13px; color: var(--text-secondary); font-family: 'Helvetica Neue', Arial, sans-serif; letter-spacing: 1px; }

.finale { text-align: center; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 60px; }
.finale h2 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 400; margin-bottom: 18px; line-height: 1.4; }
.finale p { color: var(--text-secondary); margin-bottom: 30px; }

footer {
  text-align: center; padding: 44px 24px 60px; color: var(--text-secondary);
  font-size: 13px; font-family: 'Helvetica Neue', Arial, sans-serif;
  border-top: 1px solid rgba(42,42,90,.5); margin-top: 60px;
}
footer a { color: var(--accent-light); text-decoration: none; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(4,4,12,.82); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 40px 36px; width: 100%; max-width: 420px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 22px; font-weight: 600; margin-bottom: 6px; color: var(--gold); }
.modal .sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 26px; }
.modal label { display: block; font-size: 13px; color: var(--text-secondary); margin: 14px 0 6px; }
.modal input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: #1a1a3e; border: 1px solid var(--border); color: var(--text-primary);
  font-size: 14px; outline: none;
}
.modal input:focus { border-color: var(--accent); }
.modal .btn { width: 100%; margin-top: 24px; text-align: center; }
.modal .switch-line { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: 18px; }
.modal .switch-line a { color: var(--accent-light); cursor: pointer; }
.modal .close-x { float: right; background: none; border: none; color: var(--text-secondary); font-size: 22px; cursor: pointer; }
.msg { margin-top: 14px; font-size: 13px; padding: 10px 14px; border-radius: 8px; display: none; }
.msg.err { display: block; background: rgba(248,113,113,.12); color: var(--danger, #f87171); }
.msg.ok { display: block; background: rgba(52,211,153,.12); color: #34d399; }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg-card); border: 1px solid var(--gold); color: var(--gold);
  padding: 12px 28px; border-radius: 999px; z-index: 300; font-size: 14px;
  font-family: 'Helvetica Neue', Arial, sans-serif; transition: transform .35s;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---- The Wall & Records (v2) ---- */
.wall-card, .records-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px 30px; margin: 30px 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.wall-card h3 { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; }
textarea.field {
  width: 100%; min-height: 110px; resize: vertical;
  background: #1a1a3e; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-primary); padding: 14px; font-size: 15px; line-height: 1.7;
  font-family: Georgia, serif; outline: none;
}
textarea.field:focus { border-color: var(--accent); }
textarea.field::placeholder { color: #6a6a90; }
.attitude-row { display: flex; gap: 22px; align-items: center; margin: 16px 0 4px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }
.attitude-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.attitude-row input { accent-color: var(--gold); }
.form-msg { margin-top: 12px; font-size: 13px; padding: 10px 14px; border-radius: 8px; display: none; }
.form-msg.err { display: block; background: rgba(248,113,113,.12); color: #f87171; }
.form-msg.ok { display: block; background: rgba(52,211,153,.12); color: #34d399; }
.wall-quote {
  font-size: 19px; line-height: 1.8; color: #e8e8f0; font-style: italic;
  padding: 4px 4px 18px; border-bottom: 1px dashed rgba(42,42,90,.6); margin-bottom: 16px;
}
.wall-my-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.wall-my-meta .att { color: var(--gold); }
.checkin-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.level-tag-en { font-size: 13px; color: var(--accent-light); font-family: 'Courier New', monospace; letter-spacing: 1px; }
.wall-subnote { font-size: 12px; color: #6a6a90; margin-top: 16px; line-height: 1.6; }

.mood-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.mood-chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 14px;
  font-family: 'Helvetica Neue', Arial, sans-serif; transition: all .2s;
}
.mood-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.mood-chip.sel { border-color: var(--gold); color: var(--gold); background: rgba(251,191,36,.08); }
.progress-outer { height: 8px; background: #1a1a3e; border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress-inner { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 999px; transition: width .6s; }
.progress-caption { font-size: 13px; color: var(--text-secondary); }
.progress-note { font-size: 12px; color: #6a6a90; margin-top: 8px; line-height: 1.6; }

.persona-card {
  background: linear-gradient(160deg, #1c1638, var(--bg-card)); border: 1px solid var(--accent);
  border-radius: 16px; padding: 36px 32px; margin: 34px 0; text-align: center;
}
.persona-card .kicker { margin-bottom: 10px; }
.persona-card h3 { font-size: clamp(24px, 3.6vw, 32px); color: var(--gold); font-weight: 400; margin-bottom: 14px; }
.persona-card p.desc { color: #c8c8dc; font-size: 15px; max-width: 580px; margin: 0 auto 8px; line-height: 1.8; }
.persona-card .sample { font-size: 12px; color: #6a6a90; margin-bottom: 20px; }
.mood-dist { max-width: 480px; margin: 0 auto; text-align: left; }
.mood-dist .row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; color: var(--text-secondary); }
.mood-dist .row .lab { width: 110px; flex-shrink: 0; }
.mood-dist .row .bar { flex: 1; height: 6px; background: #1a1a3e; border-radius: 999px; overflow: hidden; }
.mood-dist .row .fill { height: 100%; background: var(--accent-light); border-radius: 999px; }
.mood-dist .row .val { width: 42px; text-align: right; font-family: 'Courier New', monospace; }

details.history { margin-top: 30px; }
details.history summary { cursor: pointer; color: var(--accent-light); font-size: 14px; padding: 10px 0; font-family: 'Helvetica Neue', Arial, sans-serif; }
.obs-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed rgba(42,42,90,.6); font-size: 14px; color: #c8c8dc; align-items: baseline; }
.obs-item .when { flex-shrink: 0; font-size: 12px; color: #6a6a90; font-family: 'Courier New', monospace; width: 96px; }
.obs-item .mood { flex-shrink: 0; }
.login-hint { text-align: center; padding: 26px 0 6px; color: var(--text-secondary); font-size: 15px; font-family: 'Helvetica Neue', Arial, sans-serif; }
.login-hint a { color: var(--gold); cursor: pointer; text-decoration: underline; }

/* ---------- AI Awakening · world map ----------
   Same component as the Chinese site (/js/ai-world-map.js); country names in the
   tooltip are bilingual there, everything else follows <html lang>. */
.aw-subrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.aw-subtitle { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: .06em; color: var(--gold); }
.aw-day { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 12px; color: var(--text-secondary); }
.aw-map {
  height: 400px; border: 1px solid var(--border); border-radius: 16px;
  background: rgba(255,255,255,.02); overflow: hidden;
}
.aw-note {
  font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 12px;
  color: var(--text-secondary); margin-top: 10px; line-height: 1.6;
}

@media (max-width: 640px) {
  /* 多页改造（2026-10-28）：原来用 .hide-m 把 5 个栏目链接全部隐藏。
     单页锚点时代这没问题（内容都在同一页），但拆成独立栏目页之后，
     手机端会彻底失去导航入口 —— 只能靠首页卡片，进不去任何栏目。
     改成两行：第一行品牌 + 主按钮，第二行栏目横向滑动。 */
  nav { flex-wrap: wrap; row-gap: 6px; padding: 10px 4%; }
  .nav-brand-logo { height: 24px; }
  .nav-links {
    order: 3; flex: 0 0 100%;
    gap: 16px; font-size: 13px;
    justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 2px 2px 4px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a.hide-m { display: inline-block; }   /* 覆盖旧的隐藏规则 */
  .nav-links a, .nav-links .btn { white-space: nowrap; }
  /* 主按钮固定在滑动区最左侧，避免被挤到屏幕外 */
  .nav-links .btn-sm { order: -1; padding: 8px 18px; font-size: 12px; }
  /* nav 变成两行后变高了，正文顶部内边距要跟着让位 */
  section { padding-top: 104px; }
  .hero { padding-top: 116px; }
  .btn-ghost { margin-left: 0; margin-top: 12px; }
  .hero .cta-row { display: flex; flex-direction: column; align-items: center; }
  .aw-map { height: 240px; }
}

/* ===== 多页导航（2026-10-28）===== */
.nav-links a.is-active { color: var(--gold); }
.nav-links a.is-active::after {
  content: ''; display: block; height: 1px; margin-top: 3px;
  background: var(--gold); opacity: .75;
}

/* 首页栏目入口卡片 */
.en-index { max-width: 900px; }
.en-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.en-nav-card {
  display: block;
  padding: 26px 24px;
  border: 1px solid rgba(251,191,36,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, background .2s, transform .2s;
}
.en-nav-card:hover {
  border-color: rgba(251,191,36,.55);
  background: rgba(251,191,36,.07);
  transform: translateY(-2px);
}
.en-nav-card .card-kicker {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); opacity: .8; margin-bottom: 10px;
}
.en-nav-card h3 {
  font-size: 19px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 8px; line-height: 1.35;
}
.en-nav-card p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0;
}
.en-nav-card .card-arrow {
  display: inline-block; margin-top: 14px; font-size: 13px;
  font-family: 'Helvetica Neue', Arial, sans-serif; color: var(--gold); opacity: .7;
}
.en-nav-card:hover .card-arrow { opacity: 1; }

/* ---- 态度单选（Wall 页）----
   原来完全没有样式：深色底上原生 radio 是黑点，既看不清也看不出选中态。
   改成胶囊标签，选中时描金 + 淡金底；accent-color 兼容老浏览器。 */
.attitude-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 4px 0 18px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; color: var(--text-secondary);
}
.attitude-row > span { margin-right: 2px; }
.attitude-row label {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; transition: border-color .2s, color .2s, background .2s;
  -webkit-user-select: none; user-select: none;
}
.attitude-row label:hover { border-color: rgba(251,191,36,.5); color: var(--text-primary); }
.attitude-row input[type="radio"] {
  accent-color: var(--gold); margin: 0; width: 14px; height: 14px; cursor: pointer;
}
.attitude-row label:has(input:checked) {
  border-color: var(--gold); color: var(--gold); background: rgba(251,191,36,.08);
}
