/* **********************************
NOVELLOOP CSS
- 모바일 우선(360~430px), 태블릿 768px, PC 1200px 컨테이너
************************************** */
:root {
    --nl-bg: #F7F8FA;
    --nl-surface: #FFFFFF;
    --nl-text: #16181D;
    --nl-sub: #5B6170;
    --nl-muted: #8A90A0;
    --nl-line: #E6E8EE;
    --nl-point: #635BFF;
    --nl-point-soft: #EEEDFF;
    --nl-free: #0E9F6E;
    --nl-plus: #635BFF;
    --nl-danger: #E5484D;
    --nl-warn: #F5A524;
    --nl-radius: 12px;
    --nl-header-h: 56px;
    --nl-tab-h: 60px;
    --nl-safe-b: env(safe-area-inset-bottom, 0px);
    --nl-safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --nl-bg: #0F1115;
        --nl-surface: #181B21;
        --nl-text: #ECEEF2;
        --nl-sub: #B4B9C5;
        --nl-muted: #8A90A0;
        --nl-line: #2A2E37;
        --nl-point: #8C86FF;
        --nl-point-soft: #24224A;
    }
}

html, body {
    background: var(--nl-bg) !important;
    color: var(--nl-text);
    font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--nl-point); }
button { touch-action: manipulation; }
.nl-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--nl-point); outline-offset: 2px; }

/* ===== 앱 셸 ===== */
.nl-app { min-height: 100vh; padding-bottom: calc(var(--nl-tab-h) + var(--nl-safe-b) + 16px); }
.nl-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.nl-demo-bar { background: #FFF4D6; color: #6B4E00; font-size: 12px; text-align: center; padding: 4px 8px; }

.nl-header {
    position: sticky; top: 0; z-index: 1020; height: calc(var(--nl-header-h) + var(--nl-safe-t));
    padding-top: var(--nl-safe-t); background: color-mix(in srgb, var(--nl-bg) 92%, transparent);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--nl-line);
}
.nl-header .nl-container { height: var(--nl-header-h); display: flex; align-items: center; gap: 12px; }
.nl-logo { font-weight: 800; font-size: 19px; letter-spacing: -0.3px; color: var(--nl-text); }
.nl-logo span { color: var(--nl-point); }
.nl-header-actions { margin-left: auto; display: flex; gap: 4px; }
.nl-icon-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--nl-text);
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.nl-icon-btn:hover { background: var(--nl-point-soft); }
.nl-desktop-nav { display: none; gap: 20px; margin-left: 24px; font-weight: 600; }
.nl-desktop-nav a.active { color: var(--nl-point); }

.nl-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: var(--nl-surface);
    border-top: 1px solid var(--nl-line); padding-bottom: var(--nl-safe-b); display: flex;
}
.nl-tabbar a {
    flex: 1; height: var(--nl-tab-h); display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; font-size: 11px; color: var(--nl-muted);
}
.nl-tabbar a i { font-size: 19px; }
.nl-tabbar a.active { color: var(--nl-point); font-weight: 700; }

/* 템플릿에서 쓰는 .flex-none 은 Bootstrap 5.0 에 없는 클래스라 버튼이 줄어들며 글자가 세로로 줄바꿈되던 문제 → 직접 정의 */
.flex-none { flex: none !important; }

/* 탐색: 연재 상태 탭 (전체 / 연재중 / 완결) */
.nl-status-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--nl-line); }
.nl-status-tabs button { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 0; background: none; color: var(--nl-muted);
    font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nl-status-tabs button.active { color: var(--nl-text); border-bottom-color: var(--nl-point); font-weight: 800; }

/* 알림(toast)이 하단 탭바·뷰어 하단 바(설정 버튼 등)를 덮어 클릭을 막지 않도록 그 위에 표시 */
#toast-container.toast-bottom-center { bottom: calc(var(--nl-tab-h, 56px) + 16px + var(--nl-safe-b, 0px)); }
body.nl-viewer-mode #toast-container.toast-bottom-center { bottom: calc(100px + var(--nl-safe-b, 0px)); }

@media (min-width: 992px) {
    #toast-container.toast-bottom-center { bottom: 24px; }
    body.nl-viewer-mode #toast-container.toast-bottom-center { bottom: calc(100px + var(--nl-safe-b, 0px)); }
    .nl-desktop-nav { display: flex; }
    .nl-tabbar { display: none; }
    .nl-app { padding-bottom: 40px; }
}

/* ===== 섹션 / 칩 ===== */
.nl-section { margin: 22px 0; }
.nl-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.nl-section-title { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -0.3px; }
.nl-section-more { font-size: 13px; color: var(--nl-muted); }
.nl-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.nl-chips::-webkit-scrollbar { display: none; }
.nl-chip {
    flex: none; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--nl-line);
    background: var(--nl-surface); color: var(--nl-sub); font-size: 14px; display: inline-flex; align-items: center;
}
.nl-chip.active, .nl-chip[aria-pressed="true"] { background: var(--nl-text); color: var(--nl-bg); border-color: var(--nl-text); }

/* ===== 작품 카드 (표지 2:3) ===== */
.nl-hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 31%; gap: 12px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.nl-hscroll::-webkit-scrollbar { display: none; }
.nl-hscroll > * { scroll-snap-align: start; }
@media (min-width: 768px) { .nl-hscroll { grid-auto-columns: 18%; } }
@media (min-width: 1200px) { .nl-hscroll { grid-auto-columns: 15%; } }
.nl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
@media (min-width: 768px) { .nl-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .nl-grid { grid-template-columns: repeat(6, 1fr); } }

.nl-card { display: block; min-width: 0; }
.nl-cover {
    position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: #ddd;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.nl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-cover-fallback {
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px; color: #fff;
    font-weight: 800; font-size: 13px; line-height: 1.35; word-break: keep-all; text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.nl-badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.nl-badge {
    font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; color: #fff; line-height: 1.4;
    letter-spacing: .2px;
}
.nl-badge.free { background: var(--nl-free); }
.nl-badge.plus { background: var(--nl-plus); }
.nl-badge.up { background: var(--nl-danger); }
.nl-badge.done { background: #333; }
.nl-badge.age { background: rgba(0,0,0,.6); }
.nl-card-title {
    margin-top: 7px; font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--nl-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all;
}
.nl-card-meta { font-size: 12px; color: var(--nl-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 리스트형 카드 (랭킹/검색/서재) */
.nl-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--nl-line); align-items: center; }
.nl-row .nl-cover { width: 72px; flex: none; }
.nla-cover-box { position: relative; width: 120px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; flex: none; background: #EEF0F4; border: 1px solid var(--nl-line); }
.nla-cover-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nla-cover-box .nl-cover-fallback { font-size: 12px; }
.nla-thumb { position: relative; width: 40px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; display: block; background: #EEF0F4; border: 0; padding: 0; cursor: pointer; }
.nla-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nla-thumb .nl-cover-fallback { font-size: 6px; padding: 2px; }
.nl-row-body { min-width: 0; flex: 1; }
.nl-row-title { font-weight: 700; font-size: 15px; line-height: 1.35; word-break: keep-all; }
.nl-row-sub { font-size: 12.5px; color: var(--nl-muted); margin-top: 3px; }
.nl-row-desc { font-size: 13px; color: var(--nl-sub); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
.nl-rank-no { width: 30px; flex: none; text-align: center; font-weight: 800; font-size: 18px; }
.nl-rank-change { font-size: 11px; display: block; font-weight: 600; }
.nl-rank-change.up { color: var(--nl-danger); }
.nl-rank-change.down { color: #3B82F6; }
.nl-rank-change.new { color: var(--nl-free); }

/* 진행률 */
.nl-progress { height: 4px; background: var(--nl-line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.nl-progress > div { height: 100%; background: var(--nl-point); }

/* 배너 */
.nl-banner-wrap { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto;
    scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; margin-top: 12px; }
.nl-banner-wrap::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .nl-banner-wrap { grid-auto-columns: 48%; } }
.nl-banner {
    scroll-snap-align: start; border-radius: 16px; min-height: 168px; padding: 20px; color: #fff; display: flex;
    flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden;
}
.nl-banner h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; word-break: keep-all; }
.nl-banner p { margin: 0; font-size: 13.5px; opacity: .92; }
.nl-banner .nl-banner-tag { font-size: 11px; font-weight: 700; opacity: .85; margin-bottom: 6px; }

/* 공통 상태 */
.nl-empty, .nl-error-box { text-align: center; padding: 40px 16px; color: var(--nl-muted); }
.nl-empty i, .nl-error-box i { font-size: 32px; margin-bottom: 10px; display: block; }
.nl-skeleton { background: linear-gradient(90deg, var(--nl-line) 25%, var(--nl-surface) 50%, var(--nl-line) 75%);
    background-size: 200% 100%; animation: nl-shimmer 1.2s infinite; border-radius: 8px; }
@keyframes nl-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.nl-sk-card { aspect-ratio: 2/3; }
.nl-sk-line { height: 12px; margin-top: 8px; }

.nl-btn-point { background: var(--nl-point); color: #fff; border: 0; border-radius: 10px; min-height: 48px;
    font-weight: 700; padding: 0 18px; }
.nl-btn-point:hover { filter: brightness(1.06); color: #fff; }
.nl-btn-point:disabled { opacity: .5; }
.nl-btn-line { background: var(--nl-surface); color: var(--nl-text); border: 1px solid var(--nl-line);
    border-radius: 10px; min-height: 48px; font-weight: 600; padding: 0 16px; }
.nl-panel { background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius); padding: 16px; }
.nl-muted { color: var(--nl-muted); }
.nl-page-title { font-size: 22px; font-weight: 800; margin: 18px 0 12px; letter-spacing: -0.4px; }

/* ===== 작품 상세 ===== */
.nl-detail-top { display: flex; gap: 16px; margin-top: 18px; }
.nl-detail-top .nl-cover { width: 120px; flex: none; }
@media (min-width: 768px) { .nl-detail-top .nl-cover { width: 180px; } }
.nl-detail-title { font-size: 21px; font-weight: 800; line-height: 1.3; margin: 0 0 6px; word-break: keep-all; }
.nl-detail-meta { font-size: 13px; color: var(--nl-sub); line-height: 1.7; }
.nl-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.nl-tag { font-size: 12px; color: var(--nl-point); background: var(--nl-point-soft); border-radius: 6px; padding: 3px 8px; }
.nl-cta-row { display: flex; gap: 8px; margin: 16px 0; }
.nl-cta-row .nl-btn-point { flex: 1; }
.nl-ai-note { font-size: 12.5px; color: var(--nl-sub); background: var(--nl-surface); border: 1px dashed var(--nl-line);
    border-radius: 10px; padding: 10px 12px; }
.nl-ep-item { display: flex; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--nl-line); min-height: 56px; }
.nl-ep-item .nl-ep-no { width: 46px; flex: none; color: var(--nl-muted); font-size: 13px; }
.nl-ep-item .nl-ep-title { flex: 1; font-size: 15px; min-width: 0; }
.nl-ep-item.read .nl-ep-title { color: var(--nl-muted); }
.nl-ep-item .nl-ep-side { font-size: 12px; color: var(--nl-muted); text-align: right; flex: none; }
.nl-ep-item .fa-lock { color: var(--nl-plus); }
.nl-tabs-line { display: flex; border-bottom: 1px solid var(--nl-line); margin-top: 8px; }
.nl-tabs-line button { flex: 1; background: none; border: 0; min-height: 46px; font-weight: 700; color: var(--nl-muted);
    border-bottom: 2px solid transparent; }
.nl-tabs-line button.active { color: var(--nl-text); border-bottom-color: var(--nl-text); }

/* ===== 독서 뷰어 ===== */
.nl-viewer {
    --v-font-size: 18px; --v-line-height: 1.85; --v-padding: 20px; --v-para-gap: 1em;
    --v-bg: #FFFFFF; --v-text: #1E2026; --v-sub: #6B7080; --v-line: #ECEDF1;
    background: var(--v-bg); color: var(--v-text); min-height: 100vh;
}
.nl-viewer.theme-dark { --v-bg: #121316; --v-text: #D9DBE0; --v-sub: #8E93A0; --v-line: #24262C; }
.nl-viewer.theme-sepia { --v-bg: #F6EEDC; --v-text: #3B2F22; --v-sub: #7D6A55; --v-line: #E5D9BF; }
@media (prefers-color-scheme: dark) {
    .nl-viewer.theme-system { --v-bg: #121316; --v-text: #D9DBE0; --v-sub: #8E93A0; --v-line: #24262C; }
}
body.nl-viewer-mode { background: var(--v-bg-body, #fff) !important; }
html.nl-viewer-html { scroll-behavior: auto; }
.nl-viewer-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1050; background: transparent; }
.nl-viewer-progress > div { height: 100%; width: 0; background: var(--nl-point); transition: width .15s linear; }
.nl-viewer-top, .nl-viewer-bottom {
    position: fixed; left: 0; right: 0; z-index: 1040; background: var(--v-bg); border-color: var(--v-line);
    transition: transform .22s ease, opacity .22s ease;
}
.nl-viewer-top { top: 0; border-bottom: 1px solid var(--v-line); padding-top: var(--nl-safe-t); }
.nl-viewer-bottom { bottom: 0; border-top: 1px solid var(--v-line); padding-bottom: var(--nl-safe-b); }
.nl-viewer-top .inner, .nl-viewer-bottom .inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center;
    height: 54px; padding: 0 6px; gap: 4px; }
.nl-viewer .nl-icon-btn { color: var(--v-text); }
.nl-viewer-heading { flex: 1; min-width: 0; text-align: center; }
.nl-viewer-heading .t1 { font-size: 13px; color: var(--v-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-viewer-heading .t2 { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-viewer-bottom .inner { justify-content: space-between; }
.nl-viewer-bottom button { min-height: 44px; border: 0; background: none; color: var(--v-text); font-size: 14px;
    font-weight: 600; padding: 0 12px; border-radius: 10px; }
.nl-viewer-bottom button:disabled { opacity: .35; }
.nl-viewer.ui-hidden .nl-viewer-top { transform: translateY(-100%); opacity: 0; }
.nl-viewer.ui-hidden .nl-viewer-bottom { transform: translateY(100%); opacity: 0; }

.nl-viewer-body {
    max-width: 760px; margin: 0 auto; padding: calc(70px + var(--nl-safe-t)) var(--v-padding) 40px;
    font-size: clamp(14px, var(--v-font-size), 28px); line-height: var(--v-line-height);
    word-break: keep-all; overflow-wrap: anywhere; -webkit-user-select: none; user-select: none;
}
.nl-viewer-body.font-myeongjo { font-family: "Noto Serif KR", "Nanum Myeongjo", serif; }
.nl-viewer-body.align-justify p { text-align: justify; }
.nl-viewer-body h1 { font-size: 1.15em; font-weight: 800; margin-bottom: .3em; }
.nl-viewer-body .nl-ep-head { margin-bottom: 2em; padding-bottom: 1em; border-bottom: 1px solid var(--v-line); }
.nl-viewer-body .nl-ep-head .sub { font-size: .75em; color: var(--v-sub); }
.nl-viewer-body p { margin: 0 0 var(--v-para-gap); }
.nl-viewer-end { max-width: 760px; margin: 0 auto; padding: 0 var(--v-padding) calc(110px + var(--nl-safe-b)); font-size: 15px; }
.nl-viewer-end .note { border: 1px solid var(--v-line); border-radius: 12px; padding: 14px; color: var(--v-sub); white-space: pre-wrap; }
.nl-viewer-end .acts { display: flex; gap: 8px; margin: 16px 0; }
.nl-viewer-end .acts button { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--v-line);
    background: transparent; color: var(--v-text); }
/* 페이지 넘김 모드: 고정 영역 안에서 CSS 다단(column)으로 쪽을 나누고 translateX 로 넘김 */
.nl-page-nav, .nl-page-info { display: none; }
body.nl-page-mode { overflow: hidden; overscroll-behavior: none; }
html.nl-page-mode { overscroll-behavior: none; }  /* 좌우 스와이프가 브라우저 '뒤로 가기' 제스처로 처리되지 않도록 */
.nl-viewer.mode-page .nl-viewer-pager {
    position: fixed; top: calc(62px + var(--nl-safe-t)); bottom: calc(92px + var(--nl-safe-b));
    left: 50%; transform: translateX(-50%); width: min(760px, 100vw); overflow: hidden;
}
.nl-viewer.mode-page .nl-viewer-body {
    max-width: none; height: 100%; margin: 0; padding: 8px var(--v-padding) 0;
    column-count: 1; column-gap: calc(var(--v-padding) * 2); column-fill: auto; transition: transform .25s ease; will-change: transform;
    touch-action: manipulation;  /* pan-y 면 좌우 스와이프 직후 다음 탭(설정 버튼 등)의 click 이 사라짐 */
}
.nl-viewer.mode-page .nl-viewer-body.no-anim { transition: none; }
.nl-viewer.mode-page .nl-viewer-body p { break-inside: auto; orphans: 2; widows: 2; }
.nl-viewer.mode-page .nl-viewer-end { break-before: column; max-width: none; margin: 0; padding: 0; }
.nl-viewer.mode-page .nl-page-nav {
    display: flex; align-items: center; justify-content: center; position: fixed; top: 50%; z-index: 1030;
    width: 40px; height: 64px; margin-top: -32px; border: 1px solid var(--v-line); background: var(--v-bg);
    color: var(--v-text); opacity: .75; font-size: 16px; transition: opacity .2s ease;
}
.nl-viewer.mode-page .nl-page-nav:hover { opacity: 1; }
.nl-viewer.mode-page .nl-page-nav.prev { left: max(0px, calc(50vw - 430px)); border-radius: 0 12px 12px 0; border-left: 0; }
.nl-viewer.mode-page .nl-page-nav.next { right: max(0px, calc(50vw - 430px)); border-radius: 12px 0 0 12px; border-right: 0; }
.nl-viewer.mode-page .nl-page-nav.edge { opacity: .45; }
.nl-viewer.mode-page.ui-hidden .nl-page-nav { opacity: 0; pointer-events: none; }
.nl-viewer.mode-page .nl-page-info {
    display: block; position: fixed; left: 0; right: 0; bottom: calc(62px + var(--nl-safe-b)); z-index: 1030;
    text-align: center; font-size: 12px; color: var(--v-sub); line-height: 28px; pointer-events: none;
}
@media (max-width: 575.98px) {
    .nl-viewer.mode-page .nl-page-nav { width: 30px; height: 52px; margin-top: -26px; font-size: 13px; opacity: .55; }
}
.nl-paywall { max-width: 520px; margin: calc(90px + var(--nl-safe-t)) auto 0; padding: 0 20px 140px; text-align: center; }
.nl-paywall .lock { width: 64px; height: 64px; border-radius: 50%; background: var(--nl-point-soft); color: var(--nl-point);
    display: inline-flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 14px; }
.nl-sheet-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; gap: 12px;
    border-bottom: 1px solid var(--nl-line); }
.nl-sheet-row label { font-weight: 600; font-size: 14px; flex: none; }
.nl-seg { display: inline-flex; border: 1px solid var(--nl-line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.nl-seg button { border: 0; background: var(--nl-surface); color: var(--nl-text); min-height: 40px; min-width: 44px;
    padding: 0 10px; font-size: 13px; }
.nl-seg button.active { background: var(--nl-text); color: var(--nl-bg); }
.nl-stepper { display: inline-flex; align-items: center; gap: 6px; }
.nl-stepper button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--nl-line);
    background: var(--nl-surface); color: var(--nl-text); }
.nl-stepper span { min-width: 48px; text-align: center; font-weight: 700; }
/* Bootstrap 5.0.2 JS 는 오프캔버스 배경막을 .modal-backdrop 으로 만들고, Tabler CSS 는 그 막(1050)을 오프캔버스(1045)보다 위에 둠
   → 시트 위를 막이 덮어 버튼이 안 눌리던 문제. 오프캔버스를 막 위로 올림 (모달 1055 와 같은 층) */
.offcanvas { z-index: 1055; }
.offcanvas-bottom.nl-sheet { height: auto; max-height: 85vh; border-radius: 16px 16px 0 0; background: var(--nl-surface);
    color: var(--nl-text); padding-bottom: var(--nl-safe-b); }
.nl-autonext { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(72px + var(--nl-safe-b)); z-index: 1045;
    background: var(--nl-text); color: var(--nl-bg); border-radius: 22px; padding: 10px 16px; font-size: 14px; }

/* ===== 검색 ===== */
.nl-search-box { position: relative; margin-top: 14px; }
.nl-search-box input { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--nl-line);
    background: var(--nl-surface); color: var(--nl-text); padding: 0 44px 0 42px; font-size: 16px; }
.nl-search-box > i { position: absolute; left: 15px; top: 16px; color: var(--nl-muted); }
.nl-search-box .clear { position: absolute; right: 2px; top: 2px; }
.nl-suggest { position: absolute; left: 0; right: 0; top: 52px; z-index: 50; background: var(--nl-surface);
    border: 1px solid var(--nl-line); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.nl-suggest a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--nl-line); font-size: 14px; }

/* ===== 폼 ===== */
.nl-form .form-control, .nl-form .form-select { min-height: 48px; border-radius: 10px; background: var(--nl-surface);
    color: var(--nl-text); border-color: var(--nl-line); font-size: 16px; }
.nl-form label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.nl-social { display: grid; gap: 8px; }
.nl-social button { min-height: 48px; border-radius: 10px; border: 1px solid var(--nl-line); background: var(--nl-surface);
    color: var(--nl-text); font-weight: 600; }
/* 소셜 로그인 버튼: 각 제공자 디자인 가이드 색상 */
.nl-social .nl-social-kakao { background: #FEE500; border-color: #FEE500; color: rgba(0, 0, 0, .85); }
.nl-social .nl-social-naver { background: #03C75A; border-color: #03C75A; color: #fff; }
.nl-social .nl-social-google { background: #fff; border-color: #747775; color: #1f1f1f; }

/* ===== PLUS ===== */
.nl-plan { border: 2px solid var(--nl-point); border-radius: 16px; padding: 22px; background: var(--nl-surface); }
.nl-plan .price { font-size: 30px; font-weight: 800; }
.nl-plan ul { padding-left: 18px; margin: 12px 0; color: var(--nl-sub); }

/* ===== 관리자 ===== */
.nl-admin { display: flex; min-height: 100vh; background: var(--nl-bg); }
.nl-admin-side { width: 220px; flex: none; background: #16181D; color: #C9CDD6; padding: 16px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.nl-admin-side .brand { color: #fff; font-weight: 800; padding: 0 18px 14px; font-size: 17px; }
.nl-admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: 14px; color: #C9CDD6; }
.nl-admin-side a.active, .nl-admin-side a:hover { background: #262A33; color: #fff; }
.nl-admin-main { flex: 1; min-width: 0; padding: 20px 24px 60px; }
.nl-admin-main h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.nl-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.nl-kpi .nl-panel .v { font-size: 24px; font-weight: 800; }
.nl-kpi .nl-panel .l { font-size: 12.5px; color: var(--nl-muted); }
.nl-admin table { font-size: 13.5px; background: var(--nl-surface); }
.nl-admin table td, .nl-admin table th { vertical-align: middle; }
.nl-status { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #EEF0F4; color: #444; white-space: nowrap; }
.nl-status.PUBLISHED, .nl-status.PAID, .nl-status.ACTIVE, .nl-status.RESOLVED { background: #DDF6EA; color: #0B7A54; }
.nl-status.SCHEDULED, .nl-status.APPROVED, .nl-status.IN_PROGRESS { background: #E6E4FF; color: #4B43D6; }
.nl-status.REVIEW, .nl-status.PENDING, .nl-status.OPEN, .nl-status.HIATUS { background: #FFF1D6; color: #8A5A00; }
.nl-status.HIDDEN, .nl-status.FAILED, .nl-status.REFUNDED, .nl-status.SUSPENDED, .nl-status.ARCHIVED, .nl-status.REJECTED { background: #FDE2E3; color: #B42328; }
.nl-import-row.error { background: #FFF5F5; }
.nl-import-row.warn { background: #FFFBEB; }
.nl-diff { font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre-wrap; max-height: 280px;
    overflow: auto; background: #0F1115; color: #D9DBE0; border-radius: 8px; padding: 10px; }
.nl-diff .add { color: #4ADE80; }
.nl-diff .del { color: #F87171; }
.nl-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.nl-cal .day { background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: 8px; min-height: 96px; padding: 6px; font-size: 12px; }
.nl-cal .day .d { font-weight: 700; color: var(--nl-muted); margin-bottom: 4px; }
.nl-cal .ev { border-radius: 4px; padding: 2px 4px; margin-bottom: 3px; background: #E6E4FF; color: #3C35B5; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nl-cal .ev.PUBLISHED { background: #DDF6EA; color: #0B7A54; }
.nl-cal .ev.overdue { background: #FDE2E3; color: #B42328; }
@media (max-width: 991px) {
    .nl-admin { flex-direction: column; }
    .nl-admin-side { width: 100%; height: auto; position: static; display: flex; overflow-x: auto; padding: 8px; }
    .nl-admin-side .brand { display: none; }
    .nl-admin-side a { white-space: nowrap; padding: 8px 12px; }
    .nl-admin-main { padding: 16px; }
}

/* ---------- v2 코인 유료화 ---------- */
:root { --nl-coin: #E8A400; --nl-coin-soft: #FFF6DA; }
.nl-badge.coin { background: var(--nl-coin); color: #2B1E00; }
.nl-coin-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; height: 1.25em; border-radius: 50%;
    background: var(--nl-coin); color: #2B1E00; font-size: .72em; font-weight: 800; vertical-align: -0.15em; }
.nl-ep-price { font-weight: 700; color: var(--nl-text); white-space: nowrap; }
.nl-ep-owned { color: var(--nl-free); font-weight: 700; white-space: nowrap; }
.nl-ep-item.locked .nl-ep-title { color: var(--nl-sub); }
.nl-paywall .nl-pw-box { border: 1px solid var(--nl-line); border-radius: var(--nl-radius); background: var(--nl-surface);
    padding: 14px 16px; margin: 14px 0; text-align: left; font-size: 14px; }
.nl-paywall .nl-pw-box .row-line { display: flex; justify-content: space-between; padding: 4px 0; }
.nl-paywall .nl-pw-box .row-line.total { border-top: 1px dashed var(--nl-line); margin-top: 4px; padding-top: 8px; font-weight: 700; }
.nl-paywall .nl-pw-box .short { color: var(--nl-danger); }
.nl-wallet { border-radius: 16px; padding: 18px; background: linear-gradient(135deg, #2D2A6E, #635BFF); color: #fff; }
.nl-wallet .total { font-size: 30px; font-weight: 800; line-height: 1.2; }
.nl-wallet .split { display: flex; gap: 16px; font-size: 13px; opacity: .92; margin-top: 6px; flex-wrap: wrap; }
.nl-product { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--nl-line);
    border-radius: var(--nl-radius); background: var(--nl-surface); margin-bottom: 8px; width: 100%; text-align: left; color: var(--nl-text); }
.nl-product:hover { border-color: var(--nl-point); }
.nl-product .coins { font-size: 17px; font-weight: 800; flex: 1; min-width: 0; }
.nl-product .bonus { font-size: 12px; color: var(--nl-coin); font-weight: 700; }
.nl-product .price { font-weight: 700; white-space: nowrap; }
.nl-policy-notice { background: var(--nl-coin-soft); color: #5A4300; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-top: 10px; }
.nl-ledger-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--nl-line); font-size: 14px; }
.nl-ledger-row .d { font-weight: 700; white-space: nowrap; }
.nl-ledger-row .d.plus { color: var(--nl-free); }
.nl-ledger-row .d.minus { color: var(--nl-danger); }
.nl-admin-side .grp { color: #7E8594; font-size: 11.5px; font-weight: 700; padding: 14px 18px 4px; letter-spacing: .02em; }
.nl-status.VERIFYING, .nl-status.REFUND_PENDING, .nl-status.REQUESTED, .nl-status.DRAFT { background: #FFF1D6; color: #8A5A00; }
.nl-status.CANCELED, .nl-status.SUPERSEDED, .nl-status.EXHAUSTED, .nl-status.INACTIVE, .nl-status.RETIRED { background: #EEF0F4; color: #555; }
.nl-status.PARTIAL_REFUNDED, .nl-status.EXPIRED, .nl-status.REVOKED { background: #FDE2E3; color: #B42328; }
.nl-status.COMPLETED, .nl-status.DONE, .nl-status.CREDITED { background: #DDF6EA; color: #0B7A54; }
.nl-check-ok { color: #0B7A54; } .nl-check-ng { color: #B42328; }
@media (max-width: 991px) { .nl-admin-side .grp { display: none; } }
