:root {
  font-family:"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif;
  color-scheme:light;
  --bg:#171410;
  --ink:#f1eadb;
  --muted:#b8ad9b;
  --accent:#c6a669;
  --line:#514739;
  --paper:#211d17
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  background:var(--bg);
  color:var(--ink)
}

body.model {
  --bg:#f5f1e6;
  --ink:#4f3524;
  --muted:#77604f;
  --accent:#9c5b3b;
  --line:#c8bca9;
  --paper:#faf7ef
}

button {
  font:inherit;
  color:inherit;
  cursor:pointer
}

button:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:4px
}

.stage {
  height:100vh;
  height:100svh;
  min-height:720px;
  position:relative;
  overflow:hidden;
  max-height:1100px
}

header {
  position:absolute;
  left:25px;
  right:20px;
  top:22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:4
}

.brand-logo {
  width:112px;
  height:auto
}

#replay {
  border:0;
  background:none;
  font-size:12px;
  min-height:44px;
  min-width:44px;
  color:var(--muted)
}

.heading {
  position:absolute;
  top:108px;
  left:26px;
  right:26px;
  z-index:2;
  pointer-events:none
}

.eyebrow {
  font:12px/1.6 "Helvetica Neue",Arial,sans-serif;
  letter-spacing:2px;
  color:var(--muted);
  margin:0 0 13px
}

h1 {
  font-size:36px;
  letter-spacing:4px;
  font-weight:400;
  margin:0 0 10px
}

#room {
  font-size:14px;
  color:var(--muted);
  margin:0
}

.rule {
  width:30px;
  height:1px;
  background:var(--accent);
  margin:19px 0 12px
}

.cert-name {
  font-size:12px;
  letter-spacing:2px;
  margin:0;
  color:var(--muted)
}

.model h1,.model h2,.model h3 {
  font-family:"Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC",serif
}

.model h1 {
  font-size:38px
}

.model .heading {
  top:105px
}

.model .rule {
  width:100%;
  opacity:.6
}

.model .cert-name {
  letter-spacing:3px
}

#viewport {
  position:absolute;
  top:265px;
  bottom:226px;
  width:100%;
  touch-action:pan-y
}

#viewport canvas {
  width:100%;
  height:100%;
  display:block
}

#viewport canvas[hidden] {
  display:none
}

#labels {
  position:absolute;
  inset:0;
  pointer-events:none
}

.light-label {
  position:absolute;
  font-size:12px;
  line-height:1.35;
  white-space:nowrap;
  padding:3px 5px;
  border-left:1px solid var(--accent);
  color:var(--ink);
  background:var(--bg);
  transform:translate(-50%,-100%);
  opacity:0
}

.scene-caption {
  position:absolute;
  bottom:218px;
  left:26px;
  right:26px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted)
}

.controls {
  position:absolute;
  bottom:0;
  left:26px;
  right:26px;
  opacity:0;
  transition:opacity .5s
}

.ready .controls {
  opacity:1
}

.controls>.eyebrow {
  display:flex;
  justify-content:space-between;
  margin-bottom:8px
}

nav {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line)
}

nav button {
  background:none;
  border:0;
  min-height:50px;
  position:relative;
  font-size:16px;
  letter-spacing:4px;
  color:var(--muted)
}

nav button.active {
  color:var(--ink)
}

nav button.active:after {
  content:"";
  position:absolute;
  bottom:-1px;
  height:2px;
  background:var(--accent);
  left:10px;
  right:10px
}

.preset-copy {
  min-height:86px;
  padding-top:13px
}

#desc {
  font-size:14px;
  line-height:1.6;
  margin:0 0 6px
}

#spec {
  font:12px/1.5 "Helvetica Neue",sans-serif;
  letter-spacing:1px;
  color:var(--accent);
  margin:0
}

.scroll-hint {
  height:43px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted);
  border-top:1px solid var(--line)
}

.intro {
  position:absolute;
  inset:0;
  background:var(--bg);
  z-index:5;
  display:grid;
  place-items:center;
  transition:opacity .6s;
  overflow:hidden
}

.intro.gone {
  opacity:0;
  pointer-events:none
}

.intro-copy {
  position:relative;
  text-align:center;
  animation:intro-reveal 2.6s both
}

.intro-copy img {
  width:76px;
  margin-bottom:28px
}

.intro h2 {
  font-size:28px;
  line-height:1.65;
  letter-spacing:4px;
  font-weight:400;
  margin:18px 0 22px
}

.intro #intro-org {
  font-size:18px;
  letter-spacing:4px
}

.intro span {
  font-size:12px;
  color:var(--muted);
  letter-spacing:2px
}

.intro small {
  position:absolute;
  bottom:40px;
  font-size:12px;
  color:var(--muted)
}

.sweep {
  position:absolute;
  width:180%;
  height:55%;
  left:-40%;
  top:-60%;
  transform:rotate(-25deg);
  background:linear-gradient(180deg,transparent,rgba(255,184,123,.11),rgba(255,239,225,.24),transparent);
  filter:blur(20px);
  animation:sweep 2.8s linear both
}

.certificate {
  padding:66px 26px 30px;
  max-width:650px;
  margin:auto;
  border-top:1px solid var(--line)
}

.certificate-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:22px 0 30px
}

h2 {
  font-weight:400;
  font-size:25px;
  line-height:1.6;
  margin:0
}

.serial {
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
  writing-mode:vertical-rl;
  letter-spacing:3px
}

.paper {
  background:var(--paper);
  padding:30px 23px;
  position:relative;
  border:1px solid var(--line)
}

.paper-line {
  height:3px;
  background:var(--accent);
  margin-bottom:25px
}

.paper .eyebrow {
  font-size:12px;
  letter-spacing:1px;
  max-width:200px
}

.paper h3 {
  font-size:29px;
  font-weight:400;
  letter-spacing:3px;
  margin:24px 0 10px
}

#card-room {
  font-size:14px;
  color:var(--muted)
}

dl {
  margin:32px 0 130px
}

dl div {
  margin:16px 0
}

dt {
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px
}

dd {
  font:16px "Helvetica Neue",sans-serif;
  margin:0;
  letter-spacing:1px
}

.stamp {
  position:absolute;
  right:26px;
  bottom:112px;
  border:2px solid var(--accent);
  outline:1px solid var(--accent);
  outline-offset:-6px;
  width:112px;
  height:112px;
  border-radius:50%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  color:var(--accent);
  transform:rotate(-12deg)
}

.stamp span {
  font-size:12px;
  letter-spacing:1px
}

.stamp strong {
  font-size:17px;
  line-height:1.3;
  letter-spacing:3px;
  margin:5px 0;
  font-weight:400
}

.model .stamp {
  border-radius:3px;
  border-style:double;
  opacity:.85;
  box-shadow:inset 0 0 7px #c88c6844
}

.credit {
  font-size:14px;
  line-height:1.7;
  border-top:1px solid var(--line);
  padding-top:22px;
  margin-bottom:5px
}

.credit-en {
  font-size:12px;
  line-height:1.6;
  color:var(--muted);
  margin:0
}

.sample {
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
  margin-top:20px
}

footer {
  padding:38px 26px 55px;
  max-width:650px;
  margin:auto
}

footer p {
  font-size:14px;
  margin:25px 0 12px
}

footer small {
  font-size:12px;
  color:var(--muted)
}

@keyframes sweep {
  to {
  top:115%
}


}

@keyframes intro-reveal {
  0% {
  opacity:.15;
  clip-path:inset(0 0 100% 0)
}

75%,100% {
  opacity:1;
  clip-path:inset(0)
}


}

@media(min-width:650px) {
  .stage {
  max-width:650px;
  margin:auto
}

#viewport {
  top:250px
}

.heading {
  left:40px
}


}

@media(max-height:760px) {
  .heading {
  top:85px
}

.model .heading {
  top:85px
}

h1 {
  font-size:30px
}

.heading .rule {
  margin:12px 0
}

#viewport {
  top:240px
}


}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
  animation:none!important;
  transition:none!important
}

.intro {
  display:none
}


}



.leaders {
  position:absolute;
  inset:0;
  pointer-events:none
}

.sample-note {
  position:absolute;
  top:72px;
  left:26px;
  right:26px;
  font-size:12px;
  color:var(--muted);
  margin:0;
  line-height:1.5;
  z-index:3
}

.stamp {
  width:128px;
  height:128px
}

.stamp span:last-child {
  letter-spacing:0
}


:root { color-scheme: dark; }
.stage { min-height: 800px; }
.heading { top: 100px; }
h1 { font-size: 30px; }
#viewport { top: 235px; bottom: 290px; }
.views {
  position: absolute; bottom: 233px; left: 26px; right: 26px;
  display: flex; justify-content: center; gap: 8px;
}
.views[hidden] { display: none; }
.views button {
  min-width: 70px; min-height: 44px; border: 1px solid var(--line);
  background: transparent; font-size: 12px; color: var(--muted);
}
.views button[aria-pressed=true] { border-color: var(--accent); color: var(--ink); }
#gesture {
  position: absolute; bottom: 278px; width: 100%; text-align: center;
  font-size: 12px; color: var(--muted); pointer-events: none; opacity: 0;
}
.scene-caption { bottom: 213px; }
.controls { pointer-events: none; }
.ready .controls { pointer-events: auto; }
.intro { transition: none; }
.intro-copy { animation-duration: 1.4s; }
.sweep { animation-duration: 1.4s; }
.dimension {
  position: absolute; transform: translate(-50%, -50%); font: 12px Arial, sans-serif;
  color: var(--muted); background: var(--bg); white-space: nowrap; padding: 2px;
}
.light-label { padding: 2px 4px; }
.stamp { width: 144px; height: 144px; }
#stamp-number { max-width: 112px; text-align: center; overflow-wrap: anywhere; font-size: 12px; }
#channels { display: none; }
.plot { --bg: #252522; --paper: #292925; --line: #57574f; --ink: #f5f1e6; --muted: #b9b6a9; }
.plot .stage {
  background-image: linear-gradient(#ffffff03 1px, transparent 1px),
    linear-gradient(90deg, #ffffff03 1px, transparent 1px);
  background-size: 20px 20px; min-height: 880px;
}
.plot .heading { top: 95px; }
.plot .heading h1 { font-size: 26px; }
.plot #viewport { top: 220px; bottom: 390px; }
.plot .views { bottom: 337px; }
.plot #gesture { bottom: 381px; }
.plot .scene-caption { bottom: 317px; }
.plot nav button { font-size: 14px; letter-spacing: 0; border: 1px solid var(--line); }
.plot nav { gap: 5px; border: 0; }
.plot nav button.active { background: var(--ink); color: var(--bg); }
.plot #channels { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 8px; }
.channel { border: 1px solid var(--line); padding: 5px 4px; min-width: 0; }
.channel span, .channel strong { display: block; font-size: 12px; font-weight: 400; line-height: 1.6; }
.channel span { color: var(--muted); }
.plot .preset-copy { min-height: 80px; }
.plot .paper { background: transparent; }
.plot dl { border-top: 1px solid var(--line); }
.plot dl div { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.plot .stamp { transform: rotate(-8deg); border-width: 1px; }
@media (max-height: 760px) {
  .heading { top: 95px; }
  #viewport { top: 225px; }
}

#viewport { top: 262px; }
.plot #viewport { top: 250px; }

.plot .stage { min-height: 844px; }
.channel { height: 48px; }
.channel strong { font-family: Arial, sans-serif; white-space: nowrap; }

.intro { animation: intro-hide 1.4s step-end forwards; }
@keyframes intro-hide { to { visibility: hidden; } }
