.archive-page {
  --archive-header-offset: 68px;
  --archive-tools-offset: calc(var(--archive-header-offset) + 14px);
  --archive-speaker-offset: calc(var(--archive-header-offset) + 126px);
  background: var(--bg);
}

.archive-hero {
  position: relative;
  padding: clamp(56px, 9vw, 96px) 20px 32px;
  background: var(--dark-bg);
  color: var(--dark-ink);
  isolation: isolate;
  overflow: hidden;
}

.archive-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(91, 107, 255, 0.4), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 90, 138, 0.28), transparent 50%),
    linear-gradient(160deg, var(--dark-bg-2) 0%, var(--dark-bg) 60%, #060418 100%);
}

.archive-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("../img/ttvr-stage-hero.png");
  background-position: center;
  background-size: cover;
  opacity: 0.22;
  mix-blend-mode: screen;
}

.archive-hero.compact {
  padding-bottom: clamp(56px, 9vw, 96px);
}

.archive-hero h1 {
  max-width: 14ch;
  margin: 0 0 16px;
  color: var(--dark-ink);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.15;
  font-weight: 800;
}

.archive-hero p {
  max-width: 64ch;
  color: var(--dark-muted);
}

.archive-hero .label {
  color: var(--gold);
  background: rgba(255, 200, 69, 0.16);
}

.archive-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 28px 0 0;
}

.archive-stats div {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
}

.archive-panel,
.archive-tools {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.archive-stats dt {
  color: var(--dark-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.archive-stats dd {
  margin: 2px 0 0;
  color: var(--dark-ink);
  font-size: 1.6rem;
  font-weight: 800;
}

.archive-tools {
  position: sticky;
  top: var(--archive-tools-offset);
  z-index: 8;
  display: grid;
  gap: 14px;
  margin: 0 20px 24px;
  padding: 16px;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.archive-tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.archive-tools input,
.archive-tools select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.archive-layout {
  display: grid;
  gap: 20px;
  padding: 0 20px clamp(64px, 9vw, 104px);
}

.archive-panel {
  min-width: 0;
  padding: 18px;
}

.archive-panel h2 {
  max-width: none;
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.speaker-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.speaker-list-head h2 {
  margin: 0;
}

.report-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(180, 35, 24, 0.3);
  border-radius: 999px;
  background: rgba(255, 232, 230, 0.9);
  color: #b42318;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.report-cta:hover,
.report-cta:focus-visible {
  background: rgba(255, 211, 207, 0.95);
  border-color: rgba(180, 35, 24, 0.55);
  outline: none;
}

.report-cta span[aria-hidden="true"] {
  font-size: 0.9rem;
}

.report-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(14, 10, 36, 0.25);
}

.report-dialog::backdrop {
  background: rgba(14, 10, 36, 0.55);
  backdrop-filter: blur(2px);
}

.report-dialog .global-correction {
  margin: 0;
  padding: 22px 22px 20px;
}

.report-dialog h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.report-dialog-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.dialog-actions .button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.dialog-actions .button.ghost:hover {
  background: var(--bg-soft);
}

.speaker-list {
  display: grid;
  gap: 8px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
}

.speaker-card {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.speaker-card:hover {
  transform: translateX(4px);
  border-color: var(--primary);
  background: rgba(91, 107, 255, 0.04);
  box-shadow: 0 4px 12px rgba(91, 107, 255, 0.05);
}

.speaker-card.active {
  border-color: var(--primary);
  background: rgba(91, 107, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--primary);
}

.speaker-card strong {
  font-size: 0.98rem;
}

.speaker-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.speaker-detail.empty {
  min-height: 280px;
  display: grid;
  align-content: center;
}

@keyframes speakerFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.speaker-detail-animate {
  animation: speakerFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

@keyframes talkCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.talk-card-animate {
  opacity: 0;
  animation: talkCardFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.speaker-head {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.speaker-head h1,
.speaker-head h2 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.speaker-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.speaker-links a,
.talk-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(91, 107, 255, 0.08);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(91, 107, 255, 0.15);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.speaker-links a:hover,
.talk-links a:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(91, 107, 255, 0.25);
}

.speaker-links a .btn-icon,
.talk-links a .btn-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.speaker-links a:hover .btn-icon,
.talk-links a:hover .btn-icon {
  transform: scale(1.15);
}

.youtube-section {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.youtube-section h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.youtube-section h2 span {
  color: var(--muted);
  font-size: 0.82rem;
}


.youtube-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.youtube-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.youtube-list a::after {
  content: "→";
  color: var(--primary);
  font-weight: 800;
  transition: transform 0.2s ease;
}

.youtube-list a:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: rgba(91, 107, 255, 0.03);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(91, 107, 255, 0.06);
}

.youtube-list a:hover::after {
  transform: translateX(4px);
}

.correction-box {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.correction-box h2 {
  max-width: none;
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.correction-form {
  display: grid;
  gap: 12px;
}

.correction-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.correction-form input,
.correction-form select,
.correction-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.correction-form textarea {
  resize: vertical;
}

.correction-form .button {
  justify-self: start;
}

.correction-form .button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.correction-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.correction-status.success {
  color: #0f7b43;
}

.correction-status.error {
  color: #b42318;
}

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

@media (max-width: 900px) {
  .talk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .talk-list {
    grid-template-columns: 1fr;
  }
}

.talk-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.talk-card h3 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 1.02rem;
}

.talk-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.talk-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.talk-thumb {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 12px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e0a24;
  text-decoration: none;
}

.talk-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.talk-thumb:hover img,
.talk-thumb:focus-visible img {
  transform: scale(1.03);
  opacity: 0.92;
}

.talk-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0;
  pointer-events: none;
}

.talk-thumb-play::before {
  content: "▶";
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding-left: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s ease, box-shadow 0.25s ease;
}

.talk-thumb:hover .talk-thumb-play::before,
.talk-thumb:focus-visible .talk-thumb-play::before {
  transform: scale(1.15);
  background: rgba(229, 9, 20, 0.95);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
}

.review-note {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(255, 200, 69, 0.5);
  border-radius: 8px;
  background: rgba(255, 200, 69, 0.14);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (min-width: 760px) {
  .archive-tools,
  .archive-layout {
    margin-left: clamp(28px, 5vw, 76px);
    margin-right: clamp(28px, 5vw, 76px);
    padding-left: 0;
    padding-right: 0;
  }

  .archive-hero {
    padding-left: clamp(28px, 5vw, 76px);
    padding-right: clamp(28px, 5vw, 76px);
  }

  .archive-tools {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .archive-layout > .archive-panel:first-child {
    position: sticky;
    top: var(--archive-speaker-offset);
    max-height: calc(100svh - var(--archive-speaker-offset) - 24px);
    overflow: hidden;
  }

  .archive-layout > .archive-panel:first-child .speaker-list {
    max-height: calc(100svh - var(--archive-speaker-offset) - 96px);
  }

  .archive-layout {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    align-items: start;
  }

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

/* ---------- Speaker Page Dark Glassmorphism Styling ---------- */
.speaker-page .speaker-head h1 {
  color: var(--dark-ink);
}
.speaker-page .speaker-head p {
  color: var(--dark-muted);
}
.speaker-page .talk-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--dark-ink);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.speaker-page .talk-card h3 {
  color: var(--dark-ink);
}
.speaker-page .talk-meta {
  color: var(--dark-muted);
}
.speaker-page .talk-links a {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  border-color: rgba(255, 255, 255, 0.15);
}
.speaker-page .talk-links a:hover {
  background: var(--gold);
  color: var(--dark-bg);
  border-color: var(--gold);
  box-shadow: 0 6px 16px rgba(255, 200, 69, 0.25);
}
.speaker-page .youtube-section {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}
.speaker-page .youtube-section h2 {
  color: var(--dark-ink);
}
.speaker-page .youtube-section h2 span {
  color: var(--dark-muted);
}
.speaker-page .youtube-list a {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--dark-ink);
}
.speaker-page .youtube-list a::after {
  color: var(--gold);
}
.speaker-page .youtube-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 4px 12px rgba(255, 200, 69, 0.08);
}
