/* 123 ひなたレコード — K07 目次が横に固定された読み物。章ごとに背景色が変わる（D01・D02）。色と書体は共通の13変数だけ */
:root {
  --c-bg: #fff3dc;
  --c-bg-alt: #ffe9c2;
  --c-text: #3f2c1f;
  --c-sub: #5a4636;
  --c-line: #b8854a;
  --c-accent: #f2b134;
  --c-accent-text: #8a3a0b;
  --c-on-accent: #3f2c1f;
  --c-2: #e8742a;
  --c-3: #7a9a5a;
  --font-ja: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-head: "Kaisei Decol", "Noto Serif JP", serif;
  --font-en: "Shrikhand", "Kaisei Decol", serif;
  --shadow: 5px 5px 0 var(--c-text);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --header-h: 64px;
}
.t-cream   { --c-bg: #fff3dc; --c-bg-alt: #ffe9c2; --c-line: #b8854a; }
.t-mustard { --c-bg: #ffe2a3; --c-bg-alt: #ffd37a; --c-line: #a8742f; }
.t-peach   { --c-bg: #ffd4b0; --c-bg-alt: #ffc496; --c-line: #a8662f; }
.t-sage    { --c-bg: #e4e8c8; --c-bg-alt: #d3d9ac; --c-line: #6f7a45; --c-accent-text: #6a3208; }
.t-night   { --c-bg: #1b130e; --c-bg-alt: #2a1d15; --c-text: #f6ead6; --c-sub: #dccdb6; --c-line: #8a735c; --c-accent-text: #f2b134; --shadow: 5px 5px 0 var(--c-accent); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--font-ja); font-size: 16px; line-height: 1.9; overflow-x: hidden; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dd, li, blockquote { word-break: auto-phrase; overflow-wrap: anywhere; }
h1, h2, h3, p, dl, dd, ol, ul, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* JS が動くと、背景は body が持って色がなめらかに変わる（章は透明に） */
body { transition: background-color .25s var(--ease); }
.is-tone .chap { background: transparent; }
.is-tone .chap.t-night { background: var(--c-bg); }

/* ===== ヘッダー ===== */
.header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--c-bg) 92%, transparent); color: var(--c-text); border-bottom: 3px solid var(--c-text); }
.header__inner { height: var(--header-h); padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.logo { min-height: 44px; display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; flex: none; }
.logo__disc { width: 34px; height: 34px; color: var(--c-text); }
.logo__ja { font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px; background: var(--c-accent); color: var(--c-on-accent); font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; border: 3px solid var(--c-text); border-radius: 999px; box-shadow: 3px 3px 0 var(--c-text); }
.btn--lg { min-height: 52px; padding: 0 30px; font-size: 16px; }
.btn--line { background: transparent; color: var(--c-text); }
.header__btn { display: none; }
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 24px; height: 3px; background: currentColor; position: relative; border-radius: 2px; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -8px; } .spmenu__bar::after { top: 8px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; right: 12px; top: 100%; width: min(calc(100% - 24px), 340px); background: var(--c-bg); border: 3px solid var(--c-text); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 22px 10px; display: flex; flex-direction: column; }
.spmenu__nav a { display: flex; align-items: center; min-height: 48px; text-decoration: none; font-weight: 700; border-bottom: 2px dotted var(--c-line); }
.spmenu__nav a:last-child { border-bottom: 0; }

/* ===== 目次（PCで横に固定） ===== */
.toc { display: none; }

/* ===== 章 ===== */
.chap { background: var(--c-bg); color: var(--c-text); padding: 72px 20px; }
.num { font-family: var(--font-en); font-size: clamp(64px, 20vw, 120px); line-height: 1; color: var(--c-accent-text); margin-bottom: 4px; }
.h2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(30px, 8vw, 42px); line-height: 1.35; margin-bottom: 24px; }
.chap p + p, .chap p + .quote, .chap .quote + p, .chap figure + p { margin-top: 18px; }
.en { font-family: var(--font-en); font-size: 15px; letter-spacing: .06em; color: var(--c-accent-text); margin-bottom: 14px; }
.h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(38px, 11vw, 60px); line-height: 1.3; }
.lead { margin: 20px 0 28px; color: var(--c-sub); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.quote { margin: 28px 0; padding: 26px 22px 22px; background: var(--c-bg-alt); border: 3px solid var(--c-text); border-radius: 24px; box-shadow: var(--shadow); font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.8; position: relative; }
.quote__sticker { display: inline-block; margin-bottom: 4px; padding: 4px 16px; background: var(--c-accent); color: var(--c-on-accent); border: 3px solid var(--c-text); border-radius: 999px; font-family: var(--font-ja); font-size: 15px; transform: rotate(-3deg); }

/* メインビジュアル（分割・アーチ） */
.hero { padding-top: 40px; }
.split { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; margin-bottom: 36px; max-width: 640px; }
.arch { overflow: hidden; border: 3px solid var(--c-text); border-radius: 999px 999px 18px 18px; background: var(--c-bg-alt); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.a1 { aspect-ratio: 3 / 5; }
.a2 { aspect-ratio: 3 / 6; }
.a3 { aspect-ratio: 3 / 4.2; }
.spin { position: absolute; right: -6px; top: -22px; width: 76px; height: 76px; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ジャンル */
.shelf { display: grid; gap: 16px; margin-top: 24px; }
.shelf li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 16px 18px; background: var(--c-bg-alt); border: 3px solid var(--c-text); border-radius: 22px; }
.shelf h3, .steps h3 { font-family: var(--font-head); font-size: 20px; line-height: 1.4; }
.shelf p, .steps p { color: var(--c-sub); }
.disc { display: block; width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--c-text); background: var(--c-text); position: relative; }
.disc::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--dc, var(--c-accent)); }
.d1 { --dc: var(--c-accent); } .d2 { --dc: var(--c-2); } .d3 { --dc: var(--c-3); } .d4 { --dc: var(--c-bg); } .d5 { --dc: var(--c-accent-text); }

/* 買取 */
.steps { display: grid; gap: 18px; margin-top: 24px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; }
.steps b { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); border: 3px solid var(--c-text); font-family: var(--font-en); font-size: 22px; font-weight: 400; }

.wide { margin: 24px 0; }
.wide img { width: 100%; border: 3px solid var(--c-text); border-radius: 26px 26px 26px 120px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--c-bg-alt); }
.wide figcaption { margin-top: 8px; color: var(--c-sub); font-size: 15px; }

.info { display: grid; margin-top: 8px; border-top: 3px solid var(--c-text); }
.info div { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 14px 0; border-bottom: 2px dotted var(--c-line); }
.info dt { font-weight: 700; }
.fiction { margin-top: 48px; font-size: 15px; color: var(--c-sub); }

/* ===== PC：目次を左に固定 ===== */
@media (min-width: 1080px) {
  .spmenu { display: none; }
  .header__btn { display: inline-flex; }
  .layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
  .toc { display: block; position: sticky; top: var(--header-h); align-self: start; height: calc(100svh - var(--header-h)); padding: 36px 24px 36px 36px; border-right: 3px solid var(--c-text); }
  .toc__label { font-family: var(--font-en); font-size: 15px; letter-spacing: .08em; color: var(--c-accent-text); }
  .toc__now { font-family: var(--font-en); font-size: 76px; line-height: 1.1; color: var(--c-accent-text); margin: 6px 0 18px; }
  .toc__now small { font-family: var(--font-ja); font-size: 15px; color: var(--c-sub); margin-left: 6px; }
  .toc__list { display: grid; gap: 2px; }
  .toc__list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--c-sub); transition: background-color .4s var(--ease), color .4s var(--ease); }
  .toc__list a span { font-family: var(--font-en); font-weight: 400; font-size: 15px; }
  .toc__list a[aria-current="true"] { background: var(--c-accent); color: var(--c-on-accent); box-shadow: 3px 3px 0 var(--c-text); }
  .toc__bar { margin-top: 24px; height: 8px; border: 2px solid var(--c-text); border-radius: 999px; overflow: hidden; }
  .toc__bar i { display: block; height: 100%; width: 0; background: var(--c-2); transition: width .6s var(--ease); }
  .chap { padding: 110px 64px; min-height: 80svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .chap > * { max-width: 680px; }
  .hero { padding-top: 70px; }
  .chap > .split { max-width: 760px; width: 100%; gap: 16px; }
  .spin { width: 104px; height: 104px; right: -10px; top: -40px; }
  .h2 { font-size: 44px; }
  .h1 { font-size: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .toc__list a, .toc__bar i { transition: none; }
  .spin { animation: none; }
}
