/* =====================================================================
   RICS 夜汽車レイヤー — body.rics-yoru の画面だけに乗る情緒演出の上書き
   読み込み順： rics-ui.css → rics-member.css → rics-tokens.css → このファイル
   対象画面：ホーム・ログイン・個人ページ・タイムライン・ポイント・マニュアル
   非対象：運行系（operation / train-location / routeboard など）＝表示器のまま
   ===================================================================== */

/* ---------- 1. 夜の色＋書体の上書き ---------- */
body.rics-yoru {
  --bg: #070c17;
  --bg2: #0e1626;
  --surface: #0e1626;
  --surface2: #16213a;
  --surface3: #2b1d14;              /* 焦げ茶の木目 */
  --ink: #e8dcc4;                    /* 行先標の紙 */
  --ink2: #c7b89a;
  --ink3: #8a7f69;
  --mute: #6b6050;
  --line: #2b1d14;
  --line2: #3a2a1e;

  --btn: #d4a017;                    /* 山吹の金 */
  --btn-ink: #0e1626;
  --acc: #d4a017;                    /* 山吹 */
  --acc2: #f1c84a;                   /* 金の輝き */
  --acc-soft: rgba(212,160,23,.14);
  --gold: #d4a017;
  --gold-glow: #f1c84a;
  --gold-dim: #8a6a10;

  --blush: rgba(212,160,23,.08);
  --p-blue: #0e1626; --p-pink: #2b1d14; --p-yellow: #16213a;
  --p-green: #0e1626; --p-purple: #16213a; --on-p: #e8dcc4;

  --shadow: 0 2px 10px rgba(0,0,0,.45);
  --shadow-l: 0 6px 24px rgba(0,0,0,.6);
  --delay: #2a1f10; --delay-line: #d4a017; --delay-ink: #f1c84a;
  --alert: #cf5a3a; --alert-bg: #2a1612; --alert-ink: #ffb9a8; --alert-line: #5a2a1e;
  --ok: #a8b76a; --ok-bg: #16211e; --ok-line: #52623a;

  --f-mincho: "Shippori Mincho B1", "Shippori Mincho", "游明朝", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --f-mincho-latin: "Cormorant Garamond", "Shippori Mincho", serif;
  --font-sans: var(--f-mincho);

  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(212,160,23,.08), transparent 60%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 70%, var(--surface3) 100%);
  background-attachment: fixed;
  color: var(--ink);
  color-scheme: dark;
  font-family: var(--f-mincho);
  letter-spacing: .02em;
  line-height: 1.75;
}

/* 画面ごとに金を変える（ページ側で body にクラス付与） */
body.rics-yoru.yoru-shincho { --acc: #b8860b; --acc2: #c9a54a; --gold-glow: #d9b968; }      /* 真鍮（個人・会員一覧） */
body.rics-yoru.yoru-sepia   { --acc: #a08040; --acc2: #c9a678; --gold-glow: #d4bb8e; }      /* セピア（マニュアル・公式） */
body.rics-yoru.yoru-koki    { --acc: #c48910; --acc2: #e8b434; --gold-glow: #f0cc5c; }      /* 山吹濃いめ（ポイント） */

/* ---------- 2. 書体の上書き ---------- */
body.rics-yoru,
body.rics-yoru h1, body.rics-yoru h2, body.rics-yoru h3, body.rics-yoru h4,
body.rics-yoru .r-hero h1, body.rics-yoru .r-sec h2 {
  font-family: var(--f-mincho);
  font-weight: 500;
  letter-spacing: .08em;
}
body.rics-yoru h1, body.rics-yoru h2, body.rics-yoru h3, body.rics-yoru h4 {
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}
body.rics-yoru .r-eyebrow {
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .35em;
  color: var(--gold-dim);
  text-transform: none;
}
body.rics-yoru .r-eyebrow::before { display: none; }
body.rics-yoru .r-foot {
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--ink3);
}

/* ロゴ */
body.rics-yoru .r-logo { font-family: var(--f-mincho-latin); font-style: italic; font-weight: 500; color: var(--gold-glow); }
body.rics-yoru .r-logo-t { color: var(--gold-glow); }
body.rics-yoru .r-logo i:before, body.rics-yoru .r-logo i:after { background: var(--gold-glow); }

/* ---------- 3. ヘッダー・ナビの再塗り ---------- */
body.rics-yoru .r-head {
  background: rgba(14, 22, 38, .92);
  border-bottom: 1px solid rgba(212, 160, 23, .22);
  backdrop-filter: blur(8px);
}
body.rics-yoru .r-hnav a, body.rics-yoru .r-hnav button {
  color: var(--ink2);
  font-family: var(--f-mincho);
  font-weight: 500;
}
body.rics-yoru .r-hnav a b, body.rics-yoru .r-hnav button b {
  font-weight: 500;
  color: var(--ink);
}
body.rics-yoru .r-hnav a span, body.rics-yoru .r-hnav button span {
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-dim);
  letter-spacing: .2em;
}
body.rics-yoru .r-hnav a.on b { color: var(--gold-glow); }
body.rics-yoru .r-hnav a::after, body.rics-yoru .r-hnav button::after { background: var(--acc); }

body.rics-yoru .r-tab {
  background: rgba(14, 22, 38, .96);
  border-top: 1px solid rgba(212, 160, 23, .22);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .5);
}
body.rics-yoru .r-tab a, body.rics-yoru .r-tab button {
  color: var(--ink3);
  font-family: var(--f-mincho);
  font-weight: 500;
  font-size: .74rem;
  letter-spacing: .05em;
}
body.rics-yoru .r-tab a.on, body.rics-yoru .r-tab button[aria-expanded=true] {
  background: var(--surface3);
  color: var(--gold-glow);
}
body.rics-yoru .r-tab a svg, body.rics-yoru .r-tab button svg { stroke: currentColor; }

body.rics-yoru .r-menu-btn { background: var(--surface3); color: var(--ink); border-color: var(--line2); }
body.rics-yoru .r-menu-btn:hover { background: var(--surface2); border-color: var(--acc); color: var(--acc2); }

body.rics-yoru .r-chat, body.rics-yoru .r-me {
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--ink);
}
body.rics-yoru .r-chat b { background: var(--acc); color: var(--btn-ink); }
body.rics-yoru .r-me .av { background: var(--surface3); color: var(--gold-glow); font-family: var(--f-mincho-latin); font-style: italic; }

/* ドロワー */
body.rics-yoru .r-sheet-in { background: var(--surface2); border-top: 1px solid var(--acc); color: var(--ink); }
body.rics-yoru .r-sheet-hd b { color: var(--gold-glow); font-family: var(--f-mincho); }
body.rics-yoru .r-sheet-hd span { color: var(--ink3); font-family: var(--f-mincho-latin); font-style: italic; }
body.rics-yoru .r-sheet-row { color: var(--ink); border-bottom: 1px dashed var(--line2); }
body.rics-yoru .r-sheet-row:hover { background: var(--surface3); }
body.rics-yoru .r-sheet-row em { background: var(--acc); color: var(--btn-ink); font-family: var(--f-mincho-latin); font-style: italic; letter-spacing: .15em; }
body.rics-yoru .r-sheet-g { color: var(--gold-dim); font-family: var(--f-mincho-latin); font-style: italic; letter-spacing: .3em; }
body.rics-yoru .r-tree-g { background: var(--surface3); border-left: 3px solid var(--acc); }
body.rics-yoru .r-tree-h { color: var(--gold-glow); font-family: var(--f-mincho); font-weight: 500; }
body.rics-yoru .r-tree-c { color: var(--ink2); font-family: var(--f-mincho); font-weight: 500; }
body.rics-yoru .r-tree-c:hover { background: var(--acc-soft); color: var(--gold-glow); }
body.rics-yoru .r-tree-sub { color: var(--gold-dim); font-family: var(--f-mincho-latin); font-style: italic; }

/* ---------- 4. ボタン・入力の再塗り ---------- */
body.rics-yoru .r-btn {
  background: var(--acc);
  color: var(--btn-ink);
  font-family: var(--f-mincho);
  font-weight: 500;
  letter-spacing: .15em;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(212, 160, 23, .3);
}
body.rics-yoru .r-btn:hover { background: var(--acc2); color: var(--btn-ink); }
body.rics-yoru .r-btn.ghost {
  background: transparent;
  color: var(--acc2);
  box-shadow: inset 0 0 0 1px var(--acc);
}
body.rics-yoru .r-btn.ghost:hover { background: var(--acc-soft); color: var(--gold-glow); }
body.rics-yoru .r-search input, body.rics-yoru .r-input {
  background: var(--surface2);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 2px;
  font-family: var(--f-mincho);
}
body.rics-yoru .r-search input:focus, body.rics-yoru .r-input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 2px var(--acc-soft);
}

/* カード・リスト */
body.rics-yoru .r-card, body.rics-yoru .r-card2, body.rics-yoru .r-mine, body.rics-yoru .r-item, body.rics-yoru .r-sres {
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-radius: 2px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
body.rics-yoru .r-item:hover, body.rics-yoru a.r-item:hover { background: var(--surface3); }
body.rics-yoru .r-item .t { color: var(--ink); font-family: var(--f-mincho); font-weight: 500; }
body.rics-yoru .r-item .s { color: var(--ink3); font-family: var(--f-mincho-latin); font-style: italic; letter-spacing: .1em; }
body.rics-yoru .r-item .bar { background: var(--acc); }
body.rics-yoru .r-status {
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-left: 2px solid var(--acc);
  color: var(--ink);
}
body.rics-yoru .r-status-t { color: var(--gold-dim); font-family: var(--f-mincho-latin); font-style: italic; letter-spacing: .25em; }
body.rics-yoru .r-banner { background: var(--surface2); border: 1px solid var(--line2); }
body.rics-yoru .r-banner::before { background: var(--acc); }

/* バッジ・チップ */
body.rics-yoru .r-badge, body.rics-yoru .r-chip, body.rics-yoru .r-tag {
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-weight: 500;
  letter-spacing: .2em;
  border-radius: 2px;
}
body.rics-yoru .r-chip { background: transparent; color: var(--acc2); box-shadow: inset 0 0 0 1px var(--line2); }
body.rics-yoru .r-chip.on { background: var(--acc); color: var(--btn-ink); box-shadow: none; }

/* タイル（既存 r-tile を活かすが夜色で） */
body.rics-yoru .r-tile {
  background: linear-gradient(180deg, var(--surface3), var(--surface2));
  border: 1px solid var(--line2);
  color: var(--ink);
  border-radius: 2px;
}
body.rics-yoru .r-tile:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
body.rics-yoru .r-tile h3 { color: var(--ink); font-family: var(--f-mincho); font-weight: 500; letter-spacing: .08em; }
body.rics-yoru .r-tile p { color: var(--ink3); font-family: var(--f-mincho); font-weight: 500; letter-spacing: .05em; }
body.rics-yoru .r-tile .no {
  background: var(--surface2);
  border: 1px solid var(--acc);
  color: var(--gold-glow);
  font-family: var(--f-mincho-latin);
  font-style: italic;
}
body.rics-yoru .r-tile .go { color: var(--acc2); }
body.rics-yoru .r-tile.t-blue, body.rics-yoru .r-tile.t-green,
body.rics-yoru .r-tile.t-yellow, body.rics-yoru .r-tile.t-purple { background: linear-gradient(180deg, var(--surface3), var(--surface2)); }

/* ---------- 5. 共通：画面上部に星屑＋夜汽車 ---------- */
body.rics-yoru .yoru-sky {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0 48px;
  overflow: hidden;
}
body.rics-yoru .yoru-sky-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
body.rics-yoru .yoru-sky-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40% 25% at 20% 85%, rgba(212, 160, 23, .12), transparent 70%),
    radial-gradient(ellipse 30% 20% at 85% 70%, rgba(212, 160, 23, .06), transparent 70%);
}
body.rics-yoru .yoru-stars { position: absolute; inset: 0; opacity: .5; }
body.rics-yoru .yoru-stars::before, body.rics-yoru .yoru-stars::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--ink2), transparent),
    radial-gradient(1px 1px at 73% 24%, var(--ink), transparent),
    radial-gradient(1px 1px at 44% 11%, var(--ink3), transparent),
    radial-gradient(1.5px 1.5px at 91% 42%, var(--ink), transparent),
    radial-gradient(1px 1px at 24% 55%, var(--ink2), transparent),
    radial-gradient(1px 1px at 68% 65%, var(--ink3), transparent),
    radial-gradient(1.5px 1.5px at 8% 32%, var(--ink), transparent),
    radial-gradient(1px 1px at 55% 38%, var(--ink3), transparent);
  animation: yoru-twinkle 6s ease-in-out infinite alternate;
}
body.rics-yoru .yoru-stars::after { animation-delay: -3s; opacity: .6; }
@keyframes yoru-twinkle { from { opacity: .35; } to { opacity: .9; } }

/* 走る夜汽車 */
body.rics-yoru .yoru-track {
  position: absolute;
  left: -220px; right: -220px;
  top: 38%;
  height: 110px;
  z-index: 1;
}
body.rics-yoru .yoru-rail-line {
  position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,160,23,.22) 15%, rgba(212,160,23,.22) 85%, transparent);
}
body.rics-yoru .yoru-rail-ties {
  position: absolute; left: 0; right: 0; bottom: -4px; height: 8px;
  background-image: repeating-linear-gradient(90deg,
    rgba(212, 160, 23, .15) 0,
    rgba(212, 160, 23, .15) 2px,
    transparent 2px, transparent 24px);
}
body.rics-yoru .yoru-train {
  position: absolute; bottom: 0;
  animation: yoru-run 28s linear infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.6));
}
body.rics-yoru .yoru-train.reverse { animation: yoru-run-rev 42s linear infinite; animation-delay: -8s; opacity: .7; }
@keyframes yoru-run { from { transform: translateX(-30%); } to { transform: translateX(110vw); } }
@keyframes yoru-run-rev { from { transform: translateX(110vw) scaleX(-1); } to { transform: translateX(-30%) scaleX(-1); } }
body.rics-yoru .yoru-train-win { animation: yoru-win 1.2s steps(2, end) infinite; }
body.rics-yoru .yoru-train-win:nth-child(2n) { animation-delay: .3s; }
body.rics-yoru .yoru-train-win:nth-child(3n) { animation-delay: .6s; }
@keyframes yoru-win { 0%,90%,100%{opacity:1} 92%{opacity:.65} }

/* ヒーローの詩的キャッチ */
body.rics-yoru .yoru-content { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; text-align: center; padding: 0 16px; }
body.rics-yoru .yoru-greeting {
  font-family: var(--f-mincho);
  font-size: .82rem;
  letter-spacing: .4em;
  color: var(--acc);
  margin-bottom: 32px;
  font-weight: 500;
}
body.rics-yoru .yoru-greeting::before, body.rics-yoru .yoru-greeting::after {
  content: "──"; color: var(--gold-dim); margin: 0 12px; letter-spacing: 0;
}
body.rics-yoru .yoru-catch {
  font-family: var(--f-mincho);
  font-size: clamp(1.8rem, 5.5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .08em;
  color: var(--ink);
  margin: 0 0 20px;
  text-wrap: balance;
}
body.rics-yoru .yoru-catch em { font-style: normal; color: var(--gold-glow); }
body.rics-yoru .yoru-catch-latin {
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-size: 1.08rem;
  letter-spacing: .1em;
  color: var(--ink2);
  margin: 0;
  font-weight: 500;
}
body.rics-yoru .yoru-passenger {
  margin-top: 48px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 32px;
  border: 1px solid rgba(212,160,23,.22);
  background: rgba(14,22,38,.55);
  border-radius: 2px;
}
body.rics-yoru .yoru-passenger .label {
  font-family: var(--f-mincho-latin); font-style: italic; font-size: .72rem;
  letter-spacing: .4em; color: var(--ink3);
}
body.rics-yoru .yoru-passenger .name {
  font-family: var(--f-mincho); font-size: 1.35rem; color: var(--gold-glow); letter-spacing: .08em; font-weight: 500;
}
body.rics-yoru .yoru-passenger .name small {
  font-family: var(--f-mincho-latin); font-style: italic; font-size: .82rem;
  color: var(--ink2); margin-left: 12px; letter-spacing: .15em;
}

/* 動詞ナビ */
body.rics-yoru .yoru-verbs-head { text-align: center; margin: 56px 0 32px; }
body.rics-yoru .yoru-verbs-head .eyebrow {
  font-family: var(--f-mincho-latin); font-style: italic; font-size: .82rem;
  letter-spacing: .35em; color: var(--gold-dim); margin-bottom: 8px; font-weight: 500;
}
body.rics-yoru .yoru-verbs-head h2 {
  font-family: var(--f-mincho); font-size: 1.9rem; font-weight: 500;
  letter-spacing: .15em; color: var(--ink); margin: 0;
}
body.rics-yoru .yoru-verbs-head .divider {
  display: block; width: 60px; height: 1px; margin: 24px auto 0;
  background: var(--gold-dim); position: relative;
}
body.rics-yoru .yoru-verbs-head .divider::before {
  content: "◆"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); background: var(--bg); padding: 0 12px;
  color: var(--acc); font-size: 8px;
}

body.rics-yoru .yoru-verbs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; max-width: 1040px; margin: 0 auto; padding: 0 16px;
}
body.rics-yoru .yoru-verb {
  position: relative; padding: 28px 20px;
  background: linear-gradient(180deg, var(--surface3), var(--surface2));
  border: 1px solid var(--line2);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px; overflow: hidden;
  transition: transform .4s ease, border-color .25s ease;
  text-decoration: none; color: inherit;
  border-radius: 2px;
}
body.rics-yoru .yoru-verb::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(212, 160, 23, .08), transparent 40%);
  opacity: 0; transition: opacity .3s ease;
}
body.rics-yoru .yoru-verb:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
body.rics-yoru .yoru-verb:hover::before { opacity: 1; }
body.rics-yoru .yoru-verb .n {
  font-family: var(--f-mincho-latin); font-style: italic; font-size: .78rem;
  color: var(--gold-dim); letter-spacing: .2em;
}
body.rics-yoru .yoru-verb .m {
  font-family: var(--f-mincho); font-size: 1.6rem; font-weight: 500;
  letter-spacing: .12em; color: var(--ink); line-height: 1.3; position: relative; z-index: 1;
}
body.rics-yoru .yoru-verb .m .ac { color: var(--gold-glow); }
body.rics-yoru .yoru-verb .d {
  font-family: var(--f-mincho); font-size: .78rem; color: var(--ink3);
  letter-spacing: .15em; line-height: 1.6; position: relative; z-index: 1;
}
body.rics-yoru .yoru-verb .ar {
  margin-top: auto; font-family: var(--f-mincho-latin); font-style: italic;
  font-size: .82rem; color: var(--acc); letter-spacing: .2em; align-self: flex-end;
}

/* 便り（投稿カード） */
body.rics-yoru .yoru-letters-head { text-align: center; margin: 56px 0 32px; }
body.rics-yoru .yoru-letters-head .eyebrow { font-family: var(--f-mincho-latin); font-style: italic; font-size: .82rem; letter-spacing: .35em; color: var(--gold-dim); margin-bottom: 8px; }
body.rics-yoru .yoru-letters-head h2 { font-family: var(--f-mincho); font-size: 1.9rem; font-weight: 500; letter-spacing: .15em; color: var(--ink); margin: 0; }
body.rics-yoru .yoru-letters { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
body.rics-yoru .yoru-letter {
  position: relative; padding: 20px;
  background: rgba(14, 22, 38, .6);
  border-left: 2px solid var(--gold-dim);
  display: flex; flex-direction: column; gap: 10px;
}
body.rics-yoru .yoru-letter-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .76rem; color: var(--ink3); letter-spacing: .15em; font-family: var(--f-mincho); }
body.rics-yoru .yoru-letter-head .from { color: var(--acc); font-family: var(--f-mincho); font-size: .9rem; }
body.rics-yoru .yoru-letter-body { font-family: var(--f-mincho); font-size: 1rem; line-height: 1.9; color: var(--ink); letter-spacing: .03em; }
body.rics-yoru .yoru-letter-tag { font-family: var(--f-mincho-latin); font-style: italic; font-size: .74rem; color: var(--ink3); letter-spacing: .2em; margin-top: 4px; }

/* 行先標風フッター */
body.rics-yoru .yoru-foot {
  margin: 72px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0;
  padding: 48px max(20px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, transparent 0%, rgba(43, 29, 20, .5) 20%, var(--surface3) 100%);
  border-top: 1px solid var(--gold-dim);
  position: relative;
}
body.rics-yoru .yoru-foot-rows { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 20px; }
body.rics-yoru .yoru-dest {
  display: grid; grid-template-columns: 90px 1fr auto;
  align-items: baseline; gap: 20px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(212, 160, 23, .2);
  font-family: var(--f-mincho); letter-spacing: .1em;
  color: inherit; text-decoration: none;
}
body.rics-yoru .yoru-dest .code { font-family: var(--f-mincho-latin); font-style: italic; font-size: .82rem; color: var(--gold-dim); letter-spacing: .2em; }
body.rics-yoru .yoru-dest .name { color: var(--ink); font-size: 1.08rem; }
body.rics-yoru .yoru-dest .status { font-size: .74rem; color: var(--ink3); letter-spacing: .25em; font-family: var(--f-mincho-latin); font-style: italic; }
body.rics-yoru .yoru-foot-bottom {
  max-width: 1040px; margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px dashed rgba(212, 160, 23, .22);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: .74rem; color: var(--ink3); letter-spacing: .2em;
  font-family: var(--f-mincho);
}
body.rics-yoru .yoru-foot-bottom .latin { font-family: var(--f-mincho-latin); font-style: italic; }

/* ---------- 6. 便り（投稿一覧／bbs系）用の追加 ---------- */
body.rics-yoru .yoru-post {
  background: rgba(14,22,38,.6);
  border: 1px solid var(--line2);
  border-left: 2px solid var(--gold-dim);
  padding: 20px 24px;
  margin-bottom: 16px;
  border-radius: 2px;
}
body.rics-yoru .yoru-post-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .78rem; color: var(--ink3); margin-bottom: 10px; }
body.rics-yoru .yoru-post-head .from { font-family: var(--f-mincho); font-size: 1rem; color: var(--acc); letter-spacing: .08em; }
body.rics-yoru .yoru-post-head time { font-family: var(--f-mincho-latin); font-style: italic; letter-spacing: .15em; }
body.rics-yoru .yoru-post-body { font-family: var(--f-mincho); font-size: 1.02rem; line-height: 1.9; color: var(--ink); letter-spacing: .02em; }
body.rics-yoru .yoru-post-foot { display: flex; gap: 16px; margin-top: 12px; font-size: .78rem; color: var(--ink3); font-family: var(--f-mincho); }
body.rics-yoru .yoru-post-foot a { color: var(--ink3); text-decoration: none; letter-spacing: .1em; }
body.rics-yoru .yoru-post-foot a:hover { color: var(--acc2); }
body.rics-yoru .yoru-post-tag { font-family: var(--f-mincho-latin); font-style: italic; letter-spacing: .2em; color: var(--gold-dim); }

/* 投稿フォーム */
body.rics-yoru .yoru-form {
  background: rgba(14,22,38,.6);
  border: 1px solid var(--line2);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-radius: 2px;
}
body.rics-yoru .yoru-form textarea, body.rics-yoru .yoru-form input[type=text] {
  width: 100%;
  background: var(--surface3);
  border: 1px solid var(--line2);
  color: var(--ink);
  font-family: var(--f-mincho);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 2px;
  resize: vertical;
}
body.rics-yoru .yoru-form textarea:focus, body.rics-yoru .yoru-form input:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 2px var(--acc-soft);
}
body.rics-yoru .yoru-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; flex-wrap: wrap; }

/* ---------- 7. プロフィール系（個人ページ） ---------- */
body.rics-yoru.yoru-shincho .yoru-profile-head {
  padding: 48px 24px 32px;
  text-align: center;
}
body.rics-yoru .yoru-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2px solid var(--acc);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface3);
  color: var(--gold-glow);
  font-family: var(--f-mincho);
  font-size: 2.4rem; font-weight: 500;
  margin-bottom: 20px;
}
body.rics-yoru .yoru-profile-name {
  font-family: var(--f-mincho);
  font-size: 2rem; font-weight: 500;
  letter-spacing: .12em;
  color: var(--ink);
  margin: 0 0 6px;
}
body.rics-yoru .yoru-profile-id {
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-size: .9rem;
  letter-spacing: .25em;
  color: var(--acc);
  margin: 0 0 20px;
}
body.rics-yoru .yoru-profile-bio {
  font-family: var(--f-mincho);
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--ink2);
  max-width: 640px;
  margin: 0 auto 24px;
  letter-spacing: .03em;
}
body.rics-yoru .yoru-profile-counts {
  display: flex; justify-content: center; gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  margin: 0 auto 32px;
  max-width: 480px;
}
body.rics-yoru .yoru-profile-counts .box { text-align: center; }
body.rics-yoru .yoru-profile-counts .num {
  display: block;
  font-family: var(--f-mincho-latin);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--gold-glow);
  letter-spacing: .05em;
}
body.rics-yoru .yoru-profile-counts .lbl {
  font-family: var(--f-mincho);
  font-size: .78rem;
  letter-spacing: .25em;
  color: var(--ink3);
}

/* ---------- 8. モバイル ---------- */
@media (max-width: 640px) {
  body.rics-yoru .yoru-sky { min-height: 62vh; padding: 48px 0 32px; }
  body.rics-yoru .yoru-greeting { font-size: .72rem; letter-spacing: .3em; margin-bottom: 20px; }
  body.rics-yoru .yoru-greeting::before, body.rics-yoru .yoru-greeting::after { content: "─"; margin: 0 8px; }
  body.rics-yoru .yoru-passenger { padding: 12px 20px; margin-top: 32px; }
  body.rics-yoru .yoru-passenger .name { font-size: 1.1rem; }
  body.rics-yoru .yoru-passenger .name small { display: block; margin: 2px 0 0; }
  body.rics-yoru .yoru-verbs-head h2, body.rics-yoru .yoru-letters-head h2 { font-size: 1.3rem; letter-spacing: .1em; }
  body.rics-yoru .yoru-verb { padding: 20px 16px; min-height: 140px; }
  body.rics-yoru .yoru-verb .m { font-size: 1.3rem; }
  body.rics-yoru .yoru-foot { padding: 32px 16px; }
  body.rics-yoru .yoru-dest { grid-template-columns: 60px 1fr auto; gap: 12px; }
  body.rics-yoru .yoru-dest .name { font-size: .96rem; }
  body.rics-yoru .yoru-profile-head { padding: 32px 16px 24px; }
  body.rics-yoru .yoru-profile-name { font-size: 1.5rem; }
  body.rics-yoru .yoru-avatar { width: 96px; height: 96px; font-size: 1.9rem; }
  body.rics-yoru .yoru-profile-counts { gap: 20px; }
}

/* reduced-motion */
@media (prefers-reduced-motion: reduce) {
  body.rics-yoru .yoru-train, body.rics-yoru .yoru-stars::before, body.rics-yoru .yoru-stars::after,
  body.rics-yoru .yoru-train-win { animation: none !important; }
}

/* 既存の .r-preview-banner や loader は夜汽車色で */
body.rics-yoru .r-preview-banner { background: var(--surface3); color: var(--gold-glow); border-bottom: 1px solid var(--acc); }
body.rics-yoru #rics-loader { background: var(--bg); color: var(--ink); }
body.rics-yoru #rics-loader .mark, body.rics-yoru #rics-loader .copy { font-family: var(--f-mincho); color: var(--gold-glow); font-weight: 500; }
body.rics-yoru #rics-loader .pct { font-family: var(--f-mincho-latin); font-style: italic; color: var(--acc2); font-weight: 500; }

/* ---------- 9. ホームの見やすさ調整（2026-11-07） ---------- */
/* ヒーローを詰めて、運行状況がファーストビューに入るように */
body.rics-yoru .yoru-sky { min-height: 52vh; padding: 56px 0 120px; }
/* 夜汽車はキャッチコピーと重ならないよう、ヒーローの一番下を走らせる */
body.rics-yoru .yoru-track { top: auto; bottom: 10px; height: 96px; }
body.rics-yoru .yoru-passenger { margin-top: 32px; }
body.rics-yoru .yoru-passenger .label { font-size: .8rem; color: var(--ink2); }

/* 運行状況：見切れないよう折り返して全路線を出す */
body.rics-yoru .r-status { flex-wrap: wrap; overflow: visible; row-gap: 8px; margin-top: 16px !important; }
body.rics-yoru #statusitems { flex-wrap: wrap; row-gap: 6px; }
body.rics-yoru .r-status-t { font-size: .85rem; }

/* お部屋カード：PCは3列×2段でそろえる。説明文を読める大きさに */
body.rics-yoru .yoru-verbs-head { margin: 48px 0 28px; }
body.rics-yoru .yoru-verbs { grid-template-columns: repeat(3, 1fr); }
body.rics-yoru .yoru-verb .n { font-family: var(--f-mincho); font-style: normal; font-size: .82rem; color: var(--acc2); letter-spacing: .1em; }
body.rics-yoru .yoru-verb .d { font-size: .9rem; color: var(--ink2); letter-spacing: .06em; }
body.rics-yoru .yoru-verb:focus-visible, body.rics-yoru .yoru-dest:focus-visible, body.rics-yoru .yoru-letter:focus-visible { outline: 2px solid var(--gold-glow); outline-offset: 3px; }

/* 便り：本文の冒頭を添える／小さい文字を少し大きく */
body.rics-yoru .yoru-letter-ex { margin: -4px 0 0; font-family: var(--f-mincho); font-size: .88rem; line-height: 1.7; color: var(--ink2); }
body.rics-yoru .yoru-letter-tag { font-size: .82rem; color: var(--ink2); }
body.rics-yoru .yoru-letter-head { font-size: .82rem; }

/* フッター：ボタン化した「運営あてのトーク」をリンクと同じ見た目に */
body.rics-yoru button.yoru-dest { width: 100%; background: none; border: 0; border-bottom: 1px dashed rgba(212, 160, 23, .2); text-align: left; cursor: pointer; font: inherit; font-family: var(--f-mincho); letter-spacing: .1em; }
body.rics-yoru .yoru-dest .status { font-size: .8rem; }
body.rics-yoru .yoru-dest:hover .name { color: var(--gold-glow); }

@media (max-width: 900px) {
  body.rics-yoru .yoru-verbs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body.rics-yoru .yoru-sky { min-height: 46vh; padding: 40px 0 104px; }
  body.rics-yoru .yoru-track { height: 84px; }
  body.rics-yoru .yoru-verbs { grid-template-columns: 1fr 1fr; gap: 12px; }
  body.rics-yoru .yoru-verb { min-height: 128px; padding: 16px 14px; }
  body.rics-yoru .yoru-verb .d { font-size: .82rem; }
}
@media (max-width: 380px) {
  body.rics-yoru .yoru-verbs { grid-template-columns: 1fr; }
}
