@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Noto+Serif+KR:wght@300;400;700&display=swap');

:root {
    --bg: #050a15;
    --bg-raised: rgba(10, 25, 49, 0.74);
    --bg-soft: rgba(17, 26, 46, 0.64);
    --line: #2a3b5c;
    --line-bright: rgba(244, 236, 208, 0.52);
    --text: #e0e6ed;
    --soft: #c5d0e6;
    --muted: #8c9baf;
    --blue: #4facfe;
    --ivory: #f4ecd0;
    --ivory-dim: #d8cfa8;
    --ember: #c84656;
    --ember-deep: #5d1724;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Noto Serif KR', serif;
    line-height: 1.7;
    overflow-x: hidden;
}

body.opening-lock {
    overflow: hidden;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-aura,
.starfield,
.ember-line {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.site-aura {
    z-index: -3;
    background:
        radial-gradient(circle at 50% 18%, rgba(79, 172, 254, 0.17), transparent 34rem),
        radial-gradient(circle at 82% 20%, rgba(244, 236, 208, 0.07), transparent 26rem),
        radial-gradient(circle at 18% 82%, rgba(200, 70, 86, 0.18), transparent 24rem),
        linear-gradient(180deg, #0a1931 0%, #050a15 52%, #030711 100%);
}

.starfield {
    /* 별빛 → 떨어지는 재 입자. 청색 별 제거, 흰 불꽃과 바랜 잉크 톤만 남김 */
    z-index: -2;
    opacity: 0.45;
    background-image:
        radial-gradient(1px 1px at 20px 30px, var(--ivory), transparent),
        radial-gradient(1px 1px at 70px 130px, var(--ivory-dim), transparent),
        radial-gradient(1.4px 1.4px at 140px 70px, rgba(244, 236, 208, 0.7), transparent),
        radial-gradient(1px 1px at 210px 180px, var(--ivory-dim), transparent);
    background-size: 320px 320px;
    animation: ashFall 38s linear infinite;
}

.ember-line {
    z-index: -1;
    opacity: 0.24;
    background:
        linear-gradient(115deg, transparent 0 44%, rgba(244, 236, 208, 0.16) 44.2% 44.6%, transparent 44.8%),
        linear-gradient(24deg, transparent 0 64%, rgba(200, 70, 86, 0.20) 64.1% 64.35%, transparent 64.6%);
}

@keyframes starPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.55; }
}

/* 떨어지는 재 — starfield용 */
@keyframes ashFall {
    from { background-position: 0 0; }
    to   { background-position: -120px 540px; }
}

.opening-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(244, 236, 208, 0.12), transparent 18rem),
        radial-gradient(circle at 50% 80%, rgba(200, 70, 86, 0.16), transparent 22rem),
        #030711;
    color: var(--ivory);
}

.opening-overlay[hidden] {
    display: none;
}

.opening-overlay.is-closing {
    animation: openingFadeOut 720ms ease forwards;
}

.opening-gate {
    position: absolute;
    inset: 0;
    width: 50.5%;
    background:
        linear-gradient(90deg, rgba(244, 236, 208, 0.05), transparent 18%),
        linear-gradient(180deg, #071121 0%, #030711 100%);
    box-shadow: inset 0 0 0 1px rgba(244, 236, 208, 0.06);
    animation-duration: 1100ms;
    animation-delay: 2100ms;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(.7, 0, .18, 1);
}

.opening-gate-left {
    left: 0;
    transform-origin: left center;
    animation-name: gateLeftOpen;
}

.opening-gate-right {
    right: 0;
    transform-origin: right center;
    animation-name: gateRightOpen;
}

.opening-core {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(86vw, 680px);
    min-height: 420px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    animation: openingCoreIn 900ms ease 180ms forwards, openingCoreLift 900ms ease 2020ms forwards;
}

.opening-ring {
    position: absolute;
    width: clamp(210px, 48vw, 360px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        conic-gradient(from 24deg, transparent 0 16%, rgba(244, 236, 208, 0.92) 18%, transparent 20% 46%, rgba(200, 70, 86, 0.92) 48%, transparent 51% 100%);
    -webkit-mask: radial-gradient(circle, transparent 0 61%, #000 62% 66%, transparent 67%);
    mask: radial-gradient(circle, transparent 0 61%, #000 62% 66%, transparent 67%);
    filter: drop-shadow(0 0 28px rgba(244, 236, 208, 0.24));
    animation: ringTurn 2200ms cubic-bezier(.2, .7, .2, 1) forwards;
}

.opening-ring::after {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    border: 1px solid rgba(244, 236, 208, 0.26);
    box-shadow: inset 0 0 24px rgba(244, 236, 208, 0.1);
}

.opening-flame {
    width: 54px;
    height: 82px;
    margin-bottom: 28px;
    border-radius: 80% 20% 62% 38% / 72% 32% 68% 28%;
    background:
        radial-gradient(circle at 48% 70%, rgba(255, 255, 255, 0.95), rgba(244, 236, 208, 0.85) 28%, transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 236, 208, 0.82) 46%, rgba(200, 70, 86, 0.68));
    filter: drop-shadow(0 0 22px rgba(244, 236, 208, 0.65));
    transform: rotate(45deg) scale(0.72);
    animation: flameWake 1100ms ease 520ms forwards, flameFlicker 720ms ease-in-out 1550ms infinite alternate;
}

.opening-mark,
.opening-sub {
    margin: 0;
    font-family: 'Cinzel', serif;
    color: var(--ivory-dim);
    font-size: clamp(0.72rem, 2.8vw, 0.88rem);
    letter-spacing: 0.28em;
}

.opening-core h2 {
    max-width: 92vw;
    margin: 14px 0;
    color: var(--ivory);
    font-size: clamp(1.55rem, 6vw, 3.4rem);
    line-height: 1.25;
    text-shadow: 0 0 30px rgba(244, 236, 208, 0.34);
}

.opening-sub {
    color: rgba(140, 155, 175, 0.94);
    font-size: clamp(0.68rem, 2.5vw, 0.78rem);
    font-family: 'Noto Serif KR', serif;
    letter-spacing: 0.08em;
}

.opening-skip {
    position: absolute;
    right: clamp(16px, 4vw, 34px);
    bottom: clamp(16px, 4vw, 34px);
    z-index: 2;
    border: 1px solid rgba(244, 236, 208, 0.28);
    border-radius: 999px;
    background: rgba(5, 10, 21, 0.55);
    color: var(--muted);
    padding: 8px 14px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.opening-skip:hover,
.opening-skip:focus-visible {
    outline: 0;
    color: var(--ivory);
    border-color: var(--ivory);
    box-shadow: 0 0 18px rgba(244, 236, 208, 0.18);
}

@keyframes openingCoreIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes openingCoreLift {
    to {
        opacity: 0;
        transform: translateY(-18px) scale(0.98);
    }
}

@keyframes ringTurn {
    0% { transform: rotate(-42deg) scale(0.84); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: rotate(320deg) scale(1); opacity: 0.74; }
}

@keyframes flameWake {
    0% { opacity: 0; transform: rotate(45deg) scale(0.42); }
    100% { opacity: 1; transform: rotate(45deg) scale(1); }
}

@keyframes flameFlicker {
    from { filter: drop-shadow(0 0 18px rgba(244, 236, 208, 0.55)); }
    to { filter: drop-shadow(0 0 34px rgba(244, 236, 208, 0.82)); }
}

@keyframes gateLeftOpen {
    to { transform: translateX(-104%) skewX(-4deg); }
}

@keyframes gateRightOpen {
    to { transform: translateX(104%) skewX(4deg); }
}

@keyframes openingFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opening-core,
    .opening-ring,
    .opening-flame,
    .opening-gate {
        animation-duration: 1ms;
        animation-delay: 0ms;
    }
}

.archive-header {
    position: relative;
    width: min(94vw, 1160px);
    margin: 0 auto;
    padding: clamp(28px, 7vw, 72px) 0 18px;
    text-align: center;
}

.back-link {
    position: fixed;
    left: clamp(14px, 3vw, 28px);
    top: clamp(14px, 3vw, 28px);
    z-index: 30;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(244, 236, 208, 0.24);
    border-radius: 999px;
    background: rgba(5, 10, 21, 0.72);
    backdrop-filter: blur(12px);
    color: var(--muted);
    text-decoration: none;
    font-size: 1.35rem;
    line-height: 1;
    transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.back-link::before {
    content: none;
}

.back-link:hover,
.back-link:focus-visible {
    outline: 0;
    color: var(--ivory);
    border-color: rgba(244, 236, 208, 0.6);
    box-shadow: 0 0 22px rgba(244, 236, 208, 0.18);
    transform: translateX(-2px);
}

.archive-mark {
    margin: 0 0 12px;
    color: var(--ivory-dim);
    font-family: 'Cinzel', serif;
    font-size: clamp(0.68rem, 2.5vw, 0.78rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.archive-header h1 {
    margin: 0;
    color: var(--ivory);
    font-size: clamp(1.85rem, 6.2vw, 3.3rem);
    line-height: 1.24;
    font-weight: 700;
    text-shadow: 0 0 28px rgba(244, 236, 208, 0.26);
}

.archive-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-family: 'Cinzel', serif;
    font-size: clamp(0.72rem, 2.8vw, 0.95rem);
    letter-spacing: 0.2em;
}

.origin-glint {
    position: absolute;
    right: clamp(8px, 5vw, 54px);
    top: clamp(46px, 7vw, 82px);
    width: 18px;
    height: 18px;
    border: 1px solid rgba(244, 236, 208, 0.22);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 12%, rgba(244, 236, 208, 0.42) 13% 30%, transparent 32%),
        rgba(5, 10, 21, 0.28);
    opacity: 0.46;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(244, 236, 208, 0.12);
    transition: opacity 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.origin-glint::after {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: inherit;
    border: 1px solid rgba(200, 70, 86, 0.12);
}

.origin-glint:hover,
.origin-glint:focus-visible {
    outline: 0;
    opacity: 0.9;
    border-color: rgba(244, 236, 208, 0.7);
    box-shadow: 0 0 24px rgba(244, 236, 208, 0.28), 0 0 42px rgba(200, 70, 86, 0.16);
    transform: scale(1.08);
}

.tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    width: min(94vw, 1160px);
    margin: 14px auto 0;
    padding: 10px 8px 0;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 10, 21, 0.86);
    backdrop-filter: blur(14px);
}

.tab-btn {
    position: relative;
    min-width: 76px;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 11px 15px 13px;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: color 160ms ease;
}

.tab-btn:hover {
    color: var(--soft);
}

.tab-btn.active {
    color: var(--ivory);
    font-weight: 700;
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ivory), transparent);
    box-shadow: 0 0 14px rgba(244, 236, 208, 0.55);
}

.page-shell {
    width: min(94vw, 1160px);
    margin: 32px auto 0;
    padding-bottom: 76px;
}

.tab-panel {
    animation: panelFade 360ms ease both;
}

@keyframes panelFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cover-hero {
    position: relative;
    min-height: clamp(560px, 70vh, 760px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(10, 25, 49, 0.78), rgba(3, 7, 17, 0.9));
    box-shadow: var(--shadow);
}

.cover-hero.poster-hero {
    min-height: 0;
    aspect-ratio: 1942 / 809;
    background: #030711;
}

.cover-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: contrast(1.02) saturate(0.98);
}

.cover-underbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
    border: 1px solid rgba(244, 236, 208, 0.2);
    border-radius: 8px;
    padding: 14px clamp(16px, 3vw, 24px);
    background:
        linear-gradient(90deg, rgba(244, 236, 208, 0.06), transparent 48%, rgba(200, 70, 86, 0.07)),
        rgba(5, 10, 21, 0.68);
}

.cover-underbar p {
    margin: 0;
    color: var(--soft);
}

.cover-art {
    position: absolute;
    inset: auto -3% 0 auto;
    width: min(62vw, 610px);
    height: min(76vh, 720px);
    object-fit: contain;
    object-position: right bottom;
    opacity: 0.78;
    filter: saturate(0.92) contrast(1.04) drop-shadow(-24px 0 70px rgba(244, 236, 208, 0.12));
}

.cover-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 10, 21, 0.94) 0%, rgba(5, 10, 21, 0.78) 46%, rgba(5, 10, 21, 0.28) 100%),
        radial-gradient(circle at 78% 42%, rgba(244, 236, 208, 0.14), transparent 24rem);
}

.cover-copy {
    position: relative;
    z-index: 1;
    width: min(680px, 92%);
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 6vw, 72px);
}

.cover-stamp {
    width: fit-content;
    margin: 0 0 22px;
    padding: 4px 12px;
    border: 1px solid rgba(200, 70, 86, 0.82);
    color: #f0a3ad;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: rgba(93, 23, 36, 0.18);
}

.cover-copy h2 {
    margin: 0;
    color: var(--ivory);
    font-size: clamp(2.15rem, 7vw, 5.1rem);
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: 0 0 30px rgba(244, 236, 208, 0.28);
}

.cover-lead {
    max-width: 660px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 3vw, 1.22rem);
}

.cover-letter {
    max-width: 620px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.cover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.primary-action,
.ghost-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 4px;
    padding: 10px 20px;
    text-decoration: none;
    cursor: pointer;
}

.primary-action {
    border: 1px solid var(--ivory);
    background: rgba(244, 236, 208, 0.08);
    color: var(--ivory);
    box-shadow: 0 0 22px rgba(244, 236, 208, 0.14);
}

.ghost-action {
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(10, 25, 49, 0.44);
}

.primary-action:hover,
.ghost-action:hover {
    border-color: var(--ivory);
    color: var(--ivory);
}

.section-heading {
    margin: 0 auto 28px;
    text-align: center;
}

.section-heading span {
    display: block;
    color: var(--ivory-dim);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: clamp(1.45rem, 4vw, 2.05rem);
    line-height: 1.35;
}

.section-heading p {
    max-width: 760px;
    margin: 12px auto 0;
    color: var(--muted);
}

.info-grid,
.character-grid,
.locked-grid {
    display: grid;
    gap: 18px;
}

.info-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.locked-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.theme-panel,
.faction-card,
.timeline-card,
.character-card,
.locked-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.info-card,
.theme-panel,
.faction-card,
.timeline-card,
.locked-card {
    padding: clamp(18px, 3vw, 28px);
}

.info-card h3,
.theme-panel h3,
.faction-card h3,
.timeline-card h3 {
    margin: 0 0 14px;
    color: var(--ivory);
    font-size: 1.1rem;
}

.clean-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--soft);
}

.clean-list li {
    position: relative;
    padding-left: 18px;
}

.clean-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.78em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--ivory);
    box-shadow: 0 0 12px rgba(244, 236, 208, 0.7);
}

.theme-panel {
    margin-top: 18px;
    border-color: rgba(244, 236, 208, 0.28);
    background:
        linear-gradient(135deg, rgba(244, 236, 208, 0.08), transparent 48%),
        var(--bg-soft);
}

.theme-panel p {
    margin: 0;
    color: var(--soft);
}

.keyword-band {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.keyword-band span,
.tag-list li,
.webtoon-meta span {
    border: 1px solid rgba(244, 236, 208, 0.28);
    border-radius: 999px;
    background: rgba(244, 236, 208, 0.06);
    color: var(--ivory-dim);
    padding: 6px 11px;
    font-size: 0.82rem;
}

.faction-card {
    position: relative;
    overflow: hidden;
}

.faction-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

.faction-card.demon-side::before {
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
}

.faction-label {
    margin: 0 0 4px;
    color: var(--muted);
    font-family: 'Cinzel', serif;
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.definition-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.definition-list dt {
    color: var(--soft);
    font-weight: 700;
}

.definition-list dd {
    margin: 0 0 8px;
    color: var(--muted);
}

.world-map {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(90px, 0.7fr) 1fr minmax(90px, 0.7fr) 1fr;
    align-items: center;
    gap: 8px;
    min-height: 170px;
    margin: 20px 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 52%, rgba(244, 236, 208,0.16), transparent 10rem),
        radial-gradient(circle at 82% 50%, rgba(200, 70, 86, 0.16), transparent 10rem),
        rgba(3, 7, 17, 0.44);
}

.map-node {
    display: grid;
    place-items: center;
    min-height: 74px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--soft);
    text-align: center;
    background: rgba(10, 25, 49, 0.72);
}

.map-node.human {
    border-color: rgba(244, 236, 208,0.46);
}

.map-node.frontier {
    border-color: rgba(244, 236, 208, 0.38);
}

.map-node.demon {
    border-color: rgba(200, 70, 86, 0.54);
}

.map-road {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ivory), transparent);
}

.map-road.red {
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
}

.timeline-card {
    margin-top: 20px;
}

.timeline {
    display: grid;
    gap: 8px;
}

.day-row {
    display: grid;
    grid-template-columns: 84px 120px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(61, 52, 42,0.72);
}

.day-row:last-child {
    border-bottom: 0;
}

.day-row span {
    color: var(--ivory);
    font-family: 'Cinzel', serif;
}

.day-row strong {
    color: var(--soft);
}

.day-row p {
    margin: 0;
    color: var(--muted);
}

.day-row.final strong {
    color: var(--ivory);
}

.elzeria-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(18px, 4vw, 34px);
    align-items: stretch;
    margin-bottom: 28px;
    border: 1px solid rgba(244, 236, 208, 0.34);
    border-radius: 8px;
    background:
        radial-gradient(circle at 22% 24%, rgba(244, 236, 208, 0.14), transparent 16rem),
        linear-gradient(135deg, rgba(10, 25, 49, 0.86), rgba(3, 7, 17, 0.78));
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.elzeria-card:hover,
.elzeria-card:focus-visible,
.elzeria-card.is-lit {
    outline: 0;
    border-color: var(--ivory);
    box-shadow: 0 0 0 1px rgba(244, 236, 208, 0.18), 0 26px 90px rgba(244, 236, 208, 0.13);
    transform: translateY(-2px);
}

.elzeria-image-wrap {
    min-height: 500px;
    background:
        linear-gradient(180deg, rgba(244, 236, 208, 0.08), rgba(5, 10, 21, 0.42)),
        rgba(3, 7, 17, 0.56);
}

.elzeria-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.elzeria-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(22px, 4vw, 40px) clamp(20px, 4vw, 44px) clamp(26px, 5vw, 48px) 0;
}

.card-kicker {
    margin: 0 0 8px;
    color: var(--ivory-dim);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.elzeria-copy h3,
.character-body h4,
.locked-card h4 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.2rem, 3vw, 1.72rem);
    line-height: 1.28;
}

.elzeria-copy p {
    color: var(--soft);
}

.card-copy {
    margin: 10px 0 12px;
    color: var(--ivory);
    font-weight: 700;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.teaser {
    margin: 18px 0 0;
    color: var(--ivory-dim);
    font-style: italic;
}

.group-title {
    margin: 34px 0 14px;
    color: var(--ivory);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.character-card {
    overflow: hidden;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.character-card:hover,
.character-card:focus-visible {
    outline: 0;
    transform: translateY(-3px);
    border-color: rgba(244, 236, 208, 0.62);
    box-shadow: 0 18px 60px rgba(244, 236, 208, 0.10);
}

.character-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    background: rgba(3, 7, 17, 0.8);
}

.character-card.veiled img {
    filter: saturate(0.82) contrast(0.95);
}

.character-body {
    padding: 18px;
}

.character-body p {
    color: var(--muted);
}

.locked-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(10, 25, 49, 0.72), rgba(3, 7, 17, 0.84)),
        repeating-linear-gradient(135deg, transparent 0 18px, rgba(244, 236, 208, 0.04) 18px 20px);
}

.locked-card::before {
    content: "?";
    position: absolute;
    right: 18px;
    bottom: -18px;
    color: rgba(244, 236, 208, 0.08);
    font-family: 'Cinzel', serif;
    font-size: 8rem;
    line-height: 1;
}

.lock-mark {
    display: inline-flex;
    margin-bottom: 18px;
    border: 1px solid rgba(200, 70, 86, 0.5);
    color: #f0a3ad;
    padding: 3px 9px;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
}

.locked-card p {
    position: relative;
    margin: 14px 0 0;
    color: var(--muted);
}

.map-workbench {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.5fr) minmax(260px, 0.82fr);
    gap: 18px;
    align-items: stretch;
    margin-top: 20px;
}

.map-copy,
.map-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.map-copy,
.map-detail {
    padding: clamp(18px, 3vw, 26px);
}

.map-copy h3 {
    margin: 0 0 12px;
    color: var(--ivory);
}

.map-copy p,
.map-detail p {
    margin: 0;
    color: var(--muted);
}

.realm-map {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(3, 7, 17, 0.78);
    box-shadow: var(--shadow);
}

.map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-pin {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    border: 1px solid rgba(244, 236, 208, 0.35);
    border-radius: 999px;
    background: rgba(5, 10, 21, 0.78);
    color: var(--soft);
    cursor: pointer;
    box-shadow: 0 0 0 8px rgba(244, 236, 208, 0.03);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.map-pin::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 18px currentColor;
}

.map-pin span {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: max-content;
    border: 1px solid rgba(42, 59, 92, 0.9);
    border-radius: 4px;
    background: rgba(5, 10, 21, 0.88);
    padding: 3px 8px;
    color: var(--muted);
    font-size: 0.78rem;
    pointer-events: none;
}

.map-pin.human {
    color: var(--blue);
}

.map-pin.frontier {
    color: var(--ivory);
}

.map-pin.demon {
    color: var(--ember);
}

.map-pin:hover,
.map-pin:focus-visible,
.map-pin.active {
    outline: 0;
    z-index: 2;
    transform: translate(-50%, -50%) scale(1.08);
    border-color: var(--ivory);
    box-shadow: 0 0 0 10px rgba(244, 236, 208, 0.07), 0 0 28px rgba(244, 236, 208, 0.18);
}

.map-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-kicker {
    margin: 0 0 8px;
    color: var(--ivory-dim);
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.map-detail h4 {
    margin: 0 0 10px;
    color: var(--ivory);
    font-size: 1.25rem;
}

.map-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.map-tags li {
    border: 1px solid rgba(244, 236, 208, 0.28);
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--ivory-dim);
    font-size: 0.78rem;
}

.character-modal[hidden] {
    display: none;
}

.character-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(2, 5, 10, 0.76);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
    width: min(920px, 100%);
    max-height: min(780px, 88vh);
    overflow: hidden;
    border: 1px solid rgba(244, 236, 208, 0.5);
    border-radius: 8px;
    background:
        radial-gradient(circle at 12% 12%, rgba(244, 236, 208, 0.08), transparent 18rem),
        var(--bg);
    box-shadow: 0 36px 120px rgba(0, 0, 0, 0.66);
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(244, 236, 208, 0.34);
    border-radius: 999px;
    background: rgba(5, 10, 21, 0.82);
    color: var(--ivory);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.modal-image-wrap {
    min-height: 520px;
    background: rgba(3, 7, 17, 0.74);
}

.modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.modal-copy {
    overflow-y: auto;
    padding: clamp(24px, 4vw, 44px);
}

.modal-copy h3 {
    margin: 0;
    color: var(--ivory);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.modal-copy p {
    color: var(--soft);
}

body.modal-open {
    overflow: hidden;
}

.webtoon-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.webtoon-strip {
    display: grid;
    gap: 16px;
    width: min(760px, 100%);
    margin: 0 auto;
}

.webtoon-flow {
    gap: 0;
    width: min(820px, 100%);
    overflow: hidden;
    border: 1px solid rgba(244, 236, 208, 0.18);
    border-radius: 8px;
    background: #030711;
    box-shadow: var(--shadow);
}

.webtoon-panel {
    width: 100%;
    margin: 0;
    background: #030711;
}

.webtoon-cut {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(3, 7, 17, 0.6);
}

.webtoon-cut img {
    width: 100%;
    min-height: 360px;
    object-fit: cover;
    background: rgba(3, 7, 17, 0.92);
}

.webtoon-cut.tall img {
    min-height: 560px;
}

.webtoon-cut figcaption {
    padding: 12px 16px;
    color: var(--muted);
    font-size: 0.88rem;
}

.link-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.link-list span,
.link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 14px;
    background: rgba(5, 10, 21, 0.36);
    color: var(--soft);
    text-decoration: none;
}

.link-list em {
    color: var(--muted);
    font-style: normal;
}

.link-list a:hover {
    border-color: var(--ivory);
    color: var(--ivory);
}

.site-footer {
    width: min(94vw, 1160px);
    margin: 0 auto;
    padding: 0 0 42px;
    color: var(--muted);
    text-align: center;
    font-size: 0.86rem;
}

@media (max-width: 920px) {
    .info-grid.two,
    .character-grid,
    .locked-grid,
    .elzeria-card,
    .map-workbench {
        grid-template-columns: 1fr;
    }

    .character-grid,
    .locked-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cover-art {
        right: -22%;
        width: min(88vw, 520px);
        opacity: 0.5;
    }

    .cover-hero.poster-hero {
        aspect-ratio: 16 / 9;
    }

    .cover-poster {
        object-position: 58% center;
    }

    .cover-scrim {
        background:
            linear-gradient(90deg, rgba(5, 10, 21, 0.96), rgba(5, 10, 21, 0.70)),
            radial-gradient(circle at 72% 35%, rgba(244, 236, 208, 0.12), transparent 18rem);
    }

    .elzeria-copy {
        padding: 22px;
    }

    .elzeria-image-wrap {
        min-height: 420px;
    }

    .realm-map {
        min-height: 420px;
    }

    .modal-image-wrap {
        min-height: 440px;
    }
}

@media (max-width: 680px) {
    .archive-header {
        width: min(92vw, 1160px);
        padding-top: 64px;
        padding-bottom: 12px;
    }

    .archive-header h1 {
        max-width: 12em;
        margin-inline: auto;
        font-size: clamp(1.5rem, 8vw, 2.05rem);
    }

    .archive-subtitle {
        font-family: 'Noto Serif KR', serif;
        font-size: 0.82rem;
        letter-spacing: 0.06em;
    }

    .back-link {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .origin-glint {
        right: 18px;
        top: 78px;
    }

    .tabs {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 6px;
        margin-top: 8px;
        padding: 8px 12px 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 10px 12px 12px;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .page-shell {
        width: min(92vw, 1160px);
        margin-top: 22px;
        padding-bottom: 52px;
    }

    .cover-hero {
        min-height: 620px;
    }

    .cover-hero.poster-hero {
        min-height: min(560px, 66dvh);
        aspect-ratio: 3 / 4;
        border-radius: 6px;
    }

    .cover-poster {
        object-position: 63% center;
    }

    .cover-copy {
        justify-content: flex-end;
    }

    .cover-actions,
    .cover-underbar {
        align-items: stretch;
        flex-direction: column;
    }

    .cover-underbar {
        gap: 12px;
        margin-top: 10px;
        padding: 14px;
    }

    .cover-underbar p {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .primary-action,
    .ghost-action {
        width: 100%;
    }

    .info-grid.two,
    .character-grid,
    .locked-grid {
        grid-template-columns: 1fr;
    }

    .info-grid,
    .character-grid,
    .locked-grid {
        gap: 14px;
    }

    .section-heading {
        margin-bottom: 20px;
    }

    .section-heading span {
        font-size: 0.7rem;
        letter-spacing: 0.18em;
    }

    .section-heading p {
        font-size: 0.94rem;
    }

    .elzeria-card {
        margin-bottom: 22px;
    }

    .elzeria-image-wrap {
        min-height: min(420px, 58dvh);
    }

    .character-body {
        padding: 16px;
    }

    .realm-map {
        min-height: min(360px, 78vw);
        border-radius: 6px;
    }

    .map-copy,
    .map-detail {
        padding: 16px;
    }

    .map-pin {
        min-width: 30px;
        min-height: 30px;
    }

    .map-pin span {
        top: calc(100% + 6px);
        font-size: 0.7rem;
    }

    .character-modal {
        padding: 10px;
    }

    .modal-panel {
        grid-template-columns: 1fr;
        width: 100%;
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        border-radius: 6px;
    }

    .modal-image-wrap {
        min-height: 300px;
        max-height: 38dvh;
    }

    .modal-copy {
        padding: 22px;
    }

    .webtoon-cut img,
    .webtoon-cut.tall img {
        min-height: 320px;
    }

    .webtoon-flow {
        width: 100vw;
        margin-left: 50%;
        border-inline: 0;
        border-radius: 0;
        transform: translateX(-50%);
    }

    .link-list span,
    .link-list a {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .opening-core {
        width: min(92vw, 360px);
        min-height: 340px;
    }

    .opening-core h2 {
        font-size: clamp(1.35rem, 8vw, 2rem);
    }

    .archive-header h1 {
        max-width: 10em;
    }

    .tabs {
        top: 0;
    }

    .tab-btn {
        padding-inline: 11px;
        font-size: 0.86rem;
    }

    .cover-hero.poster-hero {
        min-height: min(500px, 62dvh);
        aspect-ratio: 4 / 5;
    }

    .cover-underbar p,
    .card-kicker,
    .character-body p,
    .elzeria-copy p {
        font-size: 0.9rem;
    }

    .keyword-band span,
    .tag-list li,
    .map-tags li {
        padding: 5px 9px;
        font-size: 0.74rem;
    }

    .info-card,
    .theme-panel,
    .faction-card,
    .timeline-card,
    .locked-card {
        padding: 16px;
    }

    .elzeria-image-wrap {
        min-height: 340px;
    }

    .character-card img {
        aspect-ratio: 3 / 4;
    }

    .realm-map {
        min-height: 320px;
    }

    .map-pin span {
        display: none;
    }

    .modal-close {
        right: 10px;
        top: 10px;
        width: 34px;
        height: 34px;
    }

    .modal-image-wrap {
        min-height: 240px;
        max-height: 34dvh;
    }

    .modal-copy {
        padding: 18px;
    }
}
