:root {
  color-scheme: dark;
  --paper: #f4eddb;
  --gold: #e5c686;
  --muted: #a7afa1;
  --line: rgba(210, 199, 157, 0.21);
  --serif: 'Baskervville', 'Noto Serif CJK SC', 'Songti SC', SimSun, Georgia, serif;
  --sans: 'DM Sans', 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  min-width: 300px;
  background: #081310;
}
body {
  margin: 0;
  color: var(--paper);
  font: 14px/1.6 var(--sans);
  background: radial-gradient(
    ellipse at 71% 37%,
    #14261e 0,
    #0d1c16 27%,
    #0a1712 51%,
    #09130f 77%,
    #07100c 100%
  );
}
body[data-scene='galaxy'] {
  background: radial-gradient(ellipse at 71% 40%, #1b2734 0, #101d29 30%, #0a1518 55%, #08120f 85%);
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
canvas:focus-visible {
  outline: 2px solid #ffd692;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.65;
  cursor: wait;
}
button {
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s,
    transform 0.18s;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
.icon-library {
  display: none;
}
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page {
  width: min(100%, 1800px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(22px, 5.1vw, 88px);
  display: flex;
  flex-direction: column;
}
.masthead,
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.masthead {
  height: clamp(68px, 9.8vh, 98px);
  border-bottom: 1px solid var(--line);
}
.brand,
.header-tools,
.guide-button,
.actions,
.status-dot,
.camera-status,
.scene-dock,
.album-heading,
footer span,
.photo-bar,
.photo-controls {
  display: flex;
  align-items: center;
}
.brand {
  gap: 13px;
}
.brand-seal {
  display: grid;
  place-items: center;
  height: 39px;
  width: 39px;
  border: 1px solid #a28e61;
  border-radius: 50%;
  color: #e2c98b;
  position: relative;
}
.brand-seal::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dotted #938359;
  border-radius: 50%;
}
.brand-seal .icon {
  width: 23px;
  height: 23px;
  fill: #e2c98b;
  stroke-width: 0.7px;
}
.wordmark {
  font: 600 19px/1.25 var(--serif);
  letter-spacing: 0.14em;
}
.wordmark small {
  display: block;
  font:
    9px/1.7 Georgia,
    serif;
  letter-spacing: 0.25em;
  color: #c7b383;
}
.header-tools {
  gap: 17px;
  color: #d6d6c6;
}
.header-tools .divider {
  width: 1px;
  height: 17px;
  background: var(--line);
}
.guide-button,
.icon-button,
.text-button {
  background: transparent;
  border: 0;
}
.guide-button {
  gap: 9px;
  padding: 7px 0;
  font-size: 13px;
}
.guide-button:hover,
.icon-button:hover,
.text-button:hover {
  color: var(--gold);
}
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
}
.icon-button:hover {
  background: rgba(216, 192, 134, 0.08);
}
.experience {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(290px, 35.5%) minmax(0, 1fr);
  position: relative;
}
.introduction {
  align-self: center;
  position: relative;
  z-index: 1;
  padding: 32px 0 36px clamp(0px, 1vw, 14px);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font: 500 clamp(48px, 4.85vw, 89px) / 1.25 var(--serif);
  letter-spacing: 0.025em;
  text-shadow: 0 2px 18px #07100d35;
}
h1 span {
  color: #e9cd92;
}
.lead {
  color: #bbc1b2;
  font-size: clamp(13px, 1.02vw, 16px);
  line-height: 1.95;
  letter-spacing: 0.04em;
  margin-top: 21px;
}
.actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 29px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 clamp(14px, 1.4vw, 24px);
  height: 45px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 550;
  font-size: 14px;
  letter-spacing: 0.045em;
}
.primary {
  color: #252619;
  border-color: #eed5a1;
  background: linear-gradient(110deg, #f2dba8, #dfbc77);
  box-shadow: 0 3px 20px #deb96b18;
}
.primary:hover {
  background: #f7dfab;
}
.secondary {
  color: #e4e3cf;
  border-color: #64715e;
  background: #14251c;
}
.secondary:hover {
  background: #24362a;
  border-color: #b3ae86;
}
.camera-status {
  color: #a1ad9d;
  gap: 7px;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #819081;
}
.status-dot[data-state='live'] {
  background: #a4db94;
  box-shadow: 0 0 7px #a4db9470;
}
.status-dot[data-state='busy'],
.status-dot[data-state='error'] {
  background: #e6bd77;
}
.album {
  width: min(100%, 290px);
  margin-top: clamp(28px, 6.4vh, 68px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.album-heading {
  gap: 12px;
  margin-bottom: 11px;
}
.album h2 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #cecbb8;
}
#album-count {
  color: #a5ab97;
  font-size: 11px;
}
.filmstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  align-items: center;
  padding: 3px 3px 6px;
  margin-left: -3px;
  scrollbar-width: thin;
  scrollbar-color: #625e44 transparent;
}
.thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  padding: 2px;
  background: #18211a;
  border: 1px solid #8e8466;
}
.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.thumb:hover,
.thumb:focus-visible {
  border-color: #f6d596;
  transform: translateY(-1px);
}
.exhibit {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  align-items: center;
  justify-content: center;
}
.stage {
  position: relative;
  width: 100%;
  height: clamp(335px, calc(100svh - 232px), 870px);
}
#scene {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#scene:active {
  cursor: grabbing;
}
.hand-cursor {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px;
  border: 1.5px solid #ffe4a9;
  box-shadow: 0 0 10px #f5d18f99;
  border-radius: 50%;
  pointer-events: none;
}
.hand-cursor::after {
  content: '';
  width: 3px;
  height: 3px;
  background: #fff4d6;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 8px;
}
.hand-cursor.targeted {
  background: #efc97145;
  border-width: 2px;
}
.camera-preview {
  position: absolute;
  width: clamp(88px, 12vw, 155px);
  aspect-ratio: 4/3;
  top: 16px;
  right: 0;
  border: 1px solid #92845e;
  border-radius: 8px;
  overflow: hidden;
  background: #101711;
  pointer-events: none;
}
.camera-preview video,
.camera-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scaleX(-1);
}
.camera-preview span {
  position: absolute;
  bottom: 3px;
  left: 4px;
  font-size: 10px;
  color: #fff2d1;
  background: #122019d9;
  padding: 1px 5px;
  border-radius: 3px;
}
.scene-dock {
  flex: none;
  justify-content: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid #504f3b;
  border-radius: 10px;
  background: #0c1914de;
  margin: 4px 0 16px;
}
.scene-dock button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px clamp(10px, 1.3vw, 21px);
  border-radius: 6px;
  border: 1px solid transparent;
  min-height: 36px;
  background: transparent;
  color: #b8c0ad;
  font-size: 13px;
}
.scene-dock button:hover {
  background: #1d2c22;
  color: #ecdbc0;
}
.scene-dock button[aria-pressed='true'] {
  background: #343b2a;
  color: #f1d496;
  border-color: #6c6746;
}
footer {
  min-height: clamp(48px, 6.8vh, 64px);
  border-top: 1px solid var(--line);
  color: #a0aa99;
  font-size: 11px;
  letter-spacing: 0.04em;
}
footer span {
  gap: 7px;
}
footer .icon {
  width: 13px;
  height: 13px;
}
.footer-dot {
  display: inline;
  color: #888872;
}
dialog {
  color: var(--paper);
  background: #13241c;
  border: 1px solid #6a674c;
  padding: 0;
  border-radius: 14px;
}
dialog::backdrop {
  background: #040c09b8;
  backdrop-filter: blur(5px);
}
.guide-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: 88svh;
  padding: 24px;
}
.dialog-heading,
.gesture-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.dialog-heading h2,
.photo-bar h2 {
  font: 500 25px/1.45 var(--serif);
}
.guide-dialog p {
  font-size: 13px;
  color: #c7cdba;
  margin: 12px 0;
}
.gesture-list {
  margin: 16px 0;
}
.gesture-list div {
  padding: 9px 0;
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.gesture-list dt {
  color: #e9cf91;
}
.gesture-list dd {
  margin: 0;
  text-align: right;
  color: #d3d7c7;
}
.guide-dialog .guide-note {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}
.viewer {
  background: transparent;
  border: none;
  overflow: visible;
  border-radius: 0;
  width: max-content;
  max-width: 88vw;
}
.viewer::backdrop {
  background: #030b09c9;
  backdrop-filter: blur(2px);
}
.photo-shell {
  position: relative;
}
.viewer-close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  color: #f4e2b6;
  box-shadow: 0 0 0 1px #927a4f;
  background: #16211a;
}
.viewer-close:hover {
  background: #2c3626;
}
.gilded-frame {
  position: relative;
  width: max-content;
  max-width: 100%;
  padding: 9px;
  border: 1px solid #f3d39b;
  background: linear-gradient(
    135deg,
    #6f5030 0%,
    #eed2a1 12%,
    #927140 31%,
    #f4daa1 49%,
    #8c6436 70%,
    #e8c990 91%,
    #674a2c 100%
  );
  box-shadow:
    0 0 0 2px #54402c,
    0 14px 64px #0009;
}
.gilded-frame::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid #5e4e37;
  pointer-events: none;
}
.gilded-frame img {
  display: block;
  max-width: min(70vw, 850px);
  max-height: 62svh;
  min-width: 44px;
  object-fit: contain;
  background: #0b120e;
  box-shadow: 0 0 0 1px #423320;
}
.gilded-frame i {
  position: absolute;
  z-index: 1;
  width: 7px;
  height: 7px;
  background: #f6d99c;
  border: 1px solid #6e5630;
  transform: rotate(45deg);
}
.gilded-frame i:nth-of-type(1) {
  top: 1px;
  left: 1px;
}
.gilded-frame i:nth-of-type(2) {
  top: 1px;
  right: 1px;
}
.gilded-frame i:nth-of-type(3) {
  bottom: 1px;
  left: 1px;
}
.gilded-frame i:nth-of-type(4) {
  bottom: 1px;
  right: 1px;
}
.photo-bar {
  justify-content: space-between;
  gap: 18px;
  padding-top: 15px;
}
.photo-bar h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
  max-width: 49vw;
}
.photo-bar small {
  color: #ccb480;
  font:
    11px/1.5 Georgia,
    serif;
  letter-spacing: 0.14em;
}
.photo-controls {
  gap: 5px;
}
.photo-controls .icon-button {
  border: 1px solid #65634d;
}
.text-button {
  color: #bbc2ae;
  font-size: 12px;
}
.toast,
.file-notice {
  position: fixed;
  z-index: 5;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #766d4c;
  background: #18291feb;
  color: #f0e4c6;
  border-radius: 7px;
  padding: 9px 16px;
  text-align: center;
  font-size: 13px;
  max-width: 90vw;
  width: max-content;
  pointer-events: none;
}
.toast {
  bottom: 16px;
}
.file-notice {
  top: 30%;
}
@media (min-width: 761px) and (max-height: 610px) {
  .masthead {
    height: 55px;
  }
  .introduction {
    padding: 15px 0;
  }
  h1 {
    font-size: clamp(38px, 4.4vw, 59px);
  }
  .lead {
    margin-top: 10px;
  }
  .actions {
    margin-top: 15px;
  }
  .album {
    margin-top: 16px;
    padding-top: 8px;
  }
  .stage {
    height: max(270px, calc(100svh - 162px));
  }
  footer {
    min-height: 40px;
  }
  .scene-dock {
    margin-bottom: 6px;
  }
}
@media (max-width: 760px) {
  .page {
    padding: 0 clamp(16px, 4.5vw, 32px);
  }
  .masthead {
    height: 60px;
  }
  .brand {
    gap: 9px;
  }
  .brand-seal {
    width: 32px;
    height: 32px;
  }
  .brand-seal .icon {
    width: 19px;
    height: 19px;
  }
  .wordmark {
    font-size: 16px;
  }
  .wordmark small {
    font-size: 8px;
  }
  .header-tools {
    gap: 8px;
  }
  .guide-button {
    font-size: 12px;
  }
  .experience {
    display: flex;
    flex-direction: column;
  }
  .introduction {
    display: contents;
  }
  .hero-copy {
    order: 1;
    padding-top: 22px;
  }
  h1 {
    font-size: clamp(28px, 6.8vw, 43px);
    line-height: 1.4;
    letter-spacing: 0;
  }
  h1 br {
    display: none;
  }
  .lead {
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.7;
    letter-spacing: 0;
  }
  .lead br {
    display: none;
  }
  .actions {
    margin-top: 13px;
    gap: 9px;
  }
  .primary,
  .secondary {
    height: 37px;
    font-size: 12px;
    padding: 0 14px;
  }
  .primary .icon,
  .secondary .icon {
    width: 15px;
    height: 15px;
  }
  .camera-status {
    margin-top: 7px;
    min-height: 16px;
  }
  .exhibit {
    order: 2;
    flex: 1;
  }
  .stage {
    height: clamp(325px, 46svh, 520px);
  }
  .camera-preview {
    top: 3px;
  }
  .scene-dock {
    margin: 2px 0 14px;
  }
  .scene-dock button {
    font-size: 12px;
    gap: 5px;
    padding: 6px 10px;
    min-height: 32px;
  }
  .scene-dock .icon {
    width: 16px;
    height: 16px;
  }
  .album {
    order: 3;
    width: 100%;
    margin: 0 0 12px;
    padding: 9px 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .album-heading {
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    gap: 0;
    margin: 0;
  }
  .thumb {
    width: 35px;
    height: 35px;
  }
  .filmstrip {
    min-width: 0;
  }
  footer {
    min-height: 40px;
    font-size: 10px;
  }
  footer span {
    gap: 4px;
  }
  footer .icon {
    width: 11px;
    height: 11px;
  }
  .gilded-frame img {
    max-width: 79vw;
  }
  .guide-dialog {
    padding: 18px;
  }
}
@media (max-width: 370px) {
  footer > span:last-child {
    display: none;
  }
  .scene-dock button {
    padding: 5px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
