:root {
  --ink: #0b1019;
  --ink-2: #1a2130;
  --sub: #5a6272;
  --mute: #8d95a3;
  --line: #e6e4df;
  --bg: #f7f6f3;
  --card: #ffffff;
  --accent: #2e8a82;
  --accent-ink: #1e6c65;
  --accent-soft: #e8f2f0;
  --glow: #5fd4c8;
  --mark: #f97316;
  --danger: #d92d20;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── 공통 부품 ── */
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid #ecd9c6; color: #a8551a; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background 0.18s, border-color 0.18s, color 0.18s; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.primary:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: #fff; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--glow); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.dark { background: rgba(255, 255, 255, 0.08); color: #e6eaf1; }
.btn.dark:hover { background: rgba(255, 255, 255, 0.15); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); }
.btn.grow { flex: 1; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--sub); }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* 펼침 메뉴 */
.menu { position: relative; }
.pop { position: absolute; z-index: 20; bottom: calc(100% + 8px); left: 0; min-width: 228px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(11, 16, 25, 0.16); }
.menu.right .pop, .actions .menu .pop { left: auto; right: 0; }
.pop a, .pop button { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 10px 11px; border: 0; background: transparent; border-radius: 8px; font-size: 14px; text-align: left; color: var(--ink); }
.pop a:hover, .pop button:hover { background: var(--bg); }
.pop b { min-width: 44px; font-weight: 700; }
.pop span { font-size: 12px; color: var(--mute); }
.pop .warn { color: var(--danger); }
.pop a.off { color: var(--mute); cursor: not-allowed; }
.pop a.off:hover { background: transparent; }
.btn.ghost:disabled { color: var(--mute); cursor: not-allowed; }
.btn.ghost:disabled:hover { border-color: var(--line); }
/* 그림이나 문서 파일을 불러올 수 없을 때 빈 자리 (data-msg에 까닭) */
.cover.off { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #ecebe7 0 12px, #e4e2dd 12px 24px); }
.cover.off img { display: none; }
.cover.off::after { content: attr(data-msg); padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font-size: 12.5px; font-weight: 600; color: var(--sub); }
.sheet.off { display: grid; place-items: center; cursor: default; background: #f4f3f0; }
.sheet.off img { display: none; }
.sheet.off::after { content: attr(data-msg); padding: 24px; font-size: 15px; font-weight: 600; line-height: 1.6; color: var(--sub); text-align: center; }
.thumb .pic.off { display: grid; place-items: center; }
.thumb .pic.off img { display: none; }
.thumb .pic.off::after { content: "없음"; font-size: 10.5px; color: #8e98a9; }
/* 보안 저장소에 닿지 않을 때 목록 위 알림 */
.store-off { margin-top: 24px; padding: 13px 16px; border: 1px solid #f3c7c2; border-left: 3px solid var(--danger); border-radius: 10px; background: #fdf3f2; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.store-off a { margin-left: 6px; font-weight: 600; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── 목록 화면: 어두운 머리 ── */
.hero { color: #fff; background:
    radial-gradient(900px 420px at 86% -10%, rgba(95, 212, 200, 0.20), transparent 62%),
    radial-gradient(600px 300px at 8% 120%, rgba(46, 138, 130, 0.16), transparent 65%),
    linear-gradient(180deg, #0b1019 0%, #0f1622 100%); }
.hero-in, .wrap { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.hero { position: relative; overflow: hidden; }
.hub { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 52%); mask-image: linear-gradient(90deg, transparent 18%, #000 52%); }
.hero-in { position: relative; padding: 22px 0 60px; }
.hero-top { display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { height: 22px; width: auto; display: block; }
.brand em { font-style: normal; font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; color: #8e98a9; padding-left: 12px; border-left: 1px solid #2c3548; }
.links { display: flex; gap: 4px; margin-right: auto; }
.links a { height: 34px; padding: 0 13px; display: inline-flex; align-items: center; border-radius: 9px; font-size: 14px; font-weight: 600; color: #aab3c2; }
.links a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.links a.on { color: #fff; background: rgba(255, 255, 255, 0.1); }

.stats { list-style: none; display: flex; gap: 34px; margin-top: 30px; }
.stats li { display: grid; gap: 3px; font-size: 12px; letter-spacing: 0.04em; color: #8e98a9; }
.stats b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.stats li + li { padding-left: 34px; border-left: 1px solid rgba(255, 255, 255, 0.12); }

.folders { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.folders button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--sub); }
.folders button svg { width: 15px; height: 15px; color: var(--accent); }
.folders button i { font-style: normal; font-weight: 500; color: var(--mute); }
.folders button:hover { border-color: var(--ink); color: var(--ink); }
.folders button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.folders button.on svg, .folders button.on i { color: var(--glow); }

.cover .new { position: absolute; left: 14px; top: 14px; padding: 4px 9px; border-radius: 999px; background: var(--mark); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; }
.card .cat i { font-style: normal; margin: 0 6px; color: #c9cdd4; }

.site-foot { border-top: 1px solid var(--line); background: #fff; }
.site-foot .wrap { display: flex; align-items: center; gap: 14px; padding: 26px 0; font-size: 13px; color: var(--mute); }
.site-foot img { height: 18px; width: auto; }
.site-foot span { padding-left: 14px; border-left: 1px solid var(--line); letter-spacing: 0.08em; }
.site-foot a { margin-left: auto; font-weight: 600; color: var(--sub); }
.site-foot a:hover { color: var(--accent-ink); }
.site-foot em { font-style: normal; font-size: 12px; }

.admin-only { display: none !important; }
.is-admin .admin-only { display: revert !important; }

/* ── 사용법 화면 ── */
.hero.slim .hero-in { padding-bottom: 44px; }
.hero.slim .eyebrow { margin-top: 44px; }
.hero.slim h1 { font-size: clamp(28px, 3.4vw, 38px); }
.hero.slim p.lead { margin-top: 12px; font-size: 16px; color: #aab3c2; }
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; margin-top: 44px; align-items: start; }
.toc { position: sticky; top: 28px; display: grid; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line); }
.toc b { margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--mute); }
.toc a { padding: 7px 0; font-size: 14px; font-weight: 500; color: var(--sub); }
.toc a:hover { color: var(--accent-ink); }
.toc hr { margin: 8px 0; border: 0; border-top: 1px solid var(--line); }
.g-sec { padding: 0 0 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.g-sec:last-child { border-bottom: 0; }
.g-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--accent-ink); }
.g-sec h2 { margin-top: 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.g-sec > p { margin-top: 10px; max-width: 720px; font-size: 15.5px; line-height: 1.7; color: var(--sub); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 22px; }
.steps li { counter-increment: step; padding: 20px 20px 22px; background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(11, 16, 25, 0.04), 0 4px 16px rgba(11, 16, 25, 0.04); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.steps b { display: block; margin-top: 14px; font-size: 16px; letter-spacing: -0.015em; }
.steps span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--sub); }
.g-table { width: 100%; max-width: 760px; margin-top: 22px; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(11, 16, 25, 0.04), 0 4px 16px rgba(11, 16, 25, 0.04); font-size: 14.5px; }
.g-table th, .g-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid #f0eeea; line-height: 1.55; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table th { font-size: 12.5px; font-weight: 600; color: var(--mute); background: #fbfaf8; }
.g-table td:first-child { font-weight: 700; white-space: nowrap; }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; border: 1px solid #d9d6cf; border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 600 12.5px var(--font); text-align: center; }
.note { max-width: 760px; margin-top: 20px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.note.warn { border-color: var(--mark); background: #fff4ea; }
.faq { max-width: 760px; margin-top: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 0; font-size: 15.5px; font-weight: 600; }
.faq summary::after { content: "+"; float: right; color: var(--mute); font-weight: 400; }
.faq details[open] summary::after { content: "-"; }
.faq p { padding: 0 0 18px; font-size: 14.5px; line-height: 1.7; color: var(--sub); }
.admin-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; vertical-align: 4px; }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: none; }
  .brand em { display: none; }
  .hero-top { gap: 12px; }
}
.eyebrow { margin-top: 64px; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--glow); }
.hero h1 { margin-top: 14px; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.22; font-weight: 700; letter-spacing: -0.035em; }
.search { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); height: 54px; margin-top: 34px; padding: 0 18px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; transition: background 0.18s, border-color 0.18s; }
.search:focus-within { background: rgba(255, 255, 255, 0.11); border-color: var(--glow); }
.search svg { width: 19px; height: 19px; color: #8e98a9; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: #fff; }
.search input::placeholder { color: #7f8a9c; }

.wrap { padding-bottom: 80px; }
.bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 30px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.tabs button { position: relative; padding: 0 0 14px; border: 0; background: transparent; font-size: 15px; font-weight: 600; color: var(--mute); transition: color 0.15s; }
.tabs button i { font-style: normal; font-size: 12px; font-weight: 500; margin-left: 6px; color: #b3b9c4; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); }
.tabs button.on i { color: var(--accent-ink); }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabs button.add { font-size: 13.5px; font-weight: 600; color: var(--accent-ink); }
.tabs button.add:hover { color: var(--ink); }
.bar-right { flex: none; display: flex; align-items: center; gap: 12px; padding-bottom: 9px; font-size: 13px; color: var(--mute); }
.bar-right select { height: 32px; padding: 0 6px; background: transparent; border: 0; font-size: 13.5px; font-weight: 600; color: var(--sub); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 28px; margin-top: 32px; }
.card { background: var(--card); border-radius: 18px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(11, 16, 25, 0.04), 0 4px 16px rgba(11, 16, 25, 0.04); transition: box-shadow 0.25s, transform 0.25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(11, 16, 25, 0.04), 0 20px 44px rgba(11, 16, 25, 0.11); }
.cover { position: relative; display: block; border-radius: 18px 18px 0 0; overflow: hidden; background: #e9e7e2; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.cover .open { position: absolute; right: 14px; bottom: 14px; padding: 7px 13px; border-radius: 999px; background: rgba(11, 16, 25, 0.78); backdrop-filter: blur(6px); color: #fff; font-size: 12.5px; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s; }
.card:hover .cover .open { opacity: 1; transform: none; }
.card:hover .cover img { transform: scale(1.025); }
.card .body { padding: 20px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.row1 { display: flex; align-items: center; justify-content: space-between; }
.card .cat { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent-ink); }
.card h3 { margin-top: 8px; font-size: 19px; line-height: 1.36; font-weight: 700; letter-spacing: -0.025em; }
.card h3 a:hover { color: var(--accent-ink); }
.card .desc { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--sub); }
.hits { list-style: none; margin-top: 14px; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px; font-size: 13px; }
.hits li + li { margin-top: 5px; }
.hits a { display: flex; gap: 8px; }
.hits a:hover span { text-decoration: underline; }
.hits b { flex: none; min-width: 34px; color: var(--accent-ink); }
.hits .more { color: var(--sub); padding-left: 42px; }
.meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; font-size: 12.5px; color: var(--mute); }
.meta i { width: 3px; height: 3px; border-radius: 50%; background: #c9cdd4; }
.actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 16px; border-top: 1px solid #efede9; }

.empty { margin-top: 72px; text-align: center; color: var(--sub); }
.foot { margin-top: 56px; font-size: 12px; color: var(--mute); }

/* 대화 상자 */
.dlg { margin: auto; width: min(480px, calc(100% - 32px)); padding: 28px 28px 22px; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(11, 16, 25, 0.35); color: var(--ink); }
.dlg.small { width: min(400px, calc(100% - 32px)); }
.dlg::backdrop { background: rgba(11, 16, 25, 0.55); backdrop-filter: blur(3px); }
.dlg h2 { font-size: 21px; letter-spacing: -0.025em; }
.dlg-sub { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--sub); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 18px; padding: 28px 16px; border: 1.5px dashed #cfccc5; border-radius: 14px; background: var(--bg); text-align: center; cursor: pointer; color: var(--sub); transition: border-color 0.15s, background 0.15s; }
.drop svg { width: 26px; height: 26px; color: var(--accent); }
.drop b { font-size: 14px; font-weight: 600; word-break: break-all; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.has { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.fields { display: grid; gap: 12px; margin-top: 16px; }
.fields label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--sub); }
.fields input, .fields select, .cat-add input, .cat-list input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; font-weight: 400; color: var(--ink); background: #fff; }
.fields input:focus, .fields select:focus, .cat-add input:focus, .cat-list input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dlg-msg { min-height: 20px; margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--danger); }
.dlg-msg:has(.spin) { color: var(--sub); }
.spin { display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid #cfccc5; border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.cat-list { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.cat-list li { display: grid; grid-template-columns: 1fr auto auto auto auto; align-items: center; gap: 6px; }
.cat-list span { font-size: 12.5px; color: var(--mute); min-width: 58px; text-align: right; }
.cat-list button { height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; color: var(--danger); }
.cat-list button:hover:not(:disabled) { background: #fdecea; }
.cat-list button:disabled { color: #c9cdd4; cursor: not-allowed; }
.cat-list button.mv { width: 34px; padding: 0; color: var(--sub); }
.cat-list button.mv:hover:not(:disabled) { background: var(--accent-soft); color: var(--ink); }
.cat-list button.mv svg { width: 16px; height: 16px; vertical-align: -3px; }
.cat-list button.mv:disabled { color: #dfe2e6; }
.cat-add { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cat-add input { flex: 1; min-width: 0; }

.hist-list { list-style: none; margin-top: 14px; }
.hist-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hist-list li .chip { border-color: var(--line); color: var(--sub); }
.hist-list li.now .chip { border-color: #ecd9c6; color: #a8551a; }
.hist-list time { font-size: 12px; color: var(--mute); }
.hist-list li:has(.hist-act) { grid-template-columns: auto 1fr auto auto; }
.hist-list .note small { display: block; margin-top: 2px; font-size: 12px; color: var(--mute); }
.hist-list li.restored .chip { border-style: dashed; }
.hist-act { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.hist-act:hover { border-color: var(--accent); color: var(--accent); }
.hist-restore { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.hist-restore input { flex: 1; min-width: 180px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.hist-restore .dlg-msg { flex-basis: 100%; min-height: 0; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; padding: 12px 20px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 12px 34px rgba(11, 16, 25, 0.35); }

/* ── 뷰어 화면 (어두운 바탕에 장표만 밝게) ── */
.page-viewer { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #0b1019; color: #e6eaf1; }
.vbar { flex: none; display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 16px; background: #0f1622; border-bottom: 1px solid #1f2736; }
.back { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 34px; padding: 0 11px 0 6px; border-radius: 9px; font-size: 14px; font-weight: 600; color: #aab3c2; }
.back:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.back svg { width: 18px; height: 18px; }
.vtitle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid #242d3e; }
.vtitle strong { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtitle .chip { flex: none; border-color: rgba(253, 186, 116, 0.35); color: #fdba74; }
.vtitle .cat { flex: none; font-size: 12.5px; color: #7f8a9c; }
.vtools { flex: none; display: flex; gap: 8px; }
.vtools .btn { height: 36px; font-size: 13.5px; }
.vtools .btn.primary { background: #fff; color: var(--ink); }
.vtools .btn.primary:hover { background: var(--glow); }
.vtools .pop { bottom: auto; top: calc(100% + 8px); }

.vbody { flex: 1; min-height: 0; display: flex; }
.rail { flex: none; width: 216px; overflow-y: auto; padding: 12px 10px 20px; background: #0d131d; border-right: 1px solid #1f2736; scrollbar-width: thin; scrollbar-color: #2a3344 transparent; }
.no-rail .rail { display: none; }
.thumb { display: grid; grid-template-columns: 20px 1fr; gap: 4px 6px; width: 100%; padding: 7px 8px 8px 2px; border: 0; background: transparent; border-radius: 10px; text-align: left; }
.thumb:hover { background: rgba(255, 255, 255, 0.05); }
.thumb .num { grid-row: 1 / span 2; padding-top: 2px; font-size: 11px; font-weight: 700; color: #667185; text-align: right; }
.thumb .pic { display: block; border-radius: 5px; overflow: hidden; background: #1a2130; outline: 1px solid #242d3e; }
.thumb .pic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.thumb .cap { font-size: 12px; line-height: 1.35; color: #8e98a9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb.on { background: rgba(95, 212, 200, 0.12); }
.thumb.on .num { color: var(--glow); }
.thumb.on .pic { outline: 2px solid var(--glow); }
.thumb.on .cap { color: #fff; font-weight: 600; }

.stage { flex: 1; min-width: 0; position: relative; display: grid; place-items: center; padding: 26px 30px 80px; container-type: size; background: radial-gradient(900px 500px at 50% 0%, #131b29, #0b1019 70%); }
.sheet { width: min(100cqw, calc(100cqh * var(--ratio, 1.7778))); aspect-ratio: var(--ratio, 1.7778); background: #fff; border-radius: 3px; box-shadow: 0 16px 60px rgba(0, 0, 0, 0.55); overflow: hidden; cursor: pointer; }
.sheet img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }

.dock { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; height: 46px; padding: 0 7px; background: rgba(22, 29, 42, 0.92); backdrop-filter: blur(8px); border: 1px solid #2a3344; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.dock button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #c3cad6; }
.dock button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dock button:disabled { opacity: 0.3; cursor: default; }
.dock svg { width: 18px; height: 18px; }
.dock i { width: 1px; height: 20px; margin: 0 4px; background: #2a3344; }
.dock .num { min-width: 68px; text-align: center; font-size: 13.5px; color: #8e98a9; font-variant-numeric: tabular-nums; }
.dock .num b { color: #fff; }

.stage:fullscreen { padding: 0; background: #000; }
.stage:fullscreen .sheet { border-radius: 0; box-shadow: none; }
.stage:fullscreen .dock { opacity: 0; transition: opacity 0.2s; }
.stage:fullscreen .dock:hover { opacity: 1; }
.stage:fullscreen #railBtn, .stage:fullscreen #railBtn + i { display: none; }

@media (max-width: 860px) {
  .hero-in, .wrap { width: calc(100% - 36px); }
  .eyebrow { margin-top: 40px; }
  .hero-in { padding-bottom: 40px; }
  .bar { flex-direction: column; align-items: stretch; border-bottom: 0; gap: 8px; }
  .tabs { border-bottom: 1px solid var(--line); }
  .bar-right { justify-content: space-between; padding-bottom: 0; }
  .grid { grid-template-columns: 1fr; gap: 20px; margin-top: 16px; }
  .rail { display: none; }
  .stage { padding: 12px 12px 74px; }
  .vtitle .cat, #histBtn { display: none; }
}

/* HTML 문서 보기 */
.html-frame { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 16px 60px rgba(0, 0, 0, 0.55); }
.html-doc .stage { padding: 14px 14px 74px; }
.html-doc .dock > :not(#fullBtn) { display: none; }
.html-doc .stage:fullscreen { padding: 0; }
.html-doc .stage:fullscreen .html-frame { border-radius: 0; }

/* 형식 딱지, 표지 없는 카드, 폴더 관리 단추 */
.cover .kind { position: absolute; left: 14px; bottom: 14px; padding: 4px 9px; border-radius: 6px; background: rgba(11, 16, 25, 0.72); backdrop-filter: blur(6px); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; }
.cover.blank { display: grid; place-items: center; background: linear-gradient(135deg, #0f1622, #1b2a3a); color: #5fd4c8; font-size: 15px; font-weight: 700; letter-spacing: 0.16em; }
.folders button.add { border-style: dashed; color: var(--accent-ink); }
.folders .hint { align-self: center; font-size: 13px; color: var(--mute); }
/* 로그인 정보 (머리 영역) */
.account { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #aab3c2; margin-right: 10px; white-space: nowrap; flex: none; }
.account .who { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.account a, .account button { height: 30px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 8px; border: 0; background: none; color: #aab3c2; font: inherit; font-weight: 600; cursor: pointer; }
.account a:hover, .account button:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
@media (max-width: 640px) { .account .who { display: none; } }

/* ── 로그인, 사용자 명단 ── */
.page-auth { min-height: 100%; background: var(--ink); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 48px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.auth-card.wide { max-width: 860px; }
.auth-logo { height: 26px; width: auto; align-self: flex-start; margin-bottom: 18px; }
.page-auth h1 { color: #fff; font-size: 26px; font-weight: 700; }
.auth-sub { color: #aab3c2; font-size: 14.5px; line-height: 1.6; }
.auth-ms { height: 46px; background: #fff; color: var(--ink); margin-top: 10px; }
.auth-ms:hover { background: var(--glow); }
.auth-ms svg { width: 18px; height: 18px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; color: #aab3c2; font-size: 13px; font-weight: 600; }
.auth-form input, .user-add input { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid #2c3446; background: #121827; color: #fff; }
.auth-form input:focus, .user-add input:focus { border-color: var(--accent); outline: none; }
.auth-form .btn { height: 46px; margin-top: 6px; background: #fff; color: var(--ink); }
.auth-form .btn:hover { background: var(--glow); }
.auth-msg { padding: 12px 14px; border-radius: 10px; background: rgba(217, 45, 32, 0.14); color: #ffb4ab; font-size: 14px; line-height: 1.5; }
.auth-foot { color: #6f7a8c; font-size: 13px; line-height: 1.6; margin-top: 8px; }
.auth-foot a { color: #aab3c2; text-decoration: underline; text-underline-offset: 3px; }
.auth-foot.top { margin: 0 0 4px; }
.user-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.user-add input { flex: 1 1 200px; }
.user-add .btn { height: 44px; background: #fff; color: var(--ink); }
.page-users .g-table { max-width: none; margin-top: 6px; }
.page-users .g-table td:first-child { white-space: normal; word-break: break-all; }
.page-users .g-table tr.off td { color: var(--mute); }
.page-users .g-table td.act { white-space: nowrap; text-align: right; }
.page-users .g-table td.act .btn { height: 32px; padding: 0 10px; font-size: 13px; }
@media (max-width: 640px) {
  .page-users .g-table th:nth-child(2), .page-users .g-table td:nth-child(2),
  .page-users .g-table th:nth-child(3), .page-users .g-table td:nth-child(3) { display: none; }
  .page-users .g-table th, .page-users .g-table td { padding: 10px 12px; }
}

/* ── 관리 메뉴, 로그인 설정 ── */
.admin-nav { margin: 0 0 18px; flex-wrap: wrap; }
.set-status { display: flex; align-items: center; gap: 10px; color: #aab3c2; font-size: 13.5px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.on { background: rgba(95, 212, 200, 0.14); color: var(--glow); }
.pill.off { background: rgba(255, 255, 255, 0.08); color: #aab3c2; }
.set-panel { margin-top: 8px; padding: 22px; border: 1px solid #232a3a; border-radius: 14px; background: rgba(255, 255, 255, 0.02); display: flex; flex-direction: column; gap: 14px; }
.set-panel h2 { color: #fff; font-size: 16px; font-weight: 700; }
.set-steps { padding-left: 20px; color: #c9d0dc; font-size: 14px; line-height: 1.7; display: flex; flex-direction: column; gap: 4px; }
.set-steps b { color: #fff; font-weight: 600; }
.set-steps a, .set-hint a { color: var(--glow); text-decoration: underline; text-underline-offset: 3px; }
.copy-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 10px; background: #121827; border: 1px solid #2c3446; }
.copy-row code { flex: 1; min-width: 0; color: #fff; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.copy-row .btn { height: 32px; padding: 0 12px; font-size: 13px; flex: none; }
.set-form { margin-top: 0; }
.set-form input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; }
.set-hint { color: #8b95a7; font-size: 13px; line-height: 1.6; }
.set-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.set-actions .btn { height: 44px; margin-top: 0; }
.set-actions .btn.dark { background: rgba(255, 255, 255, 0.08); color: #e6eaf1; }
.set-actions .btn.dark:hover { background: rgba(255, 255, 255, 0.15); }
.set-actions .btn:disabled { opacity: 0.5; cursor: default; }
.auth-msg.ok { background: rgba(95, 212, 200, 0.12); color: var(--glow); }
@media (max-width: 640px) { .set-panel { padding: 16px; } .set-actions .btn { flex: 1; } }

/* 접근 요청 */
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--mark); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; }
.req-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; padding: 18px; border: 1px solid rgba(249, 115, 22, 0.35); border-radius: 14px; background: rgba(249, 115, 22, 0.05); }
.req-box h2 { color: #fff; font-size: 16px; font-weight: 700; }
.req-box h2 span { color: var(--mark); font-size: 13px; font-weight: 600; margin-left: 6px; }
.req-box small { color: var(--mute); }

/* 폰트 관리: 저작권 확인, 기본 폰트 목록 */
.legal-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid rgba(249, 115, 22, 0.4); border-radius: 12px; background: rgba(249, 115, 22, 0.06); color: #e6eaf1; font-size: 13.5px; line-height: 1.65; }
.legal-box > b { color: #ffb27a; font-size: 14.5px; }
.legal-box ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: #c9d0dc; }
.legal-box ul b { color: #fff; font-weight: 600; }
.legal-box .agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; color: #fff; font-weight: 600; cursor: pointer; }
.legal-box .agree input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--mark); }
.set-actions.start { justify-content: flex-start; align-items: center; flex-wrap: wrap; }
.page-users .g-table.fonts small { color: var(--mute); }
.page-users .g-table .warn-t { color: #ffb27a; }
.page-users .g-table td.empty { color: var(--mute); text-align: center; }
.font-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.font-chips span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #c9d0dc; font-size: 12.5px; }

/* 올리기 창: 고른 파일, 케이스 안내 */
.up-files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; list-style: none; padding: 0; }
.up-files li { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13.5px; }
.up-files li b { flex: none; min-width: 42px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-ink); }
.up-files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.up-files li button { flex: none; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--sub); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.up-files li button:hover { background: var(--bg); color: var(--danger); }
.up-case { margin-top: 10px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); font-size: 13.5px; line-height: 1.6; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.up-case.warn { border-color: var(--mark); background: #fff4ea; }
.up-case .agree { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.up-case .agree input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--mark); }
.dlg-msg .warn-list { display: block; margin-bottom: 10px; color: #b45309; }
.dlg-msg .btn { height: 34px; font-size: 13px; }
.set-actions.start .btn.primary { background: #fff; color: var(--ink); }
.set-actions.start .btn.primary:hover:not(:disabled) { background: var(--glow); }
.set-steps code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 12.5px; }
.auth-form .agree.move-ok { flex-direction: row; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid rgba(249, 115, 22, 0.4); border-radius: 10px; background: rgba(249, 115, 22, 0.06); color: #ffd2b0; font-weight: 600; line-height: 1.5; cursor: pointer; }
.auth-form .agree.move-ok input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--mark); }
.auth-msg a, .dlg-msg a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.dlg-store { margin-top: 12px; padding: 11px 14px; border-radius: 10px; background: #fdecea; color: #a8241a; font-size: 13.5px; line-height: 1.55; }
.dlg-store a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
