:root {
  --ink: #14213d;
  --ink-2: #3d4a63;
  --sub: #6b7489;
  --line: #e4e8ef;
  --bg-soft: #f5f7fb;
  --brand: #1f4fd8;
  --brand-dark: #1640b0;
  --good: #12a150;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-soft); color: var(--ink);
  font: 16px/1.7 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}
a { color: var(--brand); }

/* 한 장짜리 카드 (첫 화면·결과 화면) */
.sheet, .result {
  width: calc(100% - 32px); max-width: 480px; margin: 56px auto 24px; padding: 36px 28px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 60px -28px rgba(20,33,61,.22);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin-bottom: 28px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; }
.sheet h1 { font-size: 26px; letter-spacing: -0.03em; margin: 0 0 10px; }
.lead { color: var(--ink-2); margin: 0 0 24px; }

.why { margin-bottom: 20px; }
.why b { display: block; margin-bottom: 6px; }
.why ul { list-style: none; margin: 0; padding: 0; }
.why li { position: relative; padding-left: 26px; margin: 6px 0; color: var(--ink-2); font-size: 15px; }
.why li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: #e9efff; color: var(--brand); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

.safe { background: #eef8f2; border-radius: 12px; padding: 14px 16px; margin-bottom: 24px; }
.safe b { color: var(--good); }
.safe p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

.todo { margin: 0 0 24px; padding-left: 22px; color: var(--ink-2); }
.todo li { margin: 4px 0 10px; }
.todo img { display: block; width: 100%; height: auto; margin: 10px 0 6px; border: 1px solid var(--line); border-radius: 10px; }
.todo small { display: block; font-size: 13px; color: var(--sub); line-height: 1.6; }

.btn { display: block; text-align: center; background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; padding: 15px; border-radius: 12px; }
.btn:hover { background: var(--brand-dark); }
.note { font-size: 13px; color: var(--sub); text-align: center; margin: 12px 0 0; }

footer { text-align: center; font-size: 13px; color: var(--sub); padding: 8px 16px 40px; }
footer a { color: var(--sub); }

/* 결과 화면 */
.result { text-align: center; }
.result .badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 26px; font-weight: 800; }
.result .badge.ok { background: #e3f6ec; color: var(--good); }
.result .badge.no { background: #fdecec; color: #d0342c; }
.result h1 { font-size: 22px; margin: 0 0 10px; }
.result p { color: var(--ink-2); margin: 0 0 8px; }
.result .btn { margin-top: 18px; }

/* 개인정보처리방침 */
.doc { width: calc(100% - 32px); max-width: 720px; margin: 40px auto; padding: 36px 28px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.doc h1 { font-size: 26px; letter-spacing: -0.03em; margin: 0 0 12px; }
.doc h2 { font-size: 18px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }

/* 관리 페이지 */
.admin .flash { background: #eef8f2; color: var(--good); border-radius: 10px; padding: 10px 14px; }
.ch { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.ch-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ch-main a { color: var(--ink); text-decoration: none; }
.ch-sub { grid-column: 1; font-size: 13px; color: var(--sub); }
.ch form { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.ch button { font: inherit; font-size: 14px; color: #d0342c; background: #fff; border: 1px solid #f1c4c1; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.tag.on { background: #e3f6ec; color: var(--good); }
.tag.off { background: #fdecec; color: #d0342c; }

/* 연결 순서: 외울 것 한 줄, PC/휴대폰 문구, 구글 창 뜬 뒤 안내를 왼쪽으로 */
.remember { background: #fff7e6; border-radius: 12px; padding: 14px 16px; margin-bottom: 24px; }
.remember p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.remember em { font-style: normal; font-weight: 700; color: var(--ink); }
.mo { display: none; }
@media (max-width: 899px) { .pc { display: none; } .mo { display: inline; } }
.side .sheet, .side footer { margin-left: 32px; max-width: 480px; }

/* 보는 화면 (원장님 전용 링크) */
.board { width: calc(100% - 32px); max-width: 1100px; margin: 40px auto; padding: 32px 28px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.board h1 { font-size: 26px; letter-spacing: -0.03em; margin: 0 0 4px; }
.board h2 { font-size: 18px; margin: 36px 0 10px; }
.board h2 small, .sheet-t small { font-size: 12px; font-weight: 400; color: var(--sub); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { background: var(--bg-soft); border-radius: 14px; padding: 14px 16px; }
.kpi span { display: block; font-size: 13px; color: var(--sub); }
.kpi b { display: block; font-size: 24px; letter-spacing: -0.02em; margin: 2px 0; }
.diff { font-size: 13px; font-weight: 700; }
.diff.up { color: var(--good); } .diff.down { color: #d0342c; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sheet-t, .vid-t { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
.sheet-t th, .sheet-t td, .vid-t th, .vid-t td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.sheet-t thead th, .vid-t thead th { background: var(--bg-soft); font-weight: 700; text-align: center; }
.sheet-t thead th small { display: block; }
.sheet-t tbody th, .vid-t tbody th { text-align: left; font-weight: 500; position: sticky; left: 0; background: #fff; }
.sheet-t thead th:first-child, .vid-t thead th:first-child { position: sticky; left: 0; z-index: 1; }
.sheet-t td:nth-child(2) { background: #f8faff; }
.sheet-t tr.grp th { background: #eef2fb; color: var(--brand); font-weight: 700; text-align: left; position: static; }
.vid-t tbody th { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.vid-t a { color: var(--ink); text-decoration: none; }
.foot { font-size: 13px; color: var(--sub); margin: 20px 0 0; }
.admin code { font-size: 12px; background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
@media (max-width: 640px) { .board { padding: 24px 16px; margin: 16px auto; } .kpis { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .kpi { padding: 10px; } .kpi b { font-size: 18px; } }
.kpis.five { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi.hl { background: #fff7e6; }
.sheet-t .goal { background: #fffbf0; color: var(--ink-2); }
.sheet-t td:nth-child(3) { background: #f8faff; }
.sheet-t td:nth-child(2) { background: #fffbf0; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #e9efff; color: var(--brand); margin-right: 4px; }
.chip.care { background: #e3f6ec; color: var(--good); }
.manage h2 { font-size: 18px; margin: 32px 0 6px; }
.manage .hint { font-size: 13px; color: var(--sub); margin: 0 0 10px; }
.manage .row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 12px; }
.manage label { display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); gap: 4px; }
.manage label.wide { flex: 1 1 260px; }
.manage input, .manage select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.manage select { max-width: 260px; }
.manage .care { width: 110px; }
.btn-s { font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: var(--brand); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; margin-top: 10px; }
.manage .list { border-collapse: collapse; width: 100%; font-size: 14px; }
.manage .list th, .manage .list td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.manage .list td.t { white-space: normal; min-width: 200px; }
.manage .list a { color: var(--ink); text-decoration: none; }
.manage .del { font: inherit; font-size: 13px; color: #d0342c; background: #fff; border: 1px solid #f1c4c1; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.manage .notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
@media (max-width: 640px) { .kpis.five { grid-template-columns: 1fr 1fr; } }
.manage h3 { font-size: 15px; margin: 18px 0 6px; }
.manage .ck { flex-direction: row; align-items: center; gap: 4px; font-size: 13px; }
.manage tr.pre td { color: var(--sub); }
.manage code.copy { cursor: pointer; font-size: 13px; background: #eef2fb; padding: 2px 6px; border-radius: 6px; }
.manage code.copy.done { background: #e3f6ec; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; min-height: 1px; background: var(--brand); border-radius: 3px 3px 0 0; }
.bar b { position: absolute; bottom: calc(100% - 0px); left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--ink-2); margin-bottom: 2px; }
.bar span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--sub); white-space: nowrap; margin-top: 4px; }
