/* =========================================================
   热血传奇 1.76 — Dark Eastern Epic UI
   ========================================================= */
:root {
  --bg: #0a0b0d;
  --bg-soft: #101215;
  --panel: #141619;
  --panel-light: #191b1f;
  --text: #d5d0c5;
  --muted: #918c82;
  --heading: #f1e9d8;
  --gold: #c8a35e;
  --gold-light: #e4c77f;
  --gold-dark: #73572e;
  --red: #9d2d25;
  --red-light: #c44b3e;
  --line: rgba(200, 163, 94, .2);
  --line-soft: rgba(255, 255, 255, .075);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --container: 1200px;
  --header-height: 78px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% 15%, rgba(117, 40, 25, .09), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
::selection { color: #fff6df; background: rgba(157, 45, 37, .8); }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, blockquote { margin-top: 0; }
h1, h2, h3, h4 { color: var(--heading); font-family: var(--serif); font-weight: 600; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.container { width: min(var(--container), calc(100% - 64px)); margin-inline: auto; }
.section { position: relative; padding: 112px 0; }
section[id] { scroll-margin-top: calc(var(--header-height) + 12px); }
.eyebrow {
  margin-bottom: 12px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  line-height: 1.5;
  text-transform: uppercase;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  transform: translateY(-150%);
  background: var(--gold);
  color: #111;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 1100; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--red-light), var(--gold-light)); }
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, box-shadow .35s;
}
.site-header.is-scrolled, .site-header.menu-open {
  border-color: var(--line);
  background: rgba(9, 10, 12, .94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; height: 100%; gap: 30px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand-mark::before {
  position: absolute;
  inset: 7px;
  border: 1px solid var(--gold-dark);
  background: linear-gradient(145deg, rgba(200, 163, 94, .12), transparent);
  content: "";
  transform: rotate(45deg);
}
.brand-mark { text-indent: 0; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { color: var(--heading); font-family: var(--serif); font-size: 19px; letter-spacing: .16em; line-height: 1.35; }
.brand-copy small { color: var(--muted); font-family: Georgia, serif; font-size: 8px; letter-spacing: .2em; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 30px; margin-left: auto; }
.desktop-nav a { position: relative; padding: 27px 0 24px; color: #c9c4ba; font-size: 14px; letter-spacing: .08em; transition: color .25s; }
.desktop-nav a::after { position: absolute; right: 50%; bottom: 16px; left: 50%; height: 1px; background: var(--gold); content: ""; transition: inset .25s; }
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--gold-light); }
.desktop-nav a:hover::after, .desktop-nav a.is-active::after { right: 0; left: 0; }
.header-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 9px 16px;
  border: 1px solid var(--gold-dark);
  color: var(--gold-light);
  font-size: 13px;
  transition: background .25s, color .25s;
}
.header-download:hover { background: var(--gold); color: #15110a; }
.header-download svg, .button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.menu-toggle { display: none; width: 42px; height: 42px; margin-left: auto; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 1px; margin: 5px 0; background: var(--gold-light); transition: transform .25s, opacity .25s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { position: absolute; top: var(--header-height); right: 0; left: 0; border-bottom: 1px solid var(--line); background: rgba(9, 10, 12, .98); }
.mobile-menu .container { display: grid; grid-template-columns: repeat(2, 1fr); padding: 16px 0 24px; }
.mobile-menu a { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.mobile-menu a:nth-child(odd) { border-right: 1px solid var(--line-soft); }

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: max(720px, min(100svh, 56.25vw));
  align-items: flex-end;
  overflow: hidden;
  background: #171513 url("../picture/bg.jpg") center 38% / cover no-repeat;
}
.hero::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 5, 7, .58) 0%, transparent 23%, transparent 56%, rgba(6, 7, 9, .84) 88%, var(--bg) 100%);
  content: "";
}
.hero::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(4, 5, 6, .34) 100%);
  content: "";
  pointer-events: none;
}
.hero-overlay { position: absolute; inset: 0; opacity: .13; background-image: repeating-linear-gradient(0deg, transparent 0, transparent 3px, #000 4px); pointer-events: none; }
.hero-bottom { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-bottom: 76px; }
.hero-caption { max-width: 640px; }
.hero-caption .eyebrow { margin-bottom: 8px; text-shadow: 0 2px 10px #000; }
.hero-caption h1 { margin-bottom: 6px; font-size: clamp(32px, 4.1vw, 58px); letter-spacing: .12em; line-height: 1.25; text-shadow: 0 3px 20px #000; }
.hero-caption h1 span { margin-left: 16px; color: var(--gold-light); font-family: Georgia, serif; font-size: .8em; letter-spacing: 0; }
.hero-caption > p:last-child { margin: 0; color: #d2cabd; font-size: 14px; letter-spacing: .12em; text-shadow: 0 2px 10px #000; }
.hero-actions { display: flex; flex: 0 0 auto; gap: 12px; padding-bottom: 5px; }
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 25px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.4;
  transition: border-color .25s, background .25s, color .25s, transform .25s, box-shadow .25s;
}
.button:hover { transform: translateY(-2px); }
.button-primary { border-color: #b58b49; background: linear-gradient(135deg, #d0ae6b, #a77b3d); box-shadow: 0 10px 30px rgba(0, 0, 0, .24); color: #171108; }
.button-primary:hover { background: linear-gradient(135deg, #e0c17e, #b78b47); box-shadow: 0 12px 35px rgba(200, 163, 94, .17); }
.button-ghost { border-color: rgba(229, 214, 180, .4); background: rgba(10, 10, 10, .26); color: #eee4d0; backdrop-filter: blur(6px); }
.button-ghost:hover { border-color: var(--gold); background: rgba(200, 163, 94, .08); }
.button-ghost span { color: var(--gold); font-size: 18px; }
.scroll-cue { position: absolute; z-index: 3; right: 25px; bottom: 74px; display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .45); font-family: Georgia, serif; font-size: 8px; letter-spacing: .25em; transform: rotate(90deg); transform-origin: right center; }
.scroll-cue i { display: block; width: 42px; height: 1px; overflow: hidden; background: rgba(255, 255, 255, .2); }

/* Shared headings */
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; margin-bottom: 46px; }
.section-heading h2, .overview-copy h2, .history-heading h2, .download-inner h2 { margin-bottom: 0; font-size: clamp(30px, 3vw, 42px); letter-spacing: .12em; line-height: 1.35; }
.section-heading > p { max-width: 610px; margin-bottom: 3px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.section-heading.centered { display: block; margin-bottom: 52px; text-align: center; }
.section-heading.centered .eyebrow { margin-bottom: 12px; }
.section-heading.centered h2 { margin-bottom: 14px; }
.section-heading.centered > p:last-child { max-width: none; margin: 0; }

/* Intro and image */
.intro-section { background: linear-gradient(180deg, var(--bg), #0e0f12 55%, var(--bg)); }
.intro-section::before { position: absolute; inset: 0; opacity: .17; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 64px 64px; content: ""; mask-image: linear-gradient(to bottom, black, transparent 60%); pointer-events: none; }
.overview-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: center; gap: 76px; }
.overview-visual { position: relative; padding: 0 24px 30px 0; }
.image-frame { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); background: #111; cursor: zoom-in; }
.image-frame::after { position: absolute; inset: 0; border: 10px solid rgba(8, 9, 10, .2); content: ""; pointer-events: none; }
.image-frame img { width: 100%; aspect-ratio: 637 / 481; object-fit: cover; transition: transform .7s var(--ease), filter .5s; }
.image-frame:hover img { transform: scale(1.025); filter: saturate(1.1); }
.overview-visual::before { position: absolute; right: 0; bottom: 0; width: 68%; height: 62%; border: 1px solid var(--gold-dark); content: ""; }
.overview-visual::after { position: absolute; top: -16px; left: -16px; width: 52px; height: 52px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); content: ""; }
.visual-caption { position: absolute; right: 0; bottom: 4px; display: flex; align-items: center; gap: 16px; padding: 12px 18px; background: var(--gold); color: #18130b; }
.visual-caption span { font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: .14em; }
.visual-caption small { font-family: Georgia, serif; font-size: 8px; letter-spacing: .12em; }
.overview-copy h2 { margin-bottom: 18px; }
.title-rule { width: 100%; height: 1px; margin-bottom: 28px; background: var(--line); }
.title-rule span { display: block; width: 72px; height: 2px; background: var(--gold); transform: translateY(-1px); }
.overview-copy .lead { margin-bottom: 28px; color: #c7c1b5; font-size: 15px; line-height: 2.05; text-align: justify; }
.overview-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.overview-tags span { padding: 5px 14px; border: 1px solid var(--line); color: var(--gold-light); font-size: 12px; letter-spacing: .1em; }

/* History */
.history-layout { position: relative; display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; margin-top: 132px; padding-top: 92px; border-top: 1px solid var(--line-soft); }
.history-heading { align-self: start; }
.history-heading h2 { margin-bottom: 28px; }
.history-summary { margin: 0; padding-left: 22px; border-left: 2px solid var(--red); color: var(--muted); font-size: 14px; line-height: 2.05; text-align: justify; }
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { position: absolute; top: 18px; bottom: 24px; left: 21px; width: 1px; background: linear-gradient(var(--gold), var(--line), transparent); content: ""; }
.timeline li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 24px; padding-bottom: 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline-marker { z-index: 1; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--gold-dark); border-radius: 50%; background: #101114; color: var(--gold); font-family: Georgia, serif; font-size: 11px; }
.timeline h3 { margin: 3px 0 10px; color: #e4d7bd; font-size: 18px; letter-spacing: .04em; line-height: 1.55; }
.timeline p { margin-bottom: 5px; color: #a8a298; font-size: 14px; line-height: 1.95; }

/* Features */
.features-block { position: relative; margin-top: 120px; }
.features-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature-card { position: relative; min-height: 205px; overflow: hidden; padding: 34px 34px 28px; border: 1px solid var(--line-soft); background: linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.008)); transition: border-color .3s, background .3s, transform .3s; }
.feature-card::after { position: absolute; right: 0; bottom: 0; width: 32px; height: 32px; border-right: 1px solid var(--gold-dark); border-bottom: 1px solid var(--gold-dark); content: ""; }
.feature-card:hover { border-color: var(--line); background: linear-gradient(145deg, rgba(200,163,94,.07), rgba(255,255,255,.01)); transform: translateY(-3px); }
.feature-number { display: block; margin-bottom: 22px; color: var(--gold-dark); font-family: Georgia, serif; font-size: 13px; letter-spacing: .12em; }
.feature-card h3 { margin-bottom: 12px; font-size: 21px; letter-spacing: .1em; }
.feature-card p { margin: 0; color: #a9a398; font-size: 14px; line-height: 1.95; }
.feature-wide { display: grid; grid-template-columns: 70px 1fr; grid-column: 1 / -1; min-height: 0; }
.feature-wide .feature-number { margin: 5px 0 0; }

/* Classes */
.classes-section { overflow: hidden; border-block: 1px solid var(--line-soft); background: #0d0e11 url("../images/bg-zhiye.jpg") center / cover no-repeat; }
.classes-section::before { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,11,13,.75), rgba(10,11,13,.92) 35%, rgba(10,11,13,.97)); content: ""; }
.classes-section .container { position: relative; }
.classes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.class-card { --accent: #b04c3f; position: relative; padding: 25px 30px 32px; border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(28,29,32,.94), rgba(16,17,20,.97)); transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.class-card.mage { --accent: #5d84b9; }
.class-card.taoist { --accent: #638b72; }
.class-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 22px 50px rgba(0,0,0,.25); transform: translateY(-6px); }
.class-topline { display: flex; align-items: center; gap: 16px; color: var(--accent); font-family: Georgia, serif; font-size: 10px; letter-spacing: .18em; }
.class-topline i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .55; }
.class-portrait { position: relative; display: grid; height: 230px; place-items: center; margin: 8px 0 6px; }
.class-portrait::before { position: absolute; width: 190px; height: 120px; border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%); content: ""; filter: blur(8px); }
.portrait-ring { position: absolute; width: 172px; height: 172px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); border-radius: 50%; }
.portrait-ring::before, .portrait-ring::after { position: absolute; top: 50%; width: 24px; height: 1px; background: var(--accent); content: ""; }
.portrait-ring::before { right: 100%; }
.portrait-ring::after { left: 100%; }
.class-portrait img { position: relative; width: 170px; height: 185px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 12px 12px rgba(0,0,0,.5)); }
.class-card > h3 { margin-bottom: 18px; color: var(--heading); font-size: 30px; letter-spacing: .2em; text-align: center; }
.class-description { min-height: 180px; margin-bottom: 24px; color: #aaa59b; font-size: 13px; line-height: 1.95; text-align: justify; }
.class-description strong { color: var(--accent); font-weight: 600; }
.class-card h4 { margin: 20px 0 10px; color: #dcd3c2; font-family: var(--sans); font-size: 13px; letter-spacing: .12em; }
.class-card ul { margin-bottom: 22px; padding: 0; list-style: none; }
.class-card li { position: relative; margin: 5px 0; padding-left: 14px; color: #a9a49a; font-size: 13px; line-height: 1.75; }
.class-card li::before { position: absolute; top: .8em; left: 0; width: 4px; height: 4px; background: var(--accent); content: ""; transform: rotate(45deg); }
.skill-list { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-list span { padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: color-mix(in srgb, var(--accent) 70%, white); font-size: 12px; }

/* NPC explorer */
.npc-section { background: #101114 url("../images/bg-role.jpg") center / cover no-repeat; }
.npc-section::before { position: absolute; inset: 0; background: rgba(12, 13, 15, .82); content: ""; }
.npc-section .container { position: relative; }
.npc-section .section-heading > p { max-width: 570px; }
.npc-explorer { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 510px; border: 1px solid var(--line); background: rgba(11, 12, 14, .9); box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.npc-tabs { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.npc-tabs button { position: relative; display: grid; flex: 1; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-content: center; padding: 15px 24px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: #b5afa3; font-family: var(--serif); font-size: 17px; letter-spacing: .08em; text-align: left; cursor: pointer; transition: background .25s, color .25s; }
.npc-tabs button:last-child { border-bottom: 0; }
.npc-tabs button > span { grid-row: 1 / 3; align-self: center; color: #615a4e; font-family: Georgia, serif; font-size: 10px; }
.npc-tabs button > i { color: #716c63; font-family: var(--sans); font-size: 10px; font-style: normal; letter-spacing: .05em; }
.npc-tabs button::before { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--gold); content: ""; transform: scaleY(0); transition: transform .25s; }
.npc-tabs button:hover { background: rgba(200,163,94,.035); color: var(--gold-light); }
.npc-tabs button[aria-selected="true"] { background: linear-gradient(90deg, rgba(200,163,94,.11), transparent); color: var(--gold-light); }
.npc-tabs button[aria-selected="true"]::before { transform: scaleY(1); }
.npc-tabs button[aria-selected="true"] > span { color: var(--gold); }
.npc-tabs button[aria-selected="true"] > i { color: #a79b85; }
.npc-stage { position: relative; display: flex; min-width: 0; flex-direction: column; }
.npc-panel { display: grid; flex: 1; grid-template-columns: 250px minmax(0, 1fr); align-items: center; gap: 42px; padding: 45px 45px 92px; }
.npc-panel.is-active { animation: panelIn .4s var(--ease); }
.npc-portrait { position: relative; display: grid; min-height: 270px; place-items: center; border: 1px solid var(--line-soft); background: radial-gradient(circle, rgba(200,163,94,.1), transparent 60%), #0d0e10; }
.npc-portrait::before, .npc-portrait::after { position: absolute; width: 34px; height: 34px; content: ""; }
.npc-portrait::before { top: 10px; left: 10px; border-top: 1px solid var(--gold-dark); border-left: 1px solid var(--gold-dark); }
.npc-portrait::after { right: 10px; bottom: 10px; border-right: 1px solid var(--gold-dark); border-bottom: 1px solid var(--gold-dark); }
.npc-portrait > span { position: absolute; top: 14px; left: 16px; color: var(--gold-dark); font-family: Georgia, serif; font-size: 9px; letter-spacing: .15em; }
.npc-portrait img { width: 178px; height: 162px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 12px 15px rgba(0,0,0,.5)); transform: scale(1.18); }
.npc-name { margin-bottom: 18px; color: var(--gold-light); font-family: var(--serif); font-size: 30px; letter-spacing: .16em; }
.npc-dialogue blockquote { position: relative; margin-bottom: 0; color: #b7b0a4; font-size: 14px; line-height: 2.1; text-align: justify; }
.npc-dialogue blockquote::before { display: block; height: 35px; color: var(--gold-dark); content: "“"; font-family: Georgia, serif; font-size: 56px; line-height: 1; }
.npc-controls { position: absolute; right: 40px; bottom: 28px; display: flex; align-items: center; gap: 20px; }
.npc-controls button { width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; color: var(--gold); cursor: pointer; transition: background .25s, color .25s; }
.npc-controls button:hover { background: var(--gold); color: #171109; }
.npc-controls > span { color: #686158; font-family: Georgia, serif; font-size: 11px; letter-spacing: .1em; }
.npc-controls b { color: var(--gold-light); font-size: 15px; font-weight: 400; }

/* Equipment */
.equipment-section { background: radial-gradient(ellipse at 50% 60%, rgba(116,77,31,.12), transparent 55%), #0a0b0d; }
.equipment-section .section-heading { margin-bottom: 38px; }
.equipment-frame { position: relative; padding: 18px; border: 1px solid var(--line); background: #060708; box-shadow: 0 25px 80px rgba(0,0,0,.4); }
.equipment-frame button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #000; cursor: zoom-in; }
.equipment-frame img { width: 100%; height: auto; transition: transform .6s var(--ease), filter .4s; }
.equipment-frame button:hover img { filter: brightness(1.12); transform: scale(1.012); }
.frame-corner { position: absolute; z-index: 2; width: 36px; height: 36px; pointer-events: none; }
.frame-corner.top-left { top: 8px; left: 8px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.frame-corner.top-right { top: 8px; right: 8px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.frame-corner.bottom-left { bottom: 8px; left: 8px; border-bottom: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.frame-corner.bottom-right { right: 8px; bottom: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }
.zoom-hint { margin: 18px 0 0; color: #6e6960; font-size: 11px; letter-spacing: .15em; text-align: center; }

/* Download */
.download-section { overflow: hidden; padding: 118px 0; border-top: 1px solid var(--line-soft); text-align: center; }
.download-backdrop { position: absolute; inset: 0; background: linear-gradient(rgba(10,10,12,.82), rgba(10,10,12,.94)), url("../picture/photo1.png") center 38% / cover no-repeat; filter: saturate(.7); }
.download-backdrop::after { position: absolute; inset: 0; background: radial-gradient(ellipse, transparent, rgba(6,7,8,.72)); content: ""; }
.download-inner { position: relative; max-width: 880px; }
.download-inner h2 { margin-bottom: 10px; font-size: clamp(36px, 4vw, 50px); }
.download-subtitle { margin-bottom: 28px; color: #b8b0a0; font-family: var(--serif); font-size: 18px; letter-spacing: .18em; }
.download-main { min-height: 58px; padding-inline: 34px; }
.mirror-downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.mirror-downloads a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(12,13,15,.64); color: #c9c0af; font-size: 13px; text-align: left; backdrop-filter: blur(8px); transition: border-color .25s, background .25s; }
.mirror-downloads a:hover { border-color: var(--gold); background: rgba(200,163,94,.08); }
.mirror-downloads span { color: var(--gold-dark); font-family: Georgia, serif; font-size: 10px; }
.mirror-downloads i { color: var(--gold); font-style: normal; }
.download-notice { display: inline-flex; align-items: center; gap: 10px; margin: 30px 0 0; color: #8f887b; font-size: 12px; }
.download-notice > span { display: inline-grid; flex: 0 0 auto; width: 18px; height: 18px; place-items: center; border: 1px solid var(--gold-dark); border-radius: 50%; color: var(--gold); font-family: Georgia, serif; font-size: 11px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); background: #08090a; }
.footer-inner { display: flex; min-height: 118px; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { opacity: .75; transform: scale(.86); transform-origin: left center; }
.footer-inner > p { margin: 0; color: #716c63; font-size: 12px; letter-spacing: .08em; }
.back-top { color: #9a927f; font-size: 12px; letter-spacing: .08em; }
.back-top span { margin-left: 8px; color: var(--gold); }

/* Image modal */
.image-modal { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 60px; background: rgba(3,4,5,.94); backdrop-filter: blur(10px); cursor: zoom-out; }
.image-modal img { max-width: min(1200px, 94vw); max-height: 84vh; border: 1px solid var(--line); box-shadow: 0 30px 100px #000; object-fit: contain; }
.image-modal > p { position: absolute; bottom: 18px; margin: 0; color: #777168; font-size: 11px; letter-spacing: .12em; }
.modal-close { position: absolute; top: 20px; right: 26px; width: 44px; height: 44px; border: 1px solid var(--line); background: #101114; color: var(--gold-light); font-family: Arial, sans-serif; font-size: 28px; font-weight: 200; line-height: 1; cursor: pointer; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1180px) {
  .desktop-nav { gap: 20px; }
  .desktop-nav a { font-size: 13px; }
  .header-download { display: none; }
  .hero-bottom { padding-right: 45px; }
  .overview-grid { gap: 48px; }
  .history-layout { gap: 58px; }
  .class-card { padding-inline: 23px; }
  .class-description { min-height: 216px; }
  .npc-panel { grid-template-columns: 215px 1fr; gap: 30px; padding-inline: 32px; }
}

@media (max-width: 960px) {
  :root { --header-height: 70px; }
  .container { width: min(var(--container), calc(100% - 44px)); }
  .section { padding: 88px 0; }
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .hero { min-height: 760px; background-position: 47% center; }
  .hero-bottom { display: block; padding: 0 35px 58px 0; }
  .hero-actions { margin-top: 24px; }
  .scroll-cue { display: none; }
  .overview-grid { grid-template-columns: 1fr; gap: 58px; }
  .overview-visual { width: min(680px, 100%); margin-inline: auto; }
  .overview-copy { max-width: 760px; }
  .history-layout { grid-template-columns: 1fr; gap: 46px; margin-top: 94px; padding-top: 70px; }
  .history-heading { max-width: 760px; }
  .features-block { margin-top: 90px; }
  .classes-grid { grid-template-columns: 1fr; }
  .class-card { display: grid; grid-template-columns: 210px 1fr; column-gap: 30px; }
  .class-topline { grid-column: 1 / -1; }
  .class-portrait { grid-row: 2 / 8; grid-column: 1; height: auto; min-height: 300px; }
  .class-card > h3, .class-description, .class-card > h4, .class-card > ul, .skill-list { grid-column: 2; }
  .class-card > h3 { margin-top: 24px; text-align: left; }
  .class-description { min-height: 0; }
  .npc-explorer { grid-template-columns: 240px 1fr; }
  .npc-tabs button { padding-inline: 16px; font-size: 15px; }
  .npc-panel { grid-template-columns: 1fr; gap: 24px; padding: 28px 28px 86px; }
  .npc-portrait { min-height: 205px; }
  .npc-name { margin-bottom: 8px; font-size: 25px; }
  .npc-dialogue blockquote::before { display: none; }
  .mirror-downloads { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; margin-top: 28px; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 72px 0; }
  .brand-mark { width: 40px; height: 40px; font-size: 14px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 7px; }
  .hero { min-height: 700px; background-position: 46% center; }
  .hero::before { background: linear-gradient(180deg, rgba(4,5,7,.65), transparent 24%, transparent 43%, rgba(6,7,9,.9) 75%, var(--bg)); }
  .hero-bottom { padding: 0 0 40px; }
  .hero-caption h1 { font-size: 34px; }
  .hero-caption h1 span { margin-left: 10px; }
  .hero-caption > p:last-child { max-width: 320px; font-size: 12px; line-height: 1.8; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .button { width: 100%; }
  .section-heading { display: block; margin-bottom: 34px; }
  .section-heading > p { margin-top: 16px; }
  .section-heading h2, .overview-copy h2, .history-heading h2 { font-size: 30px; }
  .overview-grid { gap: 46px; }
  .overview-visual { padding: 0 12px 24px 0; }
  .overview-visual::after { top: -9px; left: -9px; width: 34px; height: 34px; }
  .visual-caption { gap: 8px; padding: 9px 12px; }
  .visual-caption span { font-size: 12px; }
  .visual-caption small { display: none; }
  .overview-copy .lead { font-size: 14px; line-height: 2; }
  .history-layout { margin-top: 76px; padding-top: 58px; }
  .timeline li { grid-template-columns: 36px 1fr; gap: 16px; padding-bottom: 30px; }
  .timeline::before { left: 17px; }
  .timeline-marker { width: 36px; height: 36px; font-size: 9px; }
  .timeline h3 { margin-top: 0; font-size: 16px; }
  .timeline p { font-size: 13px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; padding: 26px; }
  .feature-wide { display: block; grid-column: auto; }
  .feature-wide .feature-number { margin-bottom: 22px; }
  .class-card { display: block; padding: 22px 24px 28px; }
  .class-portrait { height: 220px; min-height: 0; }
  .class-card > h3 { margin-top: 0; text-align: center; }
  .class-description { font-size: 13px; }
  .npc-section .section-heading > p { font-size: 13px; }
  .npc-explorer { display: block; min-height: 0; }
  .npc-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
  .npc-tabs button { display: block; min-width: 106px; flex: 1 0 auto; padding: 14px 16px; border-right: 1px solid var(--line-soft); border-bottom: 0; font-size: 14px; text-align: center; white-space: nowrap; }
  .npc-tabs button > span { display: block; margin-bottom: 2px; }
  .npc-tabs button > i { display: none; }
  .npc-tabs button::before { top: auto; right: 0; width: auto; height: 2px; transform: scaleX(0); }
  .npc-tabs button[aria-selected="true"]::before { transform: scaleX(1); }
  .npc-panel { padding: 24px 20px 86px; }
  .npc-portrait { min-height: 190px; }
  .npc-dialogue blockquote { font-size: 13px; line-height: 2; }
  .npc-controls { right: 20px; bottom: 24px; left: 20px; justify-content: space-between; }
  .equipment-frame { padding: 8px; }
  .equipment-frame img { min-height: 190px; object-fit: contain; }
  .frame-corner { width: 24px; height: 24px; }
  .download-section { padding: 82px 0; }
  .download-main { max-width: 100%; padding-inline: 18px; font-size: 13px; }
  .download-notice { align-items: flex-start; text-align: left; }
  .footer-inner { flex-direction: column; gap: 14px; padding: 30px 0; text-align: center; }
  .footer-brand { display: none; }
  .image-modal { padding: 50px 16px; }
  .modal-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
