/* 디자인 확정본(디자인/05_로고가이드) 색·카드·글꼴 규칙 */
:root {
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --line: #E7E5F0;
  --text: #1C1B2E;
  --sub: #6E6A80;
  --faint: #8F8BA0;
  --accent: #6C4DFF;
  --accent-ink: #5A3DF0;
  --accent-soft: #EFEAFF;
  --soft: #FAFAFC;
  --ok: #12a150;
  --danger: #e5484d;
  --radius: 20px;
  font-family: Pretendard, "Pretendard Variable", "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, "Noto Sans KR", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 20px; padding-bottom: 48px; }
main.wrap.flush { padding-top: 0; }

/* 상단바 */
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.04em; flex: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; }
.gnav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 18px; font-size: 14px; font-weight: 600; color: var(--sub); }
.gnav a:hover, .gnav a.on { color: var(--text); }
.nav { display: flex; align-items: center; gap: 6px; position: relative; }
.login-top { background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.login-top:hover { background: var(--accent-ink); }
.me-chip { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 700; }
.menu { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(28, 27, 46, .08); padding: 6px; min-width: 190px; display: none; }
.menu.open { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-size: 14px; }
.menu a:hover, .menu button:hover { background: var(--bg); }
@media (max-width: 800px) { .gnav { display: none; } .topbar { padding: 0 16px; } }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.danger { color: var(--danger); }

/* 카드 공통 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 18px; }
.muted { color: var(--sub); }
.faint { color: var(--faint); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.section-title { font-size: 18px; font-weight: 800; margin: 28px 0 12px; letter-spacing: -.03em; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -.04em; margin: 4px 0 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--sub); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: #e7f7ee; color: var(--ok); }
.pill.warn { background: #fff4e0; color: #b26a00; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--accent-soft); flex: none; }
.avatar-ph { border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }

/* 랜딩 */
.landing { padding: 0 4px; }
.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 { margin: 0 auto 12px; max-width: 680px; font-size: 40px; line-height: 1.25; font-weight: 800; letter-spacing: -.04em; white-space: pre-line; }
.hero .sub { margin: 0 auto; max-width: 480px; color: var(--sub); font-size: 16px; line-height: 1.6; }
.logins { display: flex; gap: 10px; justify-content: center; margin: 28px 0 8px; flex-wrap: wrap; }
.lbtn { height: 48px; min-width: 148px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 0 16px; cursor: pointer; }
.lbtn.kakao { background: #FEE500; border-color: #FEE500; color: #191600; }
.lbtn.naver { background: #03C75A; border-color: #03C75A; color: #fff; }
.lbtn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.gdot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0 100%); }
.landing .section { padding: 12px 0 48px; }
.h2 { font-size: 18px; font-weight: 500; margin: 8px 0 14px; letter-spacing: -.03em; }
.cgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ccard { padding: 16px; display: block; transition: border-color .15s; }
.ccard:hover { border-color: #d3cdf0; }
.ccard .avatar, .ccard .avatar-ph { width: 64px; height: 64px; margin-bottom: 10px; }
.ccard .nm { font-weight: 800; font-size: 16px; }
.ccard .job { color: var(--sub); font-size: 13px; margin: 2px 0 10px; }
.chip-s { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; }
.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.guide-grid .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.guide-grid h3 { font-size: 16px; margin-top: 12px; letter-spacing: -.03em; }
.guide-grid p { color: var(--sub); font-size: 14px; margin-top: 6px; line-height: 1.6; }
@media (max-width: 800px) {
  .hero { padding: 36px 0 16px; }
  .hero h1 { font-size: 28px; }
  .cgrid { grid-template-columns: 1fr 1fr; }
  .logins { flex-direction: column; align-items: stretch; }
  .lbtn { width: 100%; }
  .guide-grid { grid-template-columns: 1fr; }
}

/* 로그인 */
.auth { max-width: 420px; margin: 24px auto; }
.auth h1 { font-size: 24px; font-weight: 800; text-align: center; letter-spacing: -.04em; }
.auth .sub { text-align: center; color: var(--sub); margin-top: 8px; font-size: 14px; }
.auth .logins { flex-direction: column; align-items: stretch; margin: 24px 0 0; }
.auth .lbtn { width: 100%; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 폼 */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.input, textarea.input, select.input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); padding: 0 12px; font-size: 15px; outline: none; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; font-size: 14px; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seg { display: inline-flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--sub); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(28, 27, 46, .08); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }

/* 알약 탭 (크리에이터 페이지·스튜디오) */
.tabs { display: flex; gap: 8px; margin: 14px 0; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { flex: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--sub); cursor: pointer; }
.tabs .on { background: var(--accent); color: #fff; border-color: var(--accent); }
.cols { display: grid; gap: 16px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 320px; align-items: start; } .cols aside { position: sticky; top: 80px; } }

/* 크리에이터 페이지 (디자인/03·04) */
.cover { height: 180px; overflow: hidden; margin: 0 calc(50% - 50vw); position: relative; z-index: 1; background: #e9e9ef; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.profile { position: relative; margin-top: -40px; padding: 18px; display: flex; gap: 14px; border-radius: 24px; }
.profile .av { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; margin-top: -36px; flex: none; background: #fff; position: relative; z-index: 2; }
.profile .av img, .profile .av .avatar-ph { width: 100%; height: 100%; object-fit: cover; }
.profile .info { position: relative; z-index: 2; min-width: 0; }
.profile .name { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.profile .job { color: var(--sub); font-size: 13px; margin-top: 2px; }
.profile .bio { margin: 8px 0 10px; font-size: 14px; line-height: 1.55; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }
.links a { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.side { position: sticky; top: 76px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px; margin-bottom: 14px; scroll-margin-top: 80px; }
.label { font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.post { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: block; }
.post .ph { height: 120px; position: relative; overflow: hidden; background: var(--bg); }
.post .ph img { width: 100%; height: 100%; object-fit: cover; }
.post .ph .txt { padding: 12px; font-size: 13px; line-height: 1.5; color: var(--sub); height: 100%; background: var(--soft); }
.post .cap { margin: 8px 10px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post.locked .ph img { filter: blur(7px); transform: scale(1.08); }
.post.locked .ph .txt { filter: blur(3px); }
.lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; background: rgba(255, 255, 255, .35); font-weight: 800; font-size: 15px; color: var(--text); }
.wish { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.wish:last-child { margin-bottom: 0; }
.wish .pic { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; background: var(--bg); }
.wish .pic img { width: 100%; height: 100%; object-fit: cover; }
.wish .body { flex: 1; min-width: 0; }
.wish .wtitle { font-weight: 800; font-size: 14px; }
.wish .meta { color: var(--sub); font-size: 12px; margin: 2px 0 6px; }
.bar { height: 6px; background: #EEEAF8; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s ease; }
.gift { margin-top: 8px; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 7px 10px; font-weight: 800; font-size: 12px; cursor: pointer; }
.gift:hover { background: var(--accent-ink); }
.wish .give { margin-top: 10px; }
.wish .give .chips { gap: 6px; }
.wish .give .chip { height: 36px; font-size: 13px; padding: 0 10px; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tip { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; font-weight: 800; font-size: 14px; background: #fff; cursor: pointer; }
.tip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tipform .input { margin-top: 8px; height: 42px; font-size: 14px; }
.tipform textarea.input { height: auto; min-height: 0; }
.dmcheck { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--sub); cursor: pointer; }
.dmcheck input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.send { width: 100%; margin-top: 8px; background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 11px; font-weight: 800; font-size: 14px; cursor: pointer; min-height: 44px; }
.send:hover { background: var(--accent-ink); }
.send:disabled { opacity: .5; }
.note { color: var(--sub); font-size: 12px; margin-top: 8px; line-height: 1.5; }
@media (max-width: 800px) {
  .cover { height: 140px; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .pgrid { grid-template-columns: 1fr 1fr; }
}

/* 게시물 그리드 (내 후원 등) */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 800px) { .post-grid { grid-template-columns: 1fr 1fr; } }

.supporter { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.supporter:first-child { border-top: 0; }

/* 게시물 상세 */
.post-detail { max-width: 640px; margin: 0 auto; overflow: hidden; }
.post-detail .media { position: relative; background: var(--bg); }
.post-detail .media img { width: 100%; max-height: 80vh; object-fit: contain; background: var(--bg); }
.post-detail .media .blurwrap { overflow: hidden; aspect-ratio: 3 / 4; }
.post-detail .media .blurwrap img { height: 100%; object-fit: cover; filter: blur(24px); transform: scale(1.2); background: none; }
.unlock-box { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--text); padding: 20px; background: rgba(255, 255, 255, .35); }
.unlock-box .price { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.unlock-box .lk { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* 결제 */
.pay { max-width: 560px; margin: 0 auto; }
.pay-sum { display: flex; justify-content: space-between; align-items: center; }
.pay-sum .amt { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.testnote { background: var(--accent-soft); color: #4a35b8; border-radius: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.done-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 8px auto 0; }

/* 스튜디오/관리자 */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat .k { color: var(--sub); font-size: 13px; font-weight: 700; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; }
.stat.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.stat.accent .k { color: rgba(255, 255, 255, .8); }
.list > .item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.list > .item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .amt { font-weight: 800; white-space: nowrap; }
.item .bar { margin: 8px 0 6px; }
.thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--bg); flex: none; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--sub); cursor: pointer; display: block; background: var(--soft); }
.drop img { max-height: 220px; margin: 0 auto; border-radius: 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--sub); font-size: 12px; font-weight: 700; border-top: 0; }
.scroll-x { overflow-x: auto; }

.empty { text-align: center; color: var(--faint); padding: 36px 12px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { color: var(--sub); font-size: 12px; padding: 20px 16px 28px; text-align: center; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }
