@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --brown-900: #2f1d11; --brown-800: #3f2817; --brown-700: #5a3a24; --brown-500: #8a5a36; --brown-300: #c8a27e;
  --gold: #e9b44c; --gold-soft: #f6e3b8;
  --ivory: #fbf7ef; --ivory-2: #f4ecdd; --cream: #fffdf8; --line: #e8dcc8;
  --ink: #2a1f17; --muted: #7b6a5c; --ok: #2f7a4a; --warn: #b3541e; --danger: #b3261e;
  --radius: 14px; --shadow: 0 6px 24px rgba(63, 40, 23, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: var(--ink); background: var(--ivory); line-height: 1.6; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* 머리말 */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-top { display: flex; align-items: center; gap: 20px; height: 72px; }
.logo { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.logo b { font-size: 30px; font-weight: 900; color: var(--brown-800); letter-spacing: -1px; }
.logo b i { font-style: normal; color: var(--gold); }
.logo span { font-size: 15px; color: var(--brown-700); font-weight: 600; }
.search { flex: 1; max-width: 460px; margin-left: auto; display: flex; border: 1.5px solid var(--brown-700); border-radius: 999px; overflow: hidden; background: #fff; }
.search input { flex: 1; border: 0; padding: 10px 18px; outline: none; min-width: 0; }
.search button { border: 0; background: var(--brown-700); color: #fff; padding: 0 18px; cursor: pointer; }
.top-icons { display: flex; gap: 18px; font-size: 13px; color: var(--brown-700); }
.top-icons a { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.top-icons svg { width: 24px; height: 24px; }
.badge-dot { position: absolute; top: -4px; right: 2px; background: var(--danger); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 5px; line-height: 16px; }
.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 16px; border-radius: 10px; font-weight: 600; white-space: nowrap; color: var(--brown-800); }
.nav a:hover { background: var(--ivory-2); }
.nav a.on { background: var(--brown-700); color: #fff; }
.menu-btn { display: none; border: 0; background: none; padding: 6px; cursor: pointer; }

/* 배너 */
.hero { position: relative; border-radius: 0 0 22px 22px; overflow: hidden; background: linear-gradient(115deg, #2f1d11 0%, #4a2f1b 45%, #8a5a36 100%); color: #fffaf0; }
.hero.has-img { background-size: cover; background-position: center; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(35, 21, 12, .85) 0%, rgba(35, 21, 12, .45) 55%, rgba(35, 21, 12, .1) 100%); }
.hero-in { position: relative; z-index: 1; padding: 64px 20px 56px; max-width: 1200px; margin: 0 auto; }
.hero .eyebrow { font-size: 20px; color: var(--gold-soft); font-weight: 600; }
.hero h1 { font-size: 52px; line-height: 1.15; margin: 10px 0 14px; font-weight: 900; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { max-width: 520px; font-size: 18px; opacity: .92; margin: 0 0 24px; }
.hero-points { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-points div { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.hero-points svg { width: 30px; height: 30px; }

/* 공통 */
.section { padding: 44px 0 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.section-head h2 { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: -.5px; }
.section-head a { color: var(--muted); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--brown-700); background: var(--brown-700); color: #fff;
  border-radius: 12px; padding: 12px 22px; font-weight: 700; cursor: pointer; transition: .15s; text-align: center; }
.btn:hover { background: var(--brown-800); }
.btn.ghost { background: transparent; color: var(--brown-700); }
.btn.ghost:hover { background: var(--ivory-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--brown-900); }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 22px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--ivory-2); color: var(--brown-700); }
.tag.red { background: #d9483b; color: #fff; }
.tag.gold { background: var(--gold); color: var(--brown-900); }
.tag.green { background: #e3f1e6; color: var(--ok); }
.tag.gray { background: #eee; color: #666; }

/* 카테고리 */
.cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: -30px; position: relative; z-index: 2; }
.cat { background: #fff6e6; border: 1px solid var(--line); border-radius: 16px; padding: 16px 8px 14px; text-align: center; font-weight: 800; transition: .15s; }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat svg { width: 72px; height: 72px; margin: 0 auto 6px; display: block; }
.cat span { display: block; position: relative; }
.cat span::after { content: ''; display: block; width: 36px; height: 3px; background: var(--gold); border-radius: 2px; margin: 6px auto 0; }
.cat.offline { border: 2px solid var(--gold); }

/* 강의 카드 */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.course { display: block; }
.course .thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--brown-700); }
.course .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.course:hover .thumb img { transform: scale(1.04); }
.course .thumb .tag { position: absolute; top: 10px; left: 10px; }
.course .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.course .thumb .lock { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .9); border-radius: 8px; padding: 3px 7px; font-size: 12px; font-weight: 700; color: var(--brown-800); }
.course h3 { font-size: 16px; margin: 10px 0 2px; font-weight: 800; }
.course p { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bar { height: 6px; background: var(--ivory-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--gold); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 700; cursor: pointer; }
.tabs button.on { background: var(--brown-700); color: #fff; border-color: var(--brown-700); }

.split { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.offline-box { background: linear-gradient(160deg, #fff6e6, #f6e3b8); border-radius: 18px; padding: 28px; border: 1px solid var(--line); }
.offline-box h3 { font-size: 26px; margin: 0 0 12px; font-weight: 900; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; }
.checks li { padding: 4px 0 4px 28px; position: relative; font-weight: 600; }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--brown-700); font-weight: 900; }

.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; margin: 44px 0 0; }
.features div { padding: 18px 16px; border-right: 1px solid var(--line); }
.features div:last-child { border-right: 0; }
.features b { display: block; font-size: 15px; }
.features span { font-size: 13px; color: var(--muted); }

.pass-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pass { padding: 22px; text-align: left; }
.pass h3 { margin: 0 0 4px; font-size: 18px; }
.pass .price { font-size: 26px; font-weight: 900; color: var(--brown-800); margin: 8px 0; }
.pass .price small { font-size: 14px; color: var(--muted); font-weight: 600; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

/* 바닥글 */
.site-footer { margin-top: 64px; background: var(--brown-900); color: #e9dccb; padding: 36px 0 48px; font-size: 14px; }
.site-footer a { color: #fff; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; font-weight: 600; }
.foot-logo { font-size: 24px; font-weight: 900; color: #fff; margin-bottom: 8px; }

/* 상세 */
.detail-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding-top: 28px; }
.player-box { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; user-select: none; }
.player-box video { width: 100%; height: 100%; display: block; background: #000; }
.player-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  color: #fff; background: linear-gradient(0deg, rgba(20, 12, 6, .86), rgba(20, 12, 6, .55)); padding: 20px; }
.player-cover img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.wm { position: absolute; color: rgba(255, 255, 255, .28); font-size: 13px; pointer-events: none; transition: top 1s, left 1s; z-index: 3; text-shadow: 0 0 2px rgba(0, 0, 0, .5); }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); color: #fff; z-index: 4;
  display: flex; flex-direction: column; gap: 8px; opacity: 1; transition: opacity .3s; }
.player-box.idle .controls { opacity: 0; }
.seek { position: relative; height: 8px; background: rgba(255, 255, 255, .25); border-radius: 99px; cursor: pointer; }
.seek .watched { position: absolute; top: 0; height: 100%; background: rgba(233, 180, 76, .55); border-radius: 99px; }
.seek .played { position: absolute; top: 0; left: 0; height: 100%; background: var(--gold); border-radius: 99px; }
.ctl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl-row button { background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; font-weight: 700; }
.ctl-row button.on { background: var(--gold); color: var(--brown-900); }
.ctl-row .sp { flex: 1; }
.ctl-row input[type=range] { width: 80px; accent-color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--brown-900); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 100;
  box-shadow: var(--shadow); max-width: 90vw; }
.player-box:fullscreen { border-radius: 0; }

.info-box h1 { font-size: 30px; margin: 6px 0 10px; line-height: 1.25; letter-spacing: -.5px; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.notice-box { background: #fff7e3; border: 1px solid #f0d9a5; border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.notice-box p { margin: 3px 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; }
.recipe-card { position: relative; overflow: hidden; }
.recipe-blur { filter: blur(5px); user-select: none; pointer-events: none; opacity: .65; }
.recipe-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; text-align: center; padding: 20px;
  background: linear-gradient(0deg, rgba(251, 247, 239, .96) 30%, rgba(251, 247, 239, .55)); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; vertical-align: top; }
table.t th { background: var(--ivory-2); font-weight: 700; white-space: nowrap; }

/* 양식 */
.form { max-width: 440px; margin: 40px auto; }
.form h1 { font-size: 26px; text-align: center; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 14px; outline: none; }
.input:focus { border-color: var(--brown-500); }
textarea.input { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 14px; }
.check input { margin-top: 4px; accent-color: var(--brown-700); }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 6px 0; }
.okmsg { color: var(--ok); font-size: 14px; }

.page-title { padding: 34px 0 6px; }
.page-title h1 { margin: 0; font-size: 30px; letter-spacing: -.5px; }
.prose { white-space: pre-line; line-height: 1.8; }

.modal-bg { position: fixed; inset: 0; background: rgba(30, 18, 10, .5); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--cream); border-radius: 16px; max-width: 520px; width: 100%; padding: 24px; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 10px; }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.side-tabs { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding-top: 24px; }
.side-tabs nav { display: flex; flex-direction: column; gap: 4px; }
.side-tabs nav a { padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.side-tabs nav a.on { background: var(--brown-700); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 16px; }
.stat b { display: block; font-size: 24px; color: var(--brown-800); }
.stat span { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

@media (max-width: 1000px) {
  .cats { grid-template-columns: repeat(4, 1fr); }
  .grid, .pass-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .detail-top { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .features div { border-bottom: 1px solid var(--line); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .header-top { height: 60px; gap: 10px; }
  .logo span { display: none; }
  .logo b { font-size: 26px; }
  .search { display: none; }
  .top-icons { margin-left: auto; gap: 12px; }
  .top-icons a span { display: none; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 15px; }
  .hero-in { padding: 40px 20px 52px; }
  .cats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat { font-size: 13px; padding: 10px 4px; }
  .cat svg { width: 48px; height: 48px; }
  .grid { gap: 12px; }
  .course h3 { font-size: 14px; }
  .side-tabs { grid-template-columns: 1fr; }
  .side-tabs nav { flex-direction: row; overflow-x: auto; }
  .side-tabs nav a { white-space: nowrap; }
  .kv { grid-template-columns: 90px 1fr; }
  .pass-grid { grid-template-columns: 1fr; }
}
