:root {
  color-scheme: dark;
  --ink: #100e15;
  --ivory: #f3e1c5;
  --muted: #c5b5aa;
  --wine: #6b242f;
  --line: #b6967757;
  --serif: "Noto Serif CJK KR", "Noto Serif KR", "Source Han Serif K", Batang, serif;
  --sans: "Noto Sans CJK KR", "Noto Sans KR", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--ivory); font: 16px/1.6 var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #f1c889;
  outline-offset: 4px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link { position: fixed; z-index: 10; top: .75rem; left: .75rem; padding: .45rem 1rem; background: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.frame { width: min(85%, 1400px); margin-inline: auto; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  background: #14141d;
}
.hero__frame { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.scene__manor {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: 64% center;
  transform: translate3d(var(--manor-x, 0px), var(--manor-y, 0px), 0);
}
.scene__mist {
  position: absolute;
  left: 38%;
  bottom: 6%;
  width: 72%;
  height: 44%;
  background: radial-gradient(ellipse at center, #8176ab2c 0%, #8176ab13 37%, transparent 68%);
  filter: blur(25px);
  animation: mist 22s ease-in-out infinite alternate;
}
.scene__tree, .scene__leaves { position: absolute; contain: layout; }
.scene__tree img, .scene__leaves img { display: block; width: 100%; }
.scene__tree--left {
  left: -13vw;
  bottom: -8%;
  width: clamp(175px, 29vw, 470px);
  transform: translate3d(var(--tree-x, 0px), var(--tree-y, 0px), 0);
  opacity: .6;
}
.scene__tree--right {
  right: -13vw;
  bottom: -11%;
  width: clamp(190px, 34vw, 520px);
  transform: translate3d(var(--tree-x, 0px), var(--tree-y, 0px), 0) scaleX(-1);
  opacity: .83;
}
.scene__leaves {
  right: -4.5%;
  top: -9%;
  width: clamp(320px, 55vw, 950px);
  transform: translate3d(var(--leaf-x, 0px), var(--leaf-y, 0px), 0);
  opacity: .8;
}
.scene__leaves img { transform-origin: 100% 0; animation: sway 11s ease-in-out infinite alternate; }
.scene__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #100e15 0%, #100e15a0 9%, transparent 29%, transparent 77%, #100e1560 100%),
    linear-gradient(90deg, #100e15fa 0%, #100e15df 24%, #100e15a8 40%, #100e1530 57%, transparent 72%);
}
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: clamp(1.25rem, 4vw, 3.25rem) 7.5%;
  display: flex;
  justify-content: flex-end;
}
.site-header nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); font-size: .85rem; }
.site-header a { text-decoration: none; color: #f6eadb; }
.site-header a:hover, .cases-link:hover, .back-link:hover { color: #ffdaad; }
.login-action {
  min-height: 42px;
  padding: .4rem 1.1rem;
  border: 1px solid #d8bb8f73;
  border-radius: 3px;
  color: #f6eadb;
  background: #111018b5;
}
.login-action:hover { border-color: #e3bb86; background-color: #211b23; }
.hero__content { position: relative; padding: 7.5rem 0 5rem; width: min(100%, 580px); }
.hero__title {
  display: grid;
  align-items: center;
  width: min(100%, 530px);
  margin: 0 0 1.3rem;
  font: 700 clamp(2.4rem, 6vw, 5.15rem)/1.15 var(--serif);
  letter-spacing: -.075em;
}
.hero__title span, .hero__title img { grid-area: 1 / 1; }
.hero__title span { width: 6em; max-width: 100%; }
.hero__title img { display: block; width: 100%; position: relative; filter: drop-shadow(0 3px 18px #0e0b12a3); }
.hero__title.has-art span { opacity: 0; }
.hero__kind {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 .9rem;
  font-size: clamp(.79rem, 1.2vw, .92rem);
  font-weight: 600;
  letter-spacing: .095em;
  color: #e9c995;
}
.diamond { width: .36em; height: .36em; transform: rotate(45deg); background: currentColor; margin: 0 .15em; }
.hero__premise { max-width: 46ch; margin: 0 0 1.85rem; font-size: clamp(.92rem, 1.3vw, 1.05rem); color: #e1d2c4; line-height: 1.9; word-break: keep-all; }
.hero__actions { display: grid; justify-items: start; gap: .68rem; width: min(100%, 310px); }
.room-primary {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 100%;
  min-height: 64px;
  border: 1px solid #ae7859;
  border-radius: 4px;
  background: var(--wine);
  color: #fff0d3;
  font: 700 1.15rem/1 var(--serif);
  letter-spacing: .075em;
  text-shadow: 0 2px 5px #261014;
  transition: transform 180ms ease, filter 180ms ease;
}
.room-primary img {
  position: absolute;
  inset: -1px;
  display: block;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  z-index: -1;
  opacity: 0;
}
.room-primary.has-art { border-color: transparent; background: transparent; }
.room-primary.has-art img { opacity: 1; }
.room-primary:hover { transform: translateY(-2px); filter: brightness(1.19); }
.room-primary:active { transform: translateY(0); }
.join-form { display: grid; width: 100%; gap: .52rem; grid-template-columns: minmax(0, 1fr) auto; }
.join-form input, .join-form button {
  min-height: 46px;
  border-radius: 3px;
  border: 1px solid #b296796d;
  color: #f4e5da;
  background: #121018c9;
}
.join-form input { width: 100%; padding: .45rem .8rem; letter-spacing: .12em; }
.join-form input::placeholder { color: #c2b3b2; letter-spacing: .025em; }
.join-form button { padding: .45rem .8rem; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.join-form button:hover { background: #2b2028; border-color: #bca185; }
.cases-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 42px;
  margin-top: .16rem;
  color: #e4c9a8;
  text-underline-offset: .28em;
  font-size: .87rem;
}
.cases-link span { font-size: 1.1rem; line-height: 1; }
.records { background: radial-gradient(ellipse at 82% 20%, #241923 0%, #17131c 40%, #100e15 75%); padding: clamp(3rem, 8vw, 7rem) 0; }
.records__header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1.65rem; }
.records h2, .dialog h2 { margin: 0 0 .35rem; color: var(--ivory); font: 700 clamp(1.7rem, 3vw, 2.5rem)/1.3 var(--serif); letter-spacing: -.055em; }
.records p, .dialog p { margin: 0; color: var(--muted); }
.back-link { color: #d5bc9d; font-size: .84rem; text-underline-offset: .25em; white-space: nowrap; }
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.case-card {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: .58rem;
  min-height: 205px;
  color: #d9c9bd;
  background: linear-gradient(135deg, #2b212b, #1b1620 78%);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1rem, 2.2vw, 1.65rem);
  text-align: left;
  font-size: .9rem;
}
.case-card:hover { border-color: #e0b885; background: linear-gradient(135deg, #362631, #211925 78%); }
.case-card strong { margin: .2rem 0 0; color: var(--ivory); font: 700 clamp(1.16rem, 2vw, 1.5rem)/1.3 var(--serif); }
.case-card__type, .case-card__link { font-size: .78rem; color: #dfbf90; }
.case-card__link { margin-top: .5rem; }
.dialog {
  position: fixed;
  width: min(calc(100% - 2.5rem), 460px);
  padding: 2rem;
  color: var(--ivory);
  background: #211924;
  border: 1px solid #a98569;
  border-radius: 6px;
  box-shadow: 0 24px 100px #0008;
}
.dialog::backdrop { background: #08070bcc; }
.dialog h2 { padding-right: 1.6rem; }
.dialog__close {
  position: absolute;
  top: .55rem;
  right: .65rem;
  border: 0;
  width: 42px;
  height: 42px;
  color: var(--ivory);
  background: transparent;
  font-size: 1.6rem;
}
@keyframes sway { from { transform: rotate(-.8deg) translateY(0); } to { transform: rotate(1.8deg) translateY(1.2%); } }
@keyframes mist { from { transform: translate3d(-5%, 1%, 0); opacity: .7; } to { transform: translate3d(4%, -5%, 0); opacity: .95; } }
@media (max-width: 850px) {
  .frame { width: 88%; }
  .hero__content { width: min(65%, 500px); }
  .site-header { padding-inline: 6%; }
  .scene__manor { object-position: 66% center; }
  .scene__shade {
    background:
      linear-gradient(0deg, #100e15, transparent 33%),
      linear-gradient(90deg, #100e15fa 0%, #100e15df 27%, #100e15a0 46%, #100e1528 70%, transparent);
  }
}
@media (max-width: 600px) {
  .hero { min-height: 100svh; min-height: max(690px, 100svh); }
  .hero__frame { justify-content: flex-end; }
  .hero__content { width: 100%; padding: clamp(14rem, 37svh, 20rem) 0 2.25rem; }
  .hero__title { width: min(100%, 420px); margin-bottom: .82rem; }
  .hero__kind { margin-bottom: .58rem; }
  .hero__premise { margin-bottom: 1.15rem; line-height: 1.75; }
  .scene__manor { height: 73%; object-position: 72% 20%; }
  .scene__shade {
    background:
      linear-gradient(0deg, #100e15 0%, #100e15 28%, #100e15a9 44%, transparent 71%, #100e1569 100%),
      linear-gradient(90deg, #100e1542 0%, transparent 60%);
  }
  .scene__tree--right { width: 230px; right: -135px; bottom: 30%; }
  .scene__tree--left { left: -140px; bottom: 24%; }
  .scene__leaves { right: -102px; top: -22px; }
  .cases { grid-template-columns: 1fr; }
  .case-card { min-height: 0; }
  .records__header { align-items: start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .scene__manor, .scene__tree--left, .scene__leaves { transform: none; }
  .scene__tree--right { transform: scaleX(-1); }
}
