:root {
  --ink: #111111;
  --paper: #ffffff;
  --soft: #6f6f6f;
  --line: #c9c9c9;
  --track-rail-width: clamp(68px, 6vw, 94px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  padding-right: var(--track-rail-width);
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 var(--track-rail-width) auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 clamp(16px, 2.5vw, 38px);
  border-bottom: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}
.site-mark { font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; }
.glyph-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.num-140, .mark-140 { display: block; width: auto; fill: currentColor; }
.site-mark .mark-140 { height: 0.76em; }
.track-rail-labels .mark-140 { height: 0.78em; }
.track-progress .num-140 { display: inline-block; height: 0.82em; vertical-align: -0.08em; }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 48px); }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.site-header nav svg { width: 12px; height: 12px; }
.site-header a:hover { opacity: 0.5; }

.gps-floating {
  position: fixed;
  left: clamp(14px, 2.5vw, 38px);
  right: auto;
  bottom: 78px;
  z-index: 19;
  width: clamp(150px, 10vw, 180px);
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}
.gps-floating-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}
.gps-floating-head span:last-child { color: var(--soft); }
.gps-floating-preview {
  height: clamp(78px, 6.5vw, 104px);
  overflow: hidden;
  background: #f2f2f2;
}
.gps-floating-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.gps-floating-open {
  display: block;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: left;
}
.gps-floating-open:hover { color: var(--paper); background: var(--ink); }

.gps-dialog {
  width: min(1180px, calc(100vw - 32px)) !important;
  max-width: none !important;
  height: min(84svh, 820px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 !important;
  overflow: hidden;
  padding: 0 !important;
  border-radius: 0 !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
}
.gps-dialog[open] { display: grid; }
.gps-dialog::backdrop { background: rgba(0, 0, 0, 0.48); }
.gps-dialog-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}
.gps-dialog-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 16px 28px;
  padding: 18px 58px 17px 20px;
  border-bottom: 1px solid var(--ink);
}
.gps-dialog-header [data-slot='dialog-title'] {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.gps-dialog-header > strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.gps-dialog-header > p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
}
.gps-dialog-header [data-slot='dialog-description'] {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.5;
}
.gps-frame-wrap { min-height: 0; background: #f2f2f2; }
.gps-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }

.cover {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.cover-visual {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 78px 24px 42px;
}
.cover-visual picture { display: block; }
.cover-visual img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(84svh, 1120px);
  object-fit: contain;
}
.cover-scroll {
  position: absolute;
  right: clamp(16px, 2.5vw, 38px);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.cover-scroll svg { width: 14px; height: 14px; }

.track-overlay {
  position: fixed;
  z-index: 18;
  inset: 54px 0 0 auto;
  width: var(--track-rail-width);
  overflow: hidden;
  border-left: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.97);
  pointer-events: none;
  color: var(--ink);
}
.track-overlay-canvas {
  position: absolute;
  inset: 0;
}
.track-overlay-canvas svg { width: 100%; height: 100%; }
.track-active-lines path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}
.track-active-lines path {
  stroke-dasharray: none;
}
.track-rail-labels {
  position: absolute;
  inset: 0;
}
.track-rail-labels span {
  position: absolute;
  left: 50%;
  display: grid;
  width: 2.25em;
  height: 0.82em;
  place-items: center;
  transform: translate(-50%, -50%) rotate(90deg);
  background: var(--paper);
  font-size: clamp(0.78rem, 1vw, 0.96rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  transition: opacity 90ms linear;
}
.track-progress {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 10px;
  margin: 0;
  padding: 4px 2px;
  transform: translateX(-50%);
  background: var(--paper);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cover-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.3fr) minmax(0, 1fr);
  gap: clamp(44px, 6vw, 96px);
  padding: clamp(56px, 8vw, 110px) clamp(16px, 5vw, 78px);
  border-top: 1px solid var(--ink);
}
.overview-heading p,
.overview-facts dt {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.overview-heading p { margin: 0 0 20px; color: var(--soft); }
.overview-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 3.7vw, 4.15rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.overview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ink);
}
.overview-facts div {
  display: block;
  min-width: 0;
  padding: 18px 24px 20px 0;
  border-bottom: 1px solid var(--line);
}
.overview-facts .overview-right {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.overview-facts .overview-wide { grid-column: 1 / -1; }
.overview-facts dt { margin-bottom: 9px; color: var(--soft); }
.overview-facts dd { margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.75; }
.overview-facts .overview-wide:first-child dd {
  font-size: clamp(1.1rem, 1.45vw, 1.35rem);
  font-weight: 700;
  line-height: 1.55;
}
.overview-facts a { text-decoration: underline; text-underline-offset: 0.2em; }
.overview-facts a:hover { opacity: 0.5; }

.content-index {
  display: grid;
  grid-template-columns: minmax(100px, 0.24fr) 1fr;
  gap: clamp(28px, 6vw, 96px);
  padding: 20px clamp(16px, 5vw, 78px);
  border-bottom: 1px solid var(--ink);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.content-index > span { color: var(--soft); }
.content-index div { display: flex; flex-wrap: wrap; gap: 12px clamp(20px, 4vw, 64px); }
.content-index a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

.document-shell {
  position: relative;
  min-height: 70vh;
  padding: clamp(48px, 8vw, 120px) clamp(16px, 8vw, 130px) clamp(76px, 12vw, 180px);
  background: var(--paper);
  color: var(--ink);
}
.document-rail { position: sticky; top: 74px; z-index: 2; height: 0; pointer-events: none; }
.document-rail span {
  position: absolute;
  left: calc(clamp(16px, 8vw, 130px) * -1 + 18px);
  writing-mode: vertical-rl;
  color: var(--soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.live-document { max-width: 1160px; margin: 0 auto; opacity: 0; transition: opacity 250ms ease; }
.live-document.is-ready { opacity: 1; }
.document-status { max-width: 1160px; margin: 0 auto; padding: 48px 0; font-size: 0.86rem; font-weight: 700; }
.document-error a { display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid; }
.document-error svg { width: 15px; height: 15px; }

@media (max-width: 840px) {
  .cover-overview { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --track-rail-width: 48px; }
  .site-header nav a:first-child { display: none; }
  .site-header nav { gap: 18px; }
  .gps-floating {
    left: 9px;
    right: auto;
    bottom: 76px;
    width: 128px;
  }
  .gps-floating-head { padding: 6px 7px; font-size: 0.48rem; }
  .gps-floating-head span:last-child { display: none; }
  .gps-floating-preview { height: 68px; }
  .gps-floating-open { padding: 7px; font-size: 0.5rem; }
  .gps-dialog { width: calc(100vw - 18px) !important; height: 88svh; }
  .gps-dialog-header { grid-template-columns: 1fr; gap: 7px; padding: 15px 48px 14px 14px; }
  .gps-dialog-header [data-slot='dialog-description'] { display: grid; gap: 5px; }
  .gps-dialog-header > p { display: grid; gap: 5px; }
  .cover-visual { min-height: auto; padding: 82px 12px 54px; }
  .cover-visual img { width: 100%; height: auto; max-height: none; }
  .cover-scroll { display: none; }
  .track-active-lines path { stroke-width: 2; }
  .track-rail-labels span { height: 0.72em; font-size: 0.68rem; }
  .track-progress { bottom: 6px; font-size: 0.48rem; }
  .cover-overview { gap: 32px; padding: 48px 16px 64px; }
  .overview-heading h2 { font-size: clamp(2.5rem, 11vw, 3.25rem); }
  .overview-facts { grid-template-columns: 1fr; }
  .overview-facts .overview-wide { grid-column: auto; }
  .overview-facts div,
  .overview-facts .overview-right {
    padding: 15px 0 17px;
    border-left: 0;
  }
  .content-index { grid-template-columns: 1fr; gap: 12px; }
  .content-index div { display: grid; grid-template-columns: 1fr 1fr; }
  .document-shell { padding-left: 28px; padding-right: 10px; }
  .document-rail span { left: -21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
