:root {
  --bg: #f7f1e8;
  --surface: #fffaf2;
  --surface-alt: #efe5d5;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --accent: #a63a2f;
  --accent-hover: #832b22;
  --gold: #b88435;
  --border: rgba(43, 33, 24, 0.16);
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.hm-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.hm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hm-skip { position: absolute; left: 16px; top: -64px; z-index: 40; background: var(--ink); color: #fffaf2; padding: 10px 16px; border-radius: var(--radius); text-decoration: none; }
.hm-skip:focus { top: 12px; }

/* 页头 */
.hm-header { position: sticky; top: 0; z-index: 20; background: #2b2118; color: #f7f1e8; border-bottom: 2px solid var(--accent); }
.hm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.hm-brand { display: inline-flex; align-items: center; background: var(--bg); padding: 4px 10px; border-radius: 6px; text-decoration: none; }
.hm-brand img { height: 34px; width: auto; }
.hm-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: #efe5d5; text-decoration: none; font-family: var(--font-serif); font-weight: 700; font-size: 16px;
  border-bottom: 2px solid transparent;
}
.hm-nav a:hover, .hm-nav a[aria-current="page"] { color: #ffffff; border-bottom-color: var(--gold); }

/* 按钮 */
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.hm-btn:hover { background: var(--surface-alt); border-color: var(--ink); }
.hm-btn-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.hm-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #ffffff; }
.hm-btn-play {
  background: var(--accent); border-color: var(--accent); color: #ffffff;
  min-height: 52px; padding: 0 32px; font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  box-shadow: var(--shadow-md);
}
.hm-btn-play:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.hm-btn[data-gf-liked], .hm-btn[aria-pressed="true"] { background: #fbeae7; border-color: var(--accent); color: var(--accent); }
.hm-count { font-size: 14px; opacity: 0.85; }
.hm-share-msg { font-size: 14px; color: var(--accent); font-weight: 600; }

/* 首屏游戏舞台 */
.hm-stage-section { padding: 24px 0 40px; }
.hm-stage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hm-title-group h1 { margin: 0; font-family: var(--font-serif); font-size: 38px; font-weight: 900; line-height: 1.2; color: var(--ink); }
.hm-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.hm-stage-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.hm-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 540px;
  background: #2b2118; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.hm-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #eee4d0; }
.hm-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.hm-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45); }
.hm-cover-panel {
  position: relative; z-index: 2; max-width: 520px; margin: 24px; padding: 28px 32px;
  background: rgba(255, 250, 242, 0.94); border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center; box-shadow: var(--shadow-md);
}
.hm-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin: 0 auto 12px;
  border: 2px solid var(--accent); border-radius: 6px; color: var(--accent);
  font-family: var(--font-serif); font-size: 16px; font-weight: 900; letter-spacing: 0.08em;
}
.hm-cover-lead { margin: 0 0 18px; font-size: 16px; color: var(--ink); }
.hm-cover-meta { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* 专属加载动画（朱砂印章脉冲） */
.hm-loader {
  position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg); color: var(--ink); padding: 24px; text-align: center;
}
.hm-stage[data-gf-state="loading"] .hm-loader { display: flex; }
.hm-stage[data-gf-state="loading"] .hm-cover,
.hm-stage[data-gf-state="playing"] .hm-cover { display: none; }
.hm-loader-seal {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  background: var(--accent); color: #fffaf2; border-radius: 10px;
  font-family: var(--font-serif); font-size: 22px; font-weight: 900;
  animation: hmPulse 1.4s ease-in-out infinite;
}
@keyframes hmPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.78; } }

.hm-stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--muted);
}
.hm-stage-bar a { font-weight: 600; text-decoration: none; }

/* 区块与排版 */
.hm-section { padding: 56px 0; }
.hm-section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hm-section h2, .hm-article-page h2 { margin: 0 0 20px; font-family: var(--font-serif); font-size: 28px; font-weight: 900; line-height: 1.25; }
.hm-section h3, .hm-article-page h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1.35; }
.hm-section-lead { margin: -8px 0 24px; color: var(--muted); max-width: 70ch; }
.hm-prose { max-width: 70ch; }
.hm-prose p { margin: 0 0 16px; }
.hm-prose ul, .hm-prose ol { margin: 0 0 18px; padding-left: 22px; }
.hm-prose li { margin-bottom: 8px; }
.hm-prose h2 { margin-top: 32px; }
.hm-prose h3 { margin-top: 22px; }

.hm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.hm-stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.hm-stat-card { padding: 20px; }
.hm-stat-card p { margin: 0; font-size: 14px; color: var(--muted); }

.hm-scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hm-scenario-card { overflow: hidden; }
.hm-scenario-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hm-scenario-body { padding: 20px; }
.hm-year-badge { display: inline-block; padding: 2px 10px; margin-bottom: 8px; border-radius: 6px; background: #fbeae7; color: var(--accent); font-size: 13px; font-weight: 600; }
.hm-scenario-body p { margin: 0; color: var(--muted); font-size: 15px; }
.hm-more-link { margin: 24px 0 0; font-size: 16px; font-weight: 600; }

.hm-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.hm-steps, .hm-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.hm-steps li, .hm-tips li { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hm-steps p, .hm-tips p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.hm-faq-list { display: grid; gap: 12px; max-width: 780px; }
.hm-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.hm-faq-item summary { cursor: pointer; list-style: none; }
.hm-faq-item summary::-webkit-details-marker { display: none; }
.hm-faq-item summary h3 { display: inline; margin: 0; font-size: 17px; }
.hm-faq-item p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* 评论区 */
.hm-comments-wrap { max-width: 780px; }
.hm-comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hm-comment-badge { font-size: 14px; color: var(--muted); }
.hm-comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.hm-reply-bar { display: none; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 8px 12px; background: var(--surface-alt); border-radius: 6px; font-size: 14px; }
.hm-comment-form[data-gf-replying] .hm-reply-bar { display: flex; }
.hm-form-row { margin-bottom: 14px; }
.hm-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.hm-field input, .hm-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #ffffff; color: var(--ink); font-family: inherit; font-size: 15px;
}
.hm-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hm-form-msg { font-size: 14px; color: var(--accent); }
.hm-comments-list { display: grid; gap: 12px; }
.hm-comments-empty { display: none; margin: 0; padding: 18px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); font-size: 15px; }
.hm-comments-list[data-gf-empty] .hm-comments-empty { display: block; }
.hm-comments-list[data-gf-off] { display: none; }
.hm-comment { padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hm-comment[data-gf-owner], .hm-reply[data-gf-owner] { border-left: 3px solid var(--accent); background: #fff6ee; }
.hm-comment-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.hm-comment-meta strong { color: var(--ink); }
.hm-owner-tag { padding: 1px 8px; border-radius: 4px; background: var(--accent); color: #ffffff; font-size: 12px; font-weight: 600; }
.hm-comment-text { margin: 0 0 8px; white-space: pre-wrap; }
.hm-reply-btn { background: none; border: 0; padding: 4px 0; min-height: 32px; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.hm-replies { display: grid; gap: 10px; margin-top: 10px; padding-left: 16px; border-left: 2px solid var(--border); }
.hm-reply { padding: 10px 14px; background: var(--bg); border-radius: 8px; }
.hm-reply-target { color: var(--accent); font-weight: 600; }

/* 内页 */
.hm-article-page { padding: 28px 0 64px; }
.hm-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.hm-crumbs a { color: var(--muted); text-decoration: none; }
.hm-page-head { margin-bottom: 28px; }
.hm-page-head h1 { margin: 0 0 12px; font-family: var(--font-serif); font-size: 36px; font-weight: 900; line-height: 1.2; }
.hm-page-lead { margin: 0 0 18px; font-size: 18px; color: var(--muted); max-width: 66ch; }

.hm-page-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hm-page-figure { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.hm-page-faq { margin-top: 40px; }
.hm-related { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-weight: 600; }
.hm-notfound { max-width: 600px; text-align: center; padding: 32px 0; }
.hm-notfound .hm-page-cta { justify-content: center; }

/* 页脚 */
.hm-footer { background: #2b2118; color: #efe5d5; padding: 36px 0 28px; }
.hm-footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 250, 242, 0.14); }
.hm-footer-brand strong { font-family: var(--font-serif); font-size: 20px; color: #ffffff; }
.hm-footer-brand p { margin: 6px 0 0; font-size: 14px; color: #cbbba6; }
.hm-footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.hm-footer-nav a { color: #efe5d5; text-decoration: none; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.hm-footer-nav a:hover { color: #ffffff; }
.hm-footer-copy { padding-top: 16px; font-size: 13px; color: #b7a58f; }
.hm-footer-copy p { margin: 0; }

@media (max-width: 900px) {
  .hm-stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hm-wrap { padding: 0 16px; }
  .hm-title-group h1, .hm-page-head h1 { font-size: 28px; }
  .hm-stage { min-height: 480px; aspect-ratio: auto; height: 74vh; }
  .hm-cover-panel { padding: 20px; margin: 16px; }
  .hm-stage-actions { width: 100%; }
  .hm-stage-actions .hm-btn { flex: 1 1 auto; }
  .hm-stats-strip, .hm-scenario-grid { grid-template-columns: 1fr; }
}
