:root {
  --bg: #ffffff;
  --ink: #17140f;
  --ink-2: #3d382f;
  --ink-3: #6b6457;
  --gold: #c58f12;
  --gold-hi: #e0a91f;
  --line: #e4ddce;
  --cinzel: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --ja: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.22rem/1.6 var(--serif); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
[lang="ja"] { font-family: var(--ja); }
em { font-style: italic; color: var(--gold); }

/* small tracked mono labels, as on the reference */
.chapter, .meta, .buy-label, .ticker, .legend, .stats-note, .ca, .dots span, .slide figcaption time {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
}
.chapter { color: var(--gold); display: flex; align-items: center; gap: 12px; margin: 0 0 22px; }
.chapter i { width: 40px; height: 1px; background: var(--gold); display: inline-block; opacity: .6; }
.ch > .chapter { justify-content: center; }
.door .chapter { justify-content: flex-start; }

/* nav */
.nav { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 3vw, 32px); background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: .9rem var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.brand img { border-radius: 50%; width: 44px; height: 44px; box-shadow: 0 4px 14px -4px rgba(197, 143, 18, .5); }
.buy { display: flex; align-items: center; gap: 8px; }
.buy-label { color: var(--ink-3); margin-right: 4px; }
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 8px 15px; border-radius: 999px; border: 1px solid #d9d2c3;
  color: var(--ink); text-decoration: none; font: .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; background: #fff; white-space: nowrap; }
.pill:hover { border-color: var(--gold); color: var(--gold); }
.pill.gold { background: var(--gold-hi); border-color: var(--gold-hi); color: #241800; }
.pill.gold:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.pill.big { padding: 15px 28px; font-size: .8rem; }

/* chapter dots */
.dots { position: fixed; z-index: 9; right: clamp(10px, 2vw, 26px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; }
.dots a { display: flex; align-items: center; gap: 8px; color: var(--ink-3); text-decoration: none; }
.dots a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; }
.dots a.on { color: var(--gold); }
.dots a.on::before { background: var(--gold); border-color: var(--gold); }
.dots span { font-size: .56rem; }

/* hero */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center;
  padding: 92px 16px 64px; overflow: hidden; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > :not(.dust) { position: relative; }
.medal { width: clamp(170px, 20vw, 240px); height: auto; border-radius: 50%; margin-bottom: 26px;
  box-shadow: 0 0 0 1px rgba(197, 143, 18, .25), 0 20px 60px -18px rgba(197, 143, 18, .55), 0 0 120px 10px rgba(240, 200, 90, .25); }
.wordmark { font: 500 clamp(2.9rem, 8.6vw, 6.4rem)/1 var(--cinzel); letter-spacing: .06em; text-transform: uppercase; display: flex; gap: .18em; justify-content: center; flex-wrap: wrap; }
.wordmark .g { color: var(--gold-hi); }
.tag { font: italic 400 clamp(1.35rem, 2.4vw, 1.75rem)/1.3 var(--serif); color: var(--ink-2); margin: 18px 0; }
.meta { color: var(--ink-3); display: flex; gap: 14px; align-items: center; justify-content: center; margin: 0 0 30px; flex-wrap: wrap; }
.meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.ca { display: inline-flex; gap: 12px; align-items: center; background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: .7rem; letter-spacing: .08em; text-transform: none; padding: 6px; max-width: 100%; }
.ca-text { word-break: break-all; }
.ca-done { color: var(--gold); text-transform: uppercase; letter-spacing: .2em; }
.ca:hover { color: var(--ink); }

/* ticker */
.ticker { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 16px; color: var(--ink-3); }
.ticker > span { padding: 0 clamp(12px, 2.4vw, 30px); border-left: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.ticker > span:first-child { border-left: 0; }
.ticker b { font-weight: 400; }
.ticker em { font: 400 1.1rem var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); font-style: normal; font-variant-numeric: tabular-nums; }
.ticker em.up { color: #2f7d3a; }
.ticker em.down { color: #b4432a; }
.live { color: #2f7d3a; display: flex; align-items: center; gap: 8px; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2f9e44; box-shadow: 0 0 0 4px rgba(47, 158, 68, .15); }

/* charity counter */
.charity { text-align: center; padding: clamp(70px, 9vw, 110px) 16px clamp(40px, 5vw, 60px); }
.c-label { font: .78rem var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.c-num { margin: 0; font: 500 clamp(3.2rem, 9vw, 6.6rem)/1 var(--cinzel); letter-spacing: .02em; font-variant-numeric: tabular-nums; display: flex; justify-content: center; align-items: baseline; gap: .25em; }
.c-unit { font-size: .38em; color: var(--gold-hi); letter-spacing: .12em; }
.c-usd { margin: 16px 0 0; font: italic 400 1.4rem var(--serif); color: var(--ink-2); }
.c-usd #c-trades { font-style: normal; color: var(--ink-3); }
.c-note { max-width: 52ch; margin: 22px auto 0; color: var(--ink-2); font-size: 1.08rem; }
.meta a { color: var(--gold); text-decoration: none; }
.meta a:hover { text-decoration: underline; }

/* chapters */
.ch { padding: clamp(90px, 13vw, 170px) clamp(16px, 6vw, 96px); max-width: 1240px; margin: 0 auto; }
.say { font: 400 clamp(2.15rem, 4.5vw, 3.6rem)/1.2 var(--serif); letter-spacing: -.01em; max-width: 22ch; }
.say .dim { color: var(--ink-3); display: block; }
.say.center { margin: 0 auto; text-align: center; }
.body { color: var(--ink-2); max-width: 46ch; margin: 28px 0 0; font-size: 1.24rem; }

/* door: text and a small rotating print */
.door { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 90px); align-items: center; }
.show { position: relative; max-width: 420px; width: 100%; justify-self: center; }
.frame { position: relative; aspect-ratio: 4 / 5; background: #faf7f0; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(80, 60, 10, .35); transform: rotate(-1.2deg); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; display: flex; flex-direction: column; }
.slide.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }
.slide img { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: cover; }
.slide figcaption { flex: none; padding: 12px 14px 14px; background: #fff; display: flex; flex-direction: column; gap: 2px; font-size: 1.02rem; line-height: 1.35; color: var(--ink-2); }
.slide figcaption time { color: var(--gold); }
.slide figcaption [lang="ja"] { display: none; }
.show-ctl { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.pause { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d9d2c3; background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.pause:hover { border-color: var(--gold); color: var(--gold); }
.i-pause { width: 8px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.pause[aria-pressed="true"] .i-pause { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent currentColor; margin-left: 2px; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; flex: 1; }
.ticks li { flex: 1; }
.ticks button { display: block; width: 100%; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.ticks button::after { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line); }
.ticks button[aria-current="true"]::after { background: var(--gold-hi); }

/* letter */
.letter .byline { text-align: center; color: var(--ink-3); font-size: 1.05rem; margin: 26px auto 64px; max-width: 56ch; }
.verses { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; }
.verses li { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 5vw, 64px); padding: 24px 0; border-top: 1px solid var(--line); }
.verses li p { margin: 0; }
.verses [lang="ja"] { font-size: 1.02rem; line-height: 1.95; color: var(--ink-3); }
.verses [lang="ja"] br { display: none; }
.verses li > p:last-child { font: 400 1.4rem/1.5 var(--serif); }
.verses li.last > p:last-child { font: italic 400 2rem/1.35 var(--serif); color: var(--gold); }
.support { text-align: center; color: var(--ink-2); margin: 54px auto 0; max-width: 60ch; }

/* timeline */
.legend { display: flex; justify-content: center; gap: 26px; color: var(--ink-3); margin: 36px 0 60px; }
.legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.legend .k::before { background: var(--ink); }
.legend .g::before { background: var(--gold-hi); }
.timeline { list-style: none; margin: 0 auto; padding: 0; position: relative; max-width: 1040px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line); }
.timeline li { position: relative; width: 50%; padding: 0 0 38px; }
.timeline li::before { content: ""; position: absolute; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1.5px solid var(--gold-hi); }
.timeline li.k { padding-right: 46px; text-align: right; }
.timeline li.k::before { right: -5px; border-color: var(--ink); }
.timeline li.g { margin-left: 50%; padding-left: 46px; }
.timeline li.g::before { left: -4px; }
.timeline li.now::before { background: var(--gold-hi); box-shadow: 0 0 0 6px rgba(224, 169, 31, .2); }
.timeline li.next { opacity: .6; }
.timeline time { display: block; font: .72rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.timeline li.k time { color: var(--ink-3); }
.timeline h3 { font: 400 1.65rem/1.2 var(--serif); margin-bottom: 6px; }
.timeline p { margin: 0; color: var(--ink-2); max-width: 38ch; font-size: 1.12rem; }
.timeline li.k p { margin-left: auto; }

/* coin */
.coin .say { margin-bottom: 54px; }
.chart { position: relative; height: clamp(380px, 48vw, 560px); border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 30px 70px -40px rgba(80, 60, 10, .4); }
.chart iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stats-note { color: var(--ink-3); text-align: center; margin: 16px 0 34px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.fine { color: var(--ink-3); font-size: .98rem; max-width: 64ch; margin: 0 auto; text-align: center; }

@media (max-width: 900px) {
  .door { grid-template-columns: 1fr; }
  .show { max-width: 340px; }
  .dots { display: none; }
}
@media (max-width: 640px) {
  .buy-label, .hide-sm { display: none; }
  .pill { padding: 7px 11px; }
  .brand span { display: none; }
  .ticker > span { padding: 0 10px; }
  .verses li { grid-template-columns: 1fr; gap: 8px; }
  .timeline::before { left: 4px; }
  .timeline li, .timeline li.g, .timeline li.k { width: auto; margin-left: 0; padding: 0 0 32px 28px; text-align: left; }
  .timeline li.k::before, .timeline li.g::before { left: 0; right: auto; }
  .timeline li.k p { margin-left: 0; }
}
