/* Robust3R — Nerfies/CUT3R/TTT3R-style academic project page */

:root {
  --blue: #3273dc;
  --blue-dark: #235db2;
  --blue-soft: #eef5ff;
  --text: #222;
  --muted: #666;
  --border: #dbdbdb;
  --light: #f5f5f5;
  --white: #fff;
  --max-desktop: 960px;
  --max-wide: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #fff;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img, video {
  display: block;
  max-width: 100%;
}

button, a { font: inherit; }

.container {
  width: min(calc(100% - 32px), var(--max-wide));
  margin: 0 auto;
}

.container.is-max-desktop {
  width: min(calc(100% - 32px), var(--max-desktop));
}

.container.is-max-widescreen {
  width: min(calc(100% - 32px), var(--max-wide));
}

.section {
  padding: 3rem 1rem;
}

.section[id] {
  scroll-margin-top: 3.4rem;
}

.hero {
  display: block;
}

.hero-body {
  padding: 3.6rem 1rem 1.5rem;
}

.paper-header {
  text-align: center;
}

.title-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 1050px;
  margin: 0 auto;
}

.project-icon {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
}

.publication-title {
  margin: 0;
  font-size: clamp(2.05rem, 5vw, 3.45rem);
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.robust-word {
  color: var(--blue);
}

.publication-authors {
  margin-top: 1.45rem;
  color: var(--blue);
  font-size: 1.22rem;
}

.author-block {
  display: inline-block;
  margin: 0;
}

.author-block a {
  color: inherit;
  text-decoration: none;
}

.author-block a:hover,
.author-block a:focus-visible {
  color: var(--blue-dark);
  text-decoration: underline;
}

.author-separator {
  display: inline-block;
  margin: 0 0.32rem;
  color: #8aa8d8;
}

.publication-affiliations {
  margin-top: 0.35rem;
  color: #444;
  font-size: 0.98rem;
}

.publication-venue {
  margin-top: 0.8rem;
  font-size: 1.22rem;
  font-weight: 650;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.paper-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0.45rem 0.95rem;
  color: #fff;
  background: #363636;
  border: 1px solid #363636;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 650;
  transition: background 120ms ease, transform 120ms ease;
}

.paper-button:hover {
  background: #111;
  transform: translateY(-1px);
}

.paper-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paper-button.disabled {
  opacity: 0.52;
  pointer-events: none;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.section-nav-inner {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  width: min(calc(100% - 32px), var(--max-wide));
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
}

.section-nav a {
  display: block;
  padding: 0.68rem 0;
  color: #555;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--blue);
}

.tldr {
  max-width: 850px;
  margin: 1.45rem auto 0;
  font-size: 1.03rem;
}

/* Animated method teaser */
.method-teaser {
  max-width: 1000px;
  margin: 2rem auto 0;
}

.method-teaser-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 5.5;
  border: 1px solid #d7e0ed;
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 84%, rgba(50, 115, 220, 0.13), transparent 27%),
    radial-gradient(circle at 82% 18%, rgba(101, 204, 125, 0.16), transparent 28%),
    #f9fbfe;
  box-shadow: 0 12px 28px rgba(37, 72, 122, 0.1);
}

.method-teaser figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.teaser-heading {
  position: absolute;
  z-index: 4;
  top: 8%;
  left: 50%;
  width: 88%;
  transform: translateX(-50%);
  color: #26394f;
  font-size: clamp(0.85rem, 1.65vw, 1.25rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.teaser-heading span { color: var(--blue); }

.teaser-inputs,
.teaser-result {
  position: absolute;
}

.teaser-inputs {
  display: flex;
  z-index: 1;
  top: 36%;
  left: 5%;
  width: 49%;
  justify-content: space-between;
  gap: 0.45rem;
}

.teaser-input-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 22%;
  aspect-ratio: 1 / 0.88;
  overflow: hidden;
  border: 1px solid #ccd8e8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 15px rgba(39, 77, 126, 0.12);
  animation: teaser-card-enter 5s ease-in-out infinite;
}

.teaser-input-card:nth-child(2) { animation-delay: 0.2s; }
.teaser-input-card:nth-child(3) { animation-delay: 0.4s; }
.teaser-input-card:nth-child(5) { animation-delay: 0.6s; }
.teaser-input-card--last { margin-left: clamp(0.25rem, 0.7vw, 0.55rem); }

.teaser-stream-gap {
  align-self: center;
  flex: 0 0 auto;
  margin: 0 clamp(0.08rem, 0.35vw, 0.3rem);
  color: #59789b;
  font-size: clamp(0.85rem, 1.45vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.teaser-input-card::before {
  position: absolute;
  z-index: 2;
  top: 0.28rem;
  left: 0.28rem;
  padding: 0.12rem 0.25rem;
  color: #315f98;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  content: "Frame " attr(data-frame);
  font-size: clamp(0.45rem, 0.65vw, 0.56rem);
  font-weight: 700;
  line-height: 1.1;
}

.teaser-input-card--rgb > img,
.teaser-input-pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser-input-card--rgb > img { object-position: 28% 50%; }

.teaser-input-card span,
.teaser-result span {
  position: absolute;
  right: 0.38rem;
  bottom: 0.36rem;
  left: 0.38rem;
  padding: 0.16rem 0.34rem;
  color: #fff;
  background: rgba(15, 24, 36, 0.8);
  border-radius: 3px;
  font-size: clamp(0.55rem, 0.85vw, 0.7rem);
  font-weight: 700;
  line-height: 1.2;
}

.teaser-input-pair {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teaser-input-pair > * + * { border-left: 1px solid rgba(255, 255, 255, 0.72); }

.teaser-depth-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser-input-pair .teaser-depth-map { position: static; }

.teaser-camera-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #f2f7ff, #e4edf9);
}

.teaser-camera-icon svg {
  width: 84%;
  height: auto;
  fill: none;
  filter: drop-shadow(0 1px 1px rgba(51, 69, 95, 0.25));
  stroke: #5f82b8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  animation: teaser-camera-jitter 0.8s steps(2, end) infinite;
}

.teaser-camera-icon .teaser-noise { stroke: #d99437; stroke-width: 3; }

.teaser-core {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  top: 27%;
  left: 59%;
  width: 14%;
  aspect-ratio: 1;
  padding: 0.55rem;
  color: #24456c;
  border: 2px solid #7593d0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(66, 93, 145, 0.15);
  animation: teaser-core-pulse 5s ease-in-out infinite;
}

.teaser-core img {
  width: 26%;
  height: auto;
}

.teaser-core strong {
  color: var(--blue);
  font-size: clamp(0.7rem, 1.1vw, 0.9rem);
}

.teaser-core small {
  color: #68798c;
  font-size: clamp(0.48rem, 0.65vw, 0.61rem);
  font-weight: 650;
  line-height: 1.15;
}

.teaser-flow {
  position: absolute;
  z-index: 0;
  top: 17%;
  left: 5%;
  width: 91%;
  height: 72%;
  overflow: visible;
  fill: none;
  stroke: #5d7796;
  stroke-linecap: round;
  stroke-width: 2.4;
}

.teaser-flow > path {
  stroke-dasharray: 9 10;
  animation: teaser-flow 1.5s linear infinite;
}

.teaser-result {
  z-index: 1;
  top: 16%;
  right: 5%;
  width: 20%;
  height: 70%;
  overflow: hidden;
  border: 1px solid #d3deec;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(28, 58, 99, 0.15);
}

.teaser-result video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes teaser-card-enter {
  0%, 12% { transform: translateY(5%) scale(0.97); opacity: 0.5; }
  24%, 78% { transform: translateY(0) scale(1); opacity: 1; }
  90%, 100% { transform: translate(7%, 5%) scale(0.97); opacity: 0.5; }
}

@keyframes teaser-core-pulse {
  0%, 22%, 100% { transform: scale(0.92); box-shadow: 0 8px 18px rgba(66, 93, 145, 0.1); }
  36%, 82% { transform: scale(1); box-shadow: 0 10px 24px rgba(50, 115, 220, 0.24); }
}

@keyframes teaser-flow {
  to { stroke-dashoffset: -76; }
}

@keyframes teaser-camera-jitter {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(3px, -2px) rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .teaser-input-card,
  .teaser-core,
  .teaser-flow > path,
  .teaser-camera-icon svg { animation: none; }
}

.headline-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.8rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.headline-result {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem 1.1rem;
}

.headline-result + .headline-result {
  border-left: 1px solid var(--border);
}

.headline-number {
  color: var(--blue);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.headline-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.3;
}

.headline-copy strong {
  font-size: 0.93rem;
}

.headline-copy span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.abstract-section,
.quantitative-section,
.bibtex-section {
  background: var(--light);
}

.title {
  margin: 0 0 1.5rem;
  line-height: 1.2;
}

.title.is-3 {
  font-size: 2rem;
  font-weight: 500;
}

.title.is-4 {
  font-size: 1.5rem;
  font-weight: 500;
}

.has-text-centered { text-align: center; }
.has-text-justified { text-align: justify; }

.content {
  color: #333;
  font-size: 1rem;
}

.content p {
  margin: 0 0 1rem;
}

.section-intro,
.result-description {
  max-width: 760px;
  margin: -0.7rem auto 1.6rem;
  color: var(--muted);
}

.tabs {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow-x: auto;
  white-space: nowrap;
}

.task-tabs {
  margin: 0 auto 2rem;
  border-bottom: 1px solid var(--border);
}

.tab-button {
  appearance: none;
  margin-bottom: -1px;
  padding: 0.72rem 1.05rem;
  color: #4a4a4a;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.tab-button:hover {
  color: var(--blue);
  border-bottom-color: #b5c8e8;
}

.tab-button.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.task-panel {
  display: none;
}

.task-panel.is-active {
  display: block;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.25rem auto 1.4rem;
}

.centered-controls {
  justify-content: center;
}

.control-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.control-label {
  margin-right: 0.18rem;
  color: #555;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.choice-button,
.sync-button {
  appearance: none;
  padding: 0.43rem 0.8rem;
  color: #444;
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.choice-button:hover,
.sync-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.choice-button.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.sync-button {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #a8c1e8;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.comparison-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 850px;
  margin: 0 auto;
}

.comparison-item {
  min-width: 0;
  margin: 0;
}

.video-shell {
  overflow: hidden;
  background: #111;
  border: 1px solid #d2d2d2;
  border-radius: 4px;
}

.comparison-item.emphasized .video-shell {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.video-shell video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #111;
}

.comparison-item figcaption {
  padding-top: 0.5rem;
  text-align: center;
  font-weight: 650;
}

.comparison-item.emphasized figcaption {
  color: var(--blue-dark);
}

.modality-strip {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.35rem 0.8rem;
  align-items: center;
  max-width: 790px;
  margin: 1.5rem auto 0;
  font-size: 0.82rem;
}

.modality-label {
  color: #555;
  font-weight: 700;
}

.timeline {
  height: 13px;
  border: 1px solid #aaa;
  border-radius: 2px;
  background-size: 40px 100%;
}

.timeline.rgb-only {
  background: var(--blue);
}

.timeline.middle50 {
  background:
    linear-gradient(to right,
      var(--blue) 0%,
      var(--blue) 25%,
      #fff 25%,
      #fff 75%,
      var(--blue) 75%,
      var(--blue) 100%);
}

.timeline.alternating {
  background:
    repeating-linear-gradient(to right,
      var(--blue) 0,
      var(--blue) 40px,
      #fff 40px,
      #fff 80px);
}

.timeline.depth-full {
  background: var(--blue);
}

.timeline.depth-empty {
  background: #fff;
}

.paper-figure {
  margin: 0 auto 2.5rem;
}

.paper-figure img {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  max-width: none;
}

.plot-figure {
  width: 100%;
  max-width: 1300px;
}

@media (max-width: 1080px) {
  .plot-figure {
    max-width: 100%;
  }
}

.paper-figure figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.method-figure img {
  border: 0;
}

.bibtex-box {
  position: relative;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.bibtex-box pre {
  margin: 0;
  padding: 1.2rem 1.3rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
}

.copy-bibtex {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.3rem 0.65rem;
  color: #444;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
}

.footer {
  padding: 2.4rem 1rem;
  background: #fafafa;
  border-top: 1px solid var(--border);
}

.footer-content {
  color: var(--muted);
  text-align: center;
  font-size: 0.83rem;
}

.footer-content p {
  margin: 0.2rem 0;
}

@media (max-width: 820px) {
  .title-lockup {
    flex-direction: column;
  }

  .project-icon {
    width: 70px;
    height: 70px;
  }

  .headline-results {
    grid-template-columns: 1fr;
  }

  .headline-result + .headline-result {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .comparison-grid.two-up {
    grid-template-columns: 1fr;
  }

  .video-shell video {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .hero-body {
    padding-top: 2.2rem;
  }

  .section {
    padding: 2.4rem 0.75rem;
  }

  .publication-title {
    font-size: 2rem;
  }

  .task-tabs {
    justify-content: flex-start;
  }

  .section-nav-inner {
    justify-content: flex-start;
    gap: 1rem;
  }

  .tab-button {
    font-size: 0.9rem;
    padding-inline: 0.75rem;
  }

  .control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .control-group {
    justify-content: center;
  }

  .sync-button {
    align-self: center;
  }

  .has-text-justified {
    text-align: left;
  }
}

/* Quantitative HTML tables */
.quant-table-block {
  margin: -0.7rem auto 3.2rem;
  max-width: 900px;
}

.quant-table-block .title {
  margin-bottom: 0.55rem;
}

.table-intro {
  max-width: 760px;
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-scroll {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  -webkit-overflow-scrolling: touch;
}

.results-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: #2b2b2b;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.results-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.results-table th,
.results-table td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid #e6e6e6;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.results-table thead th {
  background: #f3f3f3;
  color: #333;
  font-weight: 700;
}

.results-table th:first-child,
.results-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
}

.results-table thead th:first-child {
  z-index: 2;
  background: #f3f3f3;
}

.results-table tbody th:first-child {
  background: #fff;
}

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

.results-table tbody tr:hover th,
.results-table tbody tr:hover td {
  background: #fafcff;
}

.results-table tbody tr:hover th:first-child {
  background: #fafcff;
}

.results-table .ours-row th,
.results-table .ours-row td {
  background: var(--blue-soft);
  font-weight: 650;
}

.results-table .ours-row th:first-child {
  background: var(--blue-soft);
}

.results-table .best-cell {
  font-weight: 750;
}

.ours-tag {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.08rem 0.35rem;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: 0.08rem;
}

.degradation {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.76rem;
  font-weight: 500;
}

.degradation.stable { color: #337347; }
.degradation.warning { color: #8a6419; }
.degradation.severe { color: #a43c3c; }

.table-note {
  max-width: 800px;
  margin: 0.65rem auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.protocol-link {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

@media (max-width: 720px) {
  .results-table {
    min-width: 640px;
    font-size: 0.86rem;
  }

  .results-table th,
  .results-table td {
    padding: 0.68rem 0.65rem;
  }

  .degradation {
    font-size: 0.7rem;
  }
}

.results-table .reference-row th,
.results-table .reference-row td {
  background: #fafafa;
}

.results-table .reference-row th:first-child {
  background: #fafafa;
}

.reference-tag {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.08rem 0.35rem;
  color: #555;
  background: #ececec;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: 0.08rem;
}

.not-applicable {
  color: #999;
}

/* Paired RGB-only and multimodal reconstruction gallery */
.fusion-gallery-section {
  background: #f7f9fc;
}

.fusion-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 980px;
  margin: 1.25rem auto 0.7rem;
}

.fusion-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.fusion-legend {
  color: #46617d;
  font-size: 0.82rem;
  font-weight: 700;
}

.fusion-legend-dot {
  display: inline-block;
  width: 0.56rem;
  height: 0.56rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--blue);
}

.fusion-gallery {
  display: grid;
  gap: 1.15rem;
  max-width: 980px;
  margin: 0 auto;
}

.fusion-card {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.fusion-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #d8d8d8;
}

.fusion-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #111;
}

.fusion-media--enhanced {
  box-shadow: inset 3px 0 0 var(--blue);
}

.fusion-media video {
  display: block;
  width: 100%;
  height: clamp(180px, 27vw, 330px);
  object-fit: contain;
  background: #111;
}

.fusion-card figcaption {
  padding: 0.65rem 0.8rem 0.72rem;
  color: #444;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 650;
}

/* Method-only reconstruction gallery */
.reconstruction-gallery-section {
  background: #fff;
}

.reconstruction-gallery-toolbar {
  display: flex;
  justify-content: center;
  margin: 1.25rem auto 0.7rem;
}

.reconstruction-gallery {
  display: grid;
  gap: 1.15rem;
  max-width: 980px;
  margin: 0 auto;
}

.reconstruction-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.reconstruction-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: 1px;
  background: #d8d8d8;
}

.reconstruction-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #111;
}

.reconstruction-media img,
.reconstruction-media video {
  display: block;
  width: 100%;
  height: clamp(190px, 22vw, 280px);
}

.input-media img {
  object-fit: cover;
}

.video-media video {
  object-fit: contain;
  background: #111;
}

.media-label {
  position: absolute;
  left: 0.55rem;
  bottom: 0.5rem;
  padding: 0.18rem 0.45rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
}

.reconstruction-card figcaption {
  padding: 0.65rem 0.8rem 0.72rem;
  color: #444;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 650;
}

@media (max-width: 640px) {
  .method-teaser-stage {
    aspect-ratio: 1 / 1.14;
  }

  .teaser-heading {
    top: 5.5%;
    width: 94%;
    font-size: clamp(0.72rem, 3.65vw, 0.94rem);
  }

  .teaser-inputs {
    top: 19%;
    left: 6%;
    width: 88%;
    gap: 0.1rem;
  }

  .teaser-input-card {
    width: 20%;
  }

  .teaser-input-card--last { margin-left: 0; }

  .teaser-stream-gap {
    margin: 0;
    font-size: 1rem;
  }

  .teaser-inputs::after {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 45%;
    color: #59789b;
    content: "↓";
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
  }

  .teaser-flow { display: none; }

  .teaser-core {
    top: 58%;
    left: 10%;
    width: 28%;
  }

  .teaser-core::after {
    position: absolute;
    top: 50%;
    right: -2.25rem;
    color: #59789b;
    content: "→";
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
  }

  .teaser-result {
    top: 48%;
    right: 6%;
    width: 43%;
    height: 45%;
  }

  .teaser-input-card span,
  .teaser-result span {
    right: 0.22rem;
    bottom: 0.22rem;
    left: 0.22rem;
    padding: 0.1rem 0.18rem;
    font-size: clamp(0.43rem, 1.9vw, 0.55rem);
  }

  .teaser-input-card::before {
    top: 0.16rem;
    left: 0.16rem;
    padding: 0.08rem 0.15rem;
    font-size: clamp(0.38rem, 1.55vw, 0.48rem);
  }
}

@media (max-width: 820px) {
  .fusion-gallery-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .fusion-actions {
    flex-wrap: wrap;
  }

  .reconstruction-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .fusion-media video {
    height: 180px;
  }

  .reconstruction-media img,
  .reconstruction-media video {
    height: 180px;
  }
}
