:root {
  --bg: #f7f6f2;
  --card: #ffffff;
  --text: #1f2421;
  --muted: #5f6b63;
  --line: #e2e0d8;
  --accent: #2f7d4f;
  --accent-soft: #e6f2ea;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151816; --card: #1e2320; --text: #e9ece9; --muted: #a3ada6; --line: #333a35;
    --accent: #6cc28f; --accent-soft: #23362b; --warn: #f0b45c; --warn-soft: #3a2f1e;
  }
}
:root[data-theme="dark"] {
  --bg: #151816; --card: #1e2320; --text: #e9ece9; --muted: #a3ada6; --line: #333a35;
  --accent: #6cc28f; --accent-soft: #23362b; --warn: #f0b45c; --warn-soft: #3a2f1e;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-size: 17px; line-height: 1.6; word-break: keep-all;
}
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }
/* PC 첫 화면: 질문하기 전에는 입력창을 화면 가운데에 */
@media (min-width: 900px) {
  body.landing main { display: flex; flex-direction: column; justify-content: center; padding-top: 40px; padding-bottom: 10vh; }
  main { padding-top: 40px; }
}

h1 { font-size: 28px; margin: 0 0 6px; }
/* 딱농: 짧은 이름을 크게, 풀이를 옆에 작게 */
.logo { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.logo-sub { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--accent); }
/* 제목 · 소개 · 강의 수는 가운데 정렬 */
main > header { text-align: center; margin-bottom: 20px; }
#scope + .ai-note { margin-top: 0; }
.examples + .ai-note { margin-top: 4px; }
.ai-note:last-of-type { margin-bottom: 28px; }
.ai-note { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.lead { margin: 0; font-size: 17px; color: var(--muted); }
.lead b { color: var(--text); }
.sublead { margin: 2px 0 0; font-size: 15px; color: var(--muted); }


form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
textarea {
  width: 100%; border: 0; resize: vertical; font: inherit; font-size: 18px;
  background: transparent; color: var(--text); outline: none;
}
.row { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 13px; }
button#go {
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 22px; font: inherit; font-weight: 700; cursor: pointer;
}
button#go:disabled { opacity: .6; cursor: wait; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 10px; }
.examples button {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
}

.msg { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.msg.clarify { background: var(--warn-soft); color: var(--warn); }
.msg.none, .msg.error { background: var(--card); border: 1px solid var(--line); }
.loading { color: var(--muted); }

.pick { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.pick.first { border: 2px solid var(--accent); }
.badge { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 8px; margin-right: 6px; }
.meta { color: var(--muted); font-size: 14px; margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
/* 로고는 글씨가 어두워 다크 모드에서도 흰 바탕 위에 둔다 */
.src-logo { height: 34px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; border: 1px solid var(--line); }
.pick h2 { font-size: 19px; margin: 8px 0 2px; }
.course { color: var(--muted); font-size: 14px; }
.reason { margin: 10px 0 12px; font-weight: 600; }
.segs { display: grid; gap: 8px; }
.seg {
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px;
}
.seg:hover { border-color: var(--accent); }
.seg img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; }
.seg .t { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.seg .s { font-size: 15px; }
.seg .k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.seg-row { display: flex; gap: 8px; align-items: stretch; }
.seg-row .seg { flex: 1; min-width: 0; }
.seg-acts { display: flex; flex-direction: column; gap: 6px; justify-content: center; flex: none; }
.act {
  border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px;
  padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap;
}
.act:hover { border-color: var(--accent); }
.act[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
@media (max-width: 520px) { .seg-row { flex-direction: column; } .seg-acts { flex-direction: row; } }
/* 구간 자막: 작은 글씨, 길면 상자 안에서 스크롤 */
.script {
  position: relative; margin: 4px 2px 0; padding: 6px 10px; max-height: 7.8em; overflow-y: auto;
  font-size: 13px; line-height: 1.6; color: var(--muted); border-left: 3px solid var(--line);
}
.script mark { background: #fff1a8; color: #3a3200; border-radius: 3px; padding: 0 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .script mark { background: #5c4f12; color: #fff6c9; } }
:root[data-theme="dark"] .script mark { background: #5c4f12; color: #fff6c9; }
details { margin-top: 10px; color: var(--muted); font-size: 15px; }
.foot { color: var(--muted); font-size: 13px; margin-top: 20px; }

.intent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.chip { font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.sq { width: 100%; color: var(--muted); font-size: 13px; }
.answered { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.clarify-q { margin: 0 0 10px; font-weight: 700; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.opts button, #clarify-form button {
  border: 1px solid var(--warn); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer;
}
#clarify-form { display: flex; gap: 8px; }
#clarify-form input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font: inherit; background: var(--card); color: var(--text);
}

/* 개발 중 임시: 시간 · 비용 */
#dev {
  position: fixed; top: 16px; right: 16px; width: 230px; z-index: 10;
  background: var(--card); border: 1px dashed var(--warn); border-radius: 12px; padding: 10px 12px;
  font-size: 13px; line-height: 1.5; box-shadow: 0 4px 16px rgb(0 0 0 / .08);
}
#dev div { display: flex; justify-content: space-between; gap: 8px; }
#dev small { color: var(--muted); }
#dev hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
#dev .dev-h { margin: 0 0 4px; color: var(--warn); font-weight: 700; font-size: 12px; }
#dev .dev-big { font-size: 18px; margin-bottom: 4px; }
#dev .dev-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 1240px) { #dev { position: static; width: auto; max-width: 760px; margin: 0 auto 16px; } }

/* 유튜브 로고는 가로로 길어 낮게 */
.src-logo.yt { height: 24px; padding: 4px 6px; }

/* 병해충 정보: 질문 상자와 같은 카드(shadcn 풍: 얇은 테두리 · 작은 그림자 · 흐린 보조 글씨) */
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.pcard-h { margin-bottom: 10px; }
.badge-o { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pest + .pest { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.pest-top { display: flex; gap: 14px; align-items: flex-start; }
.pest-img { width: 168px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.pest h3 { font-size: 18px; margin: 2px 0 4px; display: flex; align-items: center; gap: 6px; }
.tag { display: inline-flex; align-items: center; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); padding: 0 6px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.muted { color: var(--muted); font-size: 13px; margin: 0; }
.muted.small, .small { font-size: 12px; margin-top: 8px; }
.ag-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 14px 0 8px; }
.ag-t { font-weight: 700; font-size: 15px; }
.ag-wrap { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.ag { width: 100%; border-collapse: collapse; font-size: 14px; }
.ag th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ag td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ag tr:last-child td { border-bottom: 0; }
.ag tbody tr:hover { background: var(--bg); }
.ag td .muted { font-size: 12px; margin-top: 2px; }
.ag a { color: var(--text); font-weight: 600; text-decoration: none; }
.ag a:hover { text-decoration: underline; }
.pcard-f a { color: var(--muted); text-decoration: underline; }
@media (max-width: 520px) { .pest-top { flex-direction: column; } .pest-img { width: 100%; height: 180px; } }

/* 쪽 맨 아래 가운데 저작권 표시. 본문이 짧아도 화면 아래에 붙는다 */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
.copy { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 16px 24px; }

/* 로그인(오른쪽 위) */
.account { position: absolute; top: 18px; right: 24px; display: flex; gap: 8px; align-items: center; font-size: 13px; z-index: 5; }
.account .who { color: var(--muted); }
.account button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; padding: 4px 10px; font: inherit; cursor: pointer; }
.kakao { display: inline-block; background: #FEE500; color: #191919; border-radius: 8px; padding: 5px 12px; font-weight: 700; font-size: 13px; text-decoration: none; }
@media (max-width: 899px) { .account { position: static; justify-content: flex-end; padding: 12px 16px 0; max-width: 760px; margin: 0 auto; } }

/* 최근 질문 */
.recent { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 10px; }
.recent-h { width: 100%; text-align: center; font-size: 12px; color: var(--muted); }
.recent button { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.landing) .recent { display: none; }

/* 답변 평가 · 새로운 질문하기 */
.feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 6px; font-size: 14px; color: var(--muted); }
.feedback button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.feedback button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.feedback button:disabled:not(.on) { opacity: .5; cursor: default; }
.fb-thanks { width: 100%; text-align: center; font-size: 13px; color: var(--accent); }
.newq { text-align: center; margin: 14px 0 0; }
.newq button { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 22px; font: inherit; font-weight: 700; cursor: pointer; }

/* 기다리는 동안 진행 단계 */
.steps { list-style: none; margin: 8px auto 0; padding: 0; max-width: 320px; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.steps li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; box-sizing: border-box; }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--accent); border-color: var(--accent); }
.steps li.now { color: var(--text); font-weight: 700; }
.steps li.now::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.now::before { animation: none; border-top-color: var(--accent); } }

.feedback .ic { flex: none; }

/* 봇 확인 상자: 확인이 필요할 때만 Turnstile 이 스스로 보인다 */
#ts-box { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 20; }

/* 내 질문 기록 */
.history h2 { font-size: 18px; margin: 0 0 10px; }
.history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li button { width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; color: var(--text); cursor: pointer; }
.history li button:hover { border-color: var(--accent); }
.history .hq { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .hq small { color: var(--muted); }
.history .hd { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 왼쪽 사이드바(ChatGPT · Claude 처럼) ---------- */
:root { --side-w: 260px; }
.side {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); z-index: 30;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 10px;
  background: var(--card); border-right: 1px solid var(--line);
}
.side-brand { font-weight: 800; font-size: 18px; letter-spacing: -.04em; color: var(--text); text-decoration: none; padding: 4px 8px 6px; }
.side-new {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.side-new:hover { border-color: var(--accent); }
.side-h { margin: 10px 8px 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.side-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 2px; }
.side-list button {
  width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-list button:hover { background: var(--bg); }
.side-list small { color: var(--muted); }
.side-empty { color: var(--muted); font-size: 13px; padding: 6px 8px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.side-note { margin: 0 6px 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.side-kakao { display: block; text-align: center; padding: 9px 12px; }
.side-user { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 14px; }
.side-user span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.side-user button:hover { background: var(--bg); color: var(--text); }
.side-open, .side-dim { display: none; }
@media (min-width: 900px) {
  body { padding-left: var(--side-w); }
}
/* 휴대폰 · 좁은 화면: 메뉴 버튼으로 여닫는 서랍 */
@media (max-width: 899px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 24px rgb(0 0 0 / .15); }
  body.side-open .side { transform: none; }
  .side-open { display: inline-flex; position: fixed; top: 12px; left: 12px; z-index: 25; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: 8px; cursor: pointer; }
  body.side-open .side-dim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .3); z-index: 29; }
  main { padding-top: 56px; }
}

/* 사이드바 숨기기(PC) */
.side-top { display: flex; align-items: center; justify-content: space-between; }
.side-hide { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; }
.side-hide:hover { background: var(--bg); color: var(--text); }
@media (min-width: 900px) {
  body { transition: padding-left .2s ease; }
  .side { transition: transform .2s ease; }
  body.side-hidden { padding-left: 0; }
  body.side-hidden .side { transform: translateX(-100%); }
  body.side-hidden .side-open { display: inline-flex; position: fixed; top: 12px; left: 12px; z-index: 25; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: 8px; cursor: pointer; }
}

/* 사이드바 목록: Claude 처럼 가로 스크롤은 없애고(긴 제목은 … 처리), 세로 스크롤바는 얇게, 마우스를 올렸을 때만 보인다 */
.side-list { overflow-x: hidden; grid-template-columns: minmax(0, 1fr); scrollbar-width: thin; scrollbar-color: transparent transparent; }
.side-list:hover { scrollbar-color: var(--line) transparent; }
.side-list li { min-width: 0; }
.side-list button { display: block; max-width: 100%; }
.side-list::-webkit-scrollbar { width: 6px; height: 0; }
.side-list::-webkit-scrollbar-track { background: transparent; }
.side-list::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.side-list:hover::-webkit-scrollbar-thumb { background: var(--line); }
.side { overflow: hidden; }

/* 지난 질문 지우기: 줄에 마우스를 올리면 휴지통이 보인다(터치 화면은 늘 보임) */
.side-list li { display: flex; align-items: center; border-radius: 8px; }
.side-list li:hover { background: var(--bg); }
.side-list li > button[data-recent] { flex: 1; min-width: 0; }
.side-list li:hover > button[data-recent] { background: transparent; }
.side-del { flex: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 5px; margin-right: 2px; border-radius: 6px; display: inline-flex; opacity: 0; }
.side-del svg { width: 15px; height: 15px; }
.side-list li:hover .side-del, .side-del:focus-visible { opacity: 1; }
.side-del:hover { color: #c0392b; background: var(--card); }
@media (hover: none) { .side-del { opacity: .7; } }
.side-list .side-del { width: auto; display: inline-flex; padding: 5px; }

/* "…" 메뉴(Claude 처럼): 줄에 마우스를 올리면 … 버튼, 누르면 고정 · 삭제 */
.side-list li.side-h { display: block; margin: 10px 8px 2px; font-size: 12px; color: var(--muted); font-weight: 600; background: none; }
.side-list li.side-h:first-child { margin-top: 4px; }
.side-list .side-more { flex: none; width: auto; display: inline-flex; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 5px; margin-right: 2px; border-radius: 6px; opacity: 0; }
.side-more svg { width: 16px; height: 16px; }
.side-list li:hover .side-more, .side-more.on, .side-more:focus-visible { opacity: 1; }
.side-more:hover, .side-more.on { background: var(--card); color: var(--text); }
@media (hover: none) { .side-list .side-more { opacity: .7; } }
.side-menu {
  position: fixed; z-index: 60; min-width: 150px; padding: 6px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgb(0 0 0 / .12);
  display: grid; gap: 2px;
}
.side-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.side-menu button svg { width: 16px; height: 16px; }
.side-menu button:hover, .side-menu button:focus-visible { background: var(--bg); outline: none; }
.side-menu .danger { color: #c0392b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side-menu .danger { color: #ff7b6b; } }

/* 보내기: 입력 상자 오른쪽 아래 작은 화살표(Claude 처럼). 글이 있으면 녹색, 없으면 흐리게 */
button#go {
  width: 34px; height: 34px; padding: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--line); color: var(--card); transition: background .15s;
}
button#go.ready { background: var(--accent); color: #fff; }
button#go:disabled { opacity: .55; cursor: wait; }
#ask .row { justify-content: flex-end; }

/* 입력 상자: 크기 조절 손잡이 없이, 글이 길어지면 저절로 늘어난다(최대 약 8줄) */
#q { resize: none; overflow-y: auto; max-height: 13.5em; }

/* 되묻기: 큰 묶음 → 품목 */
.opts button.on { background: var(--warn); color: var(--card); }
.opts.sub { margin-top: -2px; padding-top: 8px; border-top: 1px dashed var(--warn); }

/* 강의를 나오는 대로 보여 줄 때: 아직 더 고르는 중 · 병해충 정보를 찾는 중 */
.more-wait { margin: 10px 0; color: var(--muted); font-size: 13px; text-align: center; }

/* 후속 질문(병해충 · 농약 정보 찾기) */
.msg.followup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); }
.msg.followup p { margin: 0; }
.msg.followup button { padding: 8px 14px; border: 1px solid var(--accent); border-radius: 999px; background: var(--card); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.msg.followup button:disabled { opacity: .6; cursor: default; }

/* 휴대폰: 답변 평가는 물음을 한 줄로 두고, 버튼 셋을 같은 너비로 한 줄에 */
@media (max-width: 600px) {
  .feedback { gap: 8px 6px; }
  .feedback > span:first-child { flex: 0 0 100%; text-align: center; }
  .feedback button { flex: 1 1 0; min-width: 0; justify-content: center; gap: 4px; padding: 9px 4px; font-size: 13px; white-space: nowrap; }
  .feedback .fb-thanks { flex: 0 0 100%; text-align: center; }
}

/* 휴대폰: 예시 질문은 길이가 제각각이라 가운데로 쌓이면 들쭉날쭉하다. 같은 너비로 왼쪽에 맞춰 목록처럼 보여 준다 */
@media (max-width: 600px) {
  .examples { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 5px; margin: 10px 0 12px; }
  .examples button { width: 100%; text-align: left; border-radius: 10px; padding: 7px 12px; font-size: 13.5px; color: var(--muted); }
  .examples button::before { content: "›"; margin-right: 8px; color: var(--accent); font-weight: 700; }
  #q { min-height: 0; }
}
/* 휴대폰에서만 쓰는 줄바꿈: 말 덩어리 사이에서 끊는다("딱 / 맞는"처럼 끊기지 않게) */
.m-br { display: none; }
@media (max-width: 600px) { .m-br { display: inline; } }

.copy a { color: inherit; text-decoration: underline; }

/* 계정 메뉴(맞춤 소식 · 탈퇴)와 가입 동의 창 */
.modal-box .tgl { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.modal-box .tgl b { display: block; font-size: 15px; }
.modal-box .tgl small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.modal-box .switch { position: relative; flex: none; width: 46px; height: 28px; margin: 0; display: block; cursor: pointer; }
.modal-box .switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.modal-box .switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.modal-box .switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.modal-box .switch input:checked + span { background: var(--accent); }
.modal-box .switch input:checked + span::after { transform: translateX(18px); }
.modal-box .switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-quit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.modal-quit button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; padding: 2px 0; cursor: pointer; text-decoration: underline; }
.modal-quit .warn { flex: 0 0 100%; color: var(--warn); }
.side-acct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 2px 6px 0; font-size: 12px; color: var(--muted); }
.side-acct button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; padding: 2px 0; cursor: pointer; text-decoration: underline; }
.side-acct button:hover { color: var(--text); }
.side-acct .warn { flex: 0 0 100%; color: var(--warn); }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.modal-box { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); color: var(--text); border-radius: 16px; padding: 22px 20px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.modal-box h2 { margin: 0 0 8px; font-size: 19px; }
.modal-box p { margin: 0 0 14px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.modal-box label { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15px; line-height: 1.5; cursor: pointer; }
.modal-box input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.modal-box a { color: var(--accent); }
.modal-box .fld { margin: 12px 0; }
.modal-box .fld > label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; cursor: default; }
.modal-box .fld small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.modal-box .fld input, .modal-box .fld select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: var(--card); color: var(--text); }
.modal-box .fld input[readonly] { background: var(--accent-soft); }
.modal-box .fld-row { display: flex; gap: 8px; }
.modal-box .fld input + small { display: block; margin-top: 4px; }
.modal-box #c-more { border-left: 3px solid var(--accent-soft); padding-left: 12px; margin-left: 9px; }
.modal-box .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.modal-box .chips button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.modal-box .chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.modal-box .modal-err { margin: 8px 0 0; min-height: 0; color: #c0392b; font-size: 14px; }
.modal-box .modal-err:empty { display: none; }
.modal-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-acts button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.modal-acts #c-ok { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.modal-acts #c-ok:disabled { opacity: .45; cursor: default; }
