/* SchoolFix 공통 모양 — 모든 화면이 함께 쓴다 */
:root {
  --brand: #2457d6;
  --brand-dark: #1a44b0;
  --brand-soft: #e8efff;
  --bg: #f3f6fb;
  --card: #fff;
  --text: #172033;
  --muted: #566074;
  --border: #dfe5ef;
  --red: #b3261e;
  --red-soft: #fdecea;
  --orange: #a14a00;
  --orange-soft: #fff0e0;
  --yellow: #805a00;
  --yellow-soft: #fff4cc;
  --green: #17733f;
  --green-soft: #e3f6ea;
  --blue: #1a44b0;
  --blue-soft: #e8efff;
  --radius: 16px;
  --shadow: 0 4px 18px rgba(23, 32, 51, 0.07);
}

* { box-sizing: border-box; }

/* hidden을 붙인 것은 항상 숨긴다 (display를 정한 class가 있어도) */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 12px; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 12px; }
code { background: #eef1f6; padding: 1px 5px; border-radius: 6px; font-size: 0.9em; }

:focus-visible { outline: 3px solid #172033; outline-offset: 2px; }
.hero :focus-visible, .admin-bar :focus-visible { outline-color: #ffb703; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── 위쪽 메뉴 ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--brand); text-decoration: none; white-space: nowrap; }
.topnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a, .link-btn {
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.topnav a:hover, .link-btn:hover { background: var(--brand-soft); }
.topnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.link-btn { border: 0; background: none; font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; }

.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  flex: 1;
}
.page.wide { max-width: 1180px; }

.footer { padding: 18px 16px 28px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }

/* ── 카드 · 글자 ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.empty { color: var(--muted); text-align: center; padding: 12px 0; margin: 0; list-style: none; }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-weight: 600; }
.more { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: none; }

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.big { width: 100%; min-height: 54px; font-size: 1.1rem; }
.btn.secondary { background: var(--brand-soft); color: var(--brand-dark); }
.btn.secondary:hover { background: #d7e3ff; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: #f5f7fb; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f1c3bf; }
.btn.danger:hover { background: var(--red-soft); }
.btn.success { background: #17733f; }
.btn.success:hover { background: #0f5130; }
.small-btn { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; }

/* ── 입력칸 ── */
.field { margin-bottom: 16px; }
.label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { display: block; margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
input[type="text"], input[type="password"], input[type="search"], input[type="date"], textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d2e1;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 110px; resize: vertical; }

/* 입력 칸 두 개·세 개를 한 줄에 (휴대폰에서는 한 줄에 하나씩) */
.row2, .row3 { display: grid; gap: 0 12px; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .row2, .row3 { grid-template-columns: 1fr; }
}

/* AI 분석 결과 아래의 [완료] 버튼들 */
.result-actions { display: grid; gap: 10px; margin-top: 16px; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
.form-error { color: var(--red); background: var(--red-soft); padding: 10px 12px; border-radius: 10px; }

/* ── 위험도 · 상태 표시 ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  background: #eef1f6;
  color: var(--text);
}
.chip.risk-1, .chip.status-resolved { background: var(--green-soft); color: var(--green); }
.chip.risk-2, .chip.status-checking { background: var(--yellow-soft); color: var(--yellow); }
.chip.risk-3 { background: var(--orange-soft); color: var(--orange); }
.chip.risk-4, .chip.status-received { background: var(--red-soft); color: var(--red); }
.chip.status-in_progress { background: var(--blue-soft); color: var(--blue); }
.chip.new { background: #ffb703; color: #3d2a00; }

/* ── 문제 목록 ── */
.issue-list { list-style: none; margin: 0; padding: 0; }
.issue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.issue-item:first-child { border-top: 0; }
.issue-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  font-size: 1.3rem;
}
.rank {
  flex: 0 0 auto;
  width: 34px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--muted);
}
.issue-main { flex: 1; min-width: 0; }
.issue-title { display: block; font-weight: 700; color: var(--text); text-decoration: none; }
.issue-title:hover { text-decoration: underline; }
.issue-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.85rem; color: var(--muted); }

.empathy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.empathy-btn:hover { background: var(--brand-soft); }
.empathy-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.empathy-btn[disabled] { cursor: default; opacity: 0.7; }
.empathy-btn.static, .empathy-btn.static[aria-pressed="true"] { background: #f5f7fb; border-color: var(--border); color: var(--muted); opacity: 1; }

/* ── 알림 ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translate(-50%, 30px);
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: #172033;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  white-space: pre-line;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 사진 고르기 (신고·분실물·관리자 화면이 같이 쓴다) ── */
.photo-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 2px dashed #b8c4da;
  border-radius: var(--radius);
  background: #f8faff;
  cursor: pointer;
  overflow: hidden;
}
.photo-drop.small { min-height: 110px; }
.photo-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.photo-drop:focus-within { outline: 3px solid #172033; outline-offset: 2px; }
.photo-empty { font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); padding: 16px; text-align: center; }
.photo-preview { width: 100%; max-height: 320px; object-fit: contain; display: block; background: #000; }
.photo-remove { margin-top: 8px; }
.count { text-align: end; }

/* ── 🤖 AI 분석 중 ── */
.analyzing { text-align: center; padding: 36px 20px; }
.analyzing-title { font-size: 1.2rem; font-weight: 800; margin: 16px 0; }
.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border: 6px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--muted); }
.analyzing-steps li { opacity: 0.35; animation: step 2.4s infinite; }
.analyzing-steps li:nth-child(2) { animation-delay: 0.8s; }
.analyzing-steps li:nth-child(3) { animation-delay: 1.6s; }
@keyframes step { 0%, 100% { opacity: 0.35; } 30%, 60% { opacity: 1; color: var(--text); } }

/* ── FindU 알림 (메인 화면·FindU 화면이 같이 쓴다) ── */
.updates { display: grid; gap: 10px; margin-bottom: 16px; }
.updates:empty { display: none; }
.fu-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  font-weight: 800;
}
.fu-alert a { flex: 1; color: inherit; text-decoration: none; }
.fu-alert a:hover { text-decoration: underline; }
.fu-alert small { display: block; margin-top: 2px; font-weight: 600; }
.fu-alert.match { background: #fff4cc; border-color: #f2df9c; color: #4d3700; }
.fu-alert.approved, .fu-alert.thanks { background: var(--green-soft); border-color: #b9e6c9; color: #0f5130; }
.fu-alert.rejected { background: var(--red-soft); border-color: #f4c7c2; color: #8a1c14; }
.fu-alert .close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}
.fu-alert .close:hover { background: rgba(0, 0, 0, 0.06); }

/* ── 메뉴의 알림 숫자 · 휴대폰 아래쪽 메뉴 ── */
.nav-icon { display: none; }
.mainnav a { position: relative; }
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-inline-start: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d93a2b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}
.nav-badge[hidden] { display: none; }

@media (max-width: 640px) {
  body.student { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.student .topbar { backdrop-filter: none; }
  body.student .mainnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(23, 32, 51, 0.08);
  }
  body.student .mainnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 2px;
    font-size: 0.75rem;
    text-align: center;
    border-radius: 12px;
  }
  body.student .mainnav .nav-icon { display: block; font-size: 1.35rem; line-height: 1.15; }
  body.student .mainnav .nav-badge { position: absolute; top: 2px; left: calc(50% + 8px); margin: 0; }
  body.student .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .card { padding: 16px; }
  .topnav a, .link-btn { padding: 6px 8px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ════════════════════════════════════════════════
   2026 리디자인 (모아뱅크 스타일) — 아래 규칙이 위의 규칙을 덮어쓴다
   되돌리려면 backups/before-redesign/ 의 파일로 바꾸면 된다
   ════════════════════════════════════════════════ */
:root {
  --brand: #3182f6;
  --brand-dark: #1b64da;
  --brand-soft: #e8f3ff;
  --bg: #f3f5f8;
  --card: #fff;
  --text: #191f28;
  --muted: #6b7684;
  --border: #eef0f3;
  --red: #cf3434;
  --red-soft: #ffeeee;
  --orange: #b8620f;
  --orange-soft: #fff4e9;
  --yellow: #946500;
  --yellow-soft: #fff3d7;
  --green: #12805a;
  --green-soft: #eaf8f2;
  --blue: #1b64da;
  --blue-soft: #e8f3ff;
  --radius: 23px;
  --shadow: 0 2px 9px rgba(49, 62, 84, 0.04);
}
body { letter-spacing: -0.2px; }
h1 { font-size: 27px; font-weight: 800; letter-spacing: -1.1px; }
h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.7px; margin-bottom: 14px; }
:focus-visible { outline: 3px solid #9dc8ff; }

/* 위쪽 메뉴 */
.topbar { background: rgba(243, 245, 248, 0.94); border-bottom: 0; padding-top: 14px; padding-bottom: 10px; }
body.student .brand { display: inline-flex; align-items: center; gap: 9px; font-size: 0; color: var(--text); }
body.student .brand::before {
  content: "S"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 11px;
  background: var(--brand); color: #fff; font-size: 18px; font-weight: 900; transform: rotate(-7deg);
}
body.student .brand::after { content: "SchoolFix"; font-size: 21px; font-weight: 800; letter-spacing: -0.9px; }
.topnav a, .link-btn { border-radius: 12px; color: #4e5968; font-weight: 700; }
.topnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

.page { padding: 8px 20px 36px; }

/* 카드 */
.card { border-radius: var(--radius); padding: 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h1:first-child { margin-bottom: 14px; }
.muted { color: var(--muted); }
.more, .back { color: var(--brand); font-weight: 750; font-size: 0.9rem; }

/* 버튼 */
.btn { border-radius: 14px; min-height: 50px; padding: 12px 18px; font-weight: 800; letter-spacing: -0.3px; }
.btn.big { min-height: 56px; font-size: 1rem; }
.btn.secondary { background: var(--brand-soft); color: var(--brand-dark); }
.btn.secondary:hover { background: #d9eaff; }
.btn.ghost { background: #f2f4f7; color: #4e5968; border: 0; }
.btn.ghost:hover { background: #e9edf3; }
.btn.danger { border: 0; background: var(--red-soft); }
.btn.success { background: #1ca687; }
.btn.success:hover { background: #12805a; }
.small-btn { min-height: 38px; padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; }

/* 입력칸 */
.label { font-size: 0.85rem; color: #4e5968; font-weight: 800; margin-bottom: 8px; }
.hint { color: #8b95a1; font-size: 0.8rem; }
input[type="text"], input[type="password"], input[type="search"], input[type="date"], textarea, select {
  min-height: 50px; padding: 13px 15px; border: 1px solid #e5eaf0; border-radius: 13px; background: #f8fafc;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); background: #fff; outline: none; }
.form-error { border-radius: 13px; }

/* 상태 표시 */
.chip { padding: 3px 9px; border-radius: 8px; font-size: 0.75rem; font-weight: 800; background: #f2f4f7; }

/* 문제 목록 */
.issue-item { gap: 13px; padding: 14px 0; border-top: 1px solid #f3f4f6; }
.issue-icon, .rank {
  width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 14px; background: #f4f5f8; font-size: 1.2rem;
}
.rank { color: #4e5968; font-size: 1.05rem; font-weight: 800; }
.issue-title { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.3px; }
.issue-meta { font-size: 0.75rem; color: #8b95a1; gap: 6px; }
.empathy-btn {
  min-height: 38px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: #f2f4f7; color: #4e5968; font-size: 0.85rem; font-weight: 800;
}
.empathy-btn:hover { background: #e9edf3; }
.empathy-btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.empathy-btn.static, .empathy-btn.static[aria-pressed="true"] { background: #f4f5f8; color: #8b95a1; }

/* 알림 */
.toast { border-radius: 13px; background: #252f40; font-size: 0.85rem; }
.fu-alert { border: 0; border-radius: 19px; }

/* 사진 고르기 */
.photo-drop { min-height: 150px; border: 1.5px dashed #d5dde8; border-radius: 16px; background: #f8fafc; }
.photo-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.photo-empty { color: var(--brand); font-size: 1rem; font-weight: 800; }

/* 휴대폰 아래쪽 메뉴 */
.nav-badge { background: #f04452; }
@media (max-width: 640px) {
  body.student .mainnav {
    padding: 9px 8px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid #f0f1f3; box-shadow: none;
  }
  body.student .mainnav a { gap: 4px; color: #8b95a1; font-size: 0.68rem; font-weight: 750; background: transparent; }
  body.student .mainnav a:hover { background: transparent; color: #4e5968; }
  body.student .mainnav a[aria-current="page"] { background: transparent; color: var(--brand); }
  body.student .mainnav .nav-icon { width: 24px; height: 24px; display: grid; place-items: center; font-size: 1rem; line-height: 1; }
  body.student .mainnav .nav-icon .ic { width: 24px; height: 24px; vertical-align: 0; }
  .page { padding: 4px 20px 32px; }
}
@media (max-width: 480px) {
  h1 { font-size: 25px; }
  .card { padding: 20px; }
}


/* ════════════════════════════════════════════════
   2026 추가 기능: 앱 아이콘 · 위쪽 아이콘 · 화면 전환 효과 · 모달 창 · 글자 크기 · 설정/알림/도움말 화면
   ════════════════════════════════════════════════ */

/* 브랜드 마크 = 앱 아이콘 */
body.student .brand::before {
  content: "";
  background: url("/static/icon-192.png") center / cover no-repeat;
  border-radius: 9px;
  transform: none;
}

/* 위쪽 오른쪽: 알림 · 설정 */
.top-actions { display: flex; align-items: center; gap: 2px; }
.icon-link {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; color: #4e5968; text-decoration: none;
}
.icon-link:hover { background: #e9edf3; }
.icon-link[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav-badge.dot {
  position: absolute; top: 7px; inset-inline-end: 8px; min-width: 0; width: 10px; height: 10px;
  margin: 0; padding: 0; border: 2px solid var(--bg); font-size: 0;
}
@media (min-width: 641px) {
  .topbar .topnav { margin-inline-start: auto; }
  .top-actions { margin-inline-start: 8px; }
}

/* ── 화면 전환 효과 ── */
@view-transition { navigation: auto; }
.topbar { view-transition-name: sf-topbar; }
@media (max-width: 640px) { body.student .mainnav { view-transition-name: sf-tabbar; } }
::view-transition-old(root) { animation: 150ms ease-in both sf-fade-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both sf-slide-in; }
@keyframes sf-fade-out { to { opacity: 0; } }
@keyframes sf-slide-in { from { opacity: 0; transform: translateY(10px); } }

/* 화면이 열리면 카드가 차례로 올라온다 */
.page > * { animation: sf-rise 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.page > *:nth-child(2) { animation-delay: 0.04s; }
.page > *:nth-child(3) { animation-delay: 0.08s; }
.page > *:nth-child(4) { animation-delay: 0.12s; }
.page > *:nth-child(5) { animation-delay: 0.16s; }
.page > *:nth-child(n + 6) { animation-delay: 0.2s; }
@keyframes sf-rise { from { opacity: 0; transform: translateY(12px); } }

/* 누르는 느낌 */
.btn, .empathy-btn, .map-chip, .zone, .fu-card, .icon-link, .choice, .link-row, .fu-filter button {
  transition: transform 0.12s ease, background-color 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
.btn:active, .empathy-btn:active, .map-chip:active, .zone:active, .fu-card:active, .icon-link:active, .choice:active, .fu-filter button:active {
  transform: scale(0.97);
}
.toast { transition: opacity 0.25s, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* 효과 끄기 (설정 화면) — 기기의 '동작 줄이기'는 위쪽 prefers-reduced-motion 규칙이 맡는다 */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important; transition: none !important;
}
html[data-motion="off"]::view-transition-group(*),
html[data-motion="off"]::view-transition-old(*),
html[data-motion="off"]::view-transition-new(*) { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── 모달 창 (sfConfirm · sfAlert) ── */
.sf-modal {
  width: min(420px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 24px;
  background: #fff; color: var(--text); box-shadow: 0 24px 60px rgba(25, 31, 40, 0.22);
}
.sf-modal::backdrop { background: rgba(21, 35, 56, 0.45); }
.sf-modal[open] { animation: sf-pop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sf-modal[open]::backdrop { animation: sf-fade 0.2s ease; }
.sf-modal.closing { animation: sf-pop-out 0.15s ease forwards; }
.sf-modal-body { padding: 26px 22px 6px; }
.sf-modal-title { margin: 0 0 8px; font-size: 20px; }
.sf-modal-text { margin: 0; color: var(--muted); white-space: pre-line; }
.sf-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px 22px 22px; }
.sf-modal-actions.single { grid-template-columns: 1fr; }
.btn.danger-solid { background: #f04452; color: #fff; }
.btn.danger-solid:hover { background: #d93a47; }
@keyframes sf-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes sf-pop-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes sf-sheet { from { transform: translateY(100%); } }
@keyframes sf-sheet-out { to { transform: translateY(100%); } }
@keyframes sf-fade { from { opacity: 0; } }
@media (max-width: 640px) {
  .sf-modal {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sf-modal[open] { animation: sf-sheet 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sf-modal.closing { animation: sf-sheet-out 0.15s ease forwards; }
}

/* ── 글자 크게 (설정 화면) ── */
html[data-font="large"] { font-size: 112.5%; }
html[data-font="large"] body { font-size: 18px; }
html[data-font="large"] h1, html[data-font="large"] .hero h1, html[data-font="large"] .fu-hero h1 { font-size: 30px; }
html[data-font="large"] h2 { font-size: 22px; }

/* ── 화면 제목 (설정 · 알림) ── */
.page-head { padding: 14px 2px 8px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { margin: 0; font-size: 0.9rem; }

/* ── 설정 ── */
.settings-card h2 { margin-bottom: 12px; }
.choice-list { display: grid; gap: 8px; margin: 0 0 10px; padding: 0; border: 0; }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid #e5eaf0; border-radius: 14px; background: #f8fafc; font-weight: 800; cursor: pointer;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-text { flex: 1; }
.choice-check { flex: none; width: 22px; height: 22px; border: 2px solid #d1d6db; border-radius: 50%; background: #fff; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice:has(input:checked) .choice-check {
  border-color: var(--brand);
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.choice:has(input:focus-visible) { outline: 3px solid #9dc8ff; outline-offset: 2px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.settings-card h2 + .setting-row { border-top: 0; padding-top: 4px; }
.setting-text { font-weight: 800; }
.setting-row .hint { margin: 4px 0 0; }
.segmented { flex: none; display: inline-flex; padding: 3px; border-radius: 12px; background: #f2f4f7; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 14px; border-radius: 9px; color: #6b7684; font-size: 0.85rem; font-weight: 800; white-space: nowrap; }
.segmented input:checked + span { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(25, 31, 40, 0.1); }
.segmented input:focus-visible + span { outline: 3px solid #9dc8ff; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 2px;
  border-top: 1px solid var(--border); color: var(--text); font-weight: 750; text-decoration: none;
}
.settings-card h2 + .link-row { border-top: 0; padding-top: 4px; }
a.link-row:hover { color: var(--brand); }

/* ── 알림 ── */
.notify-list { list-style: none; margin: 0; padding: 0; }
.notify-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid #f3f4f6; }
.notify-item:first-child { border-top: 0; }
.notify-item a { flex: 1; display: grid; gap: 3px; color: var(--text); font-weight: 750; text-decoration: none; }
.notify-item a:hover .notify-text { text-decoration: underline; }
.notify-item small { color: #8b95a1; font-size: 0.78rem; font-weight: 600; }
.unread-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #f04452; }

/* ── 앱 소개 · 도움말 ── */
.about-hero { margin-bottom: 14px; padding: 28px 22px 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: center; }
.about-logo { display: block; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; }
.about-hero .btn { width: 100%; margin-top: 8px; }
.how-steps { list-style: none; display: grid; gap: 16px; margin: 0; padding: 0; }
.how-steps li { display: flex; align-items: flex-start; gap: 13px; }
.how-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 900; }
.how-steps b { display: block; margin-bottom: 2px; }
.how-steps p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.meaning-list { display: grid; gap: 12px; margin: 0; }
.meaning-list > div { display: flex; align-items: center; gap: 12px; }
.meaning-list dt { flex: none; min-width: 118px; }
.meaning-list dd { margin: 0; color: var(--muted); font-size: 0.9rem; }
.faq details { border-top: 1px solid var(--border); }
.faq details:first-child { border-top: 0; }
.faq summary { position: relative; padding: 13px 0; padding-inline: 2px 30px; font-weight: 800; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: 8px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid #8b95a1; border-bottom: 2px solid #8b95a1;
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 2px 14px; color: var(--muted); }

/* ── 오류 화면 ── */
.error-card { padding: 34px 22px; }
.error-emoji { display: flex; justify-content: center; margin-bottom: 12px; }
.error-actions { display: grid; gap: 10px; max-width: 320px; margin: 18px auto 0; }

/* ═══════════ 아이콘 (.ic) · 색 점 (.dot) · 타일 ═══════════
   이모지 대신 쓰는 아이콘. 한 번만 정의하고, 화면에서는 <span class="ic ic-camera" aria-hidden="true"></span> 처럼 쓴다.
   (자바스크립트: common.js의 sfIcon('camera')). 모양은 Lucide 스타일(선 두께 2). 색은 글자색(currentColor)을 따라간다. */
.ic {
  display: inline-block; flex: 0 0 auto; width: 1.15em; height: 1.15em; vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.ic-lg { width: 1.5em; height: 1.5em; vertical-align: -0.35em; }
.ic-home { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2010.5%2012%203l9%207.5V20a1%201%200%200%201-1%201h-5v-6H9v6H4a1%201%200%200%201-1-1z'/%3E%3C/svg%3E"); }
.ic-camera { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14.5%204h-5L7%207H4a2%202%200%200%200-2%202v9a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V9a2%202%200%200%200-2-2h-3z'/%3E%3Ccircle%20cx='12'%20cy='13'%20r='3.5'/%3E%3C/svg%3E"); }
.ic-map { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%204%203%206v14l6-2%206%202%206-2V4l-6%202z'/%3E%3Cpath%20d='M9%204v14M15%206v14'/%3E%3C/svg%3E"); }
.ic-search { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='7'/%3E%3Cpath%20d='m20%2020-3.5-3.5'/%3E%3C/svg%3E"); }
.ic-bell { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%208a6%206%200%200%200-12%200c0%207-3%208-3%209h18c0-1-3-2-3-9'/%3E%3Cpath%20d='M10.3%2021a1.9%201.9%200%200%200%203.4%200'/%3E%3C/svg%3E"); }
.ic-clipboard { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='8'%20y='3'%20width='8'%20height='4'%20rx='1'/%3E%3Cpath%20d='M16%205h2a2%202%200%200%201%202%202v12a2%202%200%200%201-2%202H6a2%202%200%200%201-2-2V7a2%202%200%200%201%202-2h2'/%3E%3Cpath%20d='M9%2012h6M9%2016h4'/%3E%3C/svg%3E"); }
.ic-clock { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Cpath%20d='M12%207v5l3%202'/%3E%3C/svg%3E"); }
.ic-sparkles { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203l1.8%205.2L19%2010l-5.2%201.8L12%2017l-1.8-5.2L5%2010l5.2-1.8z'/%3E%3Cpath%20d='M19%2016v4M17%2018h4'/%3E%3C/svg%3E"); }
.ic-pin { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2021s7-6.2%207-11.5a7%207%200%200%200-14%200C5%2014.8%2012%2021%2012%2021z'/%3E%3Ccircle%20cx='12'%20cy='9.5'%20r='2.5'/%3E%3C/svg%3E"); }
.ic-user { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8'%20r='4'/%3E%3Cpath%20d='M4%2021a8%208%200%200%201%2016%200'/%3E%3C/svg%3E"); }
.ic-thumbs-up { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M7%2011v9H4a1%201%200%200%201-1-1v-7a1%201%200%200%201%201-1z'/%3E%3Cpath%20d='M7%2011l4-8a2.5%202.5%200%200%201%202.5%202.8L13%209h5.5a2%202%200%200%201%202%202.3l-1.2%207a2%202%200%200%201-2%201.7H7'/%3E%3C/svg%3E"); }
.ic-package { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%208%2012%203%203%208v8l9%205%209-5z'/%3E%3Cpath%20d='M3%208l9%205%209-5M12%2013v8'/%3E%3C/svg%3E"); }
.ic-lock { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='5'%20y='11'%20width='14'%20height='10'%20rx='2'/%3E%3Cpath%20d='M8%2011V8a4%204%200%200%201%208%200v3'/%3E%3C/svg%3E"); }
.ic-bot { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='4'%20y='8'%20width='16'%20height='12'%20rx='3'/%3E%3Cpath%20d='M12%208V4M9%204h6M9%2013v1.5M15%2013v1.5'/%3E%3C/svg%3E"); }
.ic-check-circle { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Cpath%20d='m8%2012.5%202.8%202.8L16%209.5'/%3E%3C/svg%3E"); }
.ic-alert-triangle { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203.5%202.5%2020h19z'/%3E%3Cpath%20d='M12%2010v4.5M12%2017.5h.01'/%3E%3C/svg%3E"); }
.ic-arrow-right { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14M13%206l6%206-6%206'/%3E%3C/svg%3E"); }
.ic-chevron-right { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m9%206%206%206-6%206'/%3E%3C/svg%3E"); }
.ic-x { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%206l12%2012M18%206%206%2018'/%3E%3C/svg%3E"); }
.ic-wrench { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14.7%206.3a1%201%200%200%200%200%201.4l1.6%201.6a1%201%200%200%200%201.4%200l3.77-3.77a6%206%200%200%201-7.94%207.94l-6.91%206.91a2.12%202.12%200%200%201-3-3l6.91-6.91a6%206%200%200%201%207.94-7.94z'/%3E%3C/svg%3E"); }
.ic-droplet { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203s6%206.2%206%2011a6%206%200%200%201-12%200c0-4.8%206-11%206-11z'/%3E%3C/svg%3E"); }
.ic-zap { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M13%202%204%2014h7l-1%208%209-12h-7z'/%3E%3C/svg%3E"); }
.ic-thermometer { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%2014.8V5a2%202%200%200%200-4%200v9.8a4%204%200%201%200%204%200z'/%3E%3C/svg%3E"); }
.ic-wifi { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2.5%209a14%2014%200%200%201%2019%200'/%3E%3Cpath%20d='M5.5%2012.5a9.5%209.5%200%200%201%2013%200'/%3E%3Cpath%20d='M8.8%2016a5%205%200%200%201%206.4%200'/%3E%3Cpath%20d='M12%2019.5h.01'/%3E%3C/svg%3E"); }
.ic-monitor { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='4'%20width='18'%20height='12'%20rx='2'/%3E%3Cpath%20d='M8%2021h8M12%2016v5'/%3E%3C/svg%3E"); }
.ic-dumbbell { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6.5%206.5v11M17.5%206.5v11M3.5%209v6M20.5%209v6M6.5%2012h11'/%3E%3C/svg%3E"); }
.ic-info { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Cpath%20d='M12%2011v5M12%208h.01'/%3E%3C/svg%3E"); }
.ic-activity { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2012h4l3-8%204%2016%203-8h4'/%3E%3C/svg%3E"); }
.ic-check { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m5%2012.5%204.5%204.5L19%207'/%3E%3C/svg%3E"); }
.ic-gift { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='8'%20width='18'%20height='4'%20rx='1'/%3E%3Cpath%20d='M12%208v13M5%2012v8a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1v-8'/%3E%3Cpath%20d='M7.5%208a2.5%202.5%200%200%201%200-5C10%203%2012%208%2012%208s2-5%204.5-5a2.5%202.5%200%200%201%200%205'/%3E%3C/svg%3E"); }
.ic-calendar { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5'%20width='18'%20height='16'%20rx='2'/%3E%3Cpath%20d='M16%203v4M8%203v4M3%2010h18'/%3E%3C/svg%3E"); }
.ic-credit-card { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/%3E%3Cpath%20d='M2%2010h20'/%3E%3C/svg%3E"); }
.ic-pencil { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M17%203l4%204L8%2020l-5%201%201-5z'/%3E%3Cpath%20d='M14%206l4%204'/%3E%3C/svg%3E"); }
.ic-book { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2019.5V5a2%202%200%200%201%202-2h14v15H6a2%202%200%200%200-2%202%202%202%200%200%200%202%202h14'/%3E%3C/svg%3E"); }
.ic-shirt { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M8%203%203%206l2%204%203-1v12h8V9l3%201%202-4-5-3a4%204%200%200%201-8%200z'/%3E%3C/svg%3E"); }
.ic-backpack { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M8%2021V10a4%204%200%200%201%208%200v11z'/%3E%3Cpath%20d='M9%206V4a3%203%200%200%201%206%200v2M8%2015h8'/%3E%3C/svg%3E"); }
.ic-glasses { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='6'%20cy='15'%20r='4'/%3E%3Ccircle%20cx='18'%20cy='15'%20r='4'/%3E%3Cpath%20d='M10%2015a2%202%200%200%201%204%200M2%2015%204%206M22%2015%2020%206'/%3E%3C/svg%3E"); }
.ic-cup { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%203h12l-1.5%2017a1%201%200%200%201-1%201h-7a1%201%200%200%201-1-1z'/%3E%3Cpath%20d='M6.5%208h11'/%3E%3C/svg%3E"); }
.ic-umbrella { --ic: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2012a9%209%200%200%201%2018%200z'/%3E%3Cpath%20d='M12%2012v7a2%202%200%200%200%204%200'/%3E%3C/svg%3E"); }

/* 색 점: 상태·위험도·지도 상태를 이모지(🔴🟡🟢) 대신 CSS 색 점으로. 알림 종의 빨간 점(.nav-badge.dot)과는 따로 쓴다 */
.dot:not(.nav-badge) {
  display: inline-block; flex: 0 0 auto; width: 0.62em; height: 0.62em; margin-right: 0.35em;
  border-radius: 50%; vertical-align: 0.02em; background: var(--dot, #c9d2e1);
}
.dot-risk-1, .dot-status-resolved, .dot-health-good { --dot: #22a35a; }
.dot-risk-2, .dot-status-checking, .dot-health-warn { --dot: #f2b300; }
.dot-risk-3 { --dot: #f07a14; }
.dot-risk-4, .dot-status-received, .dot-health-bad { --dot: #e5392d; }
.dot-status-in_progress { --dot: #2f6fe4; }

/* 문제 유형 타일 (연한 색 둥근 타일 + 유형 아이콘) */
.type-tile {
  width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem;
}
.type-tile.tile-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.7rem; }

/* TOP 5 순위: 메달 이모지 대신 숫자 타일 */
.rank-tile {
  width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 14px; background: #f4f5f8; color: #4e5968; font-size: 1.1rem; font-weight: 800;
}
.rank-tile.rank-1 { background: #fff4cc; color: #7a5600; }
.rank-tile.rank-2 { background: #eceff3; color: #4e5968; }
.rank-tile.rank-3 { background: #ffe9d9; color: #9a4a00; }

/* small-fixes-2026: 색 점·아이콘이 부모 span 규칙(여백·배경)을 물려받지 않게 */
.legend span.dot { padding: 0 !important; border: 0 !important; }
span.ic { padding: 0 !important; border: 0 !important; min-height: 0 !important; box-shadow: none !important; background-color: currentColor !important; }
.quick-name { overflow-wrap: anywhere; }

/* 불러오기 실패: 오류 글 + [다시 시도] 버튼 */
.load-error { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; list-style: none; }
.load-error .empty { padding: 0; }

/* 손가락으로 누르기 쉽게: 글자 크기는 그대로 두고 누르는 영역만 44px 이상으로 넓힌다 (레이아웃은 음수 마진으로 유지) */
.footer a { display: inline-block; padding: 14px 6px; margin: -14px -2px; }
.back, .more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; margin-bottom: 0; }
.issue-title { padding: 10px 0; margin: -10px 0; }

/* 언어 선택 상자 (언어가 많아져도 한 줄로) */
.lang-select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #d9dee7; border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-weight: 600; }
.lang-select:focus-visible { outline: 3px solid #9dc8ff; outline-offset: 1px; }
.lang-note { margin-top: 8px; }

/* 오른쪽→왼쪽 언어(아랍어 등): 방향 화살표를 뒤집고, AI·학생이 쓴 글은 자기 글의 방향대로 둔다 */
[dir="rtl"] .dir-arrow { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .issue-title, [dir="rtl"] .ai-summary, [dir="rtl"] .resolution, [dir="rtl"] .fu-card-title, [dir="rtl"] .cand-head h2,
[dir="rtl"] .issue-meta .place, [dir="rtl"] .note-text { unicode-bidi: plaintext; }

