:root {
  --display: "Courier New", "Osaka-Mono", "MS Gothic", ui-monospace, monospace;
  --bleed: 0 0 1px currentColor, 0.5px 0.8px 1.6px rgba(40, 38, 26, 0.55);
  --paper: #E8E0CC;
  --ink: #3A3A2E;
  --olive: #5B6236;
  --olive-soft: #7A755F;
  --accent: #C75B26;
  --rule: #B8AE92;
  --card: #EFE9D8;
  --stamp: #8A4B2A;
  --hero-ink: #F0EBD8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #22241C;
    --ink: #D6D2BD;
    --olive: #9BA36B;
    --olive-soft: #8A8770;
    --accent: #E07B3C;
    --rule: #45483A;
    --card: #2A2D22;
    --stamp: #C97445;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier New", "Osaka-Mono", "MS Gothic", ui-monospace, monospace;
  line-height: 1.75;
  margin: 0;
}
img { max-width: 100%; display: block; }

.classification {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  padding: 10px 20px; border-bottom: 2px solid var(--ink);
}
.classification .lang a { color: var(--ink); text-decoration: none; margin-left: 10px; }
.classification .lang a:hover, .classification .lang a:focus-visible { color: var(--accent); }
.classification .lang .active { color: var(--accent); }

/* 狭幅: 左右振り分けをやめて2段積みにし、字間と余白を詰めて収める */
@media (max-width: 760px) {
  .classification {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    padding: 8px 12px;
    text-align: center;
  }
  .classification .lang {
    display: flex; flex-wrap: wrap; justify-content: center;
  }
  .classification .lang a { margin: 0 6px; }
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; flex-direction: column;
  background: #1a1c14;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("env_forest.jpg") 50% 42% / cover no-repeat;
  filter: grayscale(1) contrast(1.06);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,15,0.55) 0%, rgba(20,22,15,0.15) 40%, rgba(20,22,15,0.88) 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero-top {
  display: flex; justify-content: flex-end; padding: 20px 24px;
}
.hero-top img { width: 150px; opacity: 0.95; }
.hero-body { padding: 0 24px 40px; max-width: 900px; margin: auto; width: 100%; }

.radio {
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(20, 22, 15, 0.72);
  font-size: 13.5px; letter-spacing: 0.04em;
  color: var(--hero-ink);
  max-width: 560px;
}
.radio p { margin: 0 0 6px; }
.radio p:last-child { margin-bottom: 0; }
.radio .t { color: #9BA36B; margin-right: 10px; }
.cursor {
  display: inline-block; width: 9px; height: 16px;
  background: var(--hero-ink); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
@keyframes blink { 50% { opacity: 0; } }

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 9.5vw, 104px);
  line-height: 1.02; letter-spacing: 0.01em; text-transform: uppercase;
  margin: 28px 0 4px;
  color: var(--hero-ink);
  text-wrap: balance;
  text-shadow: 0 0 1px currentColor, 0.6px 0.9px 1.8px rgba(0,0,0,0.7), 0 2px 18px rgba(0,0,0,0.6);
}
h1 .no-longer { color: #E07B3C; display: block; font-size: 0.52em; letter-spacing: 0.04em; margin-top: 6px; }
.hero .subtitle {
  font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #B9B49A; margin: 10px 0 0;
}

/* ---- BODY ---- */
.doc { max-width: 840px; margin: 0 auto; padding: 0 24px 96px; }
.lead { margin: 56px 0 0; font-size: 16px; max-width: 62ch; }

h2 {
  font-family: var(--display);
  font-weight: 700;
  text-shadow: var(--bleed);
  font-size: 26px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--olive);
  margin: 72px 0 8px;
  border-bottom: 2px solid var(--rule); padding-bottom: 6px;
}
h2 .en { color: var(--olive-soft); font-size: 17px; margin-left: 12px; letter-spacing: 0.18em; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 20px; }
.feature { background: var(--card); border: 1px solid var(--rule); padding: 18px 20px; }
.feature b {
  display: block; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.feature p { margin: 0; font-size: 14px; }

table { border-collapse: collapse; width: 100%; margin-top: 20px; font-size: 14px; }
th, td { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; }
th { background: var(--card); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--olive-soft); }
td.count { text-align: center; font-variant-numeric: tabular-nums; width: 3.5em; }
.table-wrap { overflow-x: auto; }

.photo { margin: 22px 0 0; }
.photo.archival img {
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 62%; /* 雪道の縦隊が写る帯に合わせる */
  filter: grayscale(1) contrast(1.05);
}
.photo img { border: 1px solid var(--rule); filter: saturate(0.9) contrast(1.02); }
.photo figcaption { font-size: 12px; letter-spacing: 0.12em; color: var(--olive-soft); margin-top: 8px; text-transform: uppercase; }

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 40;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  color: var(--paper);
  background: var(--olive);
  border: 1px solid var(--rule);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, background 0.15s, opacity 0.15s;
  opacity: 0.82;
}
.to-top:hover, .to-top:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--paper);
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

.changelog {
  margin: 30px 0 0;
  border: 1px solid var(--rule);
  padding: 16px 20px 14px;
  background: color-mix(in srgb, var(--olive) 6%, transparent);
}
.changelog .cl-title {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive-soft);
  margin-bottom: 10px;
}
.changelog ul { list-style: none; margin: 0; padding: 0; }
.changelog li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink);
  padding: 4px 0;
  border-top: 1px dotted var(--rule);
}
.changelog li:first-child { border-top: none; }
.changelog .cl-ver {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  color: var(--olive);
  min-width: 3.4em;
  letter-spacing: 0.05em;
}

.memorial {
  margin: 40px auto 8px;
  max-width: 620px;
  text-align: center;
  font-style: italic;
  font-size: 14px;
  line-height: 2.0;
  color: var(--olive-soft);
}
.memorial::before {
  content: "";
  display: block;
  width: 64px;
  margin: 0 auto 20px;
  border-top: 1px solid var(--rule);
}
.memorial b { font-style: normal; letter-spacing: 0.14em; color: var(--olive); }

.editions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.edition { border: 2px solid var(--olive); padding: 22px 24px; background: var(--card); position: relative; }
.edition .tag {
  position: absolute; top: -12px; left: 16px;
  background: var(--paper); border: 1px solid var(--olive);
  padding: 1px 10px; font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--olive);
}
.edition h3 {
  font-family: var(--display);
  font-weight: 700;
  text-shadow: var(--bleed);
  font-size: 21px; letter-spacing: 0.06em; text-transform: uppercase; margin: 6px 0 10px; color: var(--ink);
}
.edition p { font-size: 14px; margin: 0 0 8px; }
.edition .status { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stamp); }

blockquote {
  margin: 24px 0 0; padding: 24px 28px;
  border: 1px dashed var(--olive-soft);
  font-size: 15px; max-width: 62ch;
}
blockquote .respect { display: block; margin-top: 16px; font-size: 12.5px; color: var(--olive-soft); }

.cta { margin-top: 72px; text-align: center; }
.cta-icon {
  margin: 0 auto 16px;
  background: var(--olive);
  border-radius: 4px;
  padding: 8px;
}
.cta a {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper); background: var(--accent);
  padding: 16px 44px; text-decoration: none;
  border: 2px solid var(--accent);
}
.cta a:hover, .cta a:focus-visible { background: transparent; color: var(--accent); outline: none; }
.cta .note { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--olive-soft); margin-top: 12px; }

footer {
  margin-top: 88px; border-top: 2px solid var(--ink);
  padding-top: 18px; font-size: 12px; color: var(--olive-soft); letter-spacing: 0.06em;
}
footer .links {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  margin-top: 20px;
}
footer .links a { display: inline-flex; align-items: center; opacity: 0.8; }
footer .links a:hover, footer .links a:focus-visible { opacity: 1; }
footer .links img { height: 42px; width: auto; }
footer .logo-light { display: block; }
footer .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  footer .logo-light { display: none; }
  footer .logo-dark { display: block; }
}
footer .links a { gap: 10px; }
footer .chip {
  display: inline-flex; align-items: center;
  background: var(--olive); border-radius: 4px; padding: 6px 10px;
}
footer .chip img { height: 20px; width: auto; }
footer .ws { gap: 8px; text-decoration: none; }
footer .td {
  font-family: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  font-weight: 900; font-size: 1.05rem; letter-spacing: 0.06em;
  color: var(--ink); text-decoration: none;
}
footer .td span { color: #2b7fff; }
footer .ws-icon {
  display: inline-flex; background: var(--olive); border-radius: 4px; padding: 6px;
}
footer .ws-icon img { height: 26px; }
footer .ws-text {
  font-family: var(--display); font-weight: 700;
  font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-shadow: var(--bleed);
}
