:root {
  --ink: #0b0b0d;
  --stone: #141417;
  --fog: #c9c7c1;
  --paper: #d9d2c3;
  --paper-dark: #b9b09c;
  --text: #d6d1c6;
  --muted: #8f8a80;
  --blood: #7c1d1d;
  --blood-hi: #a83232;
  --wood: #2a2119;
  --serif: "Nanum Myeongjo", "Gowun Batang", serif;
  --body: "Gowun Batang", "Nanum Myeongjo", serif;
  --hand: "Nanum Pen Script", cursive;
  --latin: "Cinzel", serif;
  --mx: 50vw;
  --my: 50vh;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.locked, html.locked body { overflow: hidden; height: 100%; overscroll-behavior: none; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.75;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 50% -10%, #2a2b30 0%, transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.35'/></svg>");
}
img { max-width: 100%; display: block; }
a { color: var(--fog); }
.small { font-size: .86em; color: var(--muted); }
.hand { font-family: var(--hand); font-size: 1.45em; line-height: 1.3; }

/* ── 날씨 ───────────────────────── */
#rain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .55; }
.fog { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.fog i {
  position: absolute; left: -50%; width: 200%; height: 60vh;
  background: radial-gradient(ellipse at center, rgba(180,180,175,.10), transparent 65%);
  animation: drift 60s linear infinite;
  filter: blur(8px);
}
.fog i:nth-child(1) { top: 10vh; }
.fog i:nth-child(2) { top: 45vh; animation-duration: 85s; animation-direction: reverse; opacity: .8; }
.fog i:nth-child(3) { top: 70vh; animation-duration: 110s; opacity: .6; }
@keyframes drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }

/* ── 가면(렌즈) 모드 ───────────── */
.lens-veil {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0;
  transition: opacity .8s ease;
  background: radial-gradient(circle 260px at var(--mx) var(--my), transparent 0 55%, rgba(5,5,6,.55) 70%, rgba(3,3,4,.92) 100%);
}
body.lens .lens-veil { opacity: 1; }
body.lens main > section:not(#sightings), body.lens .foot, body.lens .top { filter: grayscale(.92) contrast(1.08) sepia(.12); transition: filter .8s ease; }
body.lens #sightings .tx, body.lens #sightings .sec-title, body.lens #sightings .sec-note { filter: grayscale(1); }
body.lens .sightings .sight img { filter: none !important; }
body.lens .sightings { filter: none; }
.lens-on-only { display: none; }
body.lens .lens-on-only { display: block; }
body.lens .lens-off-only { display: none; }

/* ── 들어가는 화면 ─────────────── */
.toll {
  position: fixed; inset: 0; z-index: 100; background: #050506;
  display: grid; place-items: center; text-align: center;
  transition: opacity 1.2s ease, visibility 1.2s;
}
.toll.gone { opacity: 0; visibility: hidden; }
.toll-inner { padding: 24px; }
.toll-line {
  font-family: var(--serif); font-size: clamp(18px, 3.2vw, 26px); letter-spacing: .08em;
  color: #bdb8ad; margin: .5em 0; opacity: 0; transform: translateY(8px);
  animation: rise 1.4s ease forwards; animation-delay: var(--d);
}
.toll-line.bell { color: #e6e0d4; font-weight: 800; animation-name: rise, quake; animation-duration: 1.4s, .9s; animation-delay: var(--d), calc(var(--d) + .3s); }
.toll-enter {
  margin-top: 2.2em; font: inherit; font-family: var(--serif); letter-spacing: .3em;
  background: none; color: var(--fog); border: 1px solid #5a5650; padding: .7em 2.2em; cursor: pointer;
  opacity: 0; animation: rise 1.2s ease forwards; animation-delay: var(--d);
  transition: border-color .3s, color .3s, letter-spacing .4s;
}
.toll-enter:hover { border-color: var(--blood-hi); color: #fff; letter-spacing: .4em; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes quake {
  0%,100% { transform: none; } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); } 80% { transform: translateX(1px); }
}

/* ── 상단 ───────────────────────── */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px; padding: 10px 24px;
  background: linear-gradient(#0b0b0dee, #0b0b0d99 70%, transparent);
}
.brand img { height: 44px; width: auto; filter: drop-shadow(0 0 8px #0008); }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.top nav a { text-decoration: none; color: var(--muted); font-family: var(--serif); letter-spacing: .06em; }
.top nav a:hover { color: var(--text); }
.mask-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: #16161a; color: var(--text); border: 1px solid #3a3833; padding: 6px 14px;
  font-family: var(--serif); letter-spacing: .05em; border-radius: 2px;
}
.mask-btn[aria-pressed="true"] { border-color: var(--blood); background: #1e1213; }
.mask-ico {
  width: 22px; height: 12px; position: relative;
  background: radial-gradient(circle at 30% 50%, #777 0 3px, transparent 4px), radial-gradient(circle at 70% 50%, #777 0 3px, transparent 4px);
}
.mask-ico::after { content: ""; position: absolute; right: -10px; top: 4px; border-left: 12px solid #555; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }

main { position: relative; z-index: 3; }

/* ── 첫 화면 ───────────────────── */
.hero {
  min-height: 92vh; display: grid; grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 48px; align-items: center; padding: 40px clamp(20px, 6vw, 96px);
}
.hero-cover { width: 100%; border: 1px solid #2c2b28; box-shadow: 0 30px 80px #000c; }
.kicker { color: var(--muted); letter-spacing: .2em; font-size: .85em; }
.hero h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(30px, 5vw, 56px); line-height: 1.25; margin: .2em 0 .5em; color: #ece6da; text-shadow: 0 2px 30px #000; }
.lede { max-width: 34em; color: #bdb7ab; }
.scroll-cue { display: inline-block; margin-top: 1.4em; text-decoration: none; color: var(--muted); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ── 섹션 공통 ─────────────────── */
section { scroll-margin-top: 70px; }
.sec-title { text-align: center; margin: 0 0 .4em; font-family: var(--serif); }
.sec-title span { display: block; font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; color: #e7e1d5; letter-spacing: .1em; }
.sec-title small { display: block; font-family: var(--latin); font-size: 12px; letter-spacing: .4em; color: var(--muted); margin-top: .3em; }
.sec-note { text-align: center; color: var(--muted); margin: 0 0 2em; }
.link-btn { background: none; border: 0; border-bottom: 1px solid var(--blood-hi); color: var(--text); font: inherit; cursor: pointer; padding: 0; }

/* ── 게시판 ───────────────────── */
.board-wrap { padding: 80px clamp(14px, 4vw, 64px); }
.board {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 48px 40px 64px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 36px 28px; align-items: start;
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, #0003 118px 121px),
    repeating-linear-gradient(0deg, #ffffff05 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #3a2e23, #241c15 60%, #1a140f);
  border: 14px solid #1b1510;
  box-shadow: inset 0 0 80px #000c, 0 40px 90px #000e;
}
.board::before { /* 비에 젖은 자국 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #0000 0 60%, #0006), radial-gradient(ellipse at 20% 0%, #fff1, transparent 40%);
}
.notice {
  position: relative; color: #2a241c; background: var(--paper);
  padding: 26px 22px 22px; transform: rotate(var(--r)) translateY(24px); opacity: 0;
  box-shadow: 0 10px 22px #000a, inset 0 0 40px #8a7b5c55;
  transition: transform .45s cubic-bezier(.2,.7,.2,1.2), box-shadow .3s, opacity .9s;
  cursor: zoom-in; outline: none;
  background-image: radial-gradient(ellipse at 80% 90%, #9c8a6655, transparent 50%), radial-gradient(ellipse at 10% 10%, #fff6, transparent 40%);
}
.notice.shown { opacity: 1; transform: rotate(var(--r)); }
.notice:hover, .notice:focus-visible { transform: rotate(0deg) scale(1.03); z-index: 5; box-shadow: 0 24px 40px #000c, inset 0 0 40px #8a7b5c55; }
.notice header { font-size: .78em; letter-spacing: .3em; color: #6a5d48; border-bottom: 1px solid #8f7f62; padding-bottom: .3em; }
.notice h3 { font-family: var(--serif); font-weight: 800; font-size: 1.35em; margin: .4em 0; color: #1c1712; }
.notice ol, .notice ul { padding-left: 1.2em; margin: .4em 0; }
.notice li { margin: .25em 0; }
.notice b { color: #5e1414; }
.notice .sig { text-align: right; font-size: .85em; color: #5c5040; margin-top: 1em; }
.notice .small { color: #6a5d48; }
.pin { position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c9c3b6, #4b4741 60%, #1f1d1a); box-shadow: 2px 3px 4px #0009; }
.decree { background-color: #ddd5c2; clip-path: polygon(0 1%, 4% 0, 30% 1%, 62% 0, 100% 1%, 99% 40%, 100% 98%, 70% 100%, 40% 99%, 2% 100%, 0 60%); }
.scrap { background: #cfc5b0; padding: 30px 18px 16px; clip-path: polygon(2% 4%, 98% 0, 96% 50%, 100% 97%, 5% 100%, 0 55%); }
.scrap .hand { color: #2b2620; }
.wanted { background: #e1d9c7; border: 3px double #6b5c44; }
.ledger { background: #d6ceb9; background-image: repeating-linear-gradient(0deg, transparent 0 27px, #8b7d6266 27px 28px); }
.probe { list-style: none; padding: 0; }
.probe li { display: flex; gap: 10px; border-bottom: 1px dotted #8b7d62; padding: 2px 0; }
.probe span { min-width: 6.5em; font-weight: 700; color: #3b2f22; }
.stamp.cross { position: absolute; right: 16px; top: 22px; width: 54px; height: 54px; opacity: .78; transform: rotate(-12deg);
  background: linear-gradient(var(--blood), var(--blood)) center/14px 100% no-repeat, linear-gradient(var(--blood), var(--blood)) center/100% 14px no-repeat;
  mix-blend-mode: multiply; }
.notice.shown .stamp { animation: stampIn .5s ease-out .5s both; }
@keyframes stampIn { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } 70% { transform: rotate(-12deg) scale(.95); opacity: .85; } to { transform: rotate(-12deg) scale(1); opacity: .78; } }
.stamp.seal-red, .seal { position: absolute; right: 16px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #a33 0 20%, #6e1515 60%, #3d0b0b); box-shadow: 0 2px 4px #0008; }
.seal { background: radial-gradient(circle at 40% 35%, #444 0 20%, #1c1c1c 60%, #000); }

/* ── 명부 ───────────────────────── */
.roster-wrap { padding: 90px clamp(14px, 4vw, 64px); background: linear-gradient(#0000, #0d0d10 20%, #0d0d10 80%, #0000); }
.roster-group { max-width: 1200px; margin: 0 auto 40px; }
.roster-group h3 { font-family: var(--serif); color: var(--muted); letter-spacing: .3em; font-size: 15px; border-bottom: 1px solid #2c2b28; padding-bottom: 6px; }
.roster-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  position: relative; display: block; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden;
  aspect-ratio: 2 / 1; opacity: 0; transform: translateY(18px); transition: opacity .8s, transform .8s;
}
.card.shown { opacity: 1; transform: none; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, filter .6s; filter: saturate(.85) brightness(.9); }
.card:hover img { transform: scale(1.04); filter: none; }
.card .q { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 10px; text-align: left; font-family: var(--hand); font-size: 22px; color: #eee7da;
  background: linear-gradient(#0000, #000c); transform: translateY(100%); transition: transform .4s ease; }
.card:hover .q, .card:focus-visible .q { transform: none; }

/* ── 목격담 ───────────────────── */
.sight-wrap { padding: 90px clamp(14px, 4vw, 64px); }
.sightings { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.sight { position: relative; background: #0f0f12; border: 1px solid #26252a; overflow: hidden; }
.sight .ph { aspect-ratio: 3 / 2; overflow: hidden; background: #050506; }
.sight img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.08) blur(6px) contrast(1.6); transition: filter 1.2s ease; }
.sight .tx { padding: 14px 16px 18px; }
.sight h4 { margin: 0 0 .2em; font-family: var(--serif); font-size: 1.15em; }
.sight .rumor { color: #a9a397; }
.sight .weak { display: none; margin-top: .5em; color: #d6c9b0; border-top: 1px solid #2c2b28; padding-top: .5em; }
.sight .weak b { color: var(--blood-hi); font-weight: 400; letter-spacing: .2em; font-size: .85em; margin-right: .5em; }
body.lens .sight .weak { display: block; }
.sight h4 .redact { display: inline-block; background: #e8e2d6; height: .9em; width: 5em; vertical-align: middle; }
body.lens .sight h4 .redact { display: none; }
.sight h4 .real { display: none; }
body.lens .sight h4 .real { display: inline; }
body.lens .sight { cursor: pointer; }

/* ── 시작하기 ─────────────────── */
.begin-wrap { padding: 90px clamp(14px, 4vw, 64px) 120px; }
.begin { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.paper { background: #17161a; border: 1px solid #2c2b28; padding: 24px 24px 20px; }
.paper h3 { font-family: var(--serif); margin: 0 0 .4em; color: #ece6da; }
.tips { grid-column: 1 / -1; }
code { font-family: var(--body); background: #24232a; padding: 1px 7px; border-radius: 2px; color: #ddd6c8; }

.foot { position: relative; z-index: 3; text-align: center; padding: 60px 20px 80px; color: var(--muted); border-top: 1px solid #1f1e22; }
.foot .hand { color: #b8b2a6; font-size: 30px; }

/* ── 서류(모달) ───────────────── */
.dossier { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 1px solid #3a3833; background: #0f0f12; color: var(--text); overflow: auto; }
.dossier::backdrop { background: #000c; backdrop-filter: blur(3px) grayscale(1); }
.dossier .close { position: absolute; right: 10px; top: 6px; z-index: 2; background: none; border: 0; color: var(--text); font-size: 30px; cursor: pointer; }
.dz { display: grid; grid-template-columns: 1.2fr 1fr; }
.dz-fig { margin: 0; background: #000; position: relative; }
.dz-fig img { width: 100%; height: 100%; max-height: 80vh; object-fit: contain; }
.dz-fig figcaption { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: #aaa; letter-spacing: .15em; background: #0008; padding: 2px 8px; }
.dz-body { padding: 34px 30px 24px; }
.dz-title { color: var(--muted); letter-spacing: .15em; font-size: .88em; margin: 0; }
.dz-body h3 { font-family: var(--serif); font-size: 2.1em; margin: .1em 0 0; color: #f0eadf; }
.dz-roman { font-family: var(--latin); letter-spacing: .35em; color: var(--muted); font-size: 12px; margin: 0 0 1.2em; }
.dz-quote { font-family: var(--hand); font-size: 28px; color: #e4dccd; border-left: 2px solid var(--blood); padding-left: 12px; }
.dz-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-top: 1.4em; }
.dz-strip button { padding: 0; border: 1px solid #2a292e; background: #000; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.dz-strip button[aria-current="true"] { border-color: var(--blood-hi); }
.dz-strip img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 24px; min-height: auto; padding-top: 24px; }
  .hero-cover { max-width: 230px; margin: 0 auto; }
  .top { padding: 6px 10px; gap: 8px; flex-wrap: nowrap; }
  .brand img { height: 30px; }
  .top nav { flex-wrap: nowrap; overflow-x: auto; gap: 12px; font-size: 13px; margin-left: 4px; scrollbar-width: none; white-space: nowrap; }
  .top nav::-webkit-scrollbar { display: none; }
  .mask-btn { padding: 5px 8px; flex: none; font-size: 12px; gap: 5px; }
  .mask-ico { display: none; }
  .sec-title small { letter-spacing: .18em; font-size: 10px; }
  .notice { font-size: 15px; }
  .board { padding: 36px 16px 48px; border-width: 8px; }
  .dz { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .notice, .card { opacity: 1; transform: rotate(var(--r, 0)); }
  .toll-line, .toll-enter { opacity: 1; transform: none; }
}
