/* musicstation lab
   デザインはこのファイルにまとめる。ファイル名は固定（変更しても全ページのHTMLは変わらない）。 */

:root {
  --bg: #020617;
  --bg-deep: #01030c;
  --panel: #071433;
  --panel-alt: #050f29;
  --line: #1d335f;
  --line-strong: #2a3f6d;
  --text: #e6ecfb;
  --text-strong: #f8fbff;
  --muted: #8ca4d1;
  --num: #6f8ac2;
  --accent: #38bdf8;
  --accent-violet: #7c3aed;
  --accent-blue: #3b82f6;
  --secondary: #23475c;
  --onair: #ff8a2a;
  /* ロゴにホバーで出すグラデーション（ヒーロー画像の色合い） */
  --brand-gradient: linear-gradient(90deg, #ff3d8b, #a855f7 35%, #3b82f6 65%, #22d3ee);
  --radius: 4px;
  --container: 1024px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 60% 40% at 85% 10%, rgb(124 58 237 / 0.18), transparent 70%),
    radial-gradient(ellipse 70% 30% at 70% 100%, rgb(59 130 246 / 0.16), transparent 70%),
    linear-gradient(var(--bg-deep), var(--bg));
  background-attachment: fixed;
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

main.container {
  flex: 1;
  padding-bottom: 64px;
}

.pc-only {
  display: none;
}

@media (min-width: 768px) {
  .pc-only {
    display: inline;
  }
}

/* ---------- ヘッダー ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgb(2 6 23 / 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo search"
    "nav nav";
  align-items: center;
  gap: 12px 16px;
  padding-top: 12px;
}

/* ヘッダー・フッターのロゴ。ふだんは白、ホバーすると文字がグラデーションになる */
.logo {
  grid-area: logo;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-strong);
  white-space: nowrap;
  background: var(--brand-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--text-strong);
  transition: -webkit-text-fill-color 0.3s;
}

.logo:hover {
  color: var(--text-strong);
  -webkit-text-fill-color: transparent;
}

.global-nav {
  grid-area: nav;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.global-nav a {
  padding: 8px 0 10px;
  border-bottom: 2px solid transparent;
  color: var(--text);
}

.global-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text-strong);
}

.header-search {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel-alt);
  padding: 6px 12px;
  color: var(--muted);
  min-width: 0;
}

.header-search input,
.filter-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

@media (min-width: 900px) {
  .header-inner {
    grid-template-columns: auto 1fr 250px;
    grid-template-areas: "logo nav search";
    padding-top: 0;
    height: 64px;
  }

  .global-nav {
    justify-content: center;
    gap: 22px;
  }

  .global-nav a {
    padding: 20px 0 18px;
  }
}

/* ---------- 共通の部品 ---------- */

.section {
  margin-top: 48px;
}

.page-title,
.section-title {
  margin: 0 0 16px;
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.page-title {
  margin-top: 32px;
  font-size: 32px;
}

.section-title {
  font-size: 26px;
}

.page-title small,
.section-title small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.page-title-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.page-title-name {
  display: block;
  word-break: break-word;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-strong);
  font-weight: 700;
}

.button:hover {
  color: var(--text-strong);
  filter: brightness(1.15);
}

.button-primary {
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-blue));
}

.button-secondary {
  background: var(--secondary);
  border-color: var(--line-strong);
}

.button-outline {
  border-color: var(--line-strong);
  padding: 8px 16px;
  font-size: 14px;
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  vertical-align: middle;
}

.badge-done {
  color: #60a5fa;
}

.badge-upcoming {
  color: var(--onair);
  border-color: var(--onair);
}

.info {
  color: var(--muted);
  white-space: pre-line;
}

/* 公開メモ。曲名のすぐ右に続ける（長ければ折り返す） */
.note {
  margin-left: 0.5em;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 表 ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--panel-alt);
}

.data-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-align: left;
}

.data-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.data-table tbody tr:nth-child(odd),
.song-table tbody tr.is-odd {
  background: var(--panel);
}

/* 曲の表は、放送日ごとに縞模様を切り替える（同じ日の行は同じ色） */
.song-table tbody tr:nth-child(odd):not(.is-odd) {
  background: none;
}

.data-table .col-num {
  width: 3.5em;
  color: var(--num);
  text-align: center;
  white-space: nowrap;
}

.data-table .col-date {
  width: 7.5em;
  white-space: nowrap;
}

.song-table .col-title {
  width: 45%;
}

@media (max-width: 599px) {
  .data-table td {
    padding: 8px;
    font-size: 14px;
  }

  .data-table .col-num {
    width: 2.5em;
  }

  /* 狭い画面では、曲名の下にアーティスト名を添える */
  .song-table,
  .song-table tbody {
    display: block;
  }

  .song-table tr {
    display: grid;
    grid-template-columns: 2.5em 1fr;
  }

  .song-table.is-history tr {
    grid-template-columns: 7em 1fr;
  }

  .song-table tr + tr {
    border-top: 1px solid var(--line);
  }

  .song-table td {
    border-top: 0;
  }

  /* 同じ放送日の2曲目以降は、日付の列を空けて、区切り線も曲名の側だけに引く */
  .song-table tr.is-cont {
    border-top: 0;
  }

  .song-table tr.is-cont .col-title,
  .song-table tr.is-cont .col-artist {
    grid-column: 2;
  }

  .song-table tr.is-cont .col-title {
    border-top: 1px solid var(--line);
  }

  .song-table .col-num,
  .song-table .col-date {
    grid-row: span 2;
  }

  .song-table .col-title {
    width: auto;
    padding-bottom: 0;
  }

  .song-table .col-artist {
    grid-column: 2;
    padding-top: 2px;
    color: var(--muted);
    font-size: 12px;
  }

  /* 開いているページのアーティストと同じ名前なら省き、曲名だけの1行にする */
  .song-table .col-artist.is-self {
    display: none;
  }

  .song-table tr:has(.is-self) .col-title {
    padding-bottom: 8px;
  }

  .song-table tr:has(.is-self) .col-date {
    grid-row: auto;
  }
}

/* ---------- トップページ ---------- */

/* 画面の端まで広げる。中身は他の部分と同じ幅にそろえる */
.hero {
  position: relative;
  margin: 0 calc(50% - 50vw);
  padding: 72px max(16px, calc(50vw - var(--container) / 2 + 16px)) 56px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--bg-deep) 15%, rgb(1 3 12 / 0.6) 50%, rgb(1 3 12 / 0.15)),
    linear-gradient(180deg, transparent 70%, var(--bg-deep)),
    url("/images/hero.webp") right center / cover no-repeat;
}

.hero h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.hero p {
  max-width: 680px;
  margin: 20px 0 32px;
  font-size: 17px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 599px) {
  .hero::before {
    background:
      linear-gradient(180deg, rgb(1 3 12 / 0.4), var(--bg-deep) 85%),
      url("/images/hero.webp") 70% center / cover no-repeat;
  }

  .hero-buttons .button {
    width: 100%;
  }
}

.episode-date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 12px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.episode-date .badge {
  letter-spacing: 0;
}

.news-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.news-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.year-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(120deg, #1a2f5e, #13244a 60%, #2a3550);
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.year-button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.about-card {
  display: grid;
  border: 1px solid var(--line);
  background: var(--panel-alt);
}

.about-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background:
    radial-gradient(circle at 50% 55%, rgb(255 138 42 / 0.25), transparent 60%),
    linear-gradient(135deg, #1a0d0d, #0b0a14);
}

.about-card-image span {
  color: var(--onair);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgb(255 138 42 / 0.6);
}

.about-card-body {
  padding: 24px;
}

.about-card-body p {
  margin: 0 0 16px;
}

@media (min-width: 768px) {
  .about-card {
    grid-template-columns: 290px 1fr;
  }
}

/* ---------- 一覧・詳細ページ ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 0;
  font-size: 14px;
}

.month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.month-title {
  margin: 0 0 16px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  font-size: 20px;
}

.episode-block + .episode-block {
  margin-top: 32px;
}

.episode-meta {
  margin: -8px 0 16px;
}

.episode-meta .badge:first-child {
  margin-left: 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 8px 0 0;
}

.facts dt {
  color: var(--muted);
  font-size: 12px;
}

.facts dd {
  margin: 0;
  color: var(--text-strong);
  font-weight: 500;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.filter-box {
  display: flex;
  max-width: 480px;
  margin: 8px 0 24px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel-alt);
}

.filter-box input {
  font-size: 16px;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.result-list small {
  color: var(--muted);
  font-size: 12px;
}

.prose {
  max-width: 760px;
}

.prose h2,
.article h3 {
  margin: 32px 0 8px;
  color: var(--text-strong);
  font-size: 18px;
}

.prose a,
.article a,
.info a {
  color: var(--accent);
}

.article {
  max-width: 760px;
  padding: 0 24px 24px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
}

/* ---------- フッター ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 64px;
  font-size: 13px;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.9;
}

.footer-heading {
  margin: 0 0 8px;
  color: var(--muted);
}

.copyright {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
