:root {
  font-family:
    "SF Pro Display",
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Consistent spacing / radius / elevation scale used across the UI chrome
     (header, settings panel, dialogs, footer). The 3D viewer overlay keeps
     its own percentage-based geometry and is intentionally untouched. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #86868b;
  --hairline: #e4e4e8;
  --surface: #ffffff;
  --surface-veil: rgba(255, 255, 255, 0.96);
  --shadow-card: 0 20px 60px rgba(20, 20, 24, 0.08);
  --shadow-pop: 0 24px 80px rgba(20, 20, 24, 0.16);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: #f5f5f7;
}
h1 {
  width: 78.8%;
  margin: 0 auto 28px;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}
main {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px 0 24px;
  box-sizing: border-box;
}
.viewer {
  position: relative;
  width: 87.3%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
}
#render {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}
#render:active {
  cursor: grabbing;
}
#render canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#fallback {
  position: absolute;
  width: 62%;
  height: 90%;
  right: 0;
  top: 5%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.3s;
}
.ready #fallback {
  opacity: 0;
}
.controls {
  position: absolute;
  left: 6.25%;
  top: 12%;
  width: 29.4%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
  z-index: 3;
}
.item {
  max-width: 100%;
  pointer-events: auto;
}
.item-button {
  font: 600 20px/1.3 inherit;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 0;
  border-radius: 50px;
  padding: 19px 28px 19px 15px;
  background: #efeff1;
  color: #1d1d1f;
  cursor: pointer;
  text-align: left;
  min-height: 60px;
  transition: background 0.18s;
}
.item-button:hover {
  background: #e5e5e8;
}
.plus {
  width: 25px;
  height: 25px;
  border: 1.3px solid #454548;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  flex-shrink: 0;
}
.item.active {
  width: 100%;
}
.item.active .item-button {
  display: none;
}
.panel {
  display: none;
  background: #efeff1;
  border-radius: 30px;
  padding: 29px 30px 23px;
  line-height: 1.42;
  font-size: 20px;
  letter-spacing: -0.25px;
  animation: reveal 0.25s ease-out;
  text-wrap: pretty;
}
.active .panel {
  display: block;
}
.panel p {
  margin: 0;
}
.panel strong {
  font-weight: 600;
}
.panel label {
  display: block;
  font-size: 13px;
  letter-spacing: 0;
  color: #6e6e73;
  margin: 19px 0 5px;
}
.slider-wrap {
  position: relative;
  height: 42px;
}
.slider-wrap input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 42px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
  z-index: 2;
}
.slider-wrap input::-webkit-slider-runnable-track {
  height: 19px;
  border-radius: 20px;
  background: #d2d2d7;
}
.slider-wrap input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 66px;
  height: 44px;
  border-radius: 25px;
  background: #0071e3;
  box-shadow: 0 3px 7px #0004;
  margin-top: -12.5px;
  border: 0;
}
.slider-wrap input::-moz-range-track {
  height: 19px;
  border-radius: 20px;
  background: #d2d2d7;
}
.slider-wrap input::-moz-range-thumb {
  width: 66px;
  height: 44px;
  border: 0;
  border-radius: 25px;
  background: #0071e3;
  box-shadow: 0 3px 7px #0004;
}
.slider-glyph {
  position: absolute;
  left: calc(33px + (100% - 66px) * var(--value, 0.333));
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  z-index: 3;
  pointer-events: none;
  display: flex;
}
.slider-glyph svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.round {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #efeff1;
  color: #1d1d1f;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.round:hover {
  background: #e2e2e5;
}
.round:disabled {
  opacity: 0.38;
  cursor: default;
}
.round svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.close {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 4;
}
.navigation {
  position: absolute;
  left: 1.9%;
  top: 45%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 4;
}
.loading {
  position: absolute;
  left: 68%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #555;
  background: #fffffff0;
  border-radius: 30px;
  padding: 12px 18px;
  pointer-events: none;
  z-index: 2;
}
.loading span {
  width: 15px;
  height: 15px;
  border: 2px solid #ddd;
  border-top-color: #0071e3;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.ready .loading {
  display: none;
}
.reopen {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  border: 0;
  border-radius: 40px;
  padding: 19px 25px;
  font: 600 18px/1.2 inherit;
  font-family: inherit;
  background: #efeff1;
  cursor: pointer;
  white-space: nowrap;
  z-index: 4;
}
.reopen span {
  margin-left: 15px;
  color: #0071e3;
}
.free-hint {
  position: absolute;
  bottom: 95px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  color: #6e6e73;
  pointer-events: none;
  z-index: 4;
}
[hidden] {
  display: none !important;
}
.free .controls,
.free .navigation,
.free .close {
  display: none;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #0071e3;
  outline-offset: 5px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes reveal {
  from {
    opacity: 0.35;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1800px) {
  h1 {
    font-size: 64px;
    margin-bottom: 32px;
  }
  .controls {
    gap: 14px;
  }
  .item-button {
    font-size: 22px;
    min-height: 70px;
    padding: 20px 33px 20px 19px;
  }
  .panel {
    font-size: 22px;
    padding: 35px;
  }
  .panel label {
    font-size: 15px;
  }
  .round {
    width: 45px;
    height: 45px;
  }
}
@media (max-width: 1100px) and (min-width: 735px) {
  h1 {
    font-size: 44px;
    margin-bottom: 24px;
  }
  .viewer {
    width: 92%;
  }
  .controls {
    left: 7%;
    width: 33%;
    top: 10%;
    gap: 10px;
  }
  .item-button {
    font-size: 17px;
    padding: 14px 22px 14px 14px;
    min-height: 52px;
  }
  .panel {
    font-size: 17px;
    padding: 23px;
  }
  .navigation {
    left: 1.5%;
    gap: 18px;
  }
  .round {
    width: 34px;
    height: 34px;
  }
}
@media (max-width: 734px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }
  main {
    height: auto;
    min-height: 100%;
    display: block;
    padding-top: 28px;
    padding-bottom: 36px;
  }
  h1 {
    width: 87%;
    font-size: 34px;
    letter-spacing: -1.1px;
    margin-bottom: 28px;
  }
  .viewer {
    width: 93%;
    height: 880px;
    min-height: 0;
    flex: none;
    border-radius: 26px;
  }
  #render {
    bottom: auto;
    height: 430px;
  }
  #fallback {
    width: 100%;
    height: 400px;
    top: 18px;
  }
  .controls {
    left: 6%;
    top: 430px;
    width: 88%;
    gap: 9px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .item.active {
    order: -1;
    flex-basis: 100%;
    margin-bottom: 9px;
  }
  .panel {
    font-size: 17px;
    padding: 22px 25px;
    border-radius: 25px;
  }
  .item-button {
    font-size: 15px;
    min-height: 44px;
    gap: 8px;
    padding: 10px 17px 10px 12px;
  }
  .plus {
    width: 21px;
    height: 21px;
    font-size: 18px;
  }
  .panel label {
    margin-top: 15px;
  }
  .navigation {
    left: 24px;
    top: 373px;
    flex-direction: row;
    gap: 10px;
  }
  .close {
    right: 17px;
    top: 17px;
  }
  .round {
    width: 35px;
    height: 35px;
  }
  .loading {
    left: 50%;
    top: 220px;
  }
  .free #render {
    height: 760px;
  }
  .free-hint {
    bottom: 95px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (min-width: 1101px) {
  h1 {
    font-size: clamp(40px, 2.9vw, 64px);
    margin-left: 6.35%;
    margin-bottom: 1.6vw;
    width: auto;
  }
  .viewer {
    margin-left: 5.13%;
    margin-right: auto;
    width: 89.7%;
  }
  .controls {
    gap: 0.684vw;
  }
  .item-button {
    font-size: 1.074vw;
    min-height: 3.42vw;
    padding: 0.98vw 1.61vw 0.98vw 0.928vw;
    gap: 0.85vw;
  }
  .plus {
    width: 1.42vw;
    height: 1.42vw;
    font-size: 1.2vw;
  }
  .panel {
    font-size: 1.074vw;
    padding: 1.71vw;
    border-radius: 1.66vw;
  }
  .panel label {
    font-size: 0.733vw;
    margin-top: 1.17vw;
  }
  .slider-wrap {
    height: 2.45vw;
  }
  .slider-wrap input {
    height: 2.45vw;
  }
  .slider-wrap input::-webkit-slider-thumb {
    width: 3.66vw;
    height: 2.45vw;
    margin-top: -0.685vw;
  }
  .slider-wrap input::-webkit-slider-runnable-track {
    height: 1.08vw;
  }
  .slider-glyph {
    left: calc(1.83vw + (100% - 3.66vw) * var(--value, 0.333));
  }
  .round {
    width: 2.2vw;
    height: 2.2vw;
  }
  .navigation {
    gap: 1.7vw;
  }
}
@media (min-width: 735px) {
  #render {
    left: 14%;
    right: -14%;
  }
  .free #render {
    left: 0;
    right: 0;
  }
}
@media (min-width: 1101px) {
  main {
    padding-top: 18px;
    padding-bottom: 22px;
  }
  .panel {
    padding-bottom: 1.12vw;
  }
  .panel label {
    margin-top: 0.83vw;
  }
  #render {
    left: 15%;
    right: -15%;
  }
  .free #render {
    left: 0;
    right: 0;
  }
}
@media (min-width: 735px) and (max-width: 850px) {
  .viewer {
    min-height: 560px;
  }
}
