:root {
  --mist: #e3f2fd;
  --paper: #ffffff;
  --ink: #4a4a4a;
  --slate: #4a4a4a;
  --red: #d32f2f;
  --gold: #ffd700;
  --brass: #b8860b;
  --line: rgba(74, 74, 74, 0.18);
  --shadow: 0 18px 46px rgba(74, 74, 74, 0.16);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 12px; }
.skip-link:focus { left: 8px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(74, 74, 74, .08);
}
.nav-wrap { max-width: var(--max); margin: auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .04em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: block; flex: 0 0 34px; object-fit: contain; background: url("../img/favicon.ico") center / contain no-repeat; color: transparent; font-size: 0; }
.brand small { display: block; color: var(--slate); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--paper); padding: 7px 10px; cursor: pointer; }
.nav-list { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav-list a { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 12px; color: var(--slate); font-size: 14px; border-bottom: 2px solid transparent; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--red); border-bottom-color: var(--gold); }

.hero {
  position: relative; min-height: 650px; display: grid; align-items: center; overflow: hidden;
  background: var(--slate) url("../img/fec8f2a3f2e808ccb17c4d278b4fa469-1024x573.webp") center/cover no-repeat;
  isolation: isolate;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(74, 74, 74, .58); }
.hero::after { content: ""; position: absolute; width: 72vw; height: 72vw; max-width: 880px; max-height: 880px; right: -30%; top: -46%; border: 1px solid rgba(255,215,0,.28); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,215,0,.05), 0 0 0 44px rgba(255,215,0,.04); transform: rotate(-15deg); pointer-events: none; }
.hero-inner { width: min(var(--max), calc(100% - 48px)); margin: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 54px; align-items: center; }
.eyebrow { color: var(--gold); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { margin: 10px 0 14px; color: var(--paper); font-size: clamp(38px, 6vw, 72px); line-height: 1.08; letter-spacing: .06em; }
.hero-lead { max-width: 690px; color: var(--mist); font-size: 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.meta-chip { border: 1px solid rgba(255,215,0,.72); color: var(--gold); padding: 4px 10px; font-size: 13px; background: rgba(74, 74, 74, .48); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.download-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 9px 20px; border: 1px solid var(--gold); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.download-button { color: var(--paper); background: var(--red); border-color: var(--gold); box-shadow: 0 8px 18px rgba(211,47,47,.28); }
.outline-button { color: var(--paper); background: rgba(255,255,255,.12); }
.download-button:hover, .outline-button:hover { transform: translateY(-2px); }
.outline-button:hover { background: rgba(255,255,255,.18); }
.button-mark { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }

.fortress-panel { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid rgba(255,215,0,.62); background: rgba(74, 74, 74, .78); box-shadow: var(--shadow); transition: background .3s ease, border-color .3s ease, box-shadow .3s ease; }
.fortress-panel h2 { margin: 0 0 8px; color: var(--gold); font-size: 18px; }
.fortress-panel p { margin: 0 0 16px; color: var(--mist); font-size: 13px; }
.module-list { display: grid; gap: 8px; }
.module-button { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 11px; text-align: left; color: var(--paper); background: rgba(255,255,255,.08); border: 1px solid rgba(227,242,253,.28); cursor: pointer; transition: background .25s ease, border-color .25s ease, transform .25s ease; }
.module-button:hover, .module-button[aria-expanded="true"] { border-color: var(--gold); background: rgba(211,47,47,.2); }
.module-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--brass); color: var(--gold); font-size: 12px; }
.module-button strong { font-size: 14px; }
.module-button small { display: block; color: var(--mist); font-size: 11px; }
.module-arrow { color: var(--gold); font-size: 18px; }
.module-detail { margin-top: 10px; padding: 12px 14px; color: var(--paper); background: rgba(227,242,253,.12); border-left: 3px solid var(--red); font-size: 13px; transition: background .25s ease, border-color .25s ease; }

.hero[data-module-state="forge"] .fortress-panel { border-color: var(--brass); box-shadow: 0 18px 46px rgba(184,134,11,.25); }
.hero[data-module-state="forge"] .module-detail { border-left-color: var(--brass); background: rgba(184,134,11,.18); }
.hero[data-module-state="shrine"] .fortress-panel { border-color: var(--mist); background: rgba(74,74,74,.68); box-shadow: 0 18px 46px rgba(227,242,253,.25); }
.hero[data-module-state="shrine"] .module-detail { border-left-color: var(--mist); background: rgba(227,242,253,.2); }
.hero[data-module-state="arena"] .fortress-panel { border-color: var(--red); box-shadow: 0 18px 46px rgba(211,47,47,.3); }
.hero[data-module-state="arena"] .module-detail { border-left-color: var(--red); background: rgba(211,47,47,.18); }
.hero[data-module-state="tavern"] .fortress-panel { border-color: var(--gold); background: rgba(74,74,74,.74); box-shadow: 0 18px 46px rgba(255,215,0,.25); }
.hero[data-module-state="tavern"] .module-detail { border-left-color: var(--gold); background: rgba(255,215,0,.16); color: var(--paper); }

.section { padding: 80px 24px; }
.section.alt { background: var(--paper); }
.section-inner { max-width: var(--max); margin: auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; color: var(--slate); font-size: clamp(25px, 3vw, 36px); line-height: 1.25; }
.section-heading p { max-width: 610px; margin: 0; color: var(--slate); }
.section-kicker { margin: 0 0 8px; color: var(--red); font-size: 12px; letter-spacing: .16em; font-weight: 800; }
.section-heading .text-link { color: var(--red); font-size: 14px; white-space: nowrap; }

.summary-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; }
.summary-copy { padding: 28px; border-left: 4px solid var(--red); background: var(--mist); }
.summary-copy p { margin: 0; font-size: 17px; }
.fact-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fact { padding: 15px 17px; background: var(--paper); }
.fact dt { color: rgba(74,74,74,.72); font-size: 12px; }
.fact dd { margin: 2px 0 0; color: var(--slate); font-weight: 800; }

.feature-grid, .index-grid, .gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card, .index-card { position: relative; padding: 22px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 9px 24px rgba(74, 74, 74, .08); }
.feature-card::before, .index-card::before { content: ""; position: absolute; left: 0; top: 0; width: 38px; height: 3px; background: var(--red); }
.feature-card h3, .index-card h3 { margin: 8px 0 8px; color: var(--slate); font-size: 20px; }
.feature-card p, .index-card p { margin: 0; color: var(--slate); font-size: 14px; }
.index-card { min-height: 170px; display: flex; flex-direction: column; }
.index-card .text-link { margin-top: auto; padding-top: 16px; color: var(--red); font-weight: 700; font-size: 14px; }

.content-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 34px; align-items: center; }
.content-split figure { margin: 0; position: relative; }
.content-split figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 1px solid var(--line); }
figcaption { margin-top: 8px; color: var(--slate); font-size: 12px; }
.list-check { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.list-check li { position: relative; padding-left: 28px; }
.list-check li::before { content: "◆"; position: absolute; left: 0; top: 1px; color: var(--red); font-size: 12px; }

.timeline { display: grid; gap: 0; border-left: 2px solid var(--gold); margin-left: 8px; }
.timeline-item { position: relative; padding: 0 0 24px 28px; }
.timeline-item::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; background: var(--red); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--red); border-radius: 50%; }
.timeline-item time { color: var(--red); font-weight: 800; font-size: 13px; }
.timeline-item h3 { margin: 3px 0; color: var(--slate); font-size: 18px; }
.timeline-item p { margin: 0; color: var(--slate); }

.gallery-grid { grid-template-columns: repeat(4, 1fr); }
.gallery-grid figure { margin: 0; background: var(--paper); border: 1px solid var(--line); }
.gallery-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery-grid figcaption { padding: 8px 10px 10px; }

.faq-list { display: grid; gap: 10px; }
details { background: var(--paper); border: 1px solid var(--line); }
summary { cursor: pointer; padding: 15px 18px; color: var(--slate); font-weight: 800; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--red); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding: 0 18px 17px; color: var(--slate); }

.page-hero { padding: 82px 24px 64px; background: var(--slate) url("../img/4f5e0371f2a8b38db8b43f5219931cb0-1024x576.webp") center/cover no-repeat; color: var(--paper); position: relative; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(74, 74, 74, .72); }
.page-hero-inner { max-width: var(--max); margin: auto; }
.page-hero h1 { max-width: 780px; margin: 0 0 12px; font-size: clamp(32px, 5vw, 56px); line-height: 1.15; }
.page-hero p { max-width: 720px; margin: 0; color: var(--mist); }
.breadcrumb { max-width: var(--max); margin: 0 auto; padding: 16px 24px 0; color: var(--slate); font-size: 13px; }
.article { max-width: 860px; margin: 0 auto; }
.article h2 { margin: 42px 0 12px; color: var(--slate); font-size: 28px; border-left: 4px solid var(--red); padding-left: 12px; }
.article h3 { margin: 26px 0 8px; color: var(--slate); font-size: 20px; }
.article p { color: var(--slate); }
.article ul, .article ol { color: var(--slate); padding-left: 24px; }
.article li { margin: 7px 0; }
.article-intro { margin: 0 0 28px; padding: 22px 24px; background: var(--mist); border-left: 4px solid var(--red); font-size: 17px; }
.article-intro p { margin: 0; }
.article-toc { margin: 28px 0 36px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); }
.article-toc h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: 18px; }
.article-toc ol { columns: 2; margin: 0; padding-left: 20px; }
.article-toc a { color: var(--red); font-weight: 700; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.entry-card { padding: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 9px 24px rgba(74,74,74,.08); }
.entry-card h3 { margin-top: 0; }
.entry-card p:last-child, .entry-card ul:last-child { margin-bottom: 0; }
.rule-list { display: grid; gap: 12px; padding: 0; margin: 20px 0; list-style: none; }
.rule-list li { padding: 14px 16px 14px 20px; margin: 0; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.article-table { width: 100%; border-collapse: collapse; margin: 20px 0; background: var(--paper); border: 1px solid var(--line); }
.article-table th, .article-table td { padding: 12px 14px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.article-table th { color: var(--slate); background: var(--mist); font-size: 14px; }
.article-table td { color: var(--slate); font-size: 14px; }
.article-figure { margin: 28px 0; }
.article-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0; list-style: none; }
.tag-list li { margin: 0; padding: 4px 10px; color: var(--slate); background: rgba(255,215,0,.16); border: 1px solid rgba(184,134,11,.5); font-size: 13px; }
.route-steps { counter-reset: route; display: grid; gap: 14px; padding: 0; margin: 20px 0; list-style: none; }
.route-steps li { position: relative; min-height: 56px; margin: 0; padding: 15px 18px 15px 58px; background: var(--paper); border: 1px solid var(--line); }
.route-steps li::before { content: counter(route, decimal-leading-zero); counter-increment: route; position: absolute; left: 15px; top: 14px; color: var(--red); font-weight: 900; }
.article-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.article-links a { min-height: 80px; padding: 15px; color: var(--slate); background: var(--paper); border: 1px solid var(--line); font-weight: 800; }
.article-links a span { display: block; margin-top: 4px; color: var(--red); font-size: 13px; font-weight: 700; }
.note { padding: 18px 20px; margin: 20px 0; background: rgba(255,215,0,.14); border: 1px solid rgba(184,134,11,.5); }
.article .download-button { color: var(--paper); margin-top: 12px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.back-link { color: var(--red); font-weight: 800; }
.updated { color: var(--slate); font-size: 13px; }

.site-footer { padding: 46px 24px 32px; color: var(--mist); background: var(--slate); }
.footer-inner { max-width: var(--max); margin: auto; display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 32px; }
.site-footer h2, .site-footer h3 { margin: 0 0 10px; color: var(--gold); font-size: 16px; }
.site-footer p, .site-footer li { margin: 0; color: var(--mist); font-size: 13px; }
.site-footer ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 5px; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { max-width: var(--max); margin: 32px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); color: rgba(227,242,253,.78); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translate(-50%, 120px); padding: 10px 16px; color: var(--paper); background: var(--slate); border: 1px solid var(--gold); transition: transform .25s ease; }
.toast.is-visible { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero-inner, .summary-grid, .content-split { grid-template-columns: 1fr; }
  .hero { min-height: 760px; }
  .fortress-panel { max-width: 620px; }
  .feature-grid, .index-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .article-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav-wrap { padding: 10px 16px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .nav-list { display: none; width: 100%; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
  .nav-list.is-open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .nav-wrap { flex-wrap: wrap; }
  .nav-list a { padding: 8px 4px; justify-content: center; }
  .hero { min-height: 790px; }
  .hero-inner { width: min(var(--max), calc(100% - 32px)); gap: 30px; }
  .hero h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .section { padding: 56px 16px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 12px; }
  .feature-grid, .index-grid, .gallery-grid, .footer-inner { grid-template-columns: 1fr; }
  .article-grid, .article-links { grid-template-columns: 1fr; }
  .article-toc ol { columns: 1; }
  .article-table { display: block; overflow-x: auto; }
  .fact-table { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 60px 16px 46px; }
  .breadcrumb { padding-left: 16px; padding-right: 16px; }
}


/* Data-managed news and friend-link areas. These use the site's existing container and palette. */
.seo-news-section, .seo-friend-section { position: relative; padding: clamp(3.2rem, 7vw, 5.4rem) 0; color: var(--text, var(--ink, #e7e7dc)); background: var(--panel-strong, var(--paper, #fff)); }
.seo-news-section::before, .seo-friend-section::before { content: ""; position: absolute; top: 0; left: 50%; width: min(1160px, calc(100% - 40px)); height: 1px; background: var(--line, rgba(120, 120, 120, .28)); transform: translateX(-50%); }
.seo-shell { width: var(--container, min(var(--max, 1160px), calc(100% - 48px))); margin: 0 auto; }
.seo-kicker { margin: 0 0 .55rem; color: var(--accent, var(--red, var(--gold, #f4c430))); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.seo-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.seo-section-head h2 { margin: 0; color: inherit; font: inherit; font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 800; }
.seo-section-head p { max-width: 44rem; margin: 0; color: var(--muted, currentColor); }
.seo-news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.seo-news-card { display: flex; min-height: 100%; flex-direction: column; gap: .75rem; padding: 1.25rem; color: inherit; background: var(--panel, var(--paper, #fff)); border: 1px solid var(--line, rgba(120, 120, 120, .25)); border-radius: var(--radius, 4px); box-shadow: var(--shadow, 0 10px 24px rgba(0, 0, 0, .08)); }
.seo-news-card h3, .seo-news-card h2 { margin: 0; color: inherit; font: inherit; font-size: 1.18rem; font-weight: 800; line-height: 1.45; }
.seo-news-card time { color: var(--accent, var(--red, var(--aqua, #b8860b))); font-size: .82rem; font-weight: 700; }
.seo-news-card p { margin: 0; color: var(--muted, currentColor); line-height: 1.8; }
.seo-news-card a, .seo-friend-link { color: var(--accent, var(--red, var(--aqua, #b8860b))); font-weight: 800; }
.seo-news-card a { margin-top: auto; }
.seo-friend-links { display: flex; flex-wrap: wrap; gap: .65rem; }
.seo-friend-link { display: inline-flex; align-items: center; min-height: 2.4rem; padding: .45rem .8rem; color: inherit; background: var(--panel, var(--paper, #fff)); border: 1px solid var(--line, rgba(120, 120, 120, .25)); border-radius: var(--radius, 4px); text-decoration: none; }
.seo-friend-link:hover, .seo-friend-link:focus-visible { color: var(--accent, var(--red, var(--aqua, #b8860b))); border-color: currentColor; }
.seo-detail-wrap { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.seo-detail-card { max-width: 980px; margin: 0 auto; padding: clamp(1.2rem, 4vw, 2.5rem); color: var(--text, var(--ink, #262626)); background: var(--panel, var(--obsidian-soft, var(--paper, #fff))); border: 1px solid var(--line, rgba(120, 120, 120, .25)); border-radius: var(--radius, 4px); box-shadow: var(--shadow, 0 10px 24px rgba(0, 0, 0, .08)); }
.seo-detail-card h1 { margin: 0 0 .7rem; color: inherit; font-size: clamp(1.75rem, 4vw, 2.65rem); }
.seo-detail-card time, .seo-detail-card p { color: var(--muted, currentColor); line-height: 1.9; }
.seo-detail-content { white-space: pre-wrap; }
.managed-download-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, .68); }
.managed-download-dialog { width: min(460px, 100%); padding: 1.25rem; color: #eef2ec; background: #171a18; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; box-shadow: 0 24px 70px rgba(0, 0, 0, .48); }
.managed-download-dialog h2 { margin: 0; color: inherit; font-size: 1.25rem; }
.managed-download-dialog p { line-height: 1.65; }
.managed-download-actions { display: flex; justify-content: flex-end; gap: .65rem; }
.managed-download-actions button { min-height: 2.45rem; padding: .45rem .85rem; color: #eef2ec; background: transparent; border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px; cursor: pointer; }
.managed-download-actions [data-managed-action="confirm"] { color: #171a18; background: #f4c430; border-color: #f4c430; }
@media (max-width: 640px) { .seo-section-head { align-items: flex-start; flex-direction: column; } .seo-news-grid { grid-template-columns: 1fr; } }

