:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #1b1f2a;
  --ink-2: #4b5563;
  --line: #dde3ea;
  --navy: #14213d;
  --teal: #0f766e;
  --teal-soft: #d9f2ee;
  --amber: #b45309;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1320;
    --surface: #161c2c;
    --surface-2: #1d2538;
    --ink: #eef1f6;
    --ink-2: #a9b2c3;
    --line: #2a3349;
    --navy: #0b1222;
    --teal: #2bb3a3;
    --teal-soft: #173a3a;
    --amber: #f0a64a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--teal); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 24px;
  background: var(--navy); color: #fff;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand span { font-weight: 400; opacity: .75; font-size: .9rem; }
.stroke { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.progress { display: flex; align-items: center; gap: 10px; font-size: .85rem; opacity: .95; }
.bar { width: 120px; height: 6px; background: rgba(255, 255, 255, .2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: #5eead4; transition: width .3s; }

main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 48px; }
section { margin-bottom: 48px; }
.eyebrow { color: var(--teal); font-weight: 700; font-size: .85rem; margin: 0 0 8px; letter-spacing: .04em; }
.section-lead { color: var(--ink-2); margin-top: -4px; }

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 22em; }
.lead { color: var(--ink-2); font-size: 1.05rem; max-width: 46em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn:hover { filter: brightness(1.05); }
.btn[aria-disabled="true"] { visibility: hidden; }

.wall-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wall { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.wall .mark {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px;
  border-radius: 12px; background: var(--teal-soft); color: var(--teal);
}
.wall .mark svg { width: 22px; height: 22px; }
.wall h3 { font-size: 1.05rem; color: var(--teal); }
.wall p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.day-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  border: 1px solid transparent; transition: transform .15s, border-color .15s;
}
.day-card:hover { transform: translateY(-2px); border-color: var(--teal); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(11, 18, 34, .8); color: #fff; font-size: .78rem; padding: 2px 8px; border-radius: 6px;
}
.watched {
  position: absolute; left: 8px; top: 8px;
  background: var(--teal); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 6px;
}
.day-card .body { padding: 14px 16px 16px; }
.day-card .num { color: var(--teal); font-weight: 700; font-size: .8rem; }
.day-card h3 { font-size: 1.02rem; margin: 2px 0 6px; }
.day-card p { margin: 0; color: var(--ink-2); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.control-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.control { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.control.core { background: var(--teal-soft); }
.control .n {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700; font-size: .85rem; flex: none;
}
.control h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 6px; }
.control h3 .stroke { width: 18px; height: 18px; color: var(--teal); }
.control p { margin: 0 0 8px; color: var(--ink-2); font-size: .9rem; }
.control .links { font-size: .85rem; }
.control .links a { margin-right: 10px; }

.crumbs { font-size: .88rem; color: var(--ink-2); margin-bottom: 16px; display: flex; gap: 8px; }
.day-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.player video { width: 100%; height: 100%; display: block; }
.day-head { margin: 20px 0 8px; }
.day-head h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.conclusion {
  background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin: 12px 0 24px;
  font-size: 1.02rem; box-shadow: var(--shadow);
}
.conclusion::before { content: "この回の結論"; display: block; font-size: .78rem; font-weight: 700; color: var(--teal); margin-bottom: 2px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel h2 { font-size: 1.05rem; }
.panel p { margin: 0; }
.hint { color: var(--ink-2); font-size: .85rem; margin-bottom: 12px !important; }

.points { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.points li { counter-increment: p; border-top: 1px solid var(--line); }
.points li:first-child { border-top: 0; }
.points details { padding: 12px 0; }
.points summary {
  cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: baseline; font-weight: 600;
}
.points summary::-webkit-details-marker { display: none; }
.points summary::before {
  content: counter(p); flex: none; display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--teal); font-size: .8rem;
}
.points summary::after { content: "＋"; margin-left: auto; color: var(--ink-2); font-weight: 400; }
.points details[open] summary::after { content: "－"; }
.points .narr { margin: 8px 0 0 36px; color: var(--ink-2); font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-soft); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-size: .85rem; text-decoration: none;
}
.chip .stroke { width: 14px; height: 14px; color: var(--teal); }
.related { list-style: none; padding: 0; margin: 0; }
.related li { padding: 8px 0; border-top: 1px solid var(--line); }
.related li:first-child { border-top: 0; }
.related a { text-decoration: none; font-weight: 600; }
.related .kind { display: block; color: var(--ink-2); font-size: .78rem; font-weight: 400; overflow-wrap: anywhere; }

.playlist { list-style: none; padding: 0; margin: 0; }
.playlist a {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: baseline;
  padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .9rem;
}
.playlist a:hover { background: var(--surface-2); }
.playlist a.current { background: var(--teal-soft); font-weight: 700; }
.playlist .d { color: var(--teal); font-weight: 700; font-size: .8rem; }
.playlist .t { color: var(--ink-2); font-size: .8rem; }
.playlist .done::after { content: " ✓"; color: var(--teal); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }

.foot { max-width: 1180px; margin: 0 auto; padding: 0 24px 40px; color: var(--ink-2); font-size: .82rem; }

@media (max-width: 920px) {
  .day-layout { grid-template-columns: 1fr; }
  .wall-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  main { padding: 20px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .brand span { display: none; }
  .wall-grid { grid-template-columns: 1fr; }
  .bar { width: 70px; }
}
#progress-text { white-space: nowrap; }
@media (max-width: 560px) { .bar { display: none; } .brand { font-size: .95rem; } }
