/* 한국에스엠에이톡 — 로고(하늘색 #6BB3E3 · 회색 #636466)에서 뽑은 팔레트 */
:root {
  --sky: #6bb3e3;            /* 로고 하늘색 */
  --sky-50: #f2f8fd; --sky-100: #e4f1fa; --sky-200: #cde5f6; --sky-300: #a9d3f0;
  --brand: #2b7ab3;          /* 글자·버튼용 짙은 하늘색 (흰 글자 대비 4.6:1) */
  --brand-ink: #1d3a52;      /* 하늘색 바탕 위 글자 */
  --on-brand: #ffffff;
  --bg: #f2f8fd; --surface: #ffffff; --ink: #2f353b; --muted: #636466; --icon: #808285; --line: #e3ebf2;
  --brand-soft: #e4f1fa; --me: #b1d9f4; --other: #ffffff; --chatbg: #e6f0f8;
  --danger: #e5484d; --warn: #c27a06; --ok: #1f9d64;
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px;
  --shadow: 0 1px 2px rgba(29, 58, 82, .06);
  --lift: 0 1px 2px rgba(29, 58, 82, .05), 0 12px 28px -16px rgba(29, 58, 82, .22);
  --font: 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1822; --surface: #172330; --ink: #e8eff5; --muted: #a2b0bc; --icon: #8696a5; --line: #263646;
    --brand: #6bb3e3; --on-brand: #0d2535; --brand-soft: #1b3447; --me: #2c6288; --other: #1f2e3d; --chatbg: #0f1a25;
    --sky-50: #121d28; --sky-100: #1b3447; --sky-200: #24455f;
    --shadow: none; --lift: 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#app { height: 100dvh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic.solid { fill: currentColor; }

/* 폼 · 버튼 */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--sky-100);
  transition: border-color .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--icon); }
.btn { border: 0; background: var(--sky-100); color: var(--brand); padding: 11px 18px; border-radius: 14px; font-weight: 700; transition: filter .15s, transform .05s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { filter: brightness(.97); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn.ghost { background: none; color: var(--muted); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; padding: 14px; font-size: 16px; }
.btn:disabled { opacity: .5; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 2px 0 10px; }
.ok-msg { color: var(--ok); font-size: 14px; }

/* 로그인 · 가입 — 회사 로고를 크게, 로고의 물방울 형태를 은은하게 */
.login-wrap { flex: 1; min-height: 100%; overflow-y: auto; display: flex; background: #eaf4fb; }
.login-card { width: 100%; display: flex; flex-direction: column; margin: 0 auto; }
.login-hero { flex: none; position: relative; overflow: hidden; background: #eaf4fb; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(36px + env(safe-area-inset-top)) 24px 68px; text-align: center; }
.login-hero .drop { position: absolute; border-radius: 50%; background: #6bb3e3; pointer-events: none; }
.login-hero .d1 { width: 190px; height: 190px; right: -70px; top: -60px; opacity: .22; }
.login-hero .d2 { width: 74px; height: 74px; left: -22px; bottom: 58px; opacity: .3; }
.login-hero .logo { position: relative; width: min(196px, 50vw); height: auto; display: block; }
.login-hero .tagline { position: relative; margin: 14px 0 0; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: #636466; }
.login-card.compact .login-hero { padding-bottom: 56px; }
.login-card.compact .login-hero .logo { width: min(260px, 70vw); }
.login-sheet { margin-top: -34px; position: relative; flex: 1 0 auto; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 30px 26px calc(26px + env(safe-area-inset-bottom)); }
.login-sheet h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.login-sheet .sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.login-sheet h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.login-sheet .links { display: flex; justify-content: center; gap: 6px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.login-sheet .links button { border: 0; background: none; color: var(--brand); font-weight: 700; padding: 2px 4px; }
.login-sheet .note { font-size: 13px; color: var(--muted); background: var(--sky-100); border-radius: 14px; padding: 11px 14px; margin: 0 0 16px; }
.login-sheet .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.done { text-align: center; padding: 10px 0 4px; }
.done .check { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--sky-100); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.done .check svg { width: 30px; height: 30px; stroke-width: 2.2; }
.login-sheet .ver { text-align: center; font-size: 12px; color: var(--icon); margin: 18px 0 0; }
.diag { margin-top: 10px; padding: 10px 12px; background: var(--sky-100); border-radius: 12px; line-height: 1.7; }
.kv.wide { grid-template-columns: 82px 1fr; gap: 6px 10px; }
.consent-sec { text-align: left; background: var(--sky-50); border-radius: 16px; padding: 14px 14px 12px; margin: 0 0 12px; }
.consent-sec .cs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.consent-sec .kv { font-size: 13.5px; }
.cs-chk, .cs-all { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: 14px; line-height: 1.45; }
.cs-all { margin: 0 0 12px; padding: 12px 14px; background: var(--sky-100); border-radius: 14px; align-items: center; }
.cs-chk input, .cs-all input { width: 20px; height: 20px; flex: none; accent-color: var(--brand); margin: 1px 0 0; }
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--line); border-radius: 28px; transition: background .15s; cursor: pointer; }
.switch .slider::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: .45; cursor: not-allowed; }
.switch input:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 2px; }
.steps { text-align: left; margin: 14px 0 4px; padding-left: 22px; font-size: 14px; color: var(--ink); }
.steps li { margin: 7px 0; }
.gate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.blank-logo { display: block; margin: 0 auto 14px; width: 96px; height: auto; opacity: .9; }
.foot-logo { display: block; margin: 22px auto 0; width: 150px; height: auto; opacity: .85; }
@media (min-width: 700px) {
  .login-wrap { align-items: center; justify-content: center; padding: 28px; background: radial-gradient(1100px 560px at 50% -12%, #cde5f6, #f2f8fd); }
  .login-card { width: 460px; border-radius: 32px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(29, 58, 82, .4); margin: 0; background: #eaf4fb; }
  .login-sheet { flex: none; }
}
@media (min-width: 960px) {
  .login-card { width: min(980px, 100%); flex-direction: row; min-height: 600px; }
  .login-hero, .login-card.compact .login-hero { flex: 1.05; padding: 48px 40px; }
  .login-hero .logo { width: min(300px, 80%); }
  .login-card.compact .login-hero .logo { width: min(340px, 80%); }
  .login-hero .d1 { width: 300px; height: 300px; right: -110px; top: -90px; }
  .login-hero .d2 { width: 110px; height: 110px; left: -36px; bottom: 80px; }
  .login-sheet { margin-top: 0; flex: 1; border-radius: 0; display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; }
}

/* 셸 · 하단 아이콘바 (아이콘만, 투명) */
.shell { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.tab { flex: 1; border: 0; background: none; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--icon); position: relative; border-radius: 14px; }
.tab .ico { display: flex; } .tab .ico.on { display: none; }
.tab.on .ico.on { display: flex; } .tab.on .ico.off { display: none; }
.tab svg.ic { width: 27px; height: 27px; stroke-width: 1.6; }
.tab.on { color: var(--brand); }
.tab .lab { display: none; font-size: 11px; font-weight: 700; letter-spacing: -.01em; }
.admin-mode .tab { height: 54px; } .admin-mode .tab .lab { display: block; } .admin-mode .tab svg.ic { width: 24px; height: 24px; }
.tab .badge { position: absolute; top: 3px; left: calc(50% + 7px); }
.badge { background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.tab .badge { min-width: 16px; height: 16px; font-size: 10px; border: 2px solid var(--surface); box-sizing: content-box; padding: 0 4px; }
.main { flex: 1; min-height: 0; display: flex; position: relative; }
.page { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; padding-top: env(safe-area-inset-top); padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
.admin-mode .page { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.page > header, .page .inner > header { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; }
.page header h2, .list > header h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.03em; flex: 1; }
.hbrand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.hbrand img { width: 30px; height: 30px; flex: none; }
.hbrand small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0; line-height: 1.1; }
.hbrand h2 { flex: none !important; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn:hover { background: var(--sky-100); }
.pad { padding: 8px 16px 24px; }
.card { background: var(--surface); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--lift); }
.card h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -.01em; }
.card p { margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.wrapflex { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.chip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 10px; background: var(--sky-100); color: var(--brand); font-weight: 700; white-space: nowrap; }
.chip.warn { background: #fbefd2; color: #86560a; } .chip.bad { background: #fde1e2; color: #a3212a; } .chip.ok { background: #d9f2e5; color: #14683f; } .chip.gray { background: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) { .chip.warn { background: #4a3a10; color: #f2c566; } .chip.bad { background: #4d2023; color: #f3a1a6; } .chip.ok { background: #14402b; color: #86dbab; } }

/* 아바타 — 로고처럼 둥글고 부드럽게 */
.avatar { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.group { border-radius: 38%; }

/* 채팅 목록 · 대화방 */
.split { flex: 1; min-width: 0; display: flex; min-height: 0; }
.list { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; padding-top: env(safe-area-inset-top); padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
.list > header { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); display: flex; align-items: center; padding: 16px 18px 10px; }
.room { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border: 0; background: none; width: 100%; text-align: left; border-radius: 0; }
.room:hover { background: var(--sky-100); } .room.on { background: var(--sky-100); }
.room .top { display: flex; gap: 8px; align-items: baseline; }
.room .name { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.room .time { font-size: 12px; color: var(--icon); }
.room .last { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.room .bottom { display: flex; gap: 8px; align-items: center; }
.empty { color: var(--muted); text-align: center; padding: 56px 28px; line-height: 1.7; }
.chat { position: absolute; inset: 0; background: var(--chatbg); display: none; flex-direction: column; z-index: 5; }
.split.open .chat { display: flex; }
.chat > header { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.chat > header .t { flex: 1; min-width: 0; margin-left: 4px; }
.chat > header b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.day { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); padding: 3px 14px; border-radius: 12px; margin: 14px 0 8px; }
.sys { align-self: center; font-size: 12.5px; color: var(--muted); margin: 6px 0; text-align: center; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.msg.me { flex-direction: row-reverse; }
.msg .col { display: flex; flex-direction: column; gap: 3px; max-width: min(78%, 560px); }
.msg.me .col { align-items: flex-end; }
.msg .who { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.msg .spacer { width: 38px; flex: none; }
.bwrap { display: flex; align-items: flex-end; gap: 6px; }
.msg.me .bwrap { flex-direction: row-reverse; }
.bubble { background: var(--other); padding: 9px 13px; border-radius: 18px 18px 18px 6px; box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--me); border-radius: 18px 18px 6px 18px; }
.bubble a { color: var(--brand); text-decoration: underline; }
.bubble.media { padding: 4px; }
.bubble img { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: 14px; cursor: zoom-in; background: var(--line); min-width: 80px; min-height: 60px; }
.meta { display: flex; flex-direction: column; font-size: 11px; color: var(--icon); line-height: 1.25; align-items: flex-start; }
.msg.me .meta { align-items: flex-end; }
.meta .un { color: var(--brand); font-weight: 800; }
.fileCard, .locCard { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 4px; border: 0; background: none; text-align: left; width: 100%; }
.fileCard .ico, .locCard .ico { width: 42px; height: 42px; border-radius: 14px; background: var(--sky-100); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.msg.me .fileCard .ico, .msg.me .locCard .ico { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); position: relative; }
.composer textarea { flex: 1; resize: none; max-height: 130px; border: 0; border-radius: 20px; padding: 10px 16px; background: var(--sky-100); line-height: 1.4; }
.composer textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.send { background: var(--brand); color: var(--on-brand); border: 0; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.send:disabled { opacity: .35; }
.pop { position: absolute; bottom: calc(60px + env(safe-area-inset-bottom)); left: 10px; background: var(--surface); border-radius: var(--r-md); box-shadow: 0 12px 36px -8px rgba(29, 58, 82, .35); padding: 6px; z-index: 6; min-width: 180px; }
.pop button { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: none; padding: 11px 12px; border-radius: 12px; text-align: left; font-weight: 600; }
.pop button:hover { background: var(--sky-100); }
.more { align-self: center; border: 0; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--muted); border-radius: 14px; padding: 5px 14px; font-size: 13px; margin: 6px 0; font-weight: 600; }

/* 안 읽은 카드 */
.unread-card { margin: 2px 16px 10px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--lift); padding: 14px 16px 12px; }
.unread-card.none { box-shadow: none; background: var(--sky-100); padding: 12px 16px; }
.unread-card .uc-head { display: flex; align-items: center; gap: 10px; }
.unread-card b { font-size: 15px; letter-spacing: -.01em; }
.uc-rooms { display: flex; gap: 14px; overflow-x: auto; padding: 12px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.uc-rooms::-webkit-scrollbar { display: none; }
.uc-room { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; }
.uc-av { position: relative; display: inline-flex; }
.uc-av .badge { position: absolute; top: -4px; right: -8px; border: 2px solid var(--surface); box-sizing: content-box; }
.uc-name { font-size: 12px; font-weight: 600; max-width: 62px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }

/* 생일 */
.bday-card { margin: 0 16px 8px; background: var(--sky-100); border-radius: var(--r-md); padding: 12px 14px; }
.bday-me { font-weight: 700; color: var(--brand); padding: 2px 2px 10px; }
.bday-head { font-size: 13px; font-weight: 800; color: var(--brand-ink); padding: 2px 2px 6px; letter-spacing: -.01em; }
@media (prefers-color-scheme: dark) { .bday-head { color: var(--ink); } }
.bday-head.soon { margin-top: 8px; font-weight: 700; color: var(--muted); }
.bday-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.chip.bday { background: #fde7d6; color: #9a4a22; }
@media (prefers-color-scheme: dark) { .chip.bday { background: #4a3322; color: #f3c29c; } }

/* 이모티콘 */
.emo-pop { position: absolute; left: 0; right: 0; bottom: 100%; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -12px rgba(29, 58, 82, .28); z-index: 6; display: flex; flex-direction: column; max-height: 300px; }
.emo-tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); }
.emo-tabs button { flex: 1; border: 0; background: none; font-size: 21px; padding: 6px 0 8px; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; line-height: 1.2; }
.emo-tabs button.on { border-bottom-color: var(--brand); background: var(--sky-100); }
.emo-hint:empty { display: none; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; overflow-y: auto; }
.emo-grid.big { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.emo-btn { border: 0; background: none; font-size: 26px; line-height: 1; padding: 7px 0; border-radius: 10px; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.emo-grid.big .emo-btn { font-size: 42px; padding: 12px 0; background: var(--sky-50); }
.emo-btn:hover, .emo-btn:active { background: var(--sky-100); }
@media (min-width: 900px) { .emo-grid { grid-template-columns: repeat(12, 1fr); } .emo-grid.big { grid-template-columns: repeat(8, 1fr); } }
.bubble.emo { background: transparent !important; box-shadow: none; padding: 0 2px; font-size: 48px; line-height: 1.25; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; white-space: nowrap; }

/* 목록형 */
.person { display: flex; gap: 14px; align-items: center; padding: 10px 18px; border: 0; background: none; width: 100%; text-align: left; }
.person:hover { background: var(--sky-100); }
.me-card { display: flex; gap: 14px; align-items: center; padding: 6px 18px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.me-card b { font-size: 17px; letter-spacing: -.02em; }
.sect { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 10px 18px 4px; }
.search { margin: 4px 18px 10px; position: relative; }
.search input { width: 100%; padding: 11px 16px; border-radius: 16px; border: 0; background: var(--sky-100); }
.search input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--sky-100); border-radius: 16px; margin: 0 16px 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 12px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
pre { background: var(--sky-100); border-radius: 14px; padding: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* 지도 · 운행 */
.map { height: 360px; border-radius: var(--r-md); overflow: hidden; z-index: 0; box-shadow: var(--lift); }
.map.tall { height: min(62dvh, 560px); }
.pin { display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -100%); }
.pin .lab { background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; box-shadow: 0 2px 8px rgba(29, 58, 82, .3); }
.pin .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(29, 58, 82, .5); margin-top: 3px; }
.pin.move .dot { background: var(--ok); } .pin.stale .dot { background: #98a4ae; } .pin.sel .lab { background: var(--brand); color: #fff; }
.pin.stay .dot { background: var(--warn); }
.drive { text-align: center; padding: 18px 16px 8px; }
.ring { width: 172px; height: 172px; border-radius: 50%; margin: 6px auto 16px; border: 9px solid var(--sky-200); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 21px; color: var(--muted); letter-spacing: -.02em; }
.ring.on { border-color: var(--sky); color: var(--brand); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--sky) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { .ring.on { animation: none; } }
.dimmer { position: fixed; inset: 0; background: #000; z-index: 60; display: flex; align-items: center; justify-content: center; color: #555; text-align: center; padding: 20px; }
.lrow { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); width: 100%; border-left: 0; border-right: 0; border-top: 0; background: none; text-align: left; border-radius: 0; }
.lrow:last-child { border-bottom: 0; }
button.lrow:hover { background: var(--sky-100); }
.lrow.sel { background: var(--sky-100); }

/* 관리자 */
.admin-mode .page .inner { width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--lift); border: 0; text-align: left; }
.kpi .n { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .kpi .n { color: var(--ink); } }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.kpi.warn .n { color: var(--warn); } .kpi.bad .n { color: var(--danger); } .kpi.ok .n { color: var(--ok); }
button.kpi { cursor: pointer; }
.live { display: grid; grid-template-columns: 1fr; gap: 14px; }
.live .mapcol { order: 1; min-width: 0; } .live .side { order: 2; }
.live .side { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--lift); padding: 8px 12px; max-height: 420px; overflow-y: auto; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 0; border-radius: 12px; background: var(--sky-100); min-width: 0; }
.toolbar input[type=search] { flex: 1; min-width: 140px; }
.live-badge { font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 12px; background: #d9f2e5; color: #14683f; animation: livepulse 1.8s ease-in-out infinite; }
.live-badge.slow { background: var(--sky-100); color: var(--brand); animation: none; }
.live-badge.bad { background: #fde1e2; color: #a3212a; animation: none; }
@keyframes livepulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .live-badge { animation: none; } }
.stat { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin: 8px 2px 12px; }
.stat b { color: var(--ink); font-size: 16px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* 모달 · 토스트 */
.wrap { position: fixed; inset: 0; background: rgba(20, 40, 58, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal { background: var(--surface); width: min(540px, 100%); max-height: 92dvh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.modal h3 { margin: 0 0 14px; font-size: 19px; letter-spacing: -.02em; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); background: var(--brand-ink); color: #fff; padding: 11px 18px; border-radius: 16px; z-index: 80; max-width: min(92vw, 420px); box-shadow: 0 10px 30px rgba(29, 58, 82, .35); font-size: 14px; }
.toast b { display: block; font-size: 13px; opacity: .8; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 70; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 92dvh; }

/* 데스크톱 */
@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .tabbar { position: static; flex-direction: column; width: 78px; padding: 18px 0 0; gap: 4px; align-items: stretch; border-top: 0; border-right: 1px solid var(--line); justify-content: flex-start; }
  .tab { flex: none; height: 56px; margin: 0 8px; }
  .tab .badge { left: calc(50% + 8px); top: 6px; }
  .page, .list { padding-bottom: 0 !important; }
  .list { flex: none; width: 360px; border-right: 1px solid var(--line); }
  .chat { position: static; display: flex; flex: 1; z-index: 0; }
  .chat.blank { align-items: center; justify-content: center; color: var(--muted); }
  .chat > header .back { display: none; }
  .wrap { align-items: center; }
  .modal { border-radius: 28px; }
  .page .inner { width: min(760px, 100%); margin: 0 auto; }
  .admin-mode .page .inner { width: min(1180px, 100%); padding: 0 12px; }
  .live { grid-template-columns: 340px 1fr; align-items: start; }
  .live .side { order: 1; } .live .mapcol { order: 2; }
  .live .side { max-height: min(62dvh, 560px); }
}
