/* ヘッダー分の上部余白 */
body > .wrap { margin-top: 80px; }

/* アバター画像 */
.avatar img,
.char-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  display: block;
}

:root {
  --bg: #0a0e14;
  --card: #111827;
  --text: rgba(255,255,255,0.85);
  --sub: rgba(255,255,255,0.42);
  --line: rgba(255,255,255,0.08);
  --accent: #00b4d8;
  --accent-soft: rgba(0,180,216,0.12);
  --max: 860px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Back link */
.back-link {
  display: inline-block;
  padding: 12px 0 0;
  color: var(--sub);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }
.back-link::before { content: "← "; }

/* Hero */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}
h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sub);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.lead {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--sub);
  line-height: 1.9;
  max-width: 640px;
  margin-bottom: 16px;
}
.notice {
  font-size: 0.82rem;
  color: #ff4d4d;
  font-weight: 700;
  border-left: 3px solid #ff4d4d;
  background: rgba(255,77,77,0.08);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-top: 16px;
  opacity: 0.7;
}

/* Sections and cards */
.section {
  margin-bottom: 48px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}
.card p {
  margin-bottom: 14px;
  font-size: 0.97rem;
}
.card p:last-child { margin-bottom: 0; }
.card ul {
  padding-left: 1.4em;
  margin-bottom: 14px;
}
.card ul li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* Series nav */
.series-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.series-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0,180,216,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
a.series-pill:hover { opacity: 0.75; }
.series-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.series-links a {
  font-size: 0.82rem;
  color: var(--sub);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: all 0.2s;
  white-space: nowrap;
}
.series-links a:hover {
  color: var(--accent);
  border-color: rgba(0,180,216,0.4);
  background: var(--accent-soft);
}
.series-links a.current {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  pointer-events: none;
}

/* Host box */
.host-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.host-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(0,180,216,0.4);
  flex: 0 0 40px;
}
.host-box {
  background: rgba(0,180,216,0.06);
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--sub);
  margin-bottom: 28px;
  line-height: 1.7;
}
.host-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Discussion / chat */
.discussion {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.chat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.chat.right {
  flex-direction: row-reverse;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg,#0f4c75,#1b6ca8);
}
.chat.right .avatar {
  background: linear-gradient(135deg,#4a0e5c,#7b1fa2);
}
.bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: calc(100% - 58px);
  gap: 6px;
}
.name {
  font-size: 0.8rem;
  color: var(--sub);
  padding-left: 4px;
}
.chat.right .name {
  text-align: right;
  padding-left: 0;
  padding-right: 4px;
}
.name strong {
  color: var(--text);
  font-weight: 600;
}
.role {
  font-size: 0.72rem;
  color: var(--sub);
  opacity: 0.7;
  margin-left: 6px;
}
.bubble {
  background: #1a2235;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.92rem;
  line-height: 1.85;
  position: relative;
}
.bubble p { margin-bottom: 8px; }
.bubble p:last-child { margin-bottom: 0; }

/* Left bubble tail */
.chat:not(.right) .bubble::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 7px solid #1a2235;
}

/* Right bubble tail */
.chat.right .bubble::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -7px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid #1a2235;
}

/* Deep dive */
details.deep-dive {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
details.deep-dive summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: background 0.2s;
}
details.deep-dive summary::-webkit-details-marker { display: none; }
details.deep-dive summary::before {
  content: "▶";
  font-size: 0.65rem;
  transition: transform 0.2s;
  display: inline-block;
}
details.deep-dive[open] summary::before {
  transform: rotate(90deg);
}
details.deep-dive summary:hover {
  background: var(--accent-soft);
}
details.deep-dive .dive-body {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--sub);
  line-height: 1.85;
}
details.deep-dive .dive-body p { margin-bottom: 10px; }
details.deep-dive .dive-body p:last-child { margin-bottom: 0; }

/* Summary box */
.summary-box {
  background: var(--accent-soft);
  border: 1px solid rgba(0,180,216,0.25);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}
.summary-box h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.summary-box ul {
  padding-left: 1.2em;
}
.summary-box ul li {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

/* Highlight */
.highlight {
  color: var(--accent);
  font-weight: 600;
}

/* Quote final */
.quote-final {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 32px 0;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.7;
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}

/* Nav links */
.nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid rgba(0,180,216,0.3);
  border-radius: 6px;
  background: var(--accent-soft);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover {
  background: rgba(0,180,216,0.2);
  border-color: var(--accent);
}
.nav-links .spacer { flex: 1; }

/* Footer note */
.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--sub);
  opacity: 0.5;
  padding: 32px 0 40px;
}

/* Character details (collapsible) */
.char-details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.char-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 24px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  transition: color 0.2s, background 0.2s;
}
.char-summary::-webkit-details-marker { display: none; }
.char-summary::before {
  content: "▶";
  font-size: 0.65rem;
  transition: transform 0.2s;
  display: inline-block;
  color: var(--accent);
}
.char-details[open] .char-summary::before { transform: rotate(90deg); }
.char-summary:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.char-details .char-grid {
  padding: 0 20px 20px;
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* Character grid (index) */
.char-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.char-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 16px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
}
.char-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.char-avatar.left { background: linear-gradient(135deg,#0f4c75,#1b6ca8); }
.char-avatar.right { background: linear-gradient(135deg,#4a0e5c,#7b1fa2); }
.char-info { display: flex; flex-direction: column; gap: 3px; }
.char-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.char-role {
  font-size: 0.73rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.char-desc {
  font-size: 0.78rem;
  color: var(--sub);
  line-height: 1.7;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .char-grid { grid-template-columns: 1fr; }
}

/* Episode list (index) */
.episode-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.episode-link {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.episode-link:hover {
  border-color: rgba(0,180,216,0.4);
  background: #162030;
}
.ep-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0,180,216,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ep-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}
.ep-arrow {
  color: var(--sub);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.episode-link:hover .ep-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* Meta list */
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.meta-list span {
  font-size: 0.78rem;
  color: var(--sub);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px;
}

/* Responsive */
@media (max-width: 640px) {
  .card { padding: 20px 16px; }
  .hero { padding: 32px 0 28px; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .series-nav { gap: 8px; }
  .series-links { gap: 6px; }
  .series-links a { font-size: 0.75rem; padding: 4px 8px; }
  .chat { gap: 10px; }
  .avatar { width: 36px; height: 36px; font-size: 0.7rem; }
  .bubble { font-size: 0.88rem; padding: 12px 14px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.82rem; padding: 8px 12px; }
  .quote-final { font-size: 0.95rem; }
  .episode-link { padding: 14px 16px; gap: 12px; }
}

/* ── TOPへ戻るボタン ── */
#scrollTopBtn {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.45);
  background: rgba(5, 5, 15, 0.82);
  backdrop-filter: blur(10px);
  color: #00d4ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s, box-shadow 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
#scrollTopBtn svg { width: 20px; height: 20px; }
#scrollTopBtn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scrollTopBtn:hover {
  background: rgba(0, 212, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.25), 0 4px 20px rgba(0,0,0,0.5);
}
@media (max-width: 640px) {
  #scrollTopBtn { bottom: 20px; right: 16px; width: 42px; height: 42px; }
}
