/* 『부탁해요 선지자님!』 — DESIGN.md 구현 */
:root {
  --bg: #0D0A14; --surface: #17111F; --surface-2: #211A2C; --surface-3: #2A2233;
  --fg: #EDE4D2; --muted: #A99F8C; --line: rgba(216, 181, 106, .28); --line-soft: rgba(216, 181, 106, .14);
  --gold: #D8B56A; --gold-hi: #EED49A; --gold-lo: #B8914A; --gold-dd: #4A2E0C;
  --crimson: #B8303A; --crimson-hi: #E0505A; --crimson-tint: #F3B8BE; --rose: #E3A3B8; --rose-lo: #B8577A; --jade: #9FD4C8;
  --st-통솔: #D8B56A; --st-무력: #E08A6A; --st-지력: #A48BE8; --st-민첩: #6FC2B4; --st-매력: #E89AB8;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px; --s24: 96px; --s32: 128px;
  --display: 'Black Han Sans', 'Noto Serif KR', serif;
  --serif: 'Noto Serif KR', 'Gowun Batang', 'Batang', serif;
  --caps: 'Cinzel', 'Noto Serif KR', serif;
  --body: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 900; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ic { width: 1em; height: 1em; vertical-align: -.15em; fill: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.eyebrow { font-family: var(--caps); font-weight: 600; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.eyebrow--crimson { color: var(--crimson-hi); }

/* 금선 액자 */
.frame { position: relative; isolation: isolate; }
.frame::before { content: ''; position: absolute; inset: 10px; border: 2px solid var(--gold); pointer-events: none; z-index: 3; opacity: .9; }
.frame::after {
  content: ''; position: absolute; inset: 15px; border: 1px solid var(--gold-hi); opacity: .55; pointer-events: none; z-index: 3;
}

/* 상단 메뉴 */
.topnav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 0 var(--s6); height: 60px; background: rgba(13, 10, 20, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.topnav__brand { display: inline-flex; align-items: center; gap: var(--s2); font-family: var(--serif); font-weight: 900; font-size: 17px; color: var(--gold-hi); white-space: nowrap; }
.topnav__brand .ic { color: var(--gold); width: 22px; height: 22px; }
.topnav__links { display: flex; align-items: center; gap: var(--s6); }
.topnav__links a { font-size: 14px; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.topnav__links a:hover, .topnav__links a.is-active { color: var(--fg); border-bottom-color: var(--gold); }
.topnav__cta { color: var(--bg) !important; background: var(--gold); padding: 7px 14px !important; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); font-weight: 600; border: 0 !important; }
.topnav__cta:hover { background: var(--gold-hi); }
.topnav__toggle { display: none; width: 40px; height: 40px; background: none; border: 0; flex-direction: column; justify-content: center; gap: 5px; }
.topnav__toggle span { display: block; width: 22px; height: 2px; background: var(--gold); margin: 0 auto; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 12px 22px; font-weight: 600; font-size: 15px; border: 1px solid var(--gold); color: var(--gold-hi); background: transparent; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: var(--gold); color: var(--bg); transform: translateY(-2px); }
.btn--solid { background: var(--gold); color: var(--bg); }
.btn--solid:hover { background: var(--gold-hi); }
.btn--blood { border-color: var(--crimson); color: var(--crimson-tint); }
.btn--blood:hover { background: var(--crimson); color: var(--fg); }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn:focus-visible, .topnav__cta:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--gold-hi); }
.ostat input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--gold-hi); }
.ostat input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--gold-hi); }

/* 히어로 */
.hero { position: relative; min-height: 100svh; padding: calc(60px + var(--s12)) var(--s6) var(--s16); display: grid; place-items: center; overflow: hidden; }
.hero__bgimg { position: absolute; inset: -10%; background: var(--hero-bg, none) center/cover no-repeat; filter: blur(28px) saturate(.8) brightness(.45); opacity: .55; z-index: 0; }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(13, 10, 20, .85) 85%), linear-gradient(to bottom, rgba(13, 10, 20, .2), var(--bg) 96%); z-index: 1; }
.hero__inner { position: relative; z-index: 2; width: min(var(--wrap), 100%); display: grid; grid-template-columns: minmax(300px, 520px) 1fr; gap: var(--s12); align-items: center; }
.hero__poster { margin: 0; aspect-ratio: 1; background: var(--surface); box-shadow: var(--shadow); }
.hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.hero__poster #coverAnim { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.hero__poster.is-live #coverAnim { opacity: 1; }
.hero__title { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7.2vw, 92px); line-height: 1.05; margin: var(--s3) 0 var(--s6); letter-spacing: .01em;
  background: linear-gradient(180deg, #FFF6D6 0%, #F2D27C 46%, #B8762C 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 var(--gold-dd)) drop-shadow(0 10px 22px rgba(0, 0, 0, .55)); }
.hero__lede { font-family: var(--serif); font-weight: 700; font-size: clamp(18px, 2.1vw, 23px); line-height: 1.6; color: var(--fg); max-width: 34ch; }
.hero__sub { margin-top: var(--s4); color: var(--muted); max-width: 48ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s8); }
.hero__tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s8); }
.hero__tags li { font-size: 12.5px; color: var(--gold); border: 1px solid var(--line); padding: 4px 10px; background: rgba(23, 17, 31, .6); }

/* 섹션 공통 */
.section { padding: var(--s32) var(--s6); max-width: var(--wrap); margin: 0 auto; }
.section__head { max-width: 72ch; margin-bottom: var(--s12); }
.section__head--sub { margin-top: var(--s24); }
.section__title { font-size: clamp(30px, 4vw, 44px); color: var(--gold-hi); margin: var(--s2) 0 var(--s4); }
.section__lede { color: var(--muted); font-size: 17px; }

/* 대사창 */
.vn-box { position: relative; background: linear-gradient(180deg, rgba(28, 22, 48, .92), rgba(10, 7, 18, .94)); border: 2px solid var(--gold); border-radius: 12px; padding: 24px 28px 22px; box-shadow: var(--shadow), inset 0 0 0 1px rgba(216, 181, 106, .25); }
.vn-box::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--gold-lo); border-radius: 8px; pointer-events: none; opacity: .7; }
.vn-box p { font-family: var(--serif); font-weight: 900; font-size: clamp(17px, 2vw, 22px); line-height: 1.5; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.vn-box__plate { position: absolute; top: -18px; left: 22px; padding: 5px 16px 5px 26px; border-radius: 8px; border: 2px solid var(--gold-hi); font-family: var(--serif); font-weight: 900; font-size: 15px; letter-spacing: .08em; line-height: 1.4; }
.vn-box__plate::before { content: ''; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; transform: translateY(-50%) rotate(45deg); background: currentColor; }
.vn-box__plate--story, .vn-box__plate--yuria, .vn-box__plate--gold { background: linear-gradient(180deg, #FFF6DE, #E2BA60); color: #42280E; }
.vn-box__plate--puray, .vn-box__plate--crimson { background: linear-gradient(180deg, #78141E, #380810); color: #FFDE96; }
.vn-box__plate--ruby { background: linear-gradient(180deg, #FFF0C8, #D9A040); color: #3A2208; }
.vn-box__plate--masrie, .vn-box__plate--steel { background: linear-gradient(180deg, #4A4458, #1E1A28); color: var(--fg); }
.vn-box__next { position: absolute; right: 18px; bottom: 12px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 10px solid var(--gold-hi); }

/* 그림책 */
.book { display: grid; gap: var(--s6); }
.book__stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.book__img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: opacity .35s var(--ease); }
.book__img.is-fading { opacity: 0; }
.book__box { position: absolute; left: var(--s6); right: var(--s6); bottom: var(--s6); }
.book__box.is-in { animation: slideIn .22s var(--ease); }
.book__auto { margin-left: var(--s2); }
@keyframes slideIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.book__nav { display: flex; align-items: center; justify-content: center; gap: var(--s4); }
.book__dots { display: flex; gap: var(--s2); }
.book__dots button { width: 12px; height: 12px; padding: 0; border: 1px solid var(--gold); background: transparent; transform: rotate(45deg); transition: background .2s var(--ease); }
.book__dots button[aria-current="true"] { background: var(--gold); }

/* 왕의 법 */
.laws__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--s8); align-items: start; }
.edict { counter-reset: law; background: var(--surface-3); padding: calc(var(--s8) + 10px) calc(var(--s8) + 14px); display: grid; gap: var(--s4); }
.edict li { counter-increment: law; display: grid; grid-template-columns: 64px 1fr; gap: var(--s4); align-items: start; padding: var(--s4) 0; border-bottom: 1px solid var(--line-soft); }
.edict li:last-child { border-bottom: 0; }
.edict li::before { content: counter(law, upper-roman); font-family: var(--caps); font-weight: 700; font-size: 30px; line-height: 1; color: var(--gold); padding-top: 4px; }
.edict__law { font-family: var(--serif); font-weight: 900; font-size: clamp(19px, 2.2vw, 25px); color: var(--fg); }
.edict__note { display: block; margin-top: 4px; font-size: 13px; color: var(--gold-lo); font-style: normal; }
.laws__aside { display: grid; gap: var(--s4); }
.paradox { background: var(--surface); border: 1px solid var(--line-soft); border-left: 3px solid var(--crimson); padding: var(--s6); }
.paradox--gold { border-left-color: var(--gold); }
.paradox h3 { font-size: 20px; margin: var(--s2) 0 var(--s3); color: var(--gold-hi); }
.paradox p { color: var(--muted); font-size: 15px; }

/* 주역 카드 */
.cast__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-areas: 'y y p p' 'y y r m'; gap: var(--s4); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line-soft); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); display: grid; grid-template-rows: auto 1fr; }
.card:hover, .card:focus-within, .card.reveal.is-in:hover, .card.reveal.is-in:focus-within { transform: translateY(-4px); border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(216, 181, 106, .35); }
.card.reveal { transition: opacity .26s ease-out, transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
.card--y .card__art { aspect-ratio: auto; min-height: 420px; }
.card--y { grid-area: y; } .card--p { grid-area: p; } .card--r { grid-area: r; } .card--m { grid-area: m; }
.card__art { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.card--p .card__art { aspect-ratio: 2 / 1; }
.card__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: opacity .45s var(--ease), transform .6s var(--ease); }
.card__art img.alt { opacity: 0; }
.card:hover .card__art img.alt { opacity: 1; }
.card:hover .card__art img { transform: scale(1.03); }
.card__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 10, 20, .92) 0%, rgba(13, 10, 20, .2) 45%, transparent 70%); }
.card__badge { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--caps); font-size: 12px; letter-spacing: .14em; color: var(--gold-hi); border: 1px solid var(--gold); background: rgba(13, 10, 20, .7); padding: 4px 10px; border-radius: 999px; }
.card__head { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; }
.card__role { font-size: 12.5px; color: var(--gold); letter-spacing: .04em; }
.card__name { font-size: clamp(24px, 2.6vw, 34px); color: var(--fg); text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.card__name small { font-family: var(--caps); font-size: 12px; letter-spacing: .18em; color: var(--gold-hi); margin-left: 8px; vertical-align: middle; }
.card__species { font-size: 13px; color: var(--muted); }
.card__body { padding: var(--s4) var(--s6) var(--s6); display: grid; gap: var(--s3); align-content: start; }
.card__lv { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.card__lv b { color: var(--gold-hi); font-family: var(--caps); letter-spacing: .1em; }
.gauges { display: grid; gap: 6px; }
.gauge { display: grid; grid-template-columns: 34px 1fr 32px; gap: var(--s2); align-items: center; font-size: 12px; color: var(--muted); }
.gauge b { color: var(--fg); font-weight: 600; }
.gauge__track { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.gauge__fill { height: 100%; width: var(--p, 0%); border-radius: 999px; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 45%, transparent); transition: width .8s var(--ease); }
.gauge--aff .gauge__fill { background: var(--rose); } .gauge--paff .gauge__fill { background: var(--rose-lo); }
.gauge__val { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); }
.card__quote { margin-top: var(--s2); padding: 16px 18px 14px; }
.card__quote p { font-size: 16px; }
.card__quote .vn-box__plate { top: -14px; font-size: 12px; padding: 3px 12px 3px 22px; }
.card__speech { display: flex; flex-wrap: wrap; gap: 6px; }
.card__speech span { font-size: 12px; color: var(--gold-hi); border: 1px solid var(--line); padding: 2px 8px; }
.card__more { font-size: 13px; color: var(--gold); margin-top: auto; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; justify-self: start; }

/* 왕성 */
.places { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-flow: dense; gap: var(--s3); }
.place { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line-soft); cursor: zoom-in; background: var(--surface); }
.place:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.place:nth-child(10) { grid-column: 3 / -1; aspect-ratio: auto; }
.place img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.place:hover img { transform: scale(1.05); }
.place__txt { position: absolute; inset: auto 0 0 0; padding: var(--s4); background: linear-gradient(to top, rgba(13, 10, 20, .95), rgba(13, 10, 20, .55) 60%, transparent); }
.place__zone { font-family: var(--caps); font-size: 12px; letter-spacing: .16em; color: var(--gold); }
.place__name { font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--fg); }
.place__walk { font-size: 12px; color: var(--muted); }
.place__note { font-size: 12.5px; color: var(--fg); opacity: 0; max-height: 0; transition: opacity .3s var(--ease), max-height .3s var(--ease); }
.place:hover .place__note, .place:focus-visible .place__note { opacity: 1; max-height: 80px; margin-top: 6px; }
@media (hover: none) { .place__note { opacity: 1; max-height: none; margin-top: 6px; } }

/* 미궁 하강도 */
.descent { display: grid; gap: var(--s3); }
.step { display: grid; grid-template-columns: 72px 160px 1fr; gap: var(--s4); align-items: center; background: var(--surface); border: 1px solid var(--line-soft); padding: var(--s3); margin-left: calc(var(--i) * 5%); transition: border-color .2s var(--ease); }
.step:hover { border-color: var(--gold); }
.step__no { font-family: var(--caps); font-weight: 700; font-size: 36px; color: var(--gold); text-align: center; line-height: 1; }
.step__no small { display: block; font-size: 11.5px; letter-spacing: .2em; color: var(--muted); margin-top: 4px; }
.step__img { aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line-soft); cursor: zoom-in; }
.step__name { font-size: 19px; color: var(--gold-hi); display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.step__stat { font-family: var(--body); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; color: var(--bg); background: var(--c, var(--gold)); padding: 2px 8px; border-radius: 999px; }
.step__lim { font-size: 12.5px; color: var(--crimson-hi); border: 1px solid rgba(184, 48, 58, .5); padding: 1px 8px; border-radius: 999px; }
.step__note { font-size: 14px; color: var(--muted); margin-top: 4px; }
.laby-laws { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-top: var(--s8); }
.laby-laws li { background: var(--surface-2); border-top: 2px solid var(--gold); padding: var(--s4); }
.laby-laws b { display: block; font-family: var(--serif); font-size: 16px; color: var(--gold-hi); margin-bottom: 6px; }
.laby-laws p { font-size: 13.5px; color: var(--muted); }

/* 서약서 */
.oath__grid { display: grid; grid-template-columns: 420px 1fr; gap: var(--s8); align-items: start; }
.oath__sheet { background: linear-gradient(180deg, #221B2E, #150F1D); padding: calc(var(--s8) + 8px); box-shadow: var(--shadow); }
.oath__eyebrow { font-family: var(--caps); font-size: 12px; letter-spacing: .18em; color: var(--gold); display: flex; align-items: center; gap: 6px; }
.oath__title { font-size: 22px; color: var(--gold-hi); margin: var(--s2) 0 var(--s6); }
.oath__stats { display: grid; gap: var(--s3); }
.ostat { display: grid; grid-template-columns: 44px 1fr 44px; gap: var(--s3); align-items: center; }
.ostat label { font-family: var(--serif); font-weight: 700; font-size: 14px; color: var(--c); }
.ostat small { display: block; font-family: var(--body); font-weight: 400; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.ostat input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--c) var(--p), rgba(255, 255, 255, .1) var(--p)); outline: none; }
.ostat input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--c); cursor: pointer; }
.ostat input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid var(--bg); cursor: pointer; }
.ostat output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--fg); }
.oath__sum { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.oath__react { display: grid; gap: var(--s3); }
.react { display: grid; grid-template-columns: 110px 1fr; gap: var(--s4); align-items: start; background: var(--surface); border-left: 3px solid var(--c); padding: var(--s4) var(--s6); }
.react__k { font-family: var(--serif); font-weight: 900; font-size: 18px; color: var(--c); }
.react__k small { display: block; font-family: var(--caps); font-size: 11.5px; letter-spacing: .16em; color: var(--muted); margin-top: 2px; }
.react__v { font-size: 15px; color: var(--fg); }
.systems { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: var(--s12); }
.sys { background: var(--surface); border: 1px solid var(--line-soft); padding: var(--s6); }
.sys:nth-child(3n+2) { background: var(--surface-2); }
.sys h4 { font-size: 18px; color: var(--gold-hi); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.sys code { font-family: ui-monospace, 'Consolas', monospace; font-size: 12px; color: var(--gold); background: rgba(216, 181, 106, .1); padding: 1px 6px; }
.sys p { font-size: 14px; color: var(--muted); margin-top: var(--s2); }

/* 두 갈래 시작 */
.modes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: stretch; }
.mode { padding: calc(var(--s8) + 10px); background: var(--surface); display: grid; gap: var(--s4); align-content: start; }
.mode--hard { background: linear-gradient(180deg, #1F0D12, #120910); }
.mode h3 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); color: var(--gold-hi); letter-spacing: .01em; }
.mode--hard h3 { color: var(--crimson-tint); }
.mode p { color: var(--muted); font-size: 15px; }
.mode__points { display: grid; gap: var(--s2); }
.mode__points li { font-size: 14px; padding-left: 18px; position: relative; color: var(--fg); }
.mode__points li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.mode--hard .mode__points li::before { background: var(--crimson-hi); }
.mode__shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.mode__shelf figure { margin: 0; position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(184, 48, 58, .4); cursor: zoom-in; }
.mode__shelf img { width: 100%; height: 100%; object-fit: cover; }
.mode__shelf figcaption { position: absolute; inset: auto 0 0 0; padding: 6px 8px; font-family: var(--serif); font-weight: 700; font-size: 12px; background: linear-gradient(to top, rgba(13, 10, 20, .95), transparent); color: var(--fg); }
.stages { display: grid; gap: 6px; }
.stage { display: grid; grid-template-columns: 30px 80px 72px 1fr; gap: var(--s2); align-items: baseline; font-size: 13.5px; padding: 8px 10px; background: rgba(0, 0, 0, .25); border-left: 2px solid var(--crimson); }
.stage b { font-family: var(--caps); color: var(--crimson-hi); } .stage i { font-style: normal; color: var(--muted); } .stage em { font-style: normal; font-weight: 600; }
.stage span { color: var(--muted); }
.stage em { color: var(--crimson-tint); }
.mode__reclaim { border-top: 1px solid rgba(184, 48, 58, .35); padding-top: var(--s4); color: var(--fg) !important; }

/* 18+ 게이트 */
.gated { position: relative; }
.gated > .gate { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(13, 10, 20, .72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); text-align: center; padding: var(--s6); }
.gated.is-open > .gate { display: none; }
.gate__box { display: grid; gap: var(--s3); justify-items: center; max-width: 360px; }
.gate__box .ic { width: 34px; height: 34px; color: var(--crimson-hi); }
.gate__box p { color: var(--fg); font-size: 14px; }
.gate__box small { color: var(--muted); font-size: 12px; }
.gated:not(.is-open) > :not(.gate) { filter: blur(14px); user-select: none; pointer-events: none; }

/* 갤러리 */
.gallery__tabs { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s6); }
.gallery__tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 16px; font-family: var(--serif); font-weight: 700; font-size: 14px; transition: all .2s var(--ease); }
.gallery__tabs button[aria-selected="true"], .gallery__tabs button:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.gallery__chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: calc(var(--s4) * -1) 0 var(--s6); }
.gallery__chips:empty { display: none; }
.gallery__chips button { background: transparent; border: 1px solid var(--line-soft); color: var(--muted); padding: 5px 12px; font-size: 12.5px; border-radius: 999px; transition: all .2s var(--ease); }
.gallery__chips button b { color: var(--gold); font-weight: 600; margin-left: 4px; }
.gallery__chips button[aria-pressed="true"] { border-color: var(--gold); color: var(--fg); background: rgba(216, 181, 106, .1); }
.gallery__chips button.is-adult[aria-pressed="true"] { border-color: var(--crimson); background: rgba(184, 48, 58, .12); }
.gallery__wrap { min-height: 320px; }
.gallery__wrap.gated:not(.is-open) { max-height: 560px; overflow: hidden; }
.gallery__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); }
.gallery__grid.is-wide { grid-template-columns: repeat(4, 1fr); }
.gallery__grid.is-wide .cut { aspect-ratio: 16 / 10; }
.gallery__grid.is-wide .cut img { object-position: center; }
.cut small { position: absolute; top: 6px; left: 6px; font-family: var(--caps); font-size: 11.5px; letter-spacing: .1em; color: var(--gold-hi); background: rgba(13, 10, 20, .7); padding: 2px 6px; border: 1px solid var(--line-soft); }
.cut { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); cursor: zoom-in; padding: 0; }
.cut img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; transition: transform .5s var(--ease); }
.cut:hover img { transform: scale(1.06); }
.cut span { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: 12.5px; color: var(--fg); background: linear-gradient(to top, rgba(13, 10, 20, .9), transparent); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery__sub { font-size: 22px; color: var(--gold-hi); margin: var(--s12) 0 var(--s4); }
.live { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.live figure { margin: 0; background: var(--surface); border: 1px solid var(--line-soft); }
.live img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.live figcaption { padding: 8px 12px; font-size: 12.5px; color: var(--muted); }

/* 푸터 */
.outro { max-width: var(--wrap); margin: 0 auto; padding: var(--s24) var(--s6) var(--s16); text-align: center; }
.outro .vn-box { max-width: 760px; margin: 0 auto var(--s8); text-align: center; }
.outro .vn-box p { font-size: clamp(17px, 2vw, 21px); }
.outro__cta { display: flex; justify-content: center; gap: var(--s3); flex-wrap: wrap; }
.footer { max-width: var(--wrap); margin: 0 auto; padding: var(--s8) var(--s6) var(--s16); border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s4); color: var(--muted); font-size: 13px; }
.footer a { color: var(--gold); }

/* 모달 · 라이트박스 */
.modal, .lightbox { position: fixed; inset: 0; z-index: 80; display: none; }
.modal.is-open, .lightbox.is-open { display: block; }
.modal__scrim, .lightbox__scrim { position: absolute; inset: 0; background: rgba(5, 3, 9, .8); backdrop-filter: blur(6px); }
.modal__panel { position: absolute; inset: 5vh 50% auto auto; transform: translateX(50%); width: min(860px, 92vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow), 0 0 0 2px var(--gold), 0 0 0 6px var(--bg), 0 0 0 7px var(--gold-lo); }
.modal__close, .lightbox__close { position: absolute; top: 18px; right: 18px; z-index: 6; width: 40px; height: 40px; border: 1px solid var(--line); background: rgba(13, 10, 20, .7); color: var(--gold-hi); display: grid; place-items: center; }
.modal__close .ic, .lightbox__close .ic { width: 18px; height: 18px; }
.modal__body { padding: 0; overflow: auto; max-height: 90vh; }
.mc__hero { display: grid; grid-template-columns: 300px 1fr; }
.mc__hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.mc__head { padding: calc(var(--s8) + 8px) var(--s8) var(--s6); display: grid; gap: var(--s2); align-content: center; }
.mc__head h2 { font-size: 34px; color: var(--gold-hi); }
.mc__head h2 small { font-family: var(--caps); font-size: 12px; letter-spacing: .18em; margin-left: 8px; color: var(--gold); }
.mc__meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--s3); }
.mc__body { padding: var(--s6) var(--s8) var(--s8); display: grid; gap: var(--s6); }
.mc__body h4 { font-size: 13px; font-family: var(--caps); letter-spacing: .16em; color: var(--gold); margin-bottom: 6px; }
.mc__body p { font-size: 15px; color: var(--fg); }
.mc__arc { display: grid; gap: 6px; }
.mc__arc li { display: grid; grid-template-columns: 100px 1fr; gap: var(--s3); font-size: 14px; padding: 8px 10px; background: var(--surface-2); border-left: 2px solid var(--rose); }
.mc__arc b { color: var(--rose); font-family: var(--caps); font-size: 12px; letter-spacing: .08em; }
.lightbox__fig { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: var(--s6); pointer-events: none; }
.lightbox__fig img { max-width: min(1024px, 92vw); max-height: 82vh; object-fit: contain; border: 1px solid var(--line); box-shadow: var(--shadow); pointer-events: auto; }
.lightbox__fig figcaption { margin-top: var(--s3); color: var(--muted); font-size: 13px; }

/* 리빌 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .26s ease-out, transform .26s ease-out; }
.reveal.is-in { opacity: 1; transform: none; }

/* 반응형 */
@media (max-width: 1100px) {
  .places { grid-template-columns: repeat(3, 1fr); }
  .gallery__grid { grid-template-columns: repeat(4, 1fr); }
  .gallery__grid.is-wide { grid-template-columns: repeat(3, 1fr); }
  .card--y .card__art { min-height: 0; }
  .systems { grid-template-columns: repeat(2, 1fr); }
  .laby-laws { grid-template-columns: repeat(2, 1fr); }
  .oath__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topnav__toggle { display: flex; }
  .topnav__links { position: fixed; inset: 60px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: rgba(13, 10, 20, .96); border-bottom: 1px solid var(--line); padding: var(--s3) var(--s6) var(--s6); transform: translateY(calc(-100% - 60px)); visibility: hidden; transition: transform .25s var(--ease), visibility 0s linear .25s; }
  .topnav__links.is-open { transform: none; visibility: visible; transition: transform .25s var(--ease), visibility 0s; }
  .topnav__links a { padding: 12px 0; border-bottom: 1px solid var(--line-soft) !important; }
  .topnav__cta { margin-top: var(--s3); text-align: center; clip-path: none; }
  .hero { padding-top: calc(60px + var(--s8)); }
  .hero__inner { grid-template-columns: 1fr; gap: var(--s8); }
  .hero__poster { max-width: 520px; width: 100%; margin: 0 auto; }
  .section { padding: var(--s16) var(--s4); }
  .laws__grid, .modes__grid { grid-template-columns: 1fr; }
  .cast__grid { grid-template-columns: 1fr 1fr; grid-template-areas: 'y y' 'p p' 'r m'; }
  .card--p .card__art { aspect-ratio: 16 / 10; }
  .step { grid-template-columns: 56px 1fr; margin-left: 0; }
  .step__img { grid-column: 2; }
  .step__txt { grid-column: 2; }
  .live { grid-template-columns: repeat(2, 1fr); }
  .mc__hero { grid-template-columns: 1fr; }
  .mc__hero img { aspect-ratio: 1; }
  .modal__panel { inset: 3vh 4vw auto; transform: none; width: auto; max-height: 94vh; }
}
@media (max-width: 560px) {
  .hero__title { font-size: 46px; }
  .cast__grid { grid-template-columns: 1fr; grid-template-areas: 'y' 'p' 'r' 'm'; }
  .places { grid-template-columns: repeat(2, 1fr); }
  .place:nth-child(1) { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .place:nth-child(10) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .gallery__grid.is-wide { grid-template-columns: repeat(2, 1fr); }
  .systems, .laby-laws { grid-template-columns: 1fr; }
  .book__box { left: var(--s3); right: var(--s3); bottom: var(--s3); padding: 18px 16px 16px; }
  .book__stage { aspect-ratio: 4 / 5; }
  .vn-box p { font-size: 15px; }
  .edict { padding: var(--s8) var(--s6); }
  .edict li { grid-template-columns: 44px 1fr; }
  .edict li::before { font-size: 22px; }
  .stage { grid-template-columns: 26px auto 1fr; }
  .stage span { grid-column: 1 / -1; }
  .mode__shelf { grid-template-columns: repeat(2, 1fr); }
  .react { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .book__box.is-in { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
