/* ════════════════════════════════════════════════════════════
   RAVENFORD — style.css
   컨셉: 시네마틱 다크
   거의 검은 밤 · 화면 가득한 그림 · 큰 세리프 제목 · 얇은 선 · 금색은 포인트로만
   장식은 빼고, 여백과 글자 크기로 위계를 만든다. 본문은 고딕으로 읽기 쉽게.
   ════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0b0f;
  --bg-2: #0f1116;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .065);
  --panel: rgba(255, 255, 255, .04);
  --panel-solid: #14161c;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .17);
  --text: #eeeae3;
  --text-2: rgba(238, 234, 227, .78);
  --text-3: rgba(238, 234, 227, .52);
  --gold: #d2b37a;
  --gold-rgb: 210, 179, 122;
  --accent: var(--gold);
  --accent-rgb: var(--gold-rgb);
  --war: #e0644f;
  --war-rgb: 224, 100, 79;
  --danger: #e0644f;
  --danger-rgb: 224, 100, 79;

  --f-body: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --f-disp: 'Cinzel', 'Cormorant Garamond', serif;
  --f-cg: 'Cormorant Garamond', 'Noto Serif KR', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --nav-left: 0px;
  --nav-top: 68px;
  --dock-h: 72px;
  --wrap: 1200px;
  --gut: clamp(18px, 4vw, 56px);
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --dim: 0;
}

/* 영어 소제목 · 라벨: 작은 대문자 + 넓은 자간 */
.eyebrow, .block__title small, .mini-title small, .lore__k, .side__en, .house__en, .place__en, .cbanner__en,
.cm__sec h4, .notice__kicker, .tl__when, .spell__la, .sub-title span:not(.sub-title__t), .mt__head, .cm__en, .hero__stats span, .intro__kicker, .intro__eyebrow {
  font-family: var(--f-body); font-weight: 600; text-transform: uppercase; font-style: normal;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--f-body); font-size: 16px; line-height: 1.8; letter-spacing: -.003em;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "lnum" 1;  /* Cormorant 의 옛 숫자(1 → I 처럼 보임) 방지 · font 단축 속성에도 지워지지 않음 */
  padding-bottom: var(--dock-h);
}
body.is-intro, body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
svg { width: 1em; height: 1em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--gold-rgb), .35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2d35; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3e48; }

/* ════════ 배경: 밤의 성 (스크롤할수록 어두워짐) ════════ */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.stage__img { position: absolute; inset: -3%; background: url('../assets/bg/castle.jpg') center 35% / cover; animation: kenburns 70s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.08) translate3d(-1%, -.6%, 0); } }
.stage__tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 11, 15, calc(.2 + var(--dim) * .72)) 0%, rgba(10, 11, 15, calc(.45 + var(--dim) * .48)) 50%, rgba(10, 11, 15, .97) 100%); transition: background .8s; }
body:not([data-view="world"]) .stage__tint { background: linear-gradient(180deg, rgba(10, 11, 15, .82), rgba(10, 11, 15, .97) 60%); }
body[data-view="sorting"] .stage__tint { background: radial-gradient(ellipse at 50% 40%, rgba(10, 11, 15, .7), rgba(10, 11, 15, .98) 70%); }
.stage__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(0, 0, 0, .55) 100%); }
.stage__grain { position: absolute; inset: -50%; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, 3%); } 100% { transform: translate(0, 0); } }
.fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; width: 100%; height: 100%; opacity: .7; }

/* ════════ 공통 ════════ */
.eyebrow { margin: 0 0 1rem; display: flex; align-items: center; justify-content: inherit; gap: .6em; flex-wrap: wrap; font-size: .74rem; line-height: 1.4; letter-spacing: .24em; color: var(--gold); }
.eyebrow span { opacity: .45; }
.eyebrow svg { width: 15px; height: 15px; }
.t-war { color: var(--war) !important; }
.note { margin: 1rem 0 0; font-size: .86rem; color: var(--text-3); line-height: 1.7; }
.empty { padding: 48px 0; text-align: center; color: var(--text-3); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ════════ 인트로 (이야기) ════════ */
.intro { position: fixed; inset: 0; z-index: 200; background: #000; overflow: hidden; color: #fff; cursor: pointer; user-select: none; -webkit-user-select: none; transition: opacity 1.2s var(--ease); }
.intro.is-out { opacity: 0; pointer-events: none; }
.intro__slides { position: absolute; inset: 0; }
.intro__slide { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.6s var(--ease); }
.intro__slide.is-on { opacity: 1; }
/* 앞: 그림 전체(잘리지 않음) · 뒤: 같은 그림을 흐리게 깔아 여백을 채움 */
.intro__fill { position: absolute; inset: -8%; background: center / cover no-repeat; filter: blur(28px) brightness(.4) saturate(.9); }
.intro__pic { position: absolute; inset: 0; background: center / contain no-repeat; transform: scale(1.03); transition: transform 9s linear; }
.intro__slide.is-on .intro__pic { transform: scale(1); }
.intro__tint { position: absolute; inset: 0; pointer-events: none; transition: background 1.2s; background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .2) 42%, rgba(0, 0, 0, .3) 100%); }
.intro[data-tint="dim"] .intro__tint, .intro.is-start .intro__tint { background: radial-gradient(ellipse at center, rgba(0, 0, 0, .5), rgba(0, 0, 0, .92) 75%); }
.intro[data-tint="war"] .intro__tint { background: linear-gradient(0deg, rgba(18, 0, 0, .92) 0%, rgba(110, 10, 10, .3) 50%, rgba(30, 0, 0, .45) 100%); }
.intro[data-tint="war"] .intro__slide.is-on { filter: saturate(.6) sepia(.3) hue-rotate(-20deg); }
.intro.is-title .intro__tint { background: linear-gradient(0deg, rgba(10, 11, 15, .92), rgba(10, 11, 15, .25) 55%, rgba(10, 11, 15, .5)); }
.intro__start { position: absolute; inset: 0; z-index: 4; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; cursor: default; }
.intro.is-start .intro__start { display: flex; animation: fadeUp 1.4s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.intro__mark { width: 52px; height: 52px; color: var(--gold); }
.intro__kicker { margin: 0 0 8px; font-size: .72rem; letter-spacing: .32em; color: rgba(255, 255, 255, .6); }
.intro__begin, .intro__enter { position: relative; padding: 1rem 2.8rem; font: 600 .98rem var(--f-body); letter-spacing: .18em; color: #fff; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; background: rgba(0, 0, 0, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .3s, color .3s, border-color .3s; }
.intro__begin i, .intro__enter i { display: none; }
.intro__begin:hover, .intro__enter:hover { background: #fff; color: #0a0b0f; border-color: #fff; }
.intro__opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.intro__opt { display: inline-flex; align-items: center; gap: 8px; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); font-size: .84rem; color: rgba(255, 255, 255, .75); transition: .25s; }
.intro__opt svg { width: 15px; height: 15px; }
.intro__opt:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.intro__opt[aria-pressed="true"] { color: #0a0b0f; background: var(--gold); border-color: var(--gold); }
.intro__hint { margin: 6px 0 0; font-size: .78rem; color: rgba(255, 255, 255, .42); }
/* 시대 표시: 장면을 멈추지 않고 왼쪽 위 구석에서 조용히 바뀜 */
.intro__chapter { position: absolute; z-index: 3; left: 24px; top: 22px; display: flex; align-items: baseline; gap: 10px; max-width: calc(100% - 210px); padding-left: 12px; border-left: 2px solid var(--gold); pointer-events: none; opacity: 0; text-shadow: 0 1px 8px #000; transition: opacity .6s; }
.intro.is-story:not(.is-title) .intro__chapter.is-on { opacity: 1; animation: eraIn 1.2s var(--ease) both; }
@keyframes eraIn { from { opacity: 0; transform: translateX(-10px); } }
.intro__ch-no { font: 600 .9rem/1 var(--f-cg); color: var(--gold); }
.intro__ch-era { font: 600 .74rem var(--f-body); letter-spacing: .14em; color: rgba(255, 255, 255, .65); white-space: nowrap; }
.intro__ch-title { font: 600 .86rem/1.3 var(--f-body); color: rgba(255, 255, 255, .9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intro__box { position: absolute; z-index: 3; left: 50%; bottom: 7vh; width: min(900px, calc(100% - 40px)); transform: translate(-50%, 12px); text-align: center; opacity: 0; transition: opacity .6s, transform .6s var(--ease); pointer-events: none; }
.intro__box.is-on { opacity: 1; transform: translate(-50%, 0); }
.intro__who { display: none; margin-bottom: .6rem; font: 600 .8rem var(--f-body); letter-spacing: .2em; color: var(--gold); }
.intro__box.is-line .intro__who { display: block; }
.intro__text { margin: 0; min-height: 1.8em; font: 500 clamp(1.08rem, 2.1vw, 1.42rem)/1.85 var(--f-serif); letter-spacing: .01em; text-shadow: 0 2px 14px #000, 0 0 4px #000; }
.intro__box.is-line .intro__text { font-weight: 700; font-size: clamp(1.25rem, 2.6vw, 1.8rem); }
.intro__next { display: block; margin-top: .6rem; font-style: normal; font-size: .75rem; color: var(--gold); opacity: 0; }
.intro__box.is-done .intro__next { animation: blink 1.2s infinite; }
@keyframes blink { 0%, 100% { opacity: .9; } 50% { opacity: .15; } }
.intro__title { position: absolute; inset: 0; z-index: 4; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px; text-align: center; cursor: default; }
.intro.is-title .intro__title { display: flex; }
.intro__eyebrow { margin: 0 0 1.6rem; font-size: .74rem; letter-spacing: .5em; padding-left: .5em; color: rgba(255, 255, 255, .7); animation: fadeUp 1.4s .2s var(--ease) both; }
.intro__logo { display: flex; justify-content: center; gap: clamp(.12em, 1.4vw, .42em); margin: 0; font: 500 clamp(2.4rem, 9.5vw, 7.2rem)/1 var(--f-disp); color: #fff; }
.intro__logo span { display: inline-block; animation: letterIn 1.4s var(--ease) both; }
.intro__logo span:nth-child(1) { animation-delay: .3s; } .intro__logo span:nth-child(2) { animation-delay: .4s; } .intro__logo span:nth-child(3) { animation-delay: .5s; }
.intro__logo span:nth-child(4) { animation-delay: .6s; } .intro__logo span:nth-child(5) { animation-delay: .7s; } .intro__logo span:nth-child(6) { animation-delay: .8s; }
.intro__logo span:nth-child(7) { animation-delay: .9s; } .intro__logo span:nth-child(8) { animation-delay: 1s; } .intro__logo span:nth-child(9) { animation-delay: 1.1s; }
@keyframes letterIn { from { opacity: 0; transform: translateY(24px); filter: blur(10px); } }
.intro__sub { margin: 1.6rem 0 2.6rem; font: 500 clamp(.98rem, 1.8vw, 1.18rem) var(--f-serif); letter-spacing: .12em; color: rgba(255, 255, 255, .85); animation: fadeUp 1.4s 1.5s var(--ease) both; }
.intro__enter { animation: fadeUp 1.4s 2s var(--ease) both; }
.intro__ctrl { position: absolute; z-index: 6; top: 18px; right: 20px; display: none; gap: 8px; }
.intro.is-story:not(.is-title) .intro__ctrl { display: flex; }
.intro__ctrl button { padding: .42rem .95rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .4); font: 600 .7rem var(--f-body); letter-spacing: .18em; color: rgba(255, 255, 255, .82); }
.intro__ctrl button:hover { color: #fff; border-color: #fff; }
.intro__ctrl button[aria-pressed="true"] { color: #0a0b0f; background: var(--gold); border-color: var(--gold); }
.intro__prog { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .08); }
.intro__prog i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease); }
.intro.is-start .intro__prog { opacity: 0; }

/* ════════ 상단 메뉴 바 ════════ */
.hud {
  position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: var(--nav-top);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gut);
  background: linear-gradient(180deg, rgba(10, 11, 15, .82), rgba(10, 11, 15, .6));
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: opacity .8s, transform .8s var(--ease);
}
body.is-intro .hud { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.hud__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.hud__mark { width: 28px; height: 28px; color: var(--gold); }
.hud__name { font: 500 1rem var(--f-disp); letter-spacing: .26em; color: var(--text); }
.hud__nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.hud__nav a { position: relative; display: flex; align-items: baseline; gap: 8px; padding: .5rem .95rem; text-decoration: none; color: var(--text-2); transition: color .25s; }
.hud__nav a b { font: 600 .68rem var(--f-cg); color: var(--text-3); letter-spacing: .04em; }
.hud__nav a span { font-size: .92rem; font-weight: 500; }
.hud__nav a::after { content: ''; position: absolute; left: .95rem; right: .95rem; bottom: 2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.hud__nav a:hover { color: var(--text); }
.hud__nav a:hover::after { transform: scaleX(.4); }
.hud__nav a.is-active { color: var(--text); }
.hud__nav a.is-active b { color: var(--gold); }
.hud__nav a.is-active::after { transform: scaleX(1); }
.hud__tools { display: flex; align-items: center; gap: 2px; flex: none; }
.hud__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); transition: .25s; }
.hud__btn svg { width: 18px; height: 18px; }
.hud__btn:hover { color: var(--text); background: var(--surface-2); }
.hud__menu { display: none; }
.lang { position: relative; }
.lang__btn { display: flex; gap: 6px; width: auto; padding: 0 10px; border-radius: 999px; }
.lang__btn svg { width: 16px; height: 16px; }
.lang__btn b { font: 600 .7rem var(--f-body); letter-spacing: .08em; }
.lang__menu { position: absolute; right: 0; top: calc(100% + 12px); min-width: 180px; padding: 6px; z-index: 5; border-radius: 8px; background: #15171d; border: 1px solid var(--line-2); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.lang.is-open .lang__menu { opacity: 1; transform: none; pointer-events: auto; }
.lang__menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: .62rem .75rem; border-radius: 5px; font-size: .9rem; color: var(--text-2); text-align: left; }
.lang__menu button b { width: 34px; font: 600 .7rem var(--f-body); color: var(--text-3); }
.lang__menu button:hover { background: var(--surface-2); color: var(--text); }
.lang__menu button[aria-checked="true"] { color: var(--text); background: rgba(var(--gold-rgb), .12); }
.lang__menu button[aria-checked="true"] b { color: var(--gold); }

:root[lang="ja"] { --f-body: 'Noto Sans JP', 'Pretendard Variable', sans-serif; --f-serif: 'Noto Serif JP', 'Noto Serif KR', serif; }
:root[lang="zh-Hant"] { --f-body: 'Noto Sans TC', 'Pretendard Variable', sans-serif; --f-serif: 'Noto Serif TC', 'Noto Serif KR', serif; }
:root[lang="ja"] body, :root[lang="zh-Hant"] body { word-break: normal; line-break: strict; }
:root[lang="en"] body { word-break: normal; }

/* ════════ 뷰 공통 ════════ */
main { position: relative; z-index: 2; }
.view { position: relative; padding: var(--nav-top) 0 0; min-height: 100vh; }
.view > * { width: min(var(--wrap), 100% - var(--gut) * 2); margin-inline: auto; }
.view.is-entering { animation: viewIn .9s var(--ease) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 섹션: 상자 없이, 위쪽 얇은 선 + 큰 제목 */
.block { position: relative; margin-top: clamp(96px, 12vw, 170px); }
.block__head { display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: clamp(36px, 5vw, 60px); padding-top: 28px; border-top: 1px solid var(--line); }
.block__head .eyebrow { margin-bottom: 1.2rem; }
.block__title { margin: 0; font: 700 clamp(2rem, 4.6vw, 3.5rem)/1.18 var(--f-serif); letter-spacing: -.02em; color: var(--text); }
.block__title small { display: block; margin-top: 1rem; font-size: .7rem; letter-spacing: .3em; color: var(--text-3); }
.block__text { margin: 0 0 1.3rem; max-width: 760px; font-size: 1.06rem; line-height: 1.95; color: var(--text-2); }
.block__text strong { color: var(--text); font-weight: 700; }
.sub-title { display: flex; align-items: baseline; gap: 16px; margin: clamp(56px, 7vw, 88px) 0 1.6rem; font: 700 clamp(1.4rem, 2.6vw, 1.85rem) var(--f-serif); }
.sub-title span:not(.sub-title__t) { font-size: .66rem; letter-spacing: .26em; color: var(--text-3); }
.mini-title { margin: 0 0 1.4rem; font: 700 1.4rem var(--f-serif); }
.mini-title small { display: block; margin-top: .4rem; font-size: .64rem; color: var(--text-3); letter-spacing: .26em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.page-head { padding: clamp(64px, 10vw, 128px) 0 clamp(32px, 4vw, 48px); }
.page-head__title { margin: 0; font: 700 clamp(2.6rem, 6.4vw, 4.8rem)/1.1 var(--f-serif); letter-spacing: -.03em; }
.page-head__lead { margin: 1.4rem 0 0; max-width: 680px; font-size: 1.08rem; line-height: 1.9; color: var(--text-2); }

/* 버튼 */
.btn-main { display: inline-flex; align-items: center; gap: 12px; padding: 1rem 1.7rem; border-radius: 999px; font: 600 .96rem var(--f-body); background: var(--gold); color: #12100c; transition: transform .3s var(--ease), background .3s, box-shadow .3s; }
.btn-main svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn-main:hover { background: #e2c690; box-shadow: 0 14px 40px -14px rgba(var(--gold-rgb), .7); transform: translateY(-2px); }
.btn-main:hover svg { transform: translateX(3px); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: .62rem 1.15rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .88rem; font-weight: 500; color: var(--text-2); transition: .25s; text-align: left; }
.btn-ghost svg { width: 16px; height: 16px; flex: none; }
.btn-ghost:hover { color: var(--text); border-color: rgba(var(--gold-rgb), .7); background: rgba(var(--gold-rgb), .06); }
.btn-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-2); transition: .25s; flex: none; }
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon:hover { color: var(--text); border-color: var(--gold); transform: rotate(-14deg); }
.play-btn { max-width: 100%; }
.play-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-btn svg { color: var(--gold); }
.play-btn.is-cur { border-color: var(--gold); color: var(--text); background: rgba(var(--gold-rgb), .1); }
body.is-playing .play-btn.is-cur svg { animation: bob 1s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-2px) rotate(-8deg); } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: .32rem .95rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .86rem; color: var(--text-2); background: rgba(10, 11, 15, .35); }
.tags span.is-war { border-color: rgba(var(--war-rgb), .6); color: #ffb9ab; background: rgba(var(--war-rgb), .12); }
.avatars { display: flex; flex-wrap: wrap; }
.av { width: 34px; height: 34px; border-radius: 50%; margin-right: -8px; border: 2px solid var(--bg-2); background-size: cover; background-position: 50% 15%; transition: transform .25s var(--ease), margin .25s; }
.av:hover { transform: translateY(-4px); z-index: 1; margin-right: -2px; }

/* ════════ 히어로 ════════ */
.hero { min-height: calc(100vh - var(--nav-top)); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); align-items: end; gap: clamp(28px, 5vw, 72px); padding: 10vh 0 14vh; position: relative; }
.hero__title { margin: 0 0 1.6rem; font: 700 clamp(2.2rem, 4.4vw, 3.9rem)/1.2 var(--f-serif); letter-spacing: -.025em; text-shadow: 0 4px 40px rgba(0, 0, 0, .6); }
.hero__title em { font-style: normal; color: var(--gold); }
.hero__lead { margin: 0 0 2.2rem; max-width: 600px; font-size: clamp(1.02rem, 1.4vw, 1.14rem); line-height: 1.9; color: var(--text-2); text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 3.4rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 0; }
.hero__stats div { display: flex; flex-direction: column; padding: 0 30px; border-left: 1px solid var(--line-2); }
.hero__stats div:first-child { padding-left: 0; border-left: 0; }
.hero__stats b { font: 500 clamp(2rem, 3.6vw, 2.8rem)/1 var(--f-cg); color: var(--text); }
.hero__stats span { margin-top: 8px; font-size: .68rem; letter-spacing: .2em; color: var(--text-3); }
.hero__scroll { position: absolute; left: 0; bottom: 4vh; display: flex; align-items: center; gap: 12px; font: 600 .62rem var(--f-body); letter-spacing: .3em; color: var(--text-3); }
.hero__scroll i { width: 60px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); animation: scrollLine 2.2s infinite; transform-origin: left; }
@keyframes scrollLine { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
.hero--school { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; min-height: 72vh; }

/* 게시판: 유리 패널 */
.notice { position: relative; padding: 26px 26px 18px; border-radius: 6px; background: rgba(10, 11, 15, .55); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.notice__pin { display: none; }
.notice__kicker { margin: 0; font-size: .64rem; letter-spacing: .26em; color: var(--gold); }
.notice__title { margin: .3rem 0 .8rem; font: 700 1.25rem var(--f-serif); }
.notice__list { list-style: none; margin: 0; padding: 0; display: grid; }
.notice__list li { padding: 11px 0; border-top: 1px solid var(--line); font-size: .88rem; line-height: 1.65; color: var(--text-2); }
.notice__list li b { display: inline-block; margin-right: 8px; padding: 0 .5rem; font: 600 .68rem/1.75 var(--f-body); color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .45); border-radius: 3px; vertical-align: 1px; }

/* ════════ 세계관 ════════ */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.lore { position: relative; padding-top: 22px; border-top: 1px solid var(--line-2); }
.lore::before { content: ''; position: absolute; left: 0; top: -1px; width: 40px; height: 1px; background: var(--gold); }
.lore__k { font-size: .68rem; letter-spacing: .26em; color: var(--gold); }
.lore h3 { margin: .7rem 0 .8rem; font: 700 1.35rem/1.35 var(--f-serif); }
.lore p { margin: 0; font-size: .98rem; line-height: 1.9; color: var(--text-2); }

.pioneers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 3rem 0; }
.pio { --hc: 160, 122, 52; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 10px 18px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.pio__no { font: 500 1rem var(--f-cg); color: var(--text-3); margin-bottom: 10px; }
.pio__face { width: 96px; height: 96px; display: block; flex: none; margin-bottom: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--hc), .22), transparent 70%); box-shadow: 0 0 0 1px rgba(var(--hc), .6); padding: 8px; }
.pio__face img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.pio__face img.is-photo { border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.pio__ord { font-size: .78rem; color: var(--text-3); }
.pio__name { margin: .2rem 0; font: 700 1.04rem/1.35 var(--f-serif); }
.pio__note { font-size: .8rem; color: var(--text-2); }
.pio.is-jane { --hc: 120, 160, 110; transition: transform .3s var(--ease), border-color .3s; }
.pio.is-jane .pio__face { padding: 4px; }
.pio.is-jane:hover { transform: translateY(-4px); border-color: var(--line-2); }
.pio.is-you { border-color: rgba(var(--gold-rgb), .5); background: rgba(var(--gold-rgb), .06); }
.pio.is-you .pio__face { background: radial-gradient(circle, rgba(var(--gold-rgb), .25), transparent 70%); box-shadow: 0 0 0 1px var(--gold); animation: youGlow 3s ease-in-out infinite; }
@keyframes youGlow { 50% { box-shadow: 0 0 0 1px var(--gold), 0 0 34px rgba(var(--gold-rgb), .55); } }
.pio__q { display: grid; place-items: center; width: 100%; height: 100%; font: 500 3rem/1 var(--f-cg); color: var(--gold); }
/* 다섯 번째: 지워진 기록 — 점선 테두리, 빈 원에 그어진 사선 */
.pio.is-lost { border-style: dashed; background: transparent; }
.pio.is-lost .pio__face { background: none; box-shadow: none; border: 1px dashed rgba(255, 255, 255, .22); }
.pio__q--lost { position: relative; }
.pio__q--lost::before { content: ''; position: absolute; left: 18%; right: 18%; top: 50%; height: 1px; background: rgba(255, 255, 255, .3); transform: rotate(-35deg); }
.pio.is-lost .pio__no, .pio.is-lost .pio__ord, .pio.is-lost .pio__note { color: var(--text-3); opacity: .7; }
.pio.is-lost .pio__name { color: var(--text-3); font-weight: 500; letter-spacing: .08em; }
.henry { position: relative; margin: 0 0 3rem; max-width: 820px; padding: 6px 0 6px 28px; border-left: 2px solid var(--gold); }
.henry p { margin: 0; font: 700 clamp(1.35rem, 2.8vw, 2rem)/1.5 var(--f-serif); color: var(--text); letter-spacing: -.01em; }
.henry cite { display: block; margin-top: .8rem; font-style: normal; font-size: .9rem; color: var(--text-3); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: clamp(40px, 6vw, 72px); }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(var(--line-2), rgba(var(--war-rgb), .5)); }
.tl { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.tl::before { content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--bg); border: 1px solid var(--gold); z-index: 1; }
.tl.is-now::before { background: var(--war); border-color: var(--war); box-shadow: 0 0 0 6px rgba(var(--war-rgb), .18); }
.tl:nth-child(even) .tl__img { order: 2; }
.tl__img { aspect-ratio: 1216 / 832; background-size: cover; background-position: center; border-radius: 4px; box-shadow: 0 30px 60px -30px #000; }
.tl__body { padding: 4px 0; }
.tl:nth-child(even) .tl__body { text-align: right; }
.tl__when { display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; letter-spacing: .2em; color: var(--gold); }
.tl__when i { font-style: normal; font-size: .62rem; padding: .12rem .55rem; border-radius: 3px; background: var(--war); color: #fff; animation: blink 1.6s infinite; }
.tl h3 { margin: .5rem 0 .7rem; font: 700 1.55rem/1.35 var(--f-serif); }
.tl p { margin: 0; font-size: 1rem; line-height: 1.9; color: var(--text-2); }

.commands { list-style: none; margin: 0; padding: 0; display: grid; }
.commands li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.commands li:first-child { border-top: 1px solid var(--line-2); }
.commands__no { font: 500 1.7rem/1.2 var(--f-cg); color: var(--gold); }
.commands p { margin: 0; font-size: 1rem; line-height: 1.85; color: var(--text); }
.commands__h { --hc: 160, 122, 52; display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: .05rem .6rem .05rem .25rem; border-radius: 999px; border: 1px solid rgba(var(--hc), .55); background: rgba(var(--hc), .1); font-size: .74rem; font-weight: 600; color: var(--text); white-space: nowrap; vertical-align: 1px; }
.commands__h img { width: 18px; height: 18px; object-fit: contain; }
.clause { position: relative; padding: 28px 28px 24px; border-radius: 6px; background: linear-gradient(160deg, rgba(var(--war-rgb), .12), rgba(var(--war-rgb), .03)); border: 1px solid rgba(var(--war-rgb), .35); }
.clause h3 { margin: 0 0 .7rem; font: 700 1.5rem var(--f-serif); }
.clause > p { margin: 0 0 1.2rem; font-size: .98rem; line-height: 1.85; color: var(--text-2); }
.clause strong { color: #ffc4b8; }
.clause__stances { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 8px; }
.clause__stances li { --hc: 160, 122, 52; display: grid; grid-template-columns: 30px auto 1fr; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 4px; border-left: 2px solid rgb(var(--hc)); background: rgba(10, 11, 15, .4); font-size: .9rem; }
.clause__stances img { width: 30px; height: 30px; object-fit: contain; }
.clause__stances b { font-weight: 700; }
.clause__stances span { color: var(--text-2); }
.clause__note { margin: 0; font-size: .9rem; color: #ffb3a3; }
.casting { display: grid; margin-top: 22px; }
.casting div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.casting b { font-size: .92rem; font-weight: 700; color: var(--gold); }
.casting p { margin: .2rem 0 0; font-size: .96rem; line-height: 1.8; color: var(--text-2); }

/* 주문: 밑줄 탭 + 카드 */
.spelltabs { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.spelltabs button { position: relative; display: flex; align-items: baseline; gap: 8px; padding: .9rem 1.3rem; font-size: .96rem; font-weight: 600; color: var(--text-3); transition: color .25s; }
.spelltabs button small { font-size: .74rem; font-weight: 500; color: var(--text-3); }
.spelltabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .35s var(--ease); }
.spelltabs button:hover { color: var(--text-2); }
.spelltabs button.is-on { color: var(--text); }
.spelltabs button.is-on::after { transform: scaleX(1); }
.spelltabs button.is-forbid.is-on::after { background: var(--war); }
.spells { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.spell { position: relative; padding: 24px 22px 20px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, background .3s; animation: spellIn .6s var(--ease) backwards; animation-delay: calc(var(--d) * 60ms); }
.spell:hover { border-color: var(--line-2); background: var(--surface-2); }
@keyframes spellIn { from { opacity: 0; transform: translateY(14px); } }
.spell__la { font-size: .7rem; letter-spacing: .2em; color: var(--gold); }
.spell h4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: .4rem 0 .6rem; font: 700 1.4rem var(--f-serif); }
.spell h4 em { font: 500 .86rem var(--f-body); font-style: normal; color: var(--text-3); }
.spell p { margin: 0; font-size: .95rem; line-height: 1.8; color: var(--text-2); }
.spell__opt { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: .7rem; }
.spell__opt small { font-size: .8rem; color: var(--text-3); margin-right: 2px; }
.spell__opt span { font-size: .76rem; font-weight: 600; padding: .05rem .55rem; border-radius: 999px; border: 1px solid rgba(var(--gold-rgb), .4); color: var(--gold); }
.spell.is-forbid { background: linear-gradient(160deg, rgba(var(--war-rgb), .1), rgba(var(--war-rgb), .02)); border-color: rgba(var(--war-rgb), .28); }
.spell.is-forbid .spell__la { color: var(--war); }
.spell__lock { position: absolute; right: 18px; top: 18px; width: 18px; height: 18px; color: var(--war); }
.spell__play { margin-top: 14px; }
.potion { display: flex; gap: 20px; align-items: flex-start; margin: 3.4rem 0 0; max-width: 860px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.potion__icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-size: 1.5rem; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .4); }
.potion h3 { margin: 0 0 .4rem; font: 700 1.25rem var(--f-serif); }
.potion p { margin: 0; font-size: .98rem; line-height: 1.85; color: var(--text-2); }

/* 마녀 사냥꾼 · 수호자 */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.side { display: flex; flex-direction: column; overflow: hidden; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.side__img { position: relative; aspect-ratio: 1216 / 832; background-size: cover; background-position: center; }
.side__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 15, .85), transparent 55%); }
.side__sig { position: absolute; z-index: 1; left: 22px; bottom: 18px; width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: rgba(10, 11, 15, .6); border: 1px solid rgba(var(--gold-rgb), .5); color: var(--gold); backdrop-filter: blur(6px); }
.side--hunter { background: linear-gradient(170deg, rgba(110, 150, 100, .08), rgba(255, 255, 255, .02)); }
.side--hunter .side__sig { color: #a9cf9b; border-color: rgba(169, 207, 155, .5); }
.side__body { padding: 24px 28px 26px; display: flex; flex-direction: column; flex: 1; }
.side__en { font-size: .68rem; letter-spacing: .24em; color: var(--gold); }
.side--hunter .side__en { color: #a9cf9b; }
.side h3 { margin: .4rem 0 .8rem; font: 700 1.7rem var(--f-serif); color: var(--text); }
.side h4 { margin: 1.3rem 0 .4rem; font-size: .92rem; font-weight: 700; color: var(--text); }
.side p { margin: 0; font-size: .98rem; line-height: 1.85; color: var(--text-2); }
.side__list { margin: .8rem 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.side__list li { position: relative; padding-left: 18px; font-size: .94rem; line-height: 1.8; color: var(--text-2); }
.side__list li::before { content: ''; position: absolute; left: 2px; top: .75em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.side--hunter .side__list li::before { background: #a9cf9b; }
.side__list b { color: var(--text); }
.side__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 22px; }

.next { display: flex; flex-direction: column; align-items: center; padding: clamp(110px, 14vw, 180px) 0 clamp(80px, 10vw, 130px); text-align: center; }

/* ════════ 학교 ════════ */
/* 기숙사: 사진 위, 문장 + 이름은 본문 머리 (겹치지 않음) */
.houses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.house { --hc: 160, 122, 52; position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 6px; background: linear-gradient(180deg, rgba(var(--hc), .16), rgba(var(--hc), .03) 45%, rgba(255, 255, 255, .02)); border: 1px solid rgba(var(--hc), .3); transition: transform .5s var(--ease), border-color .4s, opacity 1s var(--ease); }
.house::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 1; background: rgb(var(--hc)); }
.house:hover { transform: translateY(-4px); border-color: rgba(var(--hc), .6); }
.house__img { position: relative; aspect-ratio: 1216 / 832; background-size: cover; background-position: center; }
.house__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 15, .55), transparent 50%); }
.house__body { position: relative; padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.house__head { display: flex; align-items: center; gap: 14px; margin-bottom: 1.1rem; }
.house__crest { flex: none; width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .55)); }
.house__en { display: block; font-size: .6rem; letter-spacing: .18em; line-height: 1.5; color: rgb(var(--hc)); filter: brightness(1.35); }
.house__name { margin: .2rem 0 0; font: 700 1.75rem/1.2 var(--f-serif); color: var(--text); }
.house__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 1.1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.house__facts div { padding: 10px 6px; text-align: center; }
.house__facts div + div { border-left: 1px solid var(--line); }
.house__facts dt { font-size: .72rem; color: var(--text-3); }
.house__facts dd { margin: .1rem 0 0; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: .92rem; font-weight: 700; }
.swatch { width: 9px; height: 9px; border-radius: 50%; background: rgb(var(--hc)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.house__stance { margin: 0 0 1rem; font-size: .95rem; line-height: 1.85; color: var(--text-2); }
.house__clause { margin: 0 0 1.2rem; padding: 12px 14px; border-radius: 4px; background: rgba(10, 11, 15, .45); border-left: 2px solid rgba(var(--war-rgb), .7); font-size: .88rem; line-height: 1.7; color: var(--text-2); }
.house__clause b { display: block; margin-bottom: .1rem; font-size: .78rem; color: #ffb3a3; }
.house__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.house__foot .av { border-color: #15171d; }
.house__play { margin-top: 12px; width: 100%; justify-content: center; }

/* 교칙 */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.rule { padding: 24px 0; border-top: 1px solid var(--line); }
.rule h3 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 .6rem; font: 700 1.25rem var(--f-serif); }
.rule h3 i { font: 500 1.2rem var(--f-cg); font-style: normal; color: var(--gold); width: 30px; }
.rule p { margin: 0; font-size: .98rem; line-height: 1.85; color: var(--text-2); }
.rule--war { grid-column: 1 / -1; margin-top: 10px; padding: 24px 26px; border: 1px solid rgba(var(--war-rgb), .35); border-radius: 6px; background: rgba(var(--war-rgb), .06); }
.robes { display: flex; gap: 8px; margin-top: 14px; }
.robes i { width: 22px; height: 30px; border-radius: 11px 11px 3px 3px; background: var(--c); box-shadow: inset 0 -8px 10px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .15); }
.rule__list { margin: .9rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.rule__list li { padding: .18rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .84rem; color: var(--text-2); }
.ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 1rem 0 0; padding: 0; list-style: none; }
.ladder li { padding: .15rem .7rem; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.ladder li + li::before { content: '→'; margin: 0 10px 0 -4px; color: var(--text-3); font-weight: 400; }
.ladder li.is-fall { border-radius: 999px; background: var(--war); color: #fff; }

.cadet { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.cadet__img { aspect-ratio: 1216 / 832; background-size: cover; background-position: center; border-radius: 6px; box-shadow: 0 30px 60px -30px #000; }
.cadet__body p { margin: 0 0 1.6rem; font-size: 1.04rem; line-height: 1.95; color: var(--text-2); }
.cadet__foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.who-chip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; transition: .25s; }
.who-chip:hover { border-color: rgba(var(--gold-rgb), .6); background: var(--surface-2); }
.who-chip img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.who-chip b { display: block; font-size: .9rem; font-weight: 700; line-height: 1.35; }
.who-chip small { display: block; font-size: .72rem; line-height: 1.35; color: var(--text-3); }

.split--sch { grid-template-columns: 1fr 1fr; }
.facts { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; }
.facts li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .96rem; line-height: 1.7; }
.facts b { font-weight: 700; color: var(--gold); }
.facts span { color: var(--text-2); }
.subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.subj { padding: 16px 18px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.subj__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.subj__head b { font: 700 1.08rem var(--f-serif); }
.subj__head em { font-style: normal; font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: var(--war); }
.subj__prof { display: flex; align-items: center; gap: 9px; text-align: left; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.subj__prof img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.subj__prof small { display: block; font-size: .72rem; font-weight: 400; color: var(--text-3); }
.subj__prof:hover { color: var(--gold); }
.subj p { margin: 10px 0 0; font-size: .88rem; line-height: 1.75; color: var(--text-2); }
.subj.is-new { grid-column: 1 / -1; border-color: rgba(var(--war-rgb), .35); }
/* 시간표 */
.tt { padding: 22px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: calc(var(--nav-top) + 20px); }
.tt__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.tt__head b { font: 700 1.1rem var(--f-serif); }
.tt__head .btn-ghost { padding: .38rem .85rem; font-size: .8rem; }
.tt__grid { display: grid; grid-template-columns: 72px repeat(5, minmax(0, 1fr)); gap: 3px; }
.tt__h { text-align: center; padding: 6px 0; font-size: .82rem; font-weight: 700; color: var(--text-3); }
.tt__p { display: flex; align-items: center; padding: 0 6px; font-size: .76rem; line-height: 1.25; color: var(--text-3); }
.tt__c { display: grid; place-items: center; min-height: 60px; padding: 4px; border-radius: 4px; text-align: center; font-size: .8rem; font-weight: 600; line-height: 1.3; color: var(--text); background: var(--surface-2); animation: ttIn .5s var(--ease) backwards; }
@keyframes ttIn { from { opacity: 0; } }
.tt__c.is-new { color: #ffc4b8; background: rgba(var(--war-rgb), .14); }
.tt__c.is-free { color: var(--text-3); font-weight: 400; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tt__c.is-cadet { color: #12100c; background: var(--gold); }

/* 시설: 큰 사진과 설명이 번갈아 놓이는 줄 */
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 22px; }
.place { display: flex; flex-direction: column; transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.place__img { position: relative; display: flex; aspect-ratio: 1216 / 832; overflow: hidden; border-radius: 6px; box-shadow: 0 30px 60px -30px #000; }
.place__img > span { flex: 1; background-size: cover; background-position: center; transition: transform 1.4s var(--ease), opacity 1s var(--ease); }
.place:hover .place__img > span:not(.place__badge) { transform: scale(1.03); }
/* 휴게실: 세 그림을 겹쳐 두고 하나씩 통째로 보여 줌 (기숙사 버튼에 올리면 그 그림) */
.place--commons .place__img > span:not(.place__badge) { position: absolute; inset: 0; opacity: 0; }
.place--commons .place__img > span.is-on { opacity: 1; }
.place__dots { position: absolute; z-index: 1; left: 50%; bottom: 12px; display: flex; gap: 6px; transform: translateX(-50%); }
.place__dots i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); transition: background .3s; }
.place__dots i.is-on { background: #fff; }
.place__badge { position: absolute; z-index: 1; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: .22rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: rgba(10, 11, 15, .7); color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .45); backdrop-filter: blur(6px); flex: none !important; }
.place__badge svg { width: 13px; height: 13px; }
.place__badge.is-danger { color: #ffb3a3; border-color: rgba(var(--war-rgb), .55); }
.place__body { position: relative; padding: 20px 2px 0; display: flex; flex-direction: column; flex: 1; }
.place__no { display: none; }
.place__en { font-size: .64rem; letter-spacing: .22em; color: var(--gold); }
.place.is-danger .place__en { color: var(--war); }
.place h3 { margin: .4rem 0 .6rem; font: 700 1.3rem/1.35 var(--f-serif); }
.place p { margin: 0 0 14px; font-size: .95rem; line-height: 1.85; color: var(--text-2); }
.place__tags { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.place__tags li { padding: .14rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .78rem; color: var(--text-2); }
.place.is-danger .place__tags li:first-child { border-color: rgba(var(--war-rgb), .55); color: #ffb3a3; }
.place__people { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.place__plays { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.place .play-btn { padding: .45rem 1rem; font-size: .8rem; }
.hplay { --hc: 160, 122, 52; display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid rgba(var(--hc), .5); font-size: .8rem; font-weight: 600; transition: .2s; }
.hplay img { width: 24px; height: 24px; object-fit: contain; }
.hplay svg { width: 13px; height: 13px; color: var(--gold); }
.hplay:hover, .hplay.is-cur { background: rgba(var(--hc), .22); }

.places--feature { grid-template-columns: 1fr; gap: clamp(64px, 9vw, 120px); }
.places--feature .place { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.places--feature .place:nth-child(even) .place__img { order: 2; }
.places--feature .place__body { padding: 0; }
.places--feature .place__no { display: block; margin-bottom: .6rem; font: 500 clamp(2.6rem, 5vw, 3.8rem)/1 var(--f-cg); color: rgba(var(--gold-rgb), .55); }
.places--feature .place h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: .5rem 0 1rem; letter-spacing: -.015em; }
.places--feature .place p { font-size: 1.04rem; line-height: 1.95; margin-bottom: 1.4rem; }
.places--feature .place__plays { margin-top: 4px; }

/* 행사 */
.events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ev { position: relative; display: flex; flex-direction: column; padding: 22px 20px 20px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .5s var(--ease), opacity 1.1s var(--ease); }
.ev:hover { border-color: var(--line-2); }
.ev__date { display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px; }
.ev__date b:first-child { font: 500 1rem var(--f-cg); color: var(--text-3); }
.ev__date b:first-child::after { content: ' /'; }
.ev__date i { display: none; }
.ev__date b:last-of-type { font: 500 3rem/1 var(--f-cg); color: var(--text); }
.ev h3 { margin: 0; font: 700 1.02rem/1.45 var(--f-serif); }
.ev p { margin: .4rem 0 0; font-size: .84rem; line-height: 1.65; color: var(--text-2); }
.ev__play { margin-top: auto; align-self: flex-start; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--gold); transition: .2s; }
.ev h3 + .ev__play, .ev__body + .ev__play { margin-top: 16px; }
.ev__play svg { width: 16px; height: 16px; }
.ev__play:hover, .ev__play.is-cur { background: var(--gold); color: #12100c; border-color: var(--gold); }
.ev.is-vac { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 20px; padding: 18px 22px; background: transparent; border-style: dashed; }
.ev.is-vac .ev__date { margin: 0; gap: 2px; }
.ev.is-vac .ev__date b, .ev.is-vac .ev__date b:first-child, .ev.is-vac .ev__date b:last-of-type { font: 500 1.3rem var(--f-cg); color: var(--text); }
.ev.is-vac .ev__date b:first-child::after { content: none; }
.ev.is-vac .ev__date i { display: inline; font-style: normal; color: var(--text-3); }
.ev.is-vac .ev__body p { margin-top: .1rem; }

/* ════════ 기숙사 배정 (수정 구슬) ════════ */
.sorter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-bottom: 20px; }
.orb { --oc: 255, 214, 150; position: relative; aspect-ratio: 1; isolation: isolate; max-width: 520px; width: 100%; justify-self: center; }
.orb::before { content: ''; position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--oc), .3), transparent 62%); filter: blur(14px); transition: background 1s; z-index: -1; }
.orb__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 50px 90px -30px #000; transition: transform 6s var(--ease); }
.orb.is-awake .orb__img { transform: scale(1.02); }
.orb__glow { position: absolute; left: 50%; top: 46%; width: 50%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(var(--oc), .6) 0%, rgba(var(--oc), .2) 45%, transparent 70%); mix-blend-mode: screen; opacity: .35; transition: background 1s, opacity 1s; animation: orbBreath 4s ease-in-out infinite; }
@keyframes orbBreath { 50% { transform: translate(-50%, -50%) scale(1.08); } }
.orb.is-awake .orb__glow { opacity: .65; }
.orb__swirl { position: absolute; left: 50%; top: 46%; width: 46%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, transparent, rgba(var(--oc), .55), transparent 40%, rgba(255, 255, 255, .3), transparent 70%); mix-blend-mode: overlay; opacity: 0; transition: opacity 1s; animation: swirl 6s linear infinite; }
@keyframes swirl { to { transform: translate(-50%, -50%) rotate(360deg); } }
.orb.is-awake .orb__swirl { opacity: .6; }
.orb.is-reading .orb__swirl { opacity: 1; animation-duration: .9s; }
.orb.is-reading .orb__glow { opacity: 1; animation-duration: .5s; background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(255, 220, 180, .3) 45%, transparent 70%); }
.orb.is-pulse .orb__glow { animation: orbPulse .8s var(--ease); }
@keyframes orbPulse { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } 100% { opacity: .65; transform: translate(-50%, -50%) scale(1); } }
.orb.is-result::before { background: radial-gradient(circle, rgba(var(--oc), .6), transparent 64%); }
.orb.is-result .orb__glow { opacity: 1; }
.orb__crest { position: absolute; left: 50%; top: 46%; width: 38%; transform: translate(-50%, -50%) scale(.4); opacity: 0; filter: drop-shadow(0 0 30px rgba(var(--oc), .9)); pointer-events: none; }
.orb.is-result .orb__crest { animation: crestIn 1.4s var(--ease) .2s forwards; }
@keyframes crestIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); filter: blur(10px) brightness(3); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); filter: blur(0) brightness(1.4); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 30px rgba(var(--oc), .9)); } }
.orb__voice { position: absolute; left: 6%; right: 6%; bottom: -4%; margin: 0; padding: 14px 20px; border-radius: 6px; text-align: center; background: rgba(10, 11, 15, .78); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: 600 .98rem/1.65 var(--f-serif); color: var(--text); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease); }
.orb__voice::before { content: '천리안 수정'; display: block; margin-bottom: 2px; font: 600 .64rem var(--f-body); letter-spacing: .24em; color: var(--gold); }
:root[lang="en"] .orb__voice::before { content: 'THE SEEING CRYSTAL'; }
:root[lang="ja"] .orb__voice::before { content: '千里眼の水晶'; }
:root[lang="zh-Hant"] .orb__voice::before { content: '千里眼水晶'; }
.orb__voice.is-on { opacity: 1; transform: none; }
.sorter__panel { min-height: 420px; display: flex; align-items: center; }
.sp { position: relative; width: 100%; padding: 32px 30px 28px; border-radius: 8px; background: rgba(15, 17, 22, .72); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: spIn .6s var(--ease) both; }
@keyframes spIn { from { opacity: 0; transform: translateY(16px); } }
.sp h2 { margin: 0 0 .9rem; font: 700 clamp(1.45rem, 2.8vw, 2rem)/1.4 var(--f-serif); letter-spacing: -.01em; }
.sp--start > p:not(.eyebrow) { margin: 0 0 1.8rem; font-size: 1rem; line-height: 1.9; color: var(--text-2); }
.sp--start form { position: relative; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.sp--start label { display: flex; flex-direction: column; gap: 6px; width: min(100%, 340px); }
.sp--start label span { font-size: .8rem; color: var(--text-3); }
.sp--start input { padding: .6rem .1rem; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--text); font: 600 1.12rem var(--f-body); outline: none; transition: border-color .25s; }
.sp--start input:focus { border-color: var(--gold); }
.sp--start input::placeholder { color: var(--text-3); font-weight: 400; }
.sp__prog { position: relative; display: flex; align-items: center; gap: 5px; margin-bottom: 1.4rem; }
.sp__prog i { width: 22px; height: 3px; border-radius: 2px; background: var(--line-2); transition: background .4s; }
.sp__prog i.is-done { background: rgba(var(--gold-rgb), .5); }
.sp__prog i.is-cur { background: var(--gold); }
.sp__prog small { margin-left: 12px; font-size: .8rem; color: var(--text-3); }
.sp__q { position: relative; font-size: clamp(1.25rem, 2.3vw, 1.6rem) !important; }
.sp__ans { position: relative; display: grid; gap: 10px; margin-top: 1.4rem; }
.sp__a { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: .98rem; line-height: 1.7; color: var(--text-2); transition: border-color .25s, background .25s, transform .25s var(--ease), color .25s; animation: spIn .5s var(--ease) backwards; animation-delay: calc(var(--d) * 80ms); }
.sp__a i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font: 500 .9rem var(--f-cg); font-style: normal; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .5); }
.sp__a:hover { border-color: rgba(var(--gold-rgb), .6); background: var(--surface-2); color: var(--text); transform: translateX(4px); }
.sp__back { position: relative; margin-top: 16px; font-size: .86rem; color: var(--text-3); }
.sp__back:hover { color: var(--gold); }
.sp--reading { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; color: var(--text-2); }
.sp__spin { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sp--result { --hc: 160, 122, 52; border-top: 3px solid rgb(var(--hc)); }
.sp__house { position: relative; display: flex; align-items: center; gap: 18px; margin-bottom: 1.2rem; }
.sp__house img { width: 92px; height: 92px; object-fit: contain; flex: none; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .6)); animation: crestPop 1s var(--ease) both; }
@keyframes crestPop { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }
.sp__house span { font-size: .64rem; font-weight: 600; letter-spacing: .2em; color: var(--text-3); }
.sp__house h2 { margin: .1rem 0; font-size: clamp(1.9rem, 4vw, 2.7rem) !important; }
.sp__house p { margin: 0; font-size: .9rem; color: var(--text-2); }
.sp__verdict { position: relative; margin: 0 0 .9rem; padding: 14px 18px; border-radius: 4px; border-left: 2px solid rgb(var(--hc)); background: rgba(var(--hc), .1); font: 700 1.04rem/1.7 var(--f-serif); }
.sp__stance { position: relative; margin: 0 0 1.2rem; font-size: .95rem; line-height: 1.85; color: var(--text-2); }
.sp__ratio { position: relative; display: grid; gap: 8px; margin-bottom: 1.2rem; }
.sp__ratio small, .sp__mem small { font-size: .8rem; color: var(--text-3); }
.sp__bar { --hc: 160, 122, 52; display: grid; grid-template-columns: 90px 1fr 44px; gap: 12px; align-items: center; font-size: .86rem; font-weight: 600; }
.sp__bar i { height: 6px; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.sp__bar i::after { content: ''; position: absolute; inset: 0; width: var(--w); border-radius: 3px; background: rgb(var(--hc)); animation: barIn 1.2s var(--ease) .3s backwards; }
@keyframes barIn { from { width: 0; } }
.sp__bar b { font: 500 .96rem var(--f-cg); text-align: right; }
.sp__mem { position: relative; display: grid; gap: 8px; margin-bottom: 1.4rem; }
.sp__btns { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.sorter__music { display: flex; justify-content: center; padding: 34px 0 clamp(70px, 9vw, 110px); }

/* ════════ 인물 ════════ */
.ctabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.ctab { --fc: 210, 179, 122; position: relative; display: flex; align-items: center; gap: 8px; padding: .5rem 1rem .5rem .6rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--text-2); transition: .25s; }
.ctab img, .ctab svg { width: 22px; height: 22px; object-fit: contain; color: rgb(var(--fc)); }
.ctab small { font: 500 .78rem var(--f-cg); color: var(--text-3); }
.ctab:hover { color: var(--text); border-color: var(--line-2); }
.ctab.is-active { color: var(--text); border-color: rgba(var(--fc), .8); background: rgba(var(--fc), .14); }
.cbanner { --fc: 210, 179, 122; display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding: 20px 24px; border-radius: 6px; border: 1px solid rgba(var(--fc), .3); background: linear-gradient(90deg, rgba(var(--fc), .12), transparent 70%); }
.cbanner__crest { width: 68px; height: 68px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }
.cbanner__sig { width: 52px; height: 52px; padding: 12px; flex: none; border-radius: 50%; border: 1px solid rgba(var(--fc), .6); color: rgb(var(--fc)); }
.cbanner > div { flex: 1; min-width: 0; }
.cbanner__en { font-size: .64rem; letter-spacing: .22em; color: rgb(var(--fc)); filter: brightness(1.3); }
.cbanner h2 { margin: .2rem 0 .3rem; font: 700 1.5rem var(--f-serif); }
.cbanner h2 small { font: 500 .9rem var(--f-body); color: var(--text-3); margin-left: 8px; }
.cbanner p { margin: 0; font-size: .92rem; line-height: 1.75; color: var(--text-2); }
.cbanner .play-btn { flex: none; max-width: 300px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 30px; }
.search { display: flex; align-items: center; gap: 10px; flex: 1; padding: 0 18px; height: 48px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .25s; }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 .98rem var(--f-body); }
.search input::placeholder { color: var(--text-3); }
.search:focus-within { border-color: var(--gold); }

/* 카드 (형식 유지) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 26px 22px; perspective: 1600px; padding: 10px 0 80px; }
.ccard {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --acc: 214, 176, 102;
  position: relative; display: block; aspect-ratio: 3 / 4.2; border-radius: 18px; text-align: left;
  background: #120f17; isolation: isolate;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .6s var(--ease), box-shadow .6s;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9);
  animation: cardIn .8s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 50ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) scale(.96); } }
.ccard.is-tilting { transition: transform .12s linear, box-shadow .6s; }
.ccard:hover { box-shadow: 0 34px 60px -26px rgba(var(--acc), .75), 0 0 0 1px rgba(var(--acc), .55); }
.ccard__clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.ccard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.03); transition: transform 1s var(--ease), filter .6s; filter: saturate(.9); }
.ccard:hover .ccard__img { transform: scale(1.1); filter: saturate(1.08); }
.ccard__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 22%, transparent 46%, rgba(12, 9, 16, .78) 72%, rgba(12, 9, 16, .97) 100%); }
.ccard__glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 240, 210, .28), transparent 45%); mix-blend-mode: overlay; opacity: 0; transition: opacity .4s; }
.ccard:hover .ccard__glare { opacity: 1; }
.ccard__frame { position: absolute; inset: 8px; border-radius: 12px; border: 1px solid rgba(255, 236, 200, .14); pointer-events: none; transition: border-color .4s, inset .4s var(--ease); }
.ccard__frame::before, .ccard__frame::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1.5px solid rgba(var(--acc), .9); }
.ccard__frame::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.ccard__frame::after { right: -1px; top: -1px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.ccard:hover .ccard__frame { border-color: rgba(var(--acc), .7); inset: 6px; }
.ccard__top { position: absolute; z-index: 2; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 8px; transform: translateZ(30px); }
.ccard__sig { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .12); color: rgb(var(--acc)); padding: 3px; }
.ccard__sig img { width: 100%; height: 100%; object-fit: contain; }
.ccard__sig svg { width: 22px; height: 22px; }
.ccard__en { font: 600 .58rem var(--f-disp); letter-spacing: .16em; color: rgba(255, 244, 222, .8); text-shadow: 0 1px 8px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.ccard__info { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 16px; transform: translateZ(40px); }
.ccard__role { display: block; font: 500 .66rem/1.4 var(--f-body); color: rgb(var(--acc)); text-shadow: 0 0 10px rgba(0, 0, 0, .9); }
.ccard__name { display: block; margin: .2rem 0 .15rem; font: 900 1.3rem/1.25 var(--f-serif); color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.ccard__meta { display: flex; gap: 7px; align-items: center; font-size: .72rem; color: rgba(240, 232, 218, .72); white-space: nowrap; }
.ccard__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.ccard__quote { display: block; max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; font: 500 .74rem/1.55 var(--f-serif); color: rgba(246, 240, 228, .92); transition: max-height .5s var(--ease), opacity .4s, margin .4s; }
.ccard:hover .ccard__quote, .ccard:focus-visible .ccard__quote { max-height: 6em; opacity: 1; margin-top: .5rem; }

/* ════════ 관계도 ════════ */
.rel { display: grid; grid-template-columns: 1fr 340px; grid-template-rows: auto 1fr; gap: 16px; padding-bottom: 20px; }
.rel__legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
#relLegend { display: flex; flex-wrap: wrap; gap: 6px; }
.rel__reset { font-size: .82rem; }
#relLegend button { display: flex; align-items: center; gap: 8px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--text-2); transition: .25s; }
#relLegend button i { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--fc)); }
#relLegend button.is-off { opacity: .35; }
.rel__stage { position: relative; height: min(74vh, 780px); min-height: 500px; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .045), transparent 70%), radial-gradient(circle, rgba(255, 255, 255, .06) 1px, transparent 1.5px) 0 0 / 28px 28px, var(--bg-2); }
.rel__stage svg { position: relative; z-index: 1; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.rel__stage svg.is-drag { cursor: grabbing; }
.r-edge { stroke: rgba(238, 234, 227, .2); stroke-width: 1.3; fill: none; transition: stroke .25s, stroke-width .25s, opacity .25s; }
.r-edge.is-star { stroke: rgba(var(--gold-rgb), .55); stroke-width: 1.7; stroke-dasharray: 5 4; }
.r-edge.is-hi { stroke: var(--gold); stroke-width: 2.4; stroke-dasharray: none; }
.r-edge.is-dim { opacity: .07; }
.r-node { cursor: pointer; }
.r-node circle.r-ring { fill: none; stroke-width: 2.4; transition: stroke-width .2s; }
.r-node.is-ghost circle.r-ring { stroke-dasharray: 4 3; }
.r-node text { font: 600 11px var(--f-body); fill: #eeeae3; text-anchor: middle; paint-order: stroke; stroke: rgba(10, 11, 15, .92); stroke-width: 4px; pointer-events: none; }
.r-node.is-ghost text { fill: rgba(238, 234, 227, .65); font-style: italic; }
.r-node.is-dim { opacity: .16; }
.r-node.is-hi circle.r-ring { stroke-width: 4.2; }
.r-edge-label { font: 600 10px var(--f-body); fill: var(--gold); paint-order: stroke; stroke: rgba(10, 11, 15, .95); stroke-width: 4px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.r-edge-label.is-on { opacity: 1; }
.rel__panel { padding: 24px 22px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); max-height: min(74vh, 780px); overflow: auto; }
.rel__hint { color: var(--text-3); font-size: .92rem; margin: 0; }
.rp__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rp__head img, .rp__ghost { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; flex: none; }
.rp__ghost { display: grid; place-items: center; padding: 14px; border: 1px dashed var(--line-2); color: var(--text-2); }
.rp__ghost svg { width: 100%; height: 100%; }
.rp__head b { display: block; font: 700 1.2rem var(--f-serif); }
.rp__head span { font-size: .78rem; color: var(--text-3); }
.rp__list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; }
.rp__list li { padding: 11px 6px; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.7; color: var(--text-2); cursor: pointer; transition: background .2s; border-radius: 3px; }
.rp__list li:hover { background: var(--surface-2); }
.rp__list li.is-star { background: rgba(var(--gold-rgb), .06); }
.rp__list li b { color: var(--text); font-weight: 700; }
.rp__list li em { font-style: normal; color: var(--gold); margin: 0 6px; }
.rp__star { font-style: normal; color: var(--gold); }

.rsum { position: relative; margin: clamp(64px, 8vw, 110px) auto clamp(80px, 10vw, 130px); padding-top: 28px; border-top: 1px solid var(--line); }
.rsum__head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 0 0 28px; }
.rsum__title { margin: 0; font: 700 clamp(1.8rem, 3.6vw, 2.6rem) var(--f-serif); letter-spacing: -.02em; }
.rsum__lead { margin: .7rem 0 0; max-width: 620px; font-size: .98rem; line-height: 1.8; color: var(--text-2); }
.rsum__tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rsum__search { flex: 1 1 240px; }
.rsum__mode { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); }
.rsum__mode button { padding: .48rem 1rem; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--text-2); transition: .2s; white-space: nowrap; }
.rsum__mode button.is-on { background: var(--gold); color: #12100c; }
.rsum__body { position: relative; display: grid; gap: 28px; }
.rs__group { border-top: 1px solid var(--line-2); }
.rs__gh { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 2px; font: 700 1.1rem var(--f-serif); }
.rs__gh svg, .rs__gh img { width: 26px; height: 26px; color: var(--gold); object-fit: contain; }
.rs__gh small { margin-left: auto; font: 500 .82rem var(--f-body); color: var(--text-3); }
.rs__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 28px; }
.rs__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 13px 6px; border-top: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.rs__row:hover { background: var(--surface); }
.rs__row.is-star { background: rgba(var(--gold-rgb), .05); }
.rs__label { flex-basis: 100%; margin: 0; font-size: .9rem; line-height: 1.7; color: var(--text-2); }
.rs__arrow { font-size: .95rem; font-weight: 700; color: var(--gold); }
.rs__star { font-style: normal; color: var(--gold); }
.rs__who { --fc: 160, 122, 52; display: inline-flex; align-items: center; gap: 8px; padding: 2px 12px 2px 2px; border-radius: 999px; border: 1px solid rgba(var(--fc), .55); background: rgba(var(--fc), .08); font-size: .88rem; font-weight: 700; text-align: left; transition: background .2s; }
button.rs__who:hover { background: rgba(var(--fc), .22); }
.rs__who.is-ghost { border-style: dashed; font-style: italic; color: var(--text-2); }
.rs__who img, .rs__hub { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; flex: none; }
.rs__hub { display: grid; place-items: center; padding: 5px; background: var(--surface-2); color: var(--text-2); }
.rs__hub svg { width: 100%; height: 100%; }
.rs__who b { white-space: nowrap; }
.rs__people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rs__person { border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.rs__person header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rs__person header small { font-size: .8rem; color: var(--text-3); text-align: right; }
.rs__person ul { list-style: none; margin: 0; padding: 4px 8px; }
.rs__person li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rs__person li:last-child { border-bottom: 0; }
.rs__person li:hover { background: var(--surface-2); }
.rs__person li em { font-style: normal; font-weight: 700; color: var(--gold); width: 22px; text-align: center; }
.rs__person li .rs__label { padding-left: 30px; }

/* ════════ 인물 상세 ════════ */
.cmodal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 3vh 3vw; }
.cmodal__scrim { position: absolute; inset: 0; background: rgba(5, 6, 9, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .4s both; }
@keyframes fade { from { opacity: 0; } }
.cmodal__panel {
  --acc: 214, 176, 102;
  position: relative; width: min(1160px, 100%); height: min(800px, 94vh);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  overflow: hidden; border-radius: 10px;
  background: #111318; border: 1px solid var(--line-2);
  box-shadow: 0 60px 120px -30px #000;
  animation: panelIn .6s var(--ease) backwards;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.cmodal__panel.is-swap .cm__portrait, .cmodal__panel.is-swap .cm__content { animation: pageSwap .5s var(--ease) backwards; }
@keyframes pageSwap { from { opacity: .3; transform: translateX(var(--sx, 30px)); } }
.cm__portrait { position: relative; overflow: hidden; padding: 28px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 30%, rgba(var(--acc), .18), transparent 70%), #0b0c10; }
/* 그림은 원본 비율 그대로 칸 안에 꽉 맞춤 (잘리지 않음), 라벨은 그림 왼쪽 위 구석 */
.cm__frame { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; container-type: size; }
.cm__pic { position: relative; width: min(100cqw, 100cqh * 832 / 1216); aspect-ratio: 832 / 1216; overflow: hidden; border-radius: 6px; box-shadow: 0 30px 60px -24px #000, 0 0 0 1px rgba(255, 255, 255, .1); }
.cm__pic > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; animation: portraitIn 1s var(--ease) both; }
@keyframes portraitIn { from { filter: blur(6px); opacity: .4; } }
.cm__wm { position: relative; z-index: 1; margin-top: 14px; text-align: center; font: 500 1.2rem/1 var(--f-disp); letter-spacing: .34em; color: rgba(255, 255, 255, .25); pointer-events: none; }
.cm__flabel { position: absolute; z-index: 2; left: 12px; top: 12px; display: flex; align-items: center; gap: 8px; padding: .3rem 1rem .3rem .35rem; border-radius: 999px; background: rgba(10, 11, 15, .7); border: 1px solid var(--line-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .8rem; font-weight: 700; color: var(--text); white-space: nowrap; width: max-content; }
.cm__flabel img, .cm__flabel svg { position: static; flex: none; width: 40px; height: 40px; object-fit: contain; color: var(--gold); animation: none; }
.cm__flabel svg { width: 30px; height: 30px; margin: 5px; }
.cm__content { position: relative; overflow-y: auto; padding: clamp(30px, 3.6vw, 48px) clamp(24px, 3.6vw, 48px) 44px; scrollbar-gutter: stable; }
.cm__content::-webkit-scrollbar-track { background: transparent; }
.cm__content::-webkit-scrollbar-thumb { background: #2a2d35; border-color: #111318; }
.cm__close { position: absolute; z-index: 5; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); color: var(--text); transition: .25s; }
.cm__close svg { width: 16px; height: 16px; }
.cm__close:hover { background: #fff; color: #0a0b0f; transform: rotate(90deg); }
.cm__eyebrow { font-size: .82rem; font-weight: 600; color: rgb(var(--acc)); filter: brightness(1.2); margin: 0 0 .6rem; }
.cm__count { float: right; font: 500 .9rem var(--f-cg); color: var(--text-3); margin: 0 48px 0 10px; font-style: normal; }
.cm__name { margin: 0; font: 700 clamp(2.1rem, 4vw, 3rem)/1.15 var(--f-serif); letter-spacing: -.02em; color: var(--text); }
.cm__en { margin: .5rem 0 1.6rem; font-size: .72rem; letter-spacing: .26em; color: var(--text-3); }
.cm__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cm__stats div { padding: 12px 14px; min-width: 0; }
.cm__stats div + div { border-left: 1px solid var(--line); }
.cm__stats small { display: block; font-size: .72rem; color: var(--text-3); }
.cm__stats b { font-size: .96rem; font-weight: 700; }
.hchip { --hc: 160, 122, 52; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.hchip img { width: 20px; height: 20px; object-fit: contain; }
.cm__quote { position: relative; margin: 0 0 1.8rem; padding: 22px 24px; border-radius: 6px; background: rgba(var(--acc), .08); border-left: 2px solid rgb(var(--acc)); }
.cm__quote p { position: relative; margin: 0; font: 700 clamp(1.02rem, 1.6vw, 1.16rem)/1.8 var(--f-serif); color: var(--text); }
.cm__sec { margin: 0 0 1.9rem; }
.cm__sec h4 { display: flex; align-items: center; gap: 12px; margin: 0 0 .9rem; font-size: .68rem; letter-spacing: .24em; color: var(--gold); }
.cm__sec h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cm__sec > p { margin: 0; font-size: 1rem; line-height: 1.9; color: var(--text-2); }
.cm__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cm__chips span { font-size: .86rem; padding: .22rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.cm__chips--persona span { border-color: rgba(var(--acc), .6); background: rgba(var(--acc), .12); color: var(--text); font-weight: 600; }
.cm__tics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: .8rem; }
.cm__tics small { font-size: .8rem; color: var(--text-3); margin-right: 4px; }
.cm__tics span { font: 700 .9rem var(--f-serif); padding: .2rem .2rem; color: var(--gold); border-bottom: 1px solid rgba(var(--gold-rgb), .4); margin-right: 8px; }
.cm__rels { display: grid; }
.cm__rel { --rc: 160, 122, 52; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 3px; text-align: left; transition: background .25s; }
button.cm__rel:hover { background: rgba(var(--rc), .1); }
.cm__rel.is-star { background: rgba(var(--gold-rgb), .05); }
.cm__rel img, .cm__ghost { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px rgba(var(--rc), .75); }
.cm__ghost { display: grid; place-items: center; padding: 10px; box-shadow: none; border: 1px dashed var(--line-2); color: var(--text-2); }
.cm__ghost svg { width: 100%; height: 100%; }
.cm__rel b { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font-size: .95rem; font-weight: 700; }
.cm__rel b em { font-style: normal; color: var(--gold); }
.cm__rel b small { font-weight: 400; font-size: .76rem; color: var(--text-3); }
.cm__rel > span > span { font-size: .88rem; line-height: 1.65; color: var(--text-2); }
.cm__star { display: inline-grid; place-items: center; color: var(--gold); }
.cm__star svg { width: 13px; height: 13px; }
.cm__theme { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin: -0.4rem 0 1.9rem; padding: 12px 16px; text-align: left; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); transition: background .2s, border-color .2s; }
.cm__theme:hover { border-color: rgba(var(--gold-rgb), .6); background: var(--surface-2); }
.cm__theme > svg { width: 20px; height: 20px; flex: none; color: var(--gold); }
.cm__theme span { display: flex; flex-direction: column; min-width: 0; }
.cm__theme small { font-size: .74rem; color: var(--text-3); }
.cm__theme b { font-size: .9rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm__theme .eq { position: static; display: none; margin-left: auto; width: 22px; height: 18px; padding: 0; background: none; }
body.is-playing .cm__theme.is-cur .eq { display: flex; }
.cm__theme.is-cur { border-color: var(--gold); }
.cmodal__nav { position: absolute; z-index: 3; top: 50%; width: 48px; height: 48px; margin-top: -24px; display: grid; place-items: center; border-radius: 50%; background: rgba(17, 19, 24, .85); border: 1px solid var(--line-2); color: var(--text); transition: .25s; backdrop-filter: blur(8px); }
.cmodal__nav svg { width: 20px; height: 20px; }
.cmodal__nav:hover { background: #fff; color: #0a0b0f; }
.cmodal__nav--prev { left: max(8px, calc(50% - 640px)); }
.cmodal__nav--next { right: max(8px, calc(50% - 640px)); }

/* ════════ 화면 전환: 위에서 살짝 내려오는 작은 표시 + 본문 페이드 ════════ */
.view.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity .22s ease, transform .22s ease; }
.veil { position: fixed; z-index: 59; top: calc(var(--nav-top) + 12px); left: 50%; pointer-events: none; padding: .5rem 1.2rem; border-radius: 999px; background: rgba(17, 19, 24, .88); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); opacity: 0; visibility: hidden; transform: translate(-50%, -12px); transition: transform .35s var(--ease), opacity .3s, visibility 0s .35s; }
.veil.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: transform .35s var(--ease), opacity .2s; }
.veil__label { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.veil__label span { font: 600 .58rem var(--f-body); letter-spacing: .3em; color: var(--gold); }
.veil__label b { font-size: .9rem; font-weight: 700; color: var(--text); }

/* ════════ 팔레트 · 토스트 · 푸터 ════════ */
.palette { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette__scrim { position: absolute; inset: 0; background: rgba(5, 6, 9, .7); backdrop-filter: blur(8px); animation: fade .3s both; }
.palette__box { position: relative; width: min(620px, 100%); overflow: hidden; border-radius: 10px; background: #14161c; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px #000; animation: spIn .4s var(--ease) both; }
.palette__input { display: flex; align-items: center; gap: 12px; padding: 0 20px; height: 62px; border-bottom: 1px solid var(--line); }
.palette__input svg { width: 20px; height: 20px; color: var(--text-3); }
.palette__input input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 1.05rem var(--f-body); }
.palette__input input::placeholder { color: var(--text-3); }
.palette kbd { padding: .1rem .45rem; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-3); font: 600 .64rem var(--f-body); }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: 56vh; overflow: auto; }
.palette__list li { display: grid; grid-template-columns: 42px 1fr 30px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.palette__list li.is-sel, .palette__list li:hover { background: var(--surface-2); }
.palette__list > li > img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.palette__list b { display: block; font-size: .96rem; font-weight: 700; }
.palette__list span { font-size: .8rem; color: var(--text-3); }
.palette__list em { display: grid; place-items: center; }
.palette__list em img, .palette__list em svg { width: 26px; height: 26px; object-fit: contain; color: var(--text-2); }
.palette__empty { padding: 30px; text-align: center; color: var(--text-3); font-size: .9rem; display: block !important; }
.toast { position: fixed; z-index: 130; left: 50%; transform: translate(-50%, 30px); padding: .75rem 1.3rem; border-radius: 999px; background: #f2eee7; color: #0a0b0f; font-size: .9rem; font-weight: 600; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .8); opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 28px var(--gut); border-top: 1px solid var(--line); background: var(--bg); font-size: .84rem; color: var(--text-3); }
.foot p { margin: 0; }
.foot b { color: var(--text); font: 500 .9rem var(--f-disp); letter-spacing: .24em; }
.foot button { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

/* ════════ 읽기 진행 · 목차 · 맨 위로 ════════ */
.progress { position: fixed; z-index: 61; left: 0; right: 0; top: var(--nav-top); height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
body.is-intro .progress { display: none; }
.toc { position: fixed; z-index: 40; right: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.toc a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 3px 0; text-decoration: none; color: var(--text-3); }
.toc a i { order: 3; width: 14px; height: 1px; background: currentColor; transition: .25s; }
.toc a b { display: none; }
.toc a span { order: 1; padding: .2rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(17, 19, 24, .9); color: var(--text); border: 1px solid var(--line-2); white-space: nowrap; opacity: 0; transform: translateX(8px); transition: .25s var(--ease); pointer-events: none; }
.toc:hover a span, .toc a:focus-visible span { opacity: 1; transform: none; }
.toc a:hover, .toc a.is-on { color: var(--gold); }
.toc a.is-on i { width: 26px; }
body.is-intro .toc { display: none; }
.totop { position: fixed; z-index: 45; right: 20px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(17, 19, 24, .85); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(8px); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), background .25s; }
.totop svg { width: 20px; height: 20px; transform: rotate(90deg); }
.totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: #fff; color: #0a0b0f; }
section[id], .hero, .rsum { scroll-margin-top: calc(var(--nav-top) + 24px); }

/* ════════════════════════════════════════════════════════════
   음악
   ════════════════════════════════════════════════════════════ */
.mbtn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--text-2); transition: color .2s, background .2s, transform .15s; flex: none; }
.mbtn svg { width: 20px; height: 20px; }
.mbtn:hover { color: var(--text); background: var(--surface-2); }
.mbtn:active { transform: scale(.92); }
.mbtn--sm { width: 34px; height: 34px; }
.mbtn--sm svg { width: 18px; height: 18px; }
.mbtn--lg { width: 50px; height: 50px; }
.mbtn--lg svg { width: 26px; height: 26px; }
.mbtn--play { width: 44px; height: 44px; color: #0a0b0f; background: #f2eee7; }
.mbtn--play:hover { color: #0a0b0f; background: #fff; transform: scale(1.06); }
.mbtn--xl { width: 66px; height: 66px; }
.mbtn--xl svg { width: 28px; height: 28px; }
.mbtn[aria-pressed="true"], .mbtn.is-on { color: var(--gold); }
.mbtn.is-on::after { content: ''; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
.mrange { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
.mrange::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--text) var(--p), rgba(255, 255, 255, .14) var(--p)); }
.mrange::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.mrange::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--text); }
.mrange::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .2s; }
.mrange::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .2s; }
.mrange:hover::-webkit-slider-thumb, .mrange:focus-visible::-webkit-slider-thumb, .mrange:active::-webkit-slider-thumb { opacity: 1; }
.mrange:hover::-moz-range-thumb, .mrange:active::-moz-range-thumb { opacity: 1; }
@media (pointer: coarse) { .mrange::-webkit-slider-thumb { opacity: 1; } .mrange::-moz-range-thumb { opacity: 1; } }
.vol { display: flex; align-items: center; gap: 4px; }
.vol__bar { width: 96px; }
.vol--wide { width: 100%; max-width: 320px; margin: 4px auto 0; }
.vol--wide .vol__bar { flex: 1; width: auto; }
body.no-vol .vol__bar { display: none; }
.eq { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 28%; background: rgba(0, 0, 0, .45); border-radius: inherit; }
.eq b { width: 3px; height: 30%; border-radius: 2px; background: var(--gold); animation: eq .9s ease-in-out infinite alternate; }
.eq b:nth-child(2) { animation-delay: -.3s; } .eq b:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { to { height: 70%; } }
body:not(.is-playing) .eq b { animation-play-state: paused; }

.dock {
  position: fixed; z-index: 58; left: 0; right: 0; bottom: 0; height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding: 0 var(--gut) env(safe-area-inset-bottom);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  color: var(--text);
  background: rgba(12, 13, 17, .82);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid var(--line);
  transition: transform .6s var(--ease);
}
body.is-intro .dock, body.is-music .dock { transform: translateY(110%); }
.dock__seek { position: absolute; left: 0; right: 0; top: -9px; }
.dock__info { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.dock__art { position: relative; flex: none; width: 46px; height: 46px; overflow: hidden; border-radius: 4px; }
.dock__art img { width: 100%; height: 100%; object-fit: cover; }
body.is-playing .dock__art .eq { display: flex; }
.dock__text { display: flex; flex-direction: column; min-width: 0; }
.dock__text b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__text small { font-size: .76rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__ctrl { display: flex; align-items: center; gap: 6px; }
.dock__right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.dock__time { font: 500 .76rem var(--f-body); font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }
.totop { bottom: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(var(--dock-h) + 20px + env(safe-area-inset-bottom)); }

.music { position: fixed; inset: 0; z-index: 110; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); color: var(--text); transform: translateY(100%); transition: transform .45s var(--ease-io); }
.music.is-open { transform: none; }
.music__bg { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(70px) saturate(1.2) brightness(.45); transform: scale(1.1); transition: background-image .6s; }
.music__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 11, 15, .3), rgba(10, 11, 15, .92)); }
.music__bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(12px, env(safe-area-inset-top)) var(--gut) 8px; }
.music__brand { margin: 0; font-size: .86rem; color: var(--text-2); }
.music__brand b { font: 500 .96rem var(--f-disp); letter-spacing: .26em; color: var(--text); }
.music__bar-sp { width: 38px; }
.music__main { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding: 8px var(--gut) max(20px, env(safe-area-inset-bottom)); width: min(1240px, 100%); margin: 0 auto; }
.music__now { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 0; }
.music__art { position: relative; width: min(100%, 360px, 42vh); aspect-ratio: 1; overflow: hidden; border-radius: 8px; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .9); transition: transform .5s var(--ease); }
body:not(.is-playing) .music__art { transform: scale(.95); }
.music__art img { width: 100%; height: 100%; object-fit: cover; }
.music__meta { width: 100%; }
.music__meta .eyebrow { margin-bottom: .4rem; justify-content: center; }
.music__title { margin: 0; font: 700 clamp(1.08rem, 2vw, 1.35rem)/1.45 var(--f-serif); }
.music__sub { margin: .3rem 0 0; font-size: .86rem; color: var(--text-2); }
.music__seek { width: 100%; max-width: 420px; }
.music__times { display: flex; justify-content: space-between; font: 500 .74rem var(--f-body); font-variant-numeric: tabular-nums; color: var(--text-3); }
.music__ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; }
.music__char { font-size: .82rem; }
.music__list { display: flex; flex-direction: column; min-height: 0; border-radius: 10px; background: rgba(17, 19, 24, .7); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); overflow: hidden; }
.music__tools { display: flex; gap: 10px; padding: 16px 16px 10px; flex-wrap: wrap; }
.music__tools .search { flex: 1 1 200px; }
.music__shuffle-all { padding: .65rem 1.1rem; font-size: .86rem; }
.music__tabs { display: flex; gap: 6px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.music__tabs::-webkit-scrollbar { display: none; }
.music__tabs button { flex: none; display: flex; align-items: center; gap: 6px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--text-2); transition: .2s; }
.music__tabs button small { font: 500 .8rem var(--f-cg); color: var(--text-3); }
.music__tabs button:hover { color: var(--text); border-color: var(--line-2); }
.music__tabs button.is-on { background: #f2eee7; color: #0a0b0f; border-color: #f2eee7; }
.music__tabs button.is-on small { color: rgba(10, 11, 15, .6); }
.music__tracks { list-style: none; margin: 0; padding: 4px 10px 12px; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.mt__head { position: sticky; top: 0; z-index: 1; padding: 14px 8px 6px; font-size: .64rem; letter-spacing: .24em; color: var(--gold); background: linear-gradient(rgba(17, 19, 24, .98) 70%, transparent); }
.mt { display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) auto 32px; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 6px; cursor: pointer; transition: background .15s; }
.mt:hover { background: var(--surface-2); }
.mt__no { font: 500 .78rem var(--f-body); font-variant-numeric: tabular-nums; color: var(--text-3); text-align: right; }
.mt__art { position: relative; width: 44px; height: 44px; overflow: hidden; border-radius: 4px; }
.mt__art img { width: 100%; height: 100%; object-fit: cover; }
.mt__text { display: flex; flex-direction: column; min-width: 0; }
.mt__text b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt__text small { font-size: .76rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt__dur { font: 500 .76rem var(--f-body); font-variant-numeric: tabular-nums; color: var(--text-3); }
.mt.is-cur { background: rgba(var(--gold-rgb), .1); }
.mt.is-cur .mt__text b { color: var(--gold); }
.mt.is-cur .eq { display: flex; }
.mt.is-off { opacity: .4; cursor: default; }
.music__tabs-sep { flex: none; width: 1px; margin: 4px 4px; background: var(--line-2); }
.music__tabs button.is-user { border-color: rgba(var(--gold-rgb), .45); color: var(--text); }
.music__tabs button.is-user.is-on { background: var(--gold); border-color: var(--gold); color: #12100c; }
.music__tabs button.is-new { border-style: dashed; color: var(--gold); }
.music__sel { padding: .6rem 1rem; font-size: .84rem; }
.music__sel.is-on { background: #f2eee7; color: #0a0b0f; border-color: #f2eee7; }
.music__lh { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 16px 8px; padding: 14px 16px; border-radius: 6px; background: rgba(var(--gold-rgb), .08); border: 1px solid rgba(var(--gold-rgb), .3); }
.music__lh .eyebrow { margin: 0 0 .2rem; }
.music__lh h3 { margin: 0; font: 700 1.2rem var(--f-serif); }
.music__lh small { font-size: .8rem; color: var(--text-3); }
.music__lh-btns { display: flex; gap: 6px; }
.music__lh-btns .btn-ghost { padding: .4rem .85rem; font-size: .8rem; }
.btn-ghost.is-danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(var(--danger-rgb), .1); }
.mt__btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-2); font-size: 1rem; line-height: 1; transition: .15s; }
.mt__btn:hover { color: var(--gold); border-color: var(--gold); }
.mt__btn.is-in { color: var(--gold); border-color: rgba(var(--gold-rgb), .6); }
.mt__check { width: 22px; height: 22px; justify-self: center; border-radius: 4px; border: 2px solid var(--line-2); transition: .15s; position: relative; }
.mt__check.is-on { background: var(--gold); border-color: var(--gold); }
.mt__check.is-on::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #12100c; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.mt.is-picked { background: rgba(var(--gold-rgb), .08); }
.music.is-selecting .music__tracks { padding-bottom: 90px; }
.music__selbar { position: absolute; z-index: 5; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 20px; border-radius: 999px; background: #1a1d24; color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -12px #000; white-space: nowrap; }
.music__selbar span { font-size: .9rem; font-weight: 600; margin-right: 6px; }
.music__selbar .btn-ghost, .music__selbar .btn-main { padding: .55rem 1rem; font-size: .84rem; }
.music__selbar .btn-main:disabled { opacity: .4; pointer-events: none; }
.msheet { position: absolute; inset: 0; z-index: 8; display: flex; align-items: flex-end; justify-content: center; }
.msheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.msheet__box { position: relative; width: min(480px, 100%); max-height: 78vh; display: flex; flex-direction: column; border-radius: 14px 14px 0 0; background: #15171d; color: var(--text); border: 1px solid var(--line-2); border-bottom: 0; padding: 8px 16px max(16px, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .3s var(--ease); }
.msheet.is-open .msheet__scrim { opacity: 1; }
.msheet.is-open .msheet__box { transform: none; }
.msheet header { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 10px; }
.msheet h3 { margin: 0; font: 700 1.05rem var(--f-serif); }
.msheet__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.msheet__list li.empty { padding: 18px 4px; font-size: .88rem; color: var(--text-3); text-align: left; }
.msheet__list button { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'b i' 's i'; width: 100%; padding: 12px 14px; margin-bottom: 6px; border-radius: 6px; border: 1px solid var(--line); text-align: left; transition: .15s; }
.msheet__list button:hover { border-color: rgba(var(--gold-rgb), .6); background: var(--surface-2); }
.msheet__list b { grid-area: b; font-size: .92rem; font-weight: 600; }
.msheet__list small { grid-area: s; font-size: .78rem; color: var(--text-3); }
.msheet__list i { grid-area: i; align-self: center; font-style: normal; font-size: 1.1rem; color: var(--gold); }
.msheet__form { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.msheet__form input { flex: 1; min-width: 0; padding: .7rem 1rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 500 16px var(--f-body); outline: none; }
.msheet__form input:focus { border-color: var(--gold); }
.msheet__form .btn-main { padding: .7rem 1.1rem; font-size: .86rem; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .music__tabs { scrollbar-width: thin; scrollbar-color: #2a2d35 transparent; padding-bottom: 12px; }
  .music__tabs::-webkit-scrollbar { display: block; height: 8px; }
  .music__tabs::-webkit-scrollbar-track { background: transparent; border: 0; margin: 0 16px; }
  .music__tabs::-webkit-scrollbar-thumb { background: #2a2d35; border: 0; }
}

/* ════════════════════════════════════════════════════════════
   마법: 지팡이 커서 · 주문 효과 · 실습 화면 · 장면 연출
   ════════════════════════════════════════════════════════════ */
body { overflow-x: clip; }
@media (hover: hover) and (pointer: fine) {
  body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M7 7L28 28' stroke='%23000' stroke-opacity='.55' stroke-width='5.5' stroke-linecap='round'/%3E%3Cpath d='M7 7L28 28' stroke='%235a3a24' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M21 21L28 28' stroke='%23c9a46a' stroke-width='3.6' stroke-linecap='round'/%3E%3Ccircle cx='5' cy='5' r='4.5' fill='%23ffd98a' fill-opacity='.35'/%3E%3Ccircle cx='5' cy='5' r='2' fill='%23fff3cf'/%3E%3C/svg%3E") 5 5, auto; }
  a, button, [role="button"], label, select, .ccard, .mt, .r-node, summary { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M7 7L28 28' stroke='%23000' stroke-opacity='.55' stroke-width='5.5' stroke-linecap='round'/%3E%3Cpath d='M7 7L28 28' stroke='%235a3a24' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M21 21L28 28' stroke='%23c9a46a' stroke-width='3.6' stroke-linecap='round'/%3E%3Ccircle cx='5' cy='5' r='6.5' fill='%23ffd98a' fill-opacity='.5'/%3E%3Ccircle cx='5' cy='5' r='2.6' fill='%23fff'/%3E%3C/svg%3E") 5 5, pointer; }
  input, textarea { cursor: text; }
}

/* 효과 캔버스 · 주문 이름 */
.spellfx { position: fixed; inset: 0; z-index: 150; width: 100%; height: 100%; pointer-events: none; }
.incant { --ic: 255, 214, 140; position: fixed; z-index: 151; left: 50%; top: 40%; width: min(92vw, 900px); transform: translate(-50%, -50%); text-align: center; pointer-events: none; opacity: 0; }
.incant b { display: block; font: 500 clamp(1.7rem, 5vw, 3.6rem)/1.15 var(--f-disp); letter-spacing: .16em; color: #fff; text-shadow: 0 0 22px rgba(var(--ic), .95), 0 0 64px rgba(var(--ic), .6), 0 2px 4px rgba(0, 0, 0, .6); }
.incant span { display: block; margin-top: .8rem; font: 600 .92rem var(--f-body); letter-spacing: .1em; white-space: pre; color: rgb(var(--ic)); text-shadow: 0 2px 12px #000, 0 0 2px #000; }
.incant.is-on { animation: incant 2s var(--ease) forwards; }
@keyframes incant { 0% { opacity: 0; transform: translate(-50%, -38%) scale(.92); filter: blur(8px); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -58%); } }
#app.is-shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translate3d(-2px, 0, 0); } 20%, 80% { transform: translate3d(4px, 1px, 0); } 30%, 50%, 70% { transform: translate3d(-6px, -1px, 0); } 40%, 60% { transform: translate3d(6px, 1px, 0); } }
/* 마키나 룹투스: 화면이 오작동한다 */
body.is-glitch main { animation: glitch .85s steps(1); }
body.is-glitch::after { content: ''; position: fixed; inset: 0; z-index: 149; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(140, 220, 255, .09) 0 2px, transparent 2px 4px); animation: glitchFade .85s linear forwards; }
@keyframes glitch { 10% { transform: translate(6px, -2px); filter: hue-rotate(80deg) saturate(2) contrast(1.3); } 20% { transform: translate(-8px, 3px); clip-path: inset(12% 0 38% 0); } 30% { transform: none; filter: hue-rotate(-60deg); clip-path: none; } 45% { transform: translate(4px, 0) skewX(4deg); } 60% { transform: none; filter: hue-rotate(140deg) saturate(3); } 75% { transform: translate(-3px, 2px); filter: none; } 100% { transform: none; filter: none; } }
@keyframes glitchFade { to { opacity: 0; } }

/* 주문 카드의 시전 버튼 */
.spell__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.spell__foot .spell__play { margin-top: 0; padding: .38rem .9rem; font-size: .8rem; }
.spell__cast { display: inline-flex; align-items: center; gap: 6px; padding: .38rem .95rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .45); transition: .25s; }
.spell__cast svg { width: 14px; height: 14px; }
.spell__cast:hover { background: var(--gold); color: #12100c; border-color: var(--gold); }
.spell__cast.is-forbid { color: #ff9c8a; border-color: rgba(var(--war-rgb), .45); }
.spell__cast.is-forbid:hover { background: var(--war); color: #fff; border-color: var(--war); }
.spells__more { margin: 22px 0 0; }

/* ── 실습 01: 주문 연습 ── */
.craft { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.craft__stage { position: relative; width: 100%; aspect-ratio: 1.3; min-height: 380px; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 50%, rgba(var(--gold-rgb), .1), transparent 58%), radial-gradient(circle, rgba(255, 255, 255, .055) 1px, transparent 1.6px) 0 0 / 24px 24px, var(--bg-2); transition: border-color .3s, box-shadow .3s; }
.craft__stage.is-drawing { border-color: rgba(var(--gold-rgb), .5); box-shadow: 0 0 0 4px rgba(var(--gold-rgb), .07), inset 0 0 90px rgba(var(--gold-rgb), .1); }
.craft__stage.is-miss { animation: miss .4s; }
@keyframes miss { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.craft__sigil { position: absolute; left: 50%; top: 50%; width: min(70%, 430px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.craft__sigil i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--gold-rgb), .24); }
.craft__sigil i:nth-child(2) { inset: 8%; border: 1px dashed rgba(var(--gold-rgb), .18); animation: spin 80s linear infinite; }
.craft__sigil i:nth-child(3) { inset: 24%; border-color: rgba(var(--gold-rgb), .12); background: repeating-conic-gradient(from 0deg, rgba(var(--gold-rgb), .09) 0 1deg, transparent 1deg 30deg); -webkit-mask-image: radial-gradient(circle, transparent 55%, #000 56%); mask-image: radial-gradient(circle, transparent 55%, #000 56%); animation: spin 120s linear infinite reverse; }
.craft__pad { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; touch-action: none; }
@media (hover: hover) and (pointer: fine) { .craft__pad { cursor: crosshair; } }
.craft__hint { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; margin: 0; padding: 0 16px; text-align: center; font-size: .88rem; color: var(--text-3); pointer-events: none; transition: color .3s; }
.craft__hint.is-bad { color: #ffb3a3; }
.craft__side { display: flex; flex-direction: column; gap: 8px; }
.craft__label { margin: 14px 0 2px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; color: var(--text-3); }
.craft__label:first-child { margin-top: 0; }
.runes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rune { width: 100%; display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px 12px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: .25s var(--ease); }
.rune svg { width: 56px; height: 38px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(var(--gold-rgb), .55)); }
.rune b { display: block; font: 700 1.04rem/1.3 var(--f-serif); }
.rune small { font-size: .72rem; letter-spacing: .04em; color: var(--text-3); }
.rune em { font-style: normal; font-size: .72rem; font-weight: 600; padding: .12rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.rune:hover { border-color: rgba(var(--gold-rgb), .5); background: var(--surface-2); transform: translateX(3px); }
.elems { display: flex; flex-wrap: wrap; gap: 6px; }
.elems button { display: inline-flex; align-items: center; gap: 7px; padding: .38rem .85rem; border-radius: 999px; border: 1px solid var(--line); font-size: .84rem; font-weight: 600; color: var(--text-2); transition: .2s; }
.elems button i { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--ec)); box-shadow: 0 0 10px rgb(var(--ec)); }
.elems button:hover { color: var(--text); }
.elems button[aria-checked="true"] { color: var(--text); border-color: rgb(var(--ec)); background: rgba(var(--ec), .12); }
.warlist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wspell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: .25s; }
.wspell b { font: 700 .96rem var(--f-serif); }
.wspell small { font-size: .62rem; font-weight: 600; letter-spacing: .14em; color: var(--gold); }
.wspell:hover { border-color: rgba(var(--gold-rgb), .5); background: var(--surface-2); }

/* ── 실습 02: 기숙사 점수 모래시계 ── */
.hgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 4vw, 64px); max-width: 880px; margin: 44px auto 0; }
.hg { --p: .5; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hg__svg { width: min(100%, 170px); height: auto; overflow: visible; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); transition: filter .6s; }
.hg__glass { fill: rgba(255, 255, 255, .035); stroke: rgba(255, 255, 255, .34); stroke-width: 1.4; }
.hg__cap { fill: #23262e; stroke: rgba(var(--gold-rgb), .6); stroke-width: 1; }
.hg__bot, .hg__top { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1.3s var(--ease); }
.hg__bot { transform: scaleY(var(--p)); }
.hg__top { transform: scaleY(calc(1.06 - var(--p))); }
.hg__stream { opacity: .3; }
.hg.is-flow .hg__stream { animation: flow 1.6s ease-out; }
@keyframes flow { 0%, 70% { opacity: 1; } 100% { opacity: .3; } }
.hg.is-mine .hg__svg { filter: drop-shadow(0 0 28px rgba(var(--hc), .5)) drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); }
.hg figcaption { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hg figcaption img { width: 42px; height: 42px; object-fit: contain; margin-bottom: 8px; }
.hg__n { font: 500 2.1rem/1 var(--f-cg); color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.hg figcaption span { margin-top: 4px; font-size: .88rem; font-weight: 600; color: rgb(var(--hc)); filter: brightness(1.4); }
.hg.is-mine figcaption span::after { content: ' ★'; color: var(--gold); filter: none; }
.hgs__mine { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; align-items: center; margin: 36px auto 0; text-align: center; font-size: .92rem; color: var(--text-2); }
.hgs__mine b { color: var(--gold); font-weight: 700; }
.hgs__mine span { color: var(--text-3); }

/* ── 실습 03: 지팡이 가게 ── */
.shop { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.shop__intro .block__text { margin-bottom: 1.4rem; }
.shop__floor { position: relative; min-height: 360px; display: flex; flex-direction: column; justify-content: center; padding: 34px 28px; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 110%, rgba(var(--gold-rgb), .14), transparent 60%), var(--bg-2); overflow: hidden; }
.shop__pick { margin: 0 0 26px; text-align: center; font-size: .9rem; color: var(--text-3); }
.wboxes { display: flex; justify-content: center; gap: clamp(14px, 3vw, 30px); padding-top: 20px; }
.wbox { position: relative; width: clamp(62px, 8vw, 84px); height: clamp(190px, 22vw, 236px); transition: transform .5s var(--ease), opacity .5s; animation: boxIn .7s var(--ease) backwards; animation-delay: calc(var(--d) * 90ms); }
@keyframes boxIn { from { opacity: 0; transform: translateY(20px); } }
.wbox__body { position: absolute; inset: 18px 0 0; border-radius: 4px; background: linear-gradient(90deg, #22170f, #47311f 45%, #2a1c12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 30px -14px #000; }
.wbox__body i { position: absolute; left: 16%; right: 16%; top: 40%; height: 1px; background: rgba(var(--gold-rgb), .7); box-shadow: 0 7px 0 rgba(var(--gold-rgb), .3); }
.wbox__body em { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font: 500 1.05rem var(--f-cg); font-style: normal; font-variant-numeric: normal; color: rgba(var(--gold-rgb), .75); }
.wbox__lid { position: absolute; left: -3px; right: -3px; top: 0; z-index: 1; height: 26px; border-radius: 4px; background: linear-gradient(90deg, #33241a, #5a402a 45%, #33241a); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 10px -4px rgba(0, 0, 0, .6); transition: transform .7s var(--ease), opacity .6s .3s; }
.wbox::after { content: ''; position: absolute; left: 50%; top: 30px; width: 6px; height: 0; transform: translateX(-50%); border-radius: 3px; background: linear-gradient(#fff6dd, #c9a46a); box-shadow: 0 0 18px rgba(var(--gold-rgb), .9); transition: height .6s .2s var(--ease), top .6s .2s var(--ease); }
.wbox:hover { transform: translateY(-6px); }
.wbox:hover .wbox__lid { transform: translateY(-5px) rotate(-3deg); }
.wbox.is-open .wbox__lid { transform: translate(-36px, -64px) rotate(-30deg); opacity: 0; }
.wbox.is-open::after { top: -60px; height: 150px; }
.wbox.is-off { opacity: .18; transform: scale(.94); pointer-events: none; }
.wresult { text-align: center; animation: spIn .7s var(--ease) both; }
.wresult__wand { position: relative; width: min(100%, 440px); margin: 6px auto 24px; }
.wresult__wand::after { content: ''; position: absolute; right: -8%; top: 50%; width: 130px; height: 130px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(var(--core), .55), transparent 65%); animation: coreGlow 3s ease-in-out infinite; pointer-events: none; }
@keyframes coreGlow { 50% { opacity: .55; transform: translateY(-50%) scale(1.18); } }
.wand { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .65)); }
.wresult.is-fresh .wand { animation: wandIn 1s var(--ease) both; }
@keyframes wandIn { from { opacity: 0; transform: translateX(-34px) rotate(-6deg); } }
.wand__tip { fill: rgb(var(--core)); filter: drop-shadow(0 0 6px rgb(var(--core))); }
.wresult .eyebrow { justify-content: center; margin-bottom: .5rem; }
.wresult h3 { margin: 0; font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.3 var(--f-serif); }
.wresult h3 span { margin: 0 .15em; color: var(--text-3); }
.wresult__len { margin: .3rem 0 0; font: 500 1.15rem var(--f-cg); color: var(--gold); }
.wresult__desc { margin: .7rem auto 1.5rem; max-width: 380px; font-size: .96rem; line-height: 1.8; color: var(--text-2); }

/* ── 실습 04: 입학 통지서 ── */
.post { display: flex; flex-direction: column; align-items: center; }
.post__empty { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 540px; padding: 52px 30px; text-align: center; border-radius: 14px; border: 1px dashed var(--line-2); }
.post__empty svg { width: 46px; height: 46px; color: var(--text-3); }
.post__empty p { margin: 0; line-height: 1.85; color: var(--text-2); }
.env { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; perspective: 1400px; }
.env.is-gone { display: none; }
.env__body { position: relative; width: min(560px, 100%); aspect-ratio: 1.6; border-radius: 8px; background: linear-gradient(160deg, #1c2233, #121622); box-shadow: 0 40px 70px -30px #000, inset 0 0 0 1px rgba(255, 255, 255, .08); transform-style: preserve-3d; transition: transform .5s var(--ease); }
.env__body::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(to top right, transparent 49.7%, rgba(255, 255, 255, .07) 50%, transparent 50.3%) left bottom / 50% 100% no-repeat, linear-gradient(to top left, transparent 49.7%, rgba(255, 255, 255, .07) 50%, transparent 50.3%) right bottom / 50% 100% no-repeat; }
.env__body::after { content: ''; position: absolute; inset: 10px; border-radius: 4px; border: 1px solid rgba(var(--gold-rgb), .22); pointer-events: none; }
.env__body:hover { transform: translateY(-5px) rotateX(5deg); }
.env__flap { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 50%; transform-origin: 50% 0; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, #262e44, #1b2132); border-radius: 8px 8px 0 0; transition: transform .9s var(--ease-io); }
.env__addr { position: absolute; left: 0; right: 0; bottom: 9%; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 20px; text-align: center; }
.env__addr small { font-size: .6rem; font-weight: 600; letter-spacing: .3em; color: var(--gold); }
.env__addr b { font: 700 clamp(1.25rem, 3vw, 1.8rem)/1.3 var(--f-serif); color: var(--text); }
.env__addr em { font-style: normal; font-size: .82rem; color: var(--text-3); }
.env__seal { position: absolute; left: 50%; top: 50%; z-index: 3; width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .38), transparent 42%), rgb(var(--hc)); box-shadow: 0 6px 14px rgba(0, 0, 0, .55), inset 0 0 0 5px rgba(0, 0, 0, .16), inset 0 -3px 6px rgba(0, 0, 0, .25); transition: transform .5s var(--ease), opacity .4s; }
.env__seal::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(var(--hc), .7); animation: sealPulse 2.4s ease-out infinite; }
@keyframes sealPulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.env__seal img { width: 62%; height: 62%; object-fit: contain; filter: saturate(.75) drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.env__tap { margin: 0; font-size: .88rem; color: var(--text-3); transition: opacity .3s; }
.env.is-open .env__seal { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
.env.is-open .env__flap { transform: rotateX(180deg); }
.env.is-open .env__body { transform: translateY(24px); }
.env.is-open .env__tap { opacity: 0; }
.letter { width: min(700px, 100%); display: flex; flex-direction: column; align-items: center; gap: 46px; opacity: 0; transform: translateY(44px) scale(.97); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.letter.is-on { opacity: 1; transform: none; }
.letter__paper { position: relative; width: 100%; padding: clamp(40px, 6vw, 66px) clamp(26px, 6vw, 66px) clamp(54px, 7vw, 74px); border-radius: 4px; background: linear-gradient(180deg, #f7f2e8, #ece4d4); color: #2a2620; box-shadow: 0 50px 90px -40px #000, 0 0 0 1px rgba(0, 0, 0, .1); font-family: var(--f-serif); }
.letter__paper::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(var(--hc), .4); pointer-events: none; }
.letter__head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 32px; text-align: center; }
.letter__head svg { width: 38px; height: 38px; color: rgb(var(--hc)); }
.letter__head p { margin: 0; font: 600 .66rem var(--f-body); letter-spacing: .32em; color: #8a7a60; }
.letter__head b { font: 700 1.3rem var(--f-serif); color: #1e1a15; }
.letter__to { margin: 0 0 1.3rem; font-size: 1.14rem; font-weight: 700; color: #1e1a15; }
.letter__paper > p:not(.letter__to) { margin: 0 0 1rem; font-size: 1rem; line-height: 1.95; color: #3a342b; }
.letter__sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(0, 0, 0, .12); }
.letter__sign div { display: flex; flex-direction: column; gap: 2px; }
.letter__sign div:last-child { text-align: right; }
.letter__sign i { font: italic 500 1.6rem/1.2 var(--f-cg); color: #2b3a5c; }
.letter__sign span { font: 500 .8rem var(--f-body); color: #7a6e5c; }
.letter__seal { position: absolute; left: 50%; bottom: -30px; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; transform: translateX(-50%) rotate(-10deg); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .38), transparent 42%), rgb(var(--hc)); box-shadow: 0 6px 12px rgba(0, 0, 0, .4), inset 0 0 0 4px rgba(0, 0, 0, .14); }
.letter__seal img { width: 62%; height: 62%; object-fit: contain; filter: saturate(.75) drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.letter__btns .is-busy { opacity: .6; pointer-events: none; }
.letter__btns .is-busy svg { animation: bob .5s ease-in-out infinite alternate; }
.letter__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ── 창립자의 서고: 불빛을 비추면 숨은 글씨 ── */
.place__img { --lx: -400px; --ly: -400px; }
.lumos__txt { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 0 12%; text-align: center; font: 700 clamp(1rem, 2vw, 1.45rem)/1.6 var(--f-serif); color: #ffe7b0; text-shadow: 0 0 18px rgba(255, 200, 120, .95), 0 0 2px #000; pointer-events: none; }
.lumos { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; background: rgba(5, 6, 9, .9); -webkit-mask-image: radial-gradient(circle 120px at var(--lx) var(--ly), transparent 0, transparent 30%, #000 100%); mask-image: radial-gradient(circle 120px at var(--lx) var(--ly), transparent 0, transparent 30%, #000 100%); transition: background .8s; touch-action: pan-y; }
.lumos em { font-style: normal; font-size: .8rem; letter-spacing: .08em; padding: .3rem .95rem; border-radius: 999px; color: rgba(255, 231, 176, .8); border: 1px solid rgba(255, 231, 176, .3); background: rgba(0, 0, 0, .4); transition: opacity .4s; }
.place__img.is-lit .lumos em { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .lumos { cursor: none; } }
body.is-revealed .lumos { background: rgba(5, 6, 9, .2); }

/* ── 학교 첫 화면: 떠다니는 촛불 ── */
.hero--school { position: relative; }
.hero--school > :not(.candles) { position: relative; z-index: 1; }
.candles { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; }
.candles i { position: absolute; width: calc(8px * var(--s)); height: calc(46px * var(--s)); border-radius: 2px 2px 3px 3px; background: linear-gradient(90deg, #d6ccb8, #fbf6ea 45%, #cbbfa8); opacity: calc(.3 + var(--s) * .4); animation: candle var(--t) ease-in-out var(--d) infinite alternate; }
.candles i::before { content: ''; position: absolute; left: 50%; bottom: 100%; width: calc(7px * var(--s)); height: calc(15px * var(--s)); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 72%, #fff8de 0%, #ffd27a 42%, rgba(255, 140, 40, .75) 70%, transparent 72%); transform: translateX(-50%); animation: flame .16s ease-in-out infinite alternate; }
.candles i::after { content: ''; position: absolute; left: 50%; bottom: 100%; width: calc(70px * var(--s)); height: calc(70px * var(--s)); border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 120, .3), transparent 65%); transform: translate(-50%, 38%); }
@keyframes candle { to { transform: translateY(-18px); } }
@keyframes flame { from { transform: translateX(-50%) scale(1, 1) rotate(-2deg); } to { transform: translateX(-50%) scale(.9, 1.1) rotate(2deg); } }

/* ── 움직이는 초상화 ── */
.cm__pic { transition: transform .6s var(--ease); }
.cm__pic > img { transition: transform .6s var(--ease); }
.cm__pic::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at calc(50% + var(--px, 0) * 100%) calc(50% + var(--py, 0) * 100%), rgba(255, 255, 255, .16), transparent 52%); opacity: 0; transition: opacity .4s; }
.cm__pic.is-live { transform: perspective(900px) rotateY(calc(var(--px, 0) * 8deg)) rotateX(calc(var(--py, 0) * -8deg)); transition: transform .12s linear; }
.cm__pic.is-live > img { transform: scale(1.05) translate(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -10px)); transition: transform .12s linear; }
.cm__pic.is-live::after { opacity: 1; }

/* ════════ 반응형 ════════ */
@supports (height: 100dvh) {
  .hero { min-height: calc(100dvh - var(--nav-top)); }
}
.foot { padding-bottom: max(28px, env(safe-area-inset-bottom)); }

@media (max-width: 1280px) {
  .toc { display: none; }
}
@media (max-width: 1180px) {
  .houses { grid-template-columns: 1fr; max-width: 560px; }
  .pioneers { grid-template-columns: repeat(3, 1fr); }
  .events { grid-template-columns: repeat(3, 1fr); }
  .hud__nav a { padding: .5rem .7rem; }
  .hud__nav a b { display: none; }
}
@media (max-width: 1080px) {
  .rel { grid-template-columns: 1fr; }
  .rel__panel { max-height: none; }
  .places { grid-template-columns: repeat(2, 1fr); }
  .places--feature { grid-template-columns: 1fr; }
  .dock__time { display: none; }
  .split--sch { grid-template-columns: 1fr; }
  .tt { position: static; }
  .hero { grid-template-columns: 1fr; align-items: end; }
  .notice { max-width: 480px; }
}
/* 태블릿 · 모바일: 메뉴는 햄버거로 펼침 */
@media (max-width: 900px) {
  :root { --nav-top: 58px; --dock-h: 66px; }
  .hud { gap: 10px; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .hud__name { font-size: .92rem; }
  .hud__nav { position: fixed; left: 0; right: 0; top: var(--nav-top); margin: 0; padding: 10px 14px 18px; flex-direction: column; align-items: stretch; gap: 2px; background: rgba(12, 13, 17, .97); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -20px #000; opacity: 0; transform: translateY(-10px); pointer-events: none; transition: .3s var(--ease); }
  .hud.is-menu .hud__nav { opacity: 1; transform: none; pointer-events: auto; }
  .hud__nav a { gap: 14px; padding: .9rem .8rem; border-radius: 6px; }
  .hud__nav a b { display: inline; width: 28px; font-size: .9rem; }
  .hud__nav a span { font-size: 1.04rem; font-weight: 600; }
  .hud__nav a::after { display: none; }
  .hud__nav a.is-active { background: var(--surface-2); }
  .hud__tools { margin-left: auto; }
  .hud__menu { display: grid; }
  #btnIntro { display: none; }
  .lang__btn b { display: none; }
  .lang__btn { width: 40px; padding: 0; justify-content: center; }

  .trio, .duo, .split, .cadet, .rules { grid-template-columns: 1fr; }
  .trio { gap: 28px; }
  .timeline::before { left: 4px; }
  .tl { grid-template-columns: 1fr; gap: 16px; padding-left: 28px; }
  .tl::before { left: 4px; top: 18px; }
  .tl:nth-child(even) .tl__img { order: 0; }
  .tl:nth-child(even) .tl__body { text-align: left; }
  .places--feature .place { grid-template-columns: 1fr; gap: 22px; }
  .places--feature .place:nth-child(even) .place__img { order: 0; }
  .places--feature .place__no { font-size: 2.4rem; }
  .craft, .shop { grid-template-columns: 1fr; }
  .craft__stage { aspect-ratio: 1; min-height: 300px; }
  .sorter { grid-template-columns: 1fr; }
  .orb { max-width: 400px; margin-bottom: 28px; }
  .sorter__panel { min-height: 0; }
  .search input, .palette__input input, #rsInput, #qInput { font-size: 16px; }
  .ctabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); width: auto; }
  .ctabs::-webkit-scrollbar { display: none; }
  .ctab { flex: none; }
  .cbanner { flex-wrap: wrap; }
  .cbanner .play-btn { max-width: 100%; }

  .cmodal { padding: 0; }
  .cmodal__panel { display: block; height: 100%; border-radius: 0; border: 0; overflow-y: auto; animation-name: fade; }
  .cmodal__panel.is-swap .cm__portrait, .cmodal__panel.is-swap .cm__content { animation-name: fade; }
  .cm__portrait { height: 64vh; height: 64svh; padding: 20px 20px 10px; }
  .cm__content { overflow: visible; padding-bottom: 100px; }
  .cm__close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 10; background: rgba(10, 11, 15, .7); backdrop-filter: blur(8px); }
  .cmodal__nav { top: auto; bottom: 16px; margin: 0; position: fixed; }
  .cmodal__nav--prev { left: 16px; }
  .cmodal__nav--next { right: 16px; }
  .cm__stats { grid-template-columns: repeat(2, 1fr); }
  .cm__stats div:nth-child(3) { border-left: 0; }
  .cm__stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cm__count { margin-right: 0; }

  .rel__stage { height: 62vh; min-height: 420px; }
  .rs__list { grid-template-columns: 1fr; }
  .rsum__tools { width: 100%; }
  .rsum__search { flex-basis: 100%; }

  .dock { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .dock__right .vol, .dock__hide-s { display: none; }
  .dock__right { gap: 0; }
  .dock__art { width: 42px; height: 42px; }

  /* 플레이리스트: 창 전체를 하나로 스크롤 (목록이 길어도 위가 밀려 잘리지 않게) */
  .music { display: block; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .music__bg { position: fixed; }
  .music__bar { position: sticky; top: 0; z-index: 4; background: rgba(10, 11, 15, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .music__main { display: block; height: auto; min-height: 0; overflow: visible; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .music__now { margin-bottom: 22px; justify-content: flex-start; }
  .music__art { width: min(78vw, 320px, 38vh); }
  .music__list { min-height: 0; overflow: visible; }
  .music__tracks { overflow: visible; flex: none; }
  .mt__head { top: 58px; }
  .music__selbar, .msheet { position: fixed; }
  .mt { grid-template-columns: 22px 42px minmax(0, 1fr) auto 32px; gap: 10px; }
  .mt__art { width: 42px; height: 42px; }

  .intro__ctrl { top: max(12px, env(safe-area-inset-top)); right: 12px; }
  .intro__chapter { left: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 46px); max-width: calc(100% - 28px); flex-wrap: wrap; row-gap: 2px; }
  .intro__box { bottom: 6vh; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .hero { padding: 6vh 0 12vh; }
  .hero__title { font-size: clamp(1.9rem, 8.6vw, 2.5rem); }
  .hero__stats div { padding: 0 16px; }
  .block { margin-top: 84px; }
  .block__title { font-size: clamp(1.75rem, 8vw, 2.2rem); }
  .block__text { font-size: 1rem; }
  .page-head__title { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .pioneers { grid-template-columns: repeat(2, 1fr); }
  .pio__face { width: 84px; height: 84px; }
  .places, .events { grid-template-columns: 1fr 1fr; }
  .places { grid-template-columns: 1fr; }
  .subjects { grid-template-columns: 1fr 1fr; }
  .tt { padding: 14px; }
  .tt__grid { grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 2px; }
  .tt__c { min-height: 52px; font-size: .68rem; padding: 2px; }
  .tt__p { font-size: .66rem; padding: 0 3px; }
  .facts li { grid-template-columns: 1fr; gap: 0; }
  .side__body { padding: 22px 20px 22px; }
  .house__body { padding: 20px 20px 22px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .ccard { border-radius: 14px; }
  .ccard__top { top: 9px; left: 9px; right: 9px; }
  .ccard__sig { width: 28px; height: 28px; }
  .ccard__en { display: none; }
  .ccard__info { left: 10px; right: 10px; bottom: 10px; }
  .ccard__name { font-size: 1.02rem; }
  .ccard__role { font-size: .58rem; }
  .ccard__meta { font-size: .62rem; gap: 5px; }
  .sp { padding: 26px 20px 22px; }
  .sp__house img { width: 72px; height: 72px; }
  .sp__bar { grid-template-columns: 72px 1fr 40px; }
  .cm__quote { padding: 18px 20px; }
  .rs__people { grid-template-columns: 1fr; }
  .rel__stage { height: 56vh; min-height: 380px; }
  .r-node text { font-size: 10px; }
  .totop { right: 14px; width: 42px; height: 42px; }
  .toast { left: 16px; right: 16px; transform: translateY(30px); text-align: center; border-radius: 12px; }
  .toast.is-on { transform: none; }
  .foot { flex-direction: column; }
  .mt__no { display: none; }
  .mt { grid-template-columns: 42px minmax(0, 1fr) auto 30px; }
  .mt__btn { width: 30px; height: 30px; }
  .music__ctrl { gap: 8px; }
  .music__tools { display: grid; grid-template-columns: 1fr 1fr; }
  .music__tools .search { grid-column: 1 / -1; }
  .music__sel, .music__shuffle-all { width: 100%; justify-content: center; }
  .music__selbar { left: 12px; right: 12px; transform: none; justify-content: flex-end; }
  .music__selbar span { margin-right: auto; }
  .intro__logo { gap: .1em; }
  .hgs { gap: 10px; }
  .hg__n { font-size: 1.5rem; }
  .hg figcaption img { width: 34px; height: 34px; }
  .hg figcaption span { font-size: .76rem; }
  .shop__floor { padding: 28px 16px; min-height: 320px; }
  .env__seal { width: 64px; height: 64px; }
  .env__addr { bottom: 7%; gap: 3px; }
  .env__addr small { display: none; }
  .letter__sign { flex-direction: column; }
  .letter__sign div:last-child { text-align: left; }
  .incant span { white-space: normal; }
}
@media (max-width: 340px) {
  .hud__name { display: none; }
}
@media (max-width: 380px) {
  .hud__name { font-size: .82rem; letter-spacing: .2em; }
  .ccard__name { font-size: .94rem; }
}
@media (pointer: coarse) {
  .hud__btn { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  .stage__img { animation: none; }
}

/* Cormorant 숫자는 옛 숫자(1 → I)로 그려진다 → 숫자를 쓰는 곳은 가로줄 맞춘 숫자로 (font 단축 속성이 지우므로 맨 끝에서 고정) */
.ev__date b, .hero__stats b, .place__no, .pio__no, .commands__no, .rule h3 i, .hg__n, .sp__bar b, .cm__count, .wresult__len, .ctab small, .music__tabs button small, .hud__nav a b, .intro__ch-no, .sp__a i, .pio__q, .wbox__body em, .letter__sign i { font-variant-numeric: lining-nums !important; }

/* 모바일: 탭 · 꾹 누르기 때 파란 네모 / 선택 박스 / 이미지 메뉴가 뜨지 않게 */
* { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
button, a, [role="button"], label, .ccard, .mt, .av, .pio, .hud, .dock, .intro, .ctabs, .spelltabs, .rel__stage, .orb, img, svg {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
img { -webkit-user-drag: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
