/* WAYSIDE REPORT LP — トークンは docs/wayside-design-spec.md §1 と同一 */
:root {
  --paper: #FEF8F0;
  --navy: #3B5598;
  --orange: #F08A24;
  --orange-deep: #D9711C;
  --body: #444444;
  --hairline: #E0E0E0;
  --panel: #F8FAFD;
  --serif: "Baskerville", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif; /* メール雛形のロゴ行と同じ順(2026-10-13 整合) */
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --gothic: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", sans-serif;
  --mono: "Courier New", Courier, monospace;
}
/* 英語ページ: 明朝指定の見出し(h2・タグライン・箱名・署名)はラテン文字用セリフ(Baskerville)で描く。日本語ページは従来どおり明朝(2026-10-13) */
html[lang="en"] { --mincho: var(--serif); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  overflow-x: hidden; /* si-toc の全幅はみ出し(100vw)がスクロールバー分はみ出るのを防ぐ */
  background: var(--paper);
  color: var(--body);
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.9;
}

a { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ---- 紺帯 hero ---- */
.masthead {
  background: var(--navy);
  color: #fff;
  padding: 56px 24px 40px;
}
.masthead-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.logo-block { flex: 1; min-width: 0; }
.logo {
  font-family: var(--serif);
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: 0.06em;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}
/* REPORT の R→T 白→橙6段点火(メール看板と同構図) */
.logo .g1 { color: #ffffff; }
.logo .g2 { color: #fdeacf; }
.logo .g3 { color: #fbd3a2; }
.logo .g4 { color: #f8bc75; }
.logo .g5 { color: #f4a34c; }
.logo .g6 { color: #F08A24; }
.byline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: #ffffffcc;
  margin-top: 8px;
}
/* 言語切替(看板の右上・2026-10-12 對馬「上の方にも出さないと」) */
.lang-bar {
  max-width: 680px;
  margin: -32px auto 20px;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #ffffff99;
}
.lang-bar a { color: #ffffffb3; text-decoration: none; }
.lang-bar a:hover { color: #fff; text-decoration: underline; }
.lang-bar .cur { color: #fff; font-weight: 700; }
.tagline {
  font-family: var(--mincho);
  font-size: clamp(17px, 3.4vw, 21px);
  color: #fff;
  margin-top: 28px;
  letter-spacing: 0.08em;
}
.hero-lead {
  font-size: 14px;
  color: #ffffffd9;
  margin-top: 12px;
}

/* 判子(創刊準備中) */
.stamp {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: bold;
  color: var(--orange);
  text-align: center;
  line-height: 1.3;
  /* 傾きなし = メール雛形と同じ水平判子(2026-08-31 對馬) */
}
/* 判子 N改(2026-08-31 對馬): WAYSIDE(小)/号数(大)/日付(小)の三段 */
.stamp .s1 { font-size: 10px; letter-spacing: 0.1em; }
.stamp .s2 { font-size: 22px; line-height: 1.15; }
.stamp .s3 { font-size: 11px; }

/* ---- 刊行メーター(52本・創刊前=0本点灯・第1本が予告のパルス) ---- */
/* LP は帯の中(2026-08-31 對馬+CC: LP のメーターは紙の上だと着地する床がなく浮く — 帯=ヒーロー看板の一部が持ち場。
   メールは紙の上のまま = 誌面の計器として本文に挟まれて着地しており役割が違う) */
.meter-band {
  background: var(--navy);
  padding: 0 24px 36px;
}
.meter-inner { max-width: 680px; margin: 0 auto; }
/* 未点灯ティックの下地 = --ground。1周目 = 白系 / 2周目以降 = 薄橙(轍リセット: 走り切った周の痕が下地に残る) */
.meter {
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    var(--ground, #ffffff59) 0, var(--ground, #ffffff59) 2px,
    transparent 2px, transparent calc(100% / 52)
  );
  position: relative;
}
/* 点灯済みの本数 = --lit(HTML 側で毎号更新・機械導出)*/
.meter .lit {
  position: absolute;
  left: 0;
  top: 0;
  height: 14px;
  width: calc(100% / 52 * var(--lit, 0));
  background: repeating-linear-gradient(
    90deg,
    var(--orange) 0, var(--orange) 2px,
    transparent 2px, transparent calc(100% / max(var(--lit, 1), 1))
  );
}
.meter .first-tick {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 14px;
  background: var(--orange);
  animation: tick-pulse 1.8s linear infinite;
}
/* 光る時は一瞬(0→6% で点灯)・消える時はゆっくり(6%→100% で減衰)— 2026-10-12 對馬 */
@keyframes tick-pulse {
  0%   { opacity: 0;    animation-timing-function: linear; }
  6%   { opacity: 1;    animation-timing-function: ease-out; }
  100% { opacity: 0; }
}

/* ---- 本文 ---- */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px;
}
section { padding: 48px 0; border-bottom: 1px solid var(--hairline); }
section:last-of-type { border-bottom: none; }

h2 {
  font-family: var(--mincho);
  font-size: 22px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}
p + p { margin-top: 1em; }
.note { font-size: 13px; color: #777; }

/* 構成 01〜06(番号=実際の箱番号) */
.boxes { list-style: none; }
.boxes li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.boxes li:last-child { border-bottom: 1px solid var(--hairline); }
.boxes .num {
  font-family: var(--mono);
  font-weight: bold;
  color: var(--orange-deep);
  flex-shrink: 0;
  width: 2em;
}
.boxes .box-name {
  font-family: var(--mincho);
  color: var(--navy);
  font-weight: 600;
  display: block;
}
.boxes .box-desc { font-size: 14px; }
/* 04 今週の1本 = 借り物の破線枠(メールと同記号) */
.boxes li.borrowed {
  border: 1.5px dashed var(--orange);
  padding: 14px 16px;
  margin: 8px 0;
}
.boxes li.borrowed + li { border-top: none; }

/* 著者 */
.author { display: flex; gap: 20px; align-items: flex-start; }
.author-name {
  font-family: var(--mincho);
  color: var(--navy);
  font-weight: 600;
  font-size: 17px;
}

/* Founding Member */
.founding {
  background: var(--panel);
  padding: 24px;
}
.founding h2 { margin-bottom: 12px; }

/* ---- 登録フォーム ---- */
.subscribe { padding: 48px 0 64px; }
.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
input[type="email"] {
  width: 100%;
  font-size: 16px;
  font-family: var(--gothic);
  padding: 12px 14px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  color: var(--body);
}
.editions { margin: 20px 0; }
.edition {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
}
.edition input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--navy); }
.edition .ed-name { font-weight: 600; color: var(--navy); }
.edition .ed-desc { font-size: 13px; color: #777; display: block; }
.consent { font-size: 12.5px; color: #777; margin: 16px 0 0; }
button[type="submit"] {
  font-family: var(--gothic);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 4px;
  padding: 14px 40px;
  margin-top: 16px;
  cursor: pointer;
}
button[type="submit"]:hover { background: #2e4478; }

/* ---- フッター(紺帯) ---- */
footer {
  background: var(--navy);
  color: #ffffffcc;
  font-size: 13px;
  padding: 32px 24px;
}
.footer-inner { max-width: 680px; margin: 0 auto; }
footer a { color: #fff; }
.footer-links { margin-top: 8px; }
.footer-links a { margin-right: 16px; }
.lang-switch { margin-top: 16px; font-family: var(--mono); }

@media (max-width: 540px) {
  .masthead-inner { flex-direction: column; }
  .stamp { align-self: flex-end; margin-top: -8px; }
  .logo { white-space: normal; }
}

/* ---- フォーム送信ステータス(配線 2026-08-31) ---- */
.form-status {
  margin-top: 12px; margin-bottom: 0;
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}
.form-status.is-error { color: #c0392b; font-weight: 400; }

/* ---- 見本号 #000 = 本番メールの丸ごと再現(帯・判子・メーター込み・2026-08-31 對馬「本番と全く同じ帯まで入れちゃう」) ----
   本物と同じ幅 600px の「一通の手紙」として額装(細罫+影)。白帯は手紙の端まで(=メールと同じ振る舞い) */
.si-mail {
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--hairline);
  box-shadow: 0 3px 18px rgba(59, 85, 152, 0.10);
  background: var(--paper);
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--body);
}
/* ミニ紺帯(メールのレターヘッド: ロゴ+by行+判子) */
.si-mast {
  background: var(--navy);
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.si-logo {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  white-space: nowrap;
}
.si-logo .g1 { color: #ffffff; }
.si-logo .g2 { color: #fdeacf; }
.si-logo .g3 { color: #fbd3a2; }
.si-logo .g4 { color: #f8bc75; }
.si-logo .g5 { color: #f4a34c; }
.si-logo .g6 { color: #F08A24; }
.si-byline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #ffffffcc;
  margin-top: 8px;
}
.si-mail .stamp { width: 88px; height: 88px; border-width: 2px; }
/* 紙のブロック(メーター+補助行+書き出し/箱本文) */
.si-paper { padding: 0 32px; }
.si-meter {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 2px;
  color: #E8DCC9;
  overflow: hidden;
  white-space: nowrap;
}
.si-meter .lit { color: var(--orange); }
.si-numline {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #9A948A;
}
.si-opening { min-height: 1em; margin: 28px 0 32px; }
.si-body { padding-bottom: 40px; }
.si-toc {
  background: #fff;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 20px 32px;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--navy);
}
.si-toc p { margin: 0; }
.si-toc .si-letssee {
  font-family: "American Typewriter", var(--mono);
  font-size: 15px;
  color: var(--orange-deep);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.si-num { font-family: var(--mono); font-weight: bold; color: var(--orange-deep); }
.si-box { margin-top: 46px; }
.si-box h3 {
  font-family: var(--mincho);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
}
.si-box h3 .si-num { font-size: 13px; }
.si-box p { margin: 0; }
.si-box p + p { margin-top: 8px; }
.si-topic { font-weight: 700; color: #26241F; line-height: 1.7; }
.si-desc { font-size: 13.5px; line-height: 1.9; color: #5A564E; }
.si-src { font-size: 11px; line-height: 1.8; color: #9A948A; }
.si-box p + .si-src { margin-top: 14px; }
.si-frame { border: 1.5px dashed var(--orange); padding: 18px 22px; }
.sample-issue a { color: var(--navy); text-decoration: underline; }

/* ---- 下層ページ(プライバシーポリシー・2026-10-13) ---- */
.masthead-sub { padding: 40px 24px 32px; }
.masthead-sub .lang-bar { margin-top: -16px; }
.logo-link { display: inline-block; text-decoration: none; }
.policy h1 {
  font-family: var(--mincho);
  font-size: 26px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 24px 0 32px;
}
.policy h2 { font-size: 18px; margin: 40px 0 12px; }
.policy p { margin: 0 0 12px; }
.policy ul { padding-left: 1.4em; margin: 0 0 12px; }
.policy li { margin-bottom: 6px; }
.policy a { color: var(--navy); }
.policy .policy-contact { line-height: 1.7; }
.policy .policy-date { margin-top: 40px; font-size: 14px; color: #777; }
