:root {
  color-scheme: dark;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #edf0f3;
  background: #15191f;
  --accent: #f5ad45;
  --muted: #a0a8b2;
  --border: #ffffff18;
  --panel: rgba(24, 29, 35, 0.95);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button {
  border: 0;
  background: none;
}
button:hover {
  filter: brightness(1.13);
}
[hidden] {
  display: none !important;
}
#app {
  height: 100dvh;
  min-height: 440px;
  position: relative;
}
#viewport {
  position: absolute;
  inset: 0 350px 0 0;
  overflow: hidden;
  background: #10161a;
}
canvas {
  display: block;
  touch-action: none;
}
.topbar {
  position: absolute;
  inset: 0 0 auto;
  height: 76px;
  padding: 0 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(#101519ba, transparent);
  z-index: 5;
}
.wordmark {
  font-size: 13px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.wordmark strong {
  font-weight: 800;
}
.mark {
  font-size: 29px;
  color: var(--accent);
  line-height: 1;
  margin-right: 7px;
}
.version {
  margin-left: 7px;
  border: 1px solid #ffffff40;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 10px;
  letter-spacing: 0.05em;
}
.top-actions {
  display: flex;
  gap: 6px;
}
.quiet {
  font-size: 13px;
  font-weight: 500;
  background: #171d2499;
  border: 1px solid #ffffff20;
  border-radius: 7px;
  padding: 8px 11px;
  backdrop-filter: blur(15px);
}
.mobile-control {
  display: none;
}
.panel {
  position: absolute;
  right: 18px;
  top: 76px;
  bottom: 21px;
  width: 314px;
  background: var(--panel);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 23px 21px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #4d5359 transparent;
  z-index: 4;
  box-shadow: 0 18px 80px #0003;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
h1 {
  font-size: 20px;
  letter-spacing: -0.035em;
  line-height: 1.4;
  margin: 5px 0 20px;
  font-weight: 550;
}
.revision {
  font-size: 12px;
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 6px;
  color: var(--muted);
  align-self: flex-start;
}
.tabs {
  display: flex;
  background: #10151b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 22px;
}
.tabs button {
  flex: 1;
  font-size: 13px;
  padding: 8px;
  border-radius: 5px;
  color: var(--muted);
}
.tabs .selected {
  background: #343a43;
  color: #fff;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 12px;
}
.section-title > span {
  font-size: 11px;
  letter-spacing: 0;
}
.flight-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #ffffff30;
  background: #ffffff07;
  border-radius: 8px;
  padding: 13px 8px;
  font-size: 14px;
  margin-bottom: 18px;
}
.flight-button[aria-pressed="true"] {
  border-color: #f5ad4560;
  background: #f5ad4515;
  color: var(--accent);
}
.flight-icon {
  font-size: 11px;
}
.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #dfe3e7;
  gap: 12px;
  margin-top: 16px;
}
.range-label output {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}
input[type="range"] {
  appearance: none;
  width: 100%;
  height: 4px;
  background: #4a5058;
  border-radius: 4px;
  display: block;
  margin: 13px 0 22px;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e8ec;
  border: 2px solid #f9fafb;
  box-shadow: 0 0 0 3px #ffffff07;
}
input[type="range"]:hover::-webkit-slider-thumb {
  background: var(--accent);
  border-color: var(--accent);
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin: 14px 0;
  color: #dfe3e7;
}
.switch-row label {
  cursor: pointer;
}
.switch-row input {
  appearance: none;
  width: 29px;
  min-width: 29px;
  height: 17px;
  background: #444b54;
  border-radius: 12px;
  margin: 0;
  cursor: pointer;
  position: relative;
  transition: 0.2s;
}
.switch-row input:before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 100%;
  background: #ddd;
  top: 3px;
  left: 3px;
  transition: 0.2s;
}
.switch-row input:checked {
  background: var(--accent);
}
.switch-row input:checked:before {
  background: #262220;
  left: 15px;
}
.divider {
  border-top: 1px solid var(--border);
  margin: 23px 0 20px;
}
.text-button {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  margin: 11px 0;
}
.view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 18px;
}
.view-grid button,
.secondary {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 7px;
  font-size: 12px;
  background: #ffffff04;
}
.view-grid button.selected {
  border-color: #f5ad4580;
  background: #f5ad4510;
  color: var(--accent);
}
.wide {
  width: 100%;
}
.select-row {
  display: flex;
  gap: 9px;
}
.select-row label {
  font-size: 11px;
  color: var(--muted);
  flex: 1;
}
.select-row select {
  appearance: none;
  width: 100%;
  display: block;
  color: #edf0f3;
  background: #11171e;
  border: 1px solid #ffffff1f;
  border-radius: 6px;
  padding: 10px 8px;
  font-size: 12px;
  margin-top: 7px;
  cursor: pointer;
}
.capture-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  background: var(--accent);
  color: #292216;
  border: 1px solid #ffcc79;
  border-radius: 8px;
  padding: 14px 6px;
  font-size: 14px;
  font-weight: 650;
  margin-top: 17px;
  box-shadow: 0 3px 20px #f5ad4512;
}
.capture-button span {
  font-size: 18px;
  line-height: 1;
}
.model-download {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 20px;
}
.model-download:hover {
  color: white;
}
.model-download span {
  font-size: 16px;
}
.modebar {
  position: absolute;
  top: 50%;
  left: 22px;
  transform: translateY(-65%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: #151b22dd;
  backdrop-filter: blur(15px);
  border: 1px solid #ffffff26;
  border-radius: 11px;
  z-index: 3;
}
.modebar button {
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 49px;
  min-height: 51px;
  justify-content: center;
  border-radius: 6px;
  color: #b8c0c9;
}
.modebar button span {
  font-size: 21px;
  line-height: 1;
}
.modebar button.selected {
  background: #f5ad4520;
  color: var(--accent);
}
.scene-label {
  position: absolute;
  left: 27px;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-shadow: 0 1px 5px #0008;
  pointer-events: none;
}
#environmentName {
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.015em;
}
#sceneStatus {
  font-size: 11px;
  color: #d2d7db;
}
.environments {
  position: absolute;
  bottom: 23px;
  left: 25px;
  right: 376px;
  z-index: 3;
}
.environment-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 10px;
  color: #e6ebee;
  letter-spacing: 0.15em;
  text-shadow: 0 1px 4px #0009;
}
.environment-header a {
  font-size: 10px;
  letter-spacing: 0;
  color: #d7dde3;
  text-decoration: none;
}
.environment-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.environment-grid button {
  height: 80px;
  background-image: linear-gradient(transparent, #000b), var(--thumb);
  background-size:
    cover,
    auto 200%;
  background-position:
    center,
    center 45%;
  border-radius: 8px;
  border: 1px solid #ffffff35;
  text-align: left;
  padding: 9px;
  display: flex;
  align-items: end;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px #0003;
}
.environment-grid button span {
  font-size: 12px;
  font-weight: 550;
  text-shadow: 0 1px 4px #000;
}
.environment-grid button.selected {
  border: 2px solid var(--accent);
  padding: 8px;
}
.environment-grid button.selected:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--accent);
  position: absolute;
  top: 8px;
  right: 8px;
}
#loading {
  position: absolute;
  left: calc((100% - 350px) / 2);
  top: 40%;
  transform: translate(-50%, -50%);
  background: #151b22e8;
  border: 1px solid #ffffff22;
  backdrop-filter: blur(15px);
  padding: 15px 21px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  z-index: 8;
  white-space: nowrap;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff25;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#reference {
  position: absolute;
  top: 83px;
  left: 25px;
  width: min(380px, calc(100vw - 50px));
  background: #fff;
  border: 1px solid #ffffff50;
  border-radius: 10px;
  box-shadow: 0 10px 45px #0007;
  z-index: 7;
  overflow: hidden;
}
.reference-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
  background: #eff1f4;
  padding: 8px 14px;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.reference-head button {
  color: #444;
  font-size: 21px;
  line-height: 1;
  padding: 0 3px;
}
#reference img {
  display: block;
  width: 100%;
  height: 255px;
  object-fit: contain;
}
#photos {
  position: absolute;
  left: 25px;
  bottom: 142px;
  display: flex;
  gap: 7px;
  z-index: 3;
}
#photos a {
  display: block;
  border: 1px solid #ffffff55;
  width: 65px;
  height: 45px;
  border-radius: 5px;
  overflow: hidden;
  background: #161c25;
  position: relative;
}
#photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#toast {
  position: absolute;
  left: calc((100% - 350px) / 2);
  bottom: 160px;
  transform: translateX(-50%);
  padding: 10px 16px;
  background: #131920ee;
  border: 1px solid #ffffff25;
  border-radius: 7px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 10;
}
#toast.show {
  opacity: 1;
}
#exitFocus {
  position: absolute;
  right: 20px;
  bottom: 20px;
  border: 1px solid #ffffff44;
  border-radius: 7px;
  padding: 10px 15px;
  background: #1b2128c9;
  z-index: 20;
  font-size: 12px;
}
.focus .topbar,
.focus .panel,
.focus .modebar,
.focus .environments,
.focus .scene-label,
.focus #photos,
.focus #reference {
  display: none;
}
.focus #viewport {
  right: 0;
}
.focus #exitFocus {
  display: block !important;
}
@media (min-width: 1700px) {
  .panel {
    right: 26px;
    width: 340px;
    padding: 25px;
  }
  #viewport {
    right: 390px;
  }
  .environments {
    right: 416px;
  }
  h1 {
    font-size: 23px;
  }
  .range-label,
  .switch-row {
    font-size: 14px;
  }
  .hint {
    font-size: 12px;
  }
}
@media (max-width: 900px) {
  #viewport {
    right: 0;
  }
  .topbar {
    height: 66px;
    padding: 0 17px;
    gap: 9px;
  }
  .wordmark {
    font-size: 11px;
    letter-spacing: 0.12em;
    gap: 4px;
  }
  .mark {
    font-size: 26px;
    margin-right: 4px;
  }
  .version {
    font-size: 9px;
    margin-left: 2px;
  }
  .top-actions {
    gap: 5px;
  }
  .quiet {
    font-size: 11px;
    padding: 7px 9px;
  }
  .mobile-control {
    display: block;
  }
  .panel {
    display: none;
    top: auto;
    bottom: 143px;
    right: 15px;
    left: 85px;
    width: auto;
    max-height: 52dvh;
    padding: 18px;
    z-index: 6;
  }
  .panel.open {
    display: block;
  }
  .panel-heading h1 {
    font-size: 19px;
    margin-bottom: 12px;
  }
  .scene-label {
    top: 82px;
    left: 19px;
  }
  .modebar {
    left: 15px;
    transform: translateY(-65%);
  }
  .environments {
    left: 17px;
    right: 17px;
    bottom: 20px;
  }
  .environment-grid {
    gap: 6px;
  }
  .environment-grid button {
    height: 67px;
    padding: 7px;
    border-radius: 6px;
  }
  .environment-grid button.selected {
    padding: 6px;
  }
  .environment-grid button span {
    font-size: 11px;
  }
  .environment-header {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .environment-header a {
    font-size: 9px;
  }
  #loading {
    left: 50%;
    top: 43%;
    font-size: 12px;
  }
  #photos {
    left: 18px;
    bottom: 120px;
  }
  #toast {
    left: 50%;
    bottom: 143px;
  }
  #reference {
    left: 17px;
    top: 74px;
  }
  #focusBtn {
    display: none;
  }
}
@media (max-width: 430px) {
  .wordmark {
    letter-spacing: 0.07em;
  }
  .version {
    display: none;
  }
  .topbar {
    padding: 0 12px;
  }
  .quiet {
    padding: 7px;
  }
  .mark {
    font-size: 24px;
  }
  .environment-grid button span {
    font-size: 10px;
  }
  .environment-header a {
    font-size: 8px;
  }
  .environments {
    left: 12px;
    right: 12px;
  }
  .panel {
    left: 75px;
    right: 12px;
  }
  .modebar {
    left: 12px;
  }
  .scene-label {
    left: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  .spinner {
    animation-duration: 1.6s;
  }
}
