:root {
  font-family: "Myriad Pro", "Myriad Set Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #222;
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
button { font: inherit; }
h1, h3, strong { font-weight: 600; }

@media (min-width: 701px) {
  body { zoom: 0.80; }
}

.page {
  width: min(100% - 40px, 1500px);
  margin: 0 auto;
}

.hero {
  margin-bottom: 36px;
  padding: 64px 0 0;
  text-align: center;
}

h1 {
  max-width: 1300px;
  margin: 0 auto 28px;
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.authors, .affiliation, .venue { margin: 8px 0; }
.header-divider {
  max-width: 1120px;
  margin: 36px auto 0;
  border: 0;
  border-top: 1px solid #ddd;
}
.authors { max-width: 1400px; margin-inline: auto; font-size: 26px; font-weight: 350; line-height: 1.6; }
.authors a, .authors a:visited { color: #1d92e0; text-decoration: none; }
.authors a:hover, .authors a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.author-row, .affiliation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 20px;
}
.author-row > span, .affiliation > span { white-space: nowrap; }
.hero sup { margin-left: 2px; font-size: 0.65em; }
.authors sup { font-weight: 400; color: #555; }
.affiliation { margin-top: 6px; color: #555; font-size: 22px; line-height: 1.5; }
.affiliation sup { margin: 0 3px 0 0; }
.venue { margin-top: 28px; font-size: 28px; font-weight: 400; }

.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 124px;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid #363636;
  border-radius: 10px;
  color: #fff;
  background: #363636;
  font-size: 20px;
  line-height: 1.4;
  text-decoration: none;
}

.resource-link svg { width: 22px; height: 22px; flex-shrink: 0; }
.resource-link .ai { width: 22px; font-size: 22px; }
.resource-link:disabled { opacity: 1; cursor: default; }

section { margin-bottom: 78px; }
h2 { margin: 0 0 16px; font-size: 36px; font-weight: 500; text-align: center; }

.body-copy, .section-description {
  margin: 0 auto;
  color: #444;
  font-size: 20px;
  line-height: 1.6;
}

.body-copy {
  max-width: 980px;
  text-align: justify;
}

.section-description {
  max-width: 1200px;
  margin-bottom: 26px;
  font-style: italic;
  text-align: center;
}

.local-server-notice {
  max-width: 980px;
  margin: 0 auto 14px;
  padding: 12px 16px;
  border: 1px solid #d8c786;
  border-radius: 6px;
  color: #4d421c;
  background: #fffbea;
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
}

.local-server-notice code {
  white-space: nowrap;
}

.local-server-notice a {
  color: inherit;
  font-weight: 600;
}

.method-image {
  display: block;
  width: 75%;
  height: auto;
  margin: 0 auto 80px;
  -webkit-user-drag: none;
  user-select: none;
}

.scene-navigation {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.scene-divider {
  height: 1px;
  margin: 0 0 28px;
  background: #ddd;
}

.arrow-button {
  width: 46px;
  height: 40px;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: #222;
  background: #fff;
  cursor: pointer;
  font-size: 26px;
}

.arrow-button:hover, .arrow-button:focus-visible { border-color: #222; }

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

.media-frame,
.media-frame video,
.viewport-canvas {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.input-card h3,
.video-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  text-align: center;
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #fff;
}

.media-frame video,
.viewport-canvas {
  position: absolute !important;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.media-frame video { object-fit: fill; cursor: pointer; }
.input-card .media-frame {
  max-width: 100%;
  margin-inline: auto;
}
.input-card .media-frame video { object-fit: contain; cursor: default; }

.placeholder-frame {
  display: grid;
  place-items: center;
  border: 1px dashed #bbb;
  color: #777;
  background: #fafafa;
  font-size: 18px;
}

.media-frame video.is-source-only {
  opacity: 0;
  pointer-events: none;
}

.viewport-canvas { cursor: grab; touch-action: none; }
.viewport-canvas.is-dragging { cursor: grabbing; }

.video-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  padding: 6px 9px;
  border: 0;
  color: #eee;
  background: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.video-status.is-hidden { display: none; }

.back-button {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  color: #222;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-button[hidden] { display: none; }

.viewport-action-slot {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 7px;
}

.viewport-action-slot.is-overlay {
  position: absolute;
  bottom: 8px;
  left: 50%;
  z-index: 4;
  min-height: 0;
  padding: 0;
  transform: translateX(-50%);
}

.viewport-action-slot.is-overlay .back-button {
  padding: 5px 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
}

.ablation-caption {
  margin: 16px 0 0;
  color: #555;
  font-size: 16px;
  line-height: 1.5;
}

.ablation-caption em {
  color: #000;
  font-weight: 500;
}

#bibtex { margin-bottom: 48px; }

#bibtex::before {
  content: "";
  display: block;
  margin: 0 auto 40px;
  border-top: 1px solid #ddd;
}

.citation-box {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  background: #f6f6f6;
  overflow: hidden;
}
.citation-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  padding: 8px 8px 0;
  gap: 8px;
  color: #666;
  font-size: 14px;
}
#copy-bibtex {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  color: #555;
  background: transparent;
  cursor: pointer;
}
#copy-bibtex:hover { background: #e8e8e8; }
#copy-bibtex:focus-visible { outline: 2px solid #1988d1; outline-offset: -2px; }
#copy-bibtex svg { width: 20px; height: 20px; }
.citation-box pre {
  margin: 0;
  padding: 0 22px 22px;
  overflow-x: auto;
  font: 15px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #333;
  white-space: pre;
}
.citation-box code { font: inherit; }

footer {
  padding: 0 0 42px;
  color: #777;
  font-size: 15px;
  text-align: center;
}

@media (max-width: 1000px) {
  .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-image { width: 80%; }
}

@media (max-width: 700px) {
  .page { width: calc(100% - 32px); }
  .hero { padding-top: 32px; margin-bottom: 28px; }
  h1 { font-size: 28px; line-height: 1.2; margin-bottom: 22px; }
  .authors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    max-width: 440px;
    font-size: 18px;
    line-height: 1.45;
  }
  .author-row { display: contents; }
  .author-row > span { white-space: nowrap; }
  .affiliation { margin-top: 12px; font-size: 16px; gap: 2px 14px; }
  .venue { margin-top: 22px; font-size: 20px; line-height: 1.4; }
  .resource-links { margin-top: 16px; }
  .resource-link { min-width: 104px; min-height: 44px; padding: 9px 16px; font-size: 16px; }
  .resource-link svg { width: 18px; height: 18px; }
  .resource-link .ai { width: 18px; font-size: 18px; }
  .header-divider { margin-top: 28px; }
  section { margin-bottom: 48px; }
  h2 { font-size: 26px; margin-bottom: 14px; }
  .body-copy, .section-description, .local-server-notice { font-size: 16px; line-height: 1.6; }
  .body-copy { text-align: left; }
  .section-description { margin-bottom: 20px; }
  .input-card h3, .video-card h3 { font-size: 18px; }
  .ablation-caption { font-size: 14px; }
  footer { font-size: 13px; }
  .citation-box pre { padding: 0 16px 16px; font-size: 13px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .method-image { width: 100%; margin-bottom: 56px; }
}
