.member-yearbook-page .main-container,
.yearbook-page,
.yearbook-hub {
  padding-top: 28px;
  padding-bottom: 120px;
}

.yearbook-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,116,182,.14), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(95,201,255,.12), transparent 30%),
    linear-gradient(180deg, rgba(20,19,32,.98), rgba(14,13,24,.98));
}

.yearbook-kicker {
  margin: 0 0 10px;
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-weight: 700;
}

.yearbook-title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.18;
}

.yearbook-copy {
  max-width: 60ch;
  color: var(--text-dim);
}

.yearbook-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.yearbook-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.yearbook-profile-card img {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
}

.yearbook-profile-card div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yearbook-profile-card span {
  color: var(--text-dim);
}

.yearbook-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.yearbook-switcher {
  margin-top: 18px;
  padding: 20px;
}

.yearbook-switcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.yearbook-switcher-title {
  margin: 0;
  font-size: 1.18rem;
}

.yearbook-switcher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.yearbook-member-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.yearbook-member-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--chip-accent, var(--oshi)) 18%, transparent), transparent 46%);
  color: var(--text-primary);
  scroll-snap-align: start;
}

.yearbook-member-chip img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.yearbook-member-chip span {
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
}

.yearbook-member-chip.is-current {
  border-color: color-mix(in srgb, var(--oshi-color, var(--oshi)) 58%, rgba(255,255,255,.12));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--oshi-color, var(--oshi)) 20%, rgba(255,255,255,.06)), rgba(255,255,255,.05)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--oshi-color, var(--oshi)) 28%, transparent), transparent 42%);
  box-shadow: 0 14px 30px rgba(8,10,18,.18);
}

.yearbook-stat-card,
.yearbook-link-card,
.yearbook-song-card,
.yearbook-member-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

.yearbook-stat-card {
  padding: 16px;
}

.yearbook-stat-card span {
  display: block;
  color: var(--text-muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.yearbook-stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.32rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.yearbook-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.yearbook-panel {
  padding: 20px;
}

.yearbook-panel-head {
  margin-bottom: 14px;
}

.yearbook-panel-head h2 {
  margin: 0;
  font-size: 1.18rem;
}

.yearbook-feature-link,
.yearbook-song-card,
.yearbook-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yearbook-feature-link {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}

.yearbook-feature-link span,
.yearbook-song-card span,
.yearbook-member-card span,
.yearbook-member-card strong,
.yearbook-link-card {
  color: var(--text-dim);
}

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

.yearbook-song-card {
  padding: 14px;
}

.yearbook-song-card strong,
.yearbook-feature-link strong,
.yearbook-member-card strong {
  color: var(--text-primary);
}

.yearbook-song-kicker {
  color: var(--oshi-color, var(--oshi));
  font-size: .82rem;
  font-weight: 700;
}

.yearbook-month-table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--oshi-color, var(--oshi)) 14%, transparent), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.yearbook-month-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

.yearbook-month-table thead th {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
  background: rgba(255,255,255,.03);
  position: sticky;
  top: 0;
  z-index: 1;
}

.yearbook-month-table thead th {
  color: var(--text-muted);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.yearbook-month-table tbody tr:nth-child(odd) {
  background: rgba(255,255,255,.015);
}

.yearbook-month-table tbody tr:hover {
  background: rgba(255,255,255,.04);
}

.yearbook-month-table tbody th,
.yearbook-month-table tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

.yearbook-month-table tbody tr:last-child th,
.yearbook-month-table tbody tr:last-child td {
  border-bottom: 0;
}

.yearbook-month-rowhead {
  min-width: 132px;
}

.yearbook-month-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--oshi-color, var(--oshi)) 22%, rgba(255,255,255,.06));
  border: 1px solid color-mix(in srgb, var(--oshi-color, var(--oshi)) 40%, rgba(255,255,255,.08));
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.yearbook-month-key {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: .76rem;
  letter-spacing: .06em;
}

.yearbook-month-value {
  text-align: right;
}

.yearbook-month-number {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  white-space: nowrap;
}

.yearbook-month-value.is-money .yearbook-month-number {
  color: color-mix(in srgb, var(--oshi-color, var(--oshi)) 64%, #ffffff);
}

.yearbook-link-grid,
.yearbook-member-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.yearbook-link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yearbook-link-card {
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}

.yearbook-member-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yearbook-member-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--card-accent, var(--oshi)) 22%, transparent), transparent 45%);
}

.yearbook-member-card img {
  aspect-ratio: 1/1;
  border-radius: 16px;
  object-fit: cover;
}

.yearbook-member-card-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yearbook-member-card-link {
  color: var(--oshi-color, var(--oshi));
  font-size: .86rem;
}

html[data-theme="light_apple"] .yearbook-hero,
html[data-theme="light"] .yearbook-hero,
html[data-theme="light_apple"] .yearbook-switcher,
html[data-theme="light"] .yearbook-switcher,
html[data-theme="light_apple"] .yearbook-stat-card,
html[data-theme="light"] .yearbook-stat-card,
html[data-theme="light_apple"] .yearbook-panel,
html[data-theme="light"] .yearbook-panel,
html[data-theme="light_apple"] .yearbook-link-card,
html[data-theme="light"] .yearbook-link-card,
html[data-theme="light_apple"] .yearbook-song-card,
html[data-theme="light"] .yearbook-song-card,
html[data-theme="light_apple"] .yearbook-member-card,
html[data-theme="light"] .yearbook-member-card,
html[data-theme="light_apple"] .yearbook-profile-card,
html[data-theme="light"] .yearbook-profile-card,
html[data-theme="light_apple"] .yearbook-feature-link,
html[data-theme="light"] .yearbook-feature-link {
  background: rgba(255,255,255,.92);
  border-color: rgba(60,86,130,.12);
  box-shadow: 0 14px 36px rgba(31,41,55,.08);
}

html[data-theme="light_apple"] .yearbook-title,
html[data-theme="light"] .yearbook-title,
html[data-theme="light_apple"] .yearbook-switcher-title,
html[data-theme="light"] .yearbook-switcher-title,
html[data-theme="light_apple"] .yearbook-panel-head h2,
html[data-theme="light"] .yearbook-panel-head h2,
html[data-theme="light_apple"] .yearbook-song-card strong,
html[data-theme="light"] .yearbook-song-card strong,
html[data-theme="light_apple"] .yearbook-feature-link strong,
html[data-theme="light"] .yearbook-feature-link strong,
html[data-theme="light_apple"] .yearbook-member-card strong,
html[data-theme="light"] .yearbook-member-card strong,
html[data-theme="light_apple"] .yearbook-stat-card strong,
html[data-theme="light"] .yearbook-stat-card strong {
  color: #172033;
}

html[data-theme="light_apple"] .yearbook-copy,
html[data-theme="light_apple"] .yearbook-profile-card span,
html[data-theme="light_apple"] .yearbook-stat-card span,
html[data-theme="light_apple"] .yearbook-feature-link span,
html[data-theme="light_apple"] .yearbook-song-card span,
html[data-theme="light_apple"] .yearbook-member-card span,
html[data-theme="light_apple"] .yearbook-link-card,
html[data-theme="light"] .yearbook-copy,
html[data-theme="light"] .yearbook-profile-card span,
html[data-theme="light"] .yearbook-stat-card span,
html[data-theme="light"] .yearbook-feature-link span,
html[data-theme="light"] .yearbook-song-card span,
html[data-theme="light"] .yearbook-member-card span,
html[data-theme="light"] .yearbook-link-card {
  color: #556179;
}

html[data-theme="light_apple"] .yearbook-month-table-wrap,
html[data-theme="light"] .yearbook-month-table-wrap {
  border-color: rgba(60,86,130,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,249,255,.96)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--oshi-color, var(--oshi)) 10%, transparent), transparent 42%);
  box-shadow: 0 18px 40px rgba(28,39,60,.08);
}

html[data-theme="light_apple"] .yearbook-month-table thead th,
html[data-theme="light"] .yearbook-month-table thead th {
  background: rgba(241,246,255,.95);
  border-bottom-color: rgba(60,86,130,.12);
  color: #6a7690;
}

html[data-theme="light_apple"] .yearbook-month-table tbody tr:nth-child(odd),
html[data-theme="light"] .yearbook-month-table tbody tr:nth-child(odd) {
  background: rgba(241,246,255,.44);
}

html[data-theme="light_apple"] .yearbook-month-table tbody tr:hover,
html[data-theme="light"] .yearbook-month-table tbody tr:hover {
  background: rgba(228,238,255,.72);
}

html[data-theme="light_apple"] .yearbook-month-table tbody th,
html[data-theme="light_apple"] .yearbook-month-table tbody td,
html[data-theme="light"] .yearbook-month-table tbody th,
html[data-theme="light"] .yearbook-month-table tbody td {
  border-bottom-color: rgba(60,86,130,.1);
}

html[data-theme="light_apple"] .yearbook-month-badge,
html[data-theme="light"] .yearbook-month-badge {
  color: #172033;
}

html[data-theme="light_apple"] .yearbook-month-key,
html[data-theme="light"] .yearbook-month-key {
  color: #6f7c95;
}

html[data-theme="light_apple"] .yearbook-month-number,
html[data-theme="light"] .yearbook-month-number {
  color: #172033;
}

html[data-theme="light_apple"] .yearbook-member-chip,
html[data-theme="light"] .yearbook-member-chip {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.94)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--chip-accent, var(--oshi)) 10%, transparent), transparent 46%);
  border-color: rgba(60,86,130,.12);
  box-shadow: 0 10px 24px rgba(31,41,55,.08);
}

html[data-theme="light_apple"] .yearbook-member-chip span,
html[data-theme="light"] .yearbook-member-chip span {
  color: #172033;
}

html[data-theme="light_apple"] .yearbook-member-chip.is-current,
html[data-theme="light"] .yearbook-member-chip.is-current {
  border-color: color-mix(in srgb, var(--oshi-color, var(--oshi)) 46%, rgba(60,86,130,.16));
  box-shadow: 0 14px 30px rgba(31,41,55,.12);
}

@media (max-width: 980px) {
  .yearbook-switcher-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .yearbook-switcher-actions {
    justify-content: flex-start;
  }
}

html[data-theme="light_apple"] .yearbook-month-value.is-money .yearbook-month-number,
html[data-theme="light"] .yearbook-month-value.is-money .yearbook-month-number {
  color: color-mix(in srgb, var(--oshi-color, var(--oshi)) 70%, #1f2a44);
}

@media (max-width: 1040px) {
  .yearbook-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .yearbook-hero,
  .yearbook-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .yearbook-page,
  .yearbook-hub {
    padding-top: 18px;
    padding-bottom: 132px;
  }

  .yearbook-stat-grid,
  .yearbook-song-grid,
  .yearbook-member-grid,
  .yearbook-link-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yearbook-month-table-wrap {
    overflow: visible;
    border-radius: 18px;
    padding: 10px;
  }

  .yearbook-month-table,
  .yearbook-month-table thead,
  .yearbook-month-table tbody,
  .yearbook-month-table tr,
  .yearbook-month-table th,
  .yearbook-month-table td {
    display: block;
    width: 100%;
  }

  .yearbook-month-table thead {
    display: none;
  }

  .yearbook-month-table tbody {
    display: grid;
    gap: 10px;
  }

  .yearbook-month-table tbody tr {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255,255,255,.035);
  }

  .yearbook-month-table tbody th,
  .yearbook-month-table tbody td {
    border: 0;
    padding: 0;
  }

  .yearbook-month-rowhead {
    margin-bottom: 12px;
  }

  .yearbook-month-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
  }

  .yearbook-month-value::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  html[data-theme="light_apple"] .yearbook-month-table tbody tr,
  html[data-theme="light"] .yearbook-month-table tbody tr {
    border-color: rgba(60,86,130,.12);
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 26px rgba(28,39,60,.07);
  }
}
