/* 수업 자료 사이트 — 마중 색을 써요 */
:root {
  --ink: #232323; --sub: #6F6F6F; --line: #EBEBEB; --bg: #FAFAFA; --paper: #FFFFFF;
  --pink: #FF8FB3; --sky: #7CC4F5; --orange: #FF9F45; --lav: #B49CF5; --coral: #F05A46;
  --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 880px; margin: 0 auto; padding: 24px 16px 96px; }
h1 { font-size: 30px; letter-spacing: -0.03em; margin: 8px 0; text-wrap: balance; }
h2 { font-size: 22px; letter-spacing: -0.02em; margin: 48px 0 12px; }
h3 { font-size: 17px; margin: 0 0 4px; }
p { margin: 0 0 10px; }
.sub { color: var(--sub); font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.top b { flex: 1; }
.top a, .linkbtn { font-size: 14px; color: var(--sub); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; font-family: inherit; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.nav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 14px; font-weight: 600; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 12px; }
.center { max-width: 420px; margin: 12vh auto 0; text-align: center; }
.center .card { text-align: left; }

.btn { display: inline-block; padding: 13px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.main { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.kakao { background: #FEE500; border-color: #FEE500; color: #191919; width: 100%; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.wide { width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

label { display: block; margin: 14px 0 6px; font-size: 14px; color: var(--sub); }
input[type="text"], input[type="tel"], input[type="search"], textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; }
textarea { min-height: 120px; resize: vertical; }
.pair { display: flex; gap: 8px; } .pair input { flex: 1; min-width: 0; } .pair .btn { flex: none; border-radius: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; color: var(--ink); font-size: 14px; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--ink); }
.error { color: var(--coral); font-size: 14px; margin-top: 10px; }

/* 실습 순서 */
.step { display: grid; grid-template-columns: 64px 1fr; gap: 0 14px; }
.step .t { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 20px; }
.step .t small { display: block; font-weight: 400; color: var(--sub); }
.step.rest .card { background: transparent; border-style: dashed; color: var(--sub); padding: 12px 20px; }
.step.done .card { border-color: var(--sky); }
.step .goal { margin-top: 8px; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.step .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ask { position: relative; margin: 8px 0 0; padding: 12px 84px 12px 14px; background: var(--bg); border-radius: 12px; font-size: 15px; overflow-wrap: anywhere; }
.ask button { position: absolute; right: 8px; top: 8px; }
ul.plain { margin: 0; padding-left: 20px; }
ul.plain li { margin-bottom: 4px; }

/* 디자인 고르기 */
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.design { padding: 14px; }
.design .shot { aspect-ratio: 5 / 6; border-radius: 12px; border: 1px solid var(--line); background: var(--bg) top / cover no-repeat; margin-bottom: 12px; }
.design .row { display: flex; gap: 6px; margin-top: 10px; }
.design .row .btn { flex: 1; text-align: center; padding: 8px 6px; font-size: 13px; }

/* 워크북: 보는 사람 이름이 화면 전체에 깔리고, 고르기·인쇄가 안 돼요 */
.book { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.book .page { position: relative; overflow: hidden; }
.mark { position: absolute; inset: -40% -20%; pointer-events: none; z-index: 2; transform: rotate(-24deg); display: flex; flex-wrap: wrap; gap: 44px 56px; align-content: center; justify-content: center; font-size: 15px; font-weight: 700; color: rgba(35, 35, 35, .11); white-space: nowrap; }
body.hide .book { filter: blur(22px); }
body.hide .veil { display: flex; }
.veil { display: none; position: fixed; inset: 0; z-index: 9; align-items: center; justify-content: center; background: rgba(250, 250, 250, .9); font-weight: 600; text-align: center; padding: 24px; }
@media print { body * { display: none !important; } body::after { content: "이 자료는 인쇄할 수 없어요."; display: block; padding: 40px; } }

/* 관리 화면 */
.tabs { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.tabs button { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; font-size: 14px; cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--paper); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--sub); font-weight: 600; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); }
.pill.ok { background: var(--sky); } .pill.wait { background: var(--orange); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 16px; }
.stats .card { margin: 0; text-align: center; padding: 14px; }
.stats b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; max-width: 90vw; }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; } .step .t { padding: 12px 0 4px; } .step .t small { display: inline; margin-left: 6px; } h1 { font-size: 26px; } }
