/* Shared visual language with ANIME LOOP; playback remains in app.mjs. */
:root {
  --bg: #0d0e13;
  --surface: #15161d;
  --high: #22232d;
  --line: #2c2d38;
  --muted: #a7a8b5;
  --text: #f7f7fb;
  --accent: #ff7994;
  --pink: #ff7994;
  --blue: #a38cff;
  font-family: Arial, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
}
body { background: radial-gradient(ellipse 850px 700px at 15% 0%, #222336 0, transparent 75%), var(--bg); }
html { scroll-padding-top: 96px; }
.site-header {
  position: sticky; top: 0; z-index: 20; min-height: 76px;
  padding: 0 4%; gap: 32px;
  background: rgba(13,14,19,.96); backdrop-filter: blur(14px);
}
.brand { gap: 12px; font-size: 20px; letter-spacing: .02em; }
.brand strong, .footer-brand strong { color: var(--text); }
.brand small { margin-top: 7px; font-size: 10px; letter-spacing: .16em; }
.brand-mark {
  width: 38px; height: 38px; padding: 0; border-radius: 11px;
  background: linear-gradient(135deg, #ff4d6d, #7b61ff); color: #fff;
  font-size: 22px; font-style: italic; box-shadow: 0 0 30px #ff4d6d20;
}
.site-header nav { margin-right: auto; gap: 28px; }
.site-header nav a { display: flex; align-items: center; min-height: 76px; padding: 0; color: var(--muted); font-size: 14px; }
.site-header nav a:hover, .site-header nav a.active { color: #fff; border-color: #ff4d6d; }
.edition { color: var(--muted); font-size: 12px; white-space: nowrap; }
.main-shell { max-width: 1280px; width: 92%; margin: 0 auto; }
.page-title { max-width: 1000px; margin: auto; padding: 22px 0 18px; gap: 16px; }
.page-title h1 { font-size: 18px; letter-spacing: .02em; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .18em; }
.page-title .eyebrow { margin-bottom: 4px; }
.clock-block { font-size: 12px; gap: 8px; }
.clock-block strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.watch-section { max-width: 1000px; margin: auto; border: 0; background: transparent; overflow: visible; }
.watch-summary {
  display: block; padding: 18px 20px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(145deg, #1a1b25, #13141b);
}
.watch-summary h2 { font-size: 20px; margin-top: 10px; min-height: 0; }
.onair-label { color: #43dfa2; background: #43dfa20e; border-color: #43dfa233; }
.channel-small { color: var(--muted); font-size: 13px; }
.watch-grid { display: block; }
.player-column { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #12131a; }
.player-stage { background: #050507; }
.play-disc { background: linear-gradient(135deg, #ff4d6d, #7b61ff); color: white; box-shadow: 0 0 36px #ff4d6d26; }
.player-controls { padding: 14px 18px; gap: 12px; }
.player-controls button { min-height: 42px; border-radius: 7px; font-size: 14px; }
.player-controls a { font-size: 14px; }
.player-status { font-size: 14px; }
.video-meta { background: #12131a; font-size: 14px; }
.next-summary {
  display: block; width: 100%; border: 0; border-top: 1px solid var(--line);
  padding: 15px 48px 17px 20px; margin: 0; background: #161720; min-height: 85px;
}
.next-summary .eyebrow { justify-content: flex-start; gap: 16px; color: var(--muted); }
.next-summary strong { font-size: 16px; -webkit-line-clamp: 2; }
.next-icon { right: 20px; top: 32px; color: var(--accent); }
.ad-slot { max-width: 1000px; margin: 24px auto 36px; padding: 0; scroll-margin-top: 96px; }
.ad-slot-inner {
  position: relative; min-height: 120px; padding: 22px 24px; border: 1px dashed #4b4c5d; border-radius: 12px;
  background: repeating-linear-gradient(135deg, #181923 0, #181923 12px, #14151e 12px, #14151e 24px);
}
.ad-slot-inner::before, .ad-slot-inner::after { content: ''; position: absolute; width: 14px; height: 14px; border-color: #787987; pointer-events: none; }
.ad-slot-inner::before { left: 8px; top: 8px; border-left: 2px solid; border-top: 2px solid; }
.ad-slot-inner::after { right: 8px; bottom: 8px; border-right: 2px solid; border-bottom: 2px solid; }
.ad-slot-label { color: #b2b3c3; font-size: 12px; letter-spacing: .12em; }
.ad-slot-copy h2 { font-size: 20px; }
.ad-slot-cta { border: 1px solid #6b4d70; border-radius: 8px; background: #2a1b2e; color: #ffe4ed; font-size: 15px; }
.ad-slot-cta:hover { background: #3b2541; border-color: var(--accent); }
.ad-slot-note { font-size: 12px; }
.channel-panel { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #101117; }
.panel-heading { align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 18px; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.mix-channels { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; padding: 12px; }
.mix-channel {
  display: flex; align-items: center; text-align: left; min-height: 90px; padding: 12px; gap: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.mix-channel:hover { background: var(--high); }
.mix-channel.active { background: #22232d; border-color: #6b6275; box-shadow: inset 0 2px var(--channel-color,var(--accent)); }
.mix-channel strong { font-size: 14px; margin: 0; color: var(--text); }
.mix-channel small { font-size: 12px; color: var(--muted); }
.channel-arrow { display: none; }
.channel-num { color: var(--channel-color,var(--accent)); font-size: 22px; }
.mix-channel:nth-child(5n+1), .guide-column:nth-child(5n+1) { --channel-color: #ff6685; }
.mix-channel:nth-child(5n+2), .guide-column:nth-child(5n+2) { --channel-color: #ffad45; }
.mix-channel:nth-child(5n+3), .guide-column:nth-child(5n+3) { --channel-color: #a38cff; }
.mix-channel:nth-child(5n+4), .guide-column:nth-child(5n+4) { --channel-color: #46d2c1; }
.mix-channel:nth-child(5n+5), .guide-column:nth-child(5n+5) { --channel-color: #55c5f3; }
.artist-select { display: grid; grid-template-columns: auto minmax(140px,1fr) minmax(170px,1fr) auto; gap: 12px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
.artist-select label, .artist-select>a { margin: 0; font-size: 14px; }
.artist-select input, .artist-select select { width: 100%; min-width: 0; margin: 0; background: #191a23; border-color: #383946; border-radius: 7px; font-size: 14px; }
.guide-section, .artists-section, .catalog-section { padding-top: 44px; }
.section-head { align-items: center; gap: 20px; }
.section-head h2 { font-size: 24px; }
.guide-controls { flex-wrap: wrap; }
.guide-groups { gap: 8px; border: 0; border-radius: 0; overflow: visible; }
.guide-groups button { min-height: 50px; padding: 10px 18px; border: 1px solid #383946; border-radius: 8px; font-size: 16px; }
.guide-groups button[aria-pressed=true], .segments button[aria-pressed=true] { color: #ffe6ed; background: #30202c; border-color: #a65171; }
.guide-groups button+button { border-left: 1px solid #383946; }
.guide-controls>button { border-radius: 7px; }
.guide-artist-picker { background: #111219; border-radius: 12px; padding: 18px; }
.guide-artist-button { background: #181921; border-radius: 8px; min-height: 76px; padding: 12px; }
.guide-artist-button:hover { background: #22232d; border-color: #666273; }
.guide-artist-button[aria-pressed=true] { background: #2a1f2d; border-color: #a65171; box-shadow: inset 3px 0 var(--accent); }
.guide-artist-button>span { font-size: 12px; }
.guide-artist-button small { font-size: 12px; }
.guide-columns { border-radius: 12px; }
.guide-column { background: #13141b; }
.guide-heading { background: #181921; border-top: 3px solid transparent; padding: 16px 12px; gap: 10px; }
.guide-heading.active { border-top-color: var(--channel-color); box-shadow: none; background: #22232d; }
.guide-heading.active strong { color: var(--text); }
.guide-program { padding: 16px 12px; gap: 8px; grid-template-columns: 46px minmax(0,1fr); }
.guide-program.current { background: #ff4d6d09; box-shadow: inset 3px 0 var(--channel-color); }
.program-time { color: var(--channel-color,var(--accent)); }
.guide-selection { color: var(--muted); }
.segments { border-radius: 8px; background: #15161d; }
.artist-card, .source-item { border-radius: 10px; background: #15161d; }
.artist-card.active { border-color: #a65171; box-shadow: 0 0 0 1px #a65171; }
.rank-badge { background: #15161deb; color: var(--accent); }
.library-image { border-radius: 9px; }
.sources-section details { background: #12131a; border-radius: 10px; }
footer { margin-top: 28px; background: #0c0d12; padding: 28px 4%; }
@media(max-width:1100px) {
  .site-header { gap: 24px; }
  .site-header nav { gap: 20px; }
  .edition { display: none; }
  .mix-channel { display: block; }
  .mix-channel strong { margin-top: 6px; }
  .artist-select { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .artist-select label { grid-column: 1/-1; }
  .artist-select>a { grid-column: 1/-1; }
  .section-head { flex-wrap: wrap; }
}
@media(max-width:850px) {
  .site-header { gap: 0; flex-wrap: wrap; padding: 14px 4% 0; }
  .site-header nav { width: 100%; justify-content: space-between; margin-top: 8px; }
  .site-header nav a { min-height: 46px; }
  html { scroll-padding-top: 132px; }
  .ad-slot { scroll-margin-top: 132px; }
  .watch-summary h2 { font-size: 18px; }
  .mix-channels { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mix-channel { min-height: 100px; }
  .ad-slot-inner { flex-direction: row; }
  .ad-slot-cta { flex: 0 1 300px; }
}
@media(max-width:600px) {
  .main-shell { width: calc(100% - 28px); }
  .brand { font-size: 20px; }
  .brand small { font-size: 10px; }
  .site-header nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
  .site-header nav a { font-size: 14px; line-height: 1.5; min-height: 50px; }
  .page-title { padding: 18px 0 14px; }
  .page-title h1 { font-size: 17px; }
  .clock-block { margin-top: 8px; }
  .watch-summary { padding: 15px; }
  .watch-summary h2 { font-size: 16px; }
  .channel-small { display: block; margin: 8px 0 0; font-size: 12px; }
  .player-controls { padding: 12px; }
  .player-controls button { padding: 6px 8px; }
  .player-status, .video-meta { font-size: 13px; }
  .next-summary { padding: 14px 38px 14px 14px; }
  .next-summary strong { font-size: 14px; }
  .next-icon { right: 14px; }
  .ad-slot-inner { flex-direction: column; padding: 20px; }
  .ad-slot-cta { flex: auto; width: 100%; }
  .ad-slot { margin-bottom: 28px; }
  .panel-heading { padding: 16px; }
  .panel-heading h2 { font-size: 17px; }
  .mix-channels { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mix-channel { min-height: 96px; }
  .artist-select { padding: 16px; grid-template-columns: 1fr; }
  .guide-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; width: 100%; }
  .guide-groups button { padding: 10px 6px; font-size: 15px; white-space: normal; line-height: 1.5; }
  .guide-controls { width: 100%; justify-content: flex-start; }
  .guide-columns, .guide-columns.mix-guide { display: block; }
  .guide-heading { min-height: 72px; }
  .guide-program { grid-template-columns: 52px minmax(0,1fr); min-height: 110px; }
  .guide-artist-picker { padding: 14px; }
  .guide-artist-button { padding: 10px; }
  .guide-artist-button strong { font-size: 14px; }
  .section-head h2 { font-size: 22px; }
  .segments button { font-size: 14px; }
}

/* Keep the IDOL LOOP ad rails aligned with the soccer channel layout. */
#music.player-layout {
  display: grid;
  grid-template-areas: 'left player right';
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) minmax(140px, 180px);
  align-items: stretch;
  gap: 16px;
  margin: 0 0 36px;
  background: transparent;
  scroll-margin-top: 96px;
}
#music.player-layout > .player-main { grid-area: player; min-width: 0; }
.watch-ad-rail { display: flex; min-width: 0; }
.watch-ad-rail--left { grid-area: left; }
.watch-ad-rail--right { grid-area: right; }
.soccer-ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
  min-height: 110px;
  width: 100%;
  margin: 22px 0;
  padding: 18px 12px;
  border: 1px dashed #607985;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, #0d1a22, #0d1a22 12px, #10202a 12px, #10202a 24px);
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}
.soccer-ad-slot > span { font-size: 12px; letter-spacing: .08em; }
.soccer-ad-slot > strong { margin-top: 8px; font-size: 16px; color: #c1cbd2; }
.soccer-ad-slot > p { max-width: 38rem; margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.soccer-ad-slot > a {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid #607985;
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}
.soccer-ad-slot > a:hover, .soccer-ad-slot > a:focus-visible { border-color: var(--accent); }
.soccer-ad-slot > small { margin-top: 6px; font-size: 11px; line-height: 1.5; }
.soccer-ad-slot--rail { min-height: 250px; margin: 0; }

@media(max-width:1180px) {
  #music.player-layout {
    grid-template-areas: 'player player' 'left right';
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .soccer-ad-slot--rail { min-height: 140px; padding: 14px 10px; }
}
@media(max-width:850px) {
  #music.player-layout {
    grid-template-areas: 'player' 'left' 'right';
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    scroll-margin-top: 132px;
  }
  .soccer-ad-slot--rail { min-height: 110px; margin: 0; }
}
