:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f4f6f8;
  color: #18212f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f5f7f9;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(24, 33, 47, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.brand-link,
.site-header a {
  color: #18212f;
  text-decoration: none;
}

.brand-link {
  font-weight: 760;
  letter-spacing: 0;
}

.site-header nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.container {
  width: min(1440px, calc(100vw - 48px));
  margin: 0 auto;
}

.page-section {
  padding: 58px 0 76px;
}

.project-title-section {
  padding: 50px 0 42px;
  background: #f5f7f9;
  text-align: center;
}

.project-title-section .container {
  max-width: 1180px;
}

.hero-section {
  background: #eef2f5;
}

.section-heading {
  max-width: 920px;
  margin-bottom: 24px;
}

#viewer .section-heading {
  max-width: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: #536070;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.35vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.title-note {
  color: #536070;
  font-size: 0.42em;
  font-weight: 620;
  white-space: nowrap;
}

.release-note {
  max-width: 820px;
  margin: 18px 0 0;
  color: #536070;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.45;
}

.source-link-row {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.4;
}

.source-link-row a {
  color: #325300;
  font-weight: 720;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.source-link-row a:hover {
  color: #1f3b00;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 28px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(24, 33, 47, 0.14);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(24, 33, 47, 0.08);
}

.hero-button-primary {
  border-color: #609c00;
  background: #76b900;
  color: #17210b;
}

.hero-button-primary:hover {
  background: #68a500;
}

.hero-button-secondary {
  background: #ffffff;
  color: #18212f;
}

.hero-button-secondary:hover {
  border-color: rgba(24, 33, 47, 0.26);
  background: #f8fafb;
}

.hero-button-disabled {
  background: #ffffff;
  color: #657284;
  cursor: default;
}

.framework-figure {
  max-width: 1100px;
  margin: 0 auto 24px;
}

.framework-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(24, 33, 47, 0.08);
}

.project-abstract {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px;
  border: 1px solid rgba(24, 33, 47, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #3a4654;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.64;
  text-align: left;
}

.license-section {
  padding: 46px 0 64px;
  background: #f5f7f9;
}

.license-card {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px 28px;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(24, 33, 47, 0.08);
  text-align: center;
}

.license-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.license-card p {
  max-width: 620px;
  margin: 0 auto 10px;
  color: #4a5665;
  font-size: 15px;
  line-height: 1.58;
}

.license-card a {
  color: #325300;
  font-weight: 720;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.license-card a:hover {
  color: #1f3b00;
}

.license-card .license-copyright {
  margin-bottom: 0;
  color: #657284;
  font-size: 14px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.play-instruction {
  margin: 16px 0 0;
  color: #18212f;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 760;
  line-height: 1.24;
}

.physics-note {
  max-width: 1040px;
  margin: 10px 0 0;
  color: #5d6876;
  font-size: 15px;
  line-height: 1.45;
}

.comparison-note {
  max-width: 980px;
  margin: 14px 0 0;
  color: #536070;
  font-size: 16px;
  line-height: 1.55;
}

.comparison-note a {
  color: #325300;
  font-weight: 720;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 18px;
}

.tab-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(24, 33, 47, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: #18212f;
  cursor: pointer;
}

.tab-button:hover {
  background: #f0f4f7;
}

.tab-button.is-active {
  border-color: #76b900;
  background: #eaf5dc;
  color: #325300;
}

.viewer-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: #eef2f5;
  box-shadow: 0 12px 34px rgba(24, 33, 47, 0.1);
}

.sim-root {
  position: relative;
  width: 100%;
  height: min(78vh, 780px);
  min-height: 480px;
  overflow: hidden;
  background: #eef2f5;
}

.gs-layer,
.sim-canvas {
  position: absolute;
  inset: 0;
}

.gs-layer {
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gs-viewer-mount {
  position: absolute;
  inset: 0;
}

.gs-layer canvas,
.sim-root canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.sim-canvas {
  z-index: 1;
}

.playground-hint-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.click-hint {
  position: absolute;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: hint-linger 5.8s ease-in-out forwards;
}

.click-hint-center {
  width: 72px;
  height: 72px;
}

.mouse-icon {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 26px;
  height: 38px;
  border: 2px solid rgba(24, 33, 47, 0.9);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(24, 33, 47, 0.18);
  transform: translateX(-50%);
}

.click-hint-center .mouse-icon {
  top: 10px;
  width: 32px;
  height: 46px;
  border-radius: 18px;
}

.mouse-button {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 14px;
  border-radius: 8px 0 5px 0;
  background: #76b900;
  animation: mouse-left-click 1.1s ease-in-out 5;
}

.click-hint-center .mouse-button {
  width: 10px;
  height: 17px;
}

.click-ring {
  position: absolute;
  top: 27px;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(118, 185, 0, 0.78);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  animation: click-ring-pulse 1.1s ease-out 5;
}

.click-hint-center .click-ring {
  top: 34px;
  width: 24px;
  height: 24px;
}

@keyframes hint-linger {
  0%,
  100% {
    opacity: 0;
  }
  8%,
  82% {
    opacity: 1;
  }
}

@keyframes mouse-left-click {
  0%,
  52%,
  100% {
    opacity: 0.95;
    transform: translateY(0);
  }
  18%,
  32% {
    opacity: 1;
    transform: translateY(3px);
  }
}

@keyframes click-ring-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  20% {
    opacity: 0.95;
  }
  68%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.9);
  }
}

.character-control-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  max-width: min(460px, calc(100% - 48px));
  padding: 12px 18px;
  border-radius: 6px;
  background: rgba(76, 82, 90, 0.86);
  box-shadow: 0 14px 34px rgba(24, 33, 47, 0.22);
  color: #ffffff;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: character-hint-flash 1s ease-in-out 3;
}

@keyframes character-hint-flash {
  0%,
  100% {
    opacity: 0;
  }
  18%,
  82% {
    opacity: 1;
  }
}

.toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 36px rgba(24, 33, 47, 0.12);
  backdrop-filter: blur(12px);
}

.toolbar-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand {
  min-width: 0;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 650;
  line-height: 28px;
  white-space: nowrap;
}

.toolbar button {
  height: 30px;
  min-width: 72px;
  padding: 0 10px;
  border: 1px solid rgba(24, 33, 47, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #18212f;
  cursor: pointer;
}

.toolbar button:hover {
  background: #f6f8fa;
}

.toolbar .panel-toggle,
.panel-toggle {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(24, 33, 47, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #18212f;
  cursor: pointer;
  font-weight: 700;
  line-height: 28px;
}

.toolbar .panel-toggle:hover,
.panel-toggle:hover {
  background: #f6f8fa;
}

.toolbar button[aria-pressed="true"] {
  border-color: #2871cc;
  background: #e9f2ff;
  color: #14549e;
}

.status {
  min-width: 54px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 28px;
  color: #5c6878;
}

.scene-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  width: min(390px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 36px rgba(24, 33, 47, 0.12);
  backdrop-filter: blur(12px);
}

.robot-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100% - 32px);
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 36px rgba(24, 33, 47, 0.12);
  backdrop-filter: blur(12px);
}

.collapsible-panel {
  transition:
    width 160ms ease,
    max-height 160ms ease,
    padding 160ms ease,
    transform 160ms ease;
}

.collapsible-panel.is-collapsed {
  width: auto;
  min-width: 0;
  padding: 6px;
  overflow: visible;
}

.collapsible-panel.is-collapsed .panel-body {
  display: none;
}

.toolbar.is-collapsed {
  left: 8px;
}

.scene-panel.is-collapsed {
  left: 8px;
}

.robot-panel.is-collapsed {
  right: 8px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.manifest-row {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 18px;
  color: #536070;
}

.manifest-row input,
.manifest-row select {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid rgba(24, 33, 47, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #18212f;
  font: inherit;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
  font-size: 11px;
}

.scene-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.scene-actions button {
  height: 30px;
  min-width: 70px;
  padding: 0 10px;
  border: 1px solid rgba(24, 33, 47, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #18212f;
  cursor: pointer;
}

.scene-actions button:hover {
  background: #f6f8fa;
}

.scene-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
  color: #536070;
  cursor: pointer;
  font-size: 12px;
  line-height: 30px;
  user-select: none;
}

.inline-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2871cc;
}

.robot-actions {
  margin-top: 8px;
}

.asset-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(24, 33, 47, 0.1);
}

.generated-status,
.robot-status {
  margin-top: 2px;
  font-size: 12px;
  line-height: 18px;
  color: #667281;
}

.generated-status {
  margin-top: 10px;
}

.robot-base-controls {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(24, 33, 47, 0.1);
}

.base-control-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

.base-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.base-axis-label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  line-height: 14px;
  color: #667281;
}

.base-axis-label input {
  width: 100%;
  height: 26px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid rgba(24, 33, 47, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #18212f;
  font: inherit;
  font-size: 12px;
}

.joint-controls {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.joint-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.joint-label {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: 11px;
  line-height: 14px;
}

.joint-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.joint-value {
  color: #667281;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.joint-row input[type="range"] {
  width: 100%;
  height: 24px;
  min-width: 0;
  accent-color: #2871cc;
}

.hybrid-viewer {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: #111820;
}

.hybrid-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hybrid-viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #dfe7ef;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  background: #111820;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.reconstructed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.viewer-card,
.media-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.08);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(24, 33, 47, 0.1);
  font-size: 13px;
  font-weight: 720;
}

.muted {
  color: #657284;
  font-weight: 560;
}

.comparison-viewer-shell,
.scene-only-root {
  position: relative;
  width: 100%;
  height: clamp(360px, 42vw, 560px);
  overflow: hidden;
  background: #e6ebef;
}

.reconstructed-viewer-shell {
  height: clamp(460px, 52vw, 720px);
}

.reconstructed-viewer-root.scene-only-root {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-only-root .gs-layer,
.scene-only-root .sim-canvas {
  position: absolute;
  inset: 0;
}

.scene-only-root canvas,
.mesh-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.media-card img,
.media-card video {
  display: block;
  width: 100%;
  height: clamp(360px, 42vw, 560px);
  object-fit: contain;
  background: #e6ebef;
}

.viewer-input-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: block;
  width: min(240px, 28%);
  max-height: calc(100% - 32px);
  object-fit: contain;
  border: 1px solid rgba(24, 33, 47, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(24, 33, 47, 0.18);
  pointer-events: none;
}

.viewer-input-overlay.playground-input-overlay {
  top: auto;
  bottom: 16px;
  left: 16px;
  z-index: 3;
  width: min(220px, 22%);
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #536070;
  font-size: 13px;
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1020px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .comparison-viewer-shell,
  .scene-only-root,
  .media-card img,
  .media-card video {
    height: min(72vh, 520px);
  }

  .reconstructed-viewer-shell,
  .reconstructed-viewer-root.scene-only-root {
    height: min(72vh, 560px);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 16px;
  }

  .site-header nav {
    gap: 10px;
    font-size: 13px;
  }

  .container {
    width: min(100vw - 28px, 1440px);
  }

  .page-section {
    padding: 38px 0 52px;
  }

  .project-title-section {
    padding: 38px 0 34px;
  }

  .hero-button {
    width: 100%;
  }

  .project-abstract {
    padding: 18px;
  }

  .tab-button {
    flex: 1 1 auto;
    min-width: 118px;
  }

  .toolbar {
    right: 12px;
    left: 12px;
    flex-wrap: wrap;
  }

  .toolbar-content {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 100%;
    line-height: 22px;
  }

  .robot-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .scene-panel {
    top: 112px;
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
  }

  .toolbar.is-collapsed,
  .scene-panel.is-collapsed {
    right: auto;
    left: 8px;
    width: auto;
  }

  .robot-panel.is-collapsed {
    right: 8px;
    left: auto;
    width: auto;
  }

  .viewer-input-overlay {
    top: 12px;
    left: 12px;
    width: min(180px, 44%);
  }

  .viewer-input-overlay.playground-input-overlay {
    top: auto;
    bottom: 12px;
    width: min(180px, 38%);
  }

}
