:root {
  --red: #d71718;
  --black: #0a0a0a;
  --char: #272727;
  --char2: #1d1d1d;
  --white: #fff;
  --grey: #9a9a9a;
  --dim: #6b6b6b;
  --line: #3a3a3a;
  --paper: #ecebe6;
  --ink: #1d2433;
  --en: "Anton", "Impact", "Arial Narrow", sans-serif;
  --jp: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--black); }
body { background: var(--black); color: var(--white); font-family: var(--jp); line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
.nb { display: inline-block; }
h1, h2, h3, .lead, .outro-line { word-break: auto-phrase; }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; pointer-events: none; }
.nav a { pointer-events: auto; }
.wordmark { font-family: var(--en); color: var(--red); font-size: 30px; letter-spacing: .01em; text-decoration: none; line-height: 1; }
.nav-cta { font-size: 14px; font-weight: 700; text-underline-offset: 6px; }

/* ① story */
.story { position: relative; height: 560vh; background: var(--black); }
.story-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.room, .room-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.room-fallback { display: none; background: radial-gradient(50% 45% at 55% 42%, rgba(80, 120, 200, .35), transparent 70%), var(--black); }
.no-webgl .room { display: none; }
.no-webgl .room-fallback { display: block; }
.story-inner { position: relative; z-index: 2; height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 56px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 40px; }
.intro { grid-column: 1 / -1; grid-row: 1; }
.log { grid-column: 1; grid-row: 1; }
.outro { grid-column: 2; grid-row: 1; }

[data-show] { transition: opacity .2s linear, transform .2s linear; }
.js [data-show].off { opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s linear, transform .2s linear, visibility 0s .2s; }

.tag { display: inline-block; border: 1.5px solid var(--red); color: var(--red); font-size: 14px; font-weight: 700; padding: 2px 10px; margin-bottom: 18px; }
h1 { font-size: clamp(36px, 5.6vw, 76px); font-weight: 700; line-height: 1.22; letter-spacing: -.01em; }
.lead { margin-top: 18px; color: #d8d8d8; font-size: clamp(15px, 1.5vw, 20px); font-weight: 500; }
.btn-red { display: inline-block; margin-top: 28px; background: var(--red); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; padding: 14px 44px; transition: filter .15s; }
.btn-red:hover { filter: brightness(1.1); }

.log { list-style: none; padding: 0; display: grid; gap: 12px; align-self: center; }
.say { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; align-items: baseline; }
.say .who { color: var(--grey); font-size: 14px; font-weight: 700; border-right: 1.5px solid var(--line); padding-right: 12px; }
.say p { font-size: clamp(15px, 1.35vw, 19px); font-weight: 500; }
.say.ai .who { color: #cfd8ea; }
.step { margin-left: calc(7.5em + 16px); display: flex; align-items: center; gap: 12px; color: #c9c9c9; font-size: clamp(14px, 1.2vw, 16px); }
.step i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.step.is-done i { animation: none; border: 0; border-radius: 0; width: 16px; height: 10px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(2px, -2px); }
.log.past .say:not(.latest), .log.past .step { opacity: .45; }
@keyframes spin { to { transform: rotate(360deg); } }

.outro { align-self: center; }
.outro-line { font-size: clamp(36px, 4.6vw, 64px); font-weight: 900; line-height: 1.25; }

.scroll-hint { position: absolute; z-index: 2; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font-family: var(--en); font-size: 12px; letter-spacing: .2em; color: #cfcfcf; }
.scroll-hint span { width: 1.5px; height: 46px; background: linear-gradient(#fff, #fff) 0 0 / 100% 0 no-repeat, rgba(255,255,255,.25); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { background-size: 100% 0; } 60% { background-size: 100% 100%; } 100% { background-size: 100% 100%; opacity: 0; } }

/* sections */
.sec { background: var(--char); padding: 120px 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.center { text-align: center; }
.en { font-family: var(--en); font-weight: 400; color: var(--red); font-size: clamp(56px, 9vw, 120px); line-height: .95; letter-spacing: .005em; }
.label { display: inline-block; background: var(--red); color: #fff; font-weight: 700; font-size: clamp(15px, 1.6vw, 20px); padding: 4px 16px; margin-top: 10px; }
.label.center { display: block; width: fit-content; margin-inline: auto; }

/* ② before/after: two rows on one time axis */
.gantt { margin-top: 72px; --name: 10em; }
.g-head, .g-row { display: grid; grid-template-columns: var(--name) minmax(0, 1fr); column-gap: 32px; }
.g-axis, .g-track { position: relative; margin-right: 56px; }
.g-axis { height: 28px; border-bottom: 1px solid var(--line); }
.g-axis i { position: absolute; left: var(--x); bottom: 8px; transform: translateX(-50%); font-style: normal; font-size: 13px; font-weight: 700; color: var(--grey); white-space: nowrap; }
.g-axis i:first-child { transform: none; }
.g-axis i:last-child { color: #fff; }
.g-row { align-items: start; padding: 40px 0 0; min-height: 150px; }
.g-row + .g-row { border-top: 1px solid var(--line); }
.g-name { font-weight: 700; font-size: 18px; padding-top: 0; line-height: 1.3; transform: translateY(-4px); }
.red .g-name { color: var(--red); }
.g-track { height: 130px; background: repeating-linear-gradient(90deg, transparent 0 calc(14.3% - 1px), rgba(255,255,255,.06) calc(14.3% - 1px) 14.3%); background-size: 100% 100%; }
.g-bar { position: absolute; left: 0; right: 0; top: 6px; height: 4px; background: #7a7a7a; transform-origin: left; }
.g-pt { position: absolute; left: var(--x); top: 0; width: 0; }
.g-pt::before { content: ""; position: absolute; left: -8px; top: 0; width: 16px; height: 16px; background: #a8a8a8; }
.g-pt em { position: absolute; top: 28px; left: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; font-style: normal; font-size: 13px; font-weight: 700; line-height: 1.45; color: #cfcfcf; }
.g-first em { transform: none; left: -8px; text-align: left; }
.g-track .g-pt:nth-child(3) em, .g-track .g-pt:nth-child(5) em { top: 62px; }
.g-track .g-pt:nth-child(3)::after, .g-track .g-pt:nth-child(5)::after { content: ""; position: absolute; left: -0.5px; top: 20px; width: 1px; height: 40px; background: #555; }
.g-end::before { background: #fff; width: 20px; height: 20px; left: -10px; top: -2px; }
.g-end em { color: #fff; font-size: 16px; transform: translateX(-100%); left: 10px; text-align: right; }
.g-dot { position: absolute; left: -10px; top: -2px; width: 20px; height: 20px; background: var(--red); }
.g-done { position: absolute; left: 30px; top: -12px; }
.g-done strong { display: block; font-size: clamp(26px, 3vw, 40px); font-weight: 900; line-height: 1.2; }
.g-done small { display: block; font-size: 14px; font-weight: 700; color: #cfcfcf; margin-top: 4px; }

/* ④ board */
.board-sec { padding: 0; background: var(--black); }
.board { position: relative; min-height: 100vh; padding: 110px 56px 120px; background-color: #0b0b0b; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 34px 34px; overflow: hidden; }
.board-head { max-width: 1160px; margin: 0 auto; }
.papers { filter: drop-shadow(0 12px 18px rgba(0,0,0,.55)); max-width: 1160px; margin: 56px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 64px; }
.paper { position: relative; background: var(--paper); color: var(--ink); padding: 58px 36px 36px; transform: rotate(var(--r)); }
.paper:nth-child(2) { margin-top: 48px; }
.paper:nth-child(4) { margin-top: 40px; }
.paper.ruled { background-image: repeating-linear-gradient(transparent 0 31px, rgba(80, 110, 170, .25) 31px 32px), radial-gradient(circle at 16px 50%, #0b0b0b 6px, transparent 7px); background-size: auto, 32px 44px; background-repeat: repeat, repeat-y; padding-left: 52px; }
.paper p { font-size: 17px; font-weight: 500; line-height: 2; }
.paper p + p { margin-top: 10px; }
.paper b { color: #6a6f7a; font-weight: 700; margin-right: .6em; }
.tape { position: absolute; top: -4px; left: 22%; width: 96px; height: 30px; background: rgba(214, 196, 150, .78); transform: rotate(-4deg); }
.ptag { position: absolute; top: 10px; right: 18px; background: var(--red); color: #fff; font-weight: 700; font-size: 17px; padding: 4px 16px; transform: rotate(3deg); }

/* ⑤ about card */
.card { margin-top: 56px; display: grid; grid-template-columns: 44% 56%; min-height: 440px; overflow: hidden; }
.card-left { background: #34465a; display: grid; place-items: center; padding: 40px; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); margin-right: -12%; position: relative; z-index: 1; }
.tile { width: min(100%, 380px); aspect-ratio: 16 / 10; background: #202124; border-radius: 8px; display: grid; place-content: center; justify-items: center; gap: 6px; }
.ring { width: 76px; height: 76px; border: 3px solid #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 5px; }
.ring i { display: block; width: 7px; border-radius: 4px; background: #fff; }
.ring i:nth-child(1) { height: 20px; } .ring i:nth-child(2) { height: 32px; } .ring i:nth-child(3) { height: 16px; }
.tile-state { color: #9aa0a6; font-size: 13px; font-weight: 700; margin-top: 8px; }
.tile-name { font-size: 20px; font-weight: 700; }
.card-right { position: relative; background: var(--red); padding: 48px 56px 48px 18%; overflow: hidden; }
.ghost { position: absolute; top: -18px; right: -10px; font-family: var(--en); font-size: clamp(120px, 15vw, 200px); line-height: 1; color: rgba(0,0,0,.12); pointer-events: none; }
.card-right h3 { position: relative; font-size: clamp(48px, 6vw, 80px); font-weight: 900; line-height: 1.1; margin-top: 40px; }
.card-title { position: relative; font-size: clamp(18px, 2vw, 24px); font-weight: 700; padding-bottom: 18px; border-bottom: 1.5px solid rgba(255,255,255,.8); margin-top: 8px; }
.profile { position: relative; margin-top: 18px; display: grid; gap: 8px; }
.profile div { display: grid; grid-template-columns: 8.5em 1fr; gap: 12px; font-size: 15px; }
.profile dt { font-weight: 700; opacity: .85; }
.profile dd { font-weight: 500; }

/* ⑥ join */
.spaced { letter-spacing: .5em; font-weight: 700; font-size: clamp(16px, 1.8vw, 22px); margin-top: 14px; padding-left: .5em; }
.join-big { font-size: clamp(40px, 6vw, 76px); font-weight: 900; margin-top: 18px; line-height: 1.2; }
.join-sub { color: #cfcfcf; margin-top: 12px; }
.wl { max-width: 720px; margin: 36px auto 0; }
.wl-row { display: flex; }
.wl-row input { flex: 1; min-width: 0; background: #3a3a3a; border: 0; outline: 0; color: #fff; font: inherit; font-size: 18px; padding: 18px 22px; }
.wl-row input::placeholder { color: #a3a3a3; }
.wl-row input:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
.wl-row button { flex: none; background: var(--red); color: #fff; border: 0; font: inherit; font-weight: 700; font-size: 18px; padding: 0 44px; cursor: pointer; }
.wl-row button:disabled { opacity: .6; cursor: default; }
.wl-uses { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; margin-top: 20px; font-size: 15px; }
.wl-uses-label { color: #cfcfcf; margin-right: 6px; }
.wl-uses label { cursor: pointer; }
.wl-uses input { position: absolute; opacity: 0; pointer-events: none; }
.wl-uses label span { display: inline-block; border: 1.5px solid #cfcfcf; padding: 6px 18px; font-weight: 700; }
.wl-uses input:checked + span { background: #fff; color: var(--black); border-color: #fff; }
.wl-uses input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wl-msg { min-height: 1.6em; margin-top: 12px; font-size: 15px; }
.wl-msg.err { color: #ff8a8a; }
.wl-note { color: #a8a8a8; font-size: 13px; }
.done { max-width: 720px; margin: 36px auto 0; border: 1.5px solid #fff; padding: 22px; }
.done strong { font-size: 20px; }
.done p { color: #cfcfcf; margin-top: 4px; }

.story-note { position: absolute; z-index: 2; right: 24px; bottom: 18px; margin: 0; font-size: 11px; color: rgba(255,255,255,.45); }
.foot-note { margin: 0 0 8px; font-size: 12px; color: #8a8a8a; }
.foot { background: var(--char); color: #a8a8a8; font-size: 13px; text-align: center; padding: 28px 0 40px; border-top: 1px solid var(--line); }

/* mobile */
@media (max-width: 860px) {
  .story-note { left: 16px; right: auto; bottom: 10px; font-size: 10px; }
  .scroll-hint { bottom: 34px; }
  .nav { padding: 14px 18px; }
  .wordmark { font-size: 24px; }
  .story { height: 620vh; }
  .story-inner { grid-template-columns: 1fr; grid-template-rows: 1fr auto; padding: 72px 20px 40px; gap: 0; align-items: end; }
  .intro, .log, .outro { grid-column: 1; grid-row: 1; align-self: end; }
  .outro { grid-row: 2; }
  .log { gap: 10px; }
  .say { grid-template-columns: 1fr; gap: 2px; }
  .say .who { border: 0; padding: 0; font-size: 12px; }
  .step { margin-left: 0; }
  .outro-line { font-size: 30px; margin-top: 18px; }
  .outro .btn-red { margin-top: 14px; }
  .sec { padding: 88px 0; }
  .wrap { padding: 0 20px; }
  .board { padding: 88px 20px; }
  .papers { grid-template-columns: 1fr; gap: 40px; }
  .paper:nth-child(n) { margin-top: 0; }
  .paper { padding: 50px 22px 26px; }
  .paper.ruled { padding-left: 40px; }
  .card { grid-template-columns: 1fr; }
  .card-left { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); margin: 0 0 -10%; padding: 32px 20px 56px; }
  .card-right { padding: 64px 22px 32px; }
  .profile div { grid-template-columns: 1fr; gap: 0; }
  .wl-row { flex-direction: column; }
  .wl-row button { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .story { height: auto; }
  .story-sticky { position: relative; height: auto; min-height: 100vh; }
  .story-inner { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 80px; gap: 48px; }
  .intro, .log, .outro { grid-row: auto; }
  .scroll-hint { display: none; }
  .step i { animation: none; }
}

/* mobile refinements */
@media (max-width: 860px) {
  h1 { font-size: 30px; }
  .story-inner { text-shadow: 0 0 14px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.9); }
}


@media (max-width: 860px) {
  .gantt { margin-top: 48px; }
  .g-head, .g-row { grid-template-columns: minmax(0, 1fr); }
  .g-head > span { display: none; }
  .g-axis, .g-track { margin-right: 24px; margin-left: 8px; }
  .g-axis i { font-size: 11px; }
  .g-axis i:nth-child(2), .g-axis i:nth-child(3), .g-axis i:nth-child(4) { display: none; }
  .g-name { font-size: 15px; margin-bottom: 18px; transform: none; }
  .g-row { padding-top: 28px; min-height: 0; }
  .g-track { height: 64px; }
  .g-pt:not(.g-first):not(.g-end) em { display: none; }
  .g-pt em { font-size: 12px; }
  .g-end em { font-size: 14px; }
  .red .g-track { height: 84px; }
}
