:root {
	--paper: #f5f0e6;
	--paper2: #ebe3d3;
	--ink: #1f1a17;
	--ink2: #5b524a;
	--line: #d8ccb6;
	--red: #8a2b1e;
	--red2: #a83a29;
	--gold: #b8892f;
	--night: #191512;
	font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.75; font-size: 16px; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--red); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.01em; }
.muted, .small { color: var(--ink2); font-size: 14px; }
.todo { background: #fff2b3; padding: 0 4px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: rgba(25, 21, 18, 0.96); color: #eee3d0; }
.top a { color: #eee3d0; text-decoration: none; }
.top .brand { font-weight: 800; letter-spacing: 0.02em; }
.top nav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }
.top .who { margin-left: auto; font-size: 12px; color: #bfb3a0; }

.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 6px; padding: 10px 20px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red2); }
.btn.ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.btn.big { padding: 14px 26px; font-size: 17px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* 판매 페이지 */
.hero { background: var(--night); color: #f1e8d8; display: flex; gap: 40px; align-items: center; justify-content: center; padding: 56px 24px; }
.hero-in { max-width: 560px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); margin: 8px 0 16px; }
.hero .lead { color: #d8ccb6; font-size: 17px; }
.hero .eyebrow { color: var(--gold); font-weight: 700; font-size: 14px; margin: 0; }
.hero .small { color: #a99d8a; }
.hero .btn.ghost { color: #f1e8d8; box-shadow: inset 0 0 0 2px #8f8371; }
.hero-img { width: 280px; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.price { display: flex; align-items: baseline; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.price .list, .sum .list { text-decoration: line-through; color: #9a8f80; }
.price .sale { font-size: 34px; font-weight: 800; color: #fff; }
.price .off { background: var(--red); color: #fff; font-weight: 800; font-size: 14px; padding: 2px 8px; border-radius: 4px; }

.numbers { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 1000px; margin: -28px auto 0; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(60, 40, 20, 0.12); position: relative; }
.numbers div { padding: 20px 10px; text-align: center; border-right: 1px solid var(--paper2); }
.numbers div:last-child { border: 0; }
.numbers b { display: block; font-size: 28px; color: var(--red); }
.numbers span { font-size: 13px; color: var(--ink2); line-height: 1.4; display: block; }

.block { max-width: 1000px; margin: 0 auto; padding: 56px 24px 8px; }
.block h2 { font-size: 26px; margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: #fff; border-radius: 10px; padding: 20px 22px; border-top: 4px solid var(--red); }
.card h3 { margin-top: 0; font-size: 18px; }
.card p { margin-bottom: 0; color: var(--ink2); font-size: 15px; }
.shots { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.shots img { width: 220px; border-radius: 12px; box-shadow: 0 8px 24px rgba(60, 40, 20, 0.18); }
.shots .cap { width: 100%; text-align: center; color: var(--ink2); font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two h2 { font-size: 22px; }
ul.check, ul.x { padding-left: 0; list-style: none; }
ul.check li, ul.x li { padding-left: 26px; position: relative; margin: 8px 0; }
ul.check li::before { content: '✓'; position: absolute; left: 0; color: var(--red); font-weight: 800; }
ul.x li::before { content: '✕'; position: absolute; left: 0; color: #8f8371; font-weight: 800; }

.curr details { background: #fff; border-radius: 8px; margin: 8px 0; padding: 4px 18px; }
.curr summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.curr .chno { color: var(--red); margin-right: 6px; }
.curr .cnt { float: right; color: var(--ink2); font-weight: 400; font-size: 14px; }
.curr ol { margin: 0 0 12px; color: var(--ink2); }
.curr .free { font-size: 12px; background: var(--red); color: #fff; padding: 1px 7px; border-radius: 10px; text-decoration: none; margin-left: 6px; }

table.reveal { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
table.reveal th, table.reveal td { padding: 12px 16px; border-bottom: 1px solid var(--paper2); text-align: left; }
table.reveal th { width: 42%; font-weight: 600; }
.blur { color: #b9ad9a; letter-spacing: 0.05em; font-family: monospace; }

ul.info li { margin: 6px 0; }

.buybox { display: grid; grid-template-columns: 300px 1fr; gap: 28px; background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 6px 24px rgba(60, 40, 20, 0.1); }
.sum .pname { font-weight: 800; font-size: 18px; margin-top: 0; }
.sum .sale { font-size: 28px; color: var(--red); }
form label { display: block; margin: 0 0 14px; font-weight: 600; font-size: 15px; }
form label small { font-weight: 400; color: var(--ink2); }
form input[type='email'], form input[type='text'] { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: #fffdf9; }
label.agree { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; }
label.agree input { margin-top: 6px; }
.err { color: #b3261e; font-weight: 600; }
#payBtn { width: 100%; margin-top: 8px; }

#faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
#faq summary { cursor: pointer; font-weight: 700; }

.foot { text-align: center; padding: 40px 20px; color: var(--ink2); font-size: 13px; line-height: 1.8; }
.foot a { color: var(--ink2); }

/* 하위 페이지 */
.narrow { max-width: 720px; margin: 0 auto; padding: 40px 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.notice { background: #fff; border-left: 4px solid var(--red); padding: 12px 16px; }

/* 강의 */
body.learn { background: #fbf8f2; }
.wm { position: fixed; inset: 0; pointer-events: none; z-index: 50; background-repeat: repeat; }
.navbtn { display: none; margin-left: 10px; background: transparent; color: #eee3d0; border: 1px solid #6d6254; border-radius: 4px; padding: 3px 10px; font: inherit; font-size: 13px; }
.lwrap { display: grid; grid-template-columns: 290px 1fr; max-width: 1200px; margin: 0 auto; }
.lnav { position: sticky; top: 46px; height: calc(100vh - 46px); overflow-y: auto; padding: 18px 14px 40px; border-right: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.navt { font-weight: 800; margin: 14px 0 4px; font-size: 13px; color: var(--red); }
.lnav ul { list-style: none; padding: 0; margin: 0; }
.lnav li { padding: 4px 6px; border-radius: 4px; }
.lnav li a { color: var(--ink); text-decoration: none; }
.lnav li.here { background: var(--paper2); font-weight: 700; }
.lnav em { font-style: normal; font-size: 11px; color: var(--red); margin-left: 4px; }
.lnav em.soon { color: #9a8f80; }
.lesson { padding: 30px 40px 80px; max-width: 820px; min-width: 0; }
.lesson h1 { font-size: 30px; margin-top: 4px; }
.lesson h2 { margin-top: 40px; padding-bottom: 6px; border-bottom: 2px solid var(--paper2); }
.lesson h3 { margin-top: 28px; }
.lesson .crumb { color: var(--red); font-weight: 700; font-size: 14px; margin: 0; }
.lesson table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 16px 0; display: block; overflow-x: auto; }
.lesson th, .lesson td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.lesson th { background: var(--paper2); }
.lesson blockquote { margin: 16px 0; padding: 10px 18px; background: #fff; border-left: 4px solid var(--gold); color: #3c342d; }
.lesson code { background: #efe7d8; padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }
.lesson pre { background: #211c18; color: #eadfcb; padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.lesson pre code { background: none; padding: 0; }
.lesson img { border-radius: 8px; }
.lesson .locked { background: #fff; padding: 20px 24px; border-radius: 10px; }
.freenote { background: #fff; border: 1px dashed var(--red); padding: 8px 14px; border-radius: 6px; font-size: 14px; margin: 10px 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }

/* 관리자 */
body.admin main { padding: 20px; }
body.admin table { border-collapse: collapse; font-size: 13px; width: 100%; }
body.admin th, body.admin td { border: 1px solid var(--line); padding: 6px; vertical-align: top; }
body.admin .acts form { margin: 2px 0; }
body.admin .ok { color: #1b6e2a; }
body.admin tr.st-refunded { background: #eee; color: #888; }
.tablewrap { overflow-x: auto; }

@media (max-width: 820px) {
	.hero { flex-direction: column; padding: 40px 20px 56px; }
	.hero-img { width: 220px; }
	.numbers { grid-template-columns: repeat(3, 1fr); margin: -24px 14px 0; }
	.numbers div:nth-child(3) { border-right: 0; }
	.cards, .two, .buybox { grid-template-columns: 1fr; }
	.top nav a:not(:last-child) { display: none; }
	.lwrap { grid-template-columns: 1fr; }
	.lnav { display: none; position: fixed; top: 46px; left: 0; right: 0; bottom: 0; height: auto; background: #fbf8f2; z-index: 20; }
	body.navopen .lnav { display: block; }
	.navbtn { display: inline-block; }
	.top .who { display: none; }
	.lesson { padding: 22px 18px 60px; }
}
.lesson td:first-child { white-space: nowrap; }
.closed-note { background: #fff7e0; border: 1px solid #e8cf8a; padding: 14px 16px; border-radius: 8px; }
.hero .sub { color: var(--gold); font-weight: 700; font-size: 17px; margin: -6px 0 14px; }
.follow { margin-top: 22px; background: var(--night); color: #f1e8d8; border-radius: 12px; padding: 20px 24px; }
.follow-t { margin: 0 0 12px; font-weight: 800; font-size: 19px; color: var(--gold); }
.follow ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 10px; counter-reset: st; }
.follow li { counter-increment: st; background: #2d2622; border-radius: 6px; padding: 6px 12px; font-weight: 700; font-size: 15px; }
.follow li::before { content: counter(st) '. '; color: var(--gold); }
.follow li:not(:last-child)::after { content: ' →'; color: #8f8371; }
.follow .small { color: #bfb3a0; margin: 0; }
