:root {
  color-scheme: dark;
  --gold: #d8b775;
  --muted: #898b91;
  --line: rgba(211, 185, 133, 0.16);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #070a10;
  color: #ede4d4;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 13px;
  overflow: hidden;
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button {
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
button:hover:not(:disabled) {
  border-color: rgba(216, 183, 117, 0.6);
}
[hidden] {
  display: none !important;
}
#scene {
  position: fixed;
  inset: 0;
}
#scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 48%,
    transparent 30%,
    rgba(3, 5, 9, 0.28) 75%,
    rgba(3, 5, 9, 0.8)
  );
}
.topbar {
  position: absolute;
  top: 32px;
  left: 38px;
  right: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font:
    17px Georgia,
    serif;
  letter-spacing: 3px;
}
.brand small {
  display: block;
  font:
    9px "Microsoft YaHei",
    sans-serif;
  letter-spacing: 4px;
  color: #8e8a80;
  margin-top: 6px;
}
.brand-star {
  font-size: 35px;
  color: var(--gold);
  font-weight: 300;
}
.tools {
  display: flex;
  align-items: center;
  gap: 13px;
}
.quality-label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #95928c;
  font-size: 11px;
}
select {
  background: #10141c;
  color: #c9c0ae;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 11px;
}
.icon-button {
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 21px;
  color: #b8ac96;
}
.hero {
  position: absolute;
  top: 42px;
  width: 100%;
  text-align: center;
  pointer-events: none;
}
.hero p {
  font:
    9px Georgia,
    serif;
  letter-spacing: 5px;
  color: #a48b5e;
  margin: 0 0 12px;
}
.hero h1 {
  font:
    clamp(30px, 3.4vw, 52px) Georgia,
    "Times New Roman",
    serif;
  letter-spacing: 1.5px;
  font-weight: 400;
  color: #f1e5cd;
  margin: 0;
  text-shadow: 0 1px 25px #c9954930;
}
.hero-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 3px;
  color: #948570;
  margin-top: 16px;
}
.hero-rule span {
  display: block;
  width: 27px;
  height: 1px;
  background: #7e69423d;
}
.guide {
  position: absolute;
  left: 42px;
  top: 35%;
  color: #b3ac9f;
}
.eyebrow {
  font: 9px Georgia;
  letter-spacing: 2px;
  color: #77746b;
  margin-bottom: 27px;
}
.guide > div {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 22px 0;
}
.gesture-icon {
  width: 32px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 24px;
  filter: grayscale(0.75);
  opacity: 0.8;
}
.guide p:not(.eyebrow) {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
}
.guide small {
  display: block;
  color: #6f7278;
  margin-top: 7px;
  font-size: 10px;
  letter-spacing: 0;
}
.guide-foot {
  display: block;
  font-size: 10px;
  color: #666b74;
  margin-top: 27px;
}
.album {
  position: absolute;
  right: 38px;
  top: 34%;
  width: 158px;
}
.album-heading {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #a49d90;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.album-heading > span:last-child {
  font: 12px Georgia;
  color: var(--gold);
}
#thumbnails {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 113px;
  padding: 20px 0;
}
#thumbnails button {
  padding: 0;
  border: 1px solid #baa16a70;
  border-radius: 2px;
  width: 62px;
  height: 78px;
  overflow: hidden;
  background: #121922;
  transform: rotate(-9deg);
  box-shadow: 0 7px 15px #0006;
}
#thumbnails button + button {
  margin-left: -18px;
  transform: rotate(3deg);
}
#thumbnails button:last-child {
  transform: rotate(12deg);
}
#thumbnails button:hover {
  transform: translateY(-6px);
  z-index: 3;
}
#thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-button {
  width: 100%;
  border: 1px solid var(--line);
  background: #11151b99;
  border-radius: 6px;
  padding: 11px 0;
  color: #d9c7a1;
  font-size: 11px;
}
.upload-button span {
  font-size: 16px;
  margin-right: 4px;
}
.album > p {
  color: #666c74;
  font-size: 9px;
  text-align: center;
  line-height: 1.8;
}
.camera-panel {
  position: absolute;
  left: 38px;
  bottom: 73px;
  width: 240px;
  background: linear-gradient(120deg, #121923ab, #0b0f17bb);
  border: 1px solid #ffffff0b;
  padding: 16px;
  border-radius: 10px;
  backdrop-filter: blur(16px);
}
.camera-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c0bbb1;
  font-size: 11px;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #77808b;
}
.status-dot.on {
  background: #a7cfa5;
  box-shadow: 0 0 9px #b2d69c66;
}
.local-pill {
  font-size: 8px;
  letter-spacing: 1px;
  color: #8f9b91;
  background: #a0ca9b09;
  border: 1px solid #a0ca9b12;
  border-radius: 20px;
  padding: 3px 6px;
  margin-left: auto;
}
.camera-panel p {
  font-size: 10px;
  color: #727984;
  line-height: 1.7;
  margin: 10px 0;
}
#camera-options {
  margin: 10px 0;
}
#camera-options label {
  display: block;
  color: #a49d90;
  font-size: 10px;
  margin-bottom: 6px;
}
#camera-device {
  width: 100%;
  border-radius: 5px;
  padding: 6px;
}
#camera-device-note {
  margin: 6px 0 0;
  font-size: 9px;
}
@media (min-width: 1001px) {
  body.camera-options-visible .guide {
    top: 25%;
  }
  body.camera-options-visible .guide-foot {
    display: none;
  }
  body.camera-options-visible.camera-on .guide {
    top: 16%;
  }
  body.camera-options-visible.camera-on .guide > div {
    margin: 8px 0;
  }
  body.camera-options-visible.camera-on .guide .eyebrow {
    margin-bottom: 14px;
  }
}
.primary-button {
  background: #d7b778;
  color: #171614;
  border: 1px solid #e2c48e;
  width: 100%;
  border-radius: 5px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
}
.primary-button:hover {
  background: #e6c993;
  transform: translateY(-1px);
}
#camera-preview {
  position: relative;
  width: 100%;
  height: 122px;
  overflow: hidden;
  border-radius: 5px;
  margin-top: 12px;
  background: #080b10;
}
#webcam,
#hand-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleX(-1);
}
#gesture-label {
  position: absolute;
  bottom: 6px;
  left: 5px;
  right: 5px;
  text-align: center;
  font-size: 9px;
  background: #06090bc0;
  border-radius: 4px;
  padding: 4px;
}
.mode-dock {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  background: #10151cbd;
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 12px;
  backdrop-filter: blur(18px);
}
.mode-dock button {
  border: 1px solid transparent;
  background: transparent;
  color: #7e828a;
  padding: 11px 17px;
  border-radius: 7px;
  white-space: nowrap;
  font-size: 11px;
}
.mode-dock button span {
  font-size: 17px;
  margin-right: 8px;
}
.mode-dock button.active {
  color: #e7c88c;
  background: #c7a46116;
  border-color: #d7b77826;
}
.footer {
  position: absolute;
  bottom: 26px;
  left: 38px;
  right: 38px;
  display: flex;
  justify-content: space-between;
  color: #505963;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.footer span:nth-child(2) {
  color: #686960;
  letter-spacing: 3px;
}
.footer span:first-child {
  color: #939084;
}
.focus-caption {
  position: absolute;
  left: 50%;
  bottom: 155px;
  transform: translateX(-50%);
  text-align: center;
  max-width: 45vw;
}
.focus-caption > span {
  font: 11px Georgia;
  letter-spacing: 4px;
  color: #b39a6b;
}
.focus-caption > p {
  font-size: 12px;
  color: #d0c5b4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 360px;
  margin: 9px 0;
}
.focus-caption > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.focus-caption button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0d1118cc;
}
.focus-caption div span {
  font-size: 9px;
  color: #7e7e7b;
}
#restore-ui {
  position: absolute;
  right: 22px;
  bottom: 22px;
  font-size: 10px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0b1018a0;
  color: #8b8273;
}
body.immersive .chrome,
body.immersive .focus-caption {
  display: none !important;
}
#toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 13px 20px;
  background: #20232cfa;
  border: 1px solid #d7b77840;
  border-radius: 8px;
  max-width: 80vw;
  max-height: 35vh;
  overflow: auto;
  white-space: pre-line;
  font-size: 11px;
  line-height: 1.8;
  color: #e4d5bb;
  z-index: 10;
}
#error-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(450px, 90vw);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10151fee;
  z-index: 20;
}
#error-panel p {
  color: #a8a9aa;
  line-height: 1.8;
}
#error-panel button {
  background: #d7b778;
  color: #111;
  border: 0;
  padding: 10px 20px;
  border-radius: 6px;
}
@media (max-width: 1000px) {
  .guide {
    display: none;
  }
  .hero {
    top: 68px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .album {
    right: 24px;
    width: 130px;
  }
  .camera-panel {
    width: 205px;
    left: 24px;
  }
  .topbar {
    left: 24px;
    right: 24px;
    top: 22px;
  }
  .mode-dock button {
    padding: 10px 12px;
  }
  .footer {
    left: 24px;
    right: 24px;
  }
  .footer span:nth-child(2) {
    display: none;
  }
}
@media (max-width: 650px) {
  .brand {
    font-size: 13px;
    letter-spacing: 2px;
  }
  .brand small {
    font-size: 8px;
  }
  .hero {
    top: 92px;
  }
  .hero p {
    font-size: 7px;
    letter-spacing: 3px;
  }
  .hero h1 {
    font-size: 33px;
  }
  .hero-rule {
    font-size: 8px;
    letter-spacing: 2px;
    margin-top: 12px;
  }
  .album {
    top: auto;
    bottom: 145px;
    right: 15px;
    width: 113px;
  }
  .album-heading {
    font-size: 9px;
  }
  #thumbnails {
    display: none;
  }
  .album > p {
    font-size: 8px;
  }
  .upload-button {
    margin-top: 10px;
  }
  .camera-panel {
    bottom: 140px;
    left: 15px;
    width: 175px;
    padding: 12px;
  }
  .camera-panel p {
    font-size: 9px;
  }
  .local-pill {
    display: none;
  }
  .primary-button {
    padding: 9px;
  }
  .camera-status {
    font-size: 10px;
  }
  .mode-dock {
    bottom: 64px;
  }
  .mode-dock button {
    padding: 10px;
    font-size: 10px;
  }
  .mode-dock button span {
    margin-right: 5px;
  }
  .footer {
    bottom: 22px;
    left: 18px;
    right: 18px;
    font-size: 8px;
  }
  .topbar {
    left: 18px;
    right: 18px;
  }
  .quality-label {
    font-size: 0;
    gap: 0;
  }
  .tools {
    gap: 7px;
  }
  .icon-button {
    width: 29px;
    height: 29px;
  }
  .focus-caption {
    bottom: 290px;
    max-width: 90vw;
  }
  .focus-caption > p {
    max-width: 270px;
  }
  #camera-preview {
    height: 92px;
  }
}

@media (min-width: 1001px) {
  body.camera-on .guide {
    top: 24%;
  }
  body.camera-on .guide > div {
    margin: 12px 0;
  }
  body.camera-on .guide-foot {
    display: none;
  }
}
