/* 회의록 웹 입구 — 폰 세로 한 장 기준. 보안 정책(CSP)상 인라인 스타일 없이 이 파일만 쓴다. */
/* --line: 카드 · 줄 나눔(옅게) · --field-line: 입력칸 · 보조 단추 테두리(바탕과 3:1 넘게 — 햇빛 아래에서도 단추로 보이게) */
:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #1d2330; --muted: #5f6878; --line: #dfe3ea; --field-line: #8b95a5;
  --accent: #1f5fbf; --accent-text: #ffffff; --accent-soft: #e6effb;
  --ok: #1d7a46; --ok-soft: #e4f4ea; --warn: #8a5a00; --warn-soft: #fff3d6;
  --bad: #a72b2b; --bad-soft: #fbe6e6; --radius: 12px;
  color-scheme: light dark;             /* 체크박스 · 라디오 · select 펼침 목록 · 스크롤바도 다크 모드를 따른다 */
  accent-color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --card: #1b2027; --text: #e8ebf0; --muted: #9aa3b2; --line: #2c333d; --field-line: #6b7584;
    --accent: #5b93e6; --accent-text: #0d1117; --accent-soft: #1d2a3d;
    --ok: #6fd39a; --ok-soft: #173024; --warn: #f0c060; --warn-soft: #33290f;
    --bad: #f08a8a; --bad-soft: #3a1b1b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* 초점 · scrollIntoView 로 옮긴 칸이 아래 메뉴줄에 가리지 않게 */
html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-text-size-adjust: 100%;
}
/* 가로로 눕힌 아이폰 — 노치 · 둥근 모서리 쪽 여백(안전 영역)만큼 더 띄운다 */
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px;    /* max() 를 모르는 옛 브라우저는 이 줄 */
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px; }
header.top h1 { font-size: 22px; margin: 0; font-weight: 700; }
.page-hint { margin: -2px 0 12px; }
nav.tabs { display: flex; align-items: center; gap: 2px; margin: 0 0 16px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; }
nav.tabs a { padding: 10px 8px; font-size: 15px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent;
  margin-bottom: -1px; }
nav.tabs a[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
nav.tabs .spacer { flex: 1; }
a { color: var(--accent); text-decoration: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; }
.card h2 { font-size: 17px; margin: 0 0 10px; }
label.block { display: block; font-weight: 600; margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
/* 목록 줄의 제목(.t) · 부가 설명(.m) — 어느 화면에서나 같은 모양. 띄어쓰기 없는 긴 이름은 줄을 바꿔 화면이 옆으로 밀리지 않게 */
.t { font-weight: 600; overflow-wrap: anywhere; }
.m { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
input, textarea, button, select { font-family: inherit; }
input[type=email], input[type=text], input[type=tel], input[type=search], select, textarea {
  width: 100%; font-size: 17px; padding: 12px; border: 1px solid var(--field-line); border-radius: 10px;
  background: var(--card); color: var(--text);
}
/* 아이폰 사파리는 search 칸을 자기 모양(둥근 회색 칸)으로 그린다 — 다른 입력칸과 같게 */
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.code { letter-spacing: 8px; font-size: 26px; text-align: center; font-variant-numeric: tabular-nums; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px; border-radius: 10px; font-size: 17px; font-weight: 600;
  border: 1px solid var(--field-line); background: var(--card); color: var(--text); cursor: pointer;
  word-break: keep-all; overflow-wrap: anywhere;      /* 좁은 폰에서 두 줄이 되면 낱말 사이에서 끊는다('로그아\n웃' 대신) */
}
button.primary, .button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); width: 100%; }
button:disabled { opacity: .55; cursor: default; }
button.danger { color: var(--bad); border-color: var(--bad); }
/* 작은 단추 — a.button.small('Word 내려받기' · '이 자리 보기')도 같은 크기. 손가락으로 누르기 쉬운 44px */
button.small, .button.small { min-height: 44px; font-size: 15px; padding: 0 12px; }
.wrap-row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  border: 1px solid var(--field-line); border-radius: 10px; font-size: 15px; cursor: pointer; }
.seg input { width: 18px; height: 18px; margin: 0; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.row > button, .row > .button { padding: 0 10px; font-size: 16px; }
.stack > * + * { margin-top: 12px; }
/* 파일 고르기 칸 — 실제 파일 입력을 투명하게 칸 전체에 덮는다(키보드 Tab · 화면낭독기로도 고를 수 있게) */
.file-pick { position: relative; display: flex; align-items: center; justify-content: center; min-height: 72px;
  border: 2px dashed var(--field-line); border-radius: var(--radius); color: var(--accent); font-weight: 700; cursor: pointer;
  text-align: center; padding: 12px; }
.file-pick input { display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.file-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-pick.need { border-color: var(--bad); color: var(--bad); }    /* 파일을 안 고르고 [올리기]를 눌렀을 때 */
#pick-text { min-width: 0; overflow-wrap: anywhere; }
.file-info { font-size: 15px; color: var(--muted); margin-top: 8px; }
.people label { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); }
.people label:last-child { border-bottom: 0; }
.people input { width: 22px; height: 22px; }
.role { color: var(--muted); font-size: 13px; font-weight: 400; }
.counter { text-align: right; color: var(--muted); font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; }
.bar { height: 12px; background: var(--accent-soft); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.status { font-size: 15px; margin-top: 8px; }
.msg { padding: 12px; border-radius: 10px; font-size: 15px; margin: 0 0 12px; overflow-wrap: anywhere; }
.msg.info { background: var(--accent-soft); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.bad { background: var(--bad-soft); color: var(--bad); }
.msg > .wrap-row { margin-top: 8px; }
.hidden { display: none !important; }
.badge { display: inline-block; font-size: 13px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.badge.queued, .badge.processing { background: var(--accent-soft); color: var(--accent); }
.badge.sent { background: var(--ok-soft); color: var(--ok); }
.badge.sent_warn { background: var(--warn-soft); color: var(--warn); }
.badge.failed { background: var(--bad-soft); color: var(--bad); }
.job { padding: 12px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.entry { display: block; width: 100%; min-height: 0; text-align: left; background: none; border: 0; border-radius: 0;
  border-bottom: 1px solid var(--line); padding: 12px 0; font-weight: 400; color: var(--text); }
.entry:last-child { border-bottom: 0; }
.entry .t, details.person .t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
details.person { border-bottom: 1px solid var(--line); padding: 12px 0; }
details.person:last-child { border-bottom: 0; }
details.person summary { list-style: none; cursor: pointer; }
details.person summary::-webkit-details-marker { display: none; }
details.person.off .t > span:first-child { color: var(--muted); text-decoration: line-through; }
details.person .actions { margin-top: 12px; padding: 12px; background: var(--bg); border-radius: 10px; }
.badge.kind-term, .badge.role-operator { background: var(--accent-soft); color: var(--accent); }
.badge.kind-person, .badge.role-member { background: var(--ok-soft); color: var(--ok); }
.badge.role-recipient { background: var(--warn-soft); color: var(--warn); }
.code-big { font-size: 34px; font-weight: 700; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums;
  margin: 8px 0; }
.notice { font-size: 13px; color: var(--muted); line-height: 1.6; }
/* 화면 안 팝업 — 화면 위에 쌓인다. 바탕을 누르면 닫히기만 하고, 이동은 [보기]로만 */
#toasts { position: fixed; z-index: 50; top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left));
  right: calc(12px + env(safe-area-inset-right)); max-width: 536px; margin: 0 auto; display: flex; flex-direction: column;
  gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 6px 6px 12px;
  border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); cursor: default; }
.toast span { flex: 1; min-width: 0; }
.toast .button.small, .toast button.small { flex: none; }
.toast button.x { width: 44px; padding: 0; font-size: 22px; font-weight: 400; background: transparent; border-color: transparent;
  color: inherit; }
.done-box { text-align: center; }
.done-box .big { font-size: 22px; font-weight: 700; margin: 4px 0; }
/* [10-22] 진행 현황 — 막대 · 단계 칸 */
.prog { margin-top: 8px; }
.prog .bar { height: 8px; }
.prog-text { font-size: 14px; color: var(--muted); margin-top: 4px; }
ol.steps { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 6px 0 0; }
ol.steps li { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--bg); color: var(--muted);
  border: 1px solid var(--line); }
ol.steps li.done { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
ol.steps li.now { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
a.job { display: block; color: inherit; }
.job .open { display: inline-block; margin-left: 8px; font-size: 14px; color: var(--accent); font-weight: 600; }
.job-holder { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.job-holder:last-child { border-bottom: 0; }
.job-holder > .job { border-bottom: 0; }
/* [10-22] 회의록 보기 */
.kinds { display: flex; gap: 8px; margin: 10px 0; }
.kinds button[aria-pressed=true] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.minutes { font-size: 16px; overflow-wrap: anywhere; }
.minutes h2 { font-size: 18px; margin: 20px 0 8px; }
.minutes h2:first-child { margin-top: 0; }
.minutes h3 { font-size: 16px; margin: 14px 0 6px; }
.minutes ul { padding-left: 20px; margin: 4px 0 8px; }
.minutes li { margin: 2px 0; }
.minutes li.lv1 { margin-left: 18px; }
.minutes li.lv2, .minutes li.lv3 { margin-left: 36px; }
.minutes p { margin: 6px 0; }
.minutes .tbl { overflow-x: auto; margin: 8px 0; }
.minutes table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.minutes th, .minutes td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.minutes th { background: var(--bg); white-space: nowrap; }
.minutes .topic { margin: 20px 0 6px; padding: 6px 10px; border-left: 4px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 8px 8px 0; font-weight: 700; font-size: 15px; }
.minutes .utt { margin: 10px 0; }
.minutes .utt .hd { font-size: 13px; color: var(--muted); }
.minutes .utt .ts { font-variant-numeric: tabular-nums; margin-right: 6px; }
.minutes .utt .who { font-weight: 700; color: var(--text); }
.minutes .end { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
/* [10-22] 앱 설치 안내 칸 */
.install .wrap-row { margin-top: 8px; }
.install ol { margin: 6px 0 0; padding-left: 20px; }
.install li + li { margin-top: 2px; }
/* [10-22] 아래 메뉴줄 — 폰 앱처럼 엄지가 닿는 곳에. 화면 아래 여백은 메뉴줄 높이만큼(아이폰 홈 막대 · 가로 노치 여백 포함) */
.wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
nav.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 2px calc(4px + env(safe-area-inset-right)) calc(2px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left)); }
nav.tabbar a { flex: 1; min-width: 0; max-width: 104px; min-height: 56px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; padding: 0 2px; border-radius: 12px; font-size: 12px; color: var(--muted); white-space: nowrap;
  -webkit-tap-highlight-color: transparent; }
nav.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
nav.tabbar svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; }
nav.tabbar a[aria-current=page] { color: var(--accent); font-weight: 700; }
nav.tabbar a[aria-current=page] svg { stroke-width: 2.4; }
nav.tabbar a:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
/* 화면 켠 방식으로 올리는 중 — 다른 메뉴로 가면 올리기가 멈추므로 메뉴줄 · 팝업 [보기]를 막는다 */
body.uploading nav.tabbar a, body.uploading .toast a.button { pointer-events: none; opacity: .4; }
/* [10-22] 찾기 */
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; }
.ask button.primary { width: auto; flex: none; padding: 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* 예시 질문 — 긴 회의 이름이 들어가도 칸 안에서 줄을 바꾼다 */
button.chip { min-height: 44px; max-width: 100%; padding: 6px 14px; font-size: 14px; font-weight: 500; line-height: 1.35;
  text-align: left; border-radius: 22px; background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.busy-bar { margin-top: 10px; height: 6px; }
.busy-bar > div { width: 35%; animation: busy 1.4s ease-in-out infinite; }
@keyframes busy { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.answer { font-size: 16px; overflow-wrap: anywhere; }
.answer p { margin: 0 0 8px; }
.answer h3 { font-size: 16px; margin: 12px 0 6px; }
.answer h3:first-child { margin-top: 0; }
.answer ul { padding-left: 20px; margin: 4px 0 8px; }
.answer li { margin: 4px 0; }
.answer > :last-child { margin-bottom: 0; }
/* 답 속 근거 번호 [n] — 붙어 나와도('[1][3]') 옆 번호를 잘못 누르지 않게 간격을 두고, 누르는 범위는 글자보다 넓게 */
a.cite { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px;
  padding: 0 6px; margin: 0 3px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 13px;
  font-weight: 700; line-height: 1; vertical-align: 1px; }
a.cite::after { content: ""; position: absolute; inset: -9px -3px; }
.src { padding: 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: 10px; transition: background .6s; }
.src:last-child { border-bottom: 0; }
.src-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.src-top .num { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px;
  padding: 0 6px; border-radius: 13px; background: var(--accent); color: var(--accent-text); font-size: 13px; line-height: 1; }
a.num::after { content: ""; position: absolute; inset: -9px; }
.src-meeting { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 14px 0 2px; }
.src-meeting:first-child { margin-top: 0; }
.src-title { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.src-meeting .m, .src-top .m { font-size: 13px; font-weight: 400; }
.snip { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 8px; }
.snip.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
button.link-btn { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--accent); font-size: 14px; }
/* 찾기 근거 · 회의록 그 자리 강조 — 다크 모드는 노란 바탕이 옅어 보여 왼쪽 띠를 함께 */
.hit { background: var(--warn-soft) !important; border-radius: 8px; box-shadow: inset 3px 0 0 var(--warn); }
.minutes .utt.hit { padding: 6px 8px; margin-left: -8px; margin-right: -8px; }
/* 움직임 줄이기를 켠 사람 — 흘러가는 막대 · 깜빡임 대신 멈춘 표시 */
@media (prefers-reduced-motion: reduce) {
  .busy-bar > div { width: 100%; animation: none; opacity: .5; }
  .bar > div, .src { transition: none; }
}
/* [10-22 UX] 올리기 — 받을 사람 이름 거르기 칸 */
#people-q { margin: 0 0 8px; }
/* [10-22 UX] 회의록 보기 — 찾기에서 온 자리가 위에 붙지 않게 · 떠 있는 '맨 위로' · 정돈본/원본 설명 · 품질 경고 */
.minutes .utt, .minutes h2, .minutes h3, .minutes .topic { scroll-margin-top: 12px; }
#to-top { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 41;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
#m-kinds-hint { margin: -4px 0 10px; }
#m-warn { margin: 8px 0 0; }
/* [10-22 UX] 찾기 — 답에 쓰지 않은 근거는 접어 둠 · 답 칸의 '질문:' 줄 · 답에 초점을 줄 때 테두리 없음 */
details.more-src { margin-top: 8px; }
details.more-src > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px;
  font-weight: 600; cursor: pointer; }
#answer-q { margin: -4px 0 8px; }
#answer-h:focus { outline: none; }
