:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #e3e6eb;
  --text: #16181d;
  --muted: #6b7280;
  --accent: #1f8a70;
  --accent-soft: #e2f3ed;
  --me: #1f8a70;
  --me-text: #ffffff;
  --bot: #ffffff;
  --danger: #d6336c;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #171a21;
    --line: #262a33;
    --text: #e8eaee;
    --muted: #9aa1ad;
    --accent: #5cc9a7;
    --accent-soft: #15302a;
    --me: #1f7a63;
    --me-text: #ffffff;
    --bot: #1d2129;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ── 로그인 ── */
.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; text-align: center; }
.login img { border-radius: 18px; }
.login p { color: var(--muted); }
.login form { display: grid; gap: 10px; margin-top: 20px; }
.login input { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.login button { padding: 12px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }
.error { color: var(--danger); }

/* ── 레이아웃: PC는 좌우, 폰은 한 화면씩 ── */
.app { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100dvh; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

@media (min-width: 761px) { .mobile-only { display: none !important; } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app .chat { display: none; }
  .app.in-chat .side { display: none; }
  .app.in-chat .chat { display: flex; }
  .mobile-only { display: inline-flex; }
}

.brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand img { border-radius: 8px; }
.brand div { flex: 1; display: flex; flex-direction: column; }
.brand small, .chat-head small { color: var(--muted); font-size: 12px; }
.icon-btn { border: 0; background: transparent; font-size: 20px; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn[aria-pressed="true"] { background: var(--accent-soft); }

/* ── 빠른 버튼 ── */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 14px; }
.quick button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 20px;
}
.quick button span { font-size: 11px; color: var(--muted); white-space: nowrap; letter-spacing: -0.02em; }
.quick button:active { transform: scale(.97); }
.quick button[aria-pressed="true"], .quick button.on { border-color: var(--accent); background: var(--accent-soft); }
.quick button.on span { color: var(--accent); font-weight: 600; }
.quick button[aria-pressed="true"] span { color: var(--accent); font-weight: 600; }

/* ── 팀장 / 작업실 탭 ── */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 14px 4px; padding: 4px; background: var(--bg); border-radius: 12px; }
.tabs button { border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }

/* ── 작업실 도구 화면 ── */
.chat.tool-mode .messages, .chat.tool-mode .composer, .chat.tool-mode #attach, .chat.tool-mode #new-chat { display: none; }
.toolpane { flex: 1; overflow-y: auto; padding: 18px 16px 32px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 16px; text-align: center; color: var(--muted); background: var(--panel); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop button, .tool-actions button, .row button { border: 0; border-radius: 10px; padding: 9px 14px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card h4 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.row { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row > b { font-size: 14px; }
.row.base > b::after { content: " ●"; color: var(--accent); }
.fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.fields input, .fields select { width: 92px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.fields select { width: auto; }
.fields input[readonly] { opacity: .7; }
.fields label { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.fields label input[type="radio"] { width: auto; }
.estimate { font-size: 14px; }
.estimate b { color: var(--accent); }
.tool-actions { display: flex; gap: 8px; }
.tool-actions .primary { flex: 1; padding: 13px; background: var(--accent); color: #fff; font-size: 16px; border-radius: 12px; }
.tool-actions .primary:disabled { opacity: .45; }
.result { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.result .download { border: 0; padding: 10px 16px; border-radius: 20px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr auto; } .row > b { grid-column: 1 / -1; } }

/* ── 📅 오늘 · 📒 장부 · 📰 이슈 (슬라이드) ── */
.board { max-width: 1180px; gap: 18px; }
/* 오늘: 일정표(왼쪽) | 체크리스트·다가오는 일정(오른쪽) */
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.split-main, .split-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.split-side { position: sticky; top: 0; }
.count { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; border-radius: 11px; background: var(--accent-soft);
  color: var(--accent); font-size: 12.5px; text-align: center; vertical-align: 2px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split-side { position: static; } }
.slide { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 4%); }
.slide h3 { margin: 0 0 14px; font-size: 17px; letter-spacing: -0.01em; }
.slide.hero { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #0b3d33)); color: #fff; border: 0; padding: 28px 28px 26px; }
.slide.hero small { opacity: .8; font-size: 13px; }
.slide.hero h2 { margin: 4px 0 6px; font-size: 30px; letter-spacing: -0.02em; line-height: 1.25; }
.slide.hero p { margin: 0; opacity: .92; }
.slide.hero .primary { margin-top: 16px; border: 0; padding: 11px 18px; border-radius: 12px; background: #fff; color: var(--accent); font-weight: 700; }
.slide.hero .primary:disabled { opacity: .8; }
.allday { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.allday span { background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 12px; font-size: 13px; }
.timetable { --row: 52px; position: relative; height: calc(var(--hours) * var(--row)); margin-left: 52px; }
.hour { position: absolute; left: -52px; right: 0; top: calc(var(--i) * var(--row)); border-top: 1px solid var(--line); height: var(--row); }
.hour span { position: absolute; left: 0; top: -9px; font-size: 12px; color: var(--muted); background: var(--panel); padding-right: 6px; }
.event { position: absolute; top: calc(var(--top) * var(--row) + 2px); height: calc(var(--len, 1) * var(--row) - 6px); min-height: 22px;
  left: calc(var(--col) * 100% / var(--cols)); width: calc(100% / var(--cols) - 6px); overflow: hidden;
  background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 8px; padding: 5px 9px; font-size: 13.5px; }
.event b { color: var(--accent); margin-right: 4px; }
.event small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event.act { background: var(--bg); border-left-color: var(--muted); }
.event.act b { color: var(--muted); }
.legend { float: right; font-size: 12px; font-weight: 400; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.legend i, .dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend i.plan, .dots i.plan { background: var(--accent); }
.legend i.done, .dots i.done { background: var(--muted); }
.legend i.done { margin-left: 6px; }
.hero-main { min-width: 0; }
.hero-tools { display: flex; gap: 10px; align-items: flex-start; }
.mini-cal { background: rgb(255 255 255 / 14%); border-radius: 14px; padding: 8px 10px 6px; width: 236px; min-height: 180px; }
.mini-cal .cal-head { margin-bottom: 4px; font-size: 13px; }
.mini-cal .cal-head button { border: 0; background: rgb(255 255 255 / 18%); color: #fff; width: 26px; height: 22px; font-size: 15px; border-radius: 7px; line-height: 1; }
.mini-cal .cal-grid { gap: 1px; }
.mini-cal .cal-grid .dow { color: rgb(255 255 255 / 75%); font-size: 10.5px; padding: 1px 0; }
.mini-cal .cal-grid button { background: transparent; color: #fff; font-size: 12px; padding: 2px 0 1px; border-radius: 7px; gap: 1px; cursor: pointer; }
.mini-cal .cal-grid button:hover { border-color: rgb(255 255 255 / 60%); }
.mini-cal .cal-grid button.is-today { color: #fff; text-decoration: underline; }
.mini-cal .cal-grid button.sel { background: #fff; color: var(--accent); font-weight: 800; }
.mini-cal .cal-grid .dots { height: 4px; gap: 2px; }
.mini-cal .dots i { width: 4px; height: 4px; }
.mini-cal .dots i.plan { background: #fff; }
.mini-cal .dots i.done { background: rgb(255 255 255 / 55%); }
.mini-cal .cal-grid button.sel .dots i.plan { background: var(--accent); }
.mini-cal .cal-grid button.sel .dots i.done { background: var(--muted); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.slide.hero .ghost { margin-top: 16px; border: 1px solid rgb(255 255 255 / 50%); background: transparent; color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head button { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; width: 36px; height: 32px; font-size: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-grid button { border: 1px solid transparent; background: var(--bg); border-radius: 10px; padding: 7px 0 4px; font: inherit; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-grid button:hover { border-color: var(--accent); }
.cal-grid button.is-today { font-weight: 800; color: var(--accent); }
.cal-grid button.sel { background: var(--accent); color: #fff; }
.cal-grid .dots { display: flex; gap: 3px; height: 8px; }
.day.link { cursor: pointer; }
.day.link:hover { text-decoration: underline; }
.now { position: absolute; left: -6px; right: 0; top: calc(var(--top) * var(--row)); border-top: 2px solid var(--danger); z-index: 2; }
.now span { position: absolute; right: 0; top: -11px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.clock { text-align: right; background: rgb(255 255 255 / 16%); border-radius: 14px; padding: 8px 14px; }
.clock small { display: block; opacity: .85; font-size: 12px; }
.clock b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.photo-result { border: 2px solid var(--accent); }
.photo-result .line .del, .link-btn { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 8px; padding: 3px 9px; font-size: 12.5px; flex: none; }
.link-btn { margin-top: 10px; }
.now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-of-type { border-top: 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.check small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.check.done span { text-decoration: line-through; color: var(--muted); }
.day { margin: 14px 0 4px; font-size: 13px; color: var(--accent); }
.day:first-of-type { margin-top: 0; }
.line { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 14px; min-width: 0; }
.line > b { flex: none; width: 46px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.who-tag { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.who-tag.me { background: var(--bg); color: var(--muted); }
.ellipsis { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 3px; }
.tile:hover { border-color: var(--accent); }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile p { margin: 6px 0 0; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile time { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.md { font-size: 15px; line-height: 1.65; }
.md h4 { margin: 16px 0 8px; font-size: 16px; }
.md h4:first-child { margin-top: 0; }
.md ol, .md ul { padding: 0; margin: 0; list-style: none; counter-reset: n; display: grid; gap: 10px; }
.md li { counter-increment: n; position: relative; padding: 14px 16px 14px 52px; background: var(--bg); border-radius: 14px; }
.md ol li::before { content: counter(n); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.md ul li::before { content: "•"; position: absolute; left: 22px; top: 12px; color: var(--accent); font-size: 18px; }
.md .sub { color: var(--muted); font-size: 13.5px; }
.md a { color: var(--accent); }
@media (max-width: 760px) { .slide { padding: 18px 16px; border-radius: 16px; } .slide.hero h2 { font-size: 24px; } }

/* ── 🧩 확장 라이브러리 · 🔧 제작대 ── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button, .chip { border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 6px 12px; border-radius: 16px;
  font-size: 13px; text-decoration: none; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.ext p { margin: 6px 0; font-size: 14px; }
.ext small { display: block; color: var(--muted); font-size: 12.5px; }
.ext small.warn { color: var(--danger); margin-top: 4px; }
.ext-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ext-head b { font-size: 15.5px; }
.star { font-size: 12px; color: #c27c0e; font-weight: 700; }
.ext-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.ext-actions button, .ext-actions select { border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 7px 12px; border-radius: 10px; font: inherit; font-size: 13.5px; }
.ext-actions .get { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.ext-actions .remove { color: var(--danger); }
.code summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 10px; }
.code pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: 12.5px; max-height: 420px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.wide-input { width: 100%; margin-top: 10px; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.tool-actions select { border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--bg); color: var(--text); font: inherit; }
details.card > summary { cursor: pointer; }

/* ── 📰 이슈 ── */
.date-chips { margin-top: -4px; }
.issues { display: grid; gap: 12px; }
.issue { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 16px; background: var(--bg); border-radius: 14px; border: 2px solid transparent; }
.issue.focus { border-color: var(--accent); }
.issue .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.issue .topic { font-size: 12px; color: var(--accent); font-weight: 600; }
.issue h4 { margin: 2px 0 6px; font-size: 16px; line-height: 1.4; }
.issue h4 a { color: inherit; text-decoration: none; }
.issue h4 a:hover { color: var(--accent); text-decoration: underline; }
.issue p { margin: 0 0 6px; font-size: 14px; line-height: 1.6; }
.issue .why { color: var(--muted); font-size: 13.5px; }
.related { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.related small { color: var(--muted); font-size: 12px; }
.related button, .thread button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 12px; padding: 4px 10px; font-size: 12.5px; text-align: left; }
.related button:hover, .thread button:hover { border-color: var(--accent); color: var(--accent); }
.thread { padding: 10px 0; border-top: 1px solid var(--line); }
.thread:first-of-type { border-top: 0; }
.thread small { display: block; color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.thread ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.thread button.here { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ── 초대한 사람(member)은 작업실만 ── */
body.member .quick, body.member .tabs, body.member #dev, body.member #leads, body.member #fab-mic,
body.member .owner-only, body.member #back { display: none !important; }
@media (max-width: 760px) { body.member #back { display: inline-flex !important; } }

/* ── 링크 모음 ── */
.search { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.link-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.link-row:first-of-type { border-top: 0; }
.link-row a { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.link-row a:hover b { color: var(--accent); text-decoration: underline; }
.link-row b { display: block; font-size: 14.5px; }
.link-row small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.link-row .del { border: 0; background: transparent; color: var(--muted); font-size: 15px; padding: 6px; border-radius: 8px; }
.link-row .del:hover { background: var(--bg); color: var(--danger); }
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-grid input, .add-grid select { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; min-width: 0; }
.add-grid .wide { grid-column: 1 / -1; }
.add-grid button { grid-column: 1 / -1; border: 0; padding: 11px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }
.invite { display: flex; gap: 8px; }
.invite input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.invite button { border: 0; padding: 9px 14px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; flex: none; }

/* ── 팀장 목록 ── */
.leads { overflow-y: auto; padding: 4px 12px 24px; flex: 1; }
.leads h3 { font-size: 12px; color: var(--muted); font-weight: 600; margin: 16px 6px 6px; letter-spacing: .02em; }
.lead {
  width: 100%; text-align: left; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center;
  padding: 10px; border: 0; border-radius: 12px; background: transparent;
}
.lead:hover { background: var(--bg); }
.lead.active { background: var(--accent-soft); }
.lead .avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
  background: var(--bg); border: 1px solid var(--line); position: relative;
}
.lead .avatar.mem::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  background: #2fb344; border: 2px solid var(--panel);
}
.lead > span:last-child { min-width: 0; }
.lead b { display: block; font-size: 14.5px; }
.lead small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead.chief .avatar { background: var(--accent); color: #fff; border: 0; }

/* 폰 첫 화면의 큰 마이크 버튼 */
.fab {
  position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 64px; height: 64px;
  border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 28px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 40%, transparent);
}
.leads { padding-bottom: 96px; }

/* ── 대화 ── */
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.chat-head div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(720px, 88%); padding: 10px 14px; border-radius: var(--radius); white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: var(--me); color: var(--me-text); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--bot); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .who { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg .meta { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.msg.me .meta { text-align: right; }
.msg .thumb { display: block; max-width: min(260px, 100%); max-height: 260px; border-radius: 10px; margin-top: 6px; }
.chat.dragging { outline: 3px dashed var(--accent); outline-offset: -10px; background: var(--accent-soft); }
.chat.dragging .messages::after { content: "여기에 놓으면 이 팀장 작업 폴더로 올라가요"; position: sticky; bottom: 0; align-self: center;
  background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 14px; }
.msg .download { display: inline-block; margin-top: 8px; padding: 7px 14px; border: 0; border-radius: 18px;
  background: var(--accent); color: #fff; font-weight: 600; }
.progress { align-self: flex-start; font-size: 13px; color: var(--muted); padding: 0 6px; }
.empty { margin: auto; text-align: center; color: var(--muted); }
.empty b { color: var(--text); font-size: 17px; }

.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.composer textarea {
  flex: 1; resize: none; max-height: 160px; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
.mic, .send { width: 46px; height: 46px; border-radius: 50%; border: 0; font-size: 20px; flex: none; }
.mic { background: var(--accent-soft); }
.send { background: var(--accent); color: #fff; }
.mic:disabled { opacity: .4; }

/* ── 음성 듣는 중 ── */
.listening {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 10; padding: 16px; text-align: center;
}
.listening p { font-size: 18px; max-width: 520px; }
.listening button { padding: 10px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); }
.pulse {
  width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 44px;
  background: var(--accent); color: #fff; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 26px transparent; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
@media (max-width: 760px) { .hero-row { flex-wrap: wrap; } .hero-tools { width: 100%; justify-content: space-between; } .mini-cal { flex: 1; max-width: 300px; } }

/* 🤝 협력사 */
.pviews { margin: 0; }
.slide.hero a.ghost { display: inline-block; text-decoration: none; }
.preq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.preq-head h3 { margin-bottom: 8px; }
.preq-tools { display: flex; gap: 8px; align-items: center; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); margin-left: 4px; font-weight: 500; }
.tags .tag { margin-left: 0; }
button.tag { cursor: pointer; font: inherit; font-size: 12px; }
button.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.red { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.tag.warn { color: #b26a00; border-color: #e8c27a; }
.ptable-wrap { overflow-x: auto; margin: 0 -4px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ptable th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable td:first-child { white-space: nowrap; }
.ptable .hist { color: var(--muted); font-size: 12.5px; min-width: 140px; }
.ptable .note { font-size: 12.5px; }
.ptable .dl { text-align: center; color: var(--muted); }
.ptable .dl input { width: 18px; height: 18px; accent-color: var(--accent); }
.ptable .miss { color: var(--danger); font-weight: 700; }
.ptable tr.st-na td { color: var(--muted); }
.ptable tr.st-missing td:first-child b, .ptable tr.st-late td:first-child b { color: var(--danger); }
.row-act { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 8px; padding: 3px 6px; font-size: 12.5px; }
.notion { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.partner { border-bottom: 1px solid var(--line); }
.partner summary { cursor: pointer; padding: 10px 2px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.partner summary small { margin-left: auto; color: var(--muted); }
.partner .pbody { padding: 0 2px 14px; }
.partner .hero-actions { margin-top: 10px; align-items: center; }
.contacts td { white-space: nowrap; }
.contacts a { color: inherit; }
.inbox { border: 2px solid var(--danger); }
.inbox .line span small { display: block; color: var(--muted); font-size: 12px; }
.inbox .line > b { width: 46px; }
.pform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pform input:not([type=checkbox]):not([type=radio]), .pform select { font: inherit; font-size: 15px; color: var(--text); padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pform .seg { display: flex; gap: 16px; margin-bottom: 10px; }
.pform .seg label, .pform fieldset label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 14px; margin: 0; }
.pform .pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pform fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.pform legend { padding: 0 4px; font-weight: 700; }
.pform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pform .primary-btn { border: 0; background: var(--accent); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 10px; }
.pform .link-btn { margin-top: 0; }
.gchat { padding: 14px 20px; }
.gchat .line { align-items: center; padding: 0; }
.gchat .line > b { width: auto; }
.gchat .line > span { flex: 1; }
.gchat .line span small { display: block; color: var(--muted); font-size: 12px; }
.gchat .link-btn { margin-top: 0; }
.line.past { opacity: .55; }
.line .t { color: var(--accent); }
.done-tag { color: var(--accent); font-size: 12px; white-space: nowrap; }
details.slide.inbox { padding: 0; }
.inbox-bar { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: baseline; padding: 14px 20px; }
.inbox-bar::-webkit-details-marker { display: none; }
.inbox-bar b { color: var(--danger); white-space: nowrap; }
.inbox-bar span { color: var(--muted); font-size: 13px; }
.inbox-bar::after { content: "▾"; margin-left: auto; color: var(--muted); }
.inbox[open] .inbox-bar::after { content: "▴"; }
.inbox-body { padding: 0 20px 16px; max-height: 60vh; overflow-y: auto; }
