:root {
  color-scheme: light;
  --paper: #f6f2e7;
  --ink: #282821;
  --muted: #5e5c50;
  --line: #b9b19f;
  --red: #9c3f2a;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  font: 16px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 80% 16%, #fffaf0, transparent 60%), var(--paper);
}
a { color: inherit; }
a:focus-visible { outline: 3px solid #ac583a; outline-offset: 5px; }
h1, h2, h3, p, dl, dd, ol { margin: 0; }
h1, h2, h3 { font-family: var(--serif); }
img, video { display: block; max-width: 100%; }
.skip { position: fixed; z-index: 3; top: 8px; left: 8px; background: #fff; padding: 8px 14px; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }

.topbar, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 72px);
}
.topbar { border-bottom: 1px solid var(--line); background: #f7f3e9; }
.topbar a, .footer a, .back, .room-next a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; font-size: 17px; line-height: 1.2; white-space: nowrap; }
.brand small, .kicker, .door-sign small, .door-number {
  display: block;
  font: 700 .73rem/1.4 ui-monospace, Consolas, monospace;
  letter-spacing: .13em;
}
.brand small { font-size: .61rem; margin-top: 4px; }
.seal { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid var(--red); color: var(--red); font: 700 24px var(--serif); transform: rotate(-5deg); }
.topbar nav, .tools { display: flex; align-items: center; gap: clamp(12px, 3vw, 36px); }
.topbar nav a, .tools a { font-size: .85rem; white-space: nowrap; }
.topbar a[aria-current], .topbar a:hover, .footer a:hover { color: var(--red); }
.official { border: 1px solid var(--line); padding: 6px 13px; }
.footer { border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }

.entrance {
  min-height: max(610px, calc(100svh - 132px));
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4vw;
  padding: 46px max(6vw, calc((100vw - 1200px) / 2));
  position: relative;
  isolation: isolate;
}
.entrance::before, .hall::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    repeating-linear-gradient(91deg, transparent 0 5px, #7461480a 6px, transparent 7px 11px),
    linear-gradient(174deg, transparent 0 75%, #9f917449 75.2% 75.4%, #c8b99b30 75.7%);
}
.intro { position: relative; z-index: 1; }
.kicker { color: var(--red); }
.intro h1 {
  margin: 21px 0;
  font-size: clamp(3.15rem, 7vw, 7.2rem);
  line-height: 1.04;
  letter-spacing: -.065em;
}
.intro h1 em { color: var(--red); font-style: normal; }
.lead { max-width: 24em; color: var(--muted); font-size: clamp(.97rem, 1.35vw, 1.13rem); }
.entry-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 31px; }
.button { display: inline-flex; gap: 24px; align-items: center; text-decoration: none; background: var(--ink); color: #fffaf0; padding: 12px 17px; box-shadow: 3px 3px 0 #b18570; }
.button:hover { background: var(--red); }
.text-link { display: inline-block; color: var(--red); font-size: .85rem; text-underline-offset: 4px; }
.preview { display: grid; place-items: center; position: relative; perspective: 1100px; text-decoration: none; padding: 16px; }
.frame {
  display: block;
  position: relative;
  padding: 16px 19px 19px;
  border: 2px solid #555044;
  background: #ded1b8;
  width: min(90%, 304px);
  transform: rotateY(-19deg) rotateZ(2deg);
  transform-origin: left center;
  box-shadow: 18px 12px 0 -6px #998c71, 19px 14px 0 -6px #6d6049, 36px 30px 38px #4a372b3d;
  transition: transform 450ms ease;
}
.preview:hover .frame, .preview:focus-visible .frame { transform: rotateY(-30deg) rotateZ(0); }
.cover { display: block; border: 1px solid #554d42; overflow: hidden; }
.cover img { width: 100%; height: auto; }
.knob, .door-handle { position: absolute; width: 15px; height: 15px; border: 1px solid #61523a; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffedb8, #a58653 70%); box-shadow: 2px 2px 0 #30271940; }
.knob { right: 6px; top: 68%; }
.floor-shadow { position: absolute; inset: auto 7% 1% 13%; height: 34px; background: #5c4a3134; filter: blur(17px); transform: skewX(35deg); z-index: -1; }

.hall { position: relative; isolation: isolate; min-height: max(630px, calc(100svh - 132px)); padding: clamp(30px, 6vh, 70px) 6vw 64px; }
.hall-heading { text-align: center; }
.hall-heading h2, .reading-header h2 { font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1.2; margin: 10px 0; }
.hall-heading h2 span, .room-heading h2 span { color: var(--accent, var(--red)); }
.hall-heading > p:last-child { color: var(--muted); }
.corridor { max-width: 1050px; margin: 46px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: clamp(15px, 4vw, 70px); perspective: 1050px; }
.door {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 274px;
  aspect-ratio: 4/5.6;
  background: var(--door-paper);
  border: 3px solid #595041;
  border-radius: 47% 47% 2px 2px / 22% 22% 2px 2px;
  color: var(--door-ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 7px #f4e9d258, 9px 10px 0 -2px #65543f7a, 12px 15px 20px #65543f25;
  transform: rotateY(var(--angle));
  transform-origin: left center;
  transition: transform 350ms ease, box-shadow 350ms ease;
}
.door::before { content: ""; position: absolute; z-index: -1; inset: 12px; border: 1px solid currentColor; border-radius: inherit; opacity: .5; }
.door-one { --door-paper: #e7b89e; --door-ink: #572f26; --angle: 15deg; }
.door-two { --door-paper: #d9dcbf; --door-ink: #37412b; --angle: 0deg; }
.door-three { --door-paper: #d7cadd; --door-ink: #483451; --angle: -15deg; }
.door:hover, .door:focus-visible { transform: rotateY(calc(var(--angle) - 18deg)) translateY(-4px); box-shadow: inset 0 0 0 7px #f4e9d258, 15px 14px 0 -2px #65543f69, 18px 18px 26px #65543f32; }
.door-number { font: 700 clamp(1.15rem, 2.8vw, 2.3rem) var(--serif); }
.door-sign { display: grid; gap: 5px; width: 84%; padding: 12px 5px; text-align: center; background: #f8f2e1; border: 1px solid currentColor; box-shadow: 3px 3px 0 #3c322532; }
.door-sign strong { font-size: clamp(.83rem, 1.55vw, 1.18rem); }
.door-sign small { font-size: clamp(.56rem, 1vw, .72rem); }
.door-handle { right: 10%; top: 69%; }

.reading-header, .room { width: min(1130px, 100% - 10vw); margin: 0 auto; }
.reading-header { padding: 48px 0 14px; }
.reading-header nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.room { --accent: #913b29; --tint: #f0dfd1; padding: 36px 0 54px; }
.product { --accent: #4e5d37; --tint: #e6e8d6; }
.agent { --accent: #654974; --tint: #ece1ee; }
.room .kicker, .room .text-link { color: var(--accent); }
.room-heading { padding: 0 0 25px; border-bottom: 1px solid var(--line); }
.room-heading h2 { font-size: clamp(2.2rem, 5vw, 5.2rem); line-height: 1.16; margin: 12px 0; letter-spacing: -.035em; overflow-wrap: anywhere; }
.room-heading > p:last-child { color: var(--muted); max-width: 38em; }
.back { display: inline-block; margin-bottom: 22px; font-size: .85rem; color: var(--muted); }
.back:hover, .room-next a:hover { text-decoration: underline; }
.metrics, .workflow { display: grid; margin-top: 24px; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.metrics { grid-template-columns: repeat(3, 1fr); }
.metrics div, .workflow li { background: var(--tint); padding: 13px clamp(8px, 2vw, 24px); overflow-wrap: anywhere; }
.metrics div { display: flex; flex-direction: column-reverse; }
.metrics dt, .workflow span, .caption { font-size: .8rem; color: var(--muted); }
.metrics dd { color: var(--accent); font: 700 clamp(1.45rem, 4.2vw, 3.4rem)/1.22 Georgia, serif; }
.caption { margin-top: 6px; }
.workflow { grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; }
.workflow li { display: grid; gap: 4px; align-content: start; counter-increment: step; }
.workflow li::before { content: "0" counter(step); font: 700 .78rem ui-monospace, monospace; color: var(--accent); }
.exhibits { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.note { min-width: 0; padding: clamp(14px, 2.5vw, 28px); border: 1px solid var(--line); background: #fffcf3; box-shadow: 3px 4px 0 #b4a58d31; }
.note h3 { font-size: clamp(1.22rem, 2.3vw, 1.8rem); margin-bottom: 8px; }
.note p + p { margin-top: 9px; }
.note .text-link { margin-top: 10px; }
.wide { grid-column: 1 / -1; }
.shot { display: block; margin-top: 15px; }
.shot img, video { width: 100%; height: auto; border: 1px solid #d6ccba; }
.tall img { max-height: 390px; object-fit: cover; object-position: top; }
.paired { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
video { margin-top: 15px; max-height: 480px; background: #282821; }
table { margin-top: 16px; width: 100%; border-collapse: collapse; text-align: left; font-size: .82rem; }
th, td { padding: 7px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead { background: var(--tint); }
.room-next { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 25px; color: var(--accent); font-size: .85rem; }
.js .entered { animation: page-in 340ms ease both; }
@keyframes page-in { from { opacity: 0; translate: 0 9px; } to { opacity: 1; translate: 0; } }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 13px; padding-block: 12px; }
  .topbar nav { width: 100%; justify-content: space-between; order: 1; border-top: 1px solid var(--line); padding-top: 9px; }
  .entrance { min-height: auto; grid-template-columns: 1fr; gap: 24px; padding: 42px 7vw 35px; }
  .preview { width: min(68vw, 300px); margin: 0 auto; }
  .hall { min-height: auto; padding-inline: 5vw; }
  .corridor { gap: 14px; }
  .door { border-width: 2px; gap: 8px; }
  .door-handle { width: 10px; height: 10px; top: 78%; }
  .door-sign { padding-inline: 4px; }
  .exhibits, .paired { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 430px) {
  .corridor { grid-template-columns: 1fr; max-width: 320px; margin-top: 24px; }
  .door { max-width: none; aspect-ratio: 3 / 1.46; border-radius: 42% 42% 3px 3px / 22% 22% 3px 3px; --angle: 0deg; }
  .door-sign { width: 74%; }
  .door-handle { top: 60%; right: 8%; }
  .footer { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
