body {
  font-family: sans-serif;
  margin: 0;

  background:
    radial-gradient(circle at 20% 20%, #eaf3ff 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, #e0f7ff 0%, transparent 40%),
    linear-gradient(180deg, #ffffff, #f7f7f7);
}

/* ===== 言語切替（html[lang] で .ja / .en を出し分け） ===== */
html[lang="ja"] .en { display: none !important; }
html[lang="en"] .ja { display: none !important; }
.summary .ja,
.summary .en { display: block; }

/* ===== ヘッダーナビ（スティッキー固定） ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.site-nav-inner {
  max-width: 1040px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  font-weight: 800;
  font-size: 16px;
  color: #1f7dff;
  white-space: nowrap;
}
.nav-logo:hover { text-decoration: none; opacity: 1; }

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}
.nav-links a:hover {
  background: #eaf3ff;
  color: #1f7dff;
  text-decoration: none;
  opacity: 1;
}
.nav-prev { color: #999 !important; }
.nav-links a[aria-current="page"] {
  background: #eaf3ff;
  color: #1f7dff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f7dff, #5fc3ff);
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(31, 125, 255, 0.3);
}
.nav-cta:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  text-decoration: none;
}

.nav-cta-outline {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid #1f7dff;
  color: #1f7dff;
  font-weight: 700;
  font-size: 13px;
}
.nav-cta-outline:hover { background: #eaf3ff; text-decoration: none; }

.lang-toggle {
  padding: 7px 12px;
  border: 1px solid #1f7dff;
  border-radius: 999px;
  background: #fff;
  color: #1f7dff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.lang-toggle:hover { background: #eaf3ff; }

/* アンカー飛び先がスティッキーナビに隠れないように */
[id] { scroll-margin-top: 64px; }

@media (max-width: 720px) {
  .site-nav-inner { flex-wrap: wrap; gap: 8px; }
  /* justify-content:center のままだと横スクロール時にはみ出した左端（概要など）へ
     scrollLeft を負方向にできず永久に到達できなくなるため、折り返し時は左寄せにする */
  .nav-links { order: 3; flex-basis: 100%; width: 100%; justify-content: flex-start; }
  /* ナビが2〜3段になる分、アンカー飛び先のオフセットも広げる
     （360px幅・日本語だとnav-brandとnav-actionsも折り返して3段=約135pxになりうる） */
  [id] { scroll-margin-top: 140px; }
}

header {
  padding: 0;
}

a {
  color: #1f7dff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  opacity: 0.8;
}
  
#count {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #555;
  margin: 4px 0 0;
}

#list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(600px, 100%), 800px));
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;

  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);

  border: 1px solid #eee;
}
  
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
  
.left > a {
  align-self: center;
  display: flex;
}

.icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.streamer {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
  
.streamer a {
  color: #1f7dff;
  font-weight: 600;
}

.row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
}

.x-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
}
.x-row a { color: #1f7dff; font-weight: 600; }
.x-row a:hover { opacity: 0.8; }

.schedule {
  align-items: flex-start;
  margin-top: 2px;
}
.schedule .row-icon { line-height: 1.6; }

.schedule-chips .ja,
.schedule-chips .en {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  background: #eef1f6;
  color: #556;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-tbd { background: #eee; color: #888; }

.game {
  display: flex;
  align-items: center;
  gap: 6px;

  font-weight: bold;
  font-size: 16px;
  margin-top: 2px;
}

.game a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-img {
  width: 300px;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
  
.meta {
  font-size: 14px;
  color: #777;
  margin-top: 2px;
}

.meta.note {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin-top: 6px;
}
.meta.note.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.card.note-open .meta.note.clamped {
  -webkit-line-clamp: unset;
  cursor: default;
}
.note-toggle {
  background: none;
  border: 0;
  padding: 2px 0 0;
  font: inherit;
  font-size: 13px;
  color: #1f7dff;
  cursor: pointer;
}
.note-toggle:hover { text-decoration: underline; }

.left {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex: 1;
}

.info {
  flex: 1;
  min-width: 0;
  gap: 6px;
}

.row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero {
  aspect-ratio: 1672 / 460;
  overflow: hidden;
  position: relative;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: brightness(0.92);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to top, rgba(255,255,255,0), #f7f7f7);
}

.hero-info {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 12px 20px 46px;
  background: linear-gradient(180deg, #c7d6ea 0%, #6688b8 20%, #3f6091 45%, #34527c 100%);
}

.hero-info::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(to bottom, rgba(247, 247, 247, 0), #f7f7f7);
}

.hero-date {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-date-sep { opacity: 0.7; margin: 0 2px; }
.hero-jst { font-size: 16px; font-weight: 600; opacity: 0.85; margin-left: 2px; }
.hero-time { font-size: 0.6em; font-weight: 700; opacity: 0.9; }

.hero-tagline {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  opacity: 0.9;
}
/* 狭い画面では句の切れ目で改行させる */
.hero-tagline-part { display: inline-block; }

.hero-organizer {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}
.hero-organizer a {
  color: #cdeaff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(205, 234, 255, 0.5);
  padding-bottom: 1px;
}
.hero-organizer a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.9); }
/* 主催・Twitch・X をそれぞれ1かたまりにして、狭い画面ではかたまり単位で改行させる */
.hero-organizer-item { display: inline-block; white-space: nowrap; margin: 0 4px; }
.hero-organizer-sep { margin-right: 8px; color: inherit; }

.hero-cta-row {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta-primary {
  padding: 11px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f7dff, #5fc3ff);
  color: #fff !important;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.hero-cta-primary:hover { transform: translateY(-1px); opacity: 0.92; text-decoration: none; }

.hero-cta-secondary {
  padding: 11px 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  font-weight: 700;
  font-size: 16px;
}
.hero-cta-secondary:hover { background: rgba(255, 255, 255, 0.18); text-decoration: none; }

.hero-count {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.95;
  min-height: 1em;
}

@media (max-width: 600px) {
  .hero { aspect-ratio: auto; height: 200px; }
  .hero-info { padding: 10px 14px 30px; }
  .hero-info::after { height: 22px; }
  .hero-date { font-size: 21px; }
  .hero-tagline { font-size: 14px; }
  .hero-organizer { font-size: 12px; }
  .hero-cta-primary, .hero-cta-secondary { padding: 9px 20px; font-size: 14px; }
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  font-size: 20px;
  color: #223b64;
  letter-spacing: 0.3px;
  margin: 34px 0 10px;
}

.section-title::before,
.section-title::after {
  content: "";
  height: 1px;
  width: 44px;
  background: linear-gradient(to right, transparent, #1f7dff88);
}
.section-title::after { background: linear-gradient(to left, transparent, #1f7dff88); }

.rules {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fbfcff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rules h2 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #223b64;
}
.rules h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #1f7dff, #3f6091);
}

.rules li small {
  display: block;
  color: #aaa;
  margin-top: 1px;
  line-height: 1.5;
  font-size: 0.9em;
}
/* 注記内の強調（リンクの青と紛れないよう濃いグレー） */
.rules li small strong {
  color: #555;
}

.notice-group + .notice-group {
  margin-top: 22px;
}

.notice-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1f7dff;
  letter-spacing: 0.2px;
}
.notice-group-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #1f7dff, #3f6091);
  flex-shrink: 0;
}

.notice-group ul {
  margin: 0;
  padding-left: 22px;
}

.cta {
  display: block;
  width: fit-content;
  margin: 18px auto 0;

  padding: 14px 24px;
  font-size: 15px;

  background: linear-gradient(135deg, #1f7dff, #5fc3ff);
  color: white;

  border-radius: 12px;
  font-weight: bold;

  box-shadow: 0 6px 16px rgba(31,125,255,0.3);
}

.cta:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.cta-row .cta {
  margin: 0;
}

.cta-outline {
  display: block;
  width: fit-content;
  padding: 14px 24px;
  font-size: 15px;
  background: white;
  color: #1f7dff;
  border: 2px solid #1f7dff;
  border-radius: 12px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
}

.cta-outline:hover {
  background: #eaf3ff;
  transform: translateY(-2px);
  opacity: 1;
  text-decoration: none;
}

.cta-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
  filter: grayscale(40%);
}

.footer {
  text-align: center;
  padding: 30px 10px;
  font-size: 13px;
  color: #888;
}

/* イベント全体のシェア（控えめなピル型リンク・フッター直前） */
.event-share {
  text-align: center;
  padding: 8px 10px 0;
}
.event-share-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.event-share-link:hover {
  background: #eaf3ff;
  border-color: #7dbfff;
  color: #1f7dff;
  text-decoration: none;
}

/* サブページ用の簡易アクセント（ヒーロー画像の代わりに一筋だけ色を残す） */
.mini-hero {
  height: 5px;
  background: linear-gradient(90deg, #1f7dff, #3f6091, #1f7dff);
}

.about-card {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;

  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.about-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  margin: 0 0 14px;
  color: #223b64;
}
.about-card-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #1f7dff, #3f6091);
}

.summary {
  margin: 0;
  padding: 0;

  font-size: 16px;
  color: #444;
  line-height: 1.6;
  text-align: center;
}

.assets {
  margin: 30px 0 20px;
  text-align: center;
  opacity: 0.9;
}

.assets-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 20px;
  color: #223b64;
  margin-bottom: 10px;
}
.assets-title::before,
.assets-title::after {
  content: "";
  height: 1px;
  width: 28px;
  background: linear-gradient(to right, transparent, #1f7dff66);
}
.assets-title::after { background: linear-gradient(to left, transparent, #1f7dff66); }

.banner-note {
  margin: 0 0 16px;
  font-size: 11px;
  color: #777;
  line-height: 1.4;
}

.banner-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.banner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
}

.banner-img-wrap {
  width: 100%;
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner {
  width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.banner-transparent {
  background-image:
    linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
    linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

.banner-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #223b64;
}

.banner-card .download-btn {
  margin-top: 6px;
}

.download-btn {
  display: inline-block;
  padding: 10px 14px;
  background: #2f80ed;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.3;
  transition: 0.2s;
}

.download-btn:hover {
  background: #1f6fd6;
  transform: translateY(-1px);
}

.event-info {
  margin: 16px 0 0;
  padding: 0;

  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;

  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.event-info div {
  background: #eaf3ff;
  padding: 8px 14px;
  border-radius: 10px;
}

.sub {
  font-size: 12px;
  color: #777;
  margin-left: 6px;
}

/* DIG Selection（selection.html：主催おすすめタイトルの一覧） */
.selection-note {
  text-align: center;
  font-size: 14px;
  color: #555;
  margin: 10px 16px;
  line-height: 1.6;
}

/* index.html の DIG Selection への入口（旧カルーセルの位置） */
.selection-entry {
  text-align: center;
  margin: 10px 16px 40px;
}

/* ジャンルへのジャンプ（ページ上部のピル） */
.sel-genre-nav {
  max-width: 1040px;
  margin: 14px auto 0;
  scroll-margin-top: calc(var(--nav-h, 60px) + 12px);
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
}

.sel-genre-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid #d6e6fb;
  border-radius: 999px;
  background: #fff;
  color: #223b64;
  font-size: 13px;
  text-decoration: none;
}
.sel-genre-link:hover { background: #eaf3ff; border-color: #7dbfff; text-decoration: none; }

.sel-genre-count {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #8aa0bf;
}

/* ジャンルごとの帯（PCはグリッド・スマホは横スワイプ） */
.sel-bands {
  max-width: 1040px;
  margin: 8px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}

/* 帯1本＝薄い背景のパネル。ジャンルの切れ目がスクロール中でも分かるように */
.sel-band {
  margin-top: 32px;
  padding: 14px 16px 18px;
  background: #f1f6fd;
  border: 1px solid #d9e6f7;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(31, 125, 255, 0.06);
  scroll-margin-top: calc(var(--nav-h, 60px) + 12px);
}

.sel-band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  /* スケジュール表の日付見出しと同じ青。白文字の帯でジャンルの切れ目をはっきりさせる */
  background: linear-gradient(90deg, #1f7dff, #3f6091);
}

.sel-band-title {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.sel-band-title .sel-genre-count { font-size: 12px; color: rgba(255, 255, 255, 0.75); }

.sel-band-top {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.sel-band-top:hover { color: #fff; text-decoration: underline; }

@media (max-width: 600px) {
  /* パネルの余白でカードが狭くなるとタグが1行に収まらないので、
     ページ左右の余白とパネル内側の余白を詰めて、カード幅をパネル導入前と同じに保つ */
  .sel-bands { padding: 0 8px; }
  .sel-band { margin-top: 22px; padding: 10px 8px 12px; }
  .sel-band-head { padding: 6px 10px; margin-bottom: 10px; }
  .sel-band-title { font-size: 15px; white-space: nowrap; }
  /* 見出しが2行に折り返さないよう、スマホでは「↑」だけにする */
  .sel-band-top-label { display: none; }
  .sel-band-top { font-size: 15px; padding: 0 2px; }
}

/* PC・タブレット：帯の中は折り返しのグリッド（PC幅で3列） */
.sel-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* スマホ：帯ごとに横スワイプ（次のカードが少し見えて、続きがあると分かる） */
@media (max-width: 600px) {
  .sel-strip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* カードの影が切れないよう少し余白を持たせる */
    padding: 2px 2px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c9d8ec transparent;
  }
  .sel-strip > .sel-card { scroll-snap-align: start; }
}
@media (max-width: 360px) {
  /* 小さい端末ではカードを広げてタグ3つが1行に入る幅を確保する */
  .sel-strip { grid-auto-columns: 88%; }
  /* ここまで狭いと長いジャンル名は1行に入らないので折り返しを許す */
  .sel-band-title { white-space: normal; }
}

.sel-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sel-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  background: #eef2f7;
}

.sel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.sel-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
.sel-title a { color: #223b64; }

/* タグは1行に固定（紹介文の書き出し位置をそろえるため）。入りきらないタグは
   2行目に回って丸ごと隠れる。CSV のタグは重要な順に並べておく */
.sel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  height: 22px;
  overflow: hidden;
}

.sel-tag {
  padding: 2px 8px;
  border: 1px solid #d6e6fb;
  border-radius: 999px;
  background: #f3f8ff;
  color: #3f6091;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.sel-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #555;
}

#list-loading,
#selection-loading,
.list-loading {
  text-align: center;
  padding: 18px 20px;
  font-size: 13px;
  color: #666;

  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(6px);
  border-radius: 12px;

  margin: 14px auto;
  max-width: 420px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.retry-btn {
  margin-left: 6px;
  padding: 4px 12px;
  border: 1px solid #bcdcff;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1f7dff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.retry-btn:hover { background: #dcefff; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 10px 12px 0;
}

.filter {
  text-align: center;
}

.filter button {
  margin: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  background: #eee;
  cursor: pointer;
}

.filter button.active {
  background: #1f7dff;
  color: #fff;
}

.sort-filter {
  border-left: 1px solid #ddd;
  padding-left: 10px;
}

.sort-label {
  font-size: 12px;
  color: #999;
  margin-right: 2px;
}

@media (max-width: 600px) {
  .sort-filter {
    border-left: none;
    border-top: 1px solid #ddd;
    padding-left: 0;
    padding-top: 4px;
    width: 100%;
  }
}

/* Schedule page */
.schedule-note {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin: 6px auto 16px;
  max-width: 700px;
  padding: 0 16px;
  line-height: 1.6;
}

.back-link-row {
  text-align: center;
  margin: 16px 0 0;
}

.back-link {
  font-size: 13px;
  color: #1f7dff;
}

/* 現在配信中（NowLive）パネル ＝ 配信終わりの Raid 先選び用の縦リスト */
.nowlive {
  max-width: 680px;
  margin: 0 auto 20px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.nowlive-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
  color: #333;
}
.nowlive-count {
  font-weight: 400;
  font-size: 13px;
  color: #999;
}
.nowlive-hint {
  margin: -2px 0 10px;
  font-size: 12px;
  color: #999;
  line-height: 1.45;
}
.live-dot {
  display: inline-block;
  vertical-align: middle;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e0245e;
  flex-shrink: 0;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
/* スクロール枠＋下端フェード（6.5行くらいで切って「まだ下に在る」と分からせる） */
.nowlive-scrollwrap { position: relative; }
.nowlive-scroll {
  max-height: 324px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nowlive-scroll::-webkit-scrollbar { width: 8px; }
.nowlive-scroll::-webkit-scrollbar-thumb { background: #cfe6ff; border-radius: 4px; }
.nowlive-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.nowlive-list { display: flex; flex-direction: column; gap: 4px; }
.nowlive-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #f6fafd;              /* スケジュール表の .sg-card と同色 */
  border: 1px solid #eee;           /* 枠でホバー無しでも配信者の区切りを出す（.sg-card と同じ） */
  transition: background 0.12s;
}
.nowlive-row:hover { background: #dcefff; opacity: 1; }  /* ホバーでもう一段濃く */
.nowlive-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #cfe6ff;
  flex-shrink: 0;
}
.nowlive-rowmain { min-width: 0; flex: 1; }
.nowlive-rowname {
  display: block;
  font-weight: 700;
  color: #1f7dff;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.nowlive-rowname { text-decoration: none; }
a.nowlive-rowname:hover { text-decoration: underline; }

/* 配信者向けコマンドのコピーボタン（📣 /shoutout・🚀 /raid） */
.nowlive-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.nowlive-btn {
  border: 1px solid #cfe6ff;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.nowlive-btn:hover { background: #eaf6ff; }
.nowlive-btn.copied,
.nowlive-btn.is-open {
  background: #1f7dff;
  border-color: #1f7dff;
  color: #fff;
}

/* 📺 で出すサムネ。押した行の直下に重ねる（top は JS が設定）。1 枚だけ */
.nowlive-peek-pop {
  position: absolute;
  right: 0;
  z-index: 5;                       /* スケジュール表の sticky 見出し（z-index: 2）より上 */
  width: min(320px, 100%);
  padding: 4px;
  background: #fff;
  border: 1px solid #cfe6ff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.nowlive-peek-pop[hidden] { display: none; }
.nowlive-peek-pop img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;             /* 読み込み前から枠の大きさを確保 */
  border-radius: 7px;
  background: #cfe6ff;
}
.nowlive-peek-err { display: none; }
.nowlive-peek-pop.is-error img { display: none; }
.nowlive-peek-pop.is-error .nowlive-peek-err {
  display: block;
  padding: 16px 8px;
  font-size: 13px;
  color: #999;
  text-align: center;
}
.nowlive-rowtitle {
  display: block;
  font-size: 13px;
  color: #666;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nowlive-empty {
  margin: 0;
  padding: 4px 6px;
  font-size: 13px;
  color: #999;
}

.schedule-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* 5行（深夜/朝/昼/夜/未定）×3列（開催日）固定のCSS Grid。
   テーブルと違い列幅が中身（長いタイトル等）に引っ張られないので、
   3日分が常に横スクロール無しで収まる。 */
.schedule-grid {
  display: grid;
  grid-template-columns: 84px repeat(3, 1fr);
  background: white;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: clip;            /* hidden だとスクロールコンテナ扱いになり見出しの sticky が効かない */
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

/* 日付見出しは固定ナビの直下に貼り付く（--nav-h は schedule.html の JS が実測して設定） */
.sg-corner,
.sg-head {
  position: sticky;
  top: var(--nav-h, 0px);
  z-index: 2;
  background: #1f7dff;
  color: white;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 6px;
}

.sg-slot {
  background: #eaf3ff;
  color: #1f7dff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 12px 4px;
  border-top: 2px solid #cfe2f8;
}
/* 枠が縦に長いので、ラベルは日付見出しの下に貼り付いてスクロール中も見える */
.sg-slot-label {
  position: sticky;
  top: calc(var(--nav-h, 0px) + 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sg-cell {
  border-top: 2px solid #cfe2f8;   /* 時間帯の区切りをはっきりさせる */
  border-left: 1px solid #eee;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
  min-width: 0;              /* グリッド列が中身の最小幅で広がってはみ出すのを防ぐ */
}

.sg-card {
  display: flex;
  align-items: flex-start;   /* 複数タイトルで縦に伸びてもアイコンは上揃え */
  gap: 8px;
  padding: 6px 8px;
  background: #f6fafd;
  border-radius: 10px;
  border: 1px solid #eee;
  min-width: 0;
}

.sg-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #ddd;
}

.sg-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sg-streamer {
  font-size: 14px;
  font-weight: 700;
  color: #1f7dff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-icon-link { flex-shrink: 0; line-height: 0; }

/* 同じ配信者のタイトルは1枚のカードに縦並び */
.sg-games {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sg-game {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 2タイトル以上の時だけ行頭に点を付けて区切りを分かりやすく */
.sg-games:has(.sg-game + .sg-game) .sg-game::before {
  content: "・";
  color: #9bbbe0;
}

/* スケジュール表の下：配信日未定の参加者 */
.tbd-title {
  max-width: 1100px;
  margin: 28px auto 4px;
  padding: 0 4px;
  font-size: 15px;
  color: #1f7dff;
}
.tbd-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  align-items: start;        /* タイトル数の違うカードが同じ行で引き伸ばされないように */
}

/* モバイル用の日切替タブはデスクトップでは非表示 */
.schedule-tabs { display: none; }

@media (max-width: 640px) {
  /* モバイルは3日を横並びにせず、タブで1日ずつ表示（横スクロールを回避） */
  .schedule-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
  }
  .sched-tab {
    flex: 1;
    min-width: 0;
    padding: 9px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #1f7dff;
    background: #eaf3ff;
    border: 1px solid #cfe6ff;
    border-radius: 9px;
    cursor: pointer;
  }
  .sched-tab[aria-current="true"] {
    background: #1f7dff;
    color: #fff;
    border-color: #1f7dff;
  }

  /* ラベル1列＋その日の1列だけ。非表示セルはグリッドから外れて行が畳まれる */
  .schedule-grid { grid-template-columns: 56px 1fr; }
  .schedule-grid .sg-head[data-day],
  .schedule-grid .sg-cell[data-day] { display: none; }
  .schedule-grid.show-0 .sg-head[data-day="0"],
  .schedule-grid.show-1 .sg-head[data-day="1"],
  .schedule-grid.show-2 .sg-head[data-day="2"] { display: block; }
  .schedule-grid.show-0 .sg-cell[data-day="0"],
  .schedule-grid.show-1 .sg-cell[data-day="1"],
  .schedule-grid.show-2 .sg-cell[data-day="2"] { display: flex; }

  .sg-corner, .sg-head { font-size: 12px; padding: 8px 4px; }
  .sg-slot { font-size: 12px; padding: 8px 2px; }
  .sg-slot-label { top: calc(var(--nav-h, 0px) + 40px); }
  .sg-cell { padding: 6px; gap: 5px; }
  .sg-icon { width: 32px; height: 32px; }
  .sg-streamer { font-size: 13px; }
  .sg-game { font-size: 12px; }
  .tbd-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  #list {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .card {
    flex-direction: column;
  }
  .game-img {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nowlive-row { gap: 7px; }
  .nowlive-btn { padding: 4px 6px; }
}
