/* HanFlow AI 모바일 — 화면 꾸밈 (PHY #357 · 260915)
 *
 * ⚠️ 폰이다. 손가락으로 누른다 — 누르는 것은 **44px 이상**.
 * ⚠️ 노치·홈바를 피한다(`env(safe-area-inset-*)`).
 * ⚠️ 어두운 화면 설정을 따른다 — 폰은 밤에 많이 본다.
 */

:root {
  --bg: #ffffff;
  --fg: #16181d;
  --dim: #6b7280;
  --line: #e6e8ec;
  --card: #f6f7f9;
  --brand: #2f6bff;
  --brand-fg: #ffffff;
  --warn-bg: #fff6e5;
  --warn-fg: #8a5a00;
  --err-bg: #fdecec;
  --err-fg: #a3231f;
  --online: #23a55a;
  --offline: #e5484d;
  --unknown: #9aa1ad;
  --bar-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e8eaee;
    --dim: #9aa1ad;
    --line: #262a32;
    --card: #171a20;
    --brand: #5b8bff;
    --warn-bg: #3a2f14;
    --warn-fg: #ffd694;
    --err-bg: #3a1f1e;
    --err-fg: #ffb4b0;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 🔴★★260915 — **`hidden` 을 CSS 가 이긴다.**
 *   `.bar { display: flex }` 가 `[hidden]` 보다 세서, 코드가 `bar.hidden = true`
 *   로 숨겨도 **화면엔 그대로 떠 있었다**(구운 판을 에뮬레이터에 올려 찍은
 *   사진에서 잡혔다 — 소스만 보면 멀쩡하다. #353 과 같은 교훈).
 *   ⛔ 이 줄을 지우지 마라. 숨기기가 조용히 안 듣게 된다. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--fg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'Pretendard', 'Noto Sans KR',
        system-ui, sans-serif;
  /* ⛔ 확대·축소로 화면이 깨지지 않게. 대신 글자 크기를 처음부터 크게 잡는다. */
  -webkit-text-size-adjust: 100%;
}

.app { display: flex; flex-direction: column; height: 100%; }

.bar {
  display: flex; align-items: center; gap: 8px;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 5;
}
.bar .title { flex: 1; font-weight: 600; font-size: 17px; }
.bar .bal { font-size: 13px; color: var(--dim); white-space: nowrap; }
.icon {
  min-width: 44px; min-height: 44px;
  background: none; border: 0; color: var(--fg);
  font-size: 28px; line-height: 1; cursor: pointer;
}

.view {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.boot { color: var(--dim); text-align: center; padding: 40px 0; }

/* ── 글·단추 ─────────────────────────────────────────────────────────── */
h1 { font-size: 22px; margin: 4px 0 6px; }
p.sub { color: var(--dim); margin: 0 0 20px; }

label { display: block; font-size: 14px; color: var(--dim); margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; padding: 13px 14px; font-size: 16px;   /* ⛔ 16px 미만이면 iOS 가 확대한다 */
  color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
}
textarea { resize: none; }
/* 260928 PHY «입력란 회색 글씨가 잘린다» — 안드로이드 웹뷰는 입력칸에 앱 글꼴을 안 물려준다(고정폭으로 나왔다) · 안내 글은 한 줄로. */
input, textarea, select, button { font-family: inherit; }
textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 동의 칸 (260920) — ⛔ 칸이 **손가락으로 눌러지는 크기**여야 한다(24px).
 *   `label` 의 기본 `display:block` 을 덮어 글과 칸을 한 줄에 둔다. */
label.chk {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 0 0; color: var(--fg); font-size: 14px; line-height: 1.5;
}
label.chk input[type="checkbox"] {
  width: 24px; height: 24px; margin: 0; flex: 0 0 auto; accent-color: var(--brand);
}
label.chk a { color: var(--brand); }

button.primary {
  width: 100%; min-height: 50px; margin-top: 18px;
  font-size: 16px; font-weight: 600;
  color: var(--brand-fg); background: var(--brand);
  border: 0; border-radius: 12px; cursor: pointer;
}
button.primary[disabled] { opacity: .5; }
button.link {
  background: none; border: 0; color: var(--brand);
  font-size: 14px; padding: 12px 4px; cursor: pointer;
}

.note { font-size: 13px; padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
.note.warn { background: var(--warn-bg); color: var(--warn-fg); }
.note.err { background: var(--err-bg); color: var(--err-fg); }

/* ── 봇 목록 ─────────────────────────────────────────────────────────── */
/* 🔴260915 — 카드가 **화면보다 넓어져** 오른쪽으로 삐져나갔다(사진에서 잡힘).
 *   grid 자식은 기본 `min-width:auto` 라, 줄바꿈 안 되는 긴 설명이 **칸 자체를**
 *   넓힌다. 글자를 줄이는 것으로는 못 고친다 — **칸을 못 넓히게** 해야 한다. */
.bots { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.bots .bot {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  text-align: start; color: var(--fg); cursor: pointer; width: 100%;
}
.bots .bot .emoji { font-size: 26px; flex: 0 0 auto; }
/* 🔴260915 — 설명이 화면 오른쪽으로 **넘쳐 잘렸다**(에뮬레이터 사진에서 잡힘).
 *   `text-overflow: ellipsis` 는 **줄일 수 있는 부모** 위에서만 듣는다 —
 *   flex 자식은 기본 `min-width:auto` 라 안 줄어든다. 여기서 풀어 준다. */
.bots .bot .txt { flex: 1 1 auto; min-width: 0; }
.bots .bot .nm { font-weight: 600; }
.bots .bot .ps { display: block; font-size: 13px; color: var(--dim);
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 261018 #1383 — 함께 쓰는 PC 를 지금 못 쓰는 까닭은 잘리면 안 된다(주인에게 무엇을 물을지가 그 안에 있다). */
.bots .bot[disabled] { opacity: .6; cursor: default; }
.bots .bot .ps.why { white-space: normal; color: var(--err-fg); }

/* ── 261030 «연결할 PC» — 카드 + 색 칩 + 제거 · ＋ PC 추가 · 아래 한 줄 메뉴 (PHY «한 눈에 · 간결하게») ──
 *   `.bots .bot` 은 보관함 목록도 쓴다 ⇒ 이 화면 것은 `.pcs` 아래로만 바꾼다. */
.bots.pcs .pcrow { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.bots.pcs .pcrow .bot { flex: 1 1 auto; min-width: 0; width: auto; }
.bots.pcs .bot .emoji { font-size: 22px; }
.bots.pcs .bot .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.on { color: #15803d; background: #dcfce7; }
.chip.off { color: #5b6270; background: #eceef2; }
.chip.wait { color: #a15c00; background: #fff1d6; }
@media (prefers-color-scheme: dark) {
  .chip.on { color: #6ee7a0; background: #12321f; }
  .chip.off { color: #a9b0bc; background: #22262e; }
  .chip.wait { color: #ffc96b; background: #3a2c10; }
}
.bots.pcs .rm {
  flex: 0 0 auto; min-width: 56px; padding: 0 12px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 14px; color: var(--dim); font-size: 13px;
}
button.ghost {
  width: 100%; min-height: 50px; margin-top: 12px; cursor: pointer;
  background: none; border: 1.5px dashed var(--line); border-radius: 14px;
  color: var(--brand); font-size: 15px; font-weight: 600;
}
.pctabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
  margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--line);
}
.pctabs .tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 56px;
  padding: 6px 2px; background: none; border: 0; border-radius: 10px; color: var(--fg); font-size: 12px; cursor: pointer;
}
.pctabs .tab .ic { font-size: 20px; line-height: 1.2; }
.pctabs .tab .lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 홈 — AI 봇 목록 (260925 UI v2 · 디스코드 «메시지» 탭) ───────────────────── */
.bar .title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar .title .tname { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .title .tbox { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.bar .title .tsub { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 400; color: var(--dim);
                    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .title .tsub .pcdot { position: static; border: 0; }
.tav { position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
       display: grid; place-items: center; font-size: 19px; background: var(--card); }
.icon.more { font-size: 24px; letter-spacing: 1px; }
/* 연결 점 — ⚠️ PC 하나의 상태다(봇마다 따로 아니다). 모르면 회색 — 초록을 지어내지 않는다. */
.pcdot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
         border: 2px solid var(--bg); background: var(--unknown); display: inline-block; }
.pcdot.online { background: var(--online); }
.pcdot.offline { background: var(--offline); }
.pcdot.unknown { background: var(--unknown); }

.home { margin: -16px -16px 0; }
.hstatus { margin: 10px 16px 0; font-size: 13px; color: var(--dim); }
.hstatus .link { padding: 4px 6px; }
.shead { padding: 16px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--dim); }
.rows { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px;
  padding: 9px 16px; border: 0; background: none; color: var(--fg); text-align: start; cursor: pointer;
}
.item:active { background: var(--card); }
.item .av {
  position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 23px; background: var(--card);
}
.item .txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .top { display: flex; align-items: baseline; gap: 8px; }
.item .nm { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 15px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .when { flex: 0 0 auto; font-size: 12px; color: var(--dim); }
.item .ps { font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.item .tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--card); color: var(--dim); }
.item.stub .nm { color: var(--dim); }

/* ⋯ 메뉴 — 밑에서 올라오는 판. 뒤로가기·바깥 누름·항목 누름에 닫힌다(app.js openSheet). */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .38);
         display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-panel { background: var(--bg); border-radius: 16px 16px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); }
.sheet-item { display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 0; border-radius: 10px;
              background: none; color: var(--fg); font-size: 16px; text-align: start; cursor: pointer; }
.sheet-item:active, .sheet-item.on { background: var(--card); }

/* ── 대화방 — 말풍선 없는 «메시지 줄» (디스코드) ─────────────────────────── */
.msgs { display: flex; flex-direction: column; padding-bottom: 8px; }
.mrow { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; min-width: 0; }
.mrow.cont { margin-top: 2px; }
.mrow.cont .av, .mrow.cont .hd { visibility: hidden; height: 0; }
.mrow .av { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
            display: grid; place-items: center; font-size: 19px; background: var(--card); }
.mrow.me .av { font-size: 14px; font-weight: 700; background: var(--brand); color: var(--brand-fg); }
.mrow.cont .av { height: 0; }
.mrow .col { flex: 1 1 auto; min-width: 0; }
.mrow .hd { display: flex; align-items: baseline; gap: 8px; line-height: 1.3; }
.mrow .nm { font-weight: 700; font-size: 15px; }
.mrow.bot .nm { color: var(--brand); }
.mrow .ts { font-size: 11px; color: var(--dim); }
/* ⛔ 줄 전체 폭을 쓴다 — 옛 말풍선(max-width:92%)이 목록·제목 답을 좁혔다. */
.mrow .body { max-width: 100%; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
/* 260930 #827 — 꾹 누르면 우리 메뉴(텍스트 복사)가 뜬다: 웹뷰의 글 고르기·기본 메뉴가 함께 뜨지 않게 */
.mrow.me .body, .mrow.bot .body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* ⚠️ 다듬은 답은 줄바꿈을 «태그»로 만든다 — `pre-wrap` 을 끄지 않으면 빈 줄이 겹친다. */
.mrow.bot .body { white-space: normal; }
.mrow .meta { font-size: 12px; color: var(--dim); margin-top: 2px; }
.mrow .foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.mrow.sys { justify-content: center; text-align: center; font-size: 12px; color: var(--dim); margin: 14px 8px 0; }

.empty { text-align: center; padding: 48px 12px 12px; }
.empty .big { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
              font-size: 40px; background: var(--card); }
.empty .nm { font-size: 20px; font-weight: 700; }
.empty .ps { margin-top: 6px; font-size: 14px; color: var(--dim); }

/* 답변 다듬기 — `md.js` 가 만든 조각들. ⛔ 여기 쓰이는 태그는 그 파일이 만드는
 *   것뿐이다(`<a>` 는 **없다** — 만들지 않기로 했다. 260906 XSS 교훈). */
.md-h1, .md-h2, .md-h3 { font-weight: 700; margin: 8px 0 2px; }
.md-h1 { font-size: 18px; }
.md-h2 { font-size: 16px; }
.md-h3 { font-size: 15px; }
.md-p { margin: 1px 0; }
.md-gap { height: 8px; }
.md-ul { margin: 2px 0; padding-inline-start: 20px; }
.md-ul li { margin: 2px 0; }
.md-ul .md-ul { margin: 0; }
/* 번호를 글자로 들고 있는 줄은 점을 끈다 — 안 끄면 「• 1. …」 로 표가 둘이 된다. */
.md-ul li.md-li-num { list-style: none; margin-inline-start: -16px; }
.md-q { margin: 4px 0; padding-block: 2px; padding-inline: 10px 0; border-inline-start: 3px solid var(--line); color: var(--dim); }
.md-pre, .md-tbl {
  margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.45;
  white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.md-pre code { background: none; padding: 0; font-size: inherit; }
.md-cut { margin-top: 8px; font-size: 12px; color: var(--dim); }
.mrow .body code, .note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  background: rgba(127, 127, 127, .18); padding: 1px 5px; border-radius: 5px;
}
.mrow .body hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

.composer {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.composer .row { display: flex; gap: 8px; align-items: flex-end; }
.composer .rstatus, .composer .workon { font-size: 12px; color: var(--dim); padding: 0 4px; }
.composer .workon { color: var(--warn-fg); }
/* ⛔ flex 자식은 기본 `min-width:auto` 라 긴 글이 칸을 넓힌다 — 260915 에 봇 카드에서
 *   같은 병을 겪었다. 입력칸이 화면 밖으로 밀려나지 않게 여기서 풀어 준다. */
.composer textarea { flex: 1 1 auto; min-width: 0; max-height: 120px; }
.composer .tool {
  min-width: 44px; min-height: 48px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--fg); font-size: 20px; cursor: pointer;
}
.composer .tool.on { background: var(--brand); color: var(--brand-fg); }

/* 붙인 파일 표. ⚠️ 화면보다 넓어지지 않게 — 파일 이름은 길다. */
.chip {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 10px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); font-size: 13px;
}
.chip .nm { flex: 1 1 auto; min-width: 0;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .ps { flex: 0 0 auto; color: var(--dim); }
.chip .x { flex: 0 0 auto; min-width: 44px; min-height: 36px;
           border: 0; background: none; color: var(--dim); font-size: 16px; cursor: pointer; }

/* 고를 수 있는 «일» 띠 — 목록은 **PC 가 알려 준 것**이다(앱이 안 정한다).
   ⚠️ 여러 개면 가로로 밀어 본다. 줄바꿈으로 쌓으면 입력줄이 화면을 다 먹는다. */
.chip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chip .pick {
  flex: 0 0 auto; white-space: nowrap; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--fg); font-size: 13px; cursor: pointer;
}
.chip .pick.on { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }

/* PC 와 눈으로 맞춰 보는 짧은 지문 — 헷갈리지 않게 고정폭으로 */
.fp { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; }

/* 답 아래 «보관» */
.save {
  flex: 0 0 auto; white-space: nowrap;   /* ⛔ 「보관」이 세로로 쪼개지지 않게 */
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--brand); font-size: 13px; cursor: pointer;
}
.save[disabled] { color: var(--dim); }
.composer button {
  min-width: 52px; min-height: 48px; border: 0; border-radius: 12px;
  background: var(--brand); color: var(--brand-fg); font-size: 18px; cursor: pointer;
}
.composer button[disabled] { opacity: .5; }

.toast {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  padding: 13px 16px; border-radius: 12px;
  background: var(--err-bg); color: var(--err-fg);
  font-size: 14px; z-index: 20;
}
.toast[hidden] { display: none; }
/* 잘된 일은 «빨강이 아니어야» 한다 — 빨간 성공 문구는 실패로 읽힌다. */
.toast.ok { background: var(--card); color: var(--fg); border: 1px solid var(--line); }

.dots::after {
  content: '·'; animation: d 1.2s steps(4, end) infinite;
}
@keyframes d { 0% { content: '·'; } 33% { content: '··'; } 66% { content: '···'; } }

/* 「구글로 계속하기」와 이메일 칸 사이의 가름줄 (260920 #501) */
.orline {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted, #6b7280); font-size: 13px; margin: 6px 0 14px;
}
.orline::before, .orline::after {
  content: ''; flex: 1; height: 1px; background: var(--line, #e5e7eb);
}

/* 260926 PHY «PC 를 안 켜 놔도 디스코드처럼» — PC 가 초록이 아니면 홈 행의 아바타만 흐리게·점은 속 빈 회색 고리(오프라인 사람), 방은 얇은 띠. */
.rows.pcoff .item .av { opacity: .6; }
.rows.pcoff .item .pcdot, .tav .pcdot.offline { background: var(--bg); box-shadow: inset 0 0 0 3px var(--unknown); }
.composer .pcoff { font-size: 12px; padding: 6px 12px; margin-bottom: 6px; border-radius: 8px;
  background: rgba(229, 72, 77, .14); color: var(--offline); }

/* ── 260926 PHY 1.0.10 «디스코드처럼» — 😊 판 · 🔍 방 정보 · ⚙ · 홈 아래 «나» 막대 · 프로필 ───────────── */
/* 입력줄: [ (뒤에 «+» 자리) · 입력칸 · 😊 · (뒤에 «🎤» 자리) · 보내기 ] — 줄은 flex 라 단추를 끼우기만 하면 된다. */
.composer .row .emo { min-width: 44px; background: none; color: var(--fg); font-size: 22px; padding: 0; }
.composer .row .emo[disabled] { opacity: .35; }
.emopanel { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; }
.emopanel[hidden] { display: none; }
.emopanel .emo-q { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg); font-size: 15px; }
.emopanel .emo-grid { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.emopanel .emo-h { font-size: 12px; font-weight: 700; color: var(--dim); margin: 8px 2px 4px; }
.emopanel .emo-none { font-size: 13px; color: var(--dim); padding: 4px 2px; }
.emopanel .emo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; }
/* ⚠️ `.composer button` 이 모든 단추를 파랑으로 칠한다 — 이모지 칸은 되돌린다. */
.composer .emopanel .emo-k { min-width: 0; min-height: 42px; padding: 0; border-radius: 8px;
  background: none; color: var(--fg); font-size: 24px; }
.composer .emopanel .emo-k:active { background: var(--card); }

.bar .bal { display: flex; align-items: center; gap: 2px; }
.icon.rbtn { font-size: 19px; }

.rinfo { position: fixed; inset: 0; z-index: 25; background: var(--bg); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); }
.rinfo-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.rinfo-nm { font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tav.big { width: 48px; height: 48px; font-size: 26px; }
.rinfo-tabs { display: flex; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.rinfo-tabs .rtab { padding: 10px 0; border: 0; border-bottom: 3px solid transparent; background: none;
  color: var(--dim); font-size: 15px; font-weight: 700; cursor: pointer; }
.rinfo-tabs .rtab.on { color: var(--brand); border-bottom-color: var(--brand); }
.rinfo-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: env(safe-area-inset-bottom); }
.rinfo-empty { padding: 28px 16px; text-align: center; font-size: 14px; color: var(--dim); }
.rinfo .lnk { margin: 6px 16px; padding: 10px 12px; border-radius: 10px; background: var(--card);
  font-size: 14px; word-break: break-all; user-select: text; -webkit-user-select: text; }
.rinfo .sub { margin: 10px 16px; }
.item .badge { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: var(--brand); color: var(--brand-fg); }
.item.member { cursor: default; }
.av.me { background: #eb459e; color: #fff; font-weight: 700; font-size: 18px; }

.mebar { display: flex; align-items: center; gap: 12px; margin: 0 10px calc(10px + env(safe-area-inset-bottom));
  padding: 10px 14px; border: 0; border-radius: 14px; background: var(--card); color: var(--fg); text-align: start; cursor: pointer; }
.mebar .av { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.mebar .txt { display: flex; flex-direction: column; min-width: 0; }
.mebar .nm { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mebar .ps { font-size: 13px; color: var(--dim); }

.profile { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.profile .av { position: relative; flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; }
.profile .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile .nm { font-size: 24px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .ps { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--dim); }
.profile .ps .pcdot { position: static; border: 0; }
/* «나»(이 폰)의 점 — PC 점(.pcdot)과 따로 칠한다(paintPcState 가 .pcdot 을 PC 상태로 바꾸므로). */
.udot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
        border: 2px solid var(--bg); background: var(--online); display: inline-block; }
.profile .ps .udot { position: static; border: 0; }

/* 260926 첨부(＋) — 디스코드처럼 입력줄 왼쪽 «＋» · 입력칸 위 칩 · 보낸 말 아래 첨부 표 */
.composer .row .plus { min-width: 40px; min-height: 40px; border-radius: 50%; background: var(--card); color: var(--fg); font-size: 22px; padding: 0; }
.composer .row .plus[disabled] { opacity: .35; }
.composer .row .plus[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 8px; }
.chips[hidden] { display: none; }
.chip { display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 4px 4px 10px; border-radius: 14px; background: var(--card); font-size: 13px; }
.chip.err { outline: 1px solid #e5484d; }
.chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { min-width: 28px; min-height: 28px; border: 0; border-radius: 50%; background: none; color: var(--fg); font-size: 16px; padding: 0; }
/* 260929 #758 — 사진 첨부는 썸네일(디스코드처럼) · ✕ 는 오른쪽 위에 겹친다 · 올리는 중이면 흐리게 + 진행 글 */
.chip.pic { position: relative; padding: 0; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; }
.chip.pic.up .chip-img { opacity: .55; }
.chip-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip.pic .chip-x { position: absolute; top: 2px; right: 2px; min-width: 24px; min-height: 24px; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; }
.chip-say { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 3px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; text-align: center; white-space: nowrap; overflow: hidden; }
.att-img { max-width: 180px; max-height: 180px; border-radius: 8px; object-fit: cover; display: block; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.att { padding: 3px 8px; border-radius: 10px; background: var(--card); font-size: 12px; }
.sheet-item[disabled] { opacity: .4; }
.sheet-note { padding: 8px 14px 4px; font-size: 13px; opacity: .75; }
/* 260926 PC↔폰 대화 동기화 — 이력 칸·협업 카드·문서 배지·«PC 에서 여십시오»·대화 목록 */
.badge.fmt { margin-inline-start: 6px; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--card); color: var(--dim); }
.collab { margin-top: 6px; border-inline-start: 3px solid var(--card); padding-inline-start: 8px; }
.collab-h { border: 0; background: none; color: var(--dim); font-size: 13px; padding: 4px 0; }
.collab-r { font-size: 13px; color: var(--dim); padding: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pconly { display: inline-block; font-size: 12px; color: var(--dim); padding: 4px 0; }
.convitem { display: block; width: 100%; text-align: start; border: 0; background: none; color: var(--fg); padding: 12px 14px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convitem.on { font-weight: 700; }
.tocur { display: block; margin: 0 auto 6px; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--card); color: var(--fg); font-size: 13px; }
/* 260927 연동 센터 — 메일 초안 승인 카드(전문을 보고 보내기) */
.apcard { margin: 8px 12px; padding: 10px 12px; border-radius: 12px; background: var(--card); border-inline-start: 3px solid #5865f2; }
.aph { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.apf { display: flex; gap: 8px; font-size: 13px; padding: 1px 0; }
.apk { flex: 0 0 auto; color: var(--dim); min-width: 64px; }
.apv { overflow-wrap: anywhere; }
.apbody { margin-top: 6px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.apbody.clamp { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.apmore { border: 0; background: none; color: #5865f2; font-size: 13px; padding: 6px 0; }
.apbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.apbtns button { min-height: 36px; border: 0; border-radius: 8px; padding: 6px 14px; font-size: 14px; }
.apno { background: var(--bg); color: var(--fg); }
.apgo { background: #5865f2; color: #fff; }
.apgo[disabled], .apno[disabled] { opacity: .45; }
.apmsg { font-size: 13px; color: var(--dim); margin-top: 6px; }

/* ── 260928 디스코드식 입력창(#749~752) — [＋ ↔ ✕] [메시지 입력] [😊] [🎤 ↔ ↑] · ＋ 트레이(키보드 자리) ─────────────── */
.composer .row .plus { background: var(--card); color: var(--fg); min-width: 44px; border-radius: 999px; font-size: 22px; padding: 0; }
.composer .row .mic { min-width: 48px; background: var(--card); color: var(--fg); border-radius: 999px; font-size: 22px; padding: 0;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.composer .row .mic.on { background: var(--brand); color: var(--brand-fg); box-shadow: 0 0 0 4px rgba(88, 101, 242, .28); }
.composer.trayopen { padding-bottom: 0; }
/* 트레이는 덮개가 아니라 입력줄 아래의 한 칸이다(`.sheet` 의 고정·어둡게를 푼다 — 층·뒤로가기 규칙은 그대로 탄다). */
.composer .sheet.tray { position: static; inset: auto; z-index: auto; background: none; display: block; }
.composer .tray-panel { border-radius: 0; padding: 4px 0 0; background: var(--bg); }
.composer .tray-tiles { display: flex; gap: 8px; padding: 4px 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.composer .tray-tile { flex: 0 0 auto; min-height: 64px; min-width: 76px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); color: var(--fg); font-size: 14px; white-space: nowrap; }
.composer .tray-tile[disabled] { opacity: .4; }
/* 네이티브 격자(HfPhotoTray)가 이 칸 위에 그려진다 — 높이만 잡아 둔다(그리는 것은 안드로이드). */
.composer .tray-native { margin: 0 -12px; background: var(--card); }   /* 네이티브 격자는 화면 폭 전체(MATCH_PARENT) — 자리도 입력창 여백을 넘어 전체 폭으로 */

/* 260929 #759 — 🎤 녹음 줄(디스코드 음성 메시지처럼) · [✕] ● 0:07 들리는 말 [↑] */
.voicebar { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.vb-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: var(--card); color: var(--fg); font-size: 18px; }
.vb-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; flex: 0 0 auto; animation: vbpulse 1s ease-in-out infinite; }
@keyframes vbpulse { 50% { opacity: .3; } }
.vb-clock { font-variant-numeric: tabular-nums; color: var(--fg); flex: 0 0 auto; min-width: 36px; }
.vb-live { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.vb-live.dim { color: var(--dim); }
.vb-send { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: var(--brand); color: var(--brand-fg); font-size: 20px; }

/* 260929 #764 — ＋ 트레이의 최근 사진 격자(디스코드처럼 · 3칸 · 누르면 곧바로 붙음 · 붙은 사진은 파란 테두리+✓) */
.tray-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; overflow-y: auto; -webkit-overflow-scrolling: touch; margin-bottom: 8px; border-radius: 10px; }
.gal-cell { position: relative; padding: 0; border: 0; aspect-ratio: 1 / 1; background: var(--card); overflow: hidden; }
.gal-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-cell.on { outline: 3px solid var(--brand); outline-offset: -3px; }
.gal-cell.on::after { content: '✓'; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-fg); font-size: 14px; line-height: 22px; text-align: center; }
.gal-more { color: var(--fg); font-size: 13px; }
.gal-cell.busy img { opacity: .5; }

/* 260929 보낼 차례 줄(디스코드처럼 계속 보내기) */
.qwait { font-size: 12px; opacity: .72; margin-top: 4px; cursor: pointer; }
.qwait.off { opacity: .9; color: #e5484d; }
.qwait .qx { margin-inline-start: 8px; text-decoration: underline; cursor: pointer; }

/* 260930 PHY «디스코드 모바일처럼» — 메시지 꾹 누르기 판(묶음 카드 · 그림 글자 · 빨간 삭제) · 판 안 글은 고를 수 없다 */
.msheet, .msheet * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.msheet { background: rgba(0, 0, 0, .55); }
.msheet-panel { padding: 6px 12px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
.msheet-grip { width: 38px; height: 4px; border-radius: 2px; background: currentColor; opacity: .25; margin: 4px auto 12px; }
.msheet-group { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.msheet-item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 12px 18px;
  border: 0; background: none; color: inherit; font: inherit; font-size: 17px; text-align: start; }
.msheet-item + .msheet-item { border-top: 1px solid rgba(127, 127, 127, .18); }
.msheet-item:active:not([disabled]) { background: rgba(127, 127, 127, .16); }
.msheet-item.bad { color: #f23f43; }
.msheet-item[disabled] { opacity: .55; }
.msheet-ic { width: 26px; font-size: 21px; text-align: center; flex: none; }
.msheet-tx { display: flex; flex-direction: column; }
.msheet-tx small { font-size: 12.5px; opacity: .75; margin-top: 2px; }
#msgs .mrow.me, #msgs .mrow.bot { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 261008 #1059 — 프로젝트 칩·판 · 대화 탭 검색/여러 개 지우기 · «지난번 하던 일» 띠 */
.projchip { display: inline-block; margin-inline-start: 0; margin-top: 2px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font-size: 12px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projitem { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0; }
.projitem .projpick { flex: 1 1 auto; text-align: start; border: 0; background: none; color: var(--fg); padding: 12px 14px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projitem.on .projpick { font-weight: 600; }
.projnew { display: flex; gap: 8px; padding: 12px 14px; }
.projnew input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); font-size: 15px; }
.convtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.convtools input[type=search] { flex: 1 1 160px; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); font-size: 14px; }
.convtools button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); font-size: 13px; }
.convall { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--dim); }
.convfound .convitem.found { border-inline-start: 3px solid var(--line); }
.rinfo-body.selecting .convitem::before { content: '○ '; }
.rinfo-body.selecting .convitem.sel::before { content: '● '; }
.convdelbar { position: sticky; top: 0; z-index: 2; padding: 8px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.convdelbar button { width: 100%; padding: 9px; border-radius: 10px; border: 0; background: #dc2626; color: #fff; font-size: 14px; }
.convdelbar button:disabled { opacity: .5; }
.resumeband { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; }
.resumeband .txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resumeband button { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font-size: 13px; }
/* 261008 #1059 2A — 🧠 장기기억 · ✏️ 봇 편집 */
.memitem { display: flex; align-items: center; gap: 6px; }
.mempick { flex: 1; text-align: left; background: none; border: 0; color: inherit; padding: 10px 4px; font: inherit; overflow-wrap: anywhere; }
.memdel { flex: none; }
.memnew textarea { flex: 1; min-height: 44px; resize: vertical; font: inherit; }
.memhead { font-weight: 600; margin: 8px 0; overflow-wrap: anywhere; }
.membody { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.bef { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.bef input, .bef textarea, .bef select { font: inherit; padding: 8px; }

/* 261010 #1085 — 결과·첨부 카드(디스코드처럼) */
.fcards { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.fcard { border: 1px solid var(--line, #d0d5dd); border-radius: 12px; padding: 6px 8px; max-width: 320px; background: var(--card, #fff); }
.fcard.img { padding: 4px; }
.fcard .pv-card { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; margin-bottom: 4px; cursor: zoom-in; }
.fcard-row { display: flex; align-items: center; gap: 8px; }
.fcard-ic { font-size: 20px; }
.fcard-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fcard .save.file, .fcard .save.fshare { min-width: 44px; }
.fcard-why { font-size: 12px; color: var(--muted, #667085); margin-top: 4px; }
.atts .fcard { display: inline-block; margin: 2px 4px 2px 0; }
.more-row { margin-top: 2px; }
.more-h { background: none; border: 0; color: var(--accent, #2563eb); padding: 4px 0; font-size: 13px; }
.more-b { display: flex; flex-direction: column; gap: 6px; }
.viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom; }
.viewer img { max-width: 100%; max-height: 100%; }
.viewer-x { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; font-size: 22px; color: #fff; background: rgba(0, 0, 0, .4); border: 0; border-radius: 20px; width: 40px; height: 40px; }

/* 261010 PHY 실기 #5 — 미리보기를 받는 동안의 자리 표(깨진 그림 대신) */
.fcard .pv-wait { height: 96px; border-radius: 10px; margin-bottom: 8px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); }
/* #1246 «🔑 내 AI» — 단추는 긴 언어에서 줄을 바꿔 잘리지 않는다(360px). */
.ownai .rinfo-body { padding: 0 14px 14px; }
.ownai-h { font-size: 15px; margin: 18px 0 2px; }
.ownai-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.ownai-row button, .ownai button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.ownai-link { display: inline-block; margin: 6px 0; overflow-wrap: anywhere; }

/* ── mobux1103 모바일 UX 재설계 — 아이콘 타일·홈 카드·＋ 단추·카탈로그·확인 시트·아이콘 고르기·프로젝트 시트 ──
 * 타일 색은 폰의 표현일 뿐(저장값은 이모지) · 같은 이모지는 늘 같은 색 · 라이트/다크 두 벌. */
:root {
  --tone-blue: #2f6bff; --tone-indigo: #4f46e5; --tone-violet: #7c3aed; --tone-teal: #0d9488;
  --tone-green: #16a34a; --tone-orange: #ea580c; --tone-pink: #db2777; --tone-slate: #64748b;
  --tile-a: 14%; --tile-b: 28%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tone-blue: #6b93ff; --tone-indigo: #8b85ff; --tone-violet: #a78bfa; --tone-teal: #2dd4bf;
    --tone-green: #4ade80; --tone-orange: #fb923c; --tone-pink: #f472b6; --tone-slate: #94a3b8;
    --tile-a: 18%; --tile-b: 30%;
  }
}
.tile { --tone: var(--tone-slate); border-radius: 30%;
  background: color-mix(in srgb, var(--tone) var(--tile-a), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) var(--tile-b), transparent); }
.tile[data-tone="blue"] { --tone: var(--tone-blue); } .tile[data-tone="indigo"] { --tone: var(--tone-indigo); }
.tile[data-tone="violet"] { --tone: var(--tone-violet); } .tile[data-tone="teal"] { --tone: var(--tone-teal); }
.tile[data-tone="green"] { --tone: var(--tone-green); } .tile[data-tone="orange"] { --tone: var(--tone-orange); }
.tile[data-tone="pink"] { --tone: var(--tone-pink); } .tile[data-tone="slate"] { --tone: var(--tone-slate); }
.tile[data-tone="none"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.item .av.tile, .tav.tile, .empty .big.tile { border-radius: 30%; }
.item .av.tile { width: 48px; height: 48px; font-size: 24px; }
.tav.tile { width: 36px; height: 36px; font-size: 19px; }

/* 홈 카드 */
.rows .item.card { width: auto; margin: 0 16px 8px; border-radius: 16px; background: var(--card); min-height: 72px; padding: 12px 14px; }
.rows .item.card .nm { font-size: 16px; font-weight: 700; }
.rows .item.card .ps { font-size: 13px; }
.fab { position: fixed; z-index: 20; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 56px; height: 56px;
  border: 0; border-radius: 18px; background: var(--brand); color: var(--brand-fg); font-size: 28px; line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22); cursor: pointer; }
.fab:active { transform: scale(.96); }

/* 카탈로그 그리드 */
.botcat .cat-q { margin: 6px 16px 2px; font-size: 16px; font-weight: 600; }
.botcat .cat-sub { margin: 0 16px 14px; font-size: 13px; color: var(--dim); }
/* 카탈로그 v4 — 탭 N개 칩 줄(가로로만 밀린다 · 고른 칩만 채움 · 페이지 가로 스크롤 없음) */
.catgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
@media (min-width: 400px) { .catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.catcard { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 112px; padding: 14px 8px 12px;
  border: 0; border-radius: 16px; background: var(--card); color: var(--fg); cursor: pointer; text-align: center; }
.catcard:active { background: rgba(127, 127, 127, .16); }
.catcard.custom { background: none; box-shadow: inset 0 0 0 1.5px var(--line); border-style: dashed; }
.catcard .cat-tile { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; border-radius: 14px; }
.catcard .cat-nm { font-size: 14px; font-weight: 600; }
.catcard .cat-ds { font-size: 12px; color: var(--dim); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catcard { position: relative; }
.catcard .cat-inuse { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; }
.botcat .sheet-note { margin: 16px; }

/* 판 시트(입력칸이 든 바닥 시트) */
.psheet, .psheet * { -webkit-user-select: auto; user-select: auto; }
.psheet-panel { max-height: 78vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.psheet .bef { display: block; margin: 0 4px 10px; }
.psheet .bef > span { display: block; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.psheet input, .psheet textarea { width: 100%; min-height: 48px; font-size: 16px; border-radius: 12px; }
.psheet .primary { min-height: 52px; }
.be-top { display: flex; justify-content: center; margin: 4px 0 12px; }
.be-icon { position: relative; width: 64px; height: 64px; font-size: 32px; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--fg); }
.be-icon .be-pen { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; font-size: 12px;
  display: grid; place-items: center; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.be-desc { margin: -2px 4px 10px; font-size: 13px; color: var(--dim); }
.be-more { display: block; margin: 0 0 8px; text-align: start; }
.be-memnote { margin: 4px 0 12px; font-size: 14px; line-height: 1.5; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.ip-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.ip-title { font-size: 16px; font-weight: 600; }
.ip-own { display: flex; gap: 8px; margin: 0 4px 10px; }
.ip-own input { flex: 1 1 auto; }
.ip-own button { flex: 0 0 auto; width: auto; padding: 0 16px; }
.ip-set { margin: 8px 4px 6px; font-size: 12px; font-weight: 700; color: var(--dim); letter-spacing: .02em; }
.icongrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.ip-ic { aspect-ratio: 1; min-height: 40px; border: 0; font-size: 20px; display: grid; place-items: center; cursor: pointer; color: var(--fg); }
.ip-ic.on { box-shadow: inset 0 0 0 2px var(--brand); }

/* 프로젝트 시트·관리 판 */
.projlist .projitem { min-height: 56px; padding: 0; }
.projlist .projitem + .projitem { border-top: 1px solid rgba(127, 127, 127, .18); }
.projlist .projpick { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-height: 56px; padding: 10px 16px;
  border: 0; background: none; color: var(--fg); text-align: start; cursor: pointer; min-width: 0; }
.projlist .pj-ic { flex: 0 0 auto; font-size: 18px; }
.projlist .pj-nm { flex: 1 1 auto; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projlist .pj-meta { flex: 0 0 auto; font-size: 12px; color: var(--dim); }
.projlist .projitem.on .pj-meta { color: var(--brand); font-weight: 600; }
/* mobux1103 — 시트 안 «＋ 새 프로젝트»는 세로(줄 아래로 입력칸이 펼쳐진다) — 옛 판의 가로 .projnew 를 덮는다 */
.projsheet .projnew { flex-direction: column; gap: 0; padding: 0; }
.projnew-in { display: flex; gap: 8px; padding: 0 12px 12px; }
.projnew-in input { flex: 1 1 auto; }
.projnew-in .primary { flex: 0 0 auto; width: auto; padding: 0 18px; }
.rinfo .pj-bot { margin: 4px 16px 10px; font-size: 13px; color: var(--dim); }
.rinfo .projlist { margin: 0 16px 12px; }
.rinfo .sheet-note { margin: 0 16px; }
.draft-attnote { margin: 0 12px 6px; padding: 6px 10px; border-radius: 10px; background: var(--card); font-size: 13px; color: var(--dim); }
