/* 時空案内人マイケル専用の見た目「夜の記録庫」
   夜の紺 + ランプの琥珀色。題字は明朝(Shippori Mincho B1)、本文は読みやすい端末の書体。
   色の濃さの差(背景に対して): 本文14:1・補足7.8:1・琥珀9.8:1(どれも基準の4.5:1以上) */
:root {
  --bg: #0e1120;      /* 夜 */
  --panel: #161a2b;   /* 囲み */
  --line: #2b3049;    /* 罫線 */
  --ink: #e6e0d4;     /* 本文(月明かり) */
  --muted: #a9a6b6;   /* 補足 */
  --lamp: #e2b56f;    /* ランプの灯(強調はこの1色だけ) */
  --mist: #b9b0e6;    /* 筆者の考察の見出し */
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: .03em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lamp); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1000px; }

/* 頭 */
.site-head { border-bottom: 1px solid var(--line); }
.head-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding-top: 6px; padding-bottom: 6px; max-width: 1000px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: .12em; min-height: 44px; display: flex; align-items: center; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-right: -10px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .88rem; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--ink); }

/* 一覧の表紙: 縦書きの題字と、十二支の刻みの和時計 */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; padding-top: 44px; padding-bottom: 40px; max-width: 1000px; }
.hero h1 {
  grid-row: 1 / span 2;
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--serif); font-weight: 800; font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 1.15; letter-spacing: .14em; margin: 0; color: var(--ink);
}
.hero-text { max-width: 30em; padding-top: 4px; }
.hero-tag { font-family: var(--serif); font-weight: 700; font-size: clamp(1.15rem, 3.6vw, 1.4rem); line-height: 1.75; margin: 0 0 20px; color: var(--lamp); }
.hero-desc { margin: 0; color: var(--ink); font-size: .98rem; }
/* スマホ: 縦書きの題字の横、説明文の下に置く */
.dial { width: 100%; max-width: 230px; aspect-ratio: 1; justify-self: center; align-self: end; margin-top: 12px; }
.dial svg { width: 100%; height: 100%; display: block; overflow: visible; }
@media (min-width: 820px) {
  .hero-in { grid-template-columns: auto 1fr 400px; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
  .hero h1 { grid-row: auto; }
  .hero-text { padding-top: 0; }
  .dial { max-width: none; width: 400px; margin: 0; align-self: center; }
}
.dial .ring { fill: none; stroke: var(--line); stroke-width: 1.2; }
.dial .tick { stroke: var(--line); stroke-width: 1.4; }
.dial .tick.major { stroke: var(--muted); stroke-width: 1.6; }
.dial .shi { fill: var(--muted); font-family: var(--serif); font-weight: 700; font-size: 21px; text-anchor: middle; dominant-baseline: central; }
.dial .shi.ushi { fill: var(--lamp); }
.dial .hand { stroke: var(--lamp); stroke-width: 2; stroke-linecap: round; transform: rotate(37.5deg); }
.dial .hand-s { stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; opacity: .55; transform: rotate(-62deg); }
.dial .hub { fill: var(--lamp); }
.dial .scale { transform: rotate(0deg); }
/* 動きは開いた時の1回だけ: 目盛りが逆向きに回り、針が「丑三つ時」へ戻る(時がさかのぼる) */
@media (prefers-reduced-motion: no-preference) {
  .dial .scale { animation: rewind 3.2s cubic-bezier(.2, .7, .2, 1) .3s both; }
  .dial .hand { animation: hand-back 3.2s cubic-bezier(.2, .7, .2, 1) .3s both; }
  .dial .hand-s { animation: hand-s-back 3.2s cubic-bezier(.2, .7, .2, 1) .3s both; }
}
@keyframes rewind { from { transform: rotate(90deg); } to { transform: rotate(0deg); } }
@keyframes hand-back { from { transform: rotate(400deg); } to { transform: rotate(37.5deg); } }
@keyframes hand-s-back { from { transform: rotate(240deg); } to { transform: rotate(-62deg); } }

.list-h { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; letter-spacing: .1em; margin: 48px 0 8px; }

/* 記録の一覧(箱に入れず、罫線で区切る) */
.cards { list-style: none; padding: 0; margin: 0 0 56px; }
.card { border-bottom: 1px solid var(--line); }
.card a { display: grid; gap: 14px; padding: 24px 0; text-decoration: none; color: var(--ink); }
.card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 3px; }
.card-body { display: block; }
.card-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; line-height: 1.55; letter-spacing: .05em; }
.card-sub { display: block; font-size: .92rem; line-height: 1.75; color: var(--muted); margin-top: 8px; }
.card-meta { display: block; font-size: .84rem; color: var(--muted); margin-top: 10px; }
.card a:hover .card-title { color: var(--lamp); }
@media (min-width: 640px) {
  .card a { grid-template-columns: 300px 1fr; gap: 28px; align-items: center; }
}

/* 記事 */
.article { padding-top: 12px; padding-bottom: 40px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .2em; }
.crumbs a { color: var(--muted); }
.a-head h1, .article > h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(1.5rem, 5vw, 2.05rem); line-height: 1.55; margin: 4px 0 12px; letter-spacing: .04em; }
.a-meta { font-size: .88rem; color: var(--muted); margin: 0 0 24px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 3px; overflow: hidden; }
.video iframe, .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt { padding: 0; cursor: pointer; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; transform: translate(-50%, -50%); background: rgba(14, 17, 32, .82); border: 1.5px solid var(--lamp); border-radius: 50%; transition: background .15s; }
.play::after { content: ""; position: absolute; left: 28px; top: 23px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--lamp); }
.yt:hover .play { background: rgba(14, 17, 32, .95); }
.video-note { font-size: .82rem; color: var(--muted); margin: 8px 0 36px; }
.lead { font-size: 1.04rem; }
.points { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px 8px; margin: 36px 0; }
.points-h, .toc-h { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: .08em; margin: 0 0 10px; }
.points ul { margin: 0; padding-left: 1.2em; }
.points li { margin-bottom: 12px; line-height: 1.8; }
.points li::marker { color: var(--lamp); }

/* 目次 = 動画の時間の順(左に時刻) */
.toc { margin: 44px 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.toc li { display: grid; grid-template-columns: 4.2em 1fr; gap: 0 12px; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.65; }
.toc-t { order: -1; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; padding-top: .15em; }
.toc li a { color: var(--ink); text-decoration: none; }
.toc li a:hover { color: var(--lamp); text-decoration: underline; }

.chapter { margin-top: 80px; }
.chapter h2, .cta h2, .sources h2, .related h2 { font-family: var(--serif); font-weight: 700; font-size: 1.42rem; line-height: 1.6; letter-spacing: .04em; margin: 0 0 4px; }
.jump { display: inline-flex; align-items: center; gap: .5em; font-size: .86rem; min-height: 44px; text-decoration: none; }
.jump:hover { text-decoration: underline; }
figure { margin: 12px 0 32px; }
figure img { border-radius: 3px; width: 100%; }
figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.chapter p, .article > p { margin: 0 0 1.5em; }

/* 筆者の考察(資料の話と分けて読めるように、囲みに入れる) */
.opinion { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 18px 22px 4px; margin: 8px 0 1.8em; }
.op-label { font-family: var(--serif); font-weight: 700; color: var(--mist); font-size: .95rem; letter-spacing: .12em; margin: 0 0 8px; }
.opinion p:not(.op-label) { margin: 0 0 1em; }

.cta { margin-top: 88px; border: 1px solid var(--lamp); border-radius: 4px; padding: 28px 22px 16px; }
.cta p { margin: 12px 0 16px; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 4px; background: var(--lamp); color: #16120a; font-weight: 700; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn-sub { min-height: 48px; display: inline-flex; align-items: center; padding: 0 4px; }
.sources { margin-top: 64px; }
.sources ol { padding-left: 1.6em; font-size: .9rem; line-height: 1.75; color: var(--muted); }
.sources li { margin-bottom: 10px; word-break: break-word; }
.related { margin-top: 72px; }
.related h2 { margin-bottom: 4px; }
.related .card a { grid-template-columns: 1fr; }
@media (min-width: 640px) { .related .card a { grid-template-columns: 220px 1fr; gap: 22px; } }
.related .card-title { font-size: 1.15rem; }

/* 足 */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); padding: 36px 0 28px; font-size: .88rem; }
.foot-name { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 1.05rem; letter-spacing: .12em; margin: 0; }
.foot-tag { margin: 6px 0 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0 0 8px; }
.foot-links a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.copy { margin: 0; font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* 見出しは言葉の途中で改行しない(対応するブラウザだけ) */
.hero-tag, .a-head h1, .article > h1, .chapter h2, .card-title, .toc li a { word-break: auto-phrase; }
