:root {
  color-scheme: light dark;

  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #191c23;
  --muted: #5b6070;
  --rule: #e2e6ee;
  --accent: #2f5d8a;
  --accent-soft: #e6eef6;
  --accent-2: #7a4f8c;
  --shadow: 0 1px 2px rgba(25, 28, 35, .06), 0 8px 24px rgba(25, 28, 35, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --panel: #1e212a;
    --text: #e9ecf3;
    --muted: #a3a9ba;
    --rule: #2d323e;
    --accent: #8fb6dc;
    --accent-soft: #232e3a;
    --accent-2: #c1a0cf;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

/* 切れ目の無い長い語（原題など）で横に溢れないように。 */
body {
  margin: 0;
  font: 16px/1.8 'Hiragino Sans', 'Yu Gothic', system-ui, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px 64px; }

/* どのページからでもトップへ戻れるように、上に名前を出す。 */
.site-head { padding: 16px 0 14px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; }
.site-name {
  font-size: clamp(20px, 4.5vw, 26px); font-weight: 800; text-decoration: none;
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--accent); text-decoration: none; }

h1 { font-size: clamp(24px, 5vw, 34px); line-height: 1.35; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 32px 0 10px; padding-left: 12px; border-left: 4px solid var(--accent); }

.original { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.reading { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.lead-block { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.poster { margin: 0; flex: 0 0 auto; }
.poster img { width: 180px; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); }
.poster figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; text-align: center; }
.overview { flex: 1 1 280px; margin: 0; font-size: 15px; }
.overview.thin { color: var(--muted); }

/* 配信サービスの一覧。指で押せる大きさを確保する。 */
.service-list, .service-index, .title-list { list-style: none; margin: 0; padding: 0; }

.service-list { display: flex; flex-wrap: wrap; gap: 8px; }
.service-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  font-size: 15px; font-weight: 600; text-decoration: none; color: var(--accent);
  border: 1px solid var(--rule); border-radius: 999px; background: var(--panel);
  transition: border-color .15s, background .15s;
}
.service-list a:hover, .service-list a:focus-visible { border-color: var(--accent); background: var(--accent-soft); }

.service-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.service-index li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel);
}
.service-index a { font-weight: 600; text-decoration: none; color: inherit; }
.service-index a:hover { color: var(--accent); text-decoration: underline; }
.service-index span { font-size: 12px; color: var(--muted); white-space: nowrap; }

.title-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 14px; }
.title-list li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.title-list a { color: inherit; text-decoration: none; font-size: 14px; }
.title-list a:hover { color: var(--accent); text-decoration: underline; }
.title-list span { font-size: 11px; color: var(--muted); white-space: nowrap; }

.works { margin: 24px 0; }
.button {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 15px;
}

.confirmed {
  margin-top: 28px; padding: 14px 16px; font-size: 13px; line-height: 1.9;
  color: var(--muted); border: 1px solid var(--rule); border-radius: 10px; background: var(--panel);
}

/* 検索 */
.search input {
  width: 100%; font-size: 16px; padding: 14px 16px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); color: inherit;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.results { margin-top: 20px; }
.note { font-size: 14px; color: var(--muted); }

footer { margin-top: 48px; border-top: 1px solid var(--rule); padding-top: 18px; font-size: 13px; color: var(--muted); }
footer a { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--panel);
}
.site-nav a:hover, .site-nav a:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.credit { margin: 6px 0 0; font-size: 12px; }

/* 狭い画面。余白と部品を詰める。 */
@media (max-width: 480px) {
  .wrap { padding: 0 14px 56px; }
  .poster img { width: 140px; }
  .title-list { grid-template-columns: 1fr; }
  .site-nav a { padding: 0 12px; font-size: 13px; }
}
