@charset "UTF-8";
/* =========================================================
   보이스키퍼 — 스타일
   Claude Design UI Kit(2026-09-22 내보내기)을 실제 화면에 옮긴 버전.
   흰 바탕 + 네이비 하나 + 절제된 위험도 색. 그림자·그라데이션·알약 버튼 없음.
   본문 19px 이상, 버튼 최소 56px, 쉬운 화면은 23px/76px.
   ========================================================= */

:root {
  --navy: #12365C;
  --navy-dark: #0B2740;
  --navy-tint: #F2F6FA;
  --ink: #32302B;
  --ink-2: #4F4D48;
  --ink-3: #8E8D89;
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --line: #E6E6E4;
  --line-strong: #C9C8C4;
  --focus: #2F6FED;

  --safe: #0B5733;     --safe-bg: #E6F2EC;     --safe-ink: #08422A;
  --suspect: #6B5200;  --suspect-bg: #FBF3D8;  --suspect-ink: #4D3B00;
  --warn: #9B1C13;     --warn-bg: #FBE9E7;     --warn-ink: #6E140E;
  --danger: #5E0A0F;

  --alert-bg: #FDF6DC; --alert-line: #E3D08F; --alert-ink: #3A2A00;
  --correct-bg: #F3F8F4; --correct-line: #CFE3D7; --correct-ink: #08422A;
  --incorrect-bg: #FCF4F3; --incorrect-line: #EAD2CE; --incorrect-ink: #6E140E;

  /* 데스크톱 · 일반 */
  --fs-h1: 40px; --fs-h2: 27px; --fs-body: 19px; --fs-small: 16px;
  --btn: 56px; --btn-lg: 64px; --r: 6px; --pad: 40px; --nav-w: 236px;

  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 959px) {
  :root { --fs-h1: 30px; --fs-h2: 23px; --pad: 20px; }
}
body.easy {
  --fs-h1: 46px; --fs-h2: 32px; --fs-body: 23px; --fs-small: 18px;
  --btn: 64px; --btn-lg: 76px; --r: 8px;
}
@media (max-width: 959px) {
  body.easy { --fs-h1: 34px; --fs-h2: 26px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-size: var(--fs-body); font-weight: 500; word-break: keep-all; overflow-wrap: anywhere;
}
p, h1, h2, h3 { margin: 0; }
strong { font-weight: 700; }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; background: none; }
button, a, input, select { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus, #result-section:focus, #activity:focus { outline: none; }

.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; display: block; }

.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 14px 18px; background: #fff; border: 2px solid var(--focus); border-radius: var(--r); }

/* ---------- 헤더 ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; min-height: 76px; padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.brand strong.brand-word { font-size: 34px; font-family: "Quicksand", "Pretendard Variable", sans-serif; letter-spacing: -.01em; word-spacing: -.08em; text-decoration: none; }
.brand-word .w-bold { font-weight: 700; }
.brand-word .w-regular { font-weight: 500; }

.mode-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; color: var(--ink); font-size: var(--fs-small); font-weight: 700;
}
.mode-toggle:hover { background: var(--bg); }
.switch-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s ease-out; }
.mode-toggle[aria-pressed="true"] .switch-track { background: var(--navy); }
.mode-toggle[aria-pressed="true"] .switch-track::after { left: 21px; }

/* ---------- 레이아웃 · 메뉴 ---------- */
.app-shell { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); display: flex; align-items: flex-start; }
main { flex: 1; min-width: 0; padding: var(--pad) 0 56px; }

.navigation {
  flex: none; width: var(--nav-w); position: sticky; top: 92px;
  display: flex; flex-direction: column; gap: 4px; padding: 28px 0 0;
}
.navigation button, .navigation > a {
  min-height: var(--btn); padding: 0 16px; text-align: left;
  border-radius: var(--r); font-size: var(--fs-body); font-weight: 500;
  background: transparent; color: var(--ink-2); display: flex; align-items: center;
}
.navigation button:hover, .navigation > a:hover { background: var(--bg); color: var(--ink); }
.navigation button.active { background: #EFEFED; color: var(--ink); font-weight: 700; }
.nav-note { display: none; }
@media (min-width: 960px) {
  body:not(.easy) .nav-note {
    display: block; margin-top: 20px; padding: 20px 16px; font-size: 15px; line-height: 1.75; color: var(--ink-2);
    border-top: 1px solid var(--line);
  }
  body:not(.easy) .nav-note strong { display: block; margin-top: 4px; color: var(--ink); font-weight: 700; }
}

@media (max-width: 959px) {
  .app-shell { display: block; padding: 0 var(--pad); }
  .navigation {
    position: static; width: auto; flex-direction: row; overflow-x: auto;
    padding: 6px 0; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad);
    border-bottom: 1px solid var(--line); gap: 2px;
  }
  .navigation button, .navigation > a { flex: none; min-height: 52px; white-space: nowrap; font-size: 16px; border-radius: var(--r) var(--r) 0 0; }
  .navigation button.active { background: transparent; box-shadow: inset 0 -3px 0 var(--ink); border-radius: 0; }
}
body.easy .navigation {
  position: static; width: auto; flex-direction: row; flex-wrap: wrap; display: grid;
  grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
body.easy .navigation button, body.easy .navigation > a {
  min-height: var(--btn-lg); justify-content: center; text-align: center;
  border-radius: var(--r); font-size: var(--fs-body); font-weight: 800;
  border: 1px solid var(--line);
}
body.easy .navigation button.active { background: var(--navy); border-color: var(--navy); color: #fff; }

body.easy[data-step="input"] .kind-tabs,
body.easy[data-step="input"] #easy-next,
body.easy[data-step="input"] .input-panel > h2 { display: none; }

/* ---------- 공용 ---------- */
h1 { font-size: var(--fs-h1); line-height: 1.22; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
h2 { font-size: var(--fs-h2); line-height: 1.35; font-weight: 700; }
h3 { font-size: var(--fs-body); line-height: 1.4; font-weight: 800; }
.muted { color: var(--ink-2); }
.eyebrow { font-size: 14px; letter-spacing: .1em; color: var(--ink-2); font-weight: 700; margin-bottom: 8px; text-transform: uppercase; }
.page-heading { margin-bottom: 32px; max-width: 760px; }
.intro-copy { font-size: var(--fs-body); line-height: 1.7; color: var(--ink-2); margin-top: 12px; max-width: 34em; }

.badge {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border-radius: var(--r); background: var(--bg); color: var(--ink-2);
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.badge.pale { background: #fff; border: 1px solid var(--line); }

.notice {
  margin: 16px 0; padding: 16px 18px; border-radius: var(--r);
  background: var(--alert-bg); border: 1px solid var(--alert-line); color: var(--alert-ink);
  font-size: var(--fs-small); line-height: 1.7;
}
.notice.error { background: var(--warn-bg); border-color: #E6BBB4; color: var(--warn-ink); }

/* ---------- 버튼 ---------- */
.primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: var(--btn-lg); padding: 0 28px; margin-top: 20px;
  background: var(--navy); color: #fff; border-radius: var(--r);
  font-size: calc(var(--fs-body) + 2px); font-weight: 800; letter-spacing: -.01em;
}
.primary:hover:not(:disabled) { background: var(--navy-dark); }
.outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn); padding: 0 22px;
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r);
  font-size: var(--fs-body); font-weight: 700;
}
.outline:hover { background: var(--bg); }
.text-button {
  min-height: 44px; padding: 8px 2px; background: transparent; color: var(--navy);
  font-size: var(--fs-small); font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
}
.danger-text { color: var(--warn); }
.call-button {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-height: var(--btn-lg); padding: 0 20px; border-radius: var(--r); border: none;
  background: var(--danger); color: #fff; text-decoration: none;
}
.call-button.secondary { background: var(--navy); }
.call-button span { display: block; }
.call-button .cb-label { font-size: 14px; font-weight: 600; opacity: .88; }
.call-button .cb-num { font-size: calc(var(--fs-body) + 2px); font-weight: 800; }

/* ---------- 홈 · 입력 ---------- */
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 959px) { .analysis-grid { grid-template-columns: 1fr; } }

.step-bar { margin-bottom: 20px; }
.step-bar .step-label { font-size: var(--fs-small); font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.step-track { height: 12px; background: #EDEDEB; border-radius: var(--r); overflow: hidden; }
.step-track > span { display: block; height: 100%; background: var(--navy); }

.kind-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 28px; }
body.easy .kind-tabs { grid-template-columns: 1fr; }
.kind-tabs button {
  position: relative; text-align: left; min-height: 132px; padding: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2);
}
body.easy .kind-tabs button { min-height: 150px; padding: 24px; }
.kind-tabs .ic { width: 34px; height: 34px; color: var(--ink-2); }
.kind-tabs button.selected { background: var(--navy-tint); border: 2px solid var(--navy); color: var(--navy); }
.kind-tabs button.selected .ic { color: var(--navy); }
.kind-tabs .check { position: absolute; top: 18px; right: 18px; color: var(--navy); display: none; }
.kind-tabs button.selected .check { display: block; }
.kind-tabs strong { display: block; margin-top: 16px; font-size: var(--fs-body); font-weight: 700; line-height: 1.4; color: var(--ink); }
.kind-tabs button.selected strong { color: var(--navy); }
.kind-tabs small { display: block; margin-top: 6px; font-size: var(--fs-small); color: var(--ink-2); font-weight: 500; }

label { display: block; font-size: var(--fs-h2); font-weight: 700; margin: 0 0 12px; }
select, textarea, input:not([type=checkbox]) {
  display: block; width: 100%; min-width: 0; min-height: var(--btn); padding: 16px 18px;
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r);
  font-size: var(--fs-body);
}
textarea { min-height: 180px; resize: vertical; line-height: 1.7; }
::placeholder { color: var(--ink-3); opacity: 1; }

.upload-zone {
  min-height: 190px; padding: 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--bg);
}
.upload-zone .ic { width: 52px; height: 44px; color: var(--ink-3); }
.upload-zone strong { font-size: var(--fs-body); font-weight: 700; color: var(--ink-2); }
.upload-zone .upload-hint { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-small); color: var(--ink-2); }
.upload-zone input[type=file] { margin-top: 4px; min-height: var(--btn); padding: 0 24px; border: 1px solid var(--line); background: #fff; border-radius: var(--r); font-size: var(--fs-body); font-weight: 700; }

.check-label { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; font-size: var(--fs-small); line-height: 1.7; }
.check-label input { flex-shrink: 0; width: 24px; height: 24px; margin: 2px 0; accent-color: var(--navy); }

.case-options { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); }
.case-options summary { padding: 8px 0; font-weight: 700; color: var(--navy); cursor: pointer; }
.helper { margin-top: 10px; font-size: var(--fs-small); line-height: 1.7; color: var(--ink-2); }
.center { text-align: center; }

.support-column { display: grid; gap: 16px; }
.recovery-card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.recovery-label { display: block; color: var(--warn); font-size: var(--fs-small); font-weight: 700; margin-bottom: 12px; }
.recovery-card h2 { font-size: calc(var(--fs-body) + 3px); line-height: 1.45; margin-bottom: 10px; }
.recovery-card p { font-size: var(--fs-small); line-height: 1.65; color: var(--ink-2); }
.recovery-call { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--btn-lg); padding: 16px 18px; margin-top: 22px; background: var(--navy); color: #fff; border-radius: 8px; font-size: var(--fs-body); font-weight: 700; }
.recovery-call strong { margin-left: 8px; font-size: calc(var(--fs-body) + 3px); }
.recovery-call:hover { background: var(--navy-dark); }
.recovery-help { margin-top: 12px; font-size: var(--fs-small); }
.recovery-help summary, .engine-info summary, .sharing-info summary, .invite-link-details summary { cursor: pointer; padding: 10px 0; color: var(--ink-2); font-size: var(--fs-small); }
.recovery-help p { padding: 4px 0 8px; }

.feature-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.feature-card > .badge { display: flex; width: fit-content; margin: 0 0 24px; }
.engine-info { border-top: 1px solid var(--line); }
.feature-card h2 { font-size: var(--fs-body); font-weight: 800; margin-bottom: 10px; }
.feature-card p { font-size: var(--fs-small); line-height: 1.65; color: var(--ink-2); margin-bottom: 14px; }
.flow { display: grid; gap: 8px; font-size: var(--fs-small); font-weight: 700; }
.flow-step { display: flex; gap: 10px; align-items: center; }
.flow-num {
  width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}

.daily-link { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.daily-link:hover { background: var(--bg); }
.daily-link strong { display: block; font-size: var(--fs-body); }
.daily-link small { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--ink-2); }

/* ---------- 분석 중 ---------- */
.busy-panel { padding: 90px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.spinner { width: 72px; height: 72px; border: 6px solid #EDEDEB; border-top-color: var(--navy); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy-panel p { font-size: var(--fs-body); color: var(--ink-2); }

/* ---------- 결과 ---------- */
#result-section { scroll-margin-top: 96px; }
.result-panel { --risk-color: var(--danger); --risk-bg: var(--danger); --risk-ink: #fff; }
.risk-banner { display: flex; gap: 16px; align-items: center; padding: 26px; border-radius: var(--r); background: var(--risk-bg); color: var(--risk-ink); }
body.easy .risk-banner { padding: 30px; }
.risk-banner .ic { width: 48px; height: 48px; flex: none; }
.risk-title { font-size: calc(var(--fs-h1) * .95); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.risk-summary { margin-top: 8px; font-size: var(--fs-body); line-height: 1.6; font-weight: 600; }

.result-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; margin-top: 26px; align-items: start; }
@media (max-width: 959px) { .result-layout { grid-template-columns: 1fr; } }

.action-box { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.action-box h3 { margin: 0; padding: 16px 22px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: var(--fs-h2); font-weight: 800; }
.action-box ol { margin: 0; padding: 22px; list-style: none; display: grid; gap: 14px; }
.action-box li { display: flex; gap: 14px; align-items: flex-start; }
.action-box .step-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-body); font-weight: 800;
}
.action-box li span:last-child { font-size: calc(var(--fs-body) + 1px); line-height: 1.6; font-weight: 600; padding-top: 6px; }
.action-box .call-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 22px 22px; }
@media (max-width: 480px) { .action-box .call-row { grid-template-columns: 1fr; } }

.evidence-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.evidence-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.evidence-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--risk-color); margin-top: 8px; }
.evidence-list span:last-child { font-size: var(--fs-body); line-height: 1.6; }

.fold { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fold + .fold { margin-top: 10px; }
.fold summary {
  list-style: none; min-height: var(--btn); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; font-size: var(--fs-body); font-weight: 700; cursor: pointer;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary .chev { font-size: 14px; color: var(--navy); font-weight: 700; }
.fold[open] summary .chev::before { content: "닫기 ▲"; }
.fold:not([open]) summary .chev::before { content: "열기 ▼"; }
.fold pre { margin: 0; padding: 4px 20px 20px; font-size: var(--fs-small); line-height: 1.7; color: var(--ink-2); border-top: 1px solid #EDEDEB; white-space: pre-wrap; word-break: break-word; font-family: inherit; }
.fold .fold-body { padding: 4px 20px 20px; font-size: var(--fs-body); line-height: 1.75; color: var(--ink-2); border-top: 1px solid #EDEDEB; }

.feedback-row p { font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.feedback-row .button-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .feedback-row .button-row { grid-template-columns: 1fr; } }
.feedback-row button {
  min-height: var(--btn); padding: 0 18px; border-radius: var(--r); font-size: var(--fs-small); font-weight: 700;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.feedback-row button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy-tint); color: var(--navy); }
.feedback-note { margin: 12px 0 0; font-size: var(--fs-small); color: var(--navy); font-weight: 700; }

.result-actions { display: flex; gap: 14px; margin-top: 22px; }
.result-actions .primary { margin-top: 0; }
.result-actions .outline { min-height: var(--btn-lg); font-size: calc(var(--fs-body) + 1px); }
@media (max-width: 560px) { .result-actions { flex-direction: column; } }

.side-card { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.score-card { background: var(--bg); }
.score-card .score-label { font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.score-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.score-num { font-size: calc(var(--fs-h1) * .9); font-weight: 800; color: var(--risk-color); line-height: 1; }
.score-den { font-size: var(--fs-body); color: var(--ink-2); font-weight: 700; }
.score-track { height: 18px; background: #EDEDEB; border-radius: var(--r); overflow: hidden; margin-bottom: 10px; }
.score-track > span { display: block; height: 100%; background: var(--risk-color); }
.score-card p { margin: 0; font-size: var(--fs-small); line-height: 1.55; color: var(--ink-2); }

.guardian-line { background: #fff; display: flex; gap: 12px; align-items: flex-start; }
.guardian-line .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); margin-top: 8px; }
.guardian-line p { margin: 0; font-size: var(--fs-body); line-height: 1.6; }

.speak-button {
  width: 100%; min-height: var(--btn); display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); border-radius: var(--r);
  font-size: var(--fs-body); font-weight: 700;
}
.speak-button:hover { background: var(--bg); }
.sidebar-stack { display: grid; gap: 16px; }

/* ---------- 확인 기록 · 알림함 공용 카드 ---------- */
.stack { display: grid; gap: 12px; margin-top: 24px; }
.empty { padding: 64px 24px; text-align: center; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); }
.empty h2 { margin-bottom: 8px; color: var(--ink); }

.entry-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.entry-card.emphasis { border-width: 2px; }
.entry-card > summary { cursor: pointer; list-style: none; flex-wrap: nowrap; }
.entry-card > summary::-webkit-details-marker { display: none; }
.entry-card > summary:hover { background: var(--navy-tint); }
.entry-card > summary:focus-visible { outline-offset: -4px; }
.entry-card .entry-head-main { flex: 1; flex-wrap: nowrap; align-items: flex-start; }
.entry-overview { display: grid; gap: 8px; min-width: 0; }
.entry-chevron { color: var(--navy); font-size: 24px; flex: none; }
.entry-card[open] .entry-chevron { transform: rotate(180deg); }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 20px; }
.history-analysis + .history-analysis { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 8px; }
.history-analysis h4 { font-size: var(--fs-small); margin: 20px 0 8px; }
.history-analysis ol { padding-left: 24px; font-size: var(--fs-body); line-height: 1.7; }
.history-analysis .helper { font-size: var(--fs-small); margin: 12px 0; color: var(--ink-2); }
@media (max-width: 640px) { .entry-card .entry-head-main { flex-direction: column; gap: 10px; } }
.entry-head {
  width: 100%; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: none; border: none; text-align: left;
}
.entry-head-main { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; min-width: 0; }
.entry-thumb {
  flex: none; width: 52px; height: 52px; border-radius: var(--r); display: flex; align-items: center; justify-content: center;
}
.entry-thumb .ic { width: 24px; height: 24px; }
.entry-level {
  display: inline-flex; align-items: center; justify-content: center; min-width: 66px; height: 34px; padding: 0 14px;
  border-radius: var(--r); font-size: 14px; font-weight: 800; border: 1px solid transparent;
}
.entry-title { font-size: var(--fs-body); font-weight: 700; line-height: 1.4; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: var(--fs-small); color: var(--ink-2); font-weight: 600; }
.entry-meta .ack { font-weight: 700; color: var(--navy); }
.entry-body { padding: 2px 20px 20px; border-top: 1px solid #EDEDEB; }
.entry-body .k { font-size: var(--fs-small); font-weight: 800; color: var(--ink-2); margin: 16px 0 8px; }
.entry-body .k:first-child { margin-top: 16px; }
.entry-body p { margin: 0 0 16px; font-size: var(--fs-body); line-height: 1.7; }
.entry-body ul { margin: 0 0 16px; padding-left: 22px; font-size: var(--fs-body); line-height: 1.7; }

.inbox-badge { display: inline-block; font-size: var(--fs-small); font-weight: 800; color: var(--navy); border: 1px solid var(--navy); border-radius: var(--r); padding: 8px 16px; margin-bottom: 14px; }
.inbox-card { border-radius: var(--r); padding: 24px; background: #fff; }
.inbox-card-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.inbox-card-top-left { display: flex; gap: 12px; align-items: center; }
.inbox-time { font-size: var(--fs-small); color: var(--ink-2); font-weight: 600; }
.inbox-card h3 { margin-bottom: 10px; }
.inbox-card p { margin: 0 0 18px; font-size: var(--fs-body); line-height: 1.7; }
.inbox-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inbox-actions > :only-child { grid-column: 1 / -1; }
@media (max-width: 480px) { .inbox-actions { grid-template-columns: 1fr; } }
.ack-button { min-height: var(--btn); padding: 0 24px; border-radius: var(--r); font-size: var(--fs-body); font-weight: 800; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.ack-button.done { border-color: var(--correct-line); background: var(--correct-bg); color: var(--correct-ink); }

/* ---------- 보호자 연결 ---------- */
.family-panel { max-width: 720px; margin-inline: auto; }
.family-panel .consent-row small { display: block; margin-top: 6px; color: var(--ink-2); font-size: var(--fs-small); font-weight: 500; }
.consent-row:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.family-panel > .helper { font-size: var(--fs-small); margin: 12px 0 4px; }
.sharing-info { margin-bottom: 20px; }
.sharing-info p { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.7; }
.link-row .outline { text-decoration: none; flex: 1 1 180px; justify-content: center; text-align: center; }
.invite-link-details { margin-top: 10px; }
.invite-link-details code { display: block; padding: 12px; background: #fff; overflow-wrap: anywhere; font: inherit; font-size: var(--fs-small); user-select: all; }
.family-panel .text-button, .guardian-main .text-button { text-decoration: none; }
.notification-settings { border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; background: #fff; }
.notification-settings > summary { cursor: pointer; padding: 16px 0; font-size: var(--fs-body); font-weight: 700; }
.notification-settings[open] { padding-bottom: 20px; }
.guardian-main .empty { padding: 40px 20px; background: #fff; }
.guardian-main .empty h2 { font-size: var(--fs-h2); }
.guardian-main .empty p { font-size: var(--fs-small); }
.family-panel > p { font-size: var(--fs-body); line-height: 1.7; color: var(--ink-2); margin: 0 0 28px; }
.consent-row {
  width: 100%; display: flex; gap: 16px; align-items: center; justify-content: space-between; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: 18px 20px; margin-bottom: 20px; min-height: var(--btn);
}
.consent-row.on { border-color: var(--navy); background: var(--bg); }
.consent-row span:first-child { font-size: var(--fs-body); line-height: 1.6; font-weight: 600; }
.consent-track { position: relative; flex: none; width: 56px; height: 30px; border-radius: 15px; background: var(--line-strong); }
.consent-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s ease-out; }
.consent-row.on .consent-track { background: var(--navy); }
.consent-row.on .consent-track::after { left: 29px; }

.link-panel { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; background: var(--bg); }
.link-panel .k { font-size: var(--fs-small); font-weight: 800; color: var(--ink-2); margin-bottom: 10px; }
.link-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-row code { flex: 1; min-width: 220px; font-size: var(--fs-body); background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; word-break: break-all; font-family: inherit; }
.status-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.status-panel .k { font-size: var(--fs-small); color: var(--ink-2); font-weight: 700; margin-bottom: 6px; }
.status-panel .v { font-size: var(--fs-body); font-weight: 700; }

/* ---------- 통화 확인 모달 ---------- */
.call-dialog-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 15, 14, .45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.call-dialog { width: 100%; max-width: 440px; background: #fff; border-radius: 8px; padding: 28px; }
.call-dialog h3 { margin-bottom: 10px; }
.call-dialog p { margin: 0 0 24px; font-size: var(--fs-body); line-height: 1.7; color: var(--ink-2); }
.call-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.call-dialog-actions button, .call-dialog-actions a { min-height: var(--btn); }
.call-dialog-actions .outline { width: 100%; }

/* ---------- 토스트 ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 40; transform: translateX(-50%);
  width: max-content; max-width: 90vw; padding: 16px 24px; background: var(--navy-dark); color: #fff;
  border-radius: var(--r); font-size: var(--fs-small); box-shadow: 0 6px 24px rgba(11, 39, 64, .3);
}
#toast { opacity: 1; transition: opacity .5s ease; }
#toast.fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

main footer, .view footer { max-width: none; margin: 40px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.85; color: var(--ink-2); }

/* ---------- 반응형: 모바일 ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .header-inner { min-height: 64px; padding: 8px 20px; flex-wrap: wrap; row-gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand strong { font-size: 19px; }
  .brand strong.brand-word { font-size: 26px; }
  .brand span { display: none; }
  .mode-toggle { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .kind-tabs { gap: 8px; }
  .kind-tabs button { min-height: 116px; padding: 14px; }
  .action-box .call-row, .result-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-style: dotted; }
}

/* =========================================================
   병합: 실제 분류기+LLM 연동, 웹 푸시, 예시 자료, PWA 설치 안내
   (2026-09-22 main 병합분) — 같은 디자인 토큰으로 재구성
   ========================================================= */

/* ---------- 앱 설치 안내 ---------- */
.install-prompt { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 18px; background: #fff; }
.install-prompt h2 { font-size: var(--fs-body); margin-bottom: 6px; }
.install-prompt p { font-size: var(--fs-small); color: var(--ink-2); }
.install-prompt .primary { margin-top: 12px; }

/* ---------- 예시 자료 ---------- */
.sample-row { margin: 18px 0 6px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--bg); }
.sample-row .small-label { display: block; margin-bottom: 10px; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.sample-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--btn); padding: 8px 14px 8px 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; color: var(--ink); font-size: var(--fs-small); font-weight: 700; }
.sample-button:hover:not(:disabled) { background: var(--navy-tint); border-color: var(--navy); }
.sample-button:disabled { opacity: .55; }
.sample-risk { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: var(--r); font-size: 12px; font-weight: 800; background: var(--bg); color: var(--ink-2); }
.sample-risk.danger { background: var(--danger); color: #fff; }
.sample-risk.warning { background: var(--warn-bg); color: var(--warn); }
.sample-risk.safe { background: var(--safe-bg); color: var(--safe); }
.sample-row .helper { margin-top: 10px; }

/* ---------- 엔진 상태 칩 (입력 화면) ---------- */
.engine-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.engine-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r); font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.engine-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--safe); }
.engine-chip.loading::before { background: var(--warn); animation: vk-pulse 1.2s infinite; }
.engine-chip.off::before { background: var(--ink-3); }
@keyframes vk-pulse { 50% { opacity: .3; } }

/* ---------- 결과: 엔진별 판정 나란히 보기 ---------- */
.engine-panel { margin: 22px 0 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.engine-panel h3 { margin-bottom: 12px; }
.engine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.engine-card { padding: 14px 16px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.engine-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.engine-head strong { font-size: var(--fs-small); }
.engine-score { font-size: 13px; font-weight: 800; color: var(--risk-color, var(--navy)); white-space: nowrap; }
.engine-meter { height: 8px; border-radius: var(--r); background: #EDEDEB; overflow: hidden; }
.engine-meter span { display: block; height: 100%; background: var(--risk-color, var(--navy)); }
.engine-card .helper { margin-top: 8px; font-size: 12px; }
.engine-panel > .helper { margin-top: 12px; }

/* ---------- 결과: 위험 문장 표시 ---------- */
.highlight-box { margin-top: 18px; padding: 16px 18px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.highlight-box h3 { margin-bottom: 6px; }
.highlight-text { margin: 12px 0; padding: 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.8; max-height: 320px; overflow: auto; }
.risk-mark { background: linear-gradient(transparent 35%, var(--danger) 35%, var(--danger) 100%); background: color-mix(in srgb, var(--risk-color, var(--danger)) 22%, transparent); border-bottom: 2px solid var(--risk-color, var(--danger)); color: inherit; padding: 0 2px; border-radius: 3px; }
.highlight-why { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: var(--fs-small); }
.highlight-why .risk-mark { font-weight: 700; }

/* ---------- 파일 선택: 드래그앤드롭 · 진행률 ---------- */
.upload-zone { position: relative; }
.upload-zone.drag-active { border-color: var(--navy); background: var(--navy-tint); }
.upload-zone.drag-reject { border-color: var(--danger); background: var(--warn-bg); }
.upload-zone .primary { margin-top: 4px; width: auto; min-width: 200px; justify-content: center; }
.file-input { position: absolute; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; opacity: 0; overflow: hidden; pointer-events: none; }
#drop-hint { font-size: 13px; color: var(--ink-2); margin: 0; }
#file-name { word-break: break-word; }
.upload-progress { width: 100%; height: 14px; accent-color: var(--navy); margin: 10px 0 0; }
#upload-progress-label { font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }

/* ---------- 오류 확인 대화상자 ---------- */
dialog.error-dialog { width: calc(100% - 2rem); max-width: 30rem; padding: 28px; border: 0; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(11, 39, 64, .35); }
dialog.error-dialog::backdrop { background: rgba(15, 15, 14, .45); }
dialog.error-dialog h3 { color: var(--warn); margin-bottom: 10px; }
dialog.error-dialog p { line-height: 1.7; font-size: var(--fs-body); margin-bottom: 20px; }
dialog.error-dialog .primary { width: 100%; margin-top: 0; }

/* ---------- 쉬운 화면 전용 긴급 신고 바 ---------- */
.emergency-nav { display: none; }
body.easy .emergency-nav {
  display: block; position: fixed; inset: auto 0 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line); padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}
body.easy .emergency-nav button {
  display: flex; justify-content: center; align-items: center; width: 100%; max-width: 52rem; margin: 0 auto;
  min-height: var(--btn-lg); background: var(--warn-bg); border: 2px solid var(--danger); color: var(--danger);
  border-radius: var(--r); font-size: var(--fs-body); font-weight: 800;
}
body.easy main { padding-bottom: 100px; }

/* ---------- 보호자 화면: 웹 푸시 ---------- */
.push-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.push-state { font-size: var(--fs-small); color: var(--ink-2); }

/* ---------- 화면 구성: PC 여백 · 쉬운 화면 · 모바일 앱 메뉴 ---------- */
@media (min-width: 960px) {
  body:not(.easy) .app-shell { column-gap: 32px; }
}
.navigation > a { text-decoration: none; }
.daily-nav-mobile { display: none; }
.brand { flex-shrink: 0; }
.brand img { flex: none; }
.brand .brand-word span { font: inherit; color: inherit; }
.brand .brand-word .w-bold { font-weight: 700; }
.brand .brand-word .w-regular { font-weight: 500; }

body.easy div.app-shell { display: block; max-width: 960px; }
body.easy .navigation { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 24px 0; margin: 0; }
body.easy .navigation button, body.easy .navigation > a { min-width: 0; padding: 12px; font-size: 20px; background: var(--surface); border-radius: 12px; }
body.easy .navigation button.active { background: var(--navy); color: #fff; }
body.easy main { padding-top: 28px; padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
body.easy .page-heading { max-width: none; margin-bottom: 28px; }
body.easy h1 { font-size: 38px; }
body.easy .analysis-grid, body.easy .result-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
body.easy .input-panel { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
body.easy .kind-tabs { gap: 12px; margin-bottom: 20px; }
body.easy .kind-tabs button { min-height: 112px; padding: 20px 60px 20px 72px; border-radius: 12px; }
body.easy .kind-tabs button > .ic:not(.check) { position: absolute; left: 20px; top: 24px; width: 32px; height: 32px; margin: 0; }
body.easy .kind-tabs strong { font-size: 23px; margin-top: 0; }
body.easy .kind-tabs small { margin-top: 4px; }
body.easy .support-column { gap: 20px; }
body.easy .helper, body.easy .case-options, body.easy .kind-tabs small { font-size: 20px; }
body.easy #mode-toggle, body.easy #easy-back { font-size: 24px; min-height: 56px; white-space: normal; }
body.easy .emergency-nav button { min-height: 60px; border-radius: 12px; }

.install-prompt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; border-radius: 12px; }
.install-prompt h2, .install-prompt p { grid-column: 1; margin: 0; }
.install-prompt .primary { grid-column: 2; grid-row: 1 / 3; width: auto; min-height: 52px; margin: 0; padding: 12px 20px; font-size: var(--fs-small); }
.install-prompt .text-button { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 959px) {
  body { --mobile-nav-height: 76px; }
  html { scroll-padding-bottom: 100px; }
  body.easy { --fs-body: 21px; }
  .brand .brand-word span { display: inline; }
  .header-inner { gap: 8px; }
  div.app-shell > main { padding-bottom: calc(var(--mobile-nav-height) + 28px); }
  div.app-shell > .navigation,
  body.easy div.app-shell > .navigation {
    position: fixed; inset: auto 0 0; z-index: 35; width: auto; margin: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--line); background: var(--surface); overflow: visible;
  }
  div.app-shell > .navigation button, div.app-shell > .navigation > a,
  body.easy div.app-shell > .navigation button, body.easy div.app-shell > .navigation > a {
    min-width: 0; min-height: 60px; padding: 8px 4px; border: 0; border-radius: 10px;
    justify-content: center; text-align: center; white-space: normal;
    font-size: 15px; line-height: 1.4; font-weight: 700; box-shadow: none;
  }
  body.easy div.app-shell > .navigation button, body.easy div.app-shell > .navigation > a { font-size: 18px; }
  .daily-nav-wide { display: none; }
  .daily-nav-mobile { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .daily-nav-mobile > span { white-space: nowrap; }
  body.easy div.app-shell > .navigation > .daily-nav { padding-inline: 0; }
  .navigation button.active { color: var(--navy); background: var(--navy-tint); }
  body.easy .navigation button.active { background: var(--navy); color: #fff; }
  body.easy div.app-shell > main { padding-bottom: calc(var(--mobile-nav-height) + 116px); }
  body.easy .emergency-nav { bottom: var(--mobile-nav-height); padding: 8px 16px; }
  body.easy .emergency-nav button { min-height: 56px; font-size: 20px; }
  body.easy h1 { font-size: 32px; }
  body.easy .input-panel { padding: 20px; }
  #toast { bottom: calc(var(--mobile-nav-height) + 20px); }
  body.easy #toast { bottom: calc(var(--mobile-nav-height) + 96px); }
}
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .header-inner { padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .brand { gap: 10px; justify-self: start; }
  .brand img { width: 36px; height: 36px; }
  .brand strong.brand-word { font-size: 26px; line-height: 1.2; }
  .header-inner .mode-toggle { width: 100%; }
  .mode-toggle { padding: 0 10px; font-size: 13px; gap: 6px; }
  .switch-track { width: 36px; height: 24px; }
  .switch-track::after { width: 18px; height: 18px; }
  .mode-toggle[aria-pressed="true"] .switch-track::after { left: 15px; }
  .page-heading { margin-bottom: 24px; }
  .kind-tabs { grid-template-columns: minmax(0, 1fr); }
  .kind-tabs button { min-height: 96px; padding: 16px 48px 16px 60px; border-radius: 12px; }
  .kind-tabs button > .ic:not(.check) { position: absolute; left: 16px; top: 20px; width: 28px; height: 28px; margin: 0; }
  .kind-tabs small { margin-top: 4px; }
  .kind-tabs strong { margin-top: 0; }
  body.easy .input-panel { padding: 16px; }
  body.easy .kind-tabs button { padding: 16px 42px 16px 54px; }
  body.easy .kind-tabs button > .ic:not(.check) { left: 14px; width: 28px; height: 28px; }
  body.easy .kind-tabs strong { font-size: 21px; }
  .install-prompt { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .install-prompt .primary { grid-column: 1; grid-row: auto; width: 100%; }
}
