:root {
  --ink: #14213d;
  --ink-2: #4a5568;
  --muted: #7a8394;
  --line: #e3e6ec;
  --bg: #f6f5f1;
  --card: #ffffff;
  --accent: #e8a33d;
  --accent-ink: #7a4a00;
  --ok: #2f855a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 64px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: baseline; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.logo { font-weight: 700; letter-spacing: .18em; font-size: 18px; }
.logo::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.sub { font-size: 12px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 6px; flex-shrink: 0; }
.chip {
  border: 1px solid rgba(255,255,255,.35); background: transparent; color: inherit;
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
}
.wrap .chip { border-color: var(--line); color: var(--ink); background: var(--card); }
.chip.ghost { opacity: .8; }

/* blocks */
.hero { padding: 20px 4px 8px; }
.hero h1 { margin: 4px 0; font-size: 26px; line-height: 1.25; }
.hero .meta { margin: 4px 0; color: var(--ink-2); }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 16px 0 6px; }
.sec { margin: 24px 4px 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 12px 0;
}
.card.focus { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.card.done { border-color: var(--ok); }
.big { font-size: 18px; font-weight: 600; margin: 6px 0 12px; }
.notice { background: #fdf6e8; border-radius: 10px; padding: 10px 12px; color: var(--accent-ink); }
.notice-card { border-color: var(--accent); }
.back { display: inline-block; margin: 12px 4px 0; text-decoration: none; color: var(--ink-2); }
.or { text-align: center; color: var(--muted); margin: 10px 0; }

/* forms */
.form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
label.inline { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
label.inline input { margin-top: 4px; }
input, textarea, select {
  font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%;
}
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--ink); flex-shrink: 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
legend { font-size: 14px; font-weight: 500; padding: 0 4px; }
.consent { font-size: 13px; color: var(--ink-2); }
.task { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row input:not([type=radio]):not([type=checkbox]) { flex: 1; min-width: 140px; width: auto; }
.btn {
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid var(--ink); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 10px 16px; text-decoration: none; display: inline-block; text-align: center;
}
.btn.primary { background: var(--ink); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ghost { border-color: var(--line); color: var(--ink-2); }
.btn:disabled { opacity: .5; }

/* curriculum */
.topics { list-style: none; padding: 0; margin: 0; }
.topics li { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.topics li:last-child { border-bottom: 0; }
.topics .wk { font-weight: 600; font-size: 13px; color: var(--accent-ink); }
.topics .dt { grid-column: 2; font-size: 12px; color: var(--muted); }

/* weeks */
.weeks { display: grid; gap: 10px; }
.week {
  display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.week .wk { font-size: 13px; font-weight: 600; }
.week .tp { margin-top: 2px; font-weight: 500; }
.week.current { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.week.locked { opacity: .55; }
.badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eef0f4; color: var(--ink-2); }
.badge.ok { background: #e6f4ec; color: var(--ok); }

.progress { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.progress > div { display: grid; }
.progress b { font-size: 20px; }
.progress .chip { margin-left: auto; }

.video { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.qs { display: grid; gap: 10px; margin-top: 14px; }
.q { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.q p { margin: 6px 0; }
.q-head { display: flex; gap: 6px; align-items: center; }
.a { background: #f3f5f9; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.a p { margin: 4px 0 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.scroll { overflow-x: auto; }
.att td, .att th { text-align: center; white-space: nowrap; }
.att td:first-child, .att th:first-child { text-align: left; }
.dot { font-size: 11px; margin-left: 2px; color: var(--accent-ink); }

/* admin */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 8px 0; }
.tabs button {
  font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap;
}
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.applicant.st-pending { box-shadow: inset 4px 0 0 var(--accent); }
.applicant.st-hold { opacity: .7; }
.applicant .mem { max-width: 160px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 20;
}

.status-box { border-radius: 12px; padding: 14px 16px; margin: 4px 0 16px; display: grid; gap: 6px; justify-items: start; }
.status-box.is-open { background: #e6f4ec; border: 1px solid #9fd3b5; }
.status-box.is-closed { background: #fdecec; border: 1px solid #f0b4b4; }
.status-title { font-weight: 700; font-size: 16px; }
.is-open .status-title { color: #22704a; }
.is-closed .status-title { color: #b42318; }
.status-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }

.ok-badge { display: inline-block; margin-top: 6px; background: #e6f4ec; color: #22704a; border: 1px solid #9fd3b5; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.sec-hint { margin: -4px 4px 10px; }
.st-badge { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st-badge.st-pending { background: #fff4e0; color: #9a5b00; }
.st-badge.st-approved { background: #e6f4ec; color: #22704a; }
.st-badge.st-hold { background: #eef0f4; color: #5b6475; }
.applicant.st-pending { border-left: 5px solid #e8a33d; box-shadow: none; }
.applicant.st-approved { border-left: 5px solid #2f855a; background: #f6fbf8; }
.applicant.st-hold { border-left: 5px solid #b0b7c3; opacity: .8; }
.cnt { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.cnt-pending { background: #fff4e0; color: #9a5b00; }
.cnt-approved { background: #e6f4ec; color: #22704a; }
.cnt-hold { background: #eef0f4; color: #5b6475; }
