@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@600;700&display=swap');

:root {
  --ink: #162327;
  --ink-soft: #526267;
  --paper: #f7f7f3;
  --paper-deep: #edf0ea;
  --night: #0e1b1e;
  --night-soft: #193034;
  --sakura: #e98fa8;
  --sakura-pale: #f7dce4;
  --amber: #e8ad58;
  --mint: #78a99a;
  --line: rgba(22, 35, 39, .14);
  --shadow: 0 14px 40px rgba(8, 20, 23, .12);
  --radius: 6px;
  --content: min(1160px, calc(100vw - 48px));
  color-scheme: light;
  font-family: "Noto Sans SC", system-ui, sans-serif, "Noto Color Emoji";
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); min-width: 320px; }
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--sakura-pale); color: var(--ink); }

.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; padding: 10px 14px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: fixed; z-index: 100; top: 0; left: 0; right: 0; color: #f8f5ef; transition: background .25s, color .25s, border-color .25s; border-bottom: 1px solid transparent; }
.site-header.scrolled, .page-shell .site-header { color: var(--ink); background: rgba(247, 247, 243, .92); border-color: var(--line); backdrop-filter: blur(16px); }
.nav-wrap { width: var(--content); height: 72px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Noto Serif SC", serif; font-size: 19px; font-weight: 700; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a { padding: 9px 12px; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--sakura); }
.nav-join { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; background: var(--sakura); color: #171e20 !important; border: 1px solid rgba(255,255,255,.22); border-radius: 4px; font-weight: 700; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 0; background: transparent; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle svg, .icon { width: 18px; height: 18px; stroke-width: 1.8; }

.hero { position: relative; min-height: 94svh; height: 94svh; overflow: hidden; color: #fff9f2; background: #122326 url('../img/scene-fallback.webp') center/cover no-repeat; }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-grade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(6,14,17,.72) 0%, rgba(6,14,17,.35) 42%, rgba(6,14,17,.06) 70%), linear-gradient(0deg, rgba(8,17,19,.54), transparent 45%); }
.hero-grain { position: absolute; inset: 0; opacity: .11; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); }
.hero-content { position: relative; z-index: 5; width: var(--content); height: 100%; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding-bottom: clamp(76px, 10vh, 112px); }
.hero-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: #f5dba8; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.hero-kicker::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.hero h1 { margin: 0; font-family: "Noto Serif SC", serif; font-size: 104px; font-weight: 700; line-height: .96; letter-spacing: 0; text-shadow: 0 5px 28px rgba(0,0,0,.28); }
.hero-lead { width: min(560px, 90vw); margin: 24px 0 28px; font-size: 19px; line-height: 1.8; color: rgba(255,249,242,.86); }
.hero-actions, .action-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-weight: 700; transition: transform .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: #fff6eb; color: var(--ink); }
.button-dark { background: var(--ink); color: #fff; }
.button-sakura { background: var(--sakura); color: #182125; }
.button-ghost { border-color: rgba(255,255,255,.45); color: #fff; background: rgba(14,27,30,.18); backdrop-filter: blur(8px); }
.button-outline { border-color: var(--line); background: transparent; }
.button[disabled], .button.is-disabled { cursor: not-allowed; opacity: .52; transform: none; }
.scene-status { position: absolute; z-index: 6; right: 24px; bottom: 20px; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.68); font-size: 12px; }
.scene-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }

.band { padding: 88px 0; }
.band-dark { color: #f1f1ea; background: var(--night); }
.band-mist { background: var(--paper-deep); }
.band-sakura { background: #f3e6e7; }
.section-inner { width: var(--content); margin: 0 auto; }
.section-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: end; margin-bottom: 46px; }
.eyebrow { margin: 0 0 12px; color: #a05d72; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.band-dark .eyebrow { color: #f3ae7b; }
h2, h3, p { overflow-wrap: anywhere; }
h2 { margin: 0; font-family: "Noto Serif SC", serif; font-size: 52px; line-height: 1.14; letter-spacing: 0; }
.section-head > p { margin: 0; color: var(--ink-soft); line-height: 1.85; }
.band-dark .section-head > p { color: #aebdbb; }

.fact-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); }
.fact { min-height: 120px; padding: 24px 22px; border-right: 1px solid rgba(255,255,255,.14); }
.fact:last-child { border: 0; }
.fact svg { color: var(--sakura); margin-bottom: 16px; }
.fact strong { display: block; font-size: 18px; }
.fact span { display: block; margin-top: 6px; color: #9aadaa; font-size: 13px; line-height: 1.6; }

.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.route { padding: 32px 28px 34px 0; border-right: 1px solid var(--line); }
.route + .route { padding-left: 28px; }
.route:last-child { border-right: 0; }
.route-number { color: var(--sakura); font-family: "Noto Serif SC", serif; font-size: 14px; }
.route h3 { margin: 36px 0 12px; font-size: 20px; }
.route p { margin: 0 0 24px; color: var(--ink-soft); line-height: 1.75; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: #8f4e63; font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.page-shell { padding-top: 72px; }
.page-hero { padding: 84px 0 64px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #edf2ed 0%, var(--paper) 100%); }
.page-hero.compact { padding-bottom: 46px; }
.page-hero-inner { width: var(--content); margin: 0 auto; }
.page-hero h1 { max-width: 800px; margin: 8px 0 18px; font-family: "Noto Serif SC", serif; font-size: 64px; line-height: 1.1; letter-spacing: 0; }
.page-hero p { max-width: 720px; margin: 0; color: var(--ink-soft); line-height: 1.85; }
.breadcrumb { color: #8d5b68; font-size: 13px; }

.content-layout { width: var(--content); margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 64px; padding: 56px 0 96px; }
.side-nav { position: sticky; top: 96px; height: fit-content; padding-right: 22px; border-right: 1px solid var(--line); }
.side-nav strong { display: block; margin-bottom: 15px; font-size: 12px; color: var(--ink-soft); }
.side-nav a { display: block; padding: 8px 0; font-size: 14px; color: var(--ink-soft); }
.side-nav a:hover, .side-nav a.active { color: #904d61; font-weight: 700; }
.prose { min-width: 0; }
.prose-section { padding: 0 0 60px; margin-bottom: 60px; border-bottom: 1px solid var(--line); scroll-margin-top: 104px; }
.prose-section:last-child { border: 0; margin-bottom: 0; }
.prose h2 { margin-bottom: 22px; font-size: 40px; }
.prose h3 { margin: 32px 0 12px; font-size: 20px; }
.prose p, .prose li { color: #435459; line-height: 1.85; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.callout { margin: 24px 0; padding: 18px 20px; border-left: 3px solid var(--sakura); background: #f2e8e9; }
.callout.warning { border-color: var(--amber); background: #f6eddf; }
.callout p { margin: 0; }
.command { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0; padding: 13px 14px; background: #17272a; color: #edf3ed; border-radius: 4px; }
.command code { overflow-x: auto; white-space: nowrap; color: #f4d9a1; }
.icon-button { flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.1); }
.command-grid { display: grid; grid-template-columns: minmax(180px, .7fr) 1.3fr; border-top: 1px solid var(--line); }
.command-grid > * { margin: 0; padding: 14px 10px; border-bottom: 1px solid var(--line); }
.command-grid code { color: #8c4a5e; font-weight: 700; }

.search-wrap { position: relative; max-width: 660px; margin-top: 30px; }
.search-wrap svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.search-input { width: 100%; height: 50px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 4px; background: #fff; outline: 0; }
.search-input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(120,169,154,.15); }
.search-empty { display: none; padding: 56px 0; color: var(--ink-soft); }
.doc-entry[hidden] { display: none; }

.steps { counter-reset: steps; border-top: 1px solid var(--line); }
.step { position: relative; display: grid; grid-template-columns: 82px 1fr; gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.step::before { counter-increment: steps; content: "0" counter(steps); font-family: "Noto Serif SC", serif; color: var(--sakura); font-size: 22px; }
.step h3 { margin: 0 0 8px; }
.step p { margin: 0; }

.download-list { border-top: 1px solid var(--line); }
.download-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 24px; align-items: center; min-height: 92px; border-bottom: 1px solid var(--line); }
.download-row h3, .download-row p { margin: 0; }
.download-row p { color: var(--ink-soft); }

.join-panel { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 60px; align-items: center; }
.join-panel h2 { margin-bottom: 16px; }
.join-panel p { color: #b1bfbc; line-height: 1.8; }
.qr-shell { padding: 16px; background: #fff; border-radius: 6px; }
.qr-shell img, .qr-shell canvas { width: 100% !important; height: auto !important; }
.qr-placeholder { aspect-ratio: 1; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; }
.qq-number { display: inline-flex; align-items: baseline; gap: 12px; margin: 12px 0 24px; }
.qq-number strong { color: #fff; font-family: ui-monospace, monospace; font-size: 36px; }
.qq-number span { color: #91a4a1; font-size: 13px; }

.rules-list { border-top: 1px solid var(--line); }
.rule { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.rule-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #cc8799; color: #9b5366; font-family: "Noto Serif SC", serif; }
.rule h3 { margin: 0 0 7px; }
.rule p { margin: 0; color: var(--ink-soft); line-height: 1.75; }

.site-footer { background: #0b1719; color: #dce4df; padding: 48px 0 30px; }
.footer-inner { width: var(--content); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-note { max-width: 480px; margin: 14px 0 0; color: #8da09d; line-height: 1.7; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; font-size: 13px; }
.footer-links a:hover { color: var(--sakura); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; color: #778b88; font-size: 12px; }

.toast { position: fixed; z-index: 300; left: 50%; bottom: 26px; transform: translate(-50%, 24px); opacity: 0; padding: 10px 14px; border-radius: 4px; color: #fff; background: #17272a; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  :root { --content: min(100% - 32px, 720px); }
  .nav-wrap { height: 64px; }
  .site-header.scrolled, .page-shell .site-header { background: rgba(247,247,243,.97); }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 64px 0 auto; display: none; flex-direction: column; align-items: stretch; padding: 16px; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px; }
  .nav-join { margin-top: 8px; }
  .hero { min-height: 90svh; height: 90svh; }
  .hero-content { padding-bottom: 62px; }
  .hero h1 { font-size: 72px; }
  .hero-lead { font-size: 17px; }
  h2 { font-size: 40px; }
  .page-hero h1 { font-size: 48px; }
  .prose h2 { font-size: 34px; }
  .hero-lead { margin-top: 18px; }
  .scene-status { display: none; }
  .band { padding: 66px 0; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.14); }
  .route-grid { grid-template-columns: 1fr; }
  .route, .route + .route { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .route h3 { margin-top: 18px; }
  .page-shell { padding-top: 64px; }
  .page-hero { padding: 60px 0 46px; }
  .content-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 32px; }
  .side-nav { position: static; display: flex; overflow-x: auto; gap: 20px; padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav strong { display: none; }
  .side-nav a { flex: 0 0 auto; }
  .join-panel { grid-template-columns: 1fr; }
  .qr-shell { width: min(240px, 100%); }
  .download-row { grid-template-columns: 1fr auto; gap: 8px 16px; padding: 18px 0; }
  .download-row p { grid-column: 1; }
  .download-row .button { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 520px) {
  .hero-grade { background: linear-gradient(0deg, rgba(5,14,16,.76), rgba(6,15,17,.2) 70%); }
  .hero h1 { font-size: 64px; }
  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1 1 100%; }
  .qq-number strong { font-size: 28px; }
  .fact-strip { grid-template-columns: 1fr; }
  .fact { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .command-grid { grid-template-columns: 1fr; }
  .command-grid > :nth-child(odd) { border-bottom: 0; padding-bottom: 3px; }
  .command-grid > :nth-child(even) { padding-top: 3px; }
  .step { grid-template-columns: 48px 1fr; gap: 10px; }
  .rule { grid-template-columns: 46px 1fr; gap: 12px; }
  .footer-top, .footer-bottom { flex-direction: column; }
}

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