/* 블록캠퍼스 환급반 — 업계 표준형 (Pretendard · 흰 카드 · 강조색 하나) */
:root {
  --bg: #F2F4F6; --card: #FFFFFF; --ink: #191F28; --sub: #4E5968; --mute: #6B7684; --line: #E5E8EB; --line2: #F0F2F4;
  --acc: #1B64DA; --acc-press: #1554BC; --acc-soft: #E8F1FD; --acc-ink: #0F4AA8;
  --ok: #0B7A55; --ok-soft: #E6F5EE; --bad: #C42B2B; --bad-soft: #FDECEC; --warn: #9A5A00; --warn-soft: #FFF4E0;
  --track: #E9ECF0; --r: 16px; --r-sm: 10px;
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgba(25, 31, 40, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
::selection { background: #CFE0FA; color: var(--ink); }
a { color: var(--acc); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 96px); }
.wrap.plain { padding-bottom: 48px; }

/* 상단 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 4px 10px; }
.top h1:focus { outline: none; }
.top h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: none; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px; border: 0; background: var(--card); color: var(--sub); font-weight: 700; font-size: 12px; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow); }
.avatar:hover { background: #F7F8FA; }

/* 카드 · 섹션 */
.card { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 4px 10px; }
.sec h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.sec span { font-size: 14px; color: var(--sub); }
.label { font-size: 14px; color: var(--sub); }
.big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; margin: 2px 0 14px; }
.bar { display: block; height: 10px; border-radius: 6px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--acc); border-radius: 6px; }
.bar.ok > i { background: var(--ok); }
.bar.thin { height: 6px; }
.legend { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); margin-top: 8px; }

/* 목록형 카드 (미션 · 조건) */
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
button.row { width: 100%; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 16px 20px; align-items: center; }
.row + .row { border-top: 1px solid var(--line2); }
.row b { font-size: 16px; font-weight: 700; }
.row .n { font-size: 16px; font-weight: 700; color: var(--acc-ink); }
.row .n.done { color: var(--ok); }
.row .bar { grid-column: 1 / -1; }
.row .s { grid-column: 1 / -1; font-size: 14px; color: var(--sub); }
.row .s.ok { color: var(--ok); }
.row .s.warn { color: var(--warn); }
.row .s.bad { color: var(--bad); font-weight: 600; }
.row.link { cursor: pointer; }
.row.link:hover { background: #FAFBFC; }
.chev { color: #A0A8B3; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.wait { background: #EEF0F3; color: var(--sub); }
.tag.acc { background: var(--acc-soft); color: var(--acc-ink); }
.tag svg { width: 14px; height: 14px; }

/* 알림 줄 */
.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-top: 12px; }
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.notice.warn { background: var(--warn-soft); color: #6B3F00; }
.notice.bad { background: var(--bad-soft); color: #8F1F1F; }
.notice.ok { background: var(--ok-soft); color: #075C40; }
.notice.info { background: var(--acc-soft); color: #0E3F8F; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--acc); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; transition: background .15s, transform .1s; }
.btn:hover { background: var(--acc-press); }
.btn:active { transform: scale(.985); }
.btn:disabled { background: #C9D2DD; color: #fff; cursor: not-allowed; transform: none; }
.btn:disabled[aria-busy="true"] { background: var(--acc); color: #fff; cursor: progress; }
.btn.ghost:disabled[aria-busy="true"] { background: #EEF2F7; color: var(--acc-ink); }
.btn.ghost { background: #EEF2F7; color: var(--acc-ink); }
.btn.ghost:hover { background: #E3EAF3; }
.btn.sm { height: 40px; font-size: 14px; border-radius: 10px; width: auto; padding: 0 14px; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.ghost .spin { border-color: rgba(15,74,168,.25); border-top-color: var(--acc-ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.cta { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); padding: 12px 16px; background: linear-gradient(to top, var(--bg) 70%, rgba(242,244,246,0)); z-index: 5; }
.cta .btn { max-width: 488px; margin: 0 auto; display: flex; }

/* 하단 탭 */
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 6; }
.nav > div { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 520px; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; color: #6B7684; text-decoration: none; min-height: 44px; }
.nav a svg { width: 23px; height: 23px; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* 폼 */
.field { margin-top: 16px; }
.field label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 14px; color: var(--mute); margin-top: 6px; }
.input, .textarea, .select { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 13px 14px; font-size: 16px; line-height: 1.5; transition: border-color .15s; }
.textarea { min-height: 110px; resize: vertical; }
.input:hover, .textarea:hover, .select:hover { border-color: #CDD3DA; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(27,100,218,.15); }
.input:disabled { background: #F7F8FA; color: var(--mute); }
.input.err, .textarea.err { border-color: var(--bad); }
.counter { display: flex; justify-content: flex-end; font-size: 14px; color: var(--mute); margin-top: 6px; }
.counter.ok { color: var(--ok); }

/* 종류 고르기 (세그먼트) */
.seg { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 6px; margin: 0 -4px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; color: var(--sub); cursor: pointer; }
.seg button:hover { border-color: #CDD3DA; }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 이미지 첨부 */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #EEF0F3; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(25,31,40,.72); color: #fff; display: grid; place-items: center; cursor: pointer; }
.shot button svg { width: 14px; height: 14px; }
.shot button::before { content: ""; position: absolute; inset: -8px; }
.add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed #C3CAD3; background: #FAFBFC; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--sub); cursor: pointer; }
.add:hover { border-color: var(--acc); color: var(--acc-ink); }
.add svg { width: 22px; height: 22px; }

/* 결과 */
.result { margin-top: 16px; border-radius: var(--r); padding: 18px 18px 16px; }
.result.ok { background: var(--ok-soft); }
.result.bad { background: var(--bad-soft); }
.result h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 18px; }
.result.ok h3 { color: var(--ok); } .result.bad h3 { color: var(--bad); }
.result h3 svg { width: 20px; height: 20px; }
.result p { margin: 0; font-size: 16px; color: var(--ink); }
.result .fb { margin-top: 10px; font-size: 14px; color: var(--sub); }

/* 시트 (아래에서 올라오는 패널) */
.scrim { position: fixed; inset: 0; background: rgba(25,31,40,.45); z-index: 20; animation: fade .2s ease-out; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--card); border-radius: 20px 20px 0 0; max-height: 88vh; overflow-y: auto;
  padding: 10px 20px calc(24px + var(--safe-b)); animation: up .28s cubic-bezier(.16, 1, .3, 1); max-width: 560px; margin: 0 auto; }
.sheet:focus { outline: none; }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: #D5DAE0; margin: 2px auto 14px; }
.sheet h3 { font-size: 18px; margin: 0 0 4px; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.quote { font-size: 20px; font-weight: 700; line-height: 1.55; letter-spacing: -0.01em; margin: 6px 0 8px; }
.big.ok-text { color: var(--ok); display: flex; align-items: center; gap: 8px; }
.big.ok-text svg { width: 26px; height: 26px; flex: none; }
.money { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 0; }
.kv-r dd { text-align: right; }
.quote-by { font-size: 14px; color: var(--mute); margin-bottom: 20px; }

/* 로그인 */
.login { max-width: 420px; margin: 0 auto; padding: 56px 20px 40px; }
.login h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; line-height: 1.35; }
.login p.lead { color: var(--sub); margin: 0 0 28px; font-size: 16px; }
.err-line { color: var(--bad); font-size: 14px; margin-top: 10px; }

/* 스켈레톤 */
.sk { background: linear-gradient(90deg, #E9ECF0 0%, #F3F5F7 50%, #E9ECF0 100%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; border-radius: 12px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* 내역 */
.hist .row { grid-template-columns: auto 1fr auto; }
.hist .d { font-size: 14px; color: var(--mute); }
.hist .m { font-size: 14px; color: var(--sub); grid-column: 2 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 36px 20px; color: var(--sub); font-size: 14px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.gallery img { width: 100%; border-radius: 10px; display: block; background: #EEF0F3; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; margin-top: 12px; }
.kv dt { color: var(--mute); } .kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }

/* 체크 목록 */
.check { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 14px 20px; }
.check + .check { border-top: 1px solid var(--line2); }
.check svg { width: 22px; height: 22px; }
.check .t { font-size: 16px; font-weight: 600; }
.check .v { font-size: 14px; color: var(--sub); }
.ico-ok { color: var(--ok); } .ico-no { color: #8B95A1; } .ico-bad { color: var(--bad); }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 84px); transform: translateX(-50%) translateY(8px); background: rgba(25,31,40,.92); color: #fff; padding: 11px 16px; border-radius: 12px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%); }

/* 움직임 줄이기: 이동·확대는 빼고 나타남(투명도)만 남김 */
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: fade .2s ease-out; }
  .btn:active { transform: none; }
  .sk { animation: none; }
  #toast, #toast.on { transform: translateX(-50%); transition: opacity .2s; }
}
@media (min-width: 720px) { .login { padding-top: 96px; } }
