@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css");
:root {
  --accent: #1f4e9c; --accent-weak: #e8eef8; --ink: #1b1f27; --sub: #5d6575; --line: #e3e6ec; --bg: #f5f6f8; --card: #fff;
  --green: #1d8a4e; --green-bg: #e6f4ec; --yellow: #b7791f; --yellow-bg: #fdf3e1; --red: #c53030; --red-bg: #fdeaea;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; word-break: keep-all; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
.wide { max-width: 1280px; }
header.top { background: var(--accent); color: #fff; padding: 14px 0 16px; margin-bottom: 16px; }
header.top .wrap { padding-bottom: 0; }
header.top .prog { font-size: 13px; opacity: .85; }
header.top h1 { font-size: 20px; margin: 2px 0 0; font-weight: 700; }
header.top .who { font-size: 14px; margin-top: 4px; opacity: .92; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 15px; margin: 14px 0 6px; }
.muted { color: var(--sub); font-size: 14px; }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 15px; text-decoration: none; color: var(--ink); min-height: 42px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; min-height: 32px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.danger { color: var(--red); border-color: #f1c4c4; }
label.f { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
label.f .req { color: var(--red); margin-left: 2px; }
.help { color: var(--sub); font-size: 13px; margin: -2px 0 6px; }
input[type=text], input[type=date], input[type=time], input[type=url], input[type=tel], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; border: 1px solid #cfd4dc; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 16px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
textarea.tall { min-height: 320px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: #eef0f4; color: var(--sub); white-space: nowrap; }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.yellow { background: var(--yellow-bg); color: var(--yellow); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.blue { background: var(--accent-weak); color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: #e0a526; } .dot.red { background: var(--red); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); padding: 12px 0; }
.list > li:first-child { border-top: 0; padding-top: 4px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px; font-size: 14.5px; }
.kv dt { color: var(--sub); } .kv dd { margin: 0; }
.counter { font-size: 13px; text-align: right; margin-top: 4px; color: var(--sub); }
.counter.ok { color: var(--green); font-weight: 600; } .counter.bad { color: var(--red); font-weight: 600; }
.step { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; }
.step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.step .b { flex: 1; min-width: 0; }
.step .t { font-weight: 700; margin-bottom: 4px; }
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.photo { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fafbfc; aspect-ratio: 4/3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 6px; }
.photo .x { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.photo.add { display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--sub); cursor: pointer; border-style: dashed; font-size: 14px; }
.sticky-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 10px; display: flex; gap: 8px; }
.sticky-bar .btn { flex: 1; }
.notice { background: var(--accent-weak); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: #23406f; margin: 10px 0; }
.notice.warn { background: var(--yellow-bg); color: #7a5112; }
.notice.bad { background: var(--red-bg); color: #8a2020; }
.notice.ok { background: var(--green-bg); color: #165f37; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: 90vw; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.toast.err { background: var(--red); }
.slot { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 6px; margin-bottom: 6px; }
.bar { height: 8px; background: #edf0f4; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.seg { display: inline-flex; border: 1px solid #cfd4dc; border-radius: 10px; overflow: hidden; }
.seg label { padding: 8px 14px; cursor: pointer; font-size: 15px; }
.seg input { display: none; }
.seg input:checked + span { color: var(--accent); font-weight: 700; }
.seg label:has(input:checked) { background: var(--accent-weak); }
.foot { text-align: center; color: var(--sub); font-size: 12.5px; margin-top: 26px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--sub); padding: 20px 0; font-size: 14px; }
details.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfc; margin-top: 10px; }
details.box summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.pre { white-space: pre-wrap; font-size: 14.5px; }

/* 운영자·학교 화면 */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-size: 15px; color: var(--sub); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-size: 28px; font-weight: 800; line-height: 1.2; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--sub); }
.kpi .l { font-size: 13px; color: var(--sub); }
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
table.tbl td.wrap-cell { white-space: normal; min-width: 200px; }
table.tbl th { background: #f8f9fb; font-weight: 600; color: var(--sub); position: sticky; top: 0; cursor: pointer; }
table.tbl tr:hover td { background: #fafbfd; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar input[type=text] { max-width: 240px; }
.modal-bg { position: fixed; inset: 0; background: rgba(15,20,30,.45); display: flex; align-items: flex-start; justify-content: center; z-index: 40; overflow-y: auto; padding: 24px 12px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 760px; padding: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edit-row { display: grid; grid-template-columns: 120px 1fr 1.6fr 70px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.demo-badge { background: #fff3cd; color: #7a5a00; border: 1px solid #f0d78c; padding: 6px 12px; border-radius: 10px; font-size: 13.5px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .edit-row { grid-template-columns: 1fr 1fr; } .slot { grid-template-columns: 1fr 1fr; } }
