@font-face {
  font-family: "DS Title";
  src: url("../fonts/dreamsworn-title.woff") format("woff");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "DS Text";
  src: url("../fonts/dreamsworn-text.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
:root {
  --night-0: #070914;
  --night-1: #0d1226;
  --night-2: #1a1838;
  --gold-hi: #f6e2a4;
  --gold: #d9b66a;
  --gold-lo: #a97c38;
  --ink: #ebe4d1;
  --ink-soft: #b9b2a2;
  --line: rgba(217, 182, 106, 0.55);
  --panel: rgba(13, 18, 38, 0.72);
  --panel-line: rgba(217, 182, 106, 0.22);
  --danger: #e8a39b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(120% 50% at 50% 100%, rgba(214, 140, 92, 0.18), transparent 60%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 30%, var(--night-2) 100%);
  background-color: var(--night-0);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "DS Text", "Noto Serif TC", "Noto Serif JP", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  font-weight: 500;
  line-height: 1.85;
  overflow-x: hidden;
}
a { color: var(--gold-hi); }
img, video { max-width: 100%; height: auto; display: block; }
.seg { display: inline-block; }

/* sky */
.stars { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.stars i {
  position: absolute; width: 2px; height: 2px; background: #fff6dc; opacity: 0.5;
  animation: twinkle var(--t, 5s) ease-in-out infinite; animation-delay: var(--d, 0s);
}
.stars i.big { width: 3px; height: 3px; background: var(--gold-hi); }
.motes i {
  position: fixed; bottom: -8px; width: 3px; height: 3px; background: var(--gold-hi);
  box-shadow: 0 0 6px rgba(246, 226, 164, 0.8); opacity: 0; pointer-events: none; z-index: 0;
  animation: rise var(--t, 14s) linear infinite; animation-delay: var(--d, 0s);
}
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.8; } }
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.9; } 80% { opacity: 0.6; }
  100% { transform: translate(var(--x, 20px), -85vh); opacity: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(7, 9, 20, 0.78);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(217, 182, 106, 0.14);
}
.brand {
  font-family: "DS Title", serif; font-weight: 900; font-size: 18px; letter-spacing: 0.12em;
  color: var(--gold); text-decoration: none; white-space: nowrap;
}
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 14px; letter-spacing: 0.06em;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: rgba(217, 182, 106, 0.1); }
.langs {
  display: flex; gap: 2px; padding: 3px; flex-shrink: 0;
  border: 1px solid rgba(217, 182, 106, 0.28); border-radius: 999px; background: rgba(7, 9, 20, 0.45);
}
.langs button {
  font: inherit; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-soft);
  background: transparent; border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { color: var(--night-0); background: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

main, footer { position: relative; z-index: 1; }

/* hero */
.hero {
  min-height: calc(100svh - 56px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px 16px 48px;
  /* the key art 「無風的夜」 (pixel art, 3x nearest): night blue over it so the title and the lede stay readable */
  background: linear-gradient(180deg, rgba(7, 9, 20, 0.55), rgba(7, 9, 20, 0.35) 40%, rgba(7, 9, 20, 0.88) 100%),
    url("../media/keyart.jpg") center 70% / cover no-repeat;
  image-rendering: pixelated;
}
/* portrait screens: keep the protagonist and the wolf (bottom left of the drawing) in view */
@media (max-aspect-ratio: 1/1) { .hero { background-position: 18% 70%, 18% 70%; } }
.eyebrow { margin: 0 0 28px; font-size: 13px; letter-spacing: 0.22em; color: var(--ink-soft); animation: rise-in 1.2s ease both; }
.name { position: relative; animation: rise-in 1.4s ease 0.15s both; }
.name::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: min(560px, 110vw); height: 220px;
  background: radial-gradient(closest-side, rgba(246, 210, 140, 0.32), rgba(217, 160, 90, 0.10) 55%, transparent 75%);
  transform: translate(-50%, -50%); animation: breathe 6s ease-in-out infinite; pointer-events: none; z-index: -1;
}
.rule { display: flex; align-items: center; gap: 12px; width: min(420px, 82vw); margin: 0 auto; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.rule::after { background: linear-gradient(90deg, var(--line), transparent); }
.rule span { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 8px rgba(217, 182, 106, 0.7); }
.title {
  margin: 18px 0 10px; font-family: "DS Title", "DS Text", serif; font-weight: 900;
  font-size: clamp(52px, 13vw, 112px); line-height: 1.12; letter-spacing: 0.08em; padding-left: 0.08em;
  background: linear-gradient(180deg, var(--gold-hi) 8%, var(--gold) 52%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(40, 22, 8, 0.9)) drop-shadow(0 0 18px rgba(246, 210, 140, 0.25));
}
.title.latin { font-size: clamp(26px, 7vw, 68px); letter-spacing: 0.24em; padding-left: 0.24em; }
.title.long { font-size: clamp(40px, 10vw, 92px); letter-spacing: 0.04em; padding-left: 0.04em; }
.sub {
  margin: 0 0 18px; font-family: "DS Title", "DS Text", serif; font-weight: 900;
  font-size: clamp(13px, 2.6vw, 18px); letter-spacing: 0.62em; padding-left: 0.62em; color: var(--gold);
}
.sub.cjk { letter-spacing: 0.3em; padding-left: 0.3em; }
.lede { max-width: 34em; margin: 40px auto 0; font-size: clamp(16px, 2.3vw, 19px); line-height: 2; animation: rise-in 1.4s ease 0.4s both; }
.lede p { margin: 0 0 0.9em; text-wrap: balance; }
.soft { color: var(--ink-soft); }
.status { margin: 24px 0 0; font-size: 14px; letter-spacing: 0.08em; color: var(--gold); animation: rise-in 1.4s ease 0.55s both; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; animation: rise-in 1.4s ease 0.7s both; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; border: 1px solid rgba(217, 182, 106, 0.6); border-radius: 2px;
  color: var(--ink); text-decoration: none; background: rgba(7, 9, 20, 0.35);
  font: inherit; font-size: 15px; letter-spacing: 0.06em; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: rgba(217, 182, 106, 0.12); border-color: var(--gold); }
.btn.primary { background: var(--gold); color: var(--night-0); border-color: var(--gold); }
.btn.primary:hover { background: var(--gold-hi); }
.btn[disabled] { opacity: 0.5; cursor: wait; }

/* sections */
.section { max-width: 1080px; margin: 0 auto; padding: 72px 16px; }
.section h2 {
  margin: 0 0 8px; text-align: center; font-family: "DS Title", "DS Text", serif; font-weight: 900;
  font-size: clamp(26px, 4.4vw, 36px); letter-spacing: 0.14em; padding-left: 0.14em; color: var(--gold-hi);
}
.section .intro { max-width: 40em; margin: 0 auto 36px; text-align: center; color: var(--ink-soft); }
.section .rule { margin-bottom: 18px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 4px; padding: 22px 20px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0.08em; color: var(--gold); }
.card p { margin: 0; color: var(--ink); font-size: 15px; }
.note { margin-top: 18px; text-align: center; font-size: 13px; color: var(--ink-soft); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.shot {
  position: relative; margin: 0; overflow: hidden; border-radius: 4px; border: 1px solid var(--panel-line);
  background: #000; aspect-ratio: 16 / 9;
}
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; }
.shot button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px;
  background: linear-gradient(transparent, rgba(7, 9, 20, 0.85)); font-size: 13px; color: var(--ink);
  pointer-events: none;
}
.shot .tag {
  position: absolute; top: 8px; right: 8px; font-size: 11px; letter-spacing: 0.08em; padding: 2px 8px;
  background: rgba(7, 9, 20, 0.7); border: 1px solid var(--panel-line); border-radius: 999px; color: var(--ink-soft);
  pointer-events: none;
}
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center;
  padding: 16px; background: rgba(4, 5, 12, 0.92);
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; border: 1px solid var(--panel-line); }
.lightbox button { position: absolute; top: 14px; right: 14px; }

.posts { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.post-link {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 4px; padding: 18px 20px;
}
.post-link:hover { border-color: var(--line); }
.post-link time { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.06em; }
.post-link h3 { margin: 4px 0 6px; font-size: 19px; color: var(--gold-hi); }
.post-link p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.roadmap { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
.roadmap li { position: relative; padding: 0 0 24px 34px; border-left: 1px solid var(--panel-line); margin-left: 8px; }
.roadmap li:last-child { border-left-color: transparent; }
.roadmap li::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px;
  background: var(--night-1); border: 1px solid var(--gold); transform: rotate(45deg);
}
.roadmap li.now::before { background: var(--gold); box-shadow: 0 0 10px rgba(217, 182, 106, 0.8); }
.roadmap h3 { margin: 0; font-size: 18px; color: var(--gold); }
.roadmap h3 small { margin-left: 8px; font-size: 12px; color: var(--night-0); background: var(--gold); padding: 1px 8px; border-radius: 999px; }
.roadmap p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }

.feedback { max-width: 680px; margin: 0 auto; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 4px; padding: 24px 20px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--gold); letter-spacing: 0.06em; }
.field small { color: var(--ink-soft); font-size: 12px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: rgba(7, 9, 20, 0.6);
  border: 1px solid var(--panel-line); border-radius: 2px; padding: 10px 12px; width: 100%;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 16px; }
.form-msg { margin: 14px 0 0; font-size: 14px; min-height: 1.4em; }
.form-msg.ok { color: var(--gold-hi); }
.form-msg.err { color: var(--danger); }
.also { margin-top: 18px; text-align: center; font-size: 14px; color: var(--ink-soft); }

.support { max-width: 680px; margin: 0 auto; text-align: center; }
.support p { margin: 0 0 12px; }

.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 16px; }
.social a {
  font-size: 13px; letter-spacing: 0.06em; text-decoration: none; color: var(--ink-soft);
  border: 1px solid var(--panel-line); border-radius: 999px; padding: 4px 12px;
}
.social a:hover { color: var(--ink); border-color: var(--line); }

/* article pages */
.article { max-width: 760px; margin: 0 auto; padding: 48px 16px 72px; }
.article h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.4; color: var(--gold-hi); margin: 8px 0 4px; }
.article time, .article .meta { color: var(--ink-soft); font-size: 14px; }
.article h2 { font-size: 21px; color: var(--gold); margin: 36px 0 8px; }
.article p, .article li { font-size: 16px; }
.article ul { padding-left: 1.3em; }
.article figure { margin: 24px 0; }
.article figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; text-decoration: none; }

footer {
  padding: 32px 16px 28px; text-align: center; font-size: 12px; line-height: 1.9; color: rgba(185, 178, 162, 0.75);
  border-top: 1px solid rgba(217, 182, 106, 0.1);
}
footer a { color: inherit; }

@media (max-width: 640px) {
  .bar { gap: 8px; padding: 8px 12px; }
  .brand { font-size: 15px; }
  .nav a { font-size: 13px; padding: 6px 8px; }
  .eyebrow { letter-spacing: 0.12em; }
  .section { padding: 56px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .motes { display: none; }
  html { scroll-behavior: auto; }
}

.filters { width: max-content; max-width: 100%; margin: 0 auto 20px; overflow-x: auto; }
.filters button { font-size: 13px; padding: 5px 14px; }
