/* 성좌의 기원 세계관 사이트 (2026-11-03, 3판). 깊은 밤하늘, 큰 그림, 유리 판, 별빛 금색 강조 하나. */
:root {
  --bg: #060911; --bg-2: #0A0F1D; --panel: rgba(16, 22, 42, 0.78); --panel-solid: #10162A; --panel-2: #151C33; --line: rgba(120, 140, 190, 0.22); --line-2: rgba(120, 140, 190, 0.13);
  --ink: #F1ECE2; --muted: #B6BCCB; --faint: #808AA0;
  --accent: #F0B45A; --accent-2: #FFD58C; --accent-ink: #1A1408; --accent-soft: rgba(240, 180, 90, 0.16); --glow: 0 0 0 1px rgba(240, 180, 90, 0.55), 0 8px 32px rgba(240, 180, 90, 0.18);
  --notice-bg: rgba(12, 20, 38, 0.86); --notice-ink: #C6D7EA; --notice-dim: #8299AE; --seal: #E0705A;
  --paper: #FFFDF7; --paper-ink: #2A2D30; --paper-line: #D9D4C7;
  --c-cheonching: #B9C4D6; --c-baekya: #F0875C; --c-manga: #A9A39A; --c-none: #8F97A6;
  --w-earth: #F0B45A; --w-chunha: #6FA8DC; --w-arbel: #B395E6; --w-jangseo: #5DC7B6; --w-ashes: #C09A78; --w-underworld: #8E94C8; --w-first: #6B7280;
  --sans: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  --serif: 'Noto Serif KR', 'Apple Myungjo', 'Batang', serif;
  --mono: 'IBM Plex Sans KR', 'Pretendard', 'Malgun Gothic', sans-serif;
  --fs: 17px; --lh: 1.75; --maxw: 1240px; --gutter: 16px; --gap: 72px; --radius: 10px; --radius-s: 6px; --t: 220ms; --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 640px) { :root { --gutter: 32px; --gap: 96px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; --gap: 120px; } }
@media (prefers-reduced-motion: reduce) { :root { --t: 0ms; } *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: var(--fs); line-height: var(--lh); word-break: keep-all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(96, 72, 178, 0.28), transparent 62%), radial-gradient(900px 560px at 8% 6%, rgba(34, 86, 160, 0.24), transparent 60%), radial-gradient(800px 500px at 50% 115%, rgba(60, 40, 120, 0.22), transparent 60%), url('../img/stars.svg') repeat; background-color: var(--bg); }
@media (max-width: 639px) { body { --fs: 16px; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-family: var(--serif); font-size: clamp(34px, 5vw, 56px); letter-spacing: 0.01em; }
h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 0.85em; max-width: 42em; }
ul, ol { margin: 0 0 0.85em; padding-left: 1.3em; }
li { margin: 0.3em 0; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, .block[tabindex="-1"]:focus, main:focus { outline: none; }
::selection { background: var(--accent-soft); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--radius-s); z-index: 100; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }

/* 입장 */
.gate { position: fixed; inset: 0; z-index: 90; background: #04060C; display: grid; place-items: center; text-align: center; overflow: hidden; transition: opacity 700ms ease, transform 900ms var(--ease); }
.gate[hidden] { display: none; }
.gate.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.gate .bgimg { position: absolute; inset: -4%; background-position: center; background-size: cover; background-repeat: no-repeat; opacity: 0; transform: scale(1.08); transition: opacity 1600ms ease, transform 9000ms ease-out; }
.gate.on .bgimg { opacity: 0.9; transform: scale(1); }
.gate::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 48%, rgba(4, 6, 12, 0.5), rgba(4, 6, 12, 0.15) 70%), linear-gradient(180deg, rgba(4, 6, 12, 0.1) 40%, rgba(4, 6, 12, 0.75)); pointer-events: none; }
.gate canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.gate .in { position: relative; z-index: 2; padding: 24px; display: grid; justify-items: center; gap: 16px; }
.gate .t { font-family: var(--serif); font-size: clamp(48px, 10vw, 112px); font-weight: 600; letter-spacing: 0.08em; line-height: 1.05; color: var(--ink); opacity: 0; transform: translateY(16px); filter: blur(6px); transition: opacity 1300ms ease 300ms, transform 1300ms var(--ease) 300ms, filter 1300ms ease 300ms; text-shadow: 0 0 48px rgba(240, 180, 90, 0.28), 0 2px 18px rgba(0, 0, 0, 0.6); }
.gate .rule { width: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); transition: width 1400ms var(--ease) 900ms; }
.gate .s { font-family: var(--serif); font-size: clamp(18px, 2.6vw, 26px); color: #D5D9E4; letter-spacing: 0.18em; opacity: 0; transition: opacity 1000ms ease 1300ms; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
.gate .go { margin-top: 20px; opacity: 0; transform: translateY(10px); transition: opacity 800ms ease 1900ms, transform 800ms var(--ease) 1900ms; }
.gate.on .t { opacity: 1; transform: none; filter: none; }
.gate.on .s, .gate.on .go { opacity: 1; transform: none; }
.gate.on .rule { width: min(420px, 72vw); }
.gate .go .btn { min-width: 168px; min-height: 50px; font-size: 17px; letter-spacing: 0.2em; padding-left: calc(18px + 0.2em); }

/* 머리띠 */
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(6, 9, 17, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-2); }
.hdr .wrap { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.06em; }
.logo svg { width: 20px; height: 20px; color: var(--accent); }
.nav { display: none; gap: 2px; margin-left: 6px; }
.nav a { position: relative; padding: 20px 12px; white-space: nowrap; color: var(--muted); font-weight: 500; transition: color var(--t); }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 12px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform var(--t) var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
@media (min-width: 1024px) { .nav { display: flex; } }
@media (max-width: 1023px) { .hdr { position: static; } }

/* 단추, 칩, 스위치 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: var(--bg); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform var(--t); }
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); color: var(--ink); border-color: var(--line); backdrop-filter: blur(8px); }
.btn.ghost:hover { border-color: rgba(240, 180, 90, 0.6); box-shadow: var(--glow); background: rgba(255, 255, 255, 0.06); }
.btn.accent { background: linear-gradient(180deg, #F7C777, #E9A947); color: var(--accent-ink); box-shadow: 0 6px 24px rgba(240, 180, 90, 0.28); }
.btn.accent:hover { background: linear-gradient(180deg, #FFD68E, #F0B45A); box-shadow: 0 8px 30px rgba(240, 180, 90, 0.4); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 14px; cursor: pointer; white-space: nowrap; transition: border-color var(--t), color var(--t), background var(--t); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { font-size: 12px; opacity: 0.7; }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; color: var(--ink); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-2); white-space: nowrap; }
.tag.gold { color: var(--accent-2); border-color: rgba(240, 180, 90, 0.35); background: rgba(240, 180, 90, 0.08); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; color: var(--muted); user-select: none; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { width: 42px; height: 24px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background var(--t); flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--t) var(--ease); }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { outline: 3px solid var(--accent); outline-offset: 3px; }

/* 아래 탭(휴대폰) */
.tabs-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(6, 9, 17, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
.tabs-bottom a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; font-size: 12px; color: var(--muted); min-height: 54px; }
.tabs-bottom a svg { width: 21px; height: 21px; }
.tabs-bottom a[aria-current="page"] { color: var(--accent); font-weight: 600; }
@media (min-width: 1024px) { .tabs-bottom { display: none; } }
@media (max-width: 1023px) { body { padding-bottom: 64px; } }

/* 쪽 머리 그림 */
.banner { position: relative; min-height: clamp(240px, 42vh, 460px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.banner .bgimg { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; background-repeat: no-repeat; animation: drift 40s ease-in-out infinite alternate; }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 9, 17, 0.12) 0%, rgba(6, 9, 17, 0.35) 45%, rgba(6, 9, 17, 0.92) 88%, var(--bg) 100%); }
.banner .wrap { width: 100%; padding-bottom: 36px; }
.banner h1 { text-shadow: 0 4px 24px rgba(0, 0, 0, 0.65); }
@keyframes drift { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.1) translateY(-1.5%); } }

/* 쪽과 블록 */
main { display: block; }
.page { padding-top: 40px; padding-bottom: var(--gap); }
.block { margin: 0 0 var(--gap); scroll-margin-top: 84px; }
.block-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.block-head h2 { margin: 0; }
.block-head .count { color: var(--faint); font-size: 15px; }
.block-head .more { margin-left: auto; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color var(--t); }
.block-head .more:hover { color: var(--accent); }
.block-head .more svg { width: 16px; height: 16px; }
.block > h2 { margin-bottom: 22px; }
.sub { margin: 40px 0 16px; font-size: 21px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.two { display: grid; gap: 18px; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; } .two.wide-left { grid-template-columns: 1.25fr 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.panel h3 { margin-bottom: 10px; }
.panel p:last-child { margin-bottom: 0; }
.chips-page { position: sticky; top: 64px; z-index: 30; background: rgba(6, 9, 17, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 10px 0; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.chips-page::-webkit-scrollbar { display: none; }
.chips-page .wrap { display: flex; gap: 8px; }
@media (max-width: 1023px) { .chips-page { top: 0; } }
.next-band { margin-top: var(--gap); position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); min-height: 160px; display: flex; align-items: center; isolation: isolate; }
.next-band .bgimg { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; background-repeat: no-repeat; transition: transform 1.2s var(--ease); }
.next-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 9, 17, 0.92) 0%, rgba(6, 9, 17, 0.55) 60%, rgba(6, 9, 17, 0.25) 100%); }
.next-band:hover .bgimg { transform: scale(1.05); }
.next-band .in { padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.next-band .to small { display: block; color: var(--muted); font-size: 14px; letter-spacing: 0.1em; }
.next-band .to strong { font-family: var(--serif); font-size: 30px; display: inline-flex; align-items: center; gap: 10px; }
.next-band .to strong svg { width: 22px; height: 22px; color: var(--accent); }

/* 홈 첫 화면 */
.hero-full { position: relative; min-height: calc(100svh - 64px); display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: 56px 0 72px; }
.hero-full .bgimg { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; background-repeat: no-repeat; animation: drift 46s ease-in-out infinite alternate; }
.hero-full::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 9, 17, 0.9) 0%, rgba(6, 9, 17, 0.62) 42%, rgba(6, 9, 17, 0.18) 100%), linear-gradient(180deg, transparent 55%, var(--bg) 100%); }
.hero-full .wrap { width: 100%; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-full .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 72px; } }
.hero-full h1 { font-size: clamp(46px, 7vw, 84px); letter-spacing: 0.04em; text-shadow: 0 0 60px rgba(240, 180, 90, 0.2), 0 4px 24px rgba(0, 0, 0, 0.6); }
.hero-full .subtitle { font-family: var(--serif); font-size: clamp(18px, 2.2vw, 24px); color: #D5D9E4; letter-spacing: 0.14em; margin: 10px 0 30px; }
.hero-full .story p { font-family: var(--serif); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.9; color: #E8E4DA; max-width: 30em; margin-bottom: 0.4em; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.hero-full .btn-row { margin-top: 34px; }
@media (max-width: 959px) { .hero-full::before { background: linear-gradient(180deg, rgba(6, 9, 17, 0.55) 0%, rgba(6, 9, 17, 0.75) 50%, var(--bg) 100%); } .hero-full { min-height: auto; } }

/* 휴대폰 알림(체계 공지) */
.notifs { display: grid; gap: 12px; max-width: 420px; justify-self: end; width: 100%; }
@media (max-width: 959px) { .notifs { justify-self: start; } }
.notif { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 18px; background: rgba(22, 28, 50, 0.62); border: 1px solid rgba(255, 255, 255, 0.09); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); opacity: 0; transform: translateY(12px) scale(0.98); animation: notif-in 700ms var(--ease) forwards; }
.notif:nth-child(2) { animation-delay: 300ms; } .notif:nth-child(3) { animation-delay: 600ms; }
@keyframes notif-in { to { opacity: 1; transform: none; } }
.notif .app { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(160deg, #2A2F4A, #10142A); border: 1px solid rgba(240, 180, 90, 0.45); display: grid; place-items: center; color: var(--accent); }
.notif .app svg { width: 20px; height: 20px; }
.notif .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.notif .top b { color: var(--ink); font-weight: 600; letter-spacing: 0.04em; }
.notif .msg { font-family: var(--mono); font-size: 14.5px; line-height: 1.6; color: #E4EAF4; }

/* 인물 카드 */
.pcards { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .pcards { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .pcards { grid-template-columns: repeat(5, 1fr); } .pcards.four { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.pcard { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel-solid); cursor: pointer; text-align: left; aspect-ratio: 4 / 5; isolation: isolate; transition: border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease); }
.pcard .ph { position: absolute; inset: 0; z-index: -2; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.pcard .ph .letter { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-size: 72px; color: rgba(255, 255, 255, 0.85); background: radial-gradient(120% 90% at 30% 20%, var(--group-color, #333) 0%, #0B0F1E 75%); }
.pcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 45%, rgba(6, 9, 17, 0.55) 70%, rgba(6, 9, 17, 0.94) 100%); }
.pcard:hover { border-color: rgba(240, 180, 90, 0.7); box-shadow: var(--glow); transform: translateY(-3px); }
.pcard:hover .ph img { transform: scale(1.06); }
.pcard .badge { position: absolute; top: 10px; left: 10px; background: rgba(6, 9, 17, 0.72); backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.06em; border: 1px solid rgba(255, 255, 255, 0.12); }
.pcard .badge.r { left: auto; right: 10px; background: rgba(240, 180, 90, 0.92); color: var(--accent-ink); border-color: transparent; }
.pcard .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; display: grid; gap: 4px; }
.pcard .cap::before { content: ""; width: 28px; height: 2px; background: var(--group-color, var(--accent)); border-radius: 2px; margin-bottom: 4px; }
.pcard .name { font-size: 19px; font-weight: 600; line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.pcard .role { font-size: 13.5px; color: #D3D8E3; line-height: 1.45; }
.pcard .tags { margin-top: 6px; }
.pcard .tags .tag { font-size: 12.5px; min-height: 23px; padding: 0 9px; background: rgba(6, 9, 17, 0.5); }
@media (max-width: 639px) { .pcard .tags { display: none; } .pcard .name { font-size: 17px; } }
.group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 48px 0 18px; }
.group-head::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--group-color, var(--accent)); box-shadow: 0 0 14px var(--group-color, var(--accent)); }
.group-head h3 { font-family: var(--serif); font-size: 22px; }
.group-head .count { color: var(--faint); font-size: 14px; }

/* 그림 카드(세계, 시작) */
.icards { display: grid; gap: 18px; }
@media (min-width: 720px) { .icards.c2 { grid-template-columns: repeat(2, 1fr); } .icards.c3 { grid-template-columns: repeat(3, 1fr); } }
.icard { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel-solid); display: flex; flex-direction: column; transition: border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease); }
.icard:hover { border-color: rgba(240, 180, 90, 0.6); box-shadow: var(--glow); }
.icard .pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; }
.icard .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.icard:hover .pic img { transform: scale(1.05); }
.icard .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(6, 9, 17, 0.88) 100%); }
.icard .pic .over { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.icard .pic .over h3 { font-family: var(--serif); font-size: 26px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.icard .pic .rec { position: absolute; top: 12px; left: 12px; z-index: 1; }
.icard .body { padding: 18px 20px 20px; display: grid; gap: 10px; flex: 1; align-content: start; }
.icard .body p { margin: 0; }
.icard .body .mood { font-family: var(--serif); color: var(--muted); font-size: 16px; }
.icard .body .btn-row { margin-top: auto; padding-top: 6px; }
.icard .stripe { height: 3px; background: var(--card-color, var(--accent)); }

/* 홈 세계 띠 */
.wstrip { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .wstrip { grid-template-columns: repeat(5, 1fr); } }
.wtile { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); isolation: isolate; display: flex; align-items: flex-end; transition: border-color var(--t), box-shadow var(--t); }
.wtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.wtile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(6, 9, 17, 0.9) 100%); }
.wtile:hover { border-color: rgba(240, 180, 90, 0.6); box-shadow: var(--glow); }
.wtile:hover img { transform: scale(1.07); }
.wtile .cap { padding: 14px; display: grid; gap: 2px; }
.wtile .cap b { font-family: var(--serif); font-size: 21px; }
.wtile .cap small { color: #CFD5E2; font-size: 13px; }
.wtile .cap::before { content: ""; width: 24px; height: 2px; background: var(--card-color, var(--accent)); margin-bottom: 6px; }
@media (max-width: 719px) { .wtile:last-child { grid-column: span 2; aspect-ratio: 16 / 9; } }

/* 죽음의 세 갈래 */
.branch { position: relative; display: grid; gap: 16px; }
.branch svg.lines { width: 100%; height: 90px; display: block; }
.branch .ends { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 639px) { .branch .ends { grid-template-columns: 1fr; } .branch svg.lines { display: none; } }
.branch .end { text-align: center; padding: 22px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.branch .end .ic { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(240, 180, 90, 0.22), transparent 70%); color: var(--accent-2); }
.branch .end .ic svg { width: 28px; height: 28px; }
.branch .end h4 { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; }
.branch .end p { margin: 0 auto; color: var(--muted); font-size: 15px; max-width: 18em; }
.branch .rule { text-align: center; color: var(--accent-2); font-family: var(--serif); font-size: 17px; margin-top: 4px; }
.branch .root { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; }

/* 타임라인 */
.tl { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 0; overflow-x: auto; padding: 8px 2px 14px; scrollbar-width: thin; }
.tl .cell { position: relative; padding: 34px 16px 0 0; }
.tl .cell::before { content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 2px; background: var(--line); }
.tl .cell::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.tl .cell.now::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px rgba(240, 180, 90, 0.7); }
.tl .cell.now::before { background: linear-gradient(90deg, var(--accent), var(--line)); }
.tl .cell.dim { opacity: 0.5; }
.tl .when { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.tl .name { font-weight: 600; font-size: 17px; margin: 4px 0 8px; }
.tl .line { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--notice-ink); background: var(--notice-bg); border: 1px solid rgba(90, 122, 148, 0.4); padding: 8px 10px; border-radius: var(--radius-s); max-width: 20em; }
.tl-v { position: relative; padding-left: 30px; margin: 0; list-style: none; }
.tl-v::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--line), var(--accent)); }
.tl-v li { position: relative; padding: 0 0 22px; }
.tl-v li::before { content: ""; position: absolute; left: -28px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.tl-v li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px rgba(240, 180, 90, 0.7); }
.tl-v .year { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--accent-2); }
.tl-v p { margin: 2px 0 0; }

/* 등급(밝기) */
.ladder { display: grid; gap: 10px; }
.rung { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.rung .star { position: relative; height: 64px; display: grid; place-items: center; }
.rung .star i { display: block; width: var(--s, 20px); height: var(--s, 20px); border-radius: 50%; background: radial-gradient(circle, #FFF6DD 0%, var(--accent) 45%, rgba(240, 180, 90, 0) 72%); box-shadow: 0 0 var(--g, 14px) rgba(255, 213, 140, var(--o, 0.6)); }
.rung .star b { position: absolute; bottom: -2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.rung .label { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.rung .can { color: var(--ink); font-size: 15.5px; margin: 2px 0 6px; }
.rung .ex { display: flex; gap: 6px; flex-wrap: wrap; }
.rung .start-mark { display: inline-block; margin-left: 8px; vertical-align: middle; }
.rung.sealed .star i { background: radial-gradient(circle, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 70%); box-shadow: none; }
.memory { display: grid; place-items: center; }
.memory svg { width: min(100%, 340px); height: auto; }

/* 아이콘 카드 */
.icon-cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .icon-cards { grid-template-columns: repeat(3, 1fr); } }
.icon-card { padding: 24px 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
.icon-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -80px; background: radial-gradient(circle, var(--card-color, rgba(240, 180, 90, 0.25)), transparent 65%); opacity: 0.5; }
.icon-card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--accent-2); margin-bottom: 14px; }
.icon-card .ic svg { width: 26px; height: 26px; }
.icon-card h3 { font-family: var(--serif); font-size: 21px; display: flex; align-items: center; gap: 10px; }
.icon-card p { margin: 8px 0 0; color: var(--muted); }
.list-ok, .list-no { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-ok li, .list-no li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; margin: 0; }
.list-ok li svg { color: var(--accent); width: 22px; height: 22px; margin-top: 2px; }
.list-no li svg { color: var(--seal); width: 22px; height: 22px; margin-top: 2px; }

/* 그림과 글 나란히 */
.feature { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 860px) { .feature { grid-template-columns: 1fr 1fr; } .feature.flip > :first-child { order: 2; } }
.feature .pic { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 280px; isolation: isolate; }
.feature .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(6, 9, 17, 0.6)); }
.feature .txt { display: grid; gap: 14px; align-content: center; }

/* 성단 */
.clusters { display: grid; gap: 16px; }
@media (min-width: 720px) { .clusters { grid-template-columns: repeat(var(--n, 3), 1fr); } }
.cluster { position: relative; padding: 26px 22px 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; text-align: center; }
.cluster::before { content: ""; position: absolute; inset: -40% -20% auto; height: 260px; background: radial-gradient(circle, var(--card-color, var(--accent)) 0%, transparent 62%); opacity: 0.22; }
.cluster .em { position: relative; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--card-color, var(--accent)); color: var(--card-color, var(--accent)); box-shadow: 0 0 24px color-mix(in srgb, var(--card-color, #F0B45A) 35%, transparent); background: rgba(6, 9, 17, 0.6); }
.cluster .em svg { width: 36px; height: 36px; }
.cluster h3 { font-family: var(--serif); font-size: 24px; margin-bottom: 6px; position: relative; }
.cluster p { position: relative; margin: 0 auto 8px; color: var(--muted); max-width: 20em; }
.cluster .verb { position: relative; display: inline-block; font-family: var(--serif); color: var(--ink); margin-top: 4px; }

/* 공지(세계 안 물건) */
.notice { background: var(--notice-bg); color: var(--notice-ink); border: 1px solid rgba(90, 122, 148, 0.45); border-top: 3px solid #5A7A94; border-radius: var(--radius-s); padding: 18px 20px; font-family: var(--mono); font-size: 15px; line-height: 1.7; backdrop-filter: blur(10px); }
.notice.special { border-top-color: var(--seal); }
.notice .from { font-size: 12px; color: var(--notice-dim); letter-spacing: 0.06em; margin-bottom: 8px; }
.notice .line + .line { border-top: 1px dashed rgba(198, 215, 234, 0.16); padding-top: 8px; margin-top: 8px; }

/* 세계 안 종이 */
.paper { background: var(--paper); border: 1px solid var(--paper-line); padding: 20px 22px; font-family: var(--mono); font-size: 15px; line-height: 1.75; color: var(--paper-ink); position: relative; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); border-radius: 3px; }
.paper .title { font-weight: 600; letter-spacing: 0.08em; border-bottom: 1px dashed var(--paper-line); padding-bottom: 8px; margin-bottom: 12px; font-size: 14px; }
.paper .row { display: flex; justify-content: space-between; gap: 16px; margin: 4px 0; }
.paper .stamp { position: absolute; right: 16px; bottom: 14px; color: #C8553D; border: 2px solid #C8553D; border-radius: 4px; padding: 2px 8px; font-size: 13px; font-weight: 600; transform: rotate(-7deg); opacity: 0.85; }
.paper.tilt { transform: rotate(-1.6deg); }
.paper.receipt { max-width: 300px; font-size: 14px; }
.paper.receipt .row { border-bottom: 1px dotted var(--paper-line); }
.paper.receipt .stamp { top: 12px; bottom: auto; }
.paper ol { padding-left: 1.4em; margin: 0; }
.paper .sign { text-align: right; margin-top: 14px; font-size: 14px; color: #6B6F74; }
.paper strong { color: #1A1D20; }
.papers { display: grid; gap: 22px; align-items: start; }
@media (min-width: 820px) { .papers { grid-template-columns: repeat(3, 1fr); } }

/* 거르기 */
.filters { display: grid; gap: 12px; margin-bottom: 8px; }
.filters .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { position: relative; max-width: 380px; width: 100%; }
.search input { width: 100%; min-height: 46px; padding: 0 44px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.04); font: inherit; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search > svg { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 6px; cursor: pointer; color: var(--muted); display: none; }
.search .clear svg { width: 18px; height: 18px; display: block; }
.search.has .clear { display: block; } .search.has > svg { display: none; }
.result-line { font-size: 14px; color: var(--muted); min-height: 1.5em; }
.people-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* 서랍 */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(2, 4, 10, 0.66); backdrop-filter: blur(4px); z-index: 60; opacity: 0; pointer-events: none; transition: opacity var(--t); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: #0B1022; z-index: 61; transform: translateX(100%); transition: transform 320ms var(--ease); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 12px; }
.drawer-bar .sp { flex: 1; }
.icon-btn { width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: rgba(6, 9, 17, 0.6); backdrop-filter: blur(8px); display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }
.drawer-bar .btn { background: rgba(6, 9, 17, 0.6); }
.drawer-body { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; padding-bottom: 40px; }
.drawer-img { position: relative; isolation: isolate; }
.drawer-img img { width: 100%; height: auto; max-height: 62vh; object-fit: cover; object-position: top; }
.drawer-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 16, 34, 0) 55%, #0B1022 100%); }
.drawer-img .letter { height: 300px; display: grid; place-items: center; font-family: var(--serif); font-size: 96px; color: rgba(255, 255, 255, 0.85); background: radial-gradient(120% 90% at 30% 20%, var(--group-color, #333) 0%, #0B0F1E 75%); }
.drawer-main { padding: 0 24px; margin-top: -40px; position: relative; z-index: 1; }
.drawer-main .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.badge-s { display: inline-flex; align-items: center; min-height: 24px; font-size: 12px; font-weight: 600; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--muted); letter-spacing: 0.04em; }
.badge-s.fill { background: var(--group-color, var(--accent)); border-color: transparent; color: #0B0E14; }
.drawer-main h2 { font-size: 34px; margin-bottom: 4px; }
.drawer-main .meta { color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.drawer-main .quote { position: relative; margin: 18px 0; padding: 16px 18px 16px 44px; border-radius: var(--radius); background: rgba(240, 180, 90, 0.07); border: 1px solid rgba(240, 180, 90, 0.22); font-family: var(--serif); font-size: 18px; line-height: 1.7; }
.drawer-main .quote::before { content: "「"; position: absolute; left: 14px; top: 8px; font-size: 30px; color: var(--accent); font-family: var(--serif); }
.drawer-main .profile p { font-size: 16.5px; margin-bottom: 0.6em; }
.spec { display: grid; gap: 0; margin: 18px 0; border-top: 1px solid var(--line-2); }
.spec .r { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.spec .k { font-size: 13px; color: var(--faint); font-weight: 600; letter-spacing: 0.04em; padding-top: 3px; }
.spec .v { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spec .v .ico { display: inline-flex; align-items: center; gap: 6px; }
.spec .v .ico svg { width: 16px; height: 16px; color: var(--accent); }
.face-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 999px; padding: 3px 12px 3px 3px; font-size: 14px; cursor: pointer; color: var(--ink); transition: border-color var(--t); }
.face-chip:hover { border-color: var(--accent); }
.face-chip img, .face-chip .l { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 12px; color: #fff; background: var(--group-color, var(--faint)); }
.related { display: flex; flex-wrap: wrap; gap: 8px; }

/* 툴팁 */
.term { text-decoration: underline dotted var(--accent); text-underline-offset: 0.22em; cursor: help; border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.tip { position: absolute; z-index: 70; max-width: 300px; background: #121A33; border: 1px solid var(--line); color: var(--ink); padding: 12px 14px; border-radius: var(--radius-s); font-size: 14px; line-height: 1.6; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); }
.tip b { display: block; margin-bottom: 4px; color: var(--accent-2); }
@media (max-width: 639px) { .tip { position: fixed; left: 12px; right: 12px; bottom: 76px; max-width: none; } }

/* 접는 칸 */
details.fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 10px 0; }
details.fold summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 12px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--t); flex: none; }
details.fold[open] summary::after { transform: rotate(-135deg); }
details.fold .fold-body { padding: 0 20px 18px; color: var(--ink); }
details.fold .fold-body > :last-child { margin-bottom: 0; }

/* 시작하기 */
.tabs { display: flex; gap: 6px; margin-bottom: 26px; overflow-x: auto; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); width: max-content; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 10px 18px; cursor: pointer; color: var(--muted); border-radius: 999px; font-weight: 500; white-space: nowrap; transition: background var(--t), color var(--t); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 639px) { .tabs { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); } .tabs button { padding: 10px 4px; font-size: 14px; } }
.excerpt { font-family: var(--serif); font-size: 17.5px; line-height: 2; padding: 26px 28px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 253, 247, 0.06), rgba(255, 253, 247, 0.02)); border: 1px solid var(--line); }
.excerpt p { margin: 0 0 0.5em; }
.excerpt .sys { font-family: var(--mono); font-size: 15px; color: var(--notice-ink); }
.bubbles { display: grid; gap: 12px; margin-top: 14px; }
.bubble-row { display: flex; justify-content: flex-end; align-items: flex-end; gap: 10px; }
.bubble { max-width: 86%; background: #262C42; color: var(--ink); border-radius: 20px 20px 6px 20px; padding: 12px 18px; font-size: 16px; line-height: 1.65; border: 1px solid rgba(255, 255, 255, 0.07); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.bubble-row .cp { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--faint); display: grid; place-items: center; cursor: pointer; transition: color var(--t), border-color var(--t); }
.bubble-row .cp:hover { color: var(--accent); border-color: var(--accent); }
.bubble-row .cp svg { width: 15px; height: 15px; }
.format { display: flex; align-items: flex-start; gap: 10px; background: rgba(240, 180, 90, 0.06); border: 1px dashed rgba(240, 180, 90, 0.4); padding: 12px; border-radius: 10px; }
.format .fields { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.format .fpill { display: inline-flex; flex-direction: column; justify-content: center; min-height: 32px; padding: 5px 11px; border-radius: 8px; background: rgba(6, 9, 17, 0.55); border: 1px solid rgba(240, 180, 90, 0.32); color: var(--accent-2); font-size: 14.5px; line-height: 1.35; }
.format .fpill small { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.format .cp { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--faint); display: grid; place-items: center; cursor: pointer; transition: color var(--t), border-color var(--t); }
.format .cp:hover { color: var(--accent); border-color: var(--accent); }
.format .cp svg { width: 15px; height: 15px; }
.copy-box { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 112px 16px 18px; margin: 10px 0; }
.copy-box .btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.copy-box p { margin: 0; }
.ok-toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 80; opacity: 0; transition: opacity var(--t); pointer-events: none; }
.ok-toast.show { opacity: 1; }
.steps { display: grid; gap: 12px; counter-reset: step; }
@media (min-width: 720px) { .steps.c4 { grid-template-columns: repeat(4, 1fr); } .steps.c3 { grid-template-columns: repeat(3, 1fr); } }
.steps .step { position: relative; padding: 18px 18px 18px 60px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.steps .step::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.steps .step b { display: block; margin-bottom: 4px; }
.steps .step p { margin: 0; color: var(--muted); font-size: 15px; }

/* 플레이 안내 */
.chat { background: #0C1122; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.chat .m { position: relative; padding-left: 40px; }
.chat .m .mark { position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.chat .scene { font-size: 13px; color: var(--faint); letter-spacing: 0.04em; }
.chat .narration { color: #CDD3DF; }
.chat .dialogue { font-family: var(--serif); font-size: 17px; }
.chat .notice-l { font-family: var(--mono); background: var(--notice-bg); color: var(--notice-ink); padding: 10px 12px; border-radius: 8px; font-size: 14px; border: 1px solid rgba(90, 122, 148, 0.4); }
.chat .status { font-family: var(--mono); font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.marks { display: grid; gap: 10px; }
.marks .m { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--radius-s); background: var(--panel); border: 1px solid var(--line); }
.marks .m span { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.keys { display: grid; gap: 16px; }
@media (min-width: 720px) { .keys { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .keys { grid-template-columns: repeat(3, 1fr); } }
.keys .grp h3 { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; margin-bottom: 10px; }
.key { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-s); background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.key kbd { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--accent-2); background: linear-gradient(180deg, #1A2140, #10162A); border: 1px solid rgba(240, 180, 90, 0.35); border-bottom-width: 3px; padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.key span { font-size: 14.5px; color: var(--ink); }
.key .who { font-size: 12px; color: var(--faint); }
.key button { border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 6px; border-radius: 6px; }
.key button:hover { color: var(--accent); }
.key button svg { width: 16px; height: 16px; }
.tips { display: grid; gap: 14px; }
@media (min-width: 720px) { .tips { grid-template-columns: repeat(2, 1fr); } }
.tipc { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tipc .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(240, 180, 90, 0.1); color: var(--accent-2); }
.tipc .ic svg { width: 22px; height: 22px; }
.tipc b { display: block; margin-bottom: 4px; font-size: 17px; }
.tipc p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* 봉인 */
.sealed { position: relative; border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: var(--radius); padding: 44px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; overflow: hidden; }
.sealed::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%); }
.sealed svg { width: 26px; height: 26px; color: var(--faint); }
.sealed b { font-family: var(--serif); font-size: 22px; color: var(--ink); }

/* 바닥글 */
.ftr { border-top: 1px solid var(--line-2); padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.ftr .wrap { display: grid; gap: 8px; }
.ftr .row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.ftr b { color: var(--ink); font-family: var(--serif); font-size: 17px; letter-spacing: 0.04em; }

/* 404 */
.nf { padding: 120px 0; text-align: center; display: grid; gap: 20px; justify-items: center; }

@media print { .hdr, .tabs-bottom, .next-band, .drawer, .drawer-backdrop, .btn, .gate, body::before { display: none !important; } body { background: #fff; color: #000; } }

/* ===== 세계관 3판 ===== */
.stage { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background-position: center; background-size: cover; isolation: isolate; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 9, 17, 0.82), rgba(6, 9, 17, 0.9)), radial-gradient(80% 80% at 30% 40%, rgba(96, 72, 178, 0.18), transparent 70%); }
.stage-in { padding: clamp(18px, 3vw, 36px); }
.stage.deep::before { background: linear-gradient(180deg, rgba(6, 9, 17, 0.9), rgba(6, 9, 17, 0.95)), radial-gradient(70% 70% at 30% 45%, rgba(96, 72, 178, 0.22), transparent 70%); }
.cosmos-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .cosmos-grid { grid-template-columns: 1.1fr 0.9fr; } }
.cosmos-svg { width: 100%; height: auto; display: block; font-family: var(--serif); }
.cosmos-svg .lb { fill: #EDE6D6; font-size: 17px; font-weight: 600; letter-spacing: 0.06em; }
.cosmos-svg .lb.small { font-size: 14px; }
.cosmos-svg .lb.dim { fill: #9AA3B8; font-size: 14px; }
.cosmos-svg .cons line { stroke: rgba(255, 213, 140, 0.35); stroke-width: 1; }
.cosmos-svg .route { fill: none; stroke: rgba(255, 213, 140, 0.35); stroke-width: 1.4; stroke-dasharray: 3 6; }
.cosmos-svg .wl { fill: #CFD6E4; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.cosmos-svg .ly { transition: opacity var(--t); }
.cosmos-svg.focus .ly { opacity: 0.28; }
.cosmos-svg.focus .ly.on { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 213, 140, 0.45)); }
.layers { display: grid; gap: 8px; }
.layer { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.03); cursor: pointer; transition: background var(--t), border-color var(--t); }
.layer:hover, .layer.on { background: rgba(240, 180, 90, 0.08); border-color: rgba(240, 180, 90, 0.45); }
.layer .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); color: var(--accent-2); }
.layer .ic svg { width: 20px; height: 20px; }
.layer b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 2px; }
.layer span span { color: var(--muted); font-size: 15px; line-height: 1.6; }

.chapter { position: relative; min-height: 300px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background-position: center; background-size: cover; display: flex; align-items: flex-end; isolation: isolate; }
.chapter::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 9, 17, 0.94) 0%, rgba(6, 9, 17, 0.72) 42%, rgba(6, 9, 17, 0.08) 78%), linear-gradient(0deg, rgba(6, 9, 17, 0.6), transparent 50%); }
.chapter.alt { justify-content: flex-end; }
.chapter.alt::before { background: linear-gradient(270deg, rgba(6, 9, 17, 0.94) 0%, rgba(6, 9, 17, 0.72) 42%, rgba(6, 9, 17, 0.08) 78%), linear-gradient(0deg, rgba(6, 9, 17, 0.6), transparent 50%); }
.chapter .ch-in { padding: clamp(22px, 3.4vw, 40px); max-width: 560px; display: grid; gap: 10px; }
.chapter h3 { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); letter-spacing: 0.04em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.chapter h3::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 12px; background: var(--card-color, var(--accent)); box-shadow: 0 0 12px var(--card-color, var(--accent)); }
.chapter .law { font-size: 18px; margin: 4px 0 0; color: #F1ECE2; }
.chapter .mood { font-family: var(--serif); font-size: 16.5px; color: #C9CFDC; margin: 0; }
.chapters { display: grid; gap: 18px; }
@media (max-width: 719px) { .chapter, .chapter.alt { justify-content: flex-start; min-height: 360px; } .chapter::before, .chapter.alt::before { background: linear-gradient(0deg, rgba(6, 9, 17, 0.96) 0%, rgba(6, 9, 17, 0.75) 50%, rgba(6, 9, 17, 0.1) 100%); } }
#seoul .chapter { margin-bottom: 22px; min-height: 340px; }

.tower { display: grid; gap: 18px; align-items: start; }
@media (min-width: 860px) { .tower { grid-template-columns: minmax(260px, 0.85fr) 1.15fr; } }
.tower-pic { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 520px; isolation: isolate; }
.tower-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.tower-pic::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 9, 17, 0.15), rgba(6, 9, 17, 0.55)), linear-gradient(0deg, rgba(6, 9, 17, 0.9), transparent 35%); }
.tower-pic .rail { position: absolute; top: 0; bottom: 0; right: 22px; width: 2px; background: linear-gradient(180deg, rgba(255, 213, 140, 0.1), rgba(255, 213, 140, 0.6), rgba(255, 213, 140, 0.1)); }
.tower-pic .mk { position: absolute; right: -10px; transform: translateY(-50%); white-space: nowrap; font-family: var(--mono); font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(6, 9, 17, 0.75); border: 1px solid rgba(255, 213, 140, 0.45); color: var(--accent-2); cursor: pointer; transition: background var(--t), color var(--t), box-shadow var(--t); }
.tower-pic .mk::before { content: ""; position: absolute; right: 100%; top: 50%; width: 40px; height: 1px; background: rgba(255, 213, 140, 0.35); }
.tower-pic .mk.on { background: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); }
.tower-cap { position: absolute; left: 20px; bottom: 18px; right: 90px; display: grid; gap: 4px; }
.tower-cap b { font-family: var(--serif); font-size: 26px; }
.tower-cap span { color: #CFD6E4; font-size: 14.5px; line-height: 1.6; }
.floors { display: grid; gap: 8px; }
.floor { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color var(--t), box-shadow var(--t), background var(--t); }
.floor .fl { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--accent-2); background: radial-gradient(circle at 50% 35%, #1D2544, #0B1022); border: 1px solid rgba(255, 213, 140, 0.35); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.floor:hover, .floor.on { border-color: rgba(240, 180, 90, 0.6); box-shadow: var(--glow); }
.floor.on .fl { background: var(--accent); color: var(--accent-ink); }
.floor .nm { font-weight: 600; font-size: 16.5px; }
.floor .tx { color: var(--muted); font-size: 15px; margin-top: 2px; line-height: 1.65; }
.floor .faces { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.floor .faces img, .floor .faces .l { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.22); display: grid; place-items: center; font-size: 12px; background: var(--panel-2); }
.tower-note { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 10px 14px; color: var(--muted); font-size: 14.5px; }

.mapwrap { margin-top: 28px; }
.map-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.map-head h3 { font-family: var(--serif); font-size: 22px; }
.map-head p { margin: 0; color: var(--muted); }
.map-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .map-grid { grid-template-columns: 1.25fr 0.75fr; } }
.map-pic { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(rgba(7,11,22,0.45), rgba(7,11,22,0.6)), url(../img/map/seoul_sky.webp) center / cover no-repeat, #070B16; }
.map-svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.map-svg .wall { fill: rgba(255, 213, 140, 0.04); stroke: #F0B45A; stroke-width: 2; stroke-dasharray: 7 6; filter: drop-shadow(0 0 6px rgba(240, 180, 90, 0.35)); }
.map-svg .river { fill: none; stroke: #5DA9E6; stroke-opacity: 0.55; stroke-width: 6; stroke-linecap: round; }
.map-svg .road { stroke: rgba(200, 210, 235, 0.22); stroke-width: 3; }
.map-svg .rd { fill: #8E98AE; font-size: 12px; }
.map-svg .rd.rv { fill: #7FB8E8; }
.map-svg .tw { fill: #FFD58C; font-size: 12.5px; font-weight: 600; }
.map-svg .mpin { cursor: pointer; }
.map-svg .mp { fill: #0B1022; stroke: rgba(255, 213, 140, 0.8); stroke-width: 1.6; transition: fill var(--t); }
.map-svg .mn { fill: #FFE7B0; font-size: 12px; font-weight: 700; pointer-events: none; }
.map-svg .mpin.on .mp, .map-svg .mpin:hover .mp { fill: #F0B45A; }
.map-svg .mpin.on .mn, .map-svg .mpin:hover .mn { fill: #1A1408; }
.map-svg .mpin:focus { outline: none; }
.map-svg .mpin:focus-visible .mp { stroke-width: 3; }
.wall-note { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--accent-2); background: rgba(6, 9, 17, 0.72); border: 1px solid rgba(240, 180, 90, 0.3); padding: 8px 12px; border-radius: 10px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 520px; overflow: auto; }
.legend li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; margin: 0; transition: background var(--t); }
.legend li.on { background: rgba(240, 180, 90, 0.1); }
.legend .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #0B1022; border: 1px solid rgba(255, 213, 140, 0.7); color: #FFE7B0; }
.legend li.on .n { background: var(--accent); color: var(--accent-ink); }
.legend b { display: block; font-size: 15.5px; }
.legend span span { color: var(--muted); font-size: 15px; line-height: 1.65; }

.net-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .net-grid { grid-template-columns: 1.1fr 0.9fr; } }
.net-svg { width: 100%; height: auto; display: block; font-family: var(--serif); }
.net-svg .route { stroke: rgba(255, 213, 140, 0.55); stroke-width: 1.4; stroke-dasharray: 4 7; animation: flow 14s linear infinite; }
.net-svg .wn { fill: #EDE6D6; font-size: 15px; font-weight: 600; }
@keyframes flow { to { stroke-dashoffset: -220; } }
.lead-big { font-size: 19px; line-height: 1.7; }
.halves { display: grid; gap: 18px; }
@media (min-width: 760px) { .halves { grid-template-columns: 1fr 1fr; } }
.half { position: relative; min-height: 320px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background-position: center; background-size: cover; display: flex; align-items: flex-end; isolation: isolate; }
.half::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(6, 9, 17, 0.95) 0%, rgba(6, 9, 17, 0.6) 45%, rgba(6, 9, 17, 0.1) 100%); }
.half .ch-in { padding: 24px; display: grid; gap: 8px; }
.half h3 { font-family: var(--serif); font-size: 30px; }
.half .law { margin: 0; font-size: 17px; }
.half .mood { margin: 0; font-family: var(--serif); color: #C9CFDC; }

/* ===== 규칙 3판 ===== */
.bond { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: clamp(18px, 3vw, 32px); border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(70% 120% at 0% 50%, rgba(240, 180, 90, 0.1), transparent 60%), radial-gradient(70% 120% at 100% 50%, rgba(120, 150, 230, 0.1), transparent 60%), var(--panel); }
.bond .node { display: grid; justify-items: center; gap: 10px; min-width: 96px; }
.bond .node b { font-family: var(--serif); font-size: 19px; }
.bond .orb { width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle, #FFF6DD 0%, #F0B45A 38%, rgba(240, 180, 90, 0) 72%); box-shadow: 0 0 40px rgba(255, 213, 140, 0.55); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(255, 213, 140, 0.75); } }
.bond .ava { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #26304F, #0E1428); border: 1px solid rgba(160, 180, 240, 0.4); color: #CFD8F0; }
.bond .ava svg { width: 34px; height: 34px; }
.bond .flows { display: grid; gap: 18px; }
.bond .flow { display: grid; gap: 8px; }
.bond .flow .arrow { position: relative; height: 2px; background: linear-gradient(90deg, rgba(255, 213, 140, 0.9), rgba(255, 213, 140, 0.2)); }
.bond .flow .arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border-left: 10px solid rgba(255, 213, 140, 0.4); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.bond .flow.back .arrow { background: linear-gradient(270deg, rgba(160, 180, 240, 0.9), rgba(160, 180, 240, 0.2)); }
.bond .flow.back .arrow::after { right: auto; left: -2px; border-left: 0; border-right: 10px solid rgba(160, 180, 240, 0.6); }
.bond .flow.back .tags { justify-content: flex-end; }
@media (max-width: 639px) { .bond { grid-template-columns: 1fr; justify-items: center; text-align: center; } .bond .flows { width: 100%; } .bond .flow .tags, .bond .flow.back .tags { justify-content: center; } }
.bond-note { margin: 16px 0 0; color: var(--muted); font-size: 16.5px; }
.memory { display: grid; justify-items: center; gap: 10px; }
.memory-line { margin: 0; text-align: center; font-family: var(--serif); font-size: 17px; color: var(--accent-2); max-width: 20em; }
.hud { display: grid; gap: 16px; }
@media (min-width: 760px) { .hud { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--panel); }
.stat .top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--accent-2); }
.stat .ic svg { width: 20px; height: 20px; }
.stat .top b { font-family: var(--serif); font-size: 20px; }
.stat .val { margin-left: auto; font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--accent-2); text-shadow: 0 0 16px rgba(255, 213, 140, 0.45); }
.stat .bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9AA9D8, #E6ECFF); }
.stat.gold .bar i { background: linear-gradient(90deg, #E9A947, #FFE2A6); box-shadow: 0 0 14px rgba(255, 213, 140, 0.6); }
.stat.risk .bar i { background: linear-gradient(90deg, #E0705A, #F0B45A); }
.stat p { margin: 14px 0 0; color: var(--muted); font-size: 15.5px; }
.acts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.act { display: grid; gap: 12px; justify-items: start; align-content: start; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.act .ic { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(240, 180, 90, 0.1); color: var(--accent-2); }
.act .ic svg { width: 24px; height: 24px; }
.act span { font-size: 15.5px; line-height: 1.6; }
.act.no { border-color: rgba(224, 112, 90, 0.35); background: linear-gradient(180deg, rgba(224, 112, 90, 0.06), transparent), var(--panel); }
.act.no .ic { background: rgba(224, 112, 90, 0.1); color: #F2A08F; }
.act.no .ic::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2.5px; background: var(--seal); transform: rotate(-35deg); border-radius: 2px; box-shadow: 0 0 0 2px #10162A; }
.act.no span { color: #E8C9C2; }
.ranks-cards { display: grid; gap: 10px; }
.rc { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.rc .star { height: 44px; display: grid; place-items: center; }
.rc .star i { display: block; width: var(--s, 16px); height: var(--s, 16px); border-radius: 50%; background: radial-gradient(circle, #FFF6DD 0%, var(--accent) 45%, rgba(240, 180, 90, 0) 72%); box-shadow: 0 0 var(--g, 10px) rgba(255, 213, 140, var(--o, 0.6)); }
.rc b { font-family: var(--serif); font-size: 17px; }
.rc p { margin: 2px 0 0; font-size: 15px; }
.rc .cost { color: var(--muted); font-size: 14px; }
.hk { display: grid; gap: 10px; }
.hk-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.hk-row .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); color: #CFD8F0; }
.hk-row .ic svg { width: 20px; height: 20px; }

.tl .line.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-align: left; cursor: pointer; width: 100%; font: inherit; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.tl .line.clamp.open { -webkit-line-clamp: unset; display: block; }

@media (max-width: 899px) { .wall-note { position: static; margin: 0 12px 12px; } .legend { max-height: none; } }

/* 시간표 세로판 (2026-11-03): 공지 전문을 한 줄 36자 안팎으로 읽게 한다 */
.sched { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; max-width: 900px; }
.sched::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 18px; width: 2px; background: linear-gradient(180deg, var(--line), var(--accent) 22%, var(--line) 40%); }
.sched li { position: relative; display: grid; grid-template-columns: 12.5em 1fr; gap: 2px 24px; padding: 0 0 26px; margin: 0; }
.sched li::before { content: ""; position: absolute; left: -28px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.sched li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px rgba(240, 180, 90, 0.7); }
.sched li.now .name { color: var(--accent-2); }
.sched .when { font-family: var(--mono); font-size: 14.5px; color: var(--muted); padding-top: 2px; }
.sched .name { font-weight: 600; font-size: 18px; line-height: 1.5; }
.sched .sline { margin-top: 10px; font-family: var(--mono); font-size: 15px; line-height: 1.75; color: var(--notice-ink); background: var(--notice-bg); border: 1px solid rgba(90, 122, 148, 0.4); border-left: 3px solid rgba(140, 180, 220, 0.6); padding: 12px 16px; border-radius: var(--radius-s); max-width: 36em; }
@media (max-width: 720px) { .sched li { grid-template-columns: 1fr; } .sched .when { font-size: 14px; } }

/* 개연성 비용 막대 (2026-11-03) */
.costs { display: grid; gap: 8px; margin: 12px 0 14px; }
.cost-row { display: grid; grid-template-columns: 6.4em 1fr auto; align-items: center; gap: 10px; font-size: 14.5px; }
.cost-row .k { color: var(--ink); white-space: nowrap; }
.cost-row .u { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.cost-row .cbar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.cost-row .cbar i { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, #E0705A, #F0B45A); }
@media (max-width: 520px) { .cost-row { grid-template-columns: 6.4em 1fr; row-gap: 2px; } .cost-row .u { grid-column: 2; } }

.lead-line { margin: -6px 0 24px; max-width: 40em; color: var(--ink); }

.stat .val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-right: 6px; letter-spacing: 0; }
.special-text { margin: 0 0 22px; max-width: 44em; }

.group-head .gline { flex-basis: 100%; margin: 2px 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.rc .lbl { display: inline-block; min-width: 3.4em; margin-right: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-2); }
.rc .cost .lbl { color: #E79A86; }
.related-wrap { margin-top: 18px; }
.related-k { font-size: 13px; color: var(--faint); margin-bottom: 8px; }
.sealed .tag { margin-top: -2px; }

.rc p { display: grid; grid-template-columns: 6.6em 1fr; column-gap: 8px; align-items: baseline; }
.rc .lbl { min-width: 0; margin-right: 0; }

/* 줄바꿈 다듬기 (2026-11-03): 문단은 끝줄에 한 낱말만 남지 않게, 짧은 글은 줄 길이를 고르게 */
p, li, dd, .bubble, .excerpt p, .excerpt div, .tx, .profile p, .law, .mood, .lead-line, .gline, .sline, .cost-row .k { text-wrap: pretty; }
h1, h2, h3, h4, .t, .s, .name, .tag, .chip, .fpill, .pcard .role, .notif .msg, .tip, .bond-note, .memory-line, .rung .can, .rc .tx { text-wrap: balance; }
.bubble { line-height: 1.7; }

/* 시작 웹툰 (2026-11-03) */
.prologue .wt { max-width: 800px; margin: 0 auto; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.prologue .wt img { display: block; width: 100%; height: auto; }

/* 성단 표시(11-04) */
.pcard .cl-tag { display: inline-block; font-size: 11.5px; line-height: 1.4; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--cl); color: var(--cl); margin-bottom: 6px; background: rgba(6, 9, 17, 0.4); }
.cluster .members { position: relative; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.oc-head { margin: 28px 0 12px; font-size: 18px; }
.origin-clusters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.oc { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--card-color); border-radius: var(--radius); padding: 14px 16px; }
.oc b { display: block; margin-bottom: 10px; color: var(--card-color); }
.oc .members { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-head { margin: 56px 0 8px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 30px; }

/* ---------- 살아 있는 층(11-04, js/live.js): 배경 별하늘, 떠오르기, 숨 쉬는 별, 성좌 메시지 ---------- */
body { background: transparent; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.js-rv .rv { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) var(--rvd, 0ms), transform 0.8s var(--ease) var(--rvd, 0ms); }
.js-rv .rv.in { opacity: 1; transform: none; }
.hero-full::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.7;
  background-image: radial-gradient(1.6px 1.6px at 12% 22%, rgba(255, 228, 180, 0.95), transparent 60%), radial-gradient(1.2px 1.2px at 64% 38%, rgba(220, 230, 255, 0.85), transparent 60%),
    radial-gradient(1.4px 1.4px at 38% 74%, rgba(255, 236, 200, 0.8), transparent 60%), radial-gradient(1px 1px at 86% 12%, rgba(230, 236, 255, 0.9), transparent 60%),
    radial-gradient(1.3px 1.3px at 76% 82%, rgba(255, 222, 170, 0.8), transparent 60%), radial-gradient(1px 1px at 24% 56%, rgba(220, 230, 255, 0.75), transparent 60%);
  background-size: 360px 360px; animation: motes 38s linear infinite; }
@keyframes motes { to { background-position: 0 -360px; } }
.rung .star i { animation: twinkle 4.4s ease-in-out infinite; }
.rung:nth-child(2n) .star i { animation-delay: -1.4s; } .rung:nth-child(3n) .star i { animation-delay: -2.9s; }
@keyframes twinkle { 50% { transform: scale(1.14); filter: brightness(1.3); } }
.cluster { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.cluster:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--card-color, var(--accent)), 0 12px 40px rgba(0, 0, 0, 0.35); }
.face-chip { transition: transform var(--t) var(--ease); } .face-chip:hover { transform: translateY(-2px); }
.star-msg { position: fixed; left: 20px; bottom: 24px; z-index: 60; max-width: min(380px, calc(100vw - 40px)); padding: 13px 18px; cursor: pointer;
  font-size: 14.5px; line-height: 1.6; color: #E2E8F6; background: linear-gradient(180deg, rgba(22, 20, 44, 0.94), rgba(8, 8, 22, 0.96)); border: 1px solid rgba(196, 176, 128, 0.75);
  box-shadow: 0 0 22px rgba(255, 205, 120, 0.2), 0 10px 30px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(14px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.star-msg.on { opacity: 1; transform: none; }
.star-msg b { color: #FFD480; font-weight: 700; }
.star-msg::before { content: ""; position: absolute; inset: -5px; pointer-events: none; --cc: rgba(255, 226, 160, 0.95);
  background: linear-gradient(var(--cc), var(--cc)) left top / 14px 2px no-repeat, linear-gradient(var(--cc), var(--cc)) left top / 2px 14px no-repeat,
    linear-gradient(var(--cc), var(--cc)) right top / 14px 2px no-repeat, linear-gradient(var(--cc), var(--cc)) right top / 2px 14px no-repeat,
    linear-gradient(var(--cc), var(--cc)) left bottom / 14px 2px no-repeat, linear-gradient(var(--cc), var(--cc)) left bottom / 2px 14px no-repeat,
    linear-gradient(var(--cc), var(--cc)) right bottom / 14px 2px no-repeat, linear-gradient(var(--cc), var(--cc)) right bottom / 2px 14px no-repeat; }
@media (max-width: 1023px) { .star-msg { left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); } }
