@font-face {
  font-family: 'Inter';
  src: url('./assets/fonts/inter.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Caveat';
  src: url('./assets/fonts/caveat.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Gilda Display';
  src: url('./assets/fonts/gilda-display.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f7f9;
  --surface: #ffffff;
  --ink: #26272e;
  --muted: #737580;
  --accent: #48576b;
  --line: #26272e21;
  --sans: 'Inter', Arial, sans-serif;
  --serif: 'Gilda Display', Georgia, serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --content: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; accent-color: var(--accent); }
button { border: 0; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #d8dce5; color: var(--ink); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.paper-logo { display: block; width: 52px; height: auto; fill: currentColor; stroke: none; }
.section-shell { width: min(var(--content), calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 20; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; background: var(--surface); color: var(--ink); }
.skip-link:focus { clip-path: none; width: auto; height: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }

.header {
  width: min(var(--content), calc(100% - 96px));
  min-height: 104px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark { display: inline-flex; align-items: center; gap: 18px; flex-shrink: 0; }
.wordmark .paper-logo { width: 44px; fill: url(#pi4-gradient); }
.wordmark-rule { height: 24px; width: 1px; background: var(--line); }
.wordmark-label { font-size: 14px; font-weight: 550; letter-spacing: -.3px; }
.lab-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lab-brand { display: block; flex-shrink: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.lab-brand img { display: block; width: auto; height: 32px; }
.team-name { flex-shrink: 0; color: #42454f; font-family: var(--serif); font-size: 16px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.header nav { display: flex; align-items: center; gap: 8px; color: #42454f; font-size: 14px; }
.nav-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff70; font-weight: 550; white-space: nowrap; transition: color .2s, border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.nav-button:hover { color: var(--ink); border-color: #26272e50; background: var(--surface); }
.nav-button svg { width: 16px; height: 16px; }
.nav-item { position: relative; display: inline-flex; min-width: 0; }
.nav-item .nav-button { width: 100%; }
.nav-note { position: absolute; z-index: 2; top: calc(100% + 7px); left: calc(50% - 24px); display: flex; align-items: flex-start; color: #ad99ba; font: 700 21px / 1 'Caveat', 'Segoe Print', cursive; white-space: nowrap; pointer-events: none; }
.nav-note svg { width: 23px; height: 19px; margin-left: 12px; stroke-width: 1.4; transform: scaleY(-1); transform-origin: center; }
.nav-note-left { transform: translateX(-50%) rotate(-5deg); }
.nav-note-right { transform: translateX(-50%) rotate(4deg); }
.nav-external { border-color: #26272e2e; background: #fff; box-shadow: 0 4px 14px #272b3808; }
.nav-external:hover { border-color: #7c3aed70; color: #6d28d9; box-shadow: 0 7px 20px #7c3aed14; transform: translateY(-1px); }
.nav-demo { gap: 12px; margin-left: 4px; border-color: var(--ink); background: var(--ink); color: var(--paper); }
.nav-demo:hover { border-color: #454650; background: #454650; color: #fff; }
.demo-arrow { transform: rotate(90deg); }
.huggingface-mark { display: block; width: 19px; height: auto; flex-shrink: 0; }

.hero { padding-top: 20px; }
.hero-carousel { display: grid; grid-template-columns: clamp(104px, 10vw, 150px) minmax(0, 1fr) clamp(104px, 10vw, 150px); gap: 14px; align-items: stretch; }
.hero-player { position: relative; min-width: 0; aspect-ratio: 16 / 9; border: 1px solid #26272e12; border-radius: 16px; overflow: hidden; background: #e2e4e8; box-shadow: 0 16px 50px #272b380a; }
.hero-media { position: absolute; inset: 0; background: #dfe2e6; }
.hero-media > img, .hero-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media > video { opacity: 0; transition: opacity .3s; }
.hero-media > video.is-playing { opacity: 1; }
.hero-inset { position: absolute; z-index: 2; bottom: 2.2%; width: 26%; overflow: hidden; outline: 1px solid #26272e18; outline-offset: -1px; border-radius: 9px; background: #fff; box-shadow: 0 8px 24px #252b3526; transform: scale(1); transition: transform .38s cubic-bezier(.22, 1, .36, 1), box-shadow .38s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
.hero-inset-global { left: 2.2%; width: calc(26% * var(--input-scale, 1)); transform-origin: left bottom; }
.hero-inset-input { right: 2.2%; width: calc(26% * var(--input-scale, 1)); transform-origin: right bottom; }
@media (hover: hover) and (pointer: fine) {
  .hero-inset:hover { z-index: 3; box-shadow: 0 16px 38px #252b3533; transform: scale(1.5); }
}
.hero-inset video { display: block; width: 100%; aspect-ratio: var(--input-aspect, 874 / 480); object-fit: cover; }
.hero-inset-input video { aspect-ratio: var(--input-aspect, 874 / 480); }
.hero-inset video.is-contain { object-fit: contain; }
.hero-inset-label { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 4px 7px; border-radius: 4px; background: #ffffffe8; color: #454b54; font: 8px var(--mono); letter-spacing: .6px; }
.hero-demo-meta { position: absolute; top: 18px; left: 18px; display: flex; align-items: center; gap: 12px; padding: 8px 11px; border-radius: 6px; background: #ffffffdf; color: #292c33; font: 10px var(--mono); letter-spacing: .5px; }
#hero-demo-name { font-weight: 600; }
#hero-demo-index { color: var(--muted); }
.hero-switch { position: relative; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #26272e12; border-radius: 12px; background: #dfe1e6; color: #fff; box-shadow: 0 10px 30px #272b3808; }
.hero-switch::before { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.hero-switch-prev::before { background: linear-gradient(90deg, #14161d70, #14161d12 65%, transparent); }
.hero-switch-next::before { background: linear-gradient(-90deg, #14161d70, #14161d12 65%, transparent); }
.hero-switch-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .3s, transform .45s ease; }
.hero-switch-prev .hero-switch-poster { -webkit-mask-image: linear-gradient(90deg, #000 15%, #000 45%, transparent); mask-image: linear-gradient(90deg, #000 15%, #000 45%, transparent); }
.hero-switch-next .hero-switch-poster { -webkit-mask-image: linear-gradient(-90deg, #000 15%, #000 45%, transparent); mask-image: linear-gradient(-90deg, #000 15%, #000 45%, transparent); }
.hero-switch-content { position: absolute; z-index: 2; top: 50%; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translate(-50%, -50%); }
.hero-switch-direction { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #ffffffb8; border-radius: 50%; background: #ffffffed; color: #30333b; box-shadow: 0 6px 24px #14161d26; }
.hero-switch-direction svg { width: 20px; height: 20px; }
.hero-switch-prev .hero-switch-direction svg { transform: rotate(180deg); }
.hero-switch-copy { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; text-shadow: 0 1px 8px #14161d; }
.hero-switch-kicker { font: 7px var(--mono); letter-spacing: .8px; white-space: nowrap; }
.hero-switch-name { max-width: 94px; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.hero-switch:hover .hero-switch-poster { opacity: 1; transform: scale(1.05); }
.hero-timeline { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.hero-time { min-width: 42px; color: #666d76; font: 11px var(--mono); font-variant-numeric: tabular-nums; }
#hero-duration { text-align: right; }
#hero-seek { flex: 1; min-width: 40px; height: 28px; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
#hero-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #7c3aed var(--progress, 0%), #e0e1e6 var(--progress, 0%)); }
#hero-seek::-moz-range-track { height: 6px; border-radius: 999px; background: #e0e1e6; }
#hero-seek::-moz-range-progress { height: 6px; border-radius: 999px; background: #7c3aed; }
#hero-seek::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6px; appearance: none; -webkit-appearance: none; border: 3px solid #fff; border-radius: 50%; background: #7c3aed; box-shadow: 0 1px 5px #7c3aed55; }
#hero-seek::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #7c3aed; box-shadow: 0 1px 5px #7c3aed55; }
.hero-demo-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.hero-demo-chip { min-width: 0; padding: 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: #555b65; text-align: left; transition: color .2s, border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.hero-demo-chip-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; background: #e5e6ea; }
.hero-demo-chip-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hero-demo-chip-number { position: absolute; top: 7px; left: 7px; padding: 3px 6px; border-radius: 5px; background: #ffffffdf; color: #626873; font: 9px var(--mono); box-shadow: 0 2px 8px #26272e12; }
.hero-demo-chip-name { display: block; overflow: hidden; padding: 9px 6px 5px; font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.hero-demo-chip:hover { border-color: #7c3aed70; color: #6d28d9; box-shadow: 0 7px 20px #7c3aed14; transform: translateY(-2px); }
.hero-demo-chip:hover .hero-demo-chip-media img { transform: scale(1.035); }
.hero-demo-chip.is-active { border-color: #7c3aed; background: #fbf9ff; color: #6d28d9; box-shadow: 0 0 0 1px #7c3aed, 0 7px 20px #7c3aed1f; }
.hero-demo-chip.is-active .hero-demo-chip-number { background: linear-gradient(135deg, #7138e8, #a33fc9); color: #fff; }
.hero-title-wrap { min-width: 0; margin-bottom: 28px; text-align: center; }
.hero h1 { display: flex; align-items: center; justify-content: center; gap: .24em; white-space: nowrap; font: 600 clamp(11px, 3vw, 48px) / 1.15 var(--serif); letter-spacing: -.04em; }
.hero-title-brand { display: inline-flex; align-items: baseline; gap: .08em; flex-shrink: 0; color: #7c3aed; }
.hero-title-brand .paper-logo { width: 1.45em; fill: url(#pi4-gradient); }
.hero-title-copy { min-width: 0; }
.hero-authors { margin-top: 12px; color: #555963; font-size: 14px; line-height: 1.6; }
.hero-authors sup, .hero-affiliations sup { margin-left: 1px; font-size: .68em; }
.hero-affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 16px; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #ffffff26; border-radius: 7px; color: #d1d6d1; background: #ffffff08; transition: color .2s, background .2s, border-color .2s; }
.icon-button:hover { color: #fff; border-color: #ffffff45; background: #ffffff17; }
.icon-button:active { transform: translateY(1px); }
.icon-button.is-active { border-color: #c9dec066; background: #c9dec01c; color: #d9e9c4; }
.icon-button svg { width: 17px; height: 17px; }
.hero-video-control { width: 38px; height: 38px; background: #202127bd; border-color: #ffffff40; border-radius: 50%; color: #fff; }
.hero-video-control:hover { background: #202127ed; }

.explore { padding-top: 54px; padding-bottom: 64px; border-top: 1px solid var(--line); }
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 34px; }
.section-kicker { display: block; margin-bottom: 13px; color: var(--muted); font: 10px var(--mono); letter-spacing: 1.4px; }
.section-heading-row h2 { font-size: 32px; font-weight: 480; letter-spacing: -1.2px; line-height: 1.2; }
.section-heading-row>p { max-width: 420px; color: #747681; font-size: 13px; line-height: 1.85; }
.scene-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; margin-bottom: 32px; }
.scene-card { display: block; min-width: 0; padding: 0 0 17px; text-align: left; background: none; border-bottom: 2px solid var(--line); transition: border-color .25s; }
.card-preview { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #26272e10; border-radius: 9px; background: #e4e5e9; transition: box-shadow .25s, border-color .25s; }
.card-preview::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; pointer-events: none; transition: border-color .25s; }
.card-preview img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .3s, transform .45s ease; }
.card-preview.is-unavailable img { display: none; }
.card-preview.is-unavailable::before { content: 'Preview unavailable'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 10px var(--mono); }
.scene-card:hover img, .scene-card[aria-pressed=true] img { opacity: 1; }
.scene-card[aria-pressed=true] { border-bottom-color: var(--ink); }
.scene-card[aria-pressed=true] .card-preview { border-color: #26272e65; box-shadow: 0 7px 22px #26272e12; }
.scene-card[aria-pressed=true] .card-preview::after { border-color: #26272e90; }
.card-caption { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; }
.card-index { padding-top: 3px; font: 10px var(--mono); color: var(--muted); }
.card-copy { display: block; min-width: 0; }
.card-text { display: block; font-size: 14px; font-weight: 550; letter-spacing: -.25px; line-height: 1.4; }
.card-subtitle { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.card-selection { width: 27px; height: 27px; display: grid; place-items: center; flex-shrink: 0; margin: -2px 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); transition: color .2s, background .2s, border-color .2s; }
.card-selection svg { width: 14px; height: 14px; }
.scene-card[aria-pressed=true] .card-selection { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.card-tag { display: block; margin: 11px 0 0 27px; color: #7a7c86; font: 9px var(--mono); letter-spacing: .25px; }

.viewer-shell {
  --accent: #7c3aed;
  --line: #26272e1f;
  color-scheme: light;
  color: #30343b;
  background: #fff;
  border: 1px solid #26272e14;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 22px 60px #171c2414;
}
.viewer-stage { position: relative; height: clamp(500px, 50vw, 660px); overflow: hidden; touch-action: none; outline-offset: -4px !important; background: #fff; }
.viewer-poster { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 1; visibility: visible; pointer-events: none; transition: opacity .45s ease; }
.viewer-stage.is-ready .viewer-poster { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
.point-cloud { position: absolute; z-index: 0; inset: 0; }
.point-cloud canvas { display: block; width: 100%; height: 100%; }
.viewer-topline { position: absolute; z-index: 2; top: 20px; right: 20px; left: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; }
.viewer-scene-meta { display: flex; gap: 10px; align-items: center; min-width: 0; color: #353a42; font-size: 12px; }
#scene-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #6d8b5c; box-shadow: 0 0 0 4px #6d8b5c14; flex-shrink: 0; }
.viewer-tools { display: flex; gap: 8px; pointer-events: auto; }
.viewer-tools .icon-button { border-color: #26272e20; background: #ffffffd9; color: #50565e; }
.viewer-tools .icon-button:hover { border-color: #26272e45; background: #fff; color: #20242a; }
.viewer-tools .icon-button.is-active { border-color: #7c3aed45; background: #7c3aed12; color: #7138d8; }
.scene-mode { padding-left: 12px; border-left: 1px solid var(--line); color: #737b70; font: 9px var(--mono); white-space: nowrap; }
.video-inset { position: absolute; z-index: 2; top: 76px; right: 20px; width: 210px; padding: 0; border: 1px solid #26272e20; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px #252b3514; color: inherit; text-align: left; cursor: pointer; transition: transform .25s, box-shadow .25s; }
.video-inset:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px #252b3524; }
.video-inset:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.video-inset:disabled { cursor: default; }
.video-inset video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; pointer-events: none; }
.inset-label { display: flex; align-items: center; gap: 7px; padding: 9px 11px; border-bottom: 1px solid #26272e14; font: 8px var(--mono); letter-spacing: 1px; }
.inset-label .status-dot { width: 3px; height: 3px; box-shadow: none; }
.inset-camera-action { margin-left: auto; color: #7538d8; font-size: 7px; letter-spacing: .2px; white-space: nowrap; }
.video-unavailable { position: absolute; inset: 31px 0 0; display: grid; place-content: center; background: #fffffff0; text-align: center; color: #626a70; font-size: 11px; line-height: 1.7; }
.viewer-bottomline { position: absolute; z-index: 2; right: 22px; bottom: 20px; left: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; pointer-events: none; }
.interaction-hint { color: #798087; font: 8px / 1.8 var(--mono); letter-spacing: .45px; }
.interaction-hint i { padding-inline: 8px; font-style: normal; }
.touch-hint { display: none; }
.viewer-stat { padding-right: 55px; color: #707880; font: 9px / 1.8 var(--mono); }
.viewer-status { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; padding: 30px; background: transparent; text-align: center; color: #5d6570; font-size: 13px; line-height: 1.8; pointer-events: none; }
.viewer-status.is-error, .viewer-status.is-idle { background: #fffffff5; pointer-events: auto; }
.viewer-loading-feedback { display: flex; align-items: center; gap: 12px; max-width: 100%; padding: 10px 16px; border: 1px solid #26272e14; border-radius: 999px; background: #fffffff0; box-shadow: 0 8px 30px #252b3514; }
.viewer-status p { max-width: 640px; }
.loading-ring { width: 20px; height: 20px; flex-shrink: 0; border: 2px solid #26272e18; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.viewer-status.is-error .loading-ring, .viewer-status.is-idle .loading-ring { display: none; }
.button { display: inline-flex; align-items: center; gap: 15px; min-height: 42px; padding: 0 18px; border: 1px solid currentColor; border-radius: 6px; background: #ffffffe8; font-size: 12px; pointer-events: auto; }
.button:hover { background: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.orientation { position: absolute; z-index: 2; right: 24px; bottom: 23px; width: 30px; height: 42px; color: #6c7d60; font: 8px var(--mono); pointer-events: none; }
.orientation::after { content: ''; position: absolute; top: 1px; left: 9px; width: 1px; height: 30px; background: #6c7d6066; transform: rotate(-10deg); }
.orientation::before { content: ''; position: absolute; top: 28px; left: 3px; width: 26px; height: 1px; background: #8c796766; transform: rotate(-28deg); }
.axis-up { position: absolute; top: -5px; left: 3px; }
.axis-right { position: absolute; top: 17px; right: -3px; color: #8c7967; }
.axis-depth { position: absolute; top: 27px; left: -5px; color: #627d8b; }

.viewer-controls { padding: 0 24px; border-top: 1px solid var(--line); background: #fbfcfd; }
.timeline-row { display: flex; align-items: center; gap: 16px; min-height: 92px; border-bottom: 1px solid #26272e12; }
.play-button { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: #7538d8; color: #fff; transition: background .2s, transform .2s; }
.play-button:hover:not(:disabled) { background: #8b5cf6; transform: scale(1.04); }
.play-button svg { width: 15px; height: 15px; fill: currentColor; stroke-width: 2; }
.play-button.is-playing svg { fill: none; }
.time-label { color: #4d5560; font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.camera-stream { flex: 1; min-width: 70px; }
.camera-stream-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #747b84; font: 7px var(--mono); letter-spacing: .8px; }
.camera-stream-meta span:last-child { color: #7538d8; }
.camera-stream-track { --progress: 0%; position: relative; height: 44px; border-radius: 5px; background: #e4e7ec; }
#camera-filmstrip { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 5px; }
.camera-stream-track::after { content: ''; position: absolute; inset: 0; border: 1px solid #26272e14; border-radius: 5px; pointer-events: none; }
.camera-stream-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #7538d8 var(--progress), transparent var(--progress)); pointer-events: none; }
.camera-thumb { position: absolute; z-index: 2; bottom: -5px; left: clamp(43px, var(--progress), calc(100% - 43px)); width: 86px; height: 54px; overflow: hidden; transform: translateX(-50%); border: 2px solid #fff; border-radius: 6px; background: #15181d; box-shadow: 0 3px 14px #171c2438, 0 0 0 1px #7538d852; pointer-events: none; transition: box-shadow .18s; }
.camera-stream-track:has(#timeline:active) .camera-thumb { box-shadow: 0 5px 20px #171c2445, 0 0 0 3px #7538d838; }
#camera-thumb-image { display: block; width: 100%; height: 100%; }
#camera-thumb-frame { position: absolute; right: 3px; bottom: 3px; padding: 2px 4px; border-radius: 2px; background: #11151cbb; color: #fff; font: 7px var(--mono); }
#timeline { position: absolute; z-index: 3; inset: -12px 0; width: 100%; height: 68px; margin: 0; appearance: none; -webkit-appearance: none; opacity: 0; cursor: col-resize; }
#timeline:disabled { cursor: default; }
.camera-stream-track:has(#timeline:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.point-size-label input { appearance: none; -webkit-appearance: none; cursor: pointer; background: transparent; }
.point-size-label input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 0; border-radius: 50%; background: #7538d8; box-shadow: 0 0 0 4px #7538d800; transition: box-shadow .2s; }
.point-size-label input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #7538d8; }
.point-size-label input:hover::-webkit-slider-thumb { box-shadow: 0 0 0 4px #7538d81f; }
.speed-label { padding-left: 14px; border-left: 1px solid var(--line); }
.speed-label select { min-height: 36px; padding: 4px 6px; border: 0; background: transparent; color: #525b66; cursor: pointer; font: 11px var(--mono); }
.speed-label option { background: #fff; }
.frame-label { min-width: 116px; text-align: right; color: #77806f; font: 9px var(--mono); letter-spacing: .4px; }
.layers-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 66px; padding-block: 12px; }
.controls-label { margin-right: 2px; color: #79816f; font: 8px var(--mono); letter-spacing: 1.2px; }
.layer-toggle { position: relative; display: flex; align-items: center; gap: 8px; min-height: 36px; color: #454e42; cursor: pointer; user-select: none; font-size: 11px; }
.layer-toggle>input { position: absolute; width: 18px; height: 18px; margin: 0; opacity: 0; }
.toggle-check { width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #6c7c6388; border-radius: 3px; pointer-events: none; }
.toggle-check svg { width: 11px; height: 11px; stroke-width: 2.3; opacity: 0; }
.layer-toggle input:checked+.toggle-check { border-color: #7c3aed88; background: #7c3aed12; color: #7138c8; }
.layer-toggle input:checked+.toggle-check svg { opacity: 1; }
.layer-toggle input:focus-visible+.toggle-check { outline: 2px solid var(--accent); outline-offset: 3px; }
.layer-toggle:has(input:disabled) { opacity: .35; cursor: default; }
.point-size-label { display: flex; align-items: center; gap: 12px; min-height: 36px; margin-left: auto; color: #65705f; font-size: 11px; }
.point-size-label input { width: 84px; height: 24px; }
.point-size-label input::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: #dfe2e8; }
.point-size-label input::-moz-range-track { height: 3px; background: #dfe2e8; }
.point-size-value { min-width: 30px; color: #454e42; font: 10px var(--mono); }
.viewer-caption { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0 0; color: #7c7e88; font: 10px / 1.8 var(--mono); }
.viewer-caption>p { display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; }
.legend-dot { display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; }
.legend-dot:not(:first-child) { margin-left: 18px; }
.legend-frame { background: #598f8a; }
.legend-track { background: #9f74b9; }
.legend-camera { background: #768c58; }
.notice { padding: 20px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.8; }
.viewer-shell:fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; border: 0; border-radius: 0; }
.viewer-shell:fullscreen .viewer-stage { flex: 1; height: auto; }
.viewer-shell:fullscreen .viewer-controls { flex-shrink: 0; }

.footer { display: flex; align-items: center; padding-block: 30px 38px; border-top: 1px solid var(--line); }
.footer .paper-logo { width: 44px; }

@media (hover: hover) {
  .scene-card:hover .card-preview img { transform: scale(1.025); }
  .scene-card:hover .card-selection { border-color: #26272e70; color: var(--ink); }
}

@media (max-width: 1100px) {
  .section-shell, .header { width: min(var(--content), calc(100% - 64px)); }
  .hero-demo-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scene-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .card-caption { gap: 9px; }
  .card-text { font-size: 13px; }
  .card-subtitle { font-size: 10px; }
  .card-tag { margin-left: 24px; }
  .viewer-caption { flex-direction: column; gap: 8px; }
  .layers-row { gap: 10px 18px; }
  .controls-label { display: none; }
  .point-size-label input { width: 68px; }
}

@media (max-width: 1100px) {
  .brand-lockup { gap: 14px; }
  .lab-brand { padding-left: 14px; }
  .lab-brand img { height: 28px; }
  .team-name { font-size: 14px; }
  .nav-button { padding-inline: 12px; font-size: 12px; }
}

@media (max-width: 1536px) {
  .header { flex-wrap: wrap; gap: 16px; padding-block: 20px; }
  .header .brand-lockup { width: 100%; justify-content: flex-start; }
  .header nav { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .nav-demo { margin-left: 0; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 22px; }
  .section-shell, .header { width: calc(100% - 40px); }
  .header { gap: 16px; padding-block: 18px; }
  .wordmark { gap: 12px; }
  .wordmark .paper-logo { width: 36px; }
  .wordmark-rule { height: 20px; }
  .wordmark-label { font-size: 12px; }
  .header nav { gap: 10px; font-size: 12px; }
  .nav-button { min-height: 44px; }
  .hero { padding-top: 12px; }
  .hero-carousel { width: calc(100% + 40px); margin-inline: -20px; grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 10px; }
  .hero-player { width: 100%; margin-inline: 0; border-radius: 12px; }
  .hero-switch-copy { display: none; }
  .hero-switch-direction { width: 40px; height: 40px; }
  .hero-title-wrap { margin-bottom: 20px; }
  .explore { padding-top: 38px; padding-bottom: 44px; }
  .section-heading-row { display: block; margin-bottom: 28px; }
  .section-heading-row h2 { font-size: 29px; }
  .section-heading-row>p { max-width: 520px; margin-top: 14px; font-size: 12px; }
  .scene-tabs { display: flex; gap: 12px; margin-bottom: 24px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
  .scene-tabs::-webkit-scrollbar { display: none; }
  .scene-card { flex: 0 0 176px; }
  .card-text { font-size: 14px; }
  .card-subtitle { font-size: 11px; }
  .card-tag { margin-left: 26px; }
  .viewer-stage { height: clamp(480px, 78vw, 590px); }
  .viewer-topline { top: 15px; right: 14px; left: 15px; }
  .scene-mode { display: none; }
  .video-inset { top: 66px; right: 14px; width: 150px; }
  .viewer-controls { padding-inline: 16px; }
  .timeline-row { gap: 12px; }
  .frame-label { display: none; }
  .layers-row { gap: 8px 20px; }
  .point-size-label { margin-left: 0; }
  .interaction-hint { max-width: 310px; }
  .viewer-stat { max-width: 160px; text-align: right; }
}

@media (max-width: 560px) {
  .section-shell, .header { width: calc(100% - 32px); }
  .header { min-height: 74px; gap: 14px; padding-block: 16px; }
  .brand-lockup { flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
  .lab-lockup { width: 100%; flex-wrap: wrap; gap: 8px 12px; }
  .lab-brand { padding-left: 0; border-left: 0; }
  .lab-brand img { height: 24px; }
  .team-name { font-size: 12px; }
  .header nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 8px; }
  .wordmark-label { font-size: 11px; }
  .nav-button { min-height: 44px; padding-inline: 10px; font-size: 12px; line-height: 1.25; white-space: normal; }
  .nav-button svg { width: 14px; height: 14px; }
  .nav-note { font-size: 19px; }
  .nav-note svg { width: 20px; height: 17px; }
  .hero-carousel { width: calc(100% + 32px); margin-inline: -16px; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
  .hero-player { width: 100%; margin-inline: 0; aspect-ratio: 16 / 10; border-radius: 10px; }
  .hero-switch { border-radius: 8px; }
  .hero-switch-direction { width: 32px; height: 32px; }
  .hero-switch-direction svg { width: 16px; height: 16px; }
  .hero-inset { width: 30%; border-radius: 5px; }
  .hero-inset-global { left: 2.2%; width: calc(30% * var(--input-scale, 1)); }
  .hero-inset-input { right: 2.2%; width: calc(30% * var(--input-scale, 1)); }
  .hero-inset-label { top: 4px; left: 4px; padding: 2px 3px; font-size: 5px; }
  .hero-demo-meta { top: 10px; left: 10px; gap: 7px; padding: 5px 7px; font-size: 7px; }
  .hero-timeline { gap: 8px; padding: 10px; }
  .hero-time { min-width: 34px; font-size: 9px; }
  .hero-video-control { width: 32px; height: 32px; flex-shrink: 0; }
  .hero-demo-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
  .hero-demo-chip { padding: 3px; border-radius: 8px; }
  .hero-demo-chip-media { border-radius: 5px; }
  .hero-demo-chip-number { top: 5px; left: 5px; padding: 2px 4px; font-size: 7px; }
  .hero-demo-chip-name { padding: 7px 3px 4px; font-size: 9px; }
  .hero-title-wrap { margin-bottom: 16px; }
  .section-kicker { margin-bottom: 11px; font-size: 9px; }
  .section-heading-row h2 { font-size: 28px; }
  .section-heading-row>p { font-size: 12px; line-height: 1.75; }
  .scene-tabs { gap: 12px; }
  .scene-card { padding-bottom: 13px; }
  .card-preview { border-radius: 7px; }
  .card-caption { gap: 8px; margin-top: 12px; }
  .card-index { padding-top: 2px; font-size: 8px; }
  .card-text { font-size: 12px; }
  .card-subtitle { margin-top: 4px; font-size: 10px; }
  .card-selection { width: 23px; height: 23px; }
  .card-selection svg { width: 12px; height: 12px; }
  .card-tag { margin: 9px 0 0; font-size: 8px; }
  .viewer-shell { width: calc(100% + 12px); margin-inline: -6px; border-radius: 11px; }
  .viewer-stage { height: min(66svh, 540px); min-height: 430px; }
  .viewer-scene-meta { gap: 8px; font-size: 11px; }
  .viewer-tools { gap: 6px; }
  .viewer-tools .icon-button { width: 34px; height: 34px; }
  .video-inset { top: 62px; right: 12px; width: 126px; border-radius: 6px; }
  .inset-label { padding: 7px 8px; font-size: 7px; }
  .inset-camera-action { display: none; }
  .video-unavailable { inset-block-start: 27px; font-size: 9px; }
  .viewer-controls { padding-inline: 13px; }
  .timeline-row { display: grid; grid-template-columns: 38px auto minmax(45px, 1fr) auto auto; gap: 9px; min-height: 82px; padding-block: 10px; }
  .camera-stream-meta { margin-bottom: 4px; font-size: 6px; letter-spacing: .3px; }
  .camera-stream-meta span:last-child { display: none; }
  .camera-stream-track { height: 40px; }
  .camera-thumb { left: clamp(31px, var(--progress), calc(100% - 31px)); width: 62px; height: 46px; }
  .play-button { width: 36px; height: 36px; }
  .time-label { font-size: 9px; }
  .speed-label { padding-left: 7px; }
  .speed-label select { padding-inline: 2px; font-size: 10px; }
  .layers-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; padding-block: 9px 12px; }
  .layer-toggle { min-height: 38px; font-size: 11px; }
  .point-size-label { grid-column: 1 / -1; gap: 12px; margin-top: 4px; }
  .point-size-label input { width: auto; flex: 1; }
  .viewer-bottomline { right: 14px; bottom: 14px; left: 14px; gap: 12px; }
  .interaction-hint { max-width: 190px; font-size: 7px; letter-spacing: 0; }
  .interaction-hint i { padding-inline: 3px; }
  .viewer-stat { max-width: 112px; padding-right: 0; font-size: 7px; }
  .orientation { display: none; }
  .viewer-caption { gap: 9px; padding-top: 16px; font-size: 8px; }
  .legend-dot:not(:first-child) { margin-left: 12px; }
  .footer { padding-block: 24px 28px; }
  .footer .paper-logo { width: 36px; }
}

@media (max-width: 370px) {
  .wordmark-label, .wordmark-rule { display: none; }
  .card-index { display: none; }
  .card-text { font-size: 11px; }
  .card-subtitle { font-size: 9px; }
  .card-selection { width: 21px; height: 21px; }
  .timeline-row { grid-template-columns: 36px auto minmax(35px, 1fr) auto; }
  .speed-label { display: none; }
  .viewer-caption>p { font-size: 7px; }
}

@media (pointer: coarse) {
  .desktop-hint { display: none; }
  .touch-hint { display: inline; }
  .layer-toggle { min-height: 42px; }
  .point-size-label { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
