:root {
  --bg: #110f0c;
  --bg-2: #18150f;
  --panel: #1c1812;
  --line: #322b20;
  --gold: #c9a227;
  --gold-dim: #8a7018;
  --text: #f3ead8;
  --muted: #9a8c74;
  --ok: #7d9a62;
  --radius: 12px;
  --pad: 16px;
  --max: 1120px;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { color-scheme: dark; }
body {
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100dvh;
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

a { color: var(--gold); text-decoration: none; }
button, input { font-family: inherit; }

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 32px;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0;
}
.brand span { color: var(--gold); }
.sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 0 8px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tabs button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 40px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.tabs button[aria-current="page"] {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}
.tabs button:active { transform: scale(0.98); }

.layout {
  display: grid;
  gap: 20px;
}
@media (min-width: 960px) {
  .layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
  .script { grid-column: 1 / -1; }
  body { padding-bottom: 32px; }
}

.theater {
  background: #0a0907;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 960px) {
  .theater {
    position: sticky;
    top: 58px;
  }
}
.frame {
  background: #0a0907;
  width: 100%;
  overflow: hidden;
}
.stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #0a0907;
  aspect-ratio: 16 / 9;
}
.frame.listen .stage {
  aspect-ratio: 16 / 10;
}
@media (min-width: 960px) {
  .frame.listen .stage {
    aspect-ratio: 5 / 4;
    max-height: 360px;
  }
}
.yt-box,
.yt-box iframe,
#yt-host {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  border: 0;
  display: block;
}
.frame.listen .yt-box {
  transform: scale(1.55);
  opacity: 0.4;
  filter: blur(12px) saturate(0.7);
  pointer-events: none;
}
.veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 22px 16px;
  background: linear-gradient(180deg, rgb(10 9 7 / 0.2), rgb(10 9 7 / 0.78));
  pointer-events: none;
}
.art-hit {
  appearance: none;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  display: block;
}
.art-hit .play-ghost {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(10 9 7 / 0.28);
  border-radius: 10px;
}
.frame.is-on .art-hit .play-ghost { display: none; }
.play-ghost .ico-play {
  border-color: transparent transparent transparent #f3ead8;
  border-width: 12px 0 12px 20px;
}
.frame.watch .veil { display: none; }
.frame.empty .veil {
  display: grid;
  place-items: center;
}
.listen-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(78%, 300px);
  max-width: calc(100% - 24px);
  text-align: center;
}
.listen-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 16px 36px rgb(0 0 0 / 0.5);
  outline: 1px solid rgb(201 162 39 / 0.32);
}
.frame.listen.is-on .listen-art {
  outline-color: rgb(201 162 39 / 0.7);
}
.listen-card .who {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 12px 0 2px;
}
.listen-card .ttl {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}
.empty-frame {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px;
  text-align: center;
}
.deck {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: #100e0b;
}
.scrub {
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.scrub-track {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: var(--line);
}
.scrub-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gold);
  position: relative;
}
.scrub-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}
.times {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 8px;
}
.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 4vw, 22px);
  margin-bottom: 10px;
}
.btn-play {
  appearance: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: #16130c;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.btn-play:active { transform: scale(0.96); }
.btn-skip {
  appearance: none;
  min-width: 44px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.ico-play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #16130c;
  margin-left: 3px;
}
.ico-pause {
  display: flex;
  gap: 5px;
}
.ico-pause span {
  width: 4px;
  height: 16px;
  background: #16130c;
  border-radius: 1px;
}
.rates {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.rates button {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}
.rates button[aria-pressed="true"] {
  color: #16130c;
  background: var(--gold);
  border-color: var(--gold);
}
.now {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.now .kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.now h2 {
  margin: 2px 0 6px;
  font-size: 1.02rem;
  line-height: 1.35;
}
.now p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.now-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn-gold {
  background: var(--gold);
  color: #16130c;
  border-color: var(--gold);
}
.btn-ghost { color: var(--muted); }

h3.sec {
  margin: 8px 0 10px;
  font-size: 1.05rem;
}
.lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 16px;
  max-width: 48ch;
}

.slots { display: grid; gap: 14px; }
.slot {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 12px;
}
.slot header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.slot header b { font-size: 0.92rem; }
.slot header span { color: var(--muted); font-size: 0.75rem; }

.row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
}
.row + .row { border-top: 1px solid var(--line); }
.row:hover { background: #241f17; }
.row img {
  width: 88px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}
.row .meta { min-width: 0; }
.row .meta strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .meta small {
  color: var(--muted);
  font-size: 0.75rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row.done strong { color: var(--muted); }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2px 7px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  white-space: nowrap;
}
.badge.watch {
  background: var(--gold);
  color: #16130c;
  border-color: var(--gold);
}
.badge.ok {
  border-color: var(--ok);
  color: var(--ok);
}

.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 6px;
}
.filters button {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

.grid {
  display: grid;
  gap: 10px;
}
.card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  text-align: left;
  width: 100%;
  padding: 0;
}
.card img {
  width: 120px;
  height: 100%;
  min-height: 78px;
  object-fit: cover;
  background: #000;
}
.card .body { padding: 10px 12px 10px 0; }
.card strong { display: block; font-size: 0.92rem; line-height: 1.3; }
.card small { color: var(--muted); font-size: 0.75rem; }
.card.done { opacity: 0.55; }

.quote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 12px;
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.95rem;
}
.buy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.scroll-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
}
.scroll-hero .n {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.scroll-hero h2 {
  margin: 4px 0 8px;
  font-size: 1.35rem;
  line-height: 1.3;
}
.scroll-hero .en {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 12px;
}
.ticks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.ticks button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 10px;
  padding: 12px 8px;
  font-weight: 800;
  cursor: pointer;
}
.ticks button.on {
  background: var(--gold);
  color: #16130c;
  border-color: var(--gold);
}
.days {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0 0 12px;
}

.legal {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  background: #16130e;
  border-top: 1px solid var(--line);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  display: none;
}
.dock.on { display: block; }
.dock-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 959px) {
  .deck .transport { display: none; }
}
.dock .btn-play { width: 40px; height: 40px; flex: 0 0 auto; }
.dock .btn-skip {
  min-width: 40px;
  height: 36px;
  font-size: 0.72rem;
  padding: 0 8px;
}
.dock .ico-play { border-width: 6px 0 6px 10px; }
.dock .ico-pause span { height: 12px; width: 3px; }
.dock-meta { min-width: 0; flex: 1; }
.dock b {
  display: block;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dock small { color: var(--muted); font-variant-numeric: tabular-nums; }
.dock .scrub { height: 16px; margin-top: 4px; }
@media (min-width: 960px) {
  .dock { display: none !important; }
}

.script {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px 14px 8px;
  max-height: min(70vh, 720px);
  overflow: auto;
}
.script-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.script-bar h3 { margin: 0; font-size: 1rem; }
.modes { display: flex; gap: 6px; }
.modes button[aria-pressed="true"] {
  background: var(--gold);
  color: #16130c;
  border-color: var(--gold);
}
.para {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  padding: 12px 4px;
  cursor: pointer;
  border-radius: 0;
}
.para:hover { background: #241f17; }
.para.on {
  background: #241f17;
  box-shadow: inset 3px 0 0 var(--gold);
}
.para .time {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.para .ja {
  display: block;
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 4px 0 6px;
}
.para .en {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.script.ja-only .para .en,
.script.en-only .para .ja { display: none; }
.script-empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  padding: 8px 0 12px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .tabs { background: var(--bg); backdrop-filter: none; }
  .frame.listen .yt-box { filter: none; opacity: 0.18; }
}
