/* 모두의 글 — 처음엔 초록·종이 톤, 11-09 맨 아래에서 인스타그램식으로 덮어씀 */
:root {
  --g900: #0f2e22; --g800: #1f4d3a; --g700: #2a6247; --g600: #2e7d5b; --g500: #3f9a6e;
  --g300: #9fcdb3; --g200: #cfe6d8; --g100: #e7f3ec; --g50: #f3f9f5;
  --paper: #fbfaf5; --bg: #fbfcfb;
  --ink: #18201c; --ink2: #46514b; --ink3: #7d8a83; --line: #e4ebe6; --line2: #d3ddd6;
  --like: #12a05c; --accent: #e0a33a; --danger: #c43c3c;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --nav-w: 72px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--g500); outline-offset: 2px; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: currentColor; }
.dim { color: var(--ink3); }

/* ---------- 로고 ---------- */
/* 로고: 금색·초록 나침반 + 펼친 책(11-11 사용자가 고른 그림, 바탕만 지움 — tools/cut_logo.py → public/logo.webp). 세로가 조금 긴 그림(0.9:1) */
.logo-mark { display: inline-block; width: 38px; height: 42px; flex: none; background: url(/logo.webp?v=5) center / contain no-repeat; filter: drop-shadow(0 2px 3px rgba(22,30,80,.12)); }
.logo-mark.lg { width: 58px; height: 64px; }
.logo-mark.xl { width: 94px; height: 104px; }
.logo-mark.dim { opacity: .35; filter: none; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 900; font-size: 20px; color: var(--g900); letter-spacing: -.02em; }

/* ---------- 틀: 휴대폰 ---------- */
.sidenav, .rightcol { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 16px; background: rgba(255,255,255,.93); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top-actions { display: flex; align-items: center; gap: 2px; }
#view { max-width: 600px; margin: 0 auto; padding-bottom: calc(72px + env(safe-area-inset-bottom)); min-height: 70vh; outline: none; }
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: calc(54px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
}
.bottomnav a { flex: 1; display: flex; justify-content: center; align-items: center; height: 54px; color: var(--ink2); }
.bottomnav a.on { color: var(--g900); }
.bottomnav a.on .ic { stroke-width: 2.5; }
.bottomnav a.on .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--g900); }
.bottomnav .bn-write .ic { width: 38px; height: 30px; padding: 4px 9px; border-radius: 10px; background: var(--g800); color: #fff; stroke-width: 2; }

/* ---------- 틀: 넓은 화면 ---------- */
@media (min-width: 768px) {
  .topbar, .bottomnav { display: none; }
  #app { display: flex; justify-content: center; gap: 40px; padding-left: var(--nav-w); }
  #view { flex: 0 1 600px; min-width: 0; margin: 0; padding: 8px 0 60px; }
  .sidenav {
    display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: var(--nav-w);
    padding: 22px 12px 18px; border-right: 1px solid var(--line); background: #fff; z-index: 20;
  }
  .sidenav .brand { padding: 0 3px; }
  .sidenav .brand-name, .sidenav .lbl { display: none; }
  .side-links { display: flex; flex-direction: column; gap: 4px; margin-top: 30px; }
  .side-links a, .side-foot a, .side-foot .side-link { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 10px; font-size: 15.5px; width: 100%; text-align: left; }
  .side-links a:hover, .side-foot a:hover, .side-foot .side-link:hover { background: var(--g50); }
  .side-foot .side-link { color: var(--g700); margin-bottom: 6px; }
  .side-links a.on { font-weight: 800; }
  .side-links a.on .ic { stroke-width: 2.5; }
  .side-foot { margin-top: auto; }
  .side-cta { padding: 0 8px; }
  #toast { bottom: 32px; }
}
@media (min-width: 1100px) {
  :root { --nav-w: 236px; }
  .sidenav { padding: 26px 14px 20px; }
  .sidenav .brand { padding: 0 10px; }
  .sidenav .brand-name, .sidenav .lbl { display: inline; }
}
@media (min-width: 1240px) {
  body[data-view="following"] .rightcol { display: block; flex: 0 0 300px; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow: auto; padding: 30px 2px 24px; }
}

/* ---------- 버튼·입력 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 10px;
  background: var(--g100); color: var(--g900); font-weight: 600; font-size: 14px; border: 1px solid transparent; white-space: nowrap; transition: background .15s;
}
.btn:hover { background: var(--g200); }
.btn.primary { background: var(--g800); color: #fff; }
.btn.primary:hover { background: var(--g700); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; font-size: 16px; padding: 0 22px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.danger { background: #fdecec; color: var(--danger); }
.btn.light { background: #fff; color: var(--g800); }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn:disabled { opacity: .55; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--g50); }
.link-btn { color: var(--g600); text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.row-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.row-btns.left { justify-content: flex-start; }
.fld { display: block; margin-bottom: 12px; }
.fld > span { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
.fld em { font-style: normal; font-weight: 400; color: var(--ink3); }
.fld input, .fld textarea, .inp {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; outline: none; color: var(--ink);
}
.fld textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.fld input:focus, .fld textarea:focus, .inp:focus { border-color: var(--g500); box-shadow: 0 0 0 3px var(--g100); }
.fld input:disabled { background: var(--g50); color: var(--ink3); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld-row .fld { margin-bottom: 4px; }
.fld-hint { font-size: 12.5px; color: var(--ink3); margin: 4px 0 12px; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink2); line-height: 1.55; margin-bottom: 8px; cursor: pointer; }
.agree input { margin-top: 2px; accent-color: var(--g700); width: 17px; height: 17px; flex: none; }
.agree a { color: var(--g700); text-decoration: underline; }
.form-err { color: var(--danger); font-size: 13.5px; min-height: 1em; margin: 4px 0 10px; }

/* ---------- 아바타 ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #fff;
  font-weight: 700; font-size: 14px; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--g300); font-family: var(--sans);
}
.avatar.xs { width: 26px; height: 26px; font-size: 12px; box-shadow: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12.5px; box-shadow: none; }
.avatar.md { width: 44px; height: 44px; font-size: 18px; }
.avatar.xl { width: 88px; height: 88px; font-size: 36px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g300); }

/* ---------- 겉장 ---------- */
.cover { text-align: left; position: relative; aspect-ratio: 4 / 5; container-type: inline-size; overflow: hidden; background: var(--cv, #1f4d3a); color: #fff; font-family: var(--serif); }
.cover .cv-in { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 9cqw 8.5cqw 7cqw; }
.cv-big, .cv-quote { display: none; }
.cv-top { display: flex; flex-direction: column; gap: 3.2cqw; }
.cv-cat { font-family: var(--sans); font-size: 3.4cqw; letter-spacing: .32em; font-weight: 600; opacity: .82; }
.cv-rule { display: block; width: 9cqw; height: .9cqw; background: var(--accent); border-radius: 1px; }
.cv-mid { margin-top: auto; display: flex; flex-direction: column; }
.cv-title { font-family: var(--pf, inherit); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; }
.cv-title.t-xl { font-size: calc(13cqw * var(--pfs, 1)); }
.cv-title.t-l { font-size: calc(10cqw * var(--pfs, 1)); }
.cv-title.t-m { font-size: calc(8cqw * var(--pfs, 1)); }
.cv-title.t-s { font-size: calc(6.6cqw * var(--pfs, 1)); }
.cv-title.t-xs { font-size: calc(5.4cqw * var(--pfs, 1)); }
.cv-sub { font-size: 4.2cqw; margin-top: 3cqw; opacity: .86; line-height: 1.45; }
.cv-bot { display: flex; justify-content: space-between; align-items: flex-end; gap: 4cqw; margin-top: 7cqw; font-family: var(--sans); }
.cv-author { font-size: 4cqw; font-weight: 600; }
.cover.sm .cv-mark, .cover.xs .cv-mark { display: none; }
.cv-mark { font-size: 2.8cqw; letter-spacing: .22em; opacity: .62; white-space: nowrap; }

.tpl-modern { background: radial-gradient(130% 90% at 100% 0%, color-mix(in srgb, var(--cv) 78%, #fff) 0%, var(--cv) 58%, color-mix(in srgb, var(--cv) 86%, #000) 100%); }

.tpl-classic { background: var(--cv); }
.tpl-classic .cv-in {
  inset: 4.5cqw; padding: 10cqw 8cqw 8cqw; align-items: center; text-align: center;
  box-shadow: inset 0 0 0 .45cqw rgba(255,247,225,.78), inset 0 0 0 1.6cqw var(--cv), inset 0 0 0 2cqw rgba(255,247,225,.5);
}
.tpl-classic .cv-top { align-items: center; }
.tpl-classic .cv-rule { display: none; }
.tpl-classic .cv-mid { margin: auto 0; align-items: center; }
.tpl-classic .cv-mid::before { content: ''; width: 16cqw; height: .4cqw; background: rgba(255,247,225,.7); margin-bottom: 5cqw; }
.tpl-classic .cv-bot { flex-direction: column; align-items: center; gap: 2cqw; margin-top: 0; }

.tpl-paper { background: #f5f0e3; color: #1d241f; }
.tpl-paper::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3.5cqw; background: var(--cv); }
.tpl-paper .cv-cat, .tpl-paper .cv-bot { color: var(--cv); opacity: 1; }
.tpl-paper .cv-rule { background: var(--cv); }
.tpl-paper .cv-mid { margin-top: 12cqw; }
.tpl-paper .cv-sub { color: #4a524c; }
.tpl-paper .cv-mid::after { content: ''; height: .35cqw; background: color-mix(in srgb, var(--cv) 45%, transparent); margin-top: 7cqw; }
.tpl-paper .cv-bot { margin-top: auto; }

.tpl-spine { background: #f3efe6; color: #1d241f; }
.tpl-spine::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 15cqw; background: var(--cv); box-shadow: inset -1.4cqw 0 1.8cqw rgba(0,0,0,.2); }
.tpl-spine .cv-in { left: 15cqw; padding-left: 8cqw; }
.tpl-spine .cv-cat { color: var(--cv); opacity: 1; }
.tpl-spine .cv-rule { background: var(--cv); }
.tpl-spine .cv-mid { margin: auto 0; }
.tpl-spine .cv-sub { color: #4a524c; }
.tpl-spine .cv-bot { color: var(--cv); margin-top: 0; }

.tpl-quote { background: var(--cv); }
.tpl-quote .cv-big { display: block; position: absolute; top: -9cqw; left: 3cqw; font-size: 62cqw; line-height: 1; opacity: .13; font-weight: 900; }
.tpl-quote .cv-mid { margin: auto 0; }
.tpl-quote .cv-quote { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; font-size: 6.2cqw; line-height: 1.62; font-weight: 600; order: 1; }
.tpl-quote .cv-quote:empty { display: none; }
.tpl-quote .cv-quote:not(:empty) ~ .cv-title { font-size: 4.6cqw; margin-top: 6cqw; opacity: .9; order: 2; }
.tpl-quote .cv-quote:not(:empty) ~ .cv-title::before { content: '— '; }
.tpl-quote .cv-sub { display: none; }
.tpl-quote .cv-title { order: 2; }

.tpl-initial { background: color-mix(in srgb, var(--cv) 11%, #fbfaf5); color: #1d241f; }
.tpl-initial .cv-big { display: block; position: absolute; right: -4cqw; top: 8cqw; font-size: 64cqw; line-height: 1; color: var(--cv); opacity: .92; font-weight: 900; }
.tpl-initial .cv-cat { color: var(--cv); opacity: 1; }
.tpl-initial .cv-rule { background: var(--cv); }
.tpl-initial .cv-mid { position: relative; }
.tpl-initial .cv-sub { color: #4a524c; }
.tpl-initial .cv-bot { color: var(--cv); }

.cover-img { background: #e3ebe6; }
.cover-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-img.ov::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,24,17,.82) 0%, rgba(8,24,17,.32) 42%, transparent 68%); }
.cv-ov { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 8cqw; color: #fff; }
.cv-ov .cv-cat { display: block; margin-bottom: 3cqw; }
.cv-ov .cv-author { display: block; margin-top: 4cqw; font-family: var(--sans); }
.cover.book { border-radius: 2px 6px 6px 2px; box-shadow: inset 4px 0 6px -3px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.1), 0 14px 30px -10px rgba(15,46,34,.4); }

/* ---------- 홈 피드 ---------- */
.feed-head {
  position: sticky; top: 56px; z-index: 10; padding: 10px 0 8px; background: rgba(251,252,251,.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) { .feed-head { top: 0; } }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line2);
  font-size: 14px; color: var(--ink2); white-space: nowrap; transition: background .15s;
}
.chip:hover { background: var(--g50); }
.chip.on { background: var(--g800); border-color: var(--g800); color: #fff; font-weight: 600; }
.feed-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 16px 0; }
.seg { display: inline-flex; background: var(--g100); border-radius: 999px; padding: 3px; }
.seg > * { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.seg > .on { background: #fff; color: var(--g800); font-weight: 700; box-shadow: 0 1px 3px rgba(15,46,34,.12); }
.seg.sm { margin: 0 16px 6px; }
.len-sel { display: flex; align-items: center; gap: 2px; color: var(--ink2); font-size: 13px; }
.len-sel .ic { width: 17px; height: 17px; color: var(--g600); }
.len-sel select { border: 0; background: transparent; font: inherit; color: inherit; padding: 4px 2px; cursor: pointer; outline: none; }

.card { background: #fff; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
@media (min-width: 600px) { .card { border: 1px solid var(--line); border-radius: 14px; margin: 18px 0; overflow: hidden; } }
.card-h { display: flex; align-items: center; gap: 7px; padding: 10px 6px 10px 14px; font-size: 14px; min-width: 0; }
.card-author { display: flex; align-items: center; gap: 9px; font-weight: 700; min-width: 0; }
.card-author .pen { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-h .dim { white-space: nowrap; font-size: 13px; }
.cat-pill { font-size: 12px; color: var(--g700); background: var(--g100); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.card-h .more { margin-left: auto; }
.card-cover { display: block; position: relative; -webkit-tap-highlight-color: transparent; }
.card-actions { display: flex; align-items: center; padding: 6px 6px 0; }
.card-actions .sp { flex: 1; }
.like.on, .big-like.on { color: var(--like); }
.like.on .ic { animation: pop .35s; }
.shelf.on { color: var(--g700); }
.card-body { padding: 0 16px; }
.likes { font-size: 14px; margin: 1px 0 7px; }
.card-title { display: block; font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.42; letter-spacing: -.015em; }
.card-sub { color: var(--ink2); font-size: 14.5px; margin-top: 2px; font-family: var(--serif); }
.card-sum { margin: 8px 0 0; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.68; color: #2b332e; }
.card-sum .pen { font-weight: 700; margin-right: 3px; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 8px; font-size: 14px; }
.tags a { color: var(--g600); }
.card-read { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--g50); color: var(--ink2); font-size: 13px; }
.card-read:hover { background: var(--g100); }
.card-read .ic { width: 18px; height: 18px; color: var(--g600); }
.card-read b { margin-left: auto; color: var(--g700); white-space: nowrap; }
.card-cmt { display: block; margin-top: 8px; color: var(--ink3); font-size: 14px; }
.burst { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: #fff; opacity: 0; z-index: 2; }
.burst .ic { width: 96px; height: 96px; stroke: none; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }
.burst.go { animation: burst .9s ease-out; }
.cta-card { margin: 16px 12px; padding: 24px 20px; text-align: center; border-radius: 16px; background: var(--g50); border: 1px dashed var(--g300); }
.cta-card b { font-family: var(--serif); font-size: 18px; display: block; margin: 10px 0 4px; }
.cta-card p { margin: 0 0 14px; color: var(--ink2); font-size: 14px; }
.cta-ic { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; background: var(--g800); color: #fff; align-items: center; justify-content: center; }
.cta-ic .ic { width: 20px; height: 20px; }
.sentinel { min-height: 1px; }
.feed-end { text-align: center; color: var(--ink3); font-size: 13.5px; padding: 28px 16px 36px; }
.feed-end a { color: var(--g600); font-weight: 600; margin-left: 4px; }
.spin { width: 26px; height: 26px; margin: 28px auto; border: 3px solid var(--g200); border-top-color: var(--g600); border-radius: 50%; animation: spin .8s linear infinite; }
.empty { text-align: center; padding: 72px 24px; }
.empty h2 { font-family: var(--serif); font-size: 20px; margin: 16px 0 6px; }
.empty p { color: var(--ink2); margin: 0; line-height: 1.6; }

/* ---------- 바둑판·목록 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.grid > .empty, .grid > .spin { grid-column: 1 / -1; }
.grid-item { position: relative; display: block; overflow: hidden; }
.grid-item:hover .cover { filter: brightness(.94); }
.gi-stat { position: absolute; right: 5px; bottom: 5px; display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: #fff; background: rgba(0,0,0,.38); padding: 2px 7px; border-radius: 999px; z-index: 2; }
.gi-stat .ic { width: 12px; height: 12px; stroke: none; }
.gi-badge { position: absolute; left: 5px; top: 5px; font-size: 11px; color: #fff; background: rgba(15,46,34,.75); padding: 2px 7px; border-radius: 999px; z-index: 2; }
.grid.shelf { gap: 26px 16px; padding: 4px 18px 20px; }
.grid.shelf .cover { border-radius: 2px 5px 5px 2px; box-shadow: inset 3px 0 5px -2px rgba(0,0,0,.25), 0 8px 16px -8px rgba(15,46,34,.45); }
.grid.shelf .grid-item { overflow: visible; }
.grid.shelf .grid-item::after { content: ''; position: absolute; left: -10px; right: -10px; bottom: -11px; height: 7px; background: linear-gradient(#d9cfb8, #c2b591); border-radius: 2px; box-shadow: 0 3px 4px -2px rgba(0,0,0,.2); }
.rows { border-top: 1px solid var(--line); }
.row-item { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.row-item:hover { background: var(--g50); }
.ri-cover { width: 74px; flex: none; }
.ri-text { min-width: 0; }
.ri-text b { font-family: var(--serif); font-size: 16px; display: block; line-height: 1.4; }
.ri-text p { margin: 4px 0 6px; font-size: 13.5px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }
.ri-text small { color: var(--ink3); font-size: 12.5px; }

/* ---------- 읽기 ---------- */
body[data-view="post"] { background: var(--paper); }
body[data-view="post"] .topbar { display: none; }
body[data-view="post"] #view { flex-basis: 720px; max-width: 720px; padding-top: 0; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--g600); transform-origin: 0 50%; transform: scaleX(0); }
.reader-bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 6px;
  background: rgba(251,250,245,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent;
}
.reader-bar.show-title { border-bottom-color: var(--line); }
.rb-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; padding: 0 4px; }
.reader-bar.show-title .rb-title { opacity: 1; }
.reader { padding: 6px 22px 40px; }
.reader-skel { padding: 80px 0; }
.r-head { text-align: center; padding: 16px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.r-cover { width: min(230px, 56vw); margin: 0 auto 26px; }
.r-cat { color: var(--g700); font-size: 13px; letter-spacing: .25em; font-weight: 700; }
.reader { --rf: var(--pf, var(--serif)); }
.reader.rf-serif { --rf: var(--serif); --pfs: 1 !important; }
.reader.rf-sans { --rf: var(--sans); --pfs: 1 !important; }
.r-title { font-family: var(--rf); font-size: calc(clamp(26px, 6vw, 36px) * var(--pfs, 1)); line-height: 1.36; margin: 10px 0 0; letter-spacing: -.02em; font-weight: 700; color: var(--ink); }
.r-sub { font-family: var(--rf); color: var(--ink2); font-size: 17px; margin: 10px 0 0; line-height: 1.6; }
.r-author { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; font-size: 14px; flex-wrap: wrap; }
.r-author > a { display: flex; align-items: center; gap: 8px; }
.r-meta { color: var(--ink3); font-size: 13px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.r-meta .ic { width: 16px; height: 16px; }
.r-notice { background: #fff6e0; border: 1px solid #f0d9a0; color: #7a5a14; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 24px; }
.r-figure { margin: 0 0 30px; }
.r-figure img { width: 100%; border-radius: 10px; display: block; }
.r-toc details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 30px; font-size: 14.5px; }
.r-toc summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 7px; list-style: none; color: var(--g800); }
.r-toc summary::-webkit-details-marker { display: none; }
.r-toc summary .ic { width: 18px; height: 18px; }
.r-toc ol { margin: 10px 0 2px; padding: 0; list-style: none; }
.r-toc li { padding: 4px 0; line-height: 1.5; }
.r-toc .toc-h3 { padding-left: 16px; font-size: 13.5px; }
.r-toc a { color: var(--ink2); }
.r-toc a:hover { color: var(--g600); }
.r-body { font-family: var(--rf); font-size: calc(var(--rs, 18px) * var(--pfs, 1)); line-height: 1.95; color: #222a25; }
.reader.rs-s { --rs: 16px; }
.reader.rs-l { --rs: 20px; }
.reader.rs-xl { --rs: 22px; }
.reader.rf-sans .r-body { line-height: 1.85; }
.r-body p { margin: 0 0 1.3em; }
.r-body h1, .r-body h2, .r-body h3, .r-body h4 { font-family: inherit; line-height: 1.42; margin: 2.1em 0 .8em; color: var(--g900); scroll-margin-top: 70px; }
.r-body h1 { font-size: 1.45em; }
.r-body h2 { font-size: 1.28em; padding-bottom: .35em; border-bottom: 1px solid var(--line); }
.r-body h3 { font-size: 1.1em; }
.r-body blockquote { margin: 1.6em 0; padding: .3em 0 .3em 1.2em; border-left: 3px solid var(--g500); color: var(--ink2); }
.r-body blockquote p:last-child { margin-bottom: 0; }
.r-body ul, .r-body ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.r-body li { margin: .25em 0; }
.r-body hr { border: 0; text-align: center; margin: 2.4em 0; height: 1em; }
.r-body hr::before { content: '* * *'; color: var(--ink3); letter-spacing: .5em; }
.r-body table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .84em; margin: 1.4em 0; display: block; overflow-x: auto; line-height: 1.6; }
.r-body th, .r-body td { border: 1px solid var(--line2); padding: 8px 10px; text-align: left; vertical-align: top; }
.r-body th { background: var(--g50); }
.r-body code { font-family: Consolas, 'D2Coding', monospace; background: var(--g100); padding: .1em .35em; border-radius: 4px; font-size: .86em; }
.r-body pre { background: #1b2233; color: #e8ecf4; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 0 0 1.3em; }
.r-body pre code { background: none; color: inherit; padding: 0; }
.r-body a { color: var(--g600); text-decoration: underline; text-underline-offset: 3px; }
.r-body strong { color: var(--ink); }
.r-refs { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.r-refs h2 { font-size: 15px; margin: 0 0 10px; color: var(--g800); }
.r-refs ol { padding-left: 1.4em; color: var(--ink2); line-height: 1.75; margin: 0; }
.r-refs a { color: var(--g600); word-break: break-all; }
.reader > .tags { margin-top: 24px; }
.r-end { text-align: center; margin: 52px 0 32px; }
.r-end-mark { font-family: var(--serif); color: var(--ink3); font-size: 14px; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.r-end-mark::before, .r-end-mark::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.r-end-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.big-like, .big-btn { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-weight: 600; font-size: 15px; }
.big-like .ic, .big-btn .ic { width: 22px; height: 22px; }
.big-like.on { border-color: #f3c0c2; background: #fff5f5; }
.big-like.on .ic { animation: pop .35s; }
.big-btn.on { color: var(--g700); border-color: var(--g300); background: var(--g50); }
.r-authorbox { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.r-authorbox > div { flex: 1; min-width: 0; }
.r-authorbox p { margin: 2px 0 0; color: var(--ink2); font-size: 14px; }
.r-comments { margin-top: 34px; }
.r-comments h2, .r-more h2 { font-size: 17px; margin: 0 0 8px; }
.r-comments h2 span { color: var(--g600); }
.c-item { display: flex; gap: 10px; padding: 10px 0; }
.c-main { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.6; }
.c-main .pen { font-weight: 700; margin-right: 3px; }
.c-body { white-space: pre-wrap; }
.c-main small { font-size: 12.5px; }
.c-empty { font-size: 14px; padding: 6px 0; }
.c-form { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.c-form textarea { flex: 1; border: 0; resize: none; font: inherit; font-size: 15px; outline: none; background: transparent; padding: 4px 0; min-height: 26px; line-height: 1.55; }
.r-more { margin-top: 38px; }
.prefs h3 { margin: 0 0 16px; font-size: 17px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 14px; }
.pref-row .seg button { padding: 6px 14px; border-radius: 999px; color: var(--ink2); }
.pref-row .seg button.on { background: #fff; color: var(--g800); font-weight: 700; box-shadow: 0 1px 3px rgba(15,46,34,.12); }

/* ---------- 작가 ---------- */
.profile { padding-top: 22px; }
.pf-top { display: flex; gap: 24px; padding: 0 18px 22px; align-items: flex-start; }
.pf-info { flex: 1; min-width: 0; }
.pf-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-name h1 { font-size: 22px; margin: 0 6px 0 0; font-family: var(--serif); }
.pf-stats { display: flex; gap: 6px 16px; list-style: none; padding: 0; margin: 12px 0 10px; font-size: 14px; flex-wrap: wrap; color: var(--ink2); }
.pf-stats b { font-weight: 700; color: var(--ink); }
.pf-bio { margin: 0 0 6px; font-size: 14.5px; white-space: pre-wrap; line-height: 1.6; }
.pf-info small { font-size: 12.5px; }
.pf-tabs { display: flex; justify-content: center; gap: 44px; border-top: 1px solid var(--line); margin-bottom: 3px; }
.pf-tabs a { display: flex; align-items: center; gap: 6px; padding: 14px 0 12px; font-size: 13px; font-weight: 600; color: var(--ink3); border-top: 1.5px solid transparent; margin-top: -1px; }
.pf-tabs a.on { color: var(--ink); border-top-color: var(--ink); }
.pf-tabs .ic { width: 16px; height: 16px; }
@media (max-width: 480px) {
  .pf-top { gap: 16px; }
  .pf-top .avatar.xl { width: 72px; height: 72px; font-size: 30px; }
  .pf-tabs { gap: 28px; }
}

/* ---------- 홈: 서점(표지 격자) ---------- */
body[data-view="home"] #view { max-width: none; }
@media (min-width: 768px) {
  body[data-view="home"] #view { flex: 1 1 auto; max-width: 1400px; padding: 10px 28px 60px; }
}
.store-head { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.store-head .search-box { margin: 0 16px; }
.store-head .feed-tools { padding: 0 16px; }
.kw-row { display: flex; align-items: center; gap: 4px 12px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; font-size: 13.5px; white-space: nowrap; }
.kw-row::-webkit-scrollbar { display: none; }
.kw-row:empty { display: none; }
.kw-lbl { color: var(--ink3); font-size: 12.5px; font-weight: 600; flex: none; }
.kw-row a { color: var(--g700); flex: none; }
.kw-row a:hover { text-decoration: underline; }
@media (min-width: 768px) {
  .store-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "search tools" "chips chips" "kw kw"; gap: 12px 18px; padding: 12px 0 18px; }
  .store-head .search-box { grid-area: search; margin: 0; }
  .store-head .feed-tools { grid-area: tools; padding: 0; gap: 14px; }
  .store-head .chips { grid-area: chips; flex-wrap: wrap; overflow: visible; padding: 0; }
  .store-head .kw-row { grid-area: kw; flex-wrap: wrap; overflow: visible; padding: 0; }
  .grid.store-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px 12px; }
  .store-grid .grid-item { border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 16px -10px rgba(15,46,34,.45); transition: transform .15s, box-shadow .15s; }
  .store-grid .grid-item:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 14px 24px -12px rgba(15,46,34,.55); }
  .store-grid .grid-item:hover .cover { filter: none; }
}
/* 작은 표지(격자)에서 분류·필명이 너무 작아지지 않게 */
.cover.sm .cv-cat { font-size: 4.2cqw; letter-spacing: .2em; }
.cover.sm .cv-author { font-size: 5cqw; }
.cover.sm .cv-sub { font-size: 4.8cqw; }

/* ---------- 구독 ---------- */
.fw-head { border-bottom: 1px solid var(--line); }
.fw-head .page-title { padding: 18px 16px 4px; }
.fw-authors { display: flex; gap: 12px; overflow-x: auto; padding: 12px 16px 14px; scrollbar-width: none; }
.fw-authors::-webkit-scrollbar { display: none; }
.fw-authors:empty { display: none; }
.fw-a { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); }
.fw-a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-a:hover span { color: var(--g800); }
.suggest { margin: 0 16px 30px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.suggest .sec-title { padding: 14px 16px 6px; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.sg-item > a { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.sg-item > a > span { display: flex; flex-direction: column; min-width: 0; }
.sg-item small { color: var(--ink3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 관리(운영자 전용) ---------- */
body[data-view="admin"] #view { max-width: none; }
@media (min-width: 768px) { body[data-view="admin"] #view { flex: 1 1 auto; max-width: 1280px; padding: 10px 28px 60px; } }
.admin .page-title { padding: 22px 16px 4px; }
.adm-tabs { display: flex; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.adm-tabs a { padding: 7px 15px; border-radius: 999px; font-size: 14px; color: var(--ink2); white-space: nowrap; }
.adm-tabs a:hover { background: var(--g50); }
.adm-tabs a.on { background: var(--g800); color: #fff; font-weight: 600; }
#adm-body { padding: 16px; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.adm-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; display: flex; flex-direction: column; gap: 3px; }
.adm-stat b { font-size: 23px; color: var(--g900); font-variant-numeric: tabular-nums; }
.adm-stat span { font-size: 13px; color: var(--ink2); }
.adm-stat small { font-size: 11.5px; color: var(--ink3); }
.adm-alert { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: #fff4e5; color: #8a4b00; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.adm-alert a { text-decoration: underline; font-weight: 600; }
.adm-note { font-size: 12.5px; margin: 16px 0 0; }
.adm-note.top { margin: 0 0 12px; }
.adm-search { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.adm-search input, .adm-search select { height: 36px; border: 1px solid var(--line2); border-radius: 9px; padding: 0 10px; font: inherit; font-size: 14px; background: #fff; outline: none; }
.adm-search input:focus { border-color: var(--g500); }
.adm-search input { flex: 1; min-width: 160px; }
.adm-search .ic { color: var(--ink3); width: 18px; height: 18px; }
.adm-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th { text-align: left; font-weight: 600; color: var(--ink3); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--g50); }
.adm-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover td { background: #f8fafd; }
.adm-table td.wrap { white-space: normal; min-width: 180px; max-width: 380px; line-height: 1.5; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table a { color: var(--g800); }
.adm-table a:hover { text-decoration: underline; }
.adm-table .warn { color: var(--danger); }
.adm-acts { display: flex; gap: 4px; }
.adm-acts .btn { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.adm-empty { text-align: center; color: var(--ink3); padding: 28px 12px !important; }
.adm-more { text-align: center; padding: 12px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--g100); color: var(--g800); vertical-align: 1px; }
.badge.hidden { background: #fdecec; color: var(--danger); }
.badge.draft { background: #eef0f2; color: var(--ink3); }
.badge.admin { background: var(--g800); color: #fff; }

/* ---------- 검색·서재·설정·안내 ---------- */
.search-page { padding: 14px 0; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 0 16px 12px; padding: 0 14px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--line2); }
.search-box:focus-within { border-color: var(--g500); box-shadow: 0 0 0 3px var(--g100); }
.search-box input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 15.5px; outline: none; height: 100%; min-width: 0; }
.search-box .ic { color: var(--ink3); width: 20px; height: 20px; }
.search-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.search-tag { padding: 0 16px 10px; font-size: 14px; }
.sec-title { font-size: 15px; padding: 14px 16px 10px; margin: 0; }
.page-title { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 22px; padding: 22px 18px 0; margin: 0; }
.shelf-page > .dim { padding: 4px 18px 18px; margin: 0; font-size: 14px; }
.settings { padding-bottom: 40px; }
.card-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 16px; }
.card-box h2 { font-size: 16px; margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: 70px 1fr; gap: 8px; font-size: 14px; margin: 0 0 8px; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; }
.danger-box h2 { color: var(--danger); }
.danger-box p { font-size: 14px; }
.doc { padding: 22px 22px 60px; font-size: 15.5px; line-height: 1.8; }
.doc h1 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; }
.doc h2 { font-family: var(--serif); font-size: 18px; margin: 28px 0 8px; color: var(--g900); }
.doc p, .doc ul { margin: 0 0 12px; color: var(--ink2); }
.doc ul { padding-left: 1.3em; }
.doc b { color: var(--ink); }
.doc-hero { text-align: center; padding: 24px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.doc-hero h1 { font-size: 30px; margin-top: 14px; }
.doc-hero p { font-family: var(--serif); color: var(--g700); font-size: 17px; margin: 4px 0 0; }

/* ---------- 오른쪽 칸 ---------- */
.rc-me { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 20px; }
.rc-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rc-user > span, .rc-me > div { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.rc-me small { color: var(--ink3); font-size: 12.5px; }
.rc-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.rc-box h3 { font-size: 13px; color: var(--ink3); margin: 0 0 6px; font-weight: 700; letter-spacing: .04em; }
.rc-top { margin: 0; padding: 0; list-style: none; counter-reset: rc; }
.rc-top li { counter-increment: rc; display: flex; gap: 10px; padding: 7px 0; }
.rc-top li::before { content: counter(rc); font-family: var(--serif); font-weight: 900; color: var(--g600); width: 14px; flex: none; }
.rc-top b { display: block; font-size: 14px; font-family: var(--serif); line-height: 1.45; }
.rc-top small { color: var(--ink3); font-size: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13.5px; }
.tag-cloud a { color: var(--g700); }
.rc-foot { color: var(--ink3); font-size: 12px; line-height: 1.9; padding: 4px; }

/* ---------- 모달·알림 ---------- */
#modal-root { display: none; }
#modal-root.open { display: block; }
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(12,28,20,.5); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px 24px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: rise .2s; }
.modal-x { position: absolute; right: 8px; top: 8px; z-index: 3; }
.m-small { max-width: 360px; }
.m-wide { max-width: 640px; }
.m-auth { max-width: 410px; }
.m-full { max-width: 820px; height: calc(100vh - 32px); height: calc(100dvh - 32px); padding: 0; background: var(--paper); }
.m-full .progress { display: none; }
.preview-head { position: sticky; top: 0; z-index: 2; background: rgba(251,250,245,.96); padding: 14px 56px 12px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.preview-body .reader { padding-top: 10px; }
.m-sheet { max-width: 400px; padding: 6px 0; }
.m-sheet .modal-x { display: none; }
@media (max-width: 600px) {
  .modal-bg:has(.m-sheet) { align-items: flex-end; padding: 0; }
  .m-sheet { border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 22px; font-size: 15px; text-align: left; }
.sheet-item:hover { background: var(--g50); }
.sheet-item .ic { width: 20px; height: 20px; }
.sheet-item.danger { color: var(--danger); }
.sheet-item.cancel { justify-content: center; color: var(--ink3); border-top: 1px solid var(--line); margin-top: 4px; }
.confirm p { margin: 4px 0 16px; line-height: 1.65; }
.confirm .row-btns { justify-content: flex-end; }
.confirm .inp { margin-bottom: 4px; }
.auth-brand { text-align: center; }
.auth-brand h2 { font-family: var(--serif); margin: 10px 0 4px; font-size: 22px; }
.auth-brand p { color: var(--ink2); font-size: 14px; margin: 0 0 18px; line-height: 1.55; }
.auth-tabs { display: flex; background: var(--g100); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; height: 36px; border-radius: 9px; font-weight: 600; color: var(--ink2); font-size: 14px; }
.auth-tabs[hidden] { display: none; }
.auth-help { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 14px; font-size: 13.5px; color: var(--ink3); }
.auth-help .link-btn { color: var(--ink2); text-decoration: none; }
.auth-help .link-btn:hover { color: var(--g700); text-decoration: underline; }
.auth-back { display: block; margin: 12px auto 0; font-size: 13.5px; color: var(--ink3); }
.auth-note { margin: 0 0 14px; padding: 11px 13px; border-radius: 10px; background: var(--g50); color: var(--ink2); font-size: 13.5px; line-height: 1.65; }
.auth-sent { text-align: center; padding: 4px 4px 14px; }
.auth-sent p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.65; }
.auth-sent .dim { font-size: 13px; }
.sent-ic { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; align-items: center; justify-content: center; background: var(--g100); color: var(--g800); margin-bottom: 12px; }
.sent-ic .ic { width: 28px; height: 28px; stroke-width: 2.4; }
.reset-page { max-width: 460px; margin: 0 auto; padding: 36px 0 60px; }
.reset-page .card-box { padding: 28px 24px; }
.reset-page h1 { font-family: var(--serif); font-size: 21px; margin: 14px 0 6px; }
.reset-page .card-box > .dim { margin: 0 0 18px; font-size: 14px; }
.auth-tabs .on { background: #fff; color: var(--g800); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
#toast {
  position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: #151b29; color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200;
  max-width: calc(100vw - 32px); width: max-content; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.22); line-height: 1.5;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 글쓰기 ---------- */
body[data-view="write"] { background: #eef3ef; }
body[data-view="write"] .sidenav, body[data-view="write"] .topbar, body[data-view="write"] .bottomnav, body[data-view="write"] .rightcol { display: none !important; }
body[data-view="write"] #app { display: block; padding-left: 0; }
body[data-view="write"] #view { max-width: none; padding: 0; margin: 0; }
.w-loading { text-align: center; padding: 120px 0; color: var(--ink3); }
.w-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 10px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.w-state { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.w-state b { font-size: 14px; }
.w-saved { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-tools { display: flex; align-items: center; gap: 6px; }
.w-panel-btn { display: none; }
.w-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 24px; align-items: start; }
.w-main { min-width: 0; }
.w-paper { background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(15,46,34,.06), 0 10px 30px -14px rgba(15,46,34,.16); padding: 40px 48px 20px; max-width: 840px; margin: 0 auto; }
.w-title { display: block; width: 100%; border: 0; outline: none; resize: none; font-family: var(--pf, var(--serif)); font-size: calc(32px * var(--pfs, 1)); font-weight: 700; line-height: 1.35; padding: 0; overflow: hidden; color: var(--ink); background: transparent; letter-spacing: -.02em; }
.w-sub { display: block; width: 100%; border: 0; outline: none; font-family: var(--pf, var(--serif)); font-size: calc(18px * var(--pfs, 1)); color: var(--ink2); padding: 10px 0 0; background: transparent; }
.w-title::placeholder, .w-sub::placeholder { color: #b6c0ba; }
.w-cats { display: flex; gap: 12px; align-items: flex-start; padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.w-label { flex: none; font-size: 13px; font-weight: 700; color: var(--g700); padding-top: 6px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.w-cats .chip { font-size: 13px; padding: 5px 11px; }
.w-cats.need { animation: shake .4s; }
.w-cats.need .w-label { color: var(--danger); }
.w-count { text-align: right; font-size: 12.5px; color: var(--ink3); padding-top: 10px; min-height: 30px; }
.w-tip { max-width: 840px; margin: 12px auto 0; font-size: 12.5px; color: var(--ink3); display: flex; gap: 6px; align-items: flex-start; padding: 0 8px; line-height: 1.6; }
.w-tip .ic { width: 16px; height: 16px; margin-top: 2px; }
.w-note { max-width: 840px; margin: 0 auto 12px; display: flex; align-items: center; gap: 8px; background: var(--g100); color: var(--g900); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.w-note .ic { width: 18px; height: 18px; color: var(--g600); }
.w-note .link-btn { margin-left: auto; white-space: nowrap; }
.w-note .link-btn + .link-btn { margin-left: 12px; color: var(--ink3); }
.w-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 12px; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 13px; border: 1px solid var(--line2); border-radius: 999px; background: #fff; font-size: 13.5px; white-space: nowrap; transition: .15s; }
.dd-btn:hover { background: var(--g50); }
.dd-btn .dd-k { color: var(--ink3); }
.dd-btn .dd-v { color: var(--g800); font-weight: 700; font-family: var(--sans); }
.dd-btn .dd-v.empty { color: var(--accent); }
.dd-btn .ic { width: 16px; height: 16px; color: var(--ink3); transition: transform .15s; }
.dd-btn.open { border-color: var(--g500); background: var(--g50); }
.dd-btn.open .ic { transform: rotate(180deg); }
.dd-btn.need { border-color: var(--danger); animation: shake .4s; }
.dd-pop { margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--g50); animation: rise .15s; }
.dd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dd-head b { font-size: 14px; }
.dd-head span { font-size: 12.5px; color: var(--ink3); }
.dd-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.dd-grid .chip { font-size: 13.5px; }
.dd-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.font-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line2); border-radius: 10px; background: #fff; text-align: left; line-height: 1.4; }
.font-opt:hover { border-color: var(--g300); }
.font-opt.on { border-color: var(--g600); box-shadow: 0 0 0 3px var(--g100); }
.font-opt span { color: var(--ink2); }
.dd-pop .st-grid { margin-top: 0; }
.dd-pop .st-card { padding: 12px 14px; }
.install { text-align: center; }
.install h3 { font-family: var(--serif); margin: 12px 0 8px; font-size: 19px; }
.install > p { line-height: 1.75; font-size: 14.5px; color: var(--ink2); margin: 0; }
.install-alt { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.install-alt p { font-size: 13.5px; line-height: 1.7; color: var(--ink2); margin: 0; }
.w-side { position: sticky; top: 80px; background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(15,46,34,.06), 0 10px 30px -14px rgba(15,46,34,.16); max-height: calc(100vh - 100px); overflow: auto; }
.w-side-head { display: none; }
.w-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.w-tabs button { flex: 1; padding: 13px 2px 11px; font-size: 13px; font-weight: 600; color: var(--ink3); border-bottom: 2px solid transparent; white-space: nowrap; }
.w-tabs .on { color: var(--g800); border-bottom-color: var(--g800); }
.w-pane { padding: 18px; }
.cv-preview { width: 176px; margin: 4px auto 0; }
.w-help { font-size: 12.5px; color: var(--ink3); line-height: 1.6; margin: 8px 0 12px; }
.w-help.center { text-align: center; }
.w-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.w-block h4 { margin: 0 0 10px; font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.w-block h4 small { font-weight: 400; color: var(--ink3); font-size: 12px; }
.w-block.off .tpl-grid, .w-block.off .swatches, .w-block.off .fld { opacity: .4; }
.img-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border: 1.5px dashed var(--g300); border-radius: 12px; background: var(--g50); cursor: pointer; text-align: center; color: var(--g800); font-size: 14px; }
.img-drop small { color: var(--ink3); font-size: 12px; line-height: 1.5; }
.img-drop:hover { background: var(--g100); }
.busy { opacity: .5; pointer-events: none; }
.img-has { display: flex; gap: 12px; }
.img-has img { width: 84px; height: 105px; object-fit: cover; border-radius: 6px; flex: none; background: var(--g50); }
.img-opts { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; min-width: 0; }
.img-opts label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.img-opts label.btn { gap: 0; }
.img-opts .off { opacity: .45; }
.img-opts input { accent-color: var(--g700); }
.img-opts .row-btns { margin-top: 4px; }
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl-opt { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); padding: 4px; border-radius: 8px; border: 2px solid transparent; }
.tpl-opt.on { border-color: var(--g600); color: var(--g800); font-weight: 700; }
.tpl-thumb { width: 100%; display: block; border-radius: 3px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 14px 2px; }
.sw { aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line2); border-radius: 10px; padding: 6px 8px; min-height: 44px; background: #fff; }
.tag-input:focus-within { border-color: var(--g500); box-shadow: 0 0 0 3px var(--g100); }
.tag-input input { flex: 1; min-width: 120px; border: 0; outline: none; height: 30px; font: inherit; font-size: 14px; padding: 0; box-shadow: none !important; }
.tag-list { display: contents; }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--g100); color: var(--g800); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.tag-chip button { width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; color: var(--g700); }
.w-refs { width: 100%; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 13.5px; line-height: 1.7; resize: vertical; outline: none; }
.w-refs:focus { border-color: var(--g500); box-shadow: 0 0 0 3px var(--g100); }
.stat-hero { text-align: center; padding: 8px 0 16px; }
.stat-hero b { font-family: var(--serif); font-size: 40px; color: var(--g800); display: block; line-height: 1.15; }
.stat-hero span { font-size: 13px; color: var(--ink3); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-grid div { background: var(--g50); border-radius: 10px; padding: 10px 4px; text-align: center; }
.stat-grid b { display: block; font-size: 17px; color: var(--g900); }
.stat-grid span { font-size: 11.5px; color: var(--ink3); }
.milestone { margin: 18px 0 8px; }
.ms-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; gap: 8px; }
.ms-bar { height: 8px; background: var(--g100); border-radius: 999px; overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--g500), var(--g700)); border-radius: 999px; transition: width .3s; }
.starters h2 { font-family: var(--serif); margin: 0 0 4px; font-size: 22px; }
.starters > p { margin: 0; font-size: 14px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.st-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line2); text-align: left; background: #fff; transition: .15s; }
.st-card:hover { border-color: var(--g500); background: var(--g50); }
.st-card b { font-family: var(--serif); font-size: 16px; }
.st-card span { font-size: 13px; color: var(--ink3); }

/* Toast UI 편집기를 책 원고처럼 */
.w-paper .toastui-editor-defaultUI { border: 0; font-family: var(--sans); }
.w-paper .toastui-editor-defaultUI-toolbar { background: #fff; border-bottom: 1px solid var(--line); padding: 0; position: sticky; top: 56px; z-index: 5; }
.w-paper .toastui-editor-toolbar { position: sticky; top: 56px; z-index: 5; background: #fff; }
.w-paper .toastui-editor-main { background: #fff; }
.w-paper .toastui-editor-ww-container .toastui-editor-contents { padding: 20px 2px; }
.w-paper .toastui-editor-contents { font-family: var(--pf, var(--serif)); font-size: calc(17.5px * var(--pfs, 1)); line-height: 1.9; color: #222a25; }
.w-paper .toastui-editor-contents p { margin: 0 0 .9em; }
.w-paper .toastui-editor-contents h1, .w-paper .toastui-editor-contents h2, .w-paper .toastui-editor-contents h3 { font-family: inherit; border-bottom: 0; color: var(--g900); margin: 1.4em 0 .6em; }
.w-paper .toastui-editor-contents blockquote { border-left-color: var(--g500); }
.w-paper .toastui-editor-contents .placeholder, .w-paper .ProseMirror .placeholder { color: #b6c0ba; }
.w-paper .toastui-editor-md-container .toastui-editor { font-size: 15px; }
.w-paper .toastui-editor-mode-switch { border-top: 1px solid var(--line); background: #fff; }
.w-paper .toastui-editor-mode-switch .tab-item.active { color: var(--g800); border-top-color: transparent; }
.w-paper .toastui-editor-md-tab-container { background: var(--g50); }

body.w-focus { background: var(--paper); }
body.w-focus .w-side, body.w-focus .w-tip, body.w-focus [data-w="preview"], body.w-focus [data-w="draft"], body.w-focus .w-panel-btn { display: none !important; }
body.w-focus .w-grid { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
body.w-focus .w-paper { box-shadow: none; background: transparent; }
body.w-focus .w-paper .toastui-editor-main, body.w-focus .w-paper .toastui-editor-toolbar, body.w-focus .w-paper .toastui-editor-defaultUI-toolbar, body.w-focus .w-paper .toastui-editor-mode-switch { background: var(--paper); }
body.w-focus .w-paper .toastui-editor-toolbar { opacity: .45; transition: opacity .2s; }
body.w-focus .w-paper .toastui-editor-toolbar:hover { opacity: 1; }

@media (max-width: 1000px) {
  .w-grid { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .w-panel-btn { display: inline-flex; }
  .w-side {
    position: fixed; inset: 0; z-index: 60; border-radius: 0; max-height: none; box-shadow: none;
    transform: translateY(100%); transition: transform .25s, visibility .25s; visibility: hidden;
  }
  body.w-panel-open .w-side { transform: none; visibility: visible; }
  body.w-panel-open { overflow: hidden; }
  .w-side-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 3; }
  .w-tabs { top: 53px; }
  .w-paper { padding: 26px 20px 16px; border-radius: 12px; }
  .w-title { font-size: calc(26px * var(--pfs, 1)); }
}
@media (max-width: 600px) {
  .hide-s { display: none; }
  .w-tools { gap: 4px; }
  .w-tools .btn.sm { padding: 0 9px; }
  .w-panel-btn span { display: none; }
  .w-cats { flex-direction: column; gap: 8px; }
  .w-grid { padding: 0; }
  .w-paper { border-radius: 0; box-shadow: none; padding: 22px 16px 16px; }
  .w-note { margin: 10px 12px 0; }
  .fld-row { grid-template-columns: 1fr; gap: 0; }
}

@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
@keyframes burst { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.12); } 30% { transform: scale(.95); } 45% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   모두의 글(11-09) — 인스타그램식으로 다시 다듬음. 위 규칙을 덮어씀
   흰 바탕·얇은 회색 선·고딕·검정 글자 + 강조색 한 가지(11-10 저녁 초록 → 로고에 맞춘 파랑, 따봉만 초록). 책 표지 대신 글 카드
   ===================================================================== */
:root {
  --g900: #1a3f9e; --g800: #2f6fe4; --g700: #2357c9; --g600: #2f6fe4; --g500: #5b9bf8;
  --g300: #a9c8fb; --g200: #d6e5fd; --g100: #eef0f4; --g50: #f7f8fb;
  --paper: #fff; --bg: #fff;
  --ink: #151b29; --ink2: #3d4558; --ink3: #6b7385; --line: #eef0f4; --line2: #d7dce6;
  --accent: #2f6fe4;
  --brand-grad: linear-gradient(135deg, #5CC8FF 0%, #3B82F6 55%, #5B5CEB 100%);
}
body { background: #fff; color: var(--ink); }
.ic { stroke-width: 1.75; }
.dim { color: var(--ink3); }
.brand { font-family: var(--sans); font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.045em; }
.btn { background: #eef0f4; color: var(--ink); border-radius: 9px; font-weight: 600; }
.btn:hover { background: #d7dce6; }
.btn.primary { background: var(--g800); color: #fff; }
.btn.primary:hover { background: var(--g700); }
.btn.danger { background: #fdecec; color: var(--danger); }
.link-btn { color: var(--g700); }
.chip { border-color: var(--line2); color: var(--ink); }
.chip:hover { background: #f7f8fb; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d7dce6; }
.avatar.xs, .avatar.sm { box-shadow: none; }

/* 틀: 위·아래 막대, 왼쪽 메뉴 */
.topbar { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line2); }
.bottomnav { border-top: 1px solid var(--line2); background: #fff; }
.bottomnav a { color: var(--ink); }
.bottomnav a.on .ic { stroke-width: 2.6; }
.bottomnav .bn-write .ic { background: none; color: var(--ink); width: 26px; height: 26px; padding: 0; border: 2px solid var(--ink); border-radius: 8px; stroke-width: 2.2; }
@media (min-width: 768px) {
  .sidenav { border-right: 1px solid var(--line2); }
  .side-links { margin-top: 34px; }
  .side-links a, .side-foot a, .side-foot .side-link { font-size: 16px; padding: 12px; border-radius: 10px; color: var(--ink); }
  .side-links a:hover, .side-foot a:hover, .side-foot .side-link:hover { background: rgba(20,32,70,.06); }
  .side-links a.on { font-weight: 700; }
  .side-foot .side-link { color: var(--ink); }
}
.page-title { font-family: var(--sans); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.empty h2 { font-family: var(--sans); font-weight: 700; font-size: 19px; }
.auth-brand h2, .reset-page h1, .install h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -.03em; }
.doc h1, .doc h2, .doc-hero p { font-family: var(--sans); }
.doc h2 { color: var(--ink); }
.doc-hero p { color: var(--ink3); }
.pf-name h1 { font-family: var(--sans); font-weight: 700; font-size: 20px; }
.rc-top li::before, .rc-top b { font-family: var(--sans); }
.rc-top li::before { color: var(--ink3); }

/* 홈 머리: 검색 + 펼침 필터 */
body[data-view="home"] #view, body[data-view="search"] #view { max-width: none; }
@media (min-width: 768px) {
  body[data-view="home"] #view, body[data-view="search"] #view { flex: 1 1 auto; max-width: 1240px; padding: 14px 28px 60px; }
}
.home-head { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 14px; }
@media (min-width: 768px) { .home-head { flex-direction: row; align-items: center; padding: 6px 0 18px; } .home-head .search-box { flex: 0 1 380px; } }
.search-box { position: relative; margin: 0; height: 40px; border: 0; border-radius: 10px; background: #eef0f4; padding: 0 12px; }
.search-box:focus-within { box-shadow: none; border: 0; background: #e6e9f0; }
.search-box input { font-size: 15px; }
.search-box .ic { width: 18px; height: 18px; color: var(--ink3); }
.kw-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 45; background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.14); padding: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; }
.kw-pop[hidden] { display: none; }
.kw-pop .kw-lbl { width: 100%; font-size: 12.5px; font-weight: 600; color: var(--ink3); }
.kw-pop a { color: var(--g900); }
.kw-pop a:hover { text-decoration: underline; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fdrop { position: relative; }
.fbtn { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.fbtn:hover { background: #f7f8fb; }
.fbtn .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.fbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.f-reset { font-size: 13.5px; color: var(--ink3); padding: 0 4px; }
.f-reset:hover { color: var(--ink); text-decoration: underline; }
.fpop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 45; background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.15); padding: 6px; min-width: 190px; }
.fpop[hidden] { display: none; }
.fopt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14.5px; text-align: left; white-space: nowrap; color: var(--ink); }
.fopt:hover { background: #f3f5f9; }
.fopt.on { font-weight: 700; }
.fopt .ic { width: 18px; height: 18px; color: var(--g800); stroke-width: 2.4; }
.cat-pop { width: min(400px, calc(100vw - 32px)); padding: 12px; }
.fpop-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fpop-grid .chip { font-size: 13.5px; padding: 6px 12px; }

/* 글 카드 */
.tcard { background: #fff; border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px 6px; transition: background .15s; }
.tcard:hover { background: #fbfcfe; }
.tc-h { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.tc-author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tc-author b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-time { color: var(--ink3); font-size: 13px; white-space: nowrap; }
.tc-time::before { content: '· '; }
.tc-cat { margin-left: auto; font-size: 12px; color: var(--ink3); background: #f0f2f6; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tc-cat:hover { background: #e6e9f0; color: var(--ink); }
.tc-body { display: block; margin-top: 10px; }
.tc-title { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.45; letter-spacing: -.015em; margin-bottom: 6px; }
.tc-text { margin: 0; font-family: var(--pf, var(--sans)); font-size: calc(15.5px * var(--pfs, 1)); line-height: 1.7; color: #1f2637; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.tc-img { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-top: 10px; border: 1px solid var(--line); background: #f0f2f6; }
.tc-more { display: inline-block; margin-top: 8px; font-size: 13.5px; color: var(--ink3); font-weight: 600; }
.tc-body:hover .tc-more { color: var(--ink); }
.tc-f { display: flex; align-items: center; gap: 2px; margin: 6px -8px 0; }
.tc-act { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 8px; border-radius: 999px; color: var(--ink3); font-size: 13px; }
.tc-act .ic { width: 20px; height: 20px; }
.tc-act b { font-weight: 600; }
.tc-act:hover { color: var(--ink); background: rgba(20,32,70,.05); }
.tc-act.like.on { color: var(--like); }
.tc-act.shelf.on { color: var(--ink); }
.tc-f .sp { flex: 1; }

/* 여러 칸 배치(가장 짧은 칸에 다음 카드) */
.masonry { display: flex; gap: 14px; align-items: flex-start; }
.m-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.masonry > .empty, .masonry > .spin { flex: 1; }
.masonry.one { display: block; }
.masonry.one .m-col { gap: 0; }
.masonry.one .tcard { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
@media (min-width: 600px) { .masonry.one .m-col { gap: 12px; } .masonry.one .tcard { border: 1px solid var(--line2); border-radius: 16px; } }
#pf-grid.masonry, #shelf-grid.masonry { margin-top: 12px; }
@media (min-width: 600px) { #pf-grid.masonry, #shelf-grid.masonry, .r-more .masonry { padding: 0 12px; } }

/* 구독: 한 줄 타임라인 */
.timeline { display: flex; flex-direction: column; }
.timeline .tcard { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
@media (min-width: 600px) { .timeline { gap: 12px; padding: 12px 0; } .timeline .tcard { border: 1px solid var(--line2); border-radius: 16px; } }
.fw-head { border-bottom: 1px solid var(--line); }
.fw-a .avatar { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--g800); }

/* 읽기: 표지 없이 글쓴이부터 */
.reader { padding: 8px 20px 40px; }
.r-head { text-align: left; padding: 12px 0 18px; margin-bottom: 22px; }
.r-author { justify-content: space-between; margin: 0; gap: 12px; }
.r-author > a { gap: 10px; }
.r-author > a > span { display: flex; flex-direction: column; line-height: 1.35; }
.r-author > a b { font-size: 15px; }
.r-author > a small { color: var(--ink3); font-size: 13px; }
.r-title { font-size: calc(clamp(22px, 5vw, 28px) * var(--pfs, 1)); margin: 18px 0 0; line-height: 1.4; }
.r-sub { text-align: left; }
.r-meta { justify-content: flex-start; gap: 8px; margin-top: 12px; }
.r-meta > * + *::before { content: '·'; margin-right: 8px; color: var(--line2); }
.r-cat { letter-spacing: 0; font-size: 13px; color: var(--ink); font-weight: 600; }
.r-body { font-size: calc(var(--rs, 17px) * var(--pfs, 1)); line-height: 1.85; color: #1f2637; }
.r-body h1, .r-body h2, .r-body h3 { color: var(--ink); }
.r-figure { margin: 0 0 24px; }
.r-figure img { border-radius: 14px; border: 1px solid var(--line); }
.r-end-mark { font-family: var(--sans); }
.big-like, .big-btn { border-radius: 999px; }
.r-more h2 { font-size: 16px; }
.progress i { background: var(--ink); }

/* 글쓰기: 빈칸 하나 */
body[data-view="write"] { background: #fff; }
.cmp { max-width: 680px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.cmp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.cmp-h { font-size: 16px; }
.cmp-saved { flex: 1; text-align: right; font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp .w-note { margin: 12px 16px 0; background: #f3f5f9; color: var(--ink); }
.cmp-main { flex: 1; padding: 16px 18px 8px; }
.cmp-who { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cmp-who div { display: flex; flex-direction: column; line-height: 1.35; }
.cmp-who small { color: var(--ink3); font-size: 12.5px; }
.cmp-title { display: block; width: 100%; border: 0; outline: none; font: inherit; font-size: 19px; font-weight: 700; letter-spacing: -.02em; padding: 4px 0 8px; background: transparent; }
.cmp-title::placeholder { color: #aab1bf; font-weight: 600; }
.cmp-body { display: block; width: 100%; min-height: 220px; border: 0; outline: none; resize: none; font: inherit; font-size: 17px; line-height: 1.8; padding: 4px 0; background: transparent; color: #151b29; overflow: hidden; }
.cmp-body::placeholder { color: #a2aaba; }
.cmp-img figure { position: relative; margin: 12px 0 0; }
.cmp-img img { display: block; max-width: 100%; max-height: 420px; border-radius: 14px; border: 1px solid var(--line); }
.cmp-img .icon-btn { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; }
.cmp-bar { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.cmp-tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 999px; font-size: 14px; color: var(--ink2); cursor: pointer; }
.cmp-tool:hover { background: #f0f2f6; }
.cmp-tool .ic { width: 20px; height: 20px; color: var(--g800); }
.cmp-tool.on { color: var(--ink); font-weight: 700; }
.cmp-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cmp-draft { justify-self: center; }
.cmp-bar .fpop { top: auto; bottom: calc(100% + 8px); }
.cmp-count { justify-self: end; font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.cmp-help { margin: 0; padding: 0 18px 18px; font-size: 12px; color: var(--ink3); }
.font-pop { min-width: 200px; }
@media (max-width: 600px) { .cmp-tool span { display: none; } .cmp-tool.on span { display: inline; } .cmp-help { display: none; } }
.reader-bar { background: rgba(255,255,255,.97); }
.r-end-mark::before, .r-end-mark::after { background: var(--line); }

/* =====================================================================
   배경(11-10) — 화면 뒤에 무료 사진(또는 파스텔)을 깔고, 카드·메뉴는 그 위에 흰 판으로 띄움
   사진은 /bg/<이름>.webp(PC)·-m.webp(휴대폰 세로)·-t.webp(고르기 미리보기). 고르기는 app.js openBgPicker
   ===================================================================== */
html { background: #f3f3f5; }
body, body[data-view] { background: transparent; }
#bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none; background: var(--bg-c, #f3f3f5); }
:root[data-bg="photo"] #bg { background: var(--bg-c) var(--bg-img) center / cover no-repeat; }
@media (max-width: 767px) and (orientation: portrait) { :root[data-bg="photo"] #bg { background-image: var(--bg-img-m); } }
:root[data-bg="photo"] #bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,32,70,.06), rgba(0,0,0,0) 35%, rgba(0,0,0,.12)); }
:root[data-bg="pastel"] #bg, .bgp-item.bgp-pastel, .bg-thumb.bgp-pastel {
  background:
    radial-gradient(42% 55% at 6% 8%, #ffcfbf 0%, rgba(255,207,191,0) 72%),
    radial-gradient(40% 52% at 94% 10%, #bcd6ff 0%, rgba(188,214,255,0) 72%),
    radial-gradient(52% 60% at 86% 94%, #d9c9ff 0%, rgba(217,201,255,0) 72%),
    radial-gradient(52% 60% at 10% 90%, #bdf0d6 0%, rgba(189,240,214,0) 72%),
    #f7f4fb;
}
:root[data-bg="plain"] #bg { background: #f7f8fb; }

/* 유리판: 메뉴·위아래 막대·검색·필터 */
.sidenav { background: rgba(255,255,255,.74); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); border-right: 1px solid rgba(255,255,255,.55); }
.topbar, .bottomnav { background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); border-color: rgba(255,255,255,.6); }
.side-links a:hover, .side-foot a:hover, .side-foot .side-link:hover { background: rgba(255,255,255,.7); }
.side-links a.on { background: rgba(255,255,255,.85); box-shadow: 0 1px 2px rgba(22,30,80,.06); }
.search-box { background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 1px 2px rgba(22,30,80,.06), 0 8px 20px -12px rgba(22,30,80,.3); }
.search-box:focus-within { background: #fff; }
.fbtn { background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-color: rgba(255,255,255,.75); box-shadow: 0 1px 2px rgba(22,30,80,.06); }
.fbtn:hover { background: #fff; }
.fbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.f-reset { background: rgba(255,255,255,.88); padding: 7px 12px; border-radius: 999px; color: var(--ink2); }

/* 흰 판(사진 위에 바로 놓이던 머리·안내) */
.panel { background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255,255,255,.7); border-radius: 20px; box-shadow: 0 1px 2px rgba(22,30,80,.05), 0 14px 34px -18px rgba(22,30,80,.4); }
.fw-head.panel { margin: 12px 10px 2px; border-bottom: 1px solid rgba(255,255,255,.7); }
.fw-head.panel .page-title { padding: 16px 18px 2px; }
.profile { padding-top: 12px; }
.pf-card { margin: 0 10px 4px; overflow: hidden; }
.pf-card .pf-top { padding: 22px 20px 20px; }
.pf-card .pf-tabs { margin-bottom: 0; }
.shelf-page .page-head { margin: 12px 10px 2px; padding: 16px 20px 16px; }
.shelf-page .page-head .page-title { padding: 0; }
.shelf-page .page-head > .dim { margin: 4px 0 0; font-size: 14px; }
@media (min-width: 768px) { .fw-head.panel, .pf-card, .shelf-page .page-head { margin-left: 0; margin-right: 0; } }
.empty { background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-radius: 22px; margin: 16px 10px; box-shadow: 0 14px 34px -18px rgba(22,30,80,.4); }
.feed-end { width: fit-content; max-width: calc(100% - 32px); margin: 18px auto 30px; padding: 11px 18px; border-radius: 16px; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink2); box-shadow: 0 8px 22px -14px rgba(22,30,80,.45); }
.suggest { border: 1px solid rgba(255,255,255,.7); box-shadow: 0 14px 34px -18px rgba(22,30,80,.4); }

/* 글 카드: 사진 위에 뜬 흰 카드 */
.tcard { background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.7); border-radius: 18px; box-shadow: 0 1px 2px rgba(22,30,80,.06), 0 12px 32px -16px rgba(22,30,80,.38); transition: transform .18s, box-shadow .18s, background .15s; }
.tcard:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(22,30,80,.06), 0 20px 40px -16px rgba(22,30,80,.45); }
:root[data-bg="plain"] .tcard { border-color: var(--line2); box-shadow: none; }
:root[data-bg="plain"] .tcard:hover { transform: none; }
.masonry, .m-col { gap: 16px; }
.masonry.one { padding: 0 10px; }
.masonry.one .m-col { gap: 10px; }
.masonry.one .tcard, .timeline .tcard { border: 1px solid rgba(255,255,255,.7); border-radius: 18px; }
.timeline { gap: 10px; padding: 10px; }
@media (min-width: 600px) { .masonry.one { padding: 0; } .masonry.one .m-col { gap: 14px; } .timeline { gap: 14px; padding: 14px 0; } }
@media (min-width: 600px) { #pf-grid.masonry, #shelf-grid.masonry, .r-more .masonry { padding: 0; } }
#pf-grid.masonry, #shelf-grid.masonry { margin-top: 14px; }

/* 읽기·설정·소개 등 글 화면: 흰 종이 한 장 */
body[data-view="post"] #view, body[data-view="settings"] #view, body[data-view="about"] #view, body[data-view="terms"] #view,
body[data-view="privacy"] #view, body[data-view="admin"] #view, body[data-view="reset"] #view { background: #fff; }
@media (max-width: 767px) {
  body[data-view="post"] #view, body[data-view="settings"] #view, body[data-view="about"] #view, body[data-view="terms"] #view,
  body[data-view="privacy"] #view, body[data-view="admin"] #view, body[data-view="reset"] #view { min-height: 100vh; }
}
@media (min-width: 768px) {
  body[data-view="settings"] #view, body[data-view="about"] #view, body[data-view="terms"] #view,
  body[data-view="privacy"] #view, body[data-view="admin"] #view, body[data-view="reset"] #view {
    align-self: flex-start; margin: 24px 0 48px; border-radius: 24px; box-shadow: 0 2px 6px rgba(22,30,80,.05), 0 30px 70px -30px rgba(22,30,80,.55);
  }
  body[data-view="post"] #view { align-self: flex-start; margin: 0 0 48px; border-radius: 0 0 26px 26px; min-height: 100vh; box-shadow: 0 30px 70px -30px rgba(22,30,80,.55); }
  body[data-view="post"] .reader { padding: 8px 48px 44px; }
}
.reader-bar { background: rgba(255,255,255,.96); }
body[data-view="write"] #view { background: transparent; }
.cmp { background: #fff; }
@media (min-width: 768px) { .cmp { box-shadow: 0 0 70px -24px rgba(22,30,80,.55); } }

/* 배경 고르기 */
.modal-bg:has(.bgp) { background: rgba(10,12,20,.22); }
.modal.bgp { max-width: 660px; padding: 22px 20px 18px; }
.bgp-h { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.bgp-h .ic { color: var(--g800); }
.bgp-sub { margin: 0 0 14px; color: var(--ink3); font-size: 13.5px; }
.bgp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bgp-item { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; background: #ddd center / cover no-repeat; overflow: hidden; text-align: left; outline: 2.5px solid transparent; outline-offset: 2px; transition: transform .12s, outline-color .12s; }
.bgp-item:hover { transform: translateY(-1px); }
.bgp-item > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 8px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.6)); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.25; }
.bgp-item small { display: block; font-size: 11px; font-weight: 500; opacity: .9; }
.bgp-item .ic { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #fff; color: var(--g800); stroke-width: 3; opacity: 0; }
.bgp-item.on { outline-color: var(--g800); }
.bgp-item.on .ic { opacity: 1; }
.bgp-item.bgp-plain { background: #f7f8fb; box-shadow: inset 0 0 0 1px var(--line2); }
.bgp-pastel > span, .bgp-plain > span { background: none; color: var(--ink); }
.bgp-credit { margin: 14px 0 0; font-size: 12px; color: var(--ink3); }
.bgp-credit a { text-decoration: underline; }
@media (max-width: 480px) { .bgp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.credit-list { columns: 2; column-gap: 24px; font-size: 13.5px; }
.credit-list li { break-inside: avoid; }
@media (max-width: 480px) { .credit-list { columns: 1; } }
:root[data-tone="dark"] .sidenav, :root[data-tone="dark"] .topbar, :root[data-tone="dark"] .bottomnav { background: rgba(255,255,255,.9); }
:root[data-tone="dark"] .tcard { background: rgba(255,255,255,.985); }
:root[data-tone="dark"] .panel, :root[data-tone="dark"] .empty, :root[data-tone="dark"] .feed-end,
:root[data-tone="dark"] .search-box, :root[data-tone="dark"] .fbtn:not(.on), :root[data-tone="dark"] .f-reset { background: rgba(255,255,255,.94); }
.progress i { background: var(--brand-grad); }
/* 로그인 창 안내 문구가 없을 때도 탭과 간격 유지(11-10 홍보 문구 뺌) */
.auth-brand p[hidden] { display: block; height: 0; margin: 0 0 14px; overflow: hidden; }
/* 글쓰기: 제목 칸 자리에 카테고리 필터 단추(11-10) */
.cmp-catdd { margin: 0 0 8px; }
.cmp .cmp-catdd .fbtn:not(.on) { background: #f0f2f6; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--ink2); }
.cmp .cmp-catdd .fbtn:not(.on):hover { background: #e6e9f0; }
.cmp-catdd .fpop { width: min(360px, calc(100vw - 36px)); }
/* 11-10 흰 판을 살짝 투명하게: 뒤 배경 사진이 은은히 비치게(글 카드·글쓰기·읽기 등). 흐림을 같이 줘 글자는 또렷하게 */
.tcard { background: rgba(255,255,255,.84); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); }
.tcard:hover { background: rgba(255,255,255,.92); }
/* 밤 사진(어두운 톤)에서도 낮과 같이 비치게(11-10 밤 "반투명 왜 없어졌지?" — 전엔 .93으로 거의 불투명) */
:root[data-tone="dark"] .tcard { background: rgba(255,255,255,.84); }
:root[data-tone="dark"] .tcard:hover { background: rgba(255,255,255,.92); }
:root[data-bg="plain"] .tcard { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cmp { background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); }
.cmp-top, .cmp-bar { background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
body[data-view="post"] #view, body[data-view="settings"] #view, body[data-view="about"] #view, body[data-view="terms"] #view,
body[data-view="privacy"] #view, body[data-view="admin"] #view, body[data-view="reset"] #view {
  background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
}
:root[data-tone="dark"] .cmp,
:root[data-tone="dark"] body[data-view="post"] #view, :root[data-tone="dark"] body[data-view="settings"] #view, :root[data-tone="dark"] body[data-view="about"] #view,
:root[data-tone="dark"] body[data-view="terms"] #view, :root[data-tone="dark"] body[data-view="privacy"] #view, :root[data-tone="dark"] body[data-view="admin"] #view,
:root[data-tone="dark"] body[data-view="reset"] #view { background-color: rgba(255,255,255,.87); }
.reader-bar { background: rgba(255,255,255,.75); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
/* 글 카드 따봉 옆 [구독](11-10). doFollow 가 글자와 primary(아직 구독 안 함)를 바꿈 */
.tc-follow { height: 28px; margin: 0 6px 0 2px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(20,32,70,.06); color: var(--ink3); white-space: nowrap; }
.tc-follow.primary { background: rgba(47,111,228,.12); color: #2357c9; }
.tc-follow:hover { filter: brightness(.96); }
/* 설정 > 화면: 배경 고르기(11-10 위 막대·왼쪽 메뉴에서 옮김) */
.bg-row { display: flex; align-items: center; gap: 12px; }
.bg-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.bg-row small { font-size: 12.5px; }
.bg-thumb { flex: none; width: 72px; height: 46px; border-radius: 10px; background: #ddd center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.bg-thumb.bgp-plain { background: #f7f8fb; }
.bg-row .btn .ic { width: 17px; height: 17px; }
/* 로그인 버튼(PC 왼쪽 아래·휴대폰 위): 배경 하늘빛에 맞춘 푸른색(11-10 — 금색은 "색이 상한다"로 바꿈), 가입은 그 아래 작은 글씨 */
.btn.primary.side-cta, .top-actions .btn.primary { background: linear-gradient(135deg, #5b9bf8 0%, #2f6fe4 55%, #2357c9 100%); color: #fff; border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -10px rgba(35,87,201,.8); font-weight: 800; }
.btn.primary.side-cta:hover, .top-actions .btn.primary:hover { background: linear-gradient(135deg, #6aa6fa 0%, #3a79ea 55%, #2a60d2 100%); }
.btn.primary.side-cta .ic { color: #fff; }
.side-sub { display: block; width: 100%; margin-top: 10px; text-align: center; font-size: 13px; color: var(--ink3); }
.side-sub b { color: #2357c9; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.side-sub:hover b { color: #1a44a3; }
@media (max-width: 1099px) { .side-sub { display: none; } }

/* 왼쪽 메뉴: 화면 가장자리에서 12px 띄운 둥근 유리 판(11-10 저녁 "세련되게"). 위는 밝고 아래로 갈수록 배경이 더 비침
   지금 있는 메뉴는 흰 알약 + 파란 아이콘으로 표시 */
@media (min-width: 768px) {
  :root { --nav-w: 88px; }
  .sidenav {
    left: 12px; top: 12px; bottom: 12px; width: calc(var(--nav-w) - 12px); padding: 22px 12px 16px; border-radius: 26px;
    background: linear-gradient(165deg, rgba(255,255,255,.84) 0%, rgba(255,255,255,.62) 46%, rgba(255,255,255,.5) 100%);
    -webkit-backdrop-filter: blur(30px) saturate(185%); backdrop-filter: blur(30px) saturate(185%);
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 30px 60px -30px rgba(22,30,80,.5), 0 4px 14px -6px rgba(22,30,80,.14);
  }
  .sidenav .brand { padding: 0 3px 18px; border-bottom: 1px solid rgba(22,30,80,.07); }
  .side-links { margin-top: 16px; }
  .side-links a, .side-foot a, .side-foot .side-link { color: #1b2130; transition: background .15s, box-shadow .15s; }
  .side-links a:hover, .side-foot a:hover, .side-foot .side-link:hover { background: rgba(255,255,255,.62); }
  .side-links a.on { background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(22,30,80,.06), 0 8px 18px -10px rgba(22,30,80,.3); }
  .side-links a.on .ic { color: #2f6fe4; }
  :root[data-tone="dark"] .sidenav { background: linear-gradient(165deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.68) 46%, rgba(255,255,255,.58) 100%); }
}
@media (min-width: 1100px) {
  :root { --nav-w: 252px; }
  .sidenav { padding: 26px 14px 18px; }
  .sidenav .brand { padding: 0 10px 20px; margin: 0 2px; }
}
.topbar .logo-mark { width: 36px; height: 40px; }
/* 나침반 로고는 그림이 촘촘해 메뉴에선 조금 크게(11-11) */
@media (min-width: 1100px) { .sidenav .brand .logo-mark { width: 48px; height: 54px; } .sidenav .brand { gap: 10px; } }

/* =====================================================================
   색감(11-11 "지금 좋은데, 색감만 조금 더") — 하늘 배경에 맞춰 색을 한 계열로 모음
   검정·회색 → 남색이 살짝 도는 먹색·회색, 그림자도 남색. 강조는 파랑 하나(따봉·#태그·구독), 아바타는 밝기·채도를 맞춘 10색(app.js AV)
   ===================================================================== */
:root { --like: #2f6fe4; }
.big-like.on { border-color: #bcd3fb; background: #eef4ff; }
/* 사진 위 은은한 남색 그늘: 위는 맑게, 아래로 갈수록 살짝 깊게 */
:root[data-bg="photo"] #bg::after { background: linear-gradient(180deg, rgba(18,32,80,.07), rgba(18,32,80,0) 38%, rgba(18,32,80,.16)); }
/* 글 카드: 위쪽 가장자리에 얇은 빛, 아래는 남색 그림자 */
.tcard { border-color: rgba(255,255,255,.78); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(22,30,80,.06), 0 14px 32px -18px rgba(22,30,80,.42); }
.tcard:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 4px rgba(22,30,80,.06), 0 22px 42px -18px rgba(22,30,80,.48); }
.tc-author b { color: var(--ink); }
.tc-cat { background: rgba(20,32,70,.055); color: var(--ink3); font-weight: 600; }
.tc-cat:hover { background: rgba(47,111,228,.1); color: #2357c9; }
/* 본문 속 #태그는 파랑(인스타·트위터처럼) */
.tc-text .ht, .r-body .ht { color: #2459cf; font-weight: 500; }
.tags a { color: #2459cf; }
.tc-more { color: #7a8396; }
.tc-follow.primary { background: rgba(47,111,228,.11); color: #2357c9; }
.tc-follow:not(.primary) { background: rgba(20,32,70,.06); color: var(--ink3); }
.avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d7dce6; }
.avatar.xs, .avatar.sm { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.avatar { text-shadow: 0 1px 1px rgba(10,20,60,.18); }

/* PC 홈·검색 오른쪽 위 글쓰기 버튼(11-15 사용자: "오른쪽 상단에 가장 눈에 띄는 디자인으로"): 화면에서 가장 크고 진한 버튼.
   색은 로그인 버튼과 같은 푸른색(금색은 "색이 상한다"). 휴대폰은 아래 가운데 글쓰기 버튼을 그대로 씀 */
.write-cta { display: none; }
@media (min-width: 768px) {
  .home-head .write-cta {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex: none; height: 48px; padding: 0 26px 0 22px; border-radius: 999px;
    background: linear-gradient(135deg, #5b9bf8 0%, #2f6fe4 55%, #2357c9 100%); color: #fff; border: 1px solid rgba(255,255,255,.4);
    font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 26px -10px rgba(35,87,201,.85);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .home-head .write-cta .ic { width: 20px; height: 20px; color: #fff; stroke-width: 2.3; }
  .home-head .write-cta:hover { background: linear-gradient(135deg, #6aa6fa 0%, #3a79ea 55%, #2a60d2 100%); transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 16px 30px -10px rgba(35,87,201,.9); }
  .home-head .write-cta:active { transform: none; }
  .home-head .write-cta:focus-visible { outline: 3px solid rgba(47,111,228,.45); outline-offset: 3px; }
}
/* 좁은 PC 화면에서 글쓰기 버튼 때문에 필터가 두 줄로 꺾이지 않게, 검색칸이 먼저 줄어듦 */
@media (min-width: 768px) { .home-head .search-box { flex: 1 1 0; max-width: 380px; min-width: 150px; } }

/* ---------- 11-16 글쓰기 화면 다시(사용자: "새 글쓰기 눌렀을 때 화면이 뭔가 이상한데, 다른 모범 사례 참조해서") ----------
   전: 반투명 판이 화면 높이 그대로 세로 띠처럼 깔려 사진이 비쳐 흐릿하고, 도구 막대가 글에서 먼 화면 맨 아래에 붙어 있었음.
   참고: X·스레드 새 글 창(배경을 어둡게 깔고 가운데 카드, 위에 닫기·제목·올리기, 글 바로 밑에 도구)
         + 브런치·미디엄 글쓰기(불투명 흰 종이, 넉넉한 여백).
   지킨 것(11-10 사용자 결정): 위 [올리기] 하나 · 아래 가운데 [임시 저장] · 제목 칸 자리에 카테고리 단추 */
:root .cmp, :root[data-tone="dark"] .cmp { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.cmp-top, .cmp-bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-user-select: none; user-select: none; }
.cmp-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 10px 12px 10px 8px; border-bottom: 1px solid #edf0f5; }
.cmp-top > .icon-btn { justify-self: start; }
.cmp-h { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; }
.cmp-act { justify-self: end; display: flex; align-items: center; gap: 12px; min-width: 0; }
.cmp-saved { flex: 0 1 auto; min-width: 0; }
.btn.primary.cmp-pub { height: 38px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 800; white-space: nowrap; color: #fff;
  background: linear-gradient(135deg, #5b9bf8 0%, #2f6fe4 55%, #2357c9 100%); border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 18px -10px rgba(35,87,201,.8); transition: opacity .15s ease; }
.btn.primary.cmp-pub:hover { background: linear-gradient(135deg, #6aa6fa 0%, #3a79ea 55%, #2a60d2 100%); }
.btn.primary.cmp-pub.is-empty { opacity: .42; box-shadow: none; }
.cmp-who, .cmp-catdd > .fbtn { -webkit-user-select: none; user-select: none; }
.cmp-who { gap: 12px; }
.cmp-who b { font-size: 15.5px; }
.cmp-body { line-height: 1.85; }
.cmp-body::placeholder { color: #9ca5b6; }
.cmp-bar { border-top: 1px solid #edf0f5; }
.btn.sm.cmp-draft { height: 34px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid #d5dbe6; color: var(--ink); font-size: 13.5px; font-weight: 700; }
.btn.sm.cmp-draft:hover { background: #f4f6fa; }
.cmp-help { margin: 0; }
@media (max-width: 767px) {
  .cmp { min-height: 100vh; min-height: 100dvh; }
  .cmp-help { display: none; }
}
@media (max-width: 520px) { .cmp-saved { display: none; } }
@media (min-width: 768px) {
  /* 뒤 배경은 어둡게 깔아 글쓰기 카드에 눈이 가게(사진 배경일 때). 흰·파스텔 배경은 살짝만 */
  body[data-view="write"] #bg::after { content: ''; position: absolute; inset: 0; background: rgba(20,30,60,.06); }
  :root[data-bg="photo"] body[data-view="write"] #bg::after { background: rgba(12,18,36,.38); }
  .cmp { max-width: 720px; min-height: 0; margin: 44px auto 0; border-radius: 22px;
    box-shadow: 0 2px 6px rgba(10,20,50,.08), 0 40px 90px -30px rgba(5,10,30,.65); }
  .cmp-top { border-radius: 22px 22px 0 0; padding: 12px 16px 12px 12px; }
  .cmp-main { padding: 26px 40px 14px; }
  .cmp .w-note { margin: 16px 40px 0; }
  .cmp-body { min-height: 300px; }
  .cmp-bar { border-radius: 0 0 22px 22px; padding: 10px 16px; }
  .cmp-help { max-width: 720px; margin: 14px auto 48px; padding: 0 16px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.85); }
  :root:not([data-bg="photo"]) .cmp-help { color: var(--ink3); }
}

/* ---------- 11-20 글쓰기 창을 보던 화면 위에 띄움 ----------
   사용자: "새 글 버튼 눌렀을 때 화면이 확 바뀌는 게 아니라, 기존 메인 화면은 그대로 있고 글쓰기 창이 하나 위로 띄워졌으면.
           창이 조금 더 컸으면 시원할 것 같다. 글 쓸 맛이 나야."
   PC: 보던 화면을 어둡게 깔고 가운데 큰 창(폭 최대 960·높이는 화면에 맞춤). 위·아래 막대는 고정, 글은 창 안에서 스크롤.
   휴대폰: 아래에서 올라오는 시트(위쪽에 보던 화면이 살짝 보임). 자판이 올라오면 도구 막대가 자판 바로 위로(app.js visualViewport) */
html.cmp-on, html.cmp-on body { overflow: hidden; }
.cmp-layer { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100dvh; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px 14px;
  background: rgba(12,18,34,.48); animation: cmpBgIn .2s ease both; overscroll-behavior: contain; }
.cmp-layer > .spin { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.cmp-layer.out { animation: cmpBgOut .18s ease both; pointer-events: none; }
.cmp-layer .cmp { flex: 0 1 920px; width: min(960px, 100%); max-width: none; height: auto; min-height: 0; margin: 0;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 24px;
  box-shadow: 0 2px 8px rgba(10,20,50,.12), 0 50px 120px -30px rgba(5,10,30,.75);
  animation: cmpIn .26s cubic-bezier(.2,.8,.2,1) both; }
.cmp-layer.out .cmp, .cmp-layer.out .cmp-help { animation: cmpOut .18s ease both; }
.cmp-layer .cmp-top { position: static; flex: none; border-radius: 0; padding: 14px 20px 14px 14px; }
.cmp-layer .cmp-h { font-size: 17px; }
.cmp-layer .btn.primary.cmp-pub { height: 42px; padding: 0 24px; font-size: 15.5px; }
.cmp-layer .w-note { flex: none; margin: 16px 56px 0; }
.cmp-layer .cmp-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px 56px 28px; cursor: text; }
.cmp-layer .cmp-who, .cmp-layer .cmp-catdd { cursor: default; }
.cmp-layer .cmp-who { margin-bottom: 16px; }
.cmp-layer .cmp-catdd { margin-bottom: 12px; }
.cmp-layer .cmp-body { min-height: 320px; line-height: 1.9; letter-spacing: -.005em; }
.cmp-layer .cmp-bar { position: static; flex: none; border-radius: 0; padding: 12px 20px; }
.cmp-layer .cmp-help, :root .cmp-layer .cmp-help { flex: none; max-width: none; margin: 12px 0 0; padding: 0 8px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.88); }
@keyframes cmpBgIn { from { background-color: rgba(12,18,34,0); } }
@keyframes cmpBgOut { to { background-color: rgba(12,18,34,0); } }
@keyframes cmpIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes cmpOut { to { opacity: 0; transform: translateY(12px) scale(.99); } }
@keyframes cmpUp { from { transform: translateY(100%); } }
@keyframes cmpDown { to { transform: translateY(100%); } }
@media (max-width: 767px) {
  .cmp-layer { justify-content: flex-end; padding: 12px 0 0; }
  .cmp-layer .cmp { width: 100%; height: auto; flex: 1 1 auto; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px -12px rgba(5,10,30,.5);
    animation: cmpUp .3s cubic-bezier(.2,.8,.2,1) both; }
  .cmp-layer.out .cmp { animation: cmpDown .2s ease both; }
  .cmp-layer .cmp-top { padding: 10px 14px 10px 8px; }
  .cmp-layer .btn.primary.cmp-pub { height: 38px; padding: 0 20px; font-size: 15px; }
  .cmp-layer .w-note { margin: 12px 16px 0; }
  .cmp-layer .cmp-main { padding: 18px 20px 16px; }
  .cmp-layer .cmp-body { min-height: 200px; }
  .cmp-layer .cmp-bar { padding: 8px 12px; }
  .cmp-layer .cmp-help, :root .cmp-layer .cmp-help { display: none; }
}
/* PC: 뒤 화면은 보이되 살짝 흐리게 해서 창 아래 도움말이 뒤 글자와 겹쳐 읽히지 않게 */
@media (min-width: 768px) {
  .cmp-layer { background: rgba(12,18,34,.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .cmp-layer .cmp-help, :root .cmp-layer .cmp-help { color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.45); }
}
@media (prefers-reduced-motion: reduce) { .cmp-layer, .cmp-layer .cmp, .cmp-layer.out, .cmp-layer.out .cmp { animation: none !important; } }

/* ---------- 11-20 저녁 글쓰기 창: 사진 표지 + 옮기고 크기 바꾸는 작은 창 ----------
   사용자: "글 쓰는 창을 마우스로 이리저리 움직일 수 있었으면(몰래 쓰는 사람은 창을 줄여 노트북 한쪽 구석에 두고 쓴다)"
           "글쓰기 창 디자인이 좀 부족해 보여, 사진 같은 걸 넣어도 좋으니 세련되게"
   머리 막대 = 사진 표지(사이트 배경 사진) 위에 오늘 날짜를 크게, 흰 종이가 표지 위로 살짝 올라옴(Day One·노션 표지 참고).
   작은 창(.is-float)은 뒤를 가리지 않고 뒤 화면도 누를 수 있음(Gmail 새 메일 창), 내려 두기(.is-min)는 오른쪽 아래 알약 */
.cmp-layer .cmp { background: #fff; border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 2px 8px rgba(10,20,50,.12), 0 50px 120px -30px rgba(5,10,30,.75); }
.cmp-layer .cmp-top { position: relative; flex: none; height: 150px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto 1fr;
  align-items: start; gap: 0 12px; padding: 14px 16px 0 14px; border: 0; border-radius: 0; background: #3a4560; color: #fff; overflow: hidden; }
.cmp-cover { position: absolute; inset: 0; background: #56607a center 45% / cover no-repeat; }
.cmp-cover::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,13,28,.46) 0%, rgba(9,13,28,.1) 40%, rgba(9,13,28,.06) 58%, rgba(9,13,28,.44) 100%); }
.cmp-top > :not(.cmp-cover) { position: relative; z-index: 1; }
.cmp-top button { cursor: pointer; }
.cmp-win { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 6px; }
.cmp-win .icon-btn { width: 34px; height: 34px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .15s; }
.cmp-win .icon-btn:hover { background: rgba(255,255,255,.32); }
.cmp-win .icon-btn .ic { width: 17px; height: 17px; stroke-width: 2.1; }
.cmp-layer:not(.is-float) .cmp-win [data-win="center"], .cmp-layer.is-float .cmp-win [data-win="float"] { display: none; }
.cmp-date { grid-column: 1 / -1; grid-row: 2; align-self: end; display: flex; flex-direction: column; gap: 3px; padding: 0 4px 36px; min-width: 0;
  text-shadow: 0 1px 10px rgba(0,0,0,.35); pointer-events: none; }
.cmp-date b { font-size: 27px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.cmp-date small { font-size: 13px; font-weight: 600; opacity: .92; }
.cmp-layer .cmp-act { grid-column: 3; grid-row: 1; gap: 12px; }
.cmp-layer .cmp-saved { color: rgba(255,255,255,.9); text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.cmp-layer .btn.primary.cmp-pub { height: 40px; padding: 0 22px; border-color: rgba(255,255,255,.45); box-shadow: 0 10px 24px -8px rgba(20,60,160,.75); }
.cmp-layer .btn.primary.cmp-pub.is-empty { opacity: 1; background: rgba(255,255,255,.18); color: rgba(255,255,255,.95); border-color: rgba(255,255,255,.36); box-shadow: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cmp-cover-btn { position: absolute !important; right: 14px; bottom: 34px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .2s, background .15s; }
.cmp-top:hover .cmp-cover-btn, .cmp-cover-btn:focus-visible { opacity: 1; }
.cmp-cover-btn:hover { background: rgba(255,255,255,.32); }
.cmp-cover-btn .ic { width: 16px; height: 16px; stroke-width: 2.1; }
@media (hover: none) { .cmp-cover-btn { opacity: .9; } }
/* 흰 종이가 표지 위로 살짝 올라온 모양 */
.cmp-layer .cmp-main { position: relative; z-index: 2; margin-top: -20px; border-radius: 20px 20px 0 0; background: #fff; padding-top: 28px; }
.cmp-layer .cmp-main .w-note { margin: 0 0 18px; }
.cmp-layer .cmp-body { color: #1b2232; caret-color: #2f6fe4; }
.cmp-layer .cmp-body::placeholder { color: #a2aabb; }
/* 아래 도구 막대 */
.cmp-layer .cmp-bar { background: #fafbfd; border-top: 1px solid #edf0f6; }
.cmp-layer .cmp-tool { height: 36px; padding: 0 12px; border-radius: 10px; color: #4a5468; font-weight: 600; }
.cmp-layer .cmp-tool:hover { background: #edf1f8; color: #1f2a44; }
.cmp-layer .cmp-tool .ic { color: #2f6fe4; }
.cmp-layer .cmp-count { color: #8b94a6; font-variant-numeric: tabular-nums; }
/* 창이 낮으면 표지를 얇게, 좁으면 도구 글자·저장 시각을 줄임(app.js ResizeObserver 가 붙임) */
.cmp-layer .cmp.is-short .cmp-top { height: 62px; grid-template-rows: 1fr; align-items: center; padding: 0 12px; }
.cmp-layer .cmp.is-short .cmp-date { grid-column: 2; grid-row: 1; align-self: center; justify-self: center; padding: 0; }
.cmp-layer .cmp.is-short .cmp-date b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-layer .cmp.is-short .cmp-date small, .cmp-layer .cmp.is-short .cmp-cover-btn { display: none; }
.cmp-layer .cmp.is-short .cmp-main { margin-top: 0; border-radius: 0; padding-top: 20px; }
.cmp-layer .cmp.is-narrow .cmp-main { padding-left: 26px; padding-right: 26px; }
.cmp-layer .cmp.is-narrow .cmp-saved, .cmp-layer .cmp.is-narrow .cmp-tool:not(.on) span { display: none; }
.cmp-layer .cmp.is-narrow .cmp-date b { font-size: 23px; }
.cmp-layer .cmp.is-narrow.is-short .cmp-date { display: none; }
/* 끌어 옮기기(PC) */
@media (min-width: 768px) { .cmp-layer .cmp-top { cursor: grab; } }
.cmp-layer.is-dragging .cmp-top { cursor: grabbing; }
.cmp-layer.is-dragging, .cmp-layer.is-resizing { -webkit-user-select: none; user-select: none; }
/* 작은 창: 뒤를 가리지 않음 */
.cmp-layer.is-float { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none; animation: none; }
.cmp-layer.is-float > .spin { display: none; }
.cmp-layer.is-float > .cmp { position: fixed; pointer-events: auto; flex: none; margin: 0; max-width: none; border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(20,30,60,.1), 0 6px 18px -6px rgba(5,10,30,.25), 0 30px 70px -16px rgba(5,10,30,.5); }
.cmp-layer.is-dragging > .cmp { box-shadow: 0 0 0 1px rgba(20,30,60,.12), 0 10px 24px -6px rgba(5,10,30,.3), 0 44px 96px -16px rgba(5,10,30,.6); }
.cmp-layer.is-float .cmp-help { display: none; }
/* 크기 조절 손잡이(가장자리·모서리) */
.cmp-rz { position: absolute; z-index: 40; display: none; }
@media (min-width: 768px) { .cmp-layer .cmp-rz { display: block; } }
.rz-n, .rz-s { left: 16px; right: 16px; height: 7px; cursor: ns-resize; }
.rz-n { top: 0; } .rz-s { bottom: 0; }
.rz-e, .rz-w { top: 16px; bottom: 16px; width: 7px; cursor: ew-resize; }
.rz-e { right: 0; } .rz-w { left: 0; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 18px; height: 18px; }
.rz-ne { top: 0; right: 0; cursor: nesw-resize; } .rz-nw { top: 0; left: 0; cursor: nwse-resize; }
.rz-se { bottom: 0; right: 0; cursor: nwse-resize; } .rz-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.cmp-layer.is-float .rz-se::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 10px; height: 10px; pointer-events: none;
  background: linear-gradient(135deg, transparent 44%, rgba(40,50,80,.38) 44% 52%, transparent 52% 66%, rgba(40,50,80,.38) 66% 74%, transparent 74%); }
/* 내려 두기: 오른쪽 아래 알약 */
.cmp-mini { display: none; }
.cmp-layer.is-min > .cmp { display: none; }
.cmp-layer.is-min .cmp-mini { position: fixed; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 12px; pointer-events: auto; cursor: pointer;
  padding: 9px 16px 9px 9px; border-radius: 999px; background: rgba(255,255,255,.97); border: 1px solid rgba(20,30,60,.08); color: var(--ink); font: inherit;
  box-shadow: 0 16px 40px -12px rgba(5,10,30,.45); animation: cmpIn .22s cubic-bezier(.2,.8,.2,1) both; transition: transform .15s; }
.cmp-mini:hover { transform: translateY(-2px); }
.cmp-mini > .ic:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 50%; color: #fff; stroke-width: 2; background: linear-gradient(135deg, #5b9bf8, #2357c9); }
.cmp-mini span { display: flex; flex-direction: column; text-align: left; line-height: 1.35; }
.cmp-mini b { font-size: 14px; }
.cmp-mini small { font-size: 12px; color: var(--ink3); }
.cmp-mini > .ic:last-child { width: 18px; height: 18px; color: var(--ink3); }
/* 휴대폰: 창 단추는 닫기만, 표지는 조금 낮게 */
@media (max-width: 767px) {
  .cmp-win [data-win] { display: none !important; }
  .cmp-layer .cmp-top { height: 128px; padding: 12px 12px 0 10px; }
  .cmp-date { padding-bottom: 32px; }
  .cmp-date b { font-size: 23px; }
  .cmp-cover-btn { bottom: 32px; }
  .cmp-layer .cmp-main { padding-top: 24px; }
}

/* 모서리 손잡이가 둥근 모서리에 잘려 안 잡히던 것 고침: 창은 넘치게 두고, 둥글게 자르는 건 표지·아래 막대만. 손잡이는 테두리에 살짝 걸치게 */
.cmp-layer .cmp { --r: 22px; overflow: visible; border-radius: var(--r); }
.cmp-layer.is-float > .cmp { --r: 18px; border-radius: var(--r); }
.cmp-layer .cmp-top { border-radius: var(--r) var(--r) 0 0; }
.cmp-layer .cmp-bar { border-radius: 0 0 var(--r) var(--r); }
.rz-n, .rz-s { left: 16px; right: 16px; height: 10px; }
.rz-n { top: -5px; } .rz-s { bottom: -5px; }
.rz-e, .rz-w { top: 16px; bottom: 16px; width: 10px; }
.rz-e { right: -5px; } .rz-w { left: -5px; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 24px; height: 24px; }
.rz-ne { top: -7px; right: -7px; } .rz-nw { top: -7px; left: -7px; }
.rz-se { bottom: -7px; right: -7px; } .rz-sw { bottom: -7px; left: -7px; }
.cmp-layer.is-float .rz-se::after { right: 11px; bottom: 11px; }
@media (max-width: 767px) { .cmp-layer .cmp { --r: 18px; } .cmp-layer .cmp-bar { border-radius: 0; } }
.cmp-layer .cmp-top { z-index: 1; } /* 예전 .cmp-top z-index 20 이 남아 흰 종이가 표지 아래로 깔리던 것 */

/* ---------- 11-20 글 배경(사용자: "글 쓰는 칸이 허전해 — 예쁜 배경 10가지쯤 골라 그 위에 쓰게, 글은 감성이 필요해") ----------
   cover.paper 로 저장, 쓰는 칸(.cmp-main)·읽는 화면(.r-paper)·고르는 칸(.pp-sw)이 같은 클래스(.paper.paper-키)를 씀.
   그림 파일 없이 CSS 로 그림(새벽 안개만 사이트 배경 사진 dawn). 줄 노트·편지지의 줄은 쓰는 칸에서만 글줄(--lh)에 맞춤 */
.paper.paper-hanji { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .16' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='.06'/%3E%3Crect width='100%25' height='100%25' filter='url(%23b)' opacity='.07'/%3E%3C/svg%3E"),
  linear-gradient(180deg, #f8f2e4, #f3ead6); }
.paper.paper-note { background: linear-gradient(180deg, #fffcf3, #fbf6e8); }
.paper.paper-letter { background: linear-gradient(180deg, #fff8f6, #fff1ee); box-shadow: inset 0 0 0 10px rgba(255,248,246,.9), inset 0 0 0 11px rgba(222,148,148,.38); }
.paper.paper-kraft { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='.13'/%3E%3C/svg%3E"),
  linear-gradient(165deg, #dcc7a3, #cfb68b); }
.paper.paper-sky { background:
  radial-gradient(60% 45% at 12% 8%, rgba(160,196,255,.55), transparent 70%),
  radial-gradient(45% 40% at 92% 22%, rgba(212,188,255,.45), transparent 70%),
  radial-gradient(55% 45% at 75% 96%, rgba(163,222,236,.5), transparent 70%),
  radial-gradient(40% 35% at 20% 80%, rgba(196,214,255,.35), transparent 70%), #fbfdff; }
/* 벚꽃: 끝이 갈라진 꽃잎(SVG)을 여러 각도로 흩뿌림. 점으로만 하면 얼룩처럼 보여서(11-20) */
.paper.paper-blossom { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='240'%3E%3Cdefs%3E%3Cpath id='p' d='M0 0C-5.5-3-6.5-12.5 0-17l2.2 2.6 2.2-2.6C11-12.5 10-3 0 0z'/%3E%3C/defs%3E%3Cg fill='%23ffb3c7'%3E%3Cuse href='%23p' transform='translate(36 48) rotate(-30) scale(1.15)' opacity='.78'/%3E%3Cuse href='%23p' transform='translate(152 32) rotate(35)' opacity='.55' fill='%23ffc6d4'/%3E%3Cuse href='%23p' transform='translate(228 108) rotate(110) scale(1.25)' opacity='.7'/%3E%3Cuse href='%23p' transform='translate(98 138) rotate(-75) scale(.9)' opacity='.5' fill='%23ffa9bf'/%3E%3Cuse href='%23p' transform='translate(190 204) rotate(160) scale(1.05)' opacity='.66'/%3E%3Cuse href='%23p' transform='translate(46 216) rotate(15) scale(.8)' opacity='.45' fill='%23ffc6d4'/%3E%3C/g%3E%3C/svg%3E"),
  radial-gradient(70% 50% at 90% 0%, rgba(255,214,226,.7), transparent 70%),
  linear-gradient(180deg, #fff7f9, #ffeff4 60%, #fdf3f8);
  background-size: 260px 240px, 100% 100%, 100% 100%; }
.paper.paper-forest { background:
  radial-gradient(70% 50% at 85% 0%, rgba(255,250,220,.7), transparent 70%),
  linear-gradient(165deg, #eef6ec 0%, #e2efe3 50%, #eef4e6 100%); }
.paper.paper-sunset { background:
  radial-gradient(60% 45% at 10% 0%, rgba(255,214,186,.6), transparent 70%),
  linear-gradient(172deg, #fff2e8 0%, #fde4e2 48%, #ece4fb 100%); }
.paper.paper-fog { background: linear-gradient(rgba(255,255,255,.72), rgba(255,255,255,.8)), url(/bg/dawn.webp) center 40% / cover no-repeat, #eef1f1; }
.paper.paper-night { background:
  radial-gradient(1.3px 1.3px at 28px 36px, rgba(255,255,255,.95), transparent),
  radial-gradient(1px 1px at 118px 82px, rgba(255,255,255,.75), transparent),
  radial-gradient(1.6px 1.6px at 172px 150px, rgba(255,255,255,.85), transparent),
  radial-gradient(1px 1px at 64px 172px, rgba(255,255,255,.6), transparent),
  radial-gradient(1.1px 1.1px at 196px 24px, rgba(255,255,255,.7), transparent),
  radial-gradient(70% 50% at 80% 0%, rgba(120,110,200,.35), transparent 70%),
  linear-gradient(180deg, #131a33 0%, #1d2547 55%, #2a2d55 100%);
  background-size: 220px 200px, 220px 200px, 220px 200px, 220px 200px, 220px 200px, 100% 100%, 100% 100%; }

/* 쓰는 칸: 줄 노트·편지지는 글줄마다 줄(글씨 크기에 맞춤) */
.cmp-main.paper-note .cmp-body { background-image: linear-gradient(transparent calc(var(--lh) - 1px), rgba(92,138,210,.32) calc(var(--lh) - 1px)); background-size: 100% var(--lh); background-position: 0 4px; }
.cmp-main.paper-letter .cmp-body { background-image: radial-gradient(circle, rgba(206,126,126,.5) .9px, transparent 1.3px); background-size: 7px var(--lh); background-position: 0 calc(4px + var(--lh) / 2); }
/* 글자색: 크라프트는 갈색, 밤하늘은 흰 글씨 */
.paper-kraft .cmp-body, .r-paper.paper-kraft .r-body { color: #3a2a18; }
.paper-kraft .cmp-body::placeholder { color: rgba(58,42,24,.45); }
.paper-kraft .cmp-who small { color: rgba(58,42,24,.6); }
.paper-dark .cmp-who b { color: #fff; }
.paper-dark .cmp-who small { color: rgba(236,240,252,.62); }
.cmp-layer .paper-dark .cmp-body { color: #eef1fb; caret-color: #fff; }
.cmp-layer .paper-dark .cmp-body::placeholder { color: rgba(236,240,252,.45); }
.cmp-layer .cmp .paper-dark .cmp-catdd .fbtn:not(.on) { background: rgba(255,255,255,.12); color: #fff; }
.cmp-layer .paper-dark .cmp-catdd .fbtn:not(.on):hover { background: rgba(255,255,255,.2); }
.cmp-layer .paper-dark .w-note { background: rgba(255,255,255,.1); color: #fff; }
.cmp-main.paper { transition: background-color .3s; }

/* 읽는 화면: 머리말·사진·본문을 같은 배경 종이에 */
.r-paper.paper { padding: 26px 30px 32px; margin: 0 -8px 26px; border-radius: 20px; box-shadow: 0 1px 2px rgba(20,30,60,.05), 0 18px 40px -26px rgba(20,30,60,.45); }
.r-paper.paper .r-head { border-bottom-color: rgba(30,40,70,.1); }
.r-paper.paper-dark, .r-paper.paper-dark .r-body, .r-paper.paper-dark .r-title, .r-paper.paper-dark .r-sub, .r-paper.paper-dark .r-author b { color: #e9edf8; }
.r-paper.paper-dark .r-meta, .r-paper.paper-dark .r-author small { color: rgba(233,237,248,.65); }
.r-paper.paper-dark .r-head { border-bottom-color: rgba(255,255,255,.14); }
.r-paper.paper-dark .r-body a { color: #a9c6ff; }
.r-paper.paper-dark .r-body blockquote { border-left-color: rgba(255,255,255,.3); color: rgba(233,237,248,.85); }
.r-paper.paper-dark .r-body code, .r-paper.paper-dark .r-body pre { background: rgba(255,255,255,.08); color: #e9edf8; }
.r-paper.paper-dark .r-cat { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 600px) { .r-paper.paper { padding: 20px 18px 24px; margin: 0 -10px 22px; border-radius: 16px; } }

/* 고르는 칸: [카테고리] 옆 [🎨 배경] 단추(11-23 사용자 "배경 선택을 카테고리 옆에 두자" — 처음엔 아래 도구 막대에 있었음).
   두 단추를 한 줄(.cmp-meta)에 두고, 고르는 창은 그 줄 기준으로 아래로 펼침(단추 기준이면 휴대폰·작은 창에서 오른쪽 밖으로 넘침) */
.cmp-meta { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.cmp-layer .cmp-meta .cmp-catdd { margin: 0; }
.cmp-meta .fdrop.pp-drop { position: static; }
.cmp-meta .fpop.paper-pop { left: 0; top: calc(100% + 8px); bottom: auto; width: min(388px, 100%); padding: 14px 14px 12px; }
.pp-drop .fbtn { gap: 6px; padding-left: 12px; }
.pp-drop .fbtn .ic:first-child { width: 17px; height: 17px; stroke-width: 2; color: #2f6fe4; }
.pp-drop .fbtn.on .ic:first-child { color: #fff; }
.pp-h { margin: 0 2px 10px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.pp-h small { margin-left: 6px; font-weight: 500; font-size: 12px; color: var(--ink3); }
.pp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.pp-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; min-width: 0; }
.pp-sw { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px rgba(20,30,60,.13); transition: transform .12s ease; }
.pp-sw.paper-letter { box-shadow: inset 0 0 0 4px rgba(255,248,246,.9), inset 0 0 0 5px rgba(222,148,148,.5), inset 0 0 0 6px rgba(20,30,60,.06); }
.pp-sw.paper-note { background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(92,138,210,.4) 9px 10px), #fffcf3; }
.pp-sw.paper-fog { background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.62)), url(/bg/dawn-t.webp) center / cover; }
.pp-sw i { font-style: normal; font-size: 17px; font-weight: 700; color: #1b2232; font-family: 'Noto Serif KR', serif; }
.pp-sw.paper-kraft i { color: #3a2a18; }
.pp-sw.paper-dark i { color: #fff; }
.pp-item small { font-size: 12px; color: var(--ink2); white-space: nowrap; }
.pp-item:hover .pp-sw { transform: translateY(-2px); }
.pp-item.on .pp-sw { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f6fe4; }
.pp-item.on small { color: #2f6fe4; font-weight: 800; }
@media (max-width: 420px) { .pp-grid { gap: 10px 6px; } .pp-item small { font-size: 11.5px; } }

/* 11-23 가입·찾기 로봇 확인(Turnstile): 평소엔 안 보이고 의심스러울 때만 칸이 나타남 */
.ts-box { display: flex; justify-content: center; }
.ts-box:empty { display: none; }
.ts-box > div { max-width: 100%; }

/* =====================================================================
   11-24 휴대폰 위 막대 오른쪽 [✎ 글쓰기] 알약 + 아래 막대는 홈·구독·좋아요·프로필 4개
   (사용자: "앱에서도 오른쪽 상단에 글쓰기 버튼", "밑에 바에는 글쓰기 버튼은 제거, 위에 있잖아".
    낮에 메뉴를 왼쪽 세로 막대로 바꿨다가 "생각보다 별로네, 다시 아래로" → 아래 막대로 되돌림)
   ===================================================================== */
@media (max-width: 767px) {
  .topbar { padding: 0 10px 0 16px; }
  .top-actions { gap: 6px; }
  .top-actions .top-login { height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid #d5dbe6; color: var(--ink); font-weight: 700; font-size: 14px; }
  .top-write {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px 0 13px; border-radius: 999px; white-space: nowrap;
    background: linear-gradient(135deg, #5b9bf8 0%, #2f6fe4 55%, #2357c9 100%); color: #fff; border: 1px solid rgba(255,255,255,.4);
    font-size: 15px; font-weight: 800; letter-spacing: -.01em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -8px rgba(35,87,201,.85);
  }
  .top-write .ic { width: 18px; height: 18px; color: #fff; stroke-width: 2.3; }
  .top-write:active { transform: scale(.97); }
}
/* 좁은 폰에서 로그인 전(바로가기·로그인·글쓰기 3개)에는 글쓰기 글자를 빼고 연필만 */
@media (max-width: 389px) {
  .top-actions .top-login ~ .top-write { padding: 0; width: 38px; justify-content: center; }
  .top-actions .top-login ~ .top-write span { display: none; }
}

/* 설정 화면 「더 보기」: 관리 화면(관리자만)·모두의 글이란·바로가기·약관 — 위 막대에서 뺀 것들(11-24) */
.more-links { display: flex; flex-direction: column; margin: 2px -6px 0; }
.more-links a, .more-links button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 8px; border: 0; background: none; border-radius: 10px;
  font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer;
}
.more-links a + a, .more-links a + button, .more-links button + a { border-top: 1px solid var(--line2); border-radius: 0; }
.more-links a:hover, .more-links button:hover { background: rgba(20,32,70,.04); }
.more-links .ic { width: 20px; height: 20px; color: var(--ink2); flex: none; }
.more-links small { margin-left: 6px; font-size: 12.5px; }

/* =====================================================================
   11-24 홈·프로필 글 카드에도 글 배경(사용자: "들어가야 배경이 보이는 게 아니라 메인화면에서도 그 색감이 나타났으면")
   카드에 .paper.paper-키 를 붙여 위 글 배경 정의를 그대로 씀. 흰 종이 글은 지금처럼 유리 카드
   ===================================================================== */
.tcard.paper { -webkit-backdrop-filter: none; backdrop-filter: none; border-color: rgba(255,255,255,.55); }
.tcard.paper:hover { filter: brightness(1.015); }
/* 편지지: 안쪽 테두리 + 카드 그림자를 같이 */
.tcard.paper-letter { box-shadow: inset 0 0 0 7px rgba(255,248,246,.9), inset 0 0 0 8px rgba(222,148,148,.34), 0 1px 2px rgba(22,30,80,.06), 0 14px 32px -18px rgba(22,30,80,.42); }
/* 줄 노트: 글줄마다 옅은 파란 줄(카드 글줄 높이에 맞춤) */
.tcard.paper-note .tc-text { background-image: linear-gradient(transparent calc(1.7em - 1px), rgba(92,138,210,.26) calc(1.7em - 1px)); background-size: 100% 1.7em; }
/* 크라프트: 글씨를 짙은 갈색으로 */
.tcard.paper-kraft .tc-text, .tcard.paper-kraft .tc-title, .tcard.paper-kraft .tc-author b { color: #3a2a18; }
.tcard.paper-kraft .tc-time, .tcard.paper-kraft .tc-more, .tcard.paper-kraft .tc-act { color: rgba(58,42,24,.62); }
.tcard.paper-kraft .tc-cat, .tcard.paper-kraft .tc-follow:not(.primary) { background: rgba(58,42,24,.1); color: rgba(58,42,24,.75); }
/* 밝은 배경 위 칩은 살짝 진하게(배경색에 묻히지 않게) */
.tcard.paper:not(.paper-dark):not(.paper-kraft) .tc-cat { background: rgba(255,255,255,.62); }
/* 밤하늘: 글씨·아이콘을 밝게 */
.tcard.paper-dark { border-color: rgba(255,255,255,.12); }
.tcard.paper-dark .tc-text, .tcard.paper-dark .tc-title, .tcard.paper-dark .tc-author b { color: #eef1fb; }
.tcard.paper-dark .tc-time, .tcard.paper-dark .tc-more, .tcard.paper-dark .tc-act { color: rgba(233,237,248,.66); }
.tcard.paper-dark .tc-act:hover { color: #fff; background: rgba(255,255,255,.1); }
.tcard.paper-dark .tc-body:hover .tc-more { color: #fff; }
.tcard.paper-dark .tc-cat, .tcard.paper-dark .tc-follow:not(.primary) { background: rgba(255,255,255,.13); color: rgba(255,255,255,.85); }
.tcard.paper-dark .tc-follow.primary { background: rgba(140,178,255,.22); color: #cfe0ff; }
.tcard.paper-dark .tc-text .ht { color: #a9c6ff; }
.tcard.paper-dark .tc-act.like.on { color: #8fb4ff; }

/* =====================================================================
   11-24 글 배경 14가지 더함(사용자: "너무 예쁜데, 종류가 조금 더 많았으면") → 흰 종이 포함 25가지
   그림: 모눈종이·커피·체크·햇살·민트·첫눈·칠판·겨울 불빛(CSS·SVG) / 사진: 라벤더·여름 바다·들판·가을 숲·은하수·오로라(사이트 배경 사진에 흰·검은 막을 덮음)
   ===================================================================== */
.paper.paper-grid { background:
  linear-gradient(rgba(92,138,210,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(92,138,210,.2) 1px, transparent 1px),
  linear-gradient(rgba(92,138,210,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(92,138,210,.09) 1px, transparent 1px), #fcfdff;
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; background-position: -1px -1px; }
.paper.paper-coffee { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='none' stroke='%23a0703c'%3E%3Ccircle cx='100' cy='100' r='78' stroke-width='7' opacity='.15'/%3E%3Ccircle cx='103' cy='98' r='73' stroke-width='2' opacity='.17'/%3E%3Cpath d='M28 74a78 78 0 0 1 42-50' stroke-width='11' opacity='.07'/%3E%3C/g%3E%3Ccircle cx='182' cy='172' r='5' fill='%23a0703c' opacity='.12'/%3E%3Ccircle cx='170' cy='188' r='2.5' fill='%23a0703c' opacity='.1'/%3E%3C/svg%3E") right -56px top -56px / 220px 220px no-repeat,
  linear-gradient(180deg, #fcf7ef, #f4eadb); }
.paper.paper-gingham { background:
  linear-gradient(90deg, rgba(226,112,112,.1) 50%, transparent 50%), linear-gradient(rgba(226,112,112,.1) 50%, transparent 50%), #fffafa;
  background-size: 28px 28px, 28px 28px; }
.paper.paper-sunny { background:
  repeating-conic-gradient(from 95deg at 0 0, rgba(255,206,84,.14) 0deg 5deg, transparent 5deg 13deg),
  radial-gradient(65% 55% at 0 0, rgba(255,224,130,.8), transparent 72%),
  linear-gradient(160deg, #fffbea, #fff3cf); }
.paper.paper-mint { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='%23fff' fill-opacity='.45' stroke='%23fff' stroke-opacity='.95' stroke-width='1.2'%3E%3Ccircle cx='30' cy='40' r='9'/%3E%3Ccircle cx='150' cy='24' r='5'/%3E%3Ccircle cx='112' cy='112' r='12'/%3E%3Ccircle cx='182' cy='152' r='6'/%3E%3Ccircle cx='52' cy='170' r='4'/%3E%3C/g%3E%3C/svg%3E"),
  linear-gradient(170deg, #eefbf6 0%, #d6f1e6 100%); }
.paper.paper-snow { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='200'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='20' cy='30' r='2.6' opacity='.95'/%3E%3Ccircle cx='96' cy='18' r='1.8' opacity='.85'/%3E%3Ccircle cx='170' cy='52' r='3.2' opacity='.95'/%3E%3Ccircle cx='60' cy='110' r='1.6' opacity='.8'/%3E%3Ccircle cx='140' cy='132' r='2.4' opacity='.95'/%3E%3Ccircle cx='204' cy='162' r='1.7' opacity='.85'/%3E%3Ccircle cx='30' cy='178' r='3' opacity='.9'/%3E%3Ccircle cx='110' cy='188' r='1.5' opacity='.75'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M0-6V6M-5.2-3L5.2 3M-5.2 3L5.2-3' transform='translate(122 72)'/%3E%3Cpath d='M0-5V5M-4.3-2.5L4.3 2.5M-4.3 2.5L4.3-2.5' transform='translate(46 150)'/%3E%3Cpath d='M0-4V4M-3.5-2L3.5 2M-3.5 2L3.5-2' transform='translate(196 100)'/%3E%3C/g%3E%3C/svg%3E"),
  radial-gradient(70% 50% at 50% 0, rgba(255,255,255,.7), transparent 70%),
  linear-gradient(180deg, #e2eaf4 0%, #d2deea 100%); }
.paper.paper-chalk { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='.09'/%3E%3C/svg%3E"),
  radial-gradient(70% 45% at 25% 15%, rgba(255,255,255,.07), transparent 70%),
  radial-gradient(60% 40% at 80% 85%, rgba(255,255,255,.05), transparent 70%),
  linear-gradient(180deg, #2f4b3e, #26403a); }
.paper.paper-lights { background:
  radial-gradient(circle at 40px 50px, rgba(255,206,130,.36), transparent 24px),
  radial-gradient(circle at 182px 30px, rgba(255,172,124,.26), transparent 15px),
  radial-gradient(circle at 252px 140px, rgba(255,226,160,.3), transparent 30px),
  radial-gradient(circle at 110px 182px, rgba(255,190,140,.22), transparent 19px),
  radial-gradient(circle at 214px 244px, rgba(255,214,150,.28), transparent 12px),
  radial-gradient(circle at 20px 236px, rgba(255,236,190,.22), transparent 9px),
  radial-gradient(80% 50% at 50% 100%, rgba(255,170,110,.12), transparent 70%),
  linear-gradient(180deg, #1b1f3b 0%, #2b2444 100%);
  background-size: 300px 270px, 300px 270px, 300px 270px, 300px 270px, 300px 270px, 300px 270px, 100% 100%, 100% 100%; }
.paper.paper-lavender { background: linear-gradient(rgba(255,255,255,.66), rgba(255,255,255,.78)), url(/bg/lavender.webp) center 30% / cover no-repeat, #ece7f7; }
.paper.paper-sea { background: linear-gradient(rgba(255,255,255,.66), rgba(255,255,255,.8)), url(/bg/sea.webp) center 40% / cover no-repeat, #e1eef8; }
.paper.paper-field { background: linear-gradient(rgba(255,255,255,.62), rgba(255,255,255,.78)), url(/bg/field.webp) center 70% / cover no-repeat, #f6f0dc; }
.paper.paper-autumn { background: linear-gradient(rgba(255,251,246,.72), rgba(255,251,246,.84)), url(/bg/autumn.webp) center 60% / cover no-repeat, #f4e9e2; }
.paper.paper-galaxy { background: linear-gradient(rgba(8,10,26,.5), rgba(8,10,26,.68)), url(/bg/galaxy.webp) center 35% / cover no-repeat, #1a1630; }
.paper.paper-aurora { background: linear-gradient(rgba(6,14,18,.45), rgba(6,14,18,.65)), url(/bg/aurora.webp) center 30% / cover no-repeat, #0f2a22; }

/* 고르는 칸 미리보기: 사진은 작은 그림(-t), 무늬는 작게 */
.pp-sw.paper-lavender { background: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.6)), url(/bg/lavender-t.webp) center / cover; }
.pp-sw.paper-sea { background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.58)), url(/bg/sea-t.webp) center / cover; }
.pp-sw.paper-field { background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.58)), url(/bg/field-t.webp) center / cover; }
.pp-sw.paper-autumn { background: linear-gradient(rgba(255,251,246,.5), rgba(255,251,246,.62)), url(/bg/autumn-t.webp) center / cover; }
.pp-sw.paper-galaxy { background: linear-gradient(rgba(8,10,26,.3), rgba(8,10,26,.45)), url(/bg/galaxy-t.webp) center / cover; }
.pp-sw.paper-aurora { background: linear-gradient(rgba(6,14,18,.25), rgba(6,14,18,.4)), url(/bg/aurora-t.webp) center / cover; }
.pp-sw.paper-grid { background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px; }
.pp-sw.paper-gingham { background-size: 14px 14px, 14px 14px; }
.pp-sw.paper-coffee { background-position: right -30px top -30px, 0 0; background-size: 90px 90px, auto; }
.pp-sw.paper-lights { background-size: 150px 135px, 150px 135px, 150px 135px, 150px 135px, 150px 135px, 150px 135px, 100% 100%, 100% 100%; }

/* 25가지가 되어 고르는 창: 칸 폭에 맞춰 4~5줄, 너무 길면 창 안에서 스크롤 */
.cmp-meta .fpop.paper-pop { width: min(440px, 100%); max-height: min(470px, 62vh); overflow-y: auto; overscroll-behavior: contain; }
.pp-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px 7px; }
.pp-item small { font-size: 11.5px; }
