:root {
  /* Typography intent: Space Grotesk** / Grotesk* for labels to make the site feel authored. */
  --observatory-ink: #0B1020;
  --porcelain-paper: #F2EBDD;
  --blue-hour-cobalt: #275DAD;
  --persimmon-seal: #E35D2F;
  --brass-line: #C7A55A;
  --jade-shadow: #3D7F72;
  --graphite: #58606F;
  --display: "Instrument Serif", serif;
  --body: "Noto Sans KR", sans-serif;
  --accent: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; overflow: hidden; }

body {
  background: var(--observatory-ink);
  color: var(--porcelain-paper);
  font-family: var(--body);
}

button { font: inherit; color: inherit; }

.desk {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 49%, rgba(39, 93, 173, .24), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(61, 127, 114, .18), transparent 28%),
    linear-gradient(142deg, #11182b 0%, var(--observatory-ink) 44%, #070b16 100%);
  perspective: 1100px;
}

.desk::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: repeating-linear-gradient(102deg, rgba(242, 235, 221, .025) 0 1px, transparent 1px 13px);
  transform: rotate(-6deg) scale(1.1);
  opacity: .48;
}

.hanji-noise, .window-reflection, .lamp-glow, .dawn-wash { pointer-events: none; position: absolute; inset: 0; }

.hanji-noise {
  background-image:
    radial-gradient(circle, rgba(242, 235, 221, .13) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(199, 165, 90, .10) 0 1px, transparent 1.5px);
  background-size: 43px 37px, 67px 59px;
  mix-blend-mode: screen;
  opacity: .32;
}

.window-reflection {
  background: linear-gradient(115deg, transparent 0 58%, rgba(242, 235, 221, .07) 59%, transparent 61%, transparent 68%, rgba(39, 93, 173, .08) 70%, transparent 73%);
  opacity: .55;
}

.lamp-glow {
  width: 54vw;
  height: 100vh;
  left: -60vw;
  background: radial-gradient(ellipse at center, rgba(242, 235, 221, .30), rgba(199, 165, 90, .13) 35%, transparent 68%);
  transform: skewX(-17deg);
  opacity: 0;
}

.desk.awakened .lamp-glow { animation: lampSweep 1.8s cubic-bezier(.2,.8,.2,1) forwards; }

.dawn-wash {
  background: linear-gradient(180deg, rgba(242, 235, 221, .14), rgba(39, 93, 173, .12), transparent 58%);
  opacity: 0;
  transition: opacity 900ms ease;
}

.desk.scene-4 .dawn-wash { opacity: 1; }

.orbit-svg {
  position: absolute;
  inset: 2vh 2vw;
  width: 96vw;
  height: 96vh;
  overflow: visible;
  transform: rotateX(7deg) rotateZ(-2deg);
  transition: transform 850ms cubic-bezier(.2,.7,.1,1);
}

.orbit { fill: none; stroke: rgba(199, 165, 90, .42); stroke-width: 1.1; stroke-dasharray: 7 10; }
.orbit-two { stroke: rgba(61, 127, 114, .32); }
.orbit-three { stroke: rgba(88, 96, 111, .45); }
.active-orbit { stroke: var(--blue-hour-cobalt); stroke-width: 2; stroke-dasharray: 1120; stroke-dashoffset: 1120; filter: drop-shadow(0 0 10px rgba(39, 93, 173, .65)); }
.desk.awakened .active-orbit { animation: drawOrbit 2.8s ease forwards; }
.measurement-ring line { stroke: var(--brass-line); stroke-width: 2; opacity: .72; }

.center-paper {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(470px, 38vw);
  min-height: 245px;
  padding: 34px 38px;
  transform: translate(-50%, -50%) rotate(-2deg) rotateX(3deg);
  color: var(--observatory-ink);
  background:
    linear-gradient(135deg, transparent 0 88%, rgba(88, 96, 111, .24) 89% 93%, rgba(242, 235, 221, .74) 94%),
    radial-gradient(circle at 20% 18%, rgba(199, 165, 90, .20), transparent 24%),
    var(--porcelain-paper);
  box-shadow: 0 32px 80px rgba(0,0,0,.45), inset 0 0 0 1px rgba(199, 165, 90, .28);
  z-index: 5;
}

.center-paper::before, .center-paper::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 24px;
  background: rgba(242, 235, 221, .34);
  border: 1px solid rgba(242, 235, 221, .30);
  top: -13px;
  transform: rotate(-6deg);
}
.center-paper::before { left: 26px; }
.center-paper::after { right: 35px; transform: rotate(8deg); }

.paper-kicker, .coordinate, .chapter-index, .artifact-label, .marginalia, .vellum-strip, .paper-slip { font-family: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.paper-kicker { color: var(--jade-shadow); font-size: 12px; }

h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; }
h1 { font-size: clamp(58px, 7vw, 116px); line-height: .83; color: rgba(11, 16, 32, .88); text-shadow: 0 1px 0 rgba(255,255,255,.42), 0 -1px 0 rgba(88,96,111,.25); margin: 12px 0 20px; }
.center-paper p { color: var(--graphite); font-size: 16px; line-height: 1.75; margin: 0; }

.seal-start {
  position: absolute;
  right: 30px;
  bottom: 24px;
  width: 54px;
  height: 54px;
  border: 2px solid var(--persimmon-seal);
  border-radius: 50%;
  background: rgba(227, 93, 47, .09);
  color: var(--persimmon-seal);
  font-family: var(--display);
  font-size: 28px;
  cursor: pointer;
  transition: transform 220ms ease, background 220ms ease;
}
.seal-start:hover { transform: rotate(-9deg) scale(1.04); background: rgba(227, 93, 47, .17); }

.artifact { position: absolute; z-index: 7; border: 0; background: transparent; cursor: pointer; transition: transform 650ms cubic-bezier(.2,.8,.2,1), filter 450ms ease, opacity 450ms ease; }
.artifact:hover, .artifact.active { filter: drop-shadow(0 0 20px rgba(39, 93, 173, .48)); }
.artifact.active { transform: translateY(-8px) rotate(var(--active-rotate, 0deg)); }
.artifact-label { display: block; margin-top: 10px; font-size: 11px; color: var(--porcelain-paper); text-shadow: 0 2px 6px #000; }
.artifact-illustration { display: block; position: relative; }

.compass { left: 18vw; top: 16vh; --active-rotate: -7deg; }
.compass-face { width: 132px; height: 132px; border: 2px solid var(--brass-line); border-radius: 50%; background: radial-gradient(circle, rgba(199,165,90,.14), rgba(11,16,32,.42) 64%, transparent); }
.compass-face::before { content: ""; position: absolute; inset: 18px; border: 1px dashed rgba(199,165,90,.66); border-radius: 50%; }
.compass-face i { position: absolute; left: 63px; top: 18px; width: 6px; height: 96px; background: linear-gradient(var(--persimmon-seal) 0 48%, var(--brass-line) 49%); clip-path: polygon(50% 0, 100% 48%, 54% 100%, 0 48%); transform-origin: center; animation: needle 5s ease-in-out infinite; }

.folded-note { right: 18vw; top: 15vh; --active-rotate: 5deg; }
.note-face { width: 170px; height: 104px; background: var(--porcelain-paper); color: var(--observatory-ink); transform: rotate(5deg); box-shadow: 0 18px 35px rgba(0,0,0,.38); }
.note-face::before { content: ""; position: absolute; right: 0; top: 0; border-left: 36px solid rgba(88,96,111,.2); border-bottom: 36px solid transparent; }
.note-face::after { content: "essay\A 실험 일지"; white-space: pre; position: absolute; left: 18px; top: 24px; font-family: var(--accent); font-size: 12px; color: var(--graphite); }

.ruler { left: 11vw; bottom: 18vh; --active-rotate: -13deg; }
.ruler-face { width: 230px; height: 42px; background: rgba(242,235,221,.28); border: 1px solid rgba(242,235,221,.48); transform: rotate(-16deg); backdrop-filter: blur(2px); }
.ruler-face::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--brass-line) 0 2px, transparent 2px 15px); opacity: .75; }

.stamp-pad { right: 16vw; bottom: 20vh; --active-rotate: 8deg; }
.stamp-face { width: 128px; height: 84px; border-radius: 18px; background: linear-gradient(145deg, #161b2b, #050813); border: 2px solid rgba(88,96,111,.8); box-shadow: inset 0 0 28px rgba(227,93,47,.22), 0 18px 38px rgba(0,0,0,.48); }
.stamp-face::after { content: "印"; position: absolute; inset: 16px 38px; color: var(--persimmon-seal); border: 2px solid var(--persimmon-seal); border-radius: 50%; font-family: var(--display); font-size: 28px; line-height: 44px; }

.teacup { left: 48vw; bottom: 7vh; --active-rotate: 4deg; }
.cup-face { width: 112px; height: 112px; border-radius: 50%; background: radial-gradient(circle, rgba(61,127,114,.28) 0 24%, var(--porcelain-paper) 25% 43%, rgba(242,235,221,.36) 44% 58%, transparent 59%); border: 1px solid rgba(242,235,221,.45); }
.cup-face::after { content: ""; position: absolute; width: 36px; height: 20px; border: 8px solid rgba(242,235,221,.7); border-left: 0; border-radius: 0 20px 20px 0; right: -19px; top: 44px; }

.annotation-surface {
  position: absolute;
  left: 6vw;
  top: 50%;
  width: min(380px, 30vw);
  min-height: 308px;
  transform: translateY(-32%) rotate(2deg);
  z-index: 8;
  padding: 34px 32px 28px;
  background: rgba(242, 235, 221, .92);
  color: var(--observatory-ink);
  box-shadow: 0 26px 70px rgba(0,0,0,.50);
  opacity: 0;
  transition: opacity 600ms ease, transform 650ms cubic-bezier(.2,.8,.2,1);
}
.desk.awakened .annotation-surface { opacity: 1; transform: translateY(-50%) rotate(-1deg); }
.annotation-surface.reinking h2, .annotation-surface.reinking p, .annotation-surface.reinking .coordinate { animation: inkBleed 520ms ease both; }
.tape { position: absolute; top: -15px; width: 92px; height: 28px; background: rgba(242,235,221,.38); border: 1px solid rgba(255,255,255,.22); }
.tape-left { left: 24px; transform: rotate(-7deg); }
.tape-right { right: 24px; transform: rotate(9deg); }
.coordinate { color: var(--blue-hour-cobalt); font-size: 11px; }
h2 { color: var(--observatory-ink); font-size: clamp(46px, 5vw, 78px); line-height: .92; margin: 12px 0 16px; }
.hangul-note { color: var(--jade-shadow); font-weight: 500; }
.annotation-surface p { color: var(--graphite); line-height: 1.78; }
.ink-row { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.red-seal { width: 58px; height: 58px; border: 2px solid var(--persimmon-seal); border-radius: 50%; color: var(--persimmon-seal); display: grid; place-items: center; font-family: var(--display); font-size: 30px; transform: scale(.72) rotate(-18deg); opacity: .70; }
.desk.awakened .red-seal { animation: stamp 700ms cubic-bezier(.18,1.3,.34,1) 550ms both; }
.chapter-index { color: var(--graphite); font-size: 12px; }

.server-light { position: absolute; right: 7vw; top: 47vh; width: 82px; height: 28px; border-radius: 14px; background: rgba(8,12,24,.75); border: 1px solid rgba(88,96,111,.5); z-index: 4; }
.server-light span { position: absolute; right: 12px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-hour-cobalt); box-shadow: 0 0 18px var(--blue-hour-cobalt); animation: breathe 2.4s ease-in-out infinite; }
.vellum-strip { position: absolute; left: 37vw; top: 10vh; padding: 12px 22px; background: rgba(242,235,221,.14); border: 1px solid rgba(242,235,221,.25); color: rgba(242,235,221,.72); transform: rotate(-4deg); font-size: 11px; }
.marginalia { position: absolute; color: rgba(199,165,90,.68); font-size: 11px; z-index: 3; }
.top-left { left: 5vw; top: 7vh; transform: rotate(-8deg); }
.bottom-right { right: 5vw; bottom: 8vh; transform: rotate(7deg); }
.paper-slip { position: absolute; z-index: 3; padding: 14px 16px; background: rgba(242,235,221,.78); color: var(--graphite); font-size: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.34); }
.paper-slip strong { color: var(--observatory-ink); font-family: var(--body); letter-spacing: 0; text-transform: none; }
.slip-a { right: 31vw; top: 28vh; transform: rotate(11deg); }
.slip-b { left: 27vw; bottom: 16vh; transform: rotate(-9deg); }

.desk.scene-0 .orbit-svg { transform: rotateX(7deg) rotateZ(-2deg); }
.desk.scene-1 .orbit-svg { transform: rotateX(7deg) rotateZ(5deg); }
.desk.scene-2 .orbit-svg { transform: rotateX(7deg) rotateZ(-8deg); }
.desk.scene-3 .orbit-svg { transform: rotateX(7deg) rotateZ(9deg); }
.desk.scene-4 .orbit-svg { transform: rotateX(3deg) rotateZ(0deg) scale(.98); }

@keyframes lampSweep { 0% { left: -60vw; opacity: 0; } 20% { opacity: 1; } 100% { left: 105vw; opacity: 0; } }
@keyframes drawOrbit { to { stroke-dashoffset: 0; } }
@keyframes needle { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(20deg); } }
@keyframes breathe { 0%,100% { opacity: .35; transform: scale(.82); } 50% { opacity: 1; transform: scale(1.22); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.7) rotate(-35deg); filter: blur(4px); } 58% { opacity: 1; transform: scale(.64) rotate(-12deg); filter: blur(0); } 100% { opacity: .82; transform: scale(.84) rotate(-18deg); } }
@keyframes inkBleed { 0% { opacity: 0; filter: blur(5px); transform: translateY(8px); } 100% { opacity: 1; filter: blur(0); transform: translateY(0); } }

@media (max-width: 900px) {
  html, body { overflow: auto; }
  .desk { min-height: 980px; }
  .center-paper { width: 82vw; top: 35%; }
  .annotation-surface { width: 82vw; left: 9vw; top: 70%; }
  .compass { left: 5vw; top: 10vh; }
  .folded-note { right: 4vw; top: 9vh; }
  .ruler { left: 3vw; bottom: 8vh; }
  .stamp-pad { right: 5vw; bottom: 8vh; }
  .teacup { left: 44vw; bottom: 2vh; }
  .vellum-strip, .paper-slip { display: none; }
}
