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

:root {
    --ink: #18202b;
    --muted: #6c7480;
    --line: #e7e9ed;
    --paper: #ffffff;
    --soft: #f6f7f9;
    --accent: #e4563c;
    --accent-soft: #fff0ec;
    --navy: #233650;
    --shadow: 0 14px 40px rgba(25, 35, 48, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.02em;
}

a { color: inherit; }

.comics-shell { min-height: 100vh; }

.comics-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(231, 233, 237, 0.9);
}

.comics-header-inner {
    width: min(1180px, calc(100% - 40px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.comics-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.05em;
}

.comics-brand-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ink);
    color: white;
    font-size: 0.8rem;
    letter-spacing: 0;
}

.comics-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.comics-nav a { text-decoration: none; }
.comics-nav a:hover, .comics-nav a[aria-current="page"] { color: var(--accent); }

.comics-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 70px 0 100px;
}

.comics-eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.comics-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.16;
    letter-spacing: -0.065em;
}

.comics-intro {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.comics-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 62px 0 20px;
}

.comics-section-title {
    margin: 0;
    font-size: 1.18rem;
    letter-spacing: -0.045em;
}

.comics-count { color: var(--muted); font-size: 0.86rem; }

.comic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
}

.comic-card {
    min-width: 0;
    display: block;
    text-decoration: none;
}

.comic-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff1f4, #dfe5eb);
    box-shadow: 0 5px 18px rgba(25, 35, 48, 0.08);
}

.comic-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(24, 32, 43, 0.08);
    border-radius: inherit;
    pointer-events: none;
}

.comic-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.comic-card:hover .comic-cover img { transform: scale(1.035); }

.comic-card-body { padding: 16px 2px 0; }
.comic-card-title { margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.045em; }
.comic-card-description { margin: 8px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }
.comic-card-meta { margin-top: 13px; color: #9aa1ab; font-size: 0.75rem; }

.empty-state {
    padding: 70px 24px;
    text-align: center;
    border: 1px dashed #d9dde3;
    border-radius: 18px;
    background: var(--soft);
    color: var(--muted);
}

.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 1.1rem; }

.comic-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding-bottom: 62px;
    border-bottom: 1px solid var(--line);
}

.comic-hero-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: var(--soft);
    box-shadow: var(--shadow);
}

.comic-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comic-hero-copy h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.15; letter-spacing: -0.07em; }
.comic-hero-copy .creator { margin: 16px 0 0; color: var(--muted); font-size: 0.9rem; }
.comic-hero-description { max-width: 660px; margin: 28px 0 0; color: #4b5562; font-size: 1rem; line-height: 1.85; white-space: pre-line; }

.comic-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 27px; color: var(--muted); font-size: 0.82rem; }
.comic-stats strong { color: var(--ink); }

.episodes-section { padding-top: 54px; }
.episodes-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.episodes-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.05em; }
.episodes-heading span { color: var(--muted); font-size: 0.84rem; }

.episode-list { border-top: 1px solid var(--ink); }
.episode-row { display: grid; grid-template-columns: 90px 96px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.episode-row:hover .episode-title { color: var(--accent); }
.episode-row.is-locked { color: #9aa1ab; cursor: default; }
.episode-no { font-size: 0.9rem; font-weight: 800; }
.episode-thumb { width: 96px; height: 68px; overflow: hidden; border-radius: 8px; background: var(--soft); }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.episode-title { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -0.04em; transition: color 0.2s; }
.episode-summary { margin: 7px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.episode-release { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.episode-release.available { color: var(--accent); font-weight: 700; }

.reader-shell { max-width: 920px; margin: 0 auto; }
.reader-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.reader-heading h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.07em; }
.reader-heading p { margin: 9px 0 0; color: var(--muted); }
.back-link { color: var(--muted); font-size: 0.84rem; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--accent); }
.reader-placeholder { padding: 70px 24px; text-align: center; border: 1px dashed #d9dde3; border-radius: 18px; background: var(--soft); color: var(--muted); line-height: 1.7; }
.reader-placeholder strong { display: block; margin-bottom: 8px; color: var(--ink); }
.reader-image { display: block; width: 100%; margin: 0 auto 20px; border-radius: 12px; box-shadow: var(--shadow); }

.not-found { padding: 120px 0; text-align: center; }
.not-found h1 { margin: 0 0 12px; font-size: 2rem; }
.not-found p { margin: 0 0 28px; color: var(--muted); }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 9px; background: var(--ink); color: white; font-size: 0.86rem; font-weight: 700; text-decoration: none; }
.button-link:hover { background: var(--accent); }

.comics-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 40px; border-top: 1px solid var(--line); color: #9aa1ab; font-size: 0.78rem; }

@media (max-width: 900px) {
    .comic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .comic-hero { grid-template-columns: 220px minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 640px) {
    .comics-header-inner, .comics-main, .comics-footer { width: min(100% - 32px, 1180px); }
    .comics-header-inner { height: 62px; }
    .comics-nav { gap: 12px; font-size: 0.78rem; }
    .comics-main { padding-top: 46px; }
    .comics-toolbar { margin-top: 44px; }
    .comic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 13px; }
    .comic-card-body { padding-top: 12px; }
    .comic-card-title { font-size: 0.98rem; }
    .comic-card-description { font-size: 0.78rem; }
    .comic-hero { grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: start; padding-bottom: 40px; }
    .comic-hero-cover { border-radius: 12px; }
    .comic-hero-copy h1 { font-size: 1.7rem; }
    .comic-hero-copy .creator { margin-top: 10px; font-size: 0.76rem; }
    .comic-hero-description { margin-top: 17px; font-size: 0.84rem; line-height: 1.7; }
    .comic-stats { margin-top: 17px; font-size: 0.74rem; }
    .episodes-section { padding-top: 38px; }
    .episode-row { grid-template-columns: 42px 72px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
    .episode-thumb { width: 72px; height: 54px; }
    .episode-release { grid-column: 3; font-size: 0.7rem; }
    .episode-summary { font-size: 0.74rem; }
    .reader-heading { display: block; }
    .reader-heading .back-link { display: inline-block; margin-top: 16px; }
}
