/* 바로답 관리 화면 — 모바일 우선, 넓은 화면에서는 좌측 메뉴 + 2단 */
:root {
  --bg: #F3F4F6; --surface: #FFFFFF; --surface-2: #F7F8FA; --ink: #121519; --ink-2: #353B44; --muted: #687080; --faint: #9AA1AD;
  --line: #E2E5EA; --line-2: #EDEFF2;
  --brand: #13795B; --brand-strong: #0D5F47; --brand-soft: #E2F2EB; --brand-ink: #0B4F3B;
  --warn: #A45F00; --warn-soft: #FFF2D9; --danger: #C2342C; --danger-soft: #FCEBE9; --info: #2A56C9; --info-soft: #E7EDFC;
  --bubble: #E9EBEF; --bubble-ink: #121519; --kakao: #FEE500;
  --r: 14px; --r-sm: 10px; --r-xs: 7px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 2px 8px rgba(17, 24, 39, .05);
  --shadow-lg: 0 10px 40px rgba(17, 24, 39, .18);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --nav-w: 240px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1113; --surface: #171B1E; --surface-2: #1D2226; --ink: #ECEFF2; --ink-2: #C9CED5; --muted: #8E96A2; --faint: #636B76;
    --line: #2A3036; --line-2: #22282D;
    --brand: #2FA67F; --brand-strong: #46BD95; --brand-soft: #16302A; --brand-ink: #8FE0C2;
    --warn: #E5A33A; --warn-soft: #33270F; --danger: #F0685F; --danger-soft: #3A1B19; --info: #7C9DF5; --info-soft: #1B2440;
    --bubble: #262C31; --bubble-ink: #ECEFF2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.92); } }

/* ── 레이아웃 ── */
.shell { min-height: 100vh; }
.nav { display: none; }
.main { padding-bottom: calc(72px + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.brandmark { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.ws-switch { display: flex; align-items: center; gap: 4px; padding: 6px 8px; margin-left: -8px; border: 0; background: none; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; min-width: 0; }
.ws-switch:hover { background: var(--line-2); }
.ws-switch svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live.on::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.view { padding: 4px 16px 24px; max-width: 760px; margin: 0 auto; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; position: relative; text-decoration: none; }
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--brand); }
.tab .dot { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; font-weight: 700; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--nav-w) 1fr; }
  .nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); }
  .nav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 800; font-size: 17px; }
  .nav .brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
  .nav .ws-switch { margin: 0 0 10px; width: 100%; justify-content: space-between; border: 1px solid var(--line); padding: 9px 10px; font-size: 14px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 600; text-decoration: none; font-size: 14.5px; }
  .nav-item svg { width: 20px; height: 20px; color: var(--muted); }
  .nav-item:hover { background: var(--surface-2); }
  .nav-item.active { background: var(--brand-soft); color: var(--brand-ink); }
  .nav-item.active svg { color: var(--brand); }
  .nav-item .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; text-align: center; line-height: 20px; }
  .nav .foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); font-size: 13px; }
  .tabbar { display: none; }
  .main { padding-bottom: 24px; min-width: 0; }
  .topbar { display: none; }
  .view { padding: 24px 32px 40px; max-width: 1180px; }
}

/* ── 공통 요소 ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 0 14px; }
.page-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--ink-2); }
.card-title .sub { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.section-label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 22px 2px 8px; letter-spacing: .01em; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; border: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { min-height: 50px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn.sm svg { width: 16px; height: 16px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg { width: 22px; height: 22px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687080' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card + .radio-card { margin-top: 8px; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio-card input { accent-color: var(--brand); margin-top: 3px; width: 18px; height: 18px; flex: none; }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--line); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; border: 0; }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.outline { background: transparent; border: 1px solid var(--line); }
.chip svg { width: 14px; height: 14px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { height: 34px; padding: 0 13px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 650; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.filter.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.filter .n { margin-left: 4px; color: var(--danger); }
.filter.active .n { color: inherit; opacity: .8; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--line-2); gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 650; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; margin-bottom: 12px; }
.banner svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.danger { background: var(--danger-soft); color: var(--danger); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.brand { background: var(--brand-soft); color: var(--brand-ink); }
.banner b { font-weight: 700; }
.banner .btn { margin-left: auto; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ill { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.empty .ill svg { width: 28px; height: 28px; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ── 요약 ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 1px; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 1px; }

/* ── 시작 체크리스트 ── */
.setup { margin-bottom: 14px; }
.setup-head { display: flex; align-items: center; gap: 12px; }
.progress { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s; }
.step { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.step:first-of-type { border-top: 0; }
.step .ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; }
.step.done .ck { background: var(--brand); border-color: var(--brand); }
.step.done .ck svg { width: 14px; height: 14px; }
.step .t { font-weight: 650; font-size: 14px; }
.step.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.step .d { font-size: 12.5px; color: var(--muted); }

/* ── 신청 목록 ── */
.leads-layout { display: block; }
.lead-list { display: flex; flex-direction: column; gap: 8px; }
.lead-item { display: block; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; text-decoration: none; color: inherit; cursor: pointer; position: relative; }
.lead-item:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.lead-item.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.lead-item.unread::before { content: ''; position: absolute; left: 5px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.lead-item .top { display: flex; align-items: center; gap: 8px; }
.lead-item .name { font-weight: 750; font-size: 15.5px; }
.lead-item .when { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lead-item .ad { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.lead-item .meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; }
.state svg { width: 15px; height: 15px; }
.state.ok { color: var(--brand); }
.state.wait { color: var(--warn); }
.state.bad { color: var(--danger); }
.state.off { color: var(--muted); }
.more { display: block; margin: 12px auto 0; }
.detail-pane { display: none; }
@media (min-width: 1100px) {
  .leads-layout { display: grid; grid-template-columns: minmax(340px, 400px) 1fr; gap: 20px; align-items: start; }
  .detail-pane { display: block; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; border-radius: var(--r); }
  .detail-pane .view-inner { padding: 0; }
}

/* ── 신청 상세 ── */
.back { display: inline-flex; align-items: center; gap: 2px; margin: 6px 0 6px -8px; padding: 6px 8px; border: 0; background: none; color: var(--muted); font-weight: 650; cursor: pointer; border-radius: 8px; }
.back svg { width: 20px; height: 20px; }
.lead-hero { padding: 18px 16px; }
.lead-hero h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.lead-hero .phone { font-size: 17px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.contact-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.contact-actions .btn { flex-direction: column; gap: 2px; min-height: 58px; font-size: 12.5px; }
.contact-actions .btn svg { width: 20px; height: 20px; }
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pick button { height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.status-pick button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 22px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.bad::before { background: var(--danger); }
.timeline li.wait::before { background: var(--warn); }
.timeline li.off::before { background: var(--faint); }
.timeline .tm { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.notif-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.notif-row:first-child { border-top: 0; }

/* ── 말풍선 미리보기 ── */
.phone-mock { background: var(--surface-2); border: 1px solid var(--line); border-radius: 22px; padding: 14px 12px 16px; }
.phone-mock .ph-head { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.phone-mock .ph-head b { display: block; color: var(--ink); font-size: 13.5px; }
.bubble { max-width: 92%; padding: 10px 13px; border-radius: 17px 17px 17px 5px; background: var(--bubble); color: var(--bubble-ink); white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.55; }
.bubble.alimtalk { border-radius: 4px 14px 14px 14px; background: var(--surface); border: 1px solid var(--line); padding: 0; overflow: hidden; }
.bubble.alimtalk .at-head { background: var(--kakao); color: #191919; font-weight: 700; font-size: 13px; padding: 8px 12px; }
.bubble.alimtalk .at-body { padding: 11px 13px; white-space: pre-wrap; }
.bubble-meta { font-size: 11.5px; color: var(--muted); margin: 6px 0 0 4px; }
.sent-bubble { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }

/* ── 소재 ── */
.campaign { margin-top: 18px; }
.campaign-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.campaign-head h3 { font-size: 14px; font-weight: 750; color: var(--ink-2); }
.campaign-head .chip { height: 22px; font-size: 11.5px; }
.ad-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; width: 100%; text-align: left; }
.ad-row + .ad-row { margin-top: 7px; }
.ad-row:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.thumb { width: 52px; height: 52px; border-radius: 10px; flex: none; background: var(--line-2) center/cover no-repeat; display: grid; place-items: center; color: var(--faint); }
.thumb svg { width: 22px; height: 22px; }
.ad-row .nm { font-weight: 700; font-size: 14.5px; }
.ad-row .sb { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.rule-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-top: 6px; padding: 3px 9px; border-radius: 7px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12.5px; font-weight: 650; }
.rule-pill.default { background: var(--line-2); color: var(--muted); }
.rule-pill svg { width: 13px; height: 13px; flex: none; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.status-dot.on { background: var(--brand); }
.rule-card { display: block; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; text-decoration: none; color: inherit; }
.rule-card + .rule-card { margin-top: 8px; }
.rule-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.rule-card.off { opacity: .6; }
.rule-card .prev { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.rule-card .foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ── 메시지 편집 ── */
.editor { display: grid; gap: 16px; }
@media (min-width: 1000px) { .editor { grid-template-columns: 1fr 360px; align-items: start; } .editor .preview-col { position: sticky; top: 20px; } }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.var-chip { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px dashed color-mix(in srgb, var(--brand) 55%, var(--line)); background: var(--brand-soft); color: var(--brand-ink); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.var-chip.answer { border-color: color-mix(in srgb, var(--info) 50%, var(--line)); background: var(--info-soft); color: var(--info); }
.counter { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.counter .over { color: var(--danger); font-weight: 700; }
.target-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.target-chips .chip { height: 30px; }
.warn-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.warn-item { display: flex; gap: 8px; font-size: 12.5px; color: var(--warn); background: var(--warn-soft); padding: 8px 10px; border-radius: 9px; }
.warn-item svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.sticky-actions { position: sticky; bottom: calc(64px + var(--safe-b)); display: flex; gap: 8px; padding: 12px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
@media (min-width: 960px) { .sticky-actions { bottom: 0; } }

/* ── 알림 받는 사람 ── */
.person { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.person:first-child { border-top: 0; padding-top: 2px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 750; }
.avatar.sms { background: var(--info-soft); color: var(--info); }
.person .ch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.push-mock { display: flex; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.push-mock .ico { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.push-mock .tt { font-weight: 700; font-size: 13.5px; }
.push-mock .bd { font-size: 13px; color: var(--ink-2); white-space: pre-line; margin-top: 2px; }

/* ── 시트·토스트 ── */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 15, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 18px calc(18px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: up .2s ease-out; }
.sheet .grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.sheet .lead { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 20px; padding-bottom: 20px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pick input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.pick .thumb { width: 38px; height: 38px; border-radius: 8px; }
.pick-group { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 2px 2px; }
#toast-root { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast { pointer-events: auto; background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: up .2s ease-out; display: flex; gap: 10px; align-items: center; max-width: 100%; }
.toast.bad { background: var(--danger); color: #fff; }
.toast .btn { min-height: 28px; padding: 0 10px; font-size: 12.5px; background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 40%, transparent); }
@media (min-width: 960px) { #toast-root { bottom: 24px; } }

/* ── 로그인 ── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand img { width: 46px; height: 46px; border-radius: 13px; }
.auth-brand b { font-size: 22px; font-weight: 800; display: block; letter-spacing: -0.02em; }
.auth-brand span { font-size: 13px; color: var(--muted); }
.auth h1 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.auth .lead { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.auth .alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth .alt a { font-weight: 700; text-decoration: none; }
.form-error { color: var(--danger); font-size: 13.5px; margin-top: 10px; min-height: 1em; }
.dev-hint { margin-top: 18px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.copy-box { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.copy-box span { flex: 1; }
.code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 5px; word-break: break-all; }
details.adv summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 650; padding: 4px 0; }
details.adv[open] summary { margin-bottom: 8px; }
.page-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.page-row:first-child { border-top: 0; padding-top: 0; }
.page-row img, .page-row .pg-ph { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--info-soft); color: var(--info); display: grid; place-items: center; font-weight: 800; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.setting-row:first-child { border-top: 0; padding-top: 0; }
.setting-row .t { font-weight: 650; font-size: 14px; }
.setting-row .d { font-size: 12.5px; color: var(--muted); }
.two { display: grid; gap: 12px; }
.card + .two, .two + .card, .two + details.card { margin-top: 12px; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } .two > .card + .card { margin-top: 0; } }
.skeleton { background: linear-gradient(90deg, var(--line-2), var(--surface-2), var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 13px; height: 86px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
