:root {
  color-scheme: light;
  --bench-bg: #eef3f8;
  --rail-bg: rgba(255, 255, 255, 0.88);
  --card-bg: rgba(255, 255, 255, 0.96);
  --text: #172033;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --brand: #2563eb;
  --brand-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 8%, rgba(96, 165, 250, 0.18), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(251, 191, 36, 0.16), transparent 24%),
    linear-gradient(135deg, #f8fbff 0%, var(--bench-bg) 100%);
}

.h5-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 32vw) 1fr;
  gap: 28px;
  padding: 24px;
}

.content-rail {
  min-width: 0;
  height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: var(--rail-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  scrollbar-gutter: stable;
}

.content-rail::-webkit-scrollbar {
  width: 10px;
}

.content-rail::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.32);
  background-clip: content-box;
}

.rail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.86));
  backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.group-list {
  display: grid;
  gap: 24px;
  padding: 22px;
}

.age-section {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.age-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 7px var(--brand-soft);
}

.section-heading h2 {
  font-size: 20px;
  line-height: 1.2;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.animation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.animation-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.cover-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
}

.cover-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 36px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.35;
}

.description {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.audience {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 700;
}

.blank-stage {
  position: relative;
  min-width: 0;
  height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(37, 99, 235, 0.08)),
    rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow);
}

.featured-stage {
  position: relative;
  display: flex;
  min-height: 100%;
  padding: clamp(18px, 3vw, 42px);
  align-items: flex-end;
  isolation: isolate;
}

.stage-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
  z-index: -2;
}

.stage-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,0.24), transparent 26%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.38) 48%, rgba(15, 23, 42, 0.72) 100%);
}

.stage-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.04);
}

.stage-copy {
  width: min(620px, 92%);
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.46));
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(18px);
}

.stage-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.24);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage-copy h2 {
  font-size: clamp(30px, 5.6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.stage-description {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.55;
}

.stage-intro {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.75;
}

.stage-audience,
.stage-source {
  display: inline-flex;
  margin-top: 16px;
  margin-right: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.stage-audience {
  color: #172033;
  background: rgba(254, 243, 199, 0.92);
}

.stage-source {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.shuffle-control {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.shuffle-control.is-expanded {
  align-items: stretch;
  border-radius: 22px;
  padding: 8px;
}

.shuffle-panel-toggle {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.shuffle-panel-toggle:hover {
  transform: translateY(-1px);
  background: #1e293b;
}

.shuffle-control-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shuffle-control-panel[hidden] {
  display: none;
}

.shuffle-toggle {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.shuffle-toggle:hover {
  transform: translateY(-1px);
}

.shuffle-toggle.is-active {
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
}

.shuffle-interval-label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(241, 245, 249, 0.92);
  font-size: 12px;
  font-weight: 800;
}

#shuffle-interval {
  width: 48px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

#shuffle-interval::-webkit-outer-spin-button,
#shuffle-interval::-webkit-inner-spin-button {
  margin: 0;
}

@media (max-width: 1180px) {
  .h5-shell {
    grid-template-columns: minmax(360px, 42vw) 1fr;
  }

  .animation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .h5-shell {
    min-height: 100vh;
    height: auto;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .content-rail,
  .blank-stage {
    height: auto;
  }

  .blank-stage {
    min-height: 62vh;
  }

  .featured-stage {
    min-height: 62vh;
    padding: 16px;
  }

  .stage-copy {
    width: 100%;
    border-radius: 22px;
  }

  .stage-copy h2 {
    font-size: clamp(30px, 12vw, 48px);
  }

  .shuffle-control {
    right: 14px;
    bottom: 14px;
  }
}
