/* 行政バグります！ 作品トップ（表紙・エピソード・作品紹介・登場人物） */
:root {
  --bg: #ffffff;
  --bg-sub: #f8fafc;
  --fg: #1e293b;
  --fg-sub: #64748b;
  --line: #e2e8f0;
  --primary: #1f5b8c;
  --primary-hover: #16446b;
  --accent: #538bb0;
  --comic-red: #d83a31;
  --hero-bg: #161616;
  --hero-fg: #ffffff;
  --card-bg: #ffffff;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --bg-sub: #161a21; --fg: #e5e7eb; --fg-sub: #9aa3b2; --line: #2a303a;
    --card-bg: #161a21; --accent: #7fb0d3;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --bg-sub: #161a21; --fg: #e5e7eb; --fg-sub: #9aa3b2; --line: #2a303a;
  --card-bg: #161a21; --accent: #7fb0d3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.7; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* 網点トーン風の地に、太い見出し */
.hero {
  background-color: var(--hero-bg); color: var(--hero-fg);
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.3px);
  background-size: 9px 9px;
  padding: 40px 0 44px;
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 340px) 1fr; grid-template-areas: "cover text"; gap: 40px; align-items: center; }
.hero-cover { grid-area: cover; }
.hero-text { grid-area: text; }
.hero-cover { display: block; }
.hero-cover img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); transition: transform .2s ease; }
.hero-cover:hover img { transform: rotate(-1deg) scale(1.01); }
.kicker { display: inline-block; margin: 0 0 12px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .65); font-size: 14px; font-weight: 700; letter-spacing: .08em; color: #fff; transform: rotate(-1deg); }
.logo {
  margin: 0; font-family: "Dela Gothic One", "Hiragino Sans", sans-serif; font-weight: 400;
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.15; letter-spacing: .02em; white-space: nowrap;
  text-shadow: 3px 3px 0 var(--primary);
}
.logo-sub { margin: 8px 0 20px; font-size: clamp(15px, 3.4vw, 20px); font-weight: 700; }
/* 日本語はロゴの画像（副題の帯もロゴに入っている）。英語のときだけ文字で出す */
.logo-img { display: block; width: min(100%, 460px); height: auto; margin: 0 0 18px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); }
html:not([lang="en"]) .logo-text, html:not([lang="en"]) .logo-sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[lang="en"] .logo-img { display: none; }
.catch { margin: 0 0 10px; font-family: "Dela Gothic One", "Hiragino Sans", sans-serif; font-size: clamp(25px, 4vw, 38px); line-height: 1.35; letter-spacing: .02em; }
.catch::first-line { color: #fff; }
.lead { margin: 0 0 24px; max-width: 560px; color: #e2e8f0; font-size: 16px; }

/* 読むボタン：ページでいちばん目立つもの */
.cta {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px 32px 12px; border-radius: 12px; background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 20px; line-height: 1.3; box-shadow: 0 4px 0 #0b2f4d;
  transition: background .15s ease, transform .1s ease, box-shadow .1s ease;
}
.cta small { font-size: 12px; font-weight: 400; color: #cfe0ee; }
.cta:hover { background: var(--primary-hover); }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b2f4d; }
.cta #cta-label::after { content: " ▶"; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cta-sub { color: #e2e8f0; font-size: 14px; font-weight: 700; }
.cta-sub::after { content: " ▶"; }
.cta-sub:hover { color: #fff; }
.cta-sub[hidden] { display: none; }
.hero-links { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.hero-links a { color: #cbd5e1; }
.hero-links a:hover { color: #fff; }

.section-title { font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 16px; padding-left: 12px; border-left: 6px solid var(--primary); line-height: 1.3; }
.section { padding: 48px 0; }
.section-sub { background: var(--bg-sub); }
.section-lead { margin: 0 0 20px; color: var(--fg-sub); font-size: 15px; }
.eyebrow { margin: 0 0 6px; color: var(--comic-red); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.episodes-section { background: var(--bg-sub); }

/* 作品の舞台 */
.story-section { overflow: hidden; }
.story-panel { position: relative; padding: 34px; border: 2px solid var(--fg); background: var(--card-bg); box-shadow: 10px 10px 0 var(--line); }
.story-panel::after { content: "庁内資料"; position: absolute; top: 20px; right: 24px; border: 3px double var(--comic-red); color: var(--comic-red); padding: 4px 9px; font-size: 13px; font-weight: 800; letter-spacing: .15em; transform: rotate(5deg); opacity: .72; }
.story-lead { margin: 0 0 16px; font-size: 16px; line-height: 1.9; }
.story-lead strong { font-weight: 700; }
.points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.points li { background: var(--card-bg); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 8px; padding: 14px 16px; font-size: 14px; color: var(--fg-sub); }
.points strong { display: block; margin-bottom: 4px; font-size: 16px; color: var(--fg); }

/* 登場人物 */
.charas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.chara { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: start; background: var(--card-bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.chara img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 2px solid var(--fg); background: #fff; }
.chara-role { margin: 0; font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .06em; }
.chara-name { margin: 2px 0 8px; font-size: 22px; line-height: 1.5; }
.chara-name rt { font-size: 10px; font-weight: 400; color: var(--fg-sub); }
.chara-name small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--fg-sub); }
/* その人らしいセリフを、吹き出しの形で */
.chara-line {
  position: relative; display: inline-block; margin: 0 0 10px; padding: 6px 12px; font-weight: 700; font-size: 14px;
  background: #fff; color: #111; border: 2px solid #111; border-radius: 18px;
}
.chara-desc { margin: 0; font-size: 14px; }

.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.list-head .section-title { margin: 0; }
.list-head .section-lead { margin: 8px 0 0; }
.sort { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card-bg); }
.sort-btn { border: 0; background: none; color: var(--fg-sub); font: inherit; font-size: 13px; padding: 7px 16px; cursor: pointer; }
.sort-btn:hover { color: var(--fg); }
.sort-btn[aria-pressed="true"] { background: var(--primary); color: #fff; font-weight: 700; }

.episodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }  /* 横のカラー表紙を大きく見せるため2列（2026-09-28） */
.episode-empty { color: var(--fg-sub); }

.episode {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--line); border-radius: 14px;
  color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.episode:hover { border-color: var(--accent); box-shadow: 0 10px 28px rgba(15, 23, 42, .13); transform: translateY(-3px); }
.episode img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--bg-sub); }  /* 横のカラー表紙 */
.episode-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 16px; }
.ep-pick { display: inline-block; margin: 0 6px 8px 0; color: var(--comic-red); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.ep-lang { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--fg-sub); border-radius: 999px; padding: 1px 10px; vertical-align: 1px; }  /* 言語の札 */
.ep-lang.has-en { border-color: var(--accent); color: var(--accent); }
.ep-num { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 999px; padding: 2px 12px; }
.ep-title { margin: 8px 0 2px; font-size: 22px; line-height: 1.35; }
.ep-sub { margin: 0 0 10px; color: var(--fg-sub); font-size: 14px; }
.ep-summary { margin: 0 0 14px; font-size: 15px; }
.ep-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }  /* この話のタグ */
.ep-tags li { padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-sub); color: var(--fg-sub); font-size: 12px; }
.ep-meta { margin: 0 0 14px; color: var(--fg-sub); font-size: 13px; }
.read-btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border-radius: 10px;
  margin-top: auto; background: var(--primary); color: #fff; font-weight: 700; font-size: 15px;
}
.episode:hover .read-btn { background: var(--primary-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-sub); color: var(--fg-sub); font-size: 13px; padding: 20px 0 28px; }
.site-footer p { margin: 4px 0; }
.footer-credit { color: var(--fg); }
.footer-credit a { color: var(--accent); font-weight: 700; }
.footer-credit a:hover { text-decoration: underline; }
.footer-credit strong { font-weight: 700; }

@media (max-width: 760px) {
  .hero { padding: 24px 0 36px; }
  .hero-inner { grid-template-columns: 1fr; grid-template-areas: "text" "cover"; gap: 28px; text-align: center; }
  .hero-cover { width: min(62%, 260px); margin: 0 auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta { align-items: center; }
  .cta-row { justify-content: center; }
  .logo { font-size: clamp(30px, 9.4vw, 52px); }
  .hero-links { justify-content: center; }
  .points { grid-template-columns: 1fr; }
  .charas { grid-template-columns: 1fr; }
  .episodes { grid-template-columns: 1fr; }
  .logo-img { margin: 0 auto 16px; width: min(92%, 420px); }
}
@media (max-width: 560px) {
  .section { padding: 36px 0; }
  .story-panel { padding: 24px 18px; box-shadow: 6px 6px 0 var(--line); }
  .story-panel::after { position: static; display: inline-block; margin: 4px 0 16px; }
  .chara { grid-template-columns: 118px 1fr; gap: 12px; padding: 12px; }
  .chara-name { font-size: 19px; }
  .episode-body { padding: 12px; }
  .ep-title { font-size: 18px; }
  .ep-sub { display: none; }
  .ep-summary { font-size: 14px; line-height: 1.6; }
  .read-btn { height: 40px; padding: 0 16px; font-size: 14px; }
}

/* 上のお知らせ帯：ITまわりのネタ元 */
.topbar { background: var(--bg-sub); border-bottom: 1px solid var(--line); }
.topbar-inner { margin: 0 auto; padding: 8px 20px; font-size: 13px; color: var(--fg-sub); text-align: center; }
.topbar-inner a { color: var(--primary); font-weight: 700; text-decoration: none; }
.topbar-inner a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar-inner a { color: var(--accent); } }
:root[data-theme="dark"] .topbar-inner a { color: var(--accent); }
@media (max-width: 640px) { .topbar-inner { font-size: 12px; padding: 7px 16px; } }

/* ---- 言語の切り替え（右上の小さなボタン。英語で読むときは日本語へ戻る） ---- */
.lang-switch {
  position: fixed; top: 10px; right: 12px; z-index: 60;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card-bg); color: var(--fg); font-size: 13px; font-weight: 700;
  text-decoration: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
}
.lang-switch:hover { border-color: var(--accent); color: var(--primary); }
@media (max-width: 640px) { .lang-switch { top: 6px; right: 8px; padding: 4px 10px; font-size: 12px; } }

/* フッターの導線：ラピットくん＋name-makerの記事＋問い合わせ */
.footer-cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin: 8px 0 20px; padding: 18px 20px;
  background: var(--card-bg); border: 1px solid var(--line); border-radius: 14px;
}
.footer-rapit { width: 112px; height: 112px; flex: none; border-radius: 12px; }
.footer-cta-text { flex: 1 1 280px; min-width: 0; }
.footer-cta-text p { margin: 0 0 8px; color: var(--fg); font-size: 15px; }
.footer-cta-lead { font-weight: 700; font-size: 17px; }
.footer-cta-text a:not(.footer-btn) { color: var(--primary); font-weight: 700; }
.footer-cta-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.footer-btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px;
  background: var(--primary); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none;
}
.footer-btn:hover { background: var(--primary-hover); }
.footer-btn.ghost { background: transparent; color: var(--primary) !important; border: 2px solid var(--primary); padding: 7px 14px; }
.footer-btn.ghost:hover { background: var(--primary); color: #fff !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-cta-text a:not(.footer-btn),
  :root:not([data-theme="light"]) .footer-btn.ghost { color: var(--accent) !important; }
  :root:not([data-theme="light"]) .footer-btn.ghost { border-color: var(--accent); }
}
:root[data-theme="dark"] .footer-cta-text a:not(.footer-btn),
:root[data-theme="dark"] .footer-btn.ghost { color: var(--accent) !important; }
:root[data-theme="dark"] .footer-btn.ghost { border-color: var(--accent); }
@media (max-width: 640px) {
  .footer-cta { gap: 14px; padding: 16px; }
  .footer-rapit { width: 88px; height: 88px; }
  .footer-cta-links { width: 100%; }
  .footer-btn { flex: 1 1 100%; text-align: center; }
}

/* ほかの連載先（ニコニコ漫画・pixiv・note）：告知画像＋外部リンク */
.elsewhere { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 28px; align-items: center; }
.elsewhere-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; border: 2px solid var(--fg); background: var(--bg-sub); }
.elsewhere-text .section-lead { color: var(--fg); }
.elsewhere-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.elsewhere-links .footer-btn { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.elsewhere-links .footer-btn small { font-size: 11px; font-weight: 400; opacity: .85; }
@media (max-width: 760px) {
  .elsewhere { grid-template-columns: 1fr; gap: 20px; }
  .elsewhere-links li { flex: 1 1 100%; }
  .elsewhere-links .footer-btn { width: 100%; align-items: center; text-align: center; }
}
