/* 말비서 — 부품(한 곳). 색·크기는 tokens.css 변수만 쓴다. 디자인 v2 · 팔레트 B(11-18).
   순서: 바탕 → 화면 틀 → 단추 → 묶음·줄 → 분류 칩·칸 → 입력·조절 → 화면별(홈·녹음·상세·받은 일·설정) → 창·알림 → 크기별 */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  font-size: var(--root-fs);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
  overscroll-behavior: none;
}
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 400 var(--fs-m)/1.55 var(--f-sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: break-word;
  overscroll-behavior: none;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; touch-action: manipulation; cursor: pointer; }
input, textarea, select { font-size: max(16px, var(--fs-m)); } /* 16px 아래면 아이폰이 확대한다 */
svg { display: block; flex: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--meeting-tint); color: var(--meeting-fg); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.nw { white-space: nowrap; }   /* 숫자·시각 덩어리 — 가운데서 줄이 넘어가지 않게 */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 화면 틀 ── */
#app { min-height: 100dvh; display: flex; flex-direction: column;
  overflow-x: clip;   /* 윈도우: 스크롤바가 자리(17px)를 차지해 100vw 로 셈한 머리줄 바탕(--side)이 오른쪽으로 8.5px 넘쳐 가로 스크롤이 생김 — 잘라 냄(스크롤 칸은 만들지 않아 sticky·fixed 그대로) */
}
.screen {
  flex: 1; display: flex; flex-direction: column;
  padding: 0 calc(var(--pad) + var(--safe-r)) calc(var(--sp-8) + var(--safe-b)) calc(var(--pad) + var(--safe-l));
  width: 100%; --maxw: 720px; max-width: var(--maxw); margin: 0 auto;
  /* 두 쪽 나눔선 자리 = 화면 물리 가운데(50vw). 화면 틀 왼쪽 끝에서 잰 값 — 안전 영역이 한쪽만 있을 때(듀오 펼침 오른쪽 시스템 띠 등)도 나눔선은 가운데, 좁아지는 건 그 쪽 칸만 */
  --side: max(0px, (100vw - var(--maxw)) / 2);   /* 넓은 화면에서 가운데 정렬로 생기는 양옆 빈칸 */
  --mid: calc(50vw - var(--side) - var(--pad) - var(--safe-l));
}
.screen.has-dock { padding-bottom: calc(var(--tap-lg) * 2 + var(--sp-10) + var(--safe-b)); }
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--sp-1);
  min-height: calc(var(--tap) + var(--sp-2)); padding-top: var(--safe-t);
  /* 머리줄 바탕은 안전 영역(듀오 오른쪽 띠·노치) 밑까지 이어 깔고, 단추는 그 안쪽에 — 띠 자리에 종이 점무늬만 보이던 것(11-22 듀오 실기기) */
  /* 넓은 화면 가운데 정렬 빈칸(--side)까지 화면 끝에서 끝으로 */
  margin: 0 calc(-1 * (var(--pad) + var(--safe-r) + var(--side))) 0 calc(-1 * (var(--pad) + var(--safe-l) + var(--side)));
  padding-left: calc(var(--pad) - var(--sp-2) + var(--safe-l) + var(--side)); padding-right: calc(var(--pad) - var(--sp-2) + var(--safe-r) + var(--side));
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
/* 아이패드에서 연 아이폰 앱: 창 단추(왼쪽 위)와 「뒤로」가 겹치지 않게 윗줄을 내림(theme-boot.js 가 html.win-ctrl 을 붙임) */
.win-ctrl .bar { padding-top: calc(var(--safe-t) + 44px); }
.bar .title { flex: 1; font-size: var(--fs-m); font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .brand { flex: 1; font-size: var(--fs-l); font-weight: 800; letter-spacing: 0; padding-left: var(--sp-2); }
.bar .sp { width: var(--tap); flex: none; }
/* 글자 로고(core/brand.js) — 테마에 맞는 한 장만. 기본(테마 표시 없음)은 어두움 */
.bar .brand-mark { display: flex; align-items: center; min-height: var(--tap); }
.brand-mark img { height: 26px; width: auto; display: block; }
.brand-mark .bm-l { display: none; }
:root[data-theme='light'] .brand-mark .bm-l { display: block; }
:root[data-theme='light'] .brand-mark .bm-d { display: none; }
.h1 { font-size: var(--fs-xl); font-weight: 750; letter-spacing: 0; line-height: 1.28; margin: var(--sp-2) 0 var(--sp-2); }
.meta { color: var(--t3); font-size: var(--fs-s); }
.muted { color: var(--t3); }
.small { font-size: var(--fs-xs); color: var(--t4); line-height: 1.45; }
.head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-2); }

/* ── 단추 ── 먹 = 누를 곳(색은 누를 곳에 쓰지 않는다) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap-min); padding: 0 var(--sp-4);
  border-radius: var(--r-btn); border: 1px solid var(--line-2);
  background: transparent; color: var(--ink);
  font-size: var(--fs-s); font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur), opacity var(--dur);
}
.btn:active { transform: scale(.97); background: var(--s2); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:active { opacity: .82; background: var(--accent); }
.btn.lg { min-height: var(--tap-lg); font-size: var(--fs-m); border-radius: var(--r-btn-lg); }
.btn.block { display: flex; width: 100%; }
.btn.quiet { border-color: transparent; }
.btn.danger { color: var(--signal-fg); }
.btn[disabled], .btn[aria-busy='true'] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: var(--tap); height: var(--tap); flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: var(--r-m); background: transparent; color: var(--ink);
}
.icon-btn:active { background: var(--s2); }
.link-btn { border: 0; background: none; padding: var(--sp-3) 0; min-height: var(--tap); color: var(--t2); font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--hover); }
  .btn.primary:hover { background: var(--accent); opacity: .9; }
  .icon-btn:hover { background: var(--hover); }
  .row.tap:hover { background: var(--hover); }
}

/* ── 묶음 · 줄 ── */
.sec { margin-top: 26px; }
.sec > h2 { font-size: var(--fs-s); font-weight: 700; color: var(--t2); margin: 0 0 10px 2px; letter-spacing: 0; }
.sec > h2.hd { display: flex; align-items: center; gap: var(--sp-2); }
.hd .ic { width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center; flex: none; background: var(--s1); color: var(--ink); }
.hd .ic[class*='k-'] { background: var(--k-tint); color: var(--k); }
.hd .n { font-size: var(--fs-xs); color: var(--t4); font-weight: 600; }
.hd .end { margin-left: auto; }
.group { border-radius: var(--r-l); background: var(--s1); overflow: hidden; }
.row {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap-lg); padding: 13px var(--sp-4);
  border: 0; width: 100%; background: transparent; text-align: left; color: var(--ink);
  text-decoration: none;
}
.row + .row::before, .item + .item::before, .in-row + .in-row::before, .cand + .cand::before, .tx-line + .tx-line::before {
  content: ''; position: absolute; top: 0; left: var(--sp-4); right: 0; border-top: 1px solid var(--line);
}
.row.ind + .row.ind::before { left: calc(var(--sp-4) + var(--tile) + var(--sp-3)); }
.row.tap:active { background: var(--s2); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .d { color: var(--t3); font-size: var(--fs-s); line-height: 1.4; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .d.wrap { white-space: normal; }
.row .chips { margin-top: 7px; }
.row .end { color: var(--t3); font-size: var(--fs-s); flex: none; }
.row .chev { color: var(--t4); }
.item { position: relative; padding: 14px var(--sp-4); }
.item .t { font-weight: 600; }

/* ── 분류 칩 · 칸 ── 색은 정보(무슨 메모인지), 기호와 이름이 늘 같이 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px;
  border-radius: var(--r-chip); border: 1px solid var(--line-2); color: var(--t2);
  font-size: var(--fs-xxs); font-weight: 650; white-space: nowrap; letter-spacing: 0; line-height: 1;
}
.chip svg { width: 13px; height: 13px; }
.chip.k, .chip.fill { border-color: transparent; background: var(--k-tint); color: var(--k-fg); }
.chip.k { padding-left: 7px; }
.chip .ki { color: var(--k); display: inline-grid; }
.chip.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.live { background: var(--signal-tint); color: var(--signal-fg); border-color: transparent; }
.chip.live .dot { background: var(--signal); }
.chip.busy { background: var(--bg); color: var(--t2); border-color: var(--line-2); }
.chip.busy .dot { background: var(--t3); }
.chip.l { min-height: 30px; font-size: var(--fs-s); padding: 0 12px 0 10px; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tile { width: var(--tile); height: var(--tile); border-radius: var(--r-m); display: grid; place-items: center; flex: none; background: var(--k-tint); color: var(--k); }
.tile.plain { background: var(--bg); color: var(--ink); }
.tile.s { width: 32px; height: 32px; border-radius: var(--r-s); }
.stat { font-size: var(--fs-xs); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; color: var(--k-fg); white-space: nowrap; }
.stat .dot { background: var(--k); }
.stat.off { color: var(--t3); }
.stat.off .dot { background: var(--control); }
.note {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-l);
  border: 1px solid var(--line-2); color: var(--t2); font-size: var(--fs-s); text-decoration: none;
}
.note .grow { flex: 1; }
.note strong { color: var(--ink); }
.note.alert { background: var(--signal-tint); border-color: transparent; color: var(--signal-fg); }
.note.alert strong { color: var(--signal-fg); }

/* ── 입력 ── */
.field { display: block; margin-top: var(--sp-4); }
.field > span { display: block; font-size: var(--fs-s); color: var(--t3); margin-bottom: 6px; }
.input, .textarea, .select {
  display: block; width: 100%; min-height: var(--tap);
  padding: 10px var(--sp-4); border-radius: var(--r-m);
  border: 1px solid var(--line-2); background: var(--s1); color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: var(--t4); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.search { position: relative; margin-top: var(--sp-2); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--t4); }
.search .input { padding-left: 44px; border-radius: var(--r-full); }

/* ── 켜기·끄기 ── 꺼짐 = 조절 선(--control), 켜짐 = 먹 */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: -7px -4px; width: calc(100% + 8px); height: calc(100% + 14px); opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--control); transition: background var(--dur); pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease-out); box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--on-ink); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── 고르기(세 칸) ── 고른 칸 = 먹 */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: var(--r-m); background: var(--bg); gap: 3px; }
.seg button { min-height: var(--tap-min); border: 0; border-radius: 9px; background: transparent; color: var(--t3); font-weight: 650; font-size: var(--fs-s); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

/* ── 체크(할 일) ── 빈 원 = 조절 선, 끝냄 = 완료 초록 + 체크 + 취소선 */
.check { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--control); flex: none; display: grid; place-items: center; background: transparent; padding: 0; color: var(--on-done); }
.check.dashed { border-style: dashed; }
.check[aria-checked='true'], .check-hit[aria-checked='true'] .check { background: var(--done); border-color: var(--done); color: var(--on-done); }
.check-hit { min-width: var(--tap-min); min-height: var(--tap-min); margin: -10px -10px -10px -10px; display: grid; place-items: center; border: 0; background: none; padding: 0; color: inherit; }
button.check-hit { cursor: pointer; }
.check-hit[aria-checked='true'] .check { animation: fill-in 260ms var(--ease-out); }
@keyframes fill-in { 0% { transform: scale(.7); box-shadow: 0 0 0 0 var(--done); } 70% { transform: scale(1.06); box-shadow: 0 0 0 7px transparent; } 100% { transform: none; } }
.done-t { text-decoration: line-through; color: var(--t4); font-weight: 500; }

/* ── 홈: 녹음 단추 ── 둘레 고리 = 메모 종류 4색(B1 아이콘 막대와 같은 말투) */
.home-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: var(--sp-6) 0 var(--sp-2); min-height: 44dvh; }
.recwrap { position: relative; width: var(--rec); height: var(--rec); display: grid; place-items: center; flex: none; }
.recwrap .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.rec-btn {
  position: relative; width: calc(var(--rec) * .762); height: calc(var(--rec) * .762); border-radius: 50%;
  border: 0; background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center;
  box-shadow: var(--shadow-rec);
  transition: transform 160ms var(--ease-out);
}
.rec-btn:active { transform: scale(.95); }
.rec-btn svg { width: 34%; height: 34%; stroke-width: 1.7; }
.rec-label { font-size: var(--fs-l); font-weight: 750; letter-spacing: 0; text-align: center; }
.rec-sub { color: var(--t3); font-size: var(--fs-s); text-align: center; }
.srcs { display: flex; flex: none; }
.srcs span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--k-tint); color: var(--k); box-shadow: 0 0 0 2px var(--s1); }
.srcs span + span { margin-left: -6px; }
.srcs svg { width: 13px; height: 13px; }

/* ── 녹음 중 ── 막대 = 메모 종류 색(녹음 중 표시만 신호 빨강) */
.rec-screen { justify-content: flex-start; }
.rec-screen.has-dock { padding-bottom: calc(var(--tap-lg) * 2 + var(--sp-10) + 3em + var(--safe-b)); }   /* 카드로 말하기 판 = 단추 2 + 안내 줄 — 「조각 … 올림」 줄이 판에 가리지 않게 */
.rec-top { display: grid; justify-items: center; padding-top: var(--sp-4); }
.timer { font-size: var(--fs-xxl); font-weight: 200; letter-spacing: 0; line-height: 1.2; margin-top: 10px; text-align: center; }
.level { display: flex; align-items: center; justify-content: center; gap: 4px; height: 76px; margin-top: var(--sp-2); }
.level i { width: 4px; border-radius: 2px; height: 6px; flex: none; transition: height 90ms linear; }
.level i:nth-child(8n+1), .level i:nth-child(8n+2) { background: var(--meeting); }
.level i:nth-child(8n+3), .level i:nth-child(8n+4) { background: var(--call); }
.level i:nth-child(8n+5), .level i:nth-child(8n+6) { background: var(--thought); }
.level i:nth-child(8n+7), .level i:nth-child(8n+8) { background: var(--watch); }
.live {
  flex: 1; min-height: 160px; margin-top: 18px; padding: var(--sp-4) 18px;
  border-radius: var(--r-xl); background: var(--s1); overflow-y: auto;
  font-size: var(--fs-m); line-height: 1.55; color: var(--t2);
  -webkit-overflow-scrolling: touch;
}
.live .wait { color: var(--t4); }
.live p + p { margin-top: 10px; }
.live p:not(:last-child) { color: var(--t3); }
.live .ts { font-size: var(--fs-xxs); color: var(--t4); font-weight: 600; margin-right: 6px; }
.live p:last-child::after { content: ''; display: inline-block; width: 2px; height: 1.05em; background: var(--ink); vertical-align: -3px; margin-left: 2px; animation: pulse 1s steps(1) infinite; }
.live p.wait::after { display: none; }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  padding: 18px calc(var(--pad) + var(--safe-r)) calc(var(--sp-3) + var(--safe-b)) calc(var(--pad) + var(--safe-l));
  background: linear-gradient(to bottom, transparent, var(--bg) 22px);
}
.dock-in { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.stop-btn { width: 100%; }
.stop-btn .sq { width: 14px; height: 14px; border-radius: 3px; background: var(--stop); }

/* ── 메모 상세(정리 결과) ── */
.lead-line { font-size: var(--fs-lead); line-height: 1.5; font-weight: 550; letter-spacing: 0; color: var(--ink); }
.lines { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.lines:first-child { margin-top: 0; }
.lines li { font-size: var(--fs-s); line-height: 1.53; color: var(--t2); padding-left: 14px; position: relative; }
.lines li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 4px; height: 4px; border-radius: 50%; background: var(--t4); }
.dec { display: grid; grid-template-columns: 26px 1fr auto; column-gap: 4px; align-items: baseline; }
.dec .no { color: var(--watch-fg); font-weight: 750; font-size: var(--fs-xs); }
.dec .tx { font-size: var(--fs-s); line-height: 1.47; color: var(--ink); font-weight: 550; }
.dec .q { grid-column: 2 / -1; }
.jump { display: inline-flex; align-items: center; gap: 3px; min-height: var(--tap-min); margin: -14px -10px -14px 0; padding: 0 10px; border: 0; background: none; font-size: var(--fs-xxs); font-weight: 700; color: var(--t3); align-self: center; }
.jump svg { width: 12px; height: 12px; }
.q { margin-top: 4px; color: var(--t4); font-size: var(--fs-xs); line-height: 1.45; }
.todo { display: grid; grid-template-columns: 34px 1fr; align-items: start; }
.todo .tx { font-size: var(--fs-m); font-weight: 600; line-height: 1.4; }
.todo .tx.soft { color: var(--t2); }
.todo .meta2 { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.todo .acts { margin-top: 10px; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.item.done-now { background: var(--done-tint); }
.item.done-now .tx { color: var(--done-fg); text-decoration: none; font-weight: 650; }
.item .acts { margin-top: var(--sp-2); display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.cand { position: relative; padding: var(--sp-4); }
.cand .t { font-weight: 700; font-size: var(--fs-m); }
.cand dl, dl.dl { margin: 10px 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: var(--fs-s); line-height: 1.47; }
.cand dt, dl.dl dt { color: var(--t4); font-weight: 600; min-width: 2.6em; }
.cand dd, dl.dl dd { margin: 0; color: var(--ink); }
.tx-line { position: relative; display: grid; grid-template-columns: 50px 1fr; gap: 6px; width: 100%; padding: 9px var(--sp-4); border: 0; background: transparent; text-align: left; color: var(--t2); font-size: var(--fs-s); line-height: 1.53; min-height: var(--tap); }
.tx-line:active { background: var(--s2); }
.tx-line.on { background: var(--meeting-tint); color: var(--meeting-fg); }
.tx-line .ts { color: var(--t4); font-size: var(--fs-xs); font-weight: 600; flex: none; padding-top: 1px; }
.tx-line.on .ts { color: var(--meeting-fg); }
.progress { position: relative; height: 5px; border-radius: 3px; background: var(--line); margin-top: var(--sp-3); }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; display: block; border-radius: 3px; background: var(--meeting); transition: width 300ms var(--ease-out); }
.player .progress { margin-top: 0; }
.player .progress i::after { content: ''; position: absolute; right: -7px; top: -4.5px; width: 14px; height: 14px; border-radius: 50%; background: var(--meeting); box-shadow: 0 0 0 3px var(--s1); }
.player { display: flex; align-items: center; gap: var(--sp-3); background: var(--s1); border-radius: var(--r-xl); padding: 4px 14px 4px 4px; }
.player .grow { flex: 1; min-width: 0; }
.player .ptime { font-size: var(--fs-xs); color: var(--t3); font-weight: 600; }
.player .icon-btn { width: 50px; height: 50px; border-radius: 50%; background: transparent; position: relative; }
.player .icon-btn::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); }
.player .icon-btn svg { position: relative; color: var(--on-ink); width: 18px; height: 18px; }
.player .icon-btn:active::before { opacity: .8; }

/* ── 회의 카드 ── */
.people { display: grid; gap: var(--sp-2); }
.person { padding: var(--sp-3); border-radius: var(--r-m); border: 1px solid var(--line-2); display: grid; gap: var(--sp-2); }
.person-top { display: flex; align-items: center; gap: var(--sp-2); }
.person-top .input { flex: 1; }
.sugs { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.sug { min-height: 36px; padding: 0 12px; border-radius: var(--r-chip); border: 1px solid var(--line-2); background: transparent; font-size: var(--fs-s); color: var(--t2); }
.sug[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.warn { margin-top: var(--sp-2); font-size: var(--fs-s); color: var(--signal-fg); font-weight: 600; display: flex; gap: 6px; align-items: center; }

/* ── 받은 일 ── 출처 3색(메일·문자·홈페이지), 거르기 고른 칸 = 먹 */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
.filters button {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min); padding: 0 13px;
  border-radius: var(--r-chip); border: 1px solid var(--line-2); background: transparent; color: var(--t2);
  font-size: var(--fs-s); font-weight: 650; white-space: nowrap;
}
.filters button .num { color: var(--t4); font-weight: 600; }
.filters button[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters button[aria-pressed='true'] .num { color: inherit; opacity: .75; }
.in-row { position: relative; display: block; min-height: var(--tap-lg); padding: 14px var(--sp-4) 15px; color: var(--ink); text-decoration: none; }
.in-row:active { background: var(--s2); }
.in-top { display: flex; align-items: center; gap: var(--sp-2); }
.in-top .who { flex: 1; min-width: 0; font-size: var(--fs-s); font-weight: 650; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-top .at { flex: none; font-size: var(--fs-xs); color: var(--t4); }
.in-t { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.in-t .tt { font-size: var(--fs-m); font-weight: 650; line-height: 1.35; margin-right: 2px; min-width: 0; overflow-wrap: anywhere; }
.in-d { margin-top: 3px; color: var(--t3); font-size: var(--fs-s); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-d.tail { color: var(--t4); font-size: var(--fs-xs); display: flex; gap: 5px; align-items: center; }
.in-d.tail svg { color: var(--meeting); width: 13px; height: 13px; }
.in-row.is-done .tt, .in-row.is-done .in-d { color: var(--t4); }
.reply { white-space: pre-wrap; color: var(--t2); line-height: 1.55; font-size: var(--fs-s); }
.acts-col { display: grid; gap: var(--sp-2); margin-top: var(--sp-8); }
@media (hover: hover) and (pointer: fine) {
  .in-row:hover, .filters button:hover { background: var(--hover); }
  .filters button[aria-pressed='true']:hover { background: var(--ink); }
}

/* ── 설정: 손 안 가는 기록 ── */
.hands-top { display: flex; align-items: flex-start; gap: var(--sp-3); }
.hands-top .d { white-space: normal; color: var(--t3); font-size: var(--fs-s); line-height: 1.45; margin-top: 2px; }
.hands-top .stat { margin-top: 3px; }
.hands .acts { margin-left: calc(var(--tile) + var(--sp-3)); }

/* ── 아래에서 올라오는 창 · 알림 ── */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); opacity: 0; transition: opacity 200ms; }
.scrim.in { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 88dvh; overflow-y: auto;
  padding: var(--sp-2) calc(var(--pad) + var(--safe-r)) calc(var(--sp-6) + var(--safe-b)) calc(var(--pad) + var(--safe-l));
  border-radius: 20px 20px 0 0; background: var(--bg); box-shadow: 0 -1px 0 var(--line-2);
  transform: translateY(100%); transition: transform 260ms var(--ease-out);
}
.sheet.in { transform: none; }
.sheet-in { max-width: 560px; margin: 0 auto; }
.grab { width: 36px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto var(--sp-4); }
.sheet h2 { font-size: var(--fs-l); margin-bottom: var(--sp-2); }
.sheet .acts { display: grid; gap: var(--sp-2); margin-top: var(--sp-5); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--sp-6) + var(--safe-b)); z-index: 30;
  display: flex; align-items: center; gap: var(--sp-2);
  transform: translate(-50%, 20px); opacity: 0;
  max-width: calc(100% - 2 * var(--pad)); padding: 11px 16px; border-radius: 14px;
  background: var(--ink); color: var(--on-ink); font-size: var(--fs-s); font-weight: 700;
  transition: opacity 200ms, transform 200ms var(--ease-out); pointer-events: none;
}
.toast.done { background: var(--done-tint); color: var(--done-fg); box-shadow: 0 0 0 1px var(--done) inset; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.has-dock ~ .toast, .toast.up { bottom: calc(var(--tap-lg) * 2 + var(--sp-8) + var(--safe-b)); }

/* ── 비었을 때 · 로그인 · 안내 ── */
.empty { text-align: center; padding: var(--sp-10) var(--sp-4); color: var(--t3); display: grid; gap: var(--sp-4); justify-items: center; }
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-4); padding: var(--sp-10) 0; }
.mark { font-size: 2.6rem; font-weight: 800; letter-spacing: 0; line-height: 1.1; }
.mark-bars { display: flex; align-items: center; gap: 5px; height: 44px; margin-bottom: var(--sp-4); }
.mark-bars i { width: 7px; border-radius: 4px; }
.lead { font-size: var(--fs-l); color: var(--t2); line-height: 1.45; }
.apple-btn { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 600; }
.apple-btn svg { width: 18px; height: 22px; margin-top: -3px; }
.steps { display: grid; gap: var(--sp-5); margin: var(--sp-6) 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: var(--sp-3); }
.steps li::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-s); background: var(--k-tint); color: var(--k-fg); }
.steps li:nth-child(1) { --k-tint: var(--meeting-tint); --k-fg: var(--meeting-fg); }
.steps li:nth-child(2) { --k-tint: var(--watch-tint); --k-fg: var(--watch-fg); }
.steps li:nth-child(3) { --k-tint: var(--done-tint); --k-fg: var(--done-fg); }
.steps b { display: block; font-size: var(--fs-m); }
.steps span { color: var(--t3); font-size: var(--fs-s); }
.doc { line-height: 1.75; color: var(--t2); }
.doc h2 { font-size: var(--fs-m); color: var(--ink); margin: var(--sp-6) 0 var(--sp-2); }
.doc p, .doc li { font-size: var(--fs-s); }
.doc ol, .doc ul { padding-left: 1.2em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--sp-4); font-size: var(--fs-s); color: var(--t2); }
.kv dt { color: var(--t4); }
.kv dd { margin: 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.boot { flex: 1; display: grid; place-items: center; }

/* ── 카드(6칸) — 설계 7-2 · 7-3. 새 색 없음: 바탕 --s1 · 확인 = --thought-tint/-fg + 「확인」 글자 ── */
.composer .h1 { margin-top: var(--sp-4); }
.composer-acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-top: var(--sp-4); }
.speak-btn svg { width: 22px; height: 22px; }
.card-row.on { background: var(--s2); }
.chip.check-chip { background: var(--thought-tint); color: var(--thought-fg); border-color: var(--thought); }
.card6 { background: var(--s1); border-radius: var(--r-l); padding: var(--sp-5); margin-top: var(--sp-3); max-width: 560px; width: 100%; }
.c6-head { margin-bottom: var(--sp-3); }
.c6-title { font-size: var(--fs-xl); font-weight: 650; line-height: 1.28; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 6칸 줄(.c6-row)은 11-19 메모지 한 문장으로 바뀜 — memo-paper.css · memo-style.css */
.c6-acts { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); max-width: 560px; }
.c6-sub { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-2); }
.c6-sub .btn { min-height: var(--tap); }
.when-band { margin-top: var(--sp-4); display: grid; gap: var(--sp-2); }
.making-top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.said { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-m); background: var(--bg); color: var(--t2); font-size: var(--fs-s); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview { border: 1px solid var(--line-2); border-radius: var(--r-l); padding: var(--sp-4); background: var(--bg); display: grid; gap: 6px; margin-top: var(--sp-3); }
.pv-title { font-size: var(--fs-l); font-weight: 700; line-height: 1.3; }
.edit6 .small-ta { min-height: 84px; }
.write-ta { min-height: 168px; }
.write-tools { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.write-make { margin-top: var(--sp-4); }
.empty.pick { color: var(--t3); min-height: 320px; align-content: center; }
.cards-screen:not(.split) .spread > .gutter, .cards-screen:not(.split) .spread > .pane-r { display: none; }
.pane { min-width: 0; }
@media (hover: hover) and (pointer: fine) { .note-line:hover, .tap-w:hover { background: var(--hover); } }

/* ── 넓은 화면(폴더블 펼침·태블릿·노트북·모니터) ── 시안 wide: 홈 두 칸 · 상세 두 칸 */
@media (min-width: 600px) and (min-height: 561px) {
  .screen { --pad: 28px; }
  .rec-screen > .live { width: 100%; max-width: 470px; margin-left: auto; margin-right: auto; }
  .dock .dock-in { max-width: 420px; }
  .settings-in { width: 100%; max-width: 520px; margin: 0 auto; }
}
@media (min-width: 1024px) {
  .screen { --maxw: 960px; }
}
/* 두 쪽 판정 = js/ui/layout.js WIDE_QUERY 와 같게(가로가 세로보다 길거나 같을 때만 — 세로로 긴 펼침은 접히는 선이 가로라 한 칸) */
/* 두 쪽은 사람이 켤 때만(11-26) — :root.split-on = 머리줄 「두 쪽으로 보기」 단추(layout.js setSplitPref). 단추는 두 쪽이 될 수 있는 크기에서만 보임 */
.split-btn { display: none; }
@media (min-width: 600px) and (min-height: 561px) and (min-aspect-ratio: 1/1) {
  .split-btn { display: grid; }
  .split-btn[aria-pressed='true'] { background: var(--s2); }
}
@media (min-width: 600px) and (min-height: 561px) and (min-aspect-ratio: 1/1) {
  :root.split-on .home-wide { display: grid; grid-template-columns: calc(var(--mid) - var(--sp-6) / 2) minmax(0, 1fr); gap: 0 var(--sp-6); align-items: start; }
  :root.split-on .home-wide .home-main { min-height: 0; padding-top: 34px; }
  :root.split-on .home-wide > div { min-width: 0; }
  :root.split-on .home-wide > div > .sec:first-child { margin-top: 18px; }
  :root.split-on .detail-cols { display: grid; grid-template-columns: calc(var(--mid) - var(--sp-6) / 2) minmax(0, 1fr); gap: 0 var(--sp-6); align-items: start; }
  :root.split-on .detail-cols > div { min-width: 0; }
}
/* 두 쪽(설계 3-2·7-3): 1:1 · 가운데 1px 선(책 가운데처럼) · 접힘선은 그 간격 안에 오게 가운데 정렬.
   접힘 정보(Viewport Segments)는 기능 플래그 뒤라 쓰지 않고, 켜진 기기에서만 나눔선을 접힘선 가운데로·간격을 접힘 폭만큼 넓힌다 */
@media (min-width: 600px) and (min-height: 561px) and (min-aspect-ratio: 1/1) {
  .cards-screen.split { --maxw: 1200px; }
  .split .spread { --gap: 12px; display: grid; grid-template-columns: calc(var(--mid) - var(--gap) - .5px) 1px minmax(0, 1fr); column-gap: var(--gap); align-items: start; }
  .split .gutter { align-self: stretch; background: var(--line); min-height: 60vh; }
  .split .pane-r .card6, .split .pane-r .c6-acts { margin-left: auto; margin-right: auto; }
  .split .pane-r > .card6:first-child, .split .card-pane > .card6:first-child { margin-top: 18px; }
  .split .composer-acts { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 600px) and (min-height: 561px) and (min-aspect-ratio: 1/1) and (horizontal-viewport-segments: 2) {
  .split .spread { --gap: max(12px, calc((env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px)) / 2 + 12px));
    --mid: calc((env(viewport-segment-right 0 0, 50vw) + env(viewport-segment-left 1 0, 50vw)) / 2 - var(--side) - var(--pad) - var(--safe-l)); }
}

/* ── 가로 화면(폰) ── 녹음 중 화면을 두 칸으로 */
@media (orientation: landscape) and (max-height: 560px) {
  .rec-screen .rec-top { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--sp-6); }
  .timer { margin: var(--sp-2) 0; }
  .level { height: 52px; }
  .live { min-height: 90px; margin-top: var(--sp-3); }
  .home-main { flex-direction: row; min-height: 0; padding: var(--sp-4) 0; }
  .home-main .rec-text { text-align: left; justify-items: start !important; }
  .home-main .rec-label, .home-main .rec-sub { text-align: left; }
  .dock-in { grid-template-columns: 1fr 1fr; align-items: center; }
}
/* ── 낮은 세로 화면(듀오 접힘 466×678 등) 녹음 중 ── 화면 높이 안에 머리줄·시간·글 칸·단추 판을 차례로 쌓고 글 칸이 남은 높이만 씀
   (전에는 글 칸이 최소 160px 에 단추 판이 떠 있어 글 칸 아래쪽이 멈춤 단추 판 밑으로 들어갔다 — 11-26 시험에서 찾음). 글은 칸 안에서 스크롤 */
@media (max-height: 760px) and (orientation: portrait) {
  .rec-screen > .live { min-height: 72px; }
  .rec-screen { height: 100dvh; flex: none; }   /* .screen 의 flex: 1 이 높이를 무시하고 내용만큼 늘어나지 않게 */
  .rec-screen.has-dock { padding-bottom: 0; }
  /* 단추 판을 떠 있게 두지 않고 화면 맨 아래 칸으로 — 글 칸은 남은 높이만큼만(겹침 0) */
  .rec-screen .dock { position: static; margin: 0 calc(-1 * (var(--pad) + var(--safe-r))) 0 calc(-1 * (var(--pad) + var(--safe-l))); }
}
/* ── 세워 두고 녹음(11-26) ── 노트북처럼 세운 자세(js/ui/layout.js STAND_QUERY — 듀오 안쪽 세로 669×951 · 폴드8 안쪽 세로 704×933).
   접히는 선 = 화면 가운데 가로. 위 반쪽(세운 쪽) = 받아쓴 글을 크게 · 선 둘레 40px 비움 · 아래 반쪽(바닥 쪽) = 시간·소리 막대·멈춤 단추.
   책상에 세워 두고 회의할 때 글은 눈높이에, 손은 아래에(PianoFold·Shut the Fold 의 위·아래 나눔을 녹음에 맞춤) */
@media (min-width: 600px) and (max-width: 760px) and (min-height: 860px) and (max-aspect-ratio: 1/1) {
  .rec-screen { --bar-h: calc(var(--safe-t) + var(--tap) + var(--sp-2)); height: 100dvh; overflow: hidden; flex: none; }
  .rec-screen { display: grid; grid-template-rows: calc(50dvh + 20px + var(--sp-2)) auto auto 1fr; grid-template-columns: minmax(0, 1fr); align-content: start; }   /* 첫 줄(머리줄 자리) = 위 반쪽 + 선 둘레 — 아래 반쪽은 머리줄 높이와 상관없이 선 아래에서 시작 */
  .rec-screen > .bar { height: var(--bar-h); min-height: 0; align-self: start; }
  .rec-screen > .live {
    position: fixed; z-index: 4; margin: 0; max-width: none; width: auto; min-height: 0;
    top: calc(var(--bar-h) + var(--sp-2)); bottom: calc(50dvh + 20px + var(--sp-2));
    left: calc(var(--pad) + var(--safe-l)); right: calc(var(--pad) + var(--safe-r));
    font-size: var(--fs-l); line-height: 1.6;
  }
  .rec-screen .rec-top { margin-top: 0; padding-top: 0; justify-self: stretch; }
  .rec-screen .timer { margin-top: 6px; }
  .rec-screen .level { height: 64px; }
}

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

/* 구독(1.1) #/sub — 가격·체험·받는 것·자동 갱신 안내(3.1.2) */
.sub-card { padding: var(--sp-3) var(--sp-3) var(--sp-2); }
.sub-trial { font-size: var(--fs-s); font-weight: 700; color: var(--t2); }
.sub-price { font-size: var(--fs-xl); font-weight: 800; line-height: 1.3; margin: 2px 0 var(--sp-2); font-variant-numeric: tabular-nums; }
.sub-gets { margin: 0 0 var(--sp-2); padding-left: 1.1em; }
.sub-gets li { margin: 4px 0; }
.sub-acts { display: grid; gap: 8px; margin: var(--sp-3) 0 var(--sp-2); }
.muted.small, .sub-links { font-size: var(--fs-xs); line-height: 1.5; }
.sub-links a { color: inherit; text-decoration: underline; display: inline-block; min-height: 44px; line-height: 44px; }
.sub-note { margin-bottom: var(--sp-2); }
