:root {
  --bg: #f4f8fc;
  --card: #ffffff;
  --ink: #1d2a3a;
  --muted: #6b7a8c;
  --line: #e1e8f0;
  --accent: #1aa3ff;
  --accent-ink: #0a6fb8;
  --accent-soft: #e3f3ff;
  --live: #ff2d55;
  --soon: #ffa400;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 70, .06), 0 4px 16px rgba(20, 40, 70, .06);
  --round: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1620; --card: #17212d; --ink: #e8eef5; --muted: #93a3b5; --line: #263445;
    --accent-soft: #12314a; --accent-ink: #6cc6ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 "Noto Sans JP", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #5cc8ff, var(--accent) 55%, #7b6bff);
  position: relative; box-shadow: 0 2px 8px rgba(26,163,255,.35);
}
.brand-mark::after { content: ""; position: absolute; left: 13px; top: 10px; border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }
.brand-text { font: 800 19px/1.1 var(--round); letter-spacing: .02em; }
.brand-text small { display: block; font: 500 11px/1.4 var(--round); color: var(--muted); letter-spacing: .08em; }
.header-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; height: 36px; }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; width: 220px; }
.region, .seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.region button, .seg button { border: 0; background: transparent; padding: 3px 12px; border-radius: 999px; font: 700 13px/1.6 var(--round); color: var(--muted); }
.region button.on, .seg button.on { background: var(--accent); color: #fff; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  position: relative; padding: 10px 14px 12px; font: 700 15px/1 var(--round); color: var(--muted); white-space: nowrap;
}
.tabs a.on { color: var(--ink); }
.tabs a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--live); color: #fff; font-size: 11px; text-align: center; vertical-align: 2px; }
.count:empty { display: none; }
[data-tab="schedule"] .count { background: var(--soon); }

/* ---------- common ---------- */
main { padding-top: 18px; padding-bottom: 40px; min-height: 60vh; }
.view { display: none; }
.view.on { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.sec-title { font: 800 20px/1.3 var(--round); margin: 6px 0 14px; display: flex; align-items: center; gap: 10px; }
.sec-title.sub { font-size: 17px; margin-top: 36px; color: var(--muted); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.live { background: var(--live); box-shadow: 0 0 0 0 rgba(255,45,85,.6); animation: pulse 1.6s infinite; }
.dot.soon { background: var(--soon); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255,45,85,0); } 100% { box-shadow: 0 0 0 0 rgba(255,45,85,0); } }
.notice { background: #fff7e0; color: #7a5300; border: 1px solid #ffe2a0; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .notice { background: #3a2e10; color: #ffd98a; border-color: #5a4614; } }
.active-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 3px 10px 3px 4px; font-weight: 700; }
.chip-x img { width: 22px; height: 22px; border-radius: 50%; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- video cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,40,70,.08), 0 10px 26px rgba(20,40,70,.12); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #cfe9ff, #e6defe); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; font: 800 11px/1 var(--round); letter-spacing: .04em; padding: 5px 7px; border-radius: 6px; color: #fff; }
.badge.live { left: 8px; top: 8px; background: var(--live); }
.badge.soon { left: 8px; top: 8px; background: var(--soon); }
.badge.viewers { right: 8px; top: 8px; background: rgba(0,0,0,.65); font-weight: 700; }
.badge.dur { right: 8px; bottom: 8px; background: rgba(0,0,0,.72); font-weight: 700; }
.badge.short { left: 8px; bottom: 8px; background: #ff0033; }
.card-body { display: flex; gap: 10px; padding: 10px 12px 12px; }
.card-body .av { flex: none; }
.card-text { min-width: 0; }
.title { font-weight: 700; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.meta .who { color: var(--ink); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); border: 0; font-weight: 500; }
.av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #8fd3ff, #b9a8ff); color: #fff; display: grid; place-items: center; font: 800 15px/1 var(--round); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.grid.small .title { font-size: 13px; }
.grid.small .av { width: 28px; height: 28px; font-size: 12px; }

/* ---------- schedule ---------- */
.day { margin-bottom: 28px; }
.day-head { position: sticky; top: 104px; z-index: 2; display: flex; align-items: baseline; gap: 10px; padding: 6px 0; margin-bottom: 8px; background: var(--bg); font: 800 17px/1.3 var(--round); }
.day-head small { font-size: 13px; color: var(--muted); font-weight: 700; }
.slot { display: grid; grid-template-columns: 64px 1fr; gap: 12px; margin-bottom: 12px; }
.slot-time { font: 800 18px/1 var(--round); color: var(--accent-ink); padding-top: 10px; text-align: right; }
.slot-time small { display: block; white-space: nowrap; font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 700; }
.slot-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.row { display: flex; gap: 12px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; align-items: center; transition: transform .15s; }
.row:hover { transform: translateY(-1px); }
.row .thumb { width: 132px; flex: none; border-radius: 8px; }
.row .title { font-size: 13.5px; }

/* ---------- talents ---------- */
.unit { margin-bottom: 26px; }
.unit-head { font: 800 15px/1.3 var(--round); color: var(--muted); margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.unit-head .tag { font-size: 11px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; padding: 2px 6px; }
.talents { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.talent { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 12px 12px; text-align: center; position: relative; border: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s; }
.talent:hover { transform: translateY(-2px); }
.talent .av { width: 72px; height: 72px; font-size: 26px; margin-bottom: 4px; }
.talent.is-live .av { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--live); }
.talent .name { font: 800 14px/1.35 var(--round); }
.talent .en { font-size: 11px; color: var(--muted); }
.talent .subs { font-size: 12px; color: var(--muted); }
.talent .links { display: flex; gap: 6px; margin-top: 6px; }
.talent .links a { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.talent .links a:hover { color: var(--accent-ink); border-color: var(--accent); }
.live-tag { position: absolute; top: 10px; right: 10px; background: var(--live); color: #fff; font: 800 10px/1 var(--round); padding: 4px 6px; border-radius: 5px; }
.talent .pick { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }

.more-wrap { text-align: center; margin-top: 20px; }
.more { border: 1px solid var(--line); background: var(--card); padding: 8px 28px; border-radius: 999px; font: 700 14px/1.6 var(--round); }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 12.5px; }
.site-footer a { color: var(--accent-ink); text-decoration: underline; }
.site-footer p { margin: 4px 0; }

@media (max-width: 720px) {
  .header-inner { gap: 10px; }
  .brand-text { font-size: 17px; }
  .header-tools { width: 100%; }
  .search { flex: 1 1 100%; }
  .tabs a { padding: 10px 10px 12px; font-size: 14px; }
  .search input { width: 100%; }
  .day-head { top: 180px; }
  .slot { grid-template-columns: 1fr; gap: 6px; }
  .slot-time { text-align: left; padding: 0; display: flex; align-items: baseline; gap: 8px; }
  .slot-time small { margin: 0; }
  .slot-items { grid-template-columns: 1fr; }
  .row .thumb { width: 116px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .talents { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
