/* 霧の島の夜。濡れた石と霧の青灰色の地に、ひとつだけ灯台の灯（琥珀）を点す。試し読みの画面と同じ色と書体。 */
:root {
  --bg: #e6ebec;
  --paper: #f3f5f4;
  --ink: #18242c;
  --muted: #5b6b72;
  --line: #c6d0d2;
  --lamp: #b8740f;
  --lamp-ink: #8a5508;
  --lamp-soft: #f2dfb8;
  --f-story: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-ui: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e171d; --paper: #131f26; --ink: #dfe6e8; --muted: #8fa0a7; --line: #26363f;
  --lamp: #f0b24a; --lamp-ink: #f0b24a; --lamp-soft: #3a2e17; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0e171d; --paper: #131f26; --ink: #dfe6e8; --muted: #8fa0a7; --line: #26363f;
  --lamp: #f0b24a; --lamp-ink: #f0b24a; --lamp-soft: #3a2e17; color-scheme: dark }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ui); line-height: 1.8; }
a { color: var(--lamp-ink); text-underline-offset: .2em; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 44rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* 帯 */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.2rem; padding-block: .8rem; }
.brand { font-family: var(--f-story); font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: .04em; }
.site-head nav { display: flex; gap: 1rem; margin-left: auto; font-size: .88rem; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); }

main { padding-block: 2rem 4rem; }

/* 見出しと本文 */
h1, h2, h3 { font-family: var(--f-story); font-weight: 800; line-height: 1.35; letter-spacing: .03em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2.6rem 0 .8rem; }
h3 { font-size: 1.08rem; margin: 1.8rem 0 .5rem; text-wrap: pretty; }
p { margin: 0 0 1rem; }
.lead { font-family: var(--f-story); font-size: 1.08rem; line-height: 2.05; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
ul.plain { padding-left: 1.2rem; margin: 0 0 1rem; }
ul.plain li { margin-bottom: .35rem; }
.eyebrow { font-size: .78rem; letter-spacing: .3em; color: var(--muted); margin-bottom: .6rem; }

/* 表紙 */
.cover { position: relative; display: grid; gap: 1.2rem; padding-block: 1.4rem 1rem; }
.cover h1 { font-size: clamp(2.8rem, 12vw, 4.6rem); letter-spacing: .1em; margin: 0; line-height: 1.1; }
.lamp { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: radial-gradient(circle, var(--lamp) 0 22%, transparent 62%); animation: beam 3.6s ease-in-out infinite; }
@keyframes beam { 0%,100% { opacity: .35 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .lamp { animation: none; opacity: .9; } }

.row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; padding: .75rem 1.3rem; border-radius: 4px; border: 1px solid var(--lamp); background: var(--lamp); color: var(--paper); cursor: pointer; line-height: 1.4; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn.ghost:hover { border-color: var(--lamp); }

/* 箱 */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1.1rem 1.2rem; }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.grid .card h3 { margin-top: 0; }
.note { border-left: 3px solid var(--lamp); background: var(--lamp-soft); padding: .8rem 1rem; border-radius: 0 4px 4px 0; font-size: .92rem; }
.note > :last-child { margin-bottom: 0; }

/* 登場人物 */
.cast { display: grid; gap: .6rem; margin: 0 0 1rem; }
.cast div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cast dt { font-family: var(--f-story); font-weight: 800; }
.cast dd { margin: 0; }
@media (max-width: 30rem) { .cast div { grid-template-columns: 1fr; gap: .1rem; } }

/* 表 */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 0 1rem; }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 700; white-space: nowrap; }
.scroll { overflow-x: auto; }

/* よくある質問 */
details { border-bottom: 1px solid var(--line); padding: .7rem 0; }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: .5rem; }

/* 末尾 */
.site-foot { border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding-block: 1.4rem 2rem; }
.site-foot a { color: var(--muted); }
.site-foot .copy { margin-left: auto; }
