:root {
    --black: #15110E;
    --walnut: #6B4328;
    --navy: #1C2D4A;
    --brass: #B88A3D;
    --amber: #F0B35A;
    --vermilion: #D24A2E;
    --paper: #F4E7C8;
    --olive: #6F7352;
    --title: "Fraunces", serif;
    --body: "Noto Sans KR", "Inter", "IBM Plex Sans", sans-serif;
    --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--black);
    color: var(--paper);
    font-family: var(--body);
    overflow-x: hidden;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    opacity: .18;
    background-image: radial-gradient(circle at 20% 30%, rgba(244,231,200,.22) 0 1px, transparent 1px), radial-gradient(circle at 70% 60%, rgba(21,17,14,.7) 0 1px, transparent 1px);
    background-size: 4px 4px, 7px 7px;
    mix-blend-mode: overlay;
}

.club-scroll { width: 100%; }
.room {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, .82fr);
    align-items: center;
    padding: 7vw 9vw;
    isolation: isolate;
}

.room::before {
    content: "";
    position: absolute;
    inset: 4vw;
    border: 1px solid rgba(184,138,61,.28);
    border-radius: 34px;
    pointer-events: none;
}

.keyrail {
    position: fixed;
    top: 50%;
    right: 2vw;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.key {
    color: rgba(244,231,200,.55);
    text-decoration: none;
    font: 500 11px/1 var(--mono);
    letter-spacing: .08em;
    writing-mode: vertical-rl;
    padding: 14px 8px;
    border: 1px solid rgba(184,138,61,.25);
    border-radius: 999px;
    background: rgba(21,17,14,.62);
    transition: .45s ease;
}
.key span { color: var(--brass); margin-block-end: 6px; }
.key.is-active { color: var(--paper); background: var(--walnut); box-shadow: 0 0 28px rgba(240,179,90,.22); }

.hallway { background: linear-gradient(105deg, #15110E 0%, #211710 44%, #6B4328 100%); grid-template-columns: 1fr 1fr; }
.wall-grid {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0 18%, rgba(184,138,61,.08) 18% 18.4%, transparent 18.4% 44%, rgba(184,138,61,.06) 44% 44.3%, transparent 44.3%), linear-gradient(0deg, transparent 0 23%, rgba(244,231,200,.04) 23% 23.4%, transparent 23.4% 67%, rgba(244,231,200,.04) 67% 67.3%, transparent 67.3%);
}
.door-stage { position: relative; width: min(430px, 70vw); height: 78vh; justify-self: center; }
.door-light { position: absolute; left: 47%; top: 2%; bottom: 2%; width: 22px; background: var(--amber); filter: blur(5px); box-shadow: 0 0 55px #F0B35A; }
.door-panel {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #15110E, #2b1b13 62%, #6B4328);
    border: 8px solid #15110E;
    border-radius: 26px 10px 10px 26px;
    box-shadow: 36px 26px 80px rgba(0,0,0,.45), inset -18px 0 38px rgba(21,17,14,.72);
    transform: translateX(var(--door-open, 0px));
    transition: transform .16s linear;
}
.door-shadow { position: absolute; inset: 7% -8% 5% 55%; background: rgba(21,17,14,.5); filter: blur(28px); z-index: -1; }
.brass-plaque {
    position: absolute;
    top: 18%; left: 18%;
    width: 220px;
    padding: 20px 22px;
    color: var(--black);
    background: linear-gradient(135deg, #F0B35A, #B88A3D 70%);
    border-radius: 18px 18px 18px 4px;
    box-shadow: inset 0 1px rgba(244,231,200,.6), 0 22px 42px rgba(0,0,0,.28);
}
.plaque-number, .eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; }
.brass-plaque strong { display: block; font-family: var(--title); font-size: 31px; line-height: .95; margin: 8px 0; }
.brass-plaque em { font-style: normal; font-weight: 700; }
.intercom-button { position: absolute; top: 54%; right: 17%; width: 74px; height: 74px; border: 0; border-radius: 50%; background: #1C2D4A; color: #F4E7C8; font-family: var(--mono); box-shadow: inset 0 -7px rgba(21,17,14,.42), 0 0 0 7px rgba(184,138,61,.32); }
.paper-talisman { position: absolute; right: 9%; top: 34%; width: 42px; padding: 11px 0; text-align: center; color: var(--vermilion); background: var(--paper); font-family: var(--title); box-shadow: 0 12px 30px rgba(0,0,0,.25); transform-origin: 50% 0; animation: talisman 3.2s ease-in-out infinite; }
.intro-copy { max-width: 570px; z-index: 2; }
h1, h2 { font-family: var(--title); font-weight: 650; line-height: .88; margin: 0; letter-spacing: -.045em; }
h1 { font-size: clamp(58px, 9vw, 142px); }
h2 { font-size: clamp(54px, 8vw, 120px); }
p { font-size: clamp(16px, 1.55vw, 22px); line-height: 1.65; color: rgba(244,231,200,.82); }
.scroll-note { position: absolute; bottom: 6vh; left: 50%; transform: translateX(-50%); font-family: var(--mono); color: var(--amber); font-size: 12px; letter-spacing: .16em; }

.listening { background: radial-gradient(circle at 20% 30%, rgba(240,179,90,.18), transparent 29%), linear-gradient(135deg, #1C2D4A, #15110E 62%); }
.record-console { width: min(620px, 82vw); aspect-ratio: 1.22; background: linear-gradient(135deg, #6B4328, #342016); border-radius: 42px; padding: 48px; box-shadow: 0 44px 90px rgba(0,0,0,.36), inset 0 0 0 2px rgba(240,179,90,.18); display: flex; align-items: center; gap: 42px; }
.turntable { position: relative; flex: 1; aspect-ratio: 1; background: #F4E7C8; border-radius: 28px; }
.vinyl { position: absolute; inset: 10%; border-radius: 50%; background: repeating-radial-gradient(circle, #15110E 0 7px, #211a16 8px 10px); animation: spin 7s linear infinite; }
.vinyl span { position: absolute; inset: 36%; border-radius: 50%; background: var(--vermilion); border: 11px solid var(--amber); }
.tonearm { position: absolute; width: 42%; height: 10px; right: 4%; top: 20%; background: var(--brass); border-radius: 20px; transform: rotate(34deg); transform-origin: 88% 50%; }
.speaker-stack { width: 130px; display: grid; gap: 17px; }
.speaker-stack div { height: 72px; border-radius: 24px; background: repeating-linear-gradient(90deg, #15110E 0 6px, #1C2D4A 6px 12px); border: 2px solid rgba(244,231,200,.16); }
.chapter-copy { position: relative; z-index: 2; max-width: 610px; }
.matchbook-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.matchbook-row span { background: var(--paper); color: var(--black); padding: 13px 18px; border-radius: 6px 18px 6px 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.moon-lamp { position: absolute; right: 10%; top: 10%; width: 118px; height: 118px; border-radius: 50%; background: #F0B35A; box-shadow: 0 0 90px #F0B35A; }

.ledger { background: linear-gradient(90deg, #F4E7C8 0 52%, #6F7352 52% 100%); color: var(--black); }
.ledger p, .ledger .eyebrow { color: rgba(21,17,14,.74); }
.low-table { position: relative; width: min(650px, 82vw); height: 480px; border-radius: 44px 44px 120px 44px; background: linear-gradient(145deg, #6B4328, #3d2619); box-shadow: 0 50px 80px rgba(21,17,14,.34), inset 0 0 0 4px rgba(184,138,61,.22); }
.tea-ring { position: absolute; border-radius: 50%; border: 7px solid rgba(240,179,90,.32); }
.ring-one { width: 130px; height: 130px; left: 14%; top: 13%; }
.ring-two { width: 88px; height: 88px; right: 18%; bottom: 19%; }
.club-card { position: absolute; width: 225px; padding: 25px; background: #F4E7C8; color: var(--black); box-shadow: 0 18px 35px rgba(0,0,0,.26); }
.club-card span { font-family: var(--mono); font-size: 11px; color: var(--vermilion); text-transform: uppercase; }
.club-card strong { display: block; font-family: var(--title); font-size: 31px; margin-top: 9px; }
.card-a { left: 27%; top: 26%; transform: rotate(-7deg); }
.card-b { right: 9%; top: 14%; transform: rotate(9deg); }
.vermilion-chop { position: absolute; left: 16%; bottom: 18%; width: 82px; height: 82px; display: grid; place-items: center; border: 7px solid var(--vermilion); color: var(--vermilion); font: 700 35px var(--title); transform: rotate(-10deg); }
.ledger-lines { list-style: none; padding: 0; margin: 30px 0 0; border-top: 2px solid rgba(21,17,14,.24); }
.ledger-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(21,17,14,.22); font-family: var(--mono); }
.ledger-lines span { color: var(--vermilion); }

.balcony { background: linear-gradient(150deg, #15110E, #1C2D4A 55%, #0d1727); }
.window-lattice { position: absolute; inset: 8vw 11vw; border: 18px solid rgba(244,231,200,.13); border-radius: 34px; display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: inset 0 0 80px rgba(0,0,0,.44); }
.window-lattice span { border-right: 9px solid rgba(244,231,200,.12); transform: skewX(-8deg); }
.large-moon { position: absolute; right: 18%; top: 18%; width: clamp(180px, 28vw, 390px); height: clamp(180px, 28vw, 390px); border-radius: 50%; background: #F4E7C8; box-shadow: 0 0 110px rgba(240,179,90,.48); transform: translateY(var(--moon-drift, 0px)); }
.smoke-curls { position: absolute; left: 16%; bottom: 16%; width: 260px; height: 260px; }
.smoke-curls i { position: absolute; bottom: 0; width: 58px; height: 190px; border-left: 3px solid rgba(244,231,200,.34); border-radius: 50%; animation: smoke 5s ease-in-out infinite; }
.smoke-curls i:nth-child(2) { left: 72px; animation-delay: .8s; height: 230px; }
.smoke-curls i:nth-child(3) { left: 142px; animation-delay: 1.5s; height: 160px; }
.balcony-copy { align-self: end; grid-column: 1; }

.last-key { background: radial-gradient(circle at 70% 20%, rgba(210,74,46,.2), transparent 24%), linear-gradient(120deg, #6B4328, #15110E 58%); }
.membership-ledger { width: min(620px, 82vw); min-height: 620px; background: #F4E7C8; color: var(--black); border-radius: 30px; padding: 38px; transform: rotate(-2deg); box-shadow: 0 50px 90px rgba(0,0,0,.4); }
.ledger-header { display: flex; justify-content: space-between; font-family: var(--mono); color: var(--walnut); padding-bottom: 18px; border-bottom: 2px solid rgba(107,67,40,.3); }
.stamp-field { margin: 80px auto 55px; width: 76%; min-height: 250px; border: 2px dashed rgba(107,67,40,.35); display: grid; place-items: center; text-align: center; padding: 34px; position: relative; }
.stamp-mark { width: 155px; height: 155px; border: 10px solid var(--vermilion); color: var(--vermilion); display: grid; place-items: center; font: 800 42px var(--title); opacity: .16; transform: scale(.82) rotate(-8deg); transition: .55s cubic-bezier(.2,1,.2,1); }
.stamp-field.is-stamped .stamp-mark { opacity: .95; transform: scale(1) rotate(-8deg); }
.stamp-field p { color: rgba(21,17,14,.66); margin: 0; font-family: var(--mono); font-size: 13px; }
.brass-key { display: block; position: relative; width: 260px; height: 98px; margin: 0 auto; border: 0; background: transparent; cursor: pointer; transform: translateY(0); transition: transform .3s ease; }
.brass-key:hover { transform: translateY(-8px) rotate(2deg); }
.key-bow { position: absolute; left: 0; top: 8px; width: 82px; height: 82px; border: 18px solid #B88A3D; border-radius: 50%; }
.key-stem { position: absolute; left: 75px; top: 42px; width: 155px; height: 18px; background: #B88A3D; border-radius: 20px; }
.key-bit { position: absolute; right: 13px; top: 42px; width: 46px; height: 46px; background: linear-gradient(90deg, #B88A3D 0 18px, transparent 18px 28px, #B88A3D 28px); }
.final-copy { max-width: 560px; }

.room .chapter-copy, .room .room-card, .room .low-table, .room .membership-ledger { opacity: .42; transform: translateY(36px); transition: opacity .7s ease, transform .7s ease; }
.room.is-visible .chapter-copy, .room.is-visible .room-card, .room.is-visible .low-table, .room.is-visible .membership-ledger { opacity: 1; transform: translateY(0); }
.last-key.is-visible .membership-ledger { transform: rotate(-2deg) translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes talisman { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(7deg); } }
@keyframes smoke { 0%,100% { transform: translateY(0) scaleX(1); opacity: .28; } 50% { transform: translateY(-30px) scaleX(1.5); opacity: .62; } }

@media (max-width: 820px) {
    .room { grid-template-columns: 1fr; gap: 34px; padding: 20vw 7vw; }
    .keyrail { display: none; }
    .hallway { grid-template-columns: 1fr; }
    .door-stage { height: 58vh; order: -1; }
    .ledger { background: linear-gradient(180deg, #F4E7C8 0 58%, #6F7352 58%); }
    .large-moon { right: 6%; top: 14%; }
    .window-lattice { inset: 12vw 5vw; }
}
