:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Hiragino Sans", sans-serif;
  background: #101215;
  color: #f6f7f8;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; background: #101215; }

.directory, .channel-page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.directory__header, .channel-header { border-bottom: 1px solid #30343a; padding-bottom: 28px; }
.eyebrow { color: #a8c7ff; font-size: .75rem; font-weight: 700; letter-spacing: .12em; margin: 0 0 10px; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: 0; letter-spacing: 0; }
.directory__header > p:last-child { color: #bcc1c8; margin: 16px 0 0; }

.channel-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.channel-card { border: 1px solid #353a41; border-radius: 6px; color: inherit; display: grid; gap: 18px; min-height: 240px; padding: 24px; text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.channel-card:hover, .channel-card:focus-visible { background: #191d22; border-color: #84b4ff; outline: none; }
.channel-card img { height: 64px; max-width: 100%; object-fit: contain; object-position: left center; }
.channel-card span { align-self: end; font-size: 1.15rem; font-weight: 700; }
.channel-card small { color: #a8c7ff; }

.topbar { align-items: center; display: flex; justify-content: space-between; margin-bottom: 34px; }
.back-link { color: #cbd0d6; text-decoration: none; }
.back-link:hover, .back-link:focus-visible { color: #fff; text-decoration: underline; }
.adult-badge { background: #bd3030; border-radius: 3px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; padding: 7px 9px; }
.channel-header { align-items: center; display: flex; gap: 20px; }
.channel-header img { height: 60px; max-width: 150px; object-fit: contain; object-position: left; }
.channel-header h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
.player-wrap { background: #050607; margin-top: 30px; position: relative; width: 100%; }
.player-wrap::before { content: ""; display: block; padding-top: 56.25%; }
video { height: 100%; left: 0; object-fit: contain; position: absolute; top: 0; width: 100%; }
.status { color: #b9c0c9; line-height: 1.6; margin-top: 18px; }
.status[data-state="error"] { color: #ffaeae; }
.notice { border-left: 3px solid #7aa9ec; color: #c5cbd2; font-size: .92rem; margin-top: 24px; padding-left: 14px; }

@media (max-width: 720px) {
  .directory, .channel-page { width: min(100% - 28px, 1120px); padding: 36px 0; }
  .channel-list { grid-template-columns: 1fr; }
  .channel-card { min-height: 160px; }
  .channel-header { align-items: flex-start; flex-direction: column; gap: 14px; }
}
