/* ==========================================================
   홍씨스터 공통 스타일 — 모든 과목 공유
   - 낮(day) = 기본 : 주황·빨강 밝은 톤
   - 밤(night)      : html[data-theme="dark"] 어두운 톤 + 주황 포인트
   - 과목별 강조색은 body[data-subject] 에서 --accent 로 바꿔 사용
   ========================================================== */
:root {
  --bg: #fff8f2;
  --bg-2: #fff0e4;
  --surface: #ffffff;
  --surface-2: #fff4ea;
  --line: #f3dcc8;
  --hover: #ffe9d6;
  --text: #1d130b;
  --muted: #54402f;        /* 보조 글씨: 가독성 위해 진하게 */
  --faint: #7d6553;
  --accent: #f26522;       /* 주황 */
  --accent-2: #e53935;     /* 빨강 */
  --accent-ink: #ffffff;
  --accent-soft: rgba(242, 101, 34, .12);
  --grad: linear-gradient(135deg, #ff9a1f 0%, #f26522 45%, #e53935 100%);
  --label: #b04309;        /* 질문 제목: 진한 주황 (낮, 배경 위 4.9:1 — 예전 #e08600은 2.6:1) */
  --good-ink: #14693a;   /* 연한 배경(태그) 위에 올리는 진한 글자색 — 배경 대비 5.5:1 이상 (2026-10-07). --good은 테두리·점·그래프용 */
  --warn-ink: #805400;
  --bad-ink: #a32619;
  --good: #1f9d57;
  --good-soft: rgba(31, 157, 87, .12);
  --warn: #c98a00;
  --warn-soft: rgba(224, 134, 0, .13);
  --bad: #d64533;
  --bad-soft: rgba(214, 69, 51, .11);
  --top-bg: rgba(255, 248, 242, .88);
  --nav-bg: rgb(255, 255, 255);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(229, 57, 53, .10);
  /* 글자 크기 기준 (2026-10-07, 50대 이상 읽기 편하게) — 화면의 글자 크기는 모두 이 변수로 올리고 내림 */
  --fs-body: 17px;      /* 본문·라벨·입력칸 글자 */
  --fs-sub: 15px;       /* 보조 설명 */
  --fs-btn: 17px;       /* 버튼 */
  --fs-btn-sm: 15px;    /* 작은 버튼 */
  --fs-chip: 15px;      /* 칩(선택 알약) */
  --fs-tag: 14px;       /* 태그·배지·작은 표시 */
  --fs-nav: 14px;       /* 휴대폰 하단 탭 */
  --lh-body: 1.7;       /* 본문 줄 간격 */
  /* 주황 두 단계: 밝은 주황(--accent, --grad)은 로고·큰 제목·궤도·배경·장식, 진한 주황은 글자·링크·버튼 (흰 글씨와 4.5:1 이상) */
  --accent-strong: #b04309;                 /* 낮: 배경 위 4.9:1·연한 주황 칩 위 4.8:1·흰 글씨 5.7:1 */
  --btn-grad: linear-gradient(135deg, #b84a0f 0%, #b04309 45%, #b3280f 100%);   /* 주황 버튼 배경 (모든 칸 흰 글씨 5.2:1 이상) */
  --btn-ink: #ffffff;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: light;
}

/* ---------- 밤 모드 ---------- */
html[data-theme="dark"] {
  --bg: #221c18;             /* 밤 바탕: 순검정이 아니라 낮 살구빛(#fff8f2)의 어두운 버전 — 따뜻한 어두운 회갈색 (2026-10-08) */
  --bg-2: #29221d;
  --surface: #2f2823;     /* 카드: 바탕보다 살짝 밝게 */
  --surface-2: #382f29;
  --line: #4a3f35;
  --hover: #3f352d;
  --text: #f3ebe2;         /* 순백에 가깝지 않게 — 흰 글씨가 번져 보이던 것 완화 */
  --muted: #d6c8ba;        /* 보조 글씨: 가독성 위해 밝게 */
  --faint: #b3a496;
  --accent: #f2a65a;
  --accent-2: #f07a4a;
  --accent-ink: #1a1208;
  --accent-soft: rgba(242, 166, 90, .14);
  --grad: linear-gradient(135deg, #ffb87a 0%, #f2a65a 50%, #ee8a52 100%);
  --label: #f5b47c;        /* 제목·라벨: 노랑이 아니라 낮처럼 주황 계열 (밤) */
  --accent-strong: #f2a65a; --btn-grad: linear-gradient(135deg, #ffb87a 0%, #f2a65a 50%, #ee8a52 100%); --btn-ink: #1a1208;   /* 밤은 원래 대비가 높아 밝은 주황 그대로 */
  --good-ink: #6fcf97; --warn-ink: #f2c94c; --bad-ink: #f89d90;   /* 밤: 어두운 연한 배경 위 밝은 글자 5.4:1 이상 */
  --good: #6fcf97;
  --good-soft: rgba(111, 207, 151, .14);
  --warn: #f2c94c;
  --warn-soft: rgba(242, 201, 76, .14);
  --bad: #eb6f5f;
  --bad-soft: rgba(235, 111, 95, .14);
  --top-bg: rgba(34, 28, 24, .86);
  --nav-bg: rgb(41, 34, 29);
  --shadow: 0 10px 30px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

/* 영어: 블루 계열 */
body[data-subject="english"] { --accent: #2f6fd6; --accent-2: #5b4fd6; --accent-soft: rgba(47,111,214,.12); --grad: linear-gradient(135deg, #4aa3ff 0%, #2f6fd6 50%, #5b4fd6 100%); --label: #1f5fc4; --accent-ink: #ffffff; }
html[data-theme="dark"] body[data-subject="english"] { --accent: #7fb4ff; --accent-2: #a39bff; --accent-soft: rgba(127,180,255,.15); --grad: linear-gradient(135deg, #8fd0ff 0%, #7fb4ff 50%, #a39bff 100%); --label: #9cc6ff; --accent-ink: #0d1a2e; }
/* 발표·스피치: 딥 퍼플 계열 (영어 블루·기타 오렌지와 구분) */
body[data-subject="speech"] { --accent: #6a3fc8; --accent-2: #a23fb8; --accent-soft: rgba(106,63,200,.12); --grad: linear-gradient(135deg, #9a6bff 0%, #6a3fc8 55%, #4b2a9a 100%); --label: #5a33b0; --accent-ink: #ffffff; }
html[data-theme="dark"] body[data-subject="speech"] { --accent: #b69cff; --accent-2: #e09cf0; --accent-soft: rgba(182,156,255,.15); --grad: linear-gradient(135deg, #d2c2ff 0%, #b69cff 50%, #9a7be8 100%); --label: #c7b4ff; --accent-ink: #1a1030; }
/* 보이스 트레이닝: 파란 청록 계열 (영어 블루·스피치 퍼플과 구분) */
body[data-subject="voice"] { --accent: #0b7894; --accent-2: #d9822b; --accent-soft: rgba(11,120,148,.12); --grad: linear-gradient(135deg, #2bb8d6 0%, #0b7894 55%, #085a73 100%); --label: #0a6680; --accent-ink: #ffffff; }
html[data-theme="dark"] body[data-subject="voice"] { --accent: #5cc6e2; --accent-2: #f2a65a; --accent-soft: rgba(92,198,226,.15); --grad: linear-gradient(135deg, #a2e6f5 0%, #5cc6e2 50%, #3aa2c2 100%); --label: #85d7ec; --accent-ink: #062029; }

/* 과목별 진한 색·버튼 배경 (영어 블루·스피치 퍼플·보이스 청록 — 기타는 기본 주황) */
body[data-subject="english"] { --accent-strong: #2f6fd6; --btn-grad: linear-gradient(135deg, #2f6fd6 0%, #5b4fd6 100%); --btn-ink: #ffffff; }
html[data-theme="dark"] body[data-subject="english"] { --accent-strong: #7fb4ff; --btn-grad: linear-gradient(135deg, #8fd0ff 0%, #7fb4ff 50%, #a39bff 100%); --btn-ink: #0d1a2e; }
body[data-subject="speech"] { --accent-strong: #6a3fc8; --btn-grad: linear-gradient(135deg, #6a3fc8 0%, #4b2a9a 100%); --btn-ink: #ffffff; }
html[data-theme="dark"] body[data-subject="speech"] { --accent-strong: #b69cff; --btn-grad: linear-gradient(135deg, #d2c2ff 0%, #b69cff 50%, #9a7be8 100%); --btn-ink: #1a1030; }
body[data-subject="voice"] { --accent-strong: #0b7894; --btn-grad: linear-gradient(135deg, #0b7894 0%, #085a73 100%); --btn-ink: #ffffff; }
html[data-theme="dark"] body[data-subject="voice"] { --accent-strong: #5cc6e2; --btn-grad: linear-gradient(135deg, #a2e6f5 0%, #5cc6e2 50%, #3aa2c2 100%); --btn-ink: #062029; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* 모바일 좌우 스크롤 방지 */
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video, canvas { max-width: 100%; }
input[type="range"] { max-width: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- 상단바 ---------- */
.hs-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 0 20px;
  background: var(--top-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hs-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hs-brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad); color: var(--accent-ink);
  font-weight: 800; font-size: 16px;
}
.hs-brand-name { font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.hs-brand-sub { color: var(--muted); font-size: var(--fs-tag); padding-left: 10px; border-left: 1px solid var(--line); }
.hs-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.hs-top-right a { text-decoration: none; }
.hs-top-right a:hover { color: var(--text); }

/* ---------- 낮/밤 전환 버튼 ---------- */
.hs-theme-btn {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
}
.hs-theme-btn button { position: relative; width: 32px; height: 28px; padding: 0; border: 0; border-radius: 999px; display: grid; place-items: center; background: transparent; color: var(--faint); cursor: pointer; transition: all .2s ease; }
.hs-theme-btn button:hover { color: var(--accent-strong); }
.hs-theme-btn button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hs-theme-btn svg { width: 16px; height: 16px; }
/* 마우스를 올리면 모드 이름 표시 */
.hs-theme-btn button::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px);
  white-space: nowrap; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: var(--text); color: var(--bg); opacity: 0; pointer-events: none; transition: all .15s ease; z-index: 60;
}
.hs-theme-btn button:hover::after, .hs-theme-btn button:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 오른쪽 끝 버튼(달)은 말풍선이 화면 밖으로 나가지 않게 오른쪽 정렬 */
.hs-theme-btn .t-moon::after { left: auto; right: 0; transform: translateY(-4px); }
.hs-theme-btn .t-moon:hover::after, .hs-theme-btn .t-moon:focus-visible::after { transform: translateY(0); }
html[data-theme="dark"] .hs-theme-btn .t-moon,
html:not([data-theme="dark"]) .hs-theme-btn .t-sun { background: var(--grad); color: var(--accent-ink); }

/* 로고 얼굴 이미지 (core/img/hs-face.jpg 가 있을 때) */
.hs-brand-mark.has-img { padding: 0; overflow: hidden; border-radius: 10px; background: none; box-shadow: none; }
.hs-brand-mark.has-img img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; display: block; }

/* ---------- 레이아웃 ---------- */
.hs-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.hs-shell > * { min-width: 0; }
.hs-nav { padding: 20px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.hs-nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 14px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); text-align: left; cursor: pointer; font-size: 15px;
}
.hs-nav button:hover { background: var(--surface); color: var(--text); }
.hs-nav button.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.hs-nav .ico { width: 22px; text-align: center; }
.hs-main { padding: 28px clamp(16px, 4vw, 48px) 80px; max-width: 1080px; width: 100%; }

@media (max-width: 820px) {
  .hs-shell { grid-template-columns: minmax(0, 1fr); }
  .hs-main { padding-left: 14px; padding-right: 14px; }
  .hs-card { padding: 16px; }
  .hs-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(var(--nav-cols, 5), minmax(0, 1fr)); gap: 4px 2px;   /* 칸 수·줄 수는 hs-core.js fitNav()가 정함 (칸 64px 이상·글씨 한 줄) */
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--nav-bg); border-right: 0; border-top: 1px solid var(--line);
  }
  .hs-nav button { flex-direction: column; gap: 2px; padding: 4px 2px; min-height: 48px; font-size: var(--fs-nav); text-align: center; justify-content: center; white-space: nowrap; }   /* 터치 44px 이상 */
  .hs-nav .ico { font-size: 18px; }
  .hs-brand-sub { display: none; }
  .hs-main { padding-bottom: calc(var(--nav-h, 84px) + 26px); }
  .hs-top { padding: 0 12px; gap: 8px; }
  .hs-top-right { gap: 8px; font-size: 13px; }
}

/* ---------- 코치 말풍선 ---------- */
.hs-coach {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; margin-bottom: 24px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.hs-coach-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-strong); color: var(--btn-ink); font-weight: 800;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hs-coach-name { font-size: var(--fs-tag); color: var(--accent-strong); font-weight: 700; margin-bottom: 2px; }
.hs-coach-text { font-size: var(--fs-body); }
.hs-coach.pulse .hs-coach-avatar { animation: hsPulse 1.2s ease-out; }
@keyframes hsPulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* ---------- 공통 컴포넌트 ---------- */
h1.hs-title { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.03em; margin: 0 0 6px; }
p.hs-lead { color: var(--muted); margin: 0 0 22px; }
.hs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hs-card + .hs-card { margin-top: 16px; }
.hs-card h3 { margin: 0 0 12px; font-size: var(--fs-body); }
.hs-grid { display: grid; gap: 16px; }
.hs-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.hs-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.hs-grid > * { min-width: 0; }

.hs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: var(--fs-btn); text-decoration: none; color: var(--text);
  transition: transform .08s ease, background .15s ease;
}
.hs-btn:hover { background: var(--hover); }
.hs-btn:active { transform: scale(.97); }
.hs-btn.primary { background: var(--btn-grad); color: var(--btn-ink); border-color: transparent; }
.hs-btn.primary:hover { filter: brightness(1.06); background: var(--btn-grad); }
.hs-btn.ghost { background: transparent; }
.hs-btn.small { padding: 7px 14px; font-size: var(--fs-btn-sm); }
.hs-btn.block { width: 100%; }
.hs-btn:disabled { opacity: .45; cursor: not-allowed; }
.hs-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hs-row.end { justify-content: flex-end; }
.hs-spacer { flex: 1; }

.hs-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; font-size: var(--fs-chip); user-select: none;
}
.hs-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 700; }
.hs-chip small { color: var(--faint); font-weight: 400; }

.hs-option {
  display: block; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer;
}
.hs-option + .hs-option { margin-top: 8px; }
.hs-option.on { border-color: var(--accent); background: var(--accent-soft); }
.hs-option b { display: block; }
.hs-option span { color: var(--muted); font-size: var(--fs-sub); }

.hs-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
}
.hs-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hs-label { display: block; font-weight: 800; font-size: var(--fs-body); color: var(--label); margin: 22px 0 10px; }
.hs-label:first-child { margin-top: 0; }
.hs-help { color: var(--muted); font-size: var(--fs-sub); margin: -2px 0 10px; }
textarea.hs-input { min-height: 96px; resize: vertical; line-height: 1.6; }
.hs-input-short { max-width: 220px; }   /* 상담 날짜·숫자 입력 칸 */

.hs-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-tag); font-weight: 700; background: var(--surface-2); color: var(--muted); }
.hs-tag.good { background: var(--good-soft); color: var(--good-ink); }
.hs-tag.warn { background: var(--warn-soft); color: var(--warn-ink); }
.hs-tag.bad  { background: var(--bad-soft);  color: var(--bad-ink); }
.hs-tag.accent { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- 상담(온보딩) ---------- */
.hs-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.hs-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.hs-steps i.done { background: var(--accent); }
.hs-step-count { color: var(--accent-strong); font-size: var(--fs-tag); font-weight: 700; margin-bottom: 4px; }
.hs-onb-foot { display: flex; gap: 10px; margin-top: 26px; }

/* ---------- 미터/게이지 ---------- */
.hs-meter { height: 10px; border-radius: 10px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.hs-meter > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; border-radius: 10px; }
.hs-meter.good > i { background: var(--good); }

.hs-big { font-size: clamp(44px, 8vw, 84px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.hs-muted { color: var(--muted); }
.hs-center { text-align: center; }
.hs-hidden { display: none !important; }

.hs-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 999px;
  box-shadow: var(--shadow); opacity: 0; transition: all .25s ease; z-index: 50; font-size: var(--fs-sub);
}
.hs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 820px) { .hs-toast { bottom: calc(var(--nav-h, 84px) + 12px); } }
/* 긴 안내 글(가입 화면 입력 검사 등)도 줄바꿈되어 화면 안에 들어오게 */
.hs-toast { width: max-content; max-width: min(92vw, 560px); white-space: normal; text-align: center; line-height: 1.5; border-radius: 18px; }

/* AI 대기 표시 "지혜쌤이 생각 중이에요…" — 토스트 바로 위 */
.hs-thinking {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  background: var(--surface-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50; font-size: 15px;
}
.hs-thinking.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hs-thinking-dots { display: inline-flex; gap: 4px; flex: none; }
.hs-thinking-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: hsThink 1.2s infinite ease-in-out; }
.hs-thinking-dots i:nth-child(2) { animation-delay: .15s; }
.hs-thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hsThink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (max-width: 820px) { .hs-thinking { bottom: calc(var(--nav-h, 84px) + 68px); } }

/* 💬 의견 보내기 — PC는 오른쪽 아래 떠 있는 버튼, 모바일은 상단바 링크 (화면 아래 고정 입력창을 가리지 않게) */
.hs-fb-btn {
  position: fixed; right: 18px; bottom: 22px; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  font: inherit; font-size: var(--fs-sub); font-weight: 700; cursor: pointer;
}
.hs-fb-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.hs-fb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 상단 의견 버튼(2026-10-08): 내 정보와 같은 알약(.hs-me)을 그대로 쓰고, 둘 사이를 띄움. 휴대폰 폭이 모자라면 💬만 뺌 */
.hs-fb-top { margin-right: 12px; }
@media (max-width: 480px) { .hs-fb-top { margin-right: 10px; } .hs-fb-top .hs-fb-ico { display: none; } }
.hs-fb-panel { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .35); display: grid; place-items: end center; padding: 16px; }
@media (min-width: 821px) { .hs-fb-panel { place-items: end end; padding: 24px; } }
.hs-fb-box { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.hs-fb-text { min-height: 96px; resize: vertical; margin-top: 12px; }
@media print { .hs-fb-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .hs-thinking-dots i { animation: none; opacity: .7; } }

/* 상담 마지막 "지혜쌤 분석 저장" 버튼 — 과목 색과 상관없이 빨강 계열로 눈에 띄게 */
.hs-btn.hs-finish {
  /* 2026-10-07 진한 빨강: 모든 칸에서 흰 글씨 5.6:1 이상 (예전 #ff6b6b는 2.8:1). 되돌리기 어려운 동작이라 더 크고 굵게 */
  background: linear-gradient(135deg, #c62828 0%, #b71c1c 55%, #a61b1b 100%) !important;
  color: #ffffff !important; border: 2px solid #8e1414; font-weight: 800; font-size: var(--fs-btn); padding: 14px 30px; min-height: 52px;
  box-shadow: 0 8px 22px rgba(166, 27, 27, .40); animation: hsFinishPulse 2.2s ease-in-out infinite;
}
.hs-btn.hs-finish:hover { filter: brightness(1.07); }
@keyframes hsFinishPulse { 0%, 100% { box-shadow: 0 8px 22px rgba(166, 27, 27, .32); } 50% { box-shadow: 0 8px 30px rgba(166, 27, 27, .58), 0 0 0 6px rgba(198, 40, 40, .16); } }
@media (prefers-reduced-motion: reduce) { .hs-btn.hs-finish { animation: none; } }

/* ==========================================================
   가독성 보강 — 작은 글씨 크기·굵기 올림 (전 화면 공통)
   ========================================================== */
.hs-top-right { font-size: 15px; font-weight: 600; }
/* 과목 화면 하단 저작권 표시 (가운데) */
.hs-app-foot { text-align: center; font-size: var(--fs-sub); color: var(--muted); padding: 22px 16px 28px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .hs-app-foot { padding-bottom: calc(var(--nav-h, 84px) + 12px); } .hs-main { padding-bottom: 40px; } }

/* 과목명: PC는 로고 옆, 모바일은 로고 영역 아래 */
.hs-brand-sub { font-size: 19px; font-weight: 800; color: var(--text); padding-left: 14px; letter-spacing: -.02em; }
.hs-brand-sub em, .hs-subject-bar em { font-style: normal; color: var(--accent-strong); margin-left: 3px; letter-spacing: .02em; }
.hs-subject-bar { display: none; }
@media (max-width: 820px) {
  .hs-subject-bar {
    display: block; text-align: center; padding: 10px 14px; font-size: 18px; font-weight: 800; letter-spacing: -.02em;
    background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--text);
  }
}
/* 상단바: 로고·메뉴 글자가 두 줄로 꺾이지 않게 (휴대폰 390·360px) */
.hs-brand { flex-shrink: 0; }
.hs-brand-name, .hs-top-right > * { white-space: nowrap; flex-shrink: 0; }
.hs-top-right { min-width: 0; }
.hs-top-right > span { flex-shrink: 1; min-width: 0; max-width: 8em; overflow: hidden; text-overflow: ellipsis; } /* 회원 닉네임 — 길면 … */
@media (max-width: 480px) {
  .hs-top { padding: 0 10px; gap: 6px; }
  .hs-brand { gap: 7px; }
  .hs-brand-mark { width: 34px; height: 34px; }   /* 2026-10-07 30→34 (휴대폰에서 너무 작아 보임) */
  .hs-brand-name { font-size: 16px; }
  .hs-top-right { gap: 7px; font-size: 13px; }
  .hs-theme-btn { padding: 2px; }
  .hs-theme-btn button { width: 30px; height: 28px; }   /* 26x24 → 30x28 */
  .hs-theme-btn svg { width: 17px; height: 17px; }      /* 14 → 17 */
}
.hs-nav button { font-size: var(--fs-body); font-weight: 600; }
.hs-coach-name { font-size: var(--fs-sub); font-weight: 800; }
.hs-coach-text { font-size: var(--fs-body); font-weight: 600; }
p.hs-lead { font-size: var(--fs-body); }
.hs-card h3 { font-size: 17px; }
.hs-help { font-size: var(--fs-sub); }
.hs-tag { font-size: var(--fs-tag); padding: 3px 10px; }
.hs-chip { font-size: var(--fs-chip); font-weight: 600; }
.hs-chip small { color: var(--muted); }
.hs-option b { font-size: var(--fs-body); }
.hs-option span { font-size: var(--fs-sub); color: var(--muted); }
.hs-btn { font-size: var(--fs-btn); }
.hs-btn.small { font-size: var(--fs-btn-sm); }
.hs-step-count { font-size: var(--fs-sub); }
.hs-toast { font-size: 15px; }
@media (max-width: 820px) { .hs-nav button { font-size: var(--fs-nav); word-break: keep-all; line-height: 1.3; } }   /* 13px — 탭 라벨이 낱글자로 꺾이지 않게 단어 단위로 줄바꿈 */

/* ⏸ 이어하기 카드 (내 코칭 맨 위) · 기록 표의 진행 중 줄 */
.hs-resume { border: 2px solid var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); margin-bottom: 16px; }
.hs-resume-head { font-weight: 800; color: var(--accent-strong); font-size: 15px; }
.hs-resume-label { font-size: 18px; margin: 6px 0 2px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hs-resume-time { font-size: var(--fs-sub); margin-bottom: 12px; }
tr.hs-rec-live td { background: var(--accent-soft); font-weight: 600; }
.hs-mini-resume { display: inline-block; margin-top: 6px; font-size: var(--fs-tag); font-weight: 700; color: var(--accent-strong); }

/* ---------- 과목 소개 화면 (상담 전, renderSubjectIntro) ---------- */
.hs-intro-sec { margin-top: 26px; }
.hs-intro-h { font-size: clamp(19px, 2.4vw, 22px); margin: 0 0 12px; }
.hs-intro-h small { font-size: var(--fs-sub); font-weight: 600; color: var(--muted); margin-left: 6px; }
.hs-intro-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hs-intro-who div { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-body); font-weight: 700; line-height: 1.5; }
/* 코칭 진행: "1) 상담" 처럼 번호·제목 한 줄(굵게, 번호는 과목 색) + 바로 아래 설명 */
.hs-intro-flow { list-style: none; margin: 0; padding: 6px 20px; display: grid; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.hs-intro-step { padding: 14px 0; }
.hs-intro-step + .hs-intro-step { border-top: 1px solid var(--line); }
.hs-intro-step h3 { margin: 0 0 4px; font-size: 17.5px; font-weight: 800; }
.hs-intro-num { color: var(--accent-strong); font-weight: 900; margin-right: 2px; }
.hs-intro-step p { margin: 0; color: var(--muted); font-size: var(--fs-body); line-height: 1.6; }
.hs-intro-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hs-intro-feat .hs-card { margin: 0; }
.hs-intro-feat h3 { margin: 0 0 6px; font-size: 17px; }
.hs-intro-feat p { margin: 0; font-size: 15px; line-height: 1.55; }
.hs-intro-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hs-intro-sample small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.hs-intro-bubble { display: flex; gap: 10px; align-items: flex-start; }
.hs-intro-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: var(--accent-ink); font-weight: 800; }
.hs-intro-bubble p { margin: 0; padding: 12px 15px; border-radius: 16px; border-top-left-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-body); line-height: 1.6; }
.hs-intro-needs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.hs-intro-needs li { display: flex; gap: 10px; align-items: baseline; font-size: var(--fs-body); line-height: 1.5; }
.hs-intro-needs li span { flex: none; font-size: 18px; }
.hs-intro-cta { margin-top: 28px; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--accent); text-align: center; }
.hs-intro-cta p { margin: 0 0 12px; font-weight: 700; }
@media (max-width: 1024px) { .hs-intro-feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .hs-intro-who, .hs-intro-feat, .hs-intro-samples, .hs-intro-needs { grid-template-columns: 1fr; }
  .hs-intro-flow { padding: 4px 16px; }
}

/* ---------- 🌬 호흡 드릴 원 (core/js/breath-drill.js — 스피치·보이스 공통) ---------- */
.hs-breath { width: 180px; height: 180px; margin: 20px auto; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: var(--accent-ink);
  background: var(--grad); transform: scale(.55); transition-property: transform; transition-timing-function: ease-in-out; box-shadow: 0 10px 40px var(--accent-soft); }
.hs-breath.in { transform: scale(1); }
.hs-breath.out { transform: scale(.55); }
@media (prefers-reduced-motion: reduce) { .hs-breath { transition: none !important; } }
@media (max-width: 600px) { .hs-breath { width: 150px; height: 150px; } }

/* ---------- 과목 사이 추천 카드 (core/js/hs-cross.js — 스피치 ↔ 보이스) ---------- */
.hs-cross { border-style: dashed; border-color: var(--accent); }
.hs-cross a.hs-btn { text-decoration: none; }
.hs-where ul { margin: 0; padding: 14px 16px 14px 34px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 8px; line-height: 1.6; }
.hs-where a { color: var(--accent-strong); font-weight: 700; }

/* 내 정보 메뉴 (2026-10-07) — 상단 닉네임 버튼 + 아래로 펼쳐지는 메뉴 (상단바 폭은 닉네임 자리 그대로: 닉네임 글자 모양을 유지하고 점선 밑줄로만 눌러지는 것을 표시) */
.hs-me-wrap { display: inline-flex; align-items: center; gap: 8px; }
/* 내 정보 버튼 (2026-10-08): 주황 테두리 + 연한 배경 알약 — 꽉 채우지 않아 "코칭 시작하기" 같은 주요 버튼과 경쟁하지 않음 */
.hs-me { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px 0 11px; border: 1.5px solid var(--accent-strong); border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font: inherit; font-size: var(--fs-sub); font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.hs-me svg { width: 18px; height: 18px; flex: none; }
.hs-me:hover, .hs-me[aria-expanded="true"] { background: color-mix(in srgb, var(--accent-strong) 22%, transparent); }
.hs-me:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
/* 메뉴 맨 위 닉네임 — 상단바에는 닉네임을 두지 않고(버튼의 일부처럼 보임) 여기서만 보여 줌 */
.hs-me-who { display: block; padding: 8px 14px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sub); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ⌄ 화살표(메뉴가 있다는 표시, 내 정보·코칭 현황 같은 모양) / PC는 마우스라 알약 높이를 조금 줄임(휴대폰은 터치 44px 유지) */
.hs-me .hs-me-chev { width: 16px; height: 16px; margin-left: 2px; flex: none; }
.hs-me[aria-expanded="true"] .hs-me-chev { transform: rotate(180deg); }
@media (min-width: 821px) { .hs-me { min-height: 38px; } }
/* 관리자 꼬리표: 버튼 아님 — 테두리 없이 글씨에 연한 중립(푸른 회색) 바탕만. 코칭 현황 버튼보다 눈에 덜 띄게 (글자 대비 낮 9.5:1·밤 8:1) */
.hs-role-tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; background: #e9edf4; color: #34405a; font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
html[data-theme="dark"] .hs-role-tag { background: #394052; color: #d6dcec; }
.hs-ad-who { display: none; }
@media (max-width: 480px) { .hs-role-tag { display: none; } .hs-ad-who { display: block; } }   /* 360px: 의견·코칭 현황·낮/밤과 같이 놓으면 넘쳐서 꼬리표는 메뉴 맨 위로 */
/* 휴대폰(480px 이하): 영어 등 상단바에 💬 의견이 더 있어 알약을 조금 작게 */
@media (max-width: 480px) {
  .hs-me { gap: 4px; padding: 0 10px 0 8px; font-size: 14px; }   /* 영어 등 상단바에 💬 의견이 더 있는 화면(360px)에서 안 넘치게 조금 작게 */
  .hs-me svg { width: 16px; height: 16px; }
  .hs-me:not(.hs-ad) > svg:first-child { display: none; }   /* 360px 폭: 사람 아이콘은 빼고 글씨 + ⌄만 */
  .hs-top-right { gap: 5px; }
  .hs-top-right > .hs-me-wrap { margin-right: 14px; }
}
.hs-top-right > .hs-me-wrap { max-width: none; overflow: visible; flex-shrink: 1; min-width: 0; }
.hs-me-wrap .hs-me { flex-shrink: 0; }
.hs-top-right > .hs-me-wrap { margin-right: 10px; }   /* 낮/밤 버튼과 간격 — 손가락으로 눌러도 안 걸리게 */
.hs-me-menu { position: fixed; left: 10px; top: 56px; z-index: 80; min-width: 210px; max-width: calc(100vw - 20px); padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.hs-me-menu[hidden] { display: none; }
.hs-me-menu a { display: flex; align-items: center; min-height: 34px; padding: 4px 14px; border-radius: 10px; color: var(--text); font-size: var(--fs-body); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hs-me-menu a:hover, .hs-me-menu a:focus-visible { background: var(--accent-soft); color: var(--accent-strong); outline: 0; }
.hs-me-menu a.hs-me-out { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.hs-me-menu a.hs-me-leave { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 10px; color: var(--bad-ink); font-size: var(--fs-sub); }
.hs-me-menu a.hs-me-leave:hover { background: var(--bad-soft); color: var(--bad-ink); }

/* 상담 다시 하기 안내 (2026-10-07) — 새로 만들어져요 / 그대로 남아요 / 사라져요 */
.hs-reconsult { margin-top: 14px; border-left: 5px solid var(--accent); }
.hs-reconsult .hs-rc-title { margin: 0 0 10px; font-size: var(--fs-body); }
.hs-rc { margin: 0 0 12px; }
.hs-rc .hs-rc-h { display: block; margin: 0 0 4px; font-size: var(--fs-body); }
.hs-rc ul { margin: 0; padding-left: 22px; line-height: 1.7; font-size: var(--fs-sub); color: var(--text); }
.hs-rc.keep .hs-rc-h { color: var(--good-ink); }
.hs-rc.lose .hs-rc-h { color: var(--bad-ink); }
.hs-rc.lose { padding: 10px 12px; border: 1px solid var(--bad); border-radius: 12px; background: var(--bad-soft); }
.hs-rc.lose ul { color: var(--text); }
.hs-rc-btns { gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* PC(1024px 이상)에서만 글자 한 단계 줄임 (2026-10-08) — 휴대폰은 위 기준 그대로. 본문 17→16 · 보조 15→14 · 버튼 17→16 · 줄 간격 1.7→1.6, 칩·태그도 같은 비율 */
@media (min-width: 1024px) {
  :root { --fs-body: 16px; --fs-sub: 14px; --fs-btn: 16px; --fs-btn-sm: 14px; --fs-chip: 14px; --fs-tag: 13px; --lh-body: 1.6; }
  .hs-card h3, .hs-intro-feat h3 { font-size: 16px; }
  .hs-intro-feat p, .hs-resume-head { font-size: 14px; }
}

/* 상담 전 빈 상태 (2026-10-08) */
.hs-consult-note { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: 0 0 14px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text); font-size: var(--fs-body); font-weight: 700; line-height: 1.4; }   /* 글자는 본문 크기, 상자는 글자 폭에 맞춤 (2026-10-08) */   /* 상담 없이 쓸 수 있는 화면 위 안내 — 눈에 띄는 연한 색 띠 (2026-10-08, 처음엔 연한 글씨였는데 안 보여서 바꿈) */
.hs-consult-note::before { content: "💡"; flex: none; }
.hs-need { max-width: 560px; }
.hs-need .hs-title { margin-top: 0; }
.hs-need .hs-lead { margin: 0 0 18px; }
.hs-empty-next { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hs-empty-next p { margin: 0; }

/* 지혜쌤 말풍선 음성 버튼 (2026-10-08): 지금 상태를 글자로 — 🔊 음성 켜짐 / 🔇 음성 꺼짐, 꺼짐은 연하게 */
.hs-coach-btns { display: flex; align-items: flex-start; flex: none; }
.hs-coach-btns .hs-btn { white-space: nowrap; }
.hs-coach-btns .hs-btn.off { color: var(--faint); border-color: var(--line); background: transparent; font-weight: 500; }
@media (max-width: 480px) {   /* 휴대폰: 아바타+글이 한 줄, 버튼은 그 아래 오른쪽 — 글 폭이 좁아지지 않게 */
  .hs-coach { flex-wrap: wrap; gap: 8px 12px; padding: 14px 14px; }
  .hs-coach > div:nth-child(2) { min-width: 0; }
  .hs-coach-btns { width: 100%; justify-content: flex-end; }
}

/* 과목 소개 화면 정리 (2026-10-08) — "이런 분께" 칩 한 줄, 단계 안 항목, 하단 상담 상자(준비물·개인정보 안내 포함) */
.hs-intro-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 0; font-size: var(--fs-sub); }
.hs-intro-chips b { color: var(--muted); font-weight: 700; margin-right: 2px; }
.hs-intro-chips span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); line-height: 1.4; }
.hs-intro-points { margin: 8px 0 0; padding: 0 0 0 18px; display: grid; gap: 5px; color: var(--muted); font-size: var(--fs-body); line-height: 1.55; }
.hs-intro-cta .hs-intro-needs-box { text-align: left; max-width: 640px; margin: 0 auto 16px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.hs-intro-cta .hs-intro-needs-box small { display: block; margin-bottom: 8px; color: var(--muted); font-weight: 700; }
.hs-intro-cta .hs-intro-needs li { font-size: var(--fs-sub); }
.hs-intro-cta .hs-intro-privacy { margin: 12px auto 0; max-width: 640px; text-align: left; font-weight: 400; }

/* 소개 화면 후속 (2026-10-08): 준비물 상자는 1열(2열일 때 글자가 단어 중간에서 끊김) · 단계 안 항목은 점 하나로 통일(바깥 1) 2) 3) 4)만 번호) */
.hs-intro-cta .hs-intro-needs { grid-template-columns: 1fr; gap: 8px; }
.hs-intro-cta .hs-intro-needs li { word-break: keep-all; overflow-wrap: break-word; }
.hs-intro-points { list-style: disc outside; }
.hs-intro-points li { list-style: disc outside; word-break: keep-all; overflow-wrap: break-word; }

/* 상단바 [과목][배우는 방식] 링크 — 메인·코칭 현황이 같이 씀(2026-10-08, 원래 hs-main.css) */
.m-topnav { display: flex; gap: 18px; margin-left: 28px; color: var(--muted); font-size: var(--fs-body); font-weight: 600; }
.m-topnav a { text-decoration: none; color: inherit; }
.m-topnav a:hover { color: var(--text); }
@media (max-width: 720px) { .m-topnav { display: none; } }
/* 지금 보고 있는 곳: 코칭 현황 페이지에서는 [코칭 현황] 알약이 눌린 상태 — 바탕을 꽉 채우고 안쪽에 줄을 한 겹 더(굵은 테두리처럼) +(색만이 아닌 모양 차이) */
.hs-me[aria-current="page"] { background: var(--accent-strong); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }   /* 크기는 그대로(테두리 굵기를 바꾸면 폭이 달라져 메인과 자리가 어긋남) */
html[data-theme="dark"] .hs-me[aria-current="page"] { color: #1a1109; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .4); }
.hs-me[aria-current="page"]:hover { background: var(--accent-strong); }
