:root {
  --ink: #05070d;
  --panel-soft: #f4f7fb;
  --line: #dbe3ee;
  --line-dark: rgba(255, 255, 255, 0.16);
  --text-primary: #0b1220;
  --text-secondary: #506070;
  --text-muted: #7b8794;
  --cyan: #21d4fd;
  --cyan-deep: #0891b2;
  --lime: #b8f34a;
  --shadow-sm: 0 1px 2px rgba(10, 18, 30, 0.06);
  --shadow-md: 0 16px 46px rgba(10, 18, 30, 0.12);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.28);
  --font-display: 'Google Sans', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Arial, sans-serif;
  --font-body: 'Google Sans', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Arial, sans-serif;
}

body {
  font-family: var(--font-body);
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.toc {
  width: 280px;
  font-family: 'Google Sans', sans-serif;
  position: fixed;
  top: 100px;
  display: none;
  z-index: 1000;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(10, 18, 32, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 28px rgba(10, 18, 32, 0.06);
  backdrop-filter: blur(18px);
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

@media (min-width: 1400px) {
  .toc.show {
    left: max(20px, calc(25vw - 400px));
    display: block !important;
    opacity: 1;
  }
}

.toc::-webkit-scrollbar {
  display: none;
}

.toc h3 {
  font-family: 'Google Sans', sans-serif;
  font-size: 23px;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 10px;
}

.toc hr {
  border: 0;
  height: 1px;
  background-color: #ccc;
  margin-bottom: 15px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 6px;
}

.toc a {
  text-decoration: none;
  color: rgba(11, 18, 32, 0.64);
  font-size: 16px;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.toc a:hover {
  color: #000;
  text-decoration: underline;
}

.toc a.active {
  color: #76b900;
  font-weight: 600;
  position: relative;
  padding-left: 12px;
}

.toc a.active::before {
  content: "|";
  position: absolute;
  left: 0;
  color: #76b900;
  font-weight: 700;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.footer-attribution {
  color: #1f2933;
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
}

.footer-attribution a {
  color: #2563eb;
}

.footer-attribution a:hover {
  text-decoration: underline;
}

.link-block .button {
  margin-top: 5px;
  margin-bottom: 5px;
}

.disabled-link {
  cursor: default;
  opacity: 0.9;
}

.publication-title {
  font-family: var(--font-display);
}

.publication-meta-block {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.25rem 0 0;
}

.publication-logo {
  display: block;
  width: min(380px, 76vw);
  margin: 0 auto 1rem;
}

.formal-publication-title {
  max-width: 1040px;
  margin: 0 auto 1.55rem !important;
  color: #0a3b5f;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.35vw, 2.25rem) !important;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.publication-venue {
  margin: 0 0 0.15rem;
  color: #333;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.22rem;
  font-weight: 600;
  text-align: center !important;
}

/* Publication note styles for awards and special recognition */
.publication-note {
  display: inline-block;
  background: linear-gradient(135deg, #28a745, #34ce57);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  margin: 0.3rem 0 0.5rem 0;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: subtle-glow 2s ease-in-out infinite alternate;
}

/* Subtle glow animation for special notes */
@keyframes subtle-glow {
  0% {
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  }
  100% {
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.5);
  }
}

.publication-note.spotlight {
  background: linear-gradient(135deg, #e74c3c, #f39c12);
  color: white;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
  color: #111;
  font-weight: 500;
  line-height: 1.8;
}

.publication-authors a {
  color: #555 !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

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

.publication-affiliations {
  max-width: 960px;
  margin: 1rem auto 0;
  color: #1f2933;
  font-family: 'Google Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
}

.publication-affiliations span {
  display: inline-block;
  margin: 0 0.45rem;
}

.abstract-column {
  max-width: 1100px;
}

.abstract-teaser-figure {
  margin: 0 0 1.65rem;
}

.abstract-teaser-figure img {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e3e8ef;
  box-shadow: 0 12px 34px rgba(10, 18, 30, 0.07);
  background: #fff;
}

.abstract-teaser-figure figcaption {
  max-width: 980px;
  margin: 0.75rem auto 0;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1.58;
  text-align: left;
}

.abstract-copy {
  max-width: 980px;
  margin: 0 auto;
  color: #263241;
  font-size: 1.03rem;
  line-height: 1.72;
}

.abstract-copy p + p {
  margin-top: 1.05rem;
}

.hero-title {
  margin-bottom: 1rem !important;
  font-family: var(--font-display);
  font-size: clamp(4rem, 6.15vw, 5.05rem) !important;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.36);
}

.hero-title span,
.hero-subtitle {
  color: #fff;
}

.hero-subtitle {
  max-width: min(1640px, calc(100vw - 6rem));
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.65vw, 2.95rem) !important;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.hero-subtitle-line {
  display: block;
  white-space: nowrap;
}

.title-emphasis {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.92);
  text-underline-offset: 0.19em;
}

.overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.38) 62%, rgba(0, 0, 0, 0.54) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.32));
  z-index: 1;
  transition: opacity 1.0s;
}

.hero-body,
.hero-head,
.hero-foot {
  z-index: 2;
  transition: opacity 1.0s;
}

.hero-video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.hero-video video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.hero-head {
  padding-top: 1.15rem;
}

.hero-navbar {
  background: transparent;
}

.hero-navbar .container {
  display: flex;
  justify-content: flex-end;
  max-width: 1260px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hero-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.36rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 10, 16, 0.46);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.56rem 1.05rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.hero-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.section {
  padding: 1.5rem 1.5rem;
}

.section p {
  text-align: justify;
}

.section .container .column.is-full-width > h2.title,
.section .container > h2.title {
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  white-space: nowrap;
}

.section .container .column.is-full-width > h2.title,
.section .container > h2.title {
  background: #000 !important;
  color: #fff !important;
  display: inline-block !important;
  padding: 8px 16px !important;
  margin-left: calc((100% - 1150px) / 2 + 20px) !important;
  text-align: left !important;
}

@media (max-width: 1150px) {
  .section .container .column.is-full-width > h2.title,
  .section .container > h2.title {
    margin-left: 20px !important;
  }
}

.section .container .column.is-full-width > h2.title.is-2,
.section .container .column.is-full-width > h2.title.is-3:not([id^="generalization-"]),
.section .container > h2.title,
.section .container .column > h2.title.is-2 {
  font-size: 1.5rem !important;
}

#abstract-title {
  background: #000 !important;
  color: #fff !important;
  display: inline-block !important;
  padding: 8px 16px !important;
  text-align: left !important;
}

.video-gallery-section {
  margin-top: 0.75rem;
  margin-bottom: 20px;
  width: 100vw;
  position: relative;
  margin-left: calc((100% - 100vw) / 2);
  box-sizing: border-box;
}

.video-gallery-container {
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.video-gallery-container::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1200px) {
  .video-gallery-container {
    margin-left: calc((100% - 1150px) / 2 + 20px);
    margin-right: 0;
    max-width: calc(1150px - 20px);
    padding: 0;
  }
}

.video-gallery {
  display: flex;
  gap: 15px;
  padding: 0 0 15px 0;
  box-sizing: border-box;
  width: max-content;
  margin: 0;
}

.gallery-video-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gallery-video {
  height: 220px;
  width: auto;
  border-radius: 10px;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rome-video {
  height: 180px;
}

.gallery-video-caption {
  font-family: 'Google Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  white-space: nowrap;
  padding: 4px 8px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-caption-container {
  max-width: 1150px;
  margin: 15px auto 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

@media (min-width: 1200px) {
  .gallery-caption-container {
    margin-left: calc((100% - 1150px) / 2 + 20px);
    margin-right: auto;
  }
}

.figure-caption.gallery-caption {
  margin-bottom: 0;
  margin-top: 0;
  text-align: justify;
  flex: 1;
}

@media (min-width: 1200px) {
  .figure-caption.gallery-caption {
    margin-right: calc((100% - 1150px) / 2 + 170px);
  }
}

.figure-caption {
  text-align: justify !important;
}

.figure-caption.non-gallery-caption {
  margin-top: 10px;
  margin-bottom: 30px;
  width: 100%;
  max-width: calc(1150px - 310px);
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.project-video-frame {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.project-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #05070d;
  object-fit: cover;
}

.dark-section {
  color: #fff;
  padding-top: clamp(5.75rem, 7vw, 6.5rem);
  padding-bottom: clamp(5.75rem, 7vw, 6.5rem);
  background:
    linear-gradient(
      180deg,
      #fff 0,
      #f8fafc 16px,
      #05070d 84px,
      #05070d calc(100% - 84px),
      #f8fafc 100%
    );
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 2.55rem;
  text-align: center;
}

.section-heading.align-left {
  margin-left: 0;
  text-align: left;
}

.section-title {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: 0;
}

.dark-section .section-title {
  color: #fff;
}

.dark-section .section-heading {
  margin-bottom: 2.9rem;
}

.section-lead {
  max-width: 740px;
  margin: 1rem auto 0;
  color: var(--text-secondary);
  font-size: 1.04rem;
  text-align: left;
}

.align-left .section-lead {
  margin-left: 0;
}

.dark-section .section-lead {
  color: rgba(255, 255, 255, 0.68);
}

.mono-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin: 0;
  padding: 0.24rem 0.48rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-tabs {
  display: inline-flex;
  gap: 0.4rem;
  margin: 0 0 1.55rem;
  padding: 0.32rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.095);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 38px rgba(0, 0, 0, 0.24);
}

.gallery-tab {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.gallery-tab:hover,
.gallery-tab:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  outline: none;
}

.gallery-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(184, 243, 74, 0.78), 0 8px 22px rgba(184, 243, 74, 0.16);
}

.city-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(1.15rem, 2.3vw, 1.75rem);
  align-items: stretch;
}

.city-gallery-stage {
  min-width: 0;
}

.stage-video-frame,
.gallery-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.dark-section .stage-video-frame {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-lg);
}

.stage-video-frame {
  padding: 0.62rem;
}

.city-gallery-main-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #02040a;
  object-fit: cover;
}

.stage-caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem 1rem;
  align-items: start;
  margin-top: 1rem;
}

.stage-caption .mono-label {
  margin: 0.2rem 0 0;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--lime);
}

.stage-caption h3 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.08;
}

.city-gallery-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  max-height: min(72vh, 720px);
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 243, 74, 0.65) rgba(255, 255, 255, 0.08);
}

.city-gallery-list.rome-active {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.city-gallery-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  min-height: 86px;
  padding: 0.62rem;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.city-gallery-item[hidden] {
  display: none !important;
}

.city-gallery-item:hover,
.city-gallery-item:focus-visible {
  border-color: rgba(33, 212, 253, 0.58);
  background: rgba(33, 212, 253, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.city-gallery-item.active {
  border-color: var(--lime);
  background: rgba(184, 243, 74, 0.12);
}

.city-gallery-item video {
  display: block;
  width: 116px;
  height: 64px;
  border-radius: 6px;
  background: #02040a;
  object-fit: cover;
}

.city-gallery-item span {
  min-width: 0;
  color: inherit;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
}

.city-gallery-list.rome-active .city-gallery-item {
  display: block;
  min-height: 0;
  padding: 0.48rem;
}

.city-gallery-list.rome-active .city-gallery-item video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.city-gallery-list.rome-active .city-gallery-item span {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
}

.split-comparison-section {
  padding-top: clamp(4.25rem, 6vw, 5.75rem);
  padding-bottom: clamp(4.25rem, 6vw, 5.75rem);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 18%, #fff 100%);
}

.split-comparison-section .section-title {
  color: var(--text-primary);
}

.split-comparison-lead {
  max-width: 760px;
  text-align: center;
}

.split-comparison-card {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(0.55rem, 1.4vw, 0.85rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.comparison-scene-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.25rem auto 0.85rem;
}

.comparison-scene-tab {
  width: 2.6rem;
  min-height: 2.25rem;
  padding: 0.48rem 0;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.comparison-scene-tab:hover {
  border-color: rgba(0, 153, 204, 0.36);
  color: #003d5f;
}

.comparison-scene-tab.is-active {
  border-color: rgba(0, 153, 204, 0.55);
  background: #07101c;
  color: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.dual-comparison-wrapper {
  --split-position: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #05070d;
  touch-action: none;
}

.dual-comparison-wrapper .comparison-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dual-comparison-wrapper .video-ours {
  clip-path: polygon(0 0, var(--split-position) 0, var(--split-position) 100%, 0 100%);
  z-index: 2;
}

.dual-comparison-wrapper .video-baseline {
  z-index: 1;
}

.dual-comparison-wrapper .slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fff;
  cursor: ew-resize;
  left: var(--split-position);
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
}

.dual-comparison-wrapper .slider-handle::before,
.dual-comparison-wrapper .slider-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 7px solid transparent;
}

.dual-comparison-wrapper .slider-handle::before {
  left: -16px;
  border-right-color: #fff;
  transform: translateY(-50%);
}

.dual-comparison-wrapper .slider-handle::after {
  right: -16px;
  border-left-color: #fff;
  transform: translateY(-50%);
}

.dual-comparison-wrapper .comparison-label {
  position: absolute;
  bottom: 12px;
  z-index: 5;
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.72);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.dual-comparison-wrapper .comparison-label.left {
  left: 12px;
}

.dual-comparison-wrapper .comparison-label.right {
  right: 12px;
}

.visual-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1rem);
  max-width: 1180px;
  margin: clamp(1rem, 2vw, 1.35rem) auto 0;
}

.visual-highlight-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.visual-highlight-card img {
  display: block;
  width: 100%;
  aspect-ratio: 760 / 526;
  object-fit: cover;
  background: #05070d;
}

.visual-highlight-card figcaption {
  padding: 0.62rem 0.75rem 0.7rem;
  color: #334155;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 980px) {
  .visual-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .visual-highlight-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-card {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.55rem);
}

.selector-label {
  margin: 0 0 0.65rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.scene-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}

.scene-circle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  user-select: none;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.scene-circle:hover {
  border-color: var(--cyan-deep);
  transform: translateY(-1px);
}

.scene-circle.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

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

.video-box {
  min-width: 0;
}

.video-box video,
.video-inner-wrap video {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #05070d;
}

.video-label {
  margin: 0.62rem 0 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 650;
  text-align: center;
}

.video-label.ours {
  color: var(--cyan-deep);
}

.gallery-scrubber-wrap {
  margin-top: 1.25rem;
}

.scrubber-label {
  margin: 0 0 0.42rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gallery-scrubber-input {
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  cursor: grab;
}

.gallery-scrubber-input:active {
  cursor: grabbing;
}

.gallery-scrubber-input::-webkit-slider-runnable-track {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.gallery-scrubber-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -4px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 6px 16px rgba(10, 18, 30, 0.22);
}

.gallery-scrubber-input::-moz-range-track {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.gallery-scrubber-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 6px 16px rgba(10, 18, 30, 0.22);
}

.gallery-description {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  text-align: center;
}

.video-inner-wrap {
  position: relative;
  width: 100%;
  display: block;
}

.video-draw-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: default;
}

.zoom-rect-indicator {
  position: absolute;
  z-index: 11;
  display: none;
  pointer-events: none;
  border: 2px solid var(--lime);
  background: rgba(184, 243, 74, 0.11);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.zoom-panels-wrap {
  margin-bottom: 1.05rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.zoom-panels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.zoom-panels-title {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.zoom-close-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.zoom-close-btn:hover {
  color: var(--ink);
}

.zoom-panels-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.zoom-panel canvas {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #05070d;
  image-rendering: pixelated;
  image-rendering: -webkit-optimize-contrast;
}

.zoom-drag-hint {
  margin: 0.82rem 0 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  text-align: center;
}

.comparison-panel {
  max-width: 1150px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
}

.sample-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 24px 0;
}

.sample-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #d5dce6;
  background: #fff;
  color: #333;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sample-button:hover,
.sample-button.is-active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.comparison-videos video {
  background: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.method-caption {
  margin-top: 8px;
  display: inline-block;
}

.tidegs-caption {
  color: #008fb6;
}

.comparison-scrubber-wrap {
  width: 100%;
  padding: 0 0 20px 0;
}

.comparison-scrubber {
  width: 100%;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #21d4fd, #76b900);
  outline: none;
}

.comparison-scrubber::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.figure-grid {
  max-width: 1150px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.figure-grid figure {
  margin: 0;
}

.figure-grid img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.figure-grid figcaption {
  font-family: 'Google Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
  color: #333;
}

pre {
  border-radius: 10px;
  background: #f5f5f5;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 4rem !important;
  }

  .hero-subtitle {
    max-width: calc(100vw - 2rem);
    font-size: 1.85rem !important;
  }

  .hero-subtitle-line {
    white-space: normal;
  }

  #main-title {
    font-size: 2rem !important;
  }

  .gallery-video {
    height: 180px;
  }

  .rome-video {
    height: 150px;
  }

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

  .city-gallery,
  .baseline-video-container,
  .zoom-panels-row {
    grid-template-columns: 1fr;
  }

  .city-gallery-list,
  .city-gallery-list.rome-active {
    grid-template-columns: 1fr;
  }

  .city-gallery-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .city-gallery-item video {
    width: 96px;
    height: 54px;
  }

  .stage-caption {
    grid-template-columns: 1fr;
  }

}
