/* =====================================================================
   WELV 영업 웹앱 — 삼성웰스토리 홈페이지 디자인 기준
   색: 주황 #FF5624(강조) · 짙은 회색 #424342 · 회색 #767575 · 따뜻한 회색 #C0BDB9 · 배경 #F5F5F5
   형태: 작은 모서리(8px) + 한쪽만 크게 둥근 '잎 모서리', 알약형 버튼, 2px 주황 밑줄
   ===================================================================== */
:root {
  --orange: #FF5624; --orange-2: #F36941; --orange-dk: #E2481A;
  --tint: #FFF4EF; --tint-line: #FFD9CB;
  --ink: #222222; --char: #424342; --gray: #767575; --gray-2: #9E9C9B; --warm: #C0BDB9;
  --line: #E6E3E0; --bg: #F5F5F5; --surface: #FFFFFF; --soft: #F0EFEE;
  --teal: #23A0B1; --teal-tint: #E6F5F7; --danger: #D93A2B;
  --text: var(--ink); --muted: var(--gray);
  --leaf: 26px; --r: 8px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EDEBE9; --char: #D9D6D3; --gray: #A5A3A1; --gray-2: #8C8A88; --warm: #6E6B68;
    --line: #333231; --bg: #161616; --surface: #222222; --soft: #2C2B2A;
    --tint: #3A2620; --tint-line: #5A3427; --teal-tint: #173438;
  }
}
:root[data-theme="dark"] {
  --ink: #EDEBE9; --char: #D9D6D3; --gray: #A5A3A1; --gray-2: #8C8A88; --warm: #6E6B68;
  --line: #333231; --bg: #161616; --surface: #222222; --soft: #2C2B2A;
  --tint: #3A2620; --tint-line: #5A3427; --teal-tint: #173438;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  word-break: keep-all; overflow-wrap: anywhere; letter-spacing: -0.2px;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
#app { height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; background: var(--bg); position: relative; }

/* ---------- 상단 ---------- */
.top { background: var(--surface); color: var(--ink); padding: calc(10px + var(--safe-t)) 16px 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); position: relative; }
.top::after { content: ""; position: absolute; left: 16px; bottom: -1px; width: 28px; height: 2px; background: var(--orange); }
.top .logo { width: 32px; height: 32px; border-radius: var(--r); }
.theme-saide .top .logo { border-radius: 50%; }
.top h1 { font-size: 18px; margin: 0; font-weight: 700; flex: 1; letter-spacing: -0.4px; color: var(--ink); }
.top .sub { font-size: 12px; font-weight: 500; display: block; color: var(--gray); letter-spacing: -0.1px; }
.theme-saide .top .sub { color: var(--orange); font-weight: 600; }
.top .act { white-space: nowrap; background: var(--soft); border: 0; border-radius: var(--r); padding: 7px 9px; color: var(--char); display: inline-flex; align-items: center; }
.top .act svg { width: 20px; height: 20px; }
.flagbtn { background: var(--soft); border: 0; border-radius: var(--r); padding: 7px 9px; display: grid; place-items: center; }

/* ---------- 본문 ---------- */
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.scroll.withfab { padding-bottom: 84px; }

/* ---------- 대화 ---------- */
.msg { display: flex; margin: 6px 0; }
.msg.in { justify-content: flex-end; }
.bubble { max-width: 84%; padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; font-size: 14.5px; }
.msg.in .bubble { background: var(--orange); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg.out .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; color: var(--ink); }
.msg.out .obody { max-width: 84%; display: flex; flex-direction: column; }
.msg.out .obody .bubble { max-width: none; }
.qr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.qr button { border: 1.5px solid var(--orange); color: var(--orange); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.qr button.soft { border-color: var(--line); color: var(--gray); font-weight: 500; }
.qr button:active { background: var(--soft); }
.qr button:disabled { opacity: .45; cursor: default; }
.qr button.picked { background: var(--orange); color: #fff; opacity: 1; }
.msg .time { font-size: 11px; color: var(--gray-2); align-self: flex-end; margin: 0 6px; white-space: nowrap; }
.bubble a { color: inherit; text-decoration: underline; }
.day { text-align: center; margin: 16px 0 8px; font-size: 12px; color: var(--gray-2); font-weight: 500; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.empty { text-align: center; color: var(--gray); padding: 44px 12px; font-size: 14px; }
.empty svg { width: 52px; height: 52px; color: var(--warm); display: block; margin: 0 auto 12px; }
.more { display: block; margin: 0 auto 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 35px; padding: 5px 14px; font-size: 13px; color: var(--gray); }

/* ---------- 입력창 ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips[hidden] { display: none; }
.chip { flex: none; background: var(--surface); color: var(--char); border: 1px solid var(--warm); border-radius: 35px; padding: 6px 13px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.chip svg { width: 15px; height: 15px; color: var(--orange); }
.chip:active { border-color: var(--orange); color: var(--orange); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--warm); background: var(--surface); border-radius: 22px; padding: 9px 15px; max-height: 140px; min-height: 42px; outline: none; font-size: 15px; }
.composer textarea:focus { border-color: var(--orange); caret-color: var(--orange); }
.composer textarea::placeholder { color: var(--gray-2); }
.icon-btn { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--char); display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.send { background: var(--orange); border-color: var(--orange); color: #fff; }
.icon-btn:disabled { opacity: .45; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; background: var(--surface); }
.attach-list:empty { display: none; }
.att { background: var(--soft); border-radius: var(--r); padding: 4px 6px 4px 10px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.att svg { width: 16px; height: 16px; color: var(--orange); }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.att button { border: 0; background: none; padding: 0 4px; color: var(--gray); font-size: 16px; line-height: 1; }
.progress { height: 3px; background: var(--orange); width: 0; transition: width .2s; }

/* ---------- 탭(알약형) · 카드 ---------- */
.seg { display: flex; gap: 6px; margin: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; border: 1px solid var(--warm); background: var(--surface); padding: 7px 14px; border-radius: 35px; font-size: 13.5px; font-weight: 600; color: var(--gray); }
.seg button.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.ficon { width: 42px; height: 42px; border-radius: var(--r) var(--r) 18px var(--r); display: grid; place-items: center; flex: none; color: #fff; }
.ficon svg { width: 22px; height: 22px; }
.fthumb { width: 42px; height: 42px; border-radius: var(--r) var(--r) 18px var(--r); object-fit: cover; flex: none; cursor: zoom-in; background: var(--soft); }
.grow { flex: 1; min-width: 0; }
.title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.meta { font-size: 12px; color: var(--gray); }
.dl { border: 1px solid var(--line); background: var(--surface); color: var(--char); border-radius: var(--r); padding: 7px 9px; display: inline-flex; align-items: center; text-decoration: none; }
.dl svg { width: 20px; height: 20px; }
.dl:active { border-color: var(--orange); color: var(--orange); }
button.dl { cursor: pointer; }
.card .dl + .dl { margin-left: 6px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.tag.zalo, .tag.bot { background: var(--soft); color: var(--char); }
.tag.web, .tag.saide { background: var(--tint); color: var(--orange); }
.tag.file { background: var(--teal-tint); color: var(--teal); }
.note { white-space: pre-wrap; font-size: 14px; margin-top: 6px; color: var(--ink); }
.note.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.link { background: none; border: 0; color: var(--orange); font-size: 13px; padding: 4px 0 0; font-weight: 600; }

/* ---------- 하단 탭 ---------- */
.tabs { display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs button { flex: 1; border: 0; background: none; padding: 9px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--gray-2); position: relative; font-weight: 600; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button.on { color: var(--orange); }
.tabs button.on::before { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--orange); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--orange); color: #fff; font-size: 10.5px; min-width: 17px; height: 17px; border-radius: 9px; padding: 0 5px; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--surface); box-sizing: content-box; }

/* ---------- 언어 선택 · 로그인 ---------- */
.flag { width: 30px; height: 20px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; display: block; }
.langpick { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; gap: 6px; text-align: center; background: var(--surface); }
.lp-logo { width: 84px; height: 84px; border-radius: 22px; }
.langpick h2 { margin: 14px 0 0; font-size: 26px; letter-spacing: 1px; font-weight: 800; color: var(--ink); }
.langpick p { margin: 0 0 20px; color: var(--gray); font-size: 13.5px; line-height: 1.6; }
.lp-list { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; }
.lp-list button { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--warm); border-radius: var(--r) var(--r) var(--leaf) var(--r); padding: 14px 18px; font-size: 17px; font-weight: 600; text-align: left; color: var(--ink); transition: border-color .15s, background .15s; }
.lp-list button span { flex: 1; }
.lp-list button > svg:last-child { width: 22px; height: 22px; color: var(--orange); opacity: 0; }
.lp-list button.on, .lp-list button:active { border-color: var(--orange); background: var(--tint); }
.lp-list button.on > svg:last-child { opacity: 1; }
/* 개인정보 동의 (2026-11-02, 버튼 동의로 일원화·작은 글씨·하단 배치) */
.langpick { overflow-y: auto; justify-content: flex-start; padding-top: 28px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.consent { width: 100%; max-width: 360px; margin-top: auto; padding-top: 18px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.consent h3 { margin: 0; font-size: 12px; font-weight: 700; color: var(--char); }
.consent .cbody { margin: 0; font-size: 10.5px; line-height: 1.45; color: var(--gray); display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; }
.consent .cbody dt { font-weight: 700; color: var(--char); white-space: nowrap; }
.consent .cbody dd { margin: 0; }
.consent .cnote { margin: 2px 0 6px; font-size: 10.5px; color: var(--gray); }
.cgo { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: var(--r) var(--r) var(--leaf) var(--r); padding: 15px 18px; font-size: 17px; font-weight: 700; color: #fff; background: var(--orange); }
.cgo svg { width: 20px; height: 20px; }
.cgo:active { filter: brightness(.92); }
.lp-flag { width: 54px; height: 36px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.login { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px; gap: 14px; background: var(--surface); }
.login .hero { text-align: center; margin-bottom: 10px; }
.login .hero img { width: 76px; height: 76px; border-radius: 20px; }
.login h2 { margin: 14px 0 4px; font-size: 22px; font-weight: 700; color: var(--ink); }
.login p { margin: 0; color: var(--gray); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--char); }
.field input { border: 0; border-bottom: 1px solid var(--warm); background: transparent; border-radius: 0; padding: 12px 2px; font-size: 17px; outline: none; }
.field input:focus { border-bottom: 2px solid var(--orange); caret-color: var(--orange); }
.code { letter-spacing: 10px; text-align: center; font-size: 26px !important; font-weight: 700; }
.btn { border: 0; background: var(--orange); color: #fff; border-radius: 35px; padding: 15px; font-size: 16px; font-weight: 700; }
.btn:active { background: var(--orange-dk); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }  /* 2026-10-26: 아이콘 크기 고정 (제안서 요청 버튼이 화면을 덮던 문제) */
.btn:disabled { opacity: .45; }
.btn.ghost { background: none; color: var(--gray); font-weight: 600; padding: 8px; font-size: 14px; }
.err { color: var(--danger); font-size: 13.5px; min-height: 20px; text-align: center; white-space: pre-wrap; }
.steps { display: flex; gap: 10px; justify-content: center; color: var(--gray); font-size: 12.5px; }
.steps span { display: inline-flex; align-items: center; gap: 4px; }
.steps svg { width: 16px; height: 16px; color: var(--orange); }
.lang-row { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.lang-row button { padding: 5px; border-radius: 6px; border: 2px solid transparent; background: none; }
.lang-row button.on { border-color: var(--orange); }
.lang-row .flag { width: 36px; height: 24px; }
.langmenu { position: fixed; top: calc(58px + var(--safe-t)); right: max(12px, calc(50vw - 348px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) var(--leaf) var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; z-index: 40; min-width: 210px; }
.langmenu button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 12px; border-radius: 6px; font-size: 15px; text-align: left; color: var(--ink); }
.langmenu button.on { background: var(--tint); color: var(--orange); font-weight: 700; }

/* ---------- 시트 · 알림 ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet { background: var(--bg); width: 100%; max-width: 720px; max-height: 86dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; padding-bottom: var(--safe-b); overflow: hidden; }
.sheet header { display: flex; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--line); gap: 8px; background: var(--surface); }
.sheet header h3 { margin: 0; font-size: 16px; flex: 1; font-weight: 700; }
.sheet header select, .sheet header button { border: 1px solid var(--warm); background: var(--surface); border-radius: 35px; padding: 5px 11px; font-size: 13px; }
.sheet header .sx { border: 0; background: none; font-size: 18px; color: var(--gray); }
.sheet-body { overflow-y: auto; padding: 18px 16px; }
.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%); background: rgba(34,34,34,.94); color: #fff; padding: 9px 18px; border-radius: 35px; font-size: 13.5px; z-index: 60; max-width: 90%; text-align: center; }

/* ---------- Saide ---------- */
.upill { display: flex; align-items: center; gap: 6px; background: var(--tint); color: var(--char); border-radius: 35px; padding: 5px 11px; font-size: 12px; white-space: nowrap; }
.upill b { color: var(--orange); font-size: 13px; }
.upill i { width: 34px; height: 4px; border-radius: 2px; background: var(--tint-line); position: relative; overflow: hidden; }
.upill i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--orange); }
.upill em { font-style: normal; color: var(--gray); }
.welcome { text-align: center; padding: 20px 4px 10px; }
.welcome .wav { width: 64px; height: 64px; border-radius: 50%; }
.welcome h2 { font-size: 21px; margin: 14px 0 4px; letter-spacing: -0.5px; font-weight: 700; color: var(--ink); }
.welcome p { margin: 0 0 20px; color: var(--gray); font-size: 14px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) var(--leaf) var(--r); padding: 15px 13px; display: flex; flex-direction: column; gap: 4px; min-height: 122px; transition: background .25s, border-color .25s, color .25s; color: var(--ink); }
.qcard .qi { width: 38px; height: 38px; border-radius: var(--r) var(--r) 16px var(--r); background: var(--tint); color: var(--orange); display: grid; place-items: center; margin-bottom: 6px; transition: background .25s, color .25s; }
.qcard .qi svg { width: 22px; height: 22px; }
.qcard b { font-size: 15px; }
.qcard small { color: var(--gray); font-size: 12.5px; line-height: 1.4; }
.qcard:active { background: var(--orange); border-color: var(--orange); color: #fff; }
.qcard:active small { color: rgba(255,255,255,.85); }
.qcard:active .qi { background: rgba(255,255,255,.2); color: #fff; }
.welcome .grade { margin-top: 16px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gray); }
.welcome .grade svg { width: 14px; height: 14px; color: var(--orange); }
.msg.s { align-items: flex-start; gap: 8px; }
.msg.s .av { width: 30px; height: 30px; border-radius: 50%; flex: none; margin-top: 2px; }
.msg.s .sbody { max-width: 84%; min-width: 0; }
.msg.s .bubble { max-width: 100%; white-space: normal; line-height: 1.6; }
.msg.s .bubble .h { font-weight: 700; color: var(--char); margin-top: 10px; display: flex; gap: 7px; }
.msg.s .bubble .h:first-child { margin-top: 0; }
.msg.s .bubble .h::before { content: ""; width: 8px; height: 8px; background: var(--orange); border-radius: 0 0 6px 0; flex: none; margin-top: 7px; }
.msg.s .bubble .b1 { padding-left: 14px; position: relative; }
.msg.s .bubble .b1::before { content: ""; position: absolute; left: 3px; top: .75em; width: 5px; height: 2px; background: var(--orange-2); }
.msg.s .bubble .b2 { padding-left: 26px; position: relative; color: var(--gray); font-size: 13.5px; }
.msg.s .bubble .b2::before { content: ""; position: absolute; left: 16px; top: .7em; width: 4px; height: 4px; background: var(--warm); border-radius: 50%; }
.msg.s .bubble .gap { height: 6px; }
.sfoot { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.sfoot .time { margin-left: 4px; }
.cp { border: 0; background: none; color: var(--warm); padding: 3px; display: grid; place-items: center; border-radius: 4px; }
.cp svg { width: 15px; height: 15px; }
.cp:active { color: var(--orange); }
.bubble.think { display: inline-flex; align-items: center; gap: 8px; color: var(--gray); font-size: 13.5px; white-space: nowrap; }

/* ---------- 첨부 ---------- */
.attmenu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.attmenu button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.attmenu .ai { width: 60px; height: 60px; border-radius: 12px 12px var(--leaf) 12px; display: grid; place-items: center; color: #fff; }
.attmenu .ai svg { width: 28px; height: 28px; }
.ai-camera { background: var(--orange); } .ai-video { background: #424342; } .ai-gallery { background: var(--orange-2); } .ai-file { background: var(--gray); }
.hint { text-align: center; color: var(--gray); font-size: 12.5px; margin: 16px 0 0; }
.thumb { position: relative; width: 74px; height: 74px; border-radius: var(--r) var(--r) 20px var(--r); overflow: hidden; background: var(--soft); flex: none; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 20px; text-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.thumb .tfile { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; color: var(--orange); }
.thumb .tfile svg { width: 24px; height: 24px; }
.thumb .tfile small { font-size: 10px; color: var(--gray); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb > button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(34,34,34,.6); color: #fff; font-size: 14px; line-height: 1; padding: 0; }
.tprog { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,.25); }
.tprog i { display: block; height: 100%; background: var(--orange); transition: width .2s; }
.inbody { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 84%; }
.inbody .bubble { max-width: 100%; }
.mgrid { display: grid; gap: 3px; border-radius: 12px 12px 4px 12px; overflow: hidden; width: 240px; max-width: 100%; }
.mgrid.n2 { grid-template-columns: 1fr 1fr; } .mgrid.n3 { grid-template-columns: 1fr 1fr 1fr; }
.mgrid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: zoom-in; background: var(--soft); }
.mgrid.n1 img { aspect-ratio: auto; max-height: 280px; width: 100%; }
.mgrid video { width: 100%; max-height: 280px; background: #000; display: block; grid-column: 1 / -1; }
.mfile { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); padding: 8px 10px; color: var(--ink); text-decoration: none; grid-column: 1 / -1; font-size: 13px; }
.mfile svg { width: 20px; height: 20px; color: var(--orange); flex: none; }
.mfile span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mfile small { color: var(--gray); }
.card .mgrid { margin-top: 8px; border-radius: var(--r); }
.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 50; display: grid; place-items: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .vbar { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; display: flex; gap: 8px; }
.viewer .vbar a, .viewer .vbar button { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; border: 0; display: grid; place-items: center; font-size: 18px; }
.viewer .vbar svg { width: 22px; height: 22px; }

/* ---------- 파일함 · 자료실 · 보내기 ---------- */
.fab { position: absolute; right: 16px; bottom: calc(78px + var(--safe-b)); background: var(--orange); color: #fff; border: 0; border-radius: 35px; padding: 13px 20px; display: flex; align-items: center; gap: 8px; font-weight: 700; box-shadow: 0 6px 18px rgba(255,86,36,.35); z-index: 5; }
.fab svg { width: 20px; height: 20px; }
.libgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.libf { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) var(--leaf) var(--r); padding: 15px 13px; text-align: left; display: flex; flex-direction: column; gap: 3px; color: var(--ink); transition: background .25s, border-color .25s; }
.libf .lfi { width: 36px; height: 36px; border-radius: var(--r) var(--r) 14px var(--r); background: var(--tint); color: var(--orange); display: grid; place-items: center; margin-bottom: 6px; }
.libf .lfi svg { width: 20px; height: 20px; }
.libf b { font-size: 14.5px; } .libf small { color: var(--gray); font-size: 12px; }
.libf:active { background: var(--orange); border-color: var(--orange); color: #fff; }
.libf:active small { color: rgba(255,255,255,.85); }
.libup { border: 0; background: none; color: var(--orange); font-weight: 700; padding: 0 0 6px; font-size: 14px; }
.crumb { font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.libdir { cursor: pointer; } .chev { color: var(--warm); font-size: 22px; }
.doctext { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; line-height: 1.65; margin: 0; color: var(--ink); }
.sendf { display: flex; flex-direction: column; gap: 14px; }
.btn.ghostline { background: var(--surface); color: var(--orange); border: 1.5px dashed var(--orange); border-radius: var(--r) var(--r) var(--leaf) var(--r); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.btn.ghostline svg { width: 20px; height: 20px; }
.sendf .attach-list { padding: 0; background: none; }
.sflabel { display: flex; justify-content: space-between; align-items: center; font-size: 14px; border-bottom: 1px solid var(--warm); padding-bottom: 8px; }
.sflabel label { color: var(--gray); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.sfstaff { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 36dvh; overflow-y: auto; }
.sfstaff label { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 10px; font-size: 14px; }
.sfstaff label:has(input:checked) { border-color: var(--orange); background: var(--tint); }
.sfstaff label small { color: var(--gray); font-size: 11px; margin-left: auto; }
.sfstaff input, .sflabel input { width: 18px; height: 18px; accent-color: var(--orange); }
.sendf textarea { border: 1px solid var(--warm); border-radius: var(--r); padding: 10px 12px; resize: none; background: var(--surface); outline: none; }
.sendf textarea:focus { border-color: var(--orange); }

/* ---------- 사전손익 간편 계산기 ---------- */
.pnl { padding: 0 12px 30px; }
.pkpi { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; padding: 10px 0 10px; background: var(--bg); }
.pkpi > div { border-radius: var(--r) var(--r) 22px var(--r); padding: 11px 13px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pkpi small { font-size: 11.5px; font-weight: 600; opacity: .9; line-height: 1.3; }
.pkpi b { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkpi b em { font-style: normal; font-size: 12.5px; font-weight: 600; margin-left: 4px; letter-spacing: 0; }
.pkpi span { font-size: 12px; }
.pkpi strong { font-size: 15px; }
.k1 { background: var(--orange); color: #fff; }
.k2 { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.psec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) var(--leaf) var(--r); margin-bottom: 10px; overflow: hidden; }
.psec > header { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.psec > header .pn { width: 24px; height: 24px; border-radius: 6px 6px 12px 6px; background: var(--orange); color: #fff; font-size: 12.5px; font-weight: 800; display: grid; place-items: center; flex: none; }
.psec.star > header .pn, .psec.detail > header .pn { background: var(--char); }
.psec > header b { font-size: 15px; color: var(--ink); }
.psec > header small { margin-left: auto; font-size: 11.5px; color: var(--gray); text-align: right; }
.pb { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pi { border: 0; border-bottom: 1px solid var(--warm); background: transparent; padding: 7px 4px; font-size: 15px; text-align: right; outline: none; min-width: 0; width: 100%; border-radius: 0; color: var(--ink); caret-color: var(--orange); font-variant-numeric: tabular-nums; }
.pi:focus { border-bottom: 2px solid var(--orange); }
.pcombo { position: relative; }
.pdrop { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--card, #fff); border: 1px solid var(--warm); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; margin-top: 4px; }
.pdrop button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--soft); background: transparent; color: var(--ink); font-size: 14px; cursor: pointer; }
.pdrop button:last-child { border-bottom: 0; }
.pdrop button:hover, .pdrop button:focus { background: var(--soft); }
.pdrop button small { color: var(--gray); font-size: 12px; }
.pdrop .pnew { flex-direction: row; align-items: center; gap: 6px; color: var(--orange); font-weight: 600; }
.pdrop .pnew svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.pnotice { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gray); min-height: 0; margin-top: 6px; }
.pnotice:empty { display: none; }
.psync { display: block; text-align: right; color: var(--gray); font-size: 11px; min-height: 14px; margin-top: 2px; }
.pnotice button { border: 1px solid var(--orange); color: var(--orange); background: transparent; border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.pi:disabled { color: var(--gray); background: var(--soft); border-bottom-style: dashed; }
.pi.wide { font-size: 16px; font-weight: 600; }
.pi.sm { width: 54px; text-align: center; }
.pb select { border: 0; border-bottom: 1px solid var(--warm); background: transparent; padding: 7px 2px; font-size: 15px; color: var(--ink); outline: none; border-radius: 0; }
.pb select.wide { width: 100%; font-weight: 600; }
.two2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two2 label { display: flex; flex-direction: column; gap: 2px; }
.two2 small { font-size: 12px; color: var(--gray); font-weight: 600; }
.pgrid { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 6px 10px; align-items: center; }
.pgrid > em, .mgrid4 > em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--char); text-align: right; padding-right: 4px; }
.pgrid > span, .mgrid4 > span { font-size: 12.5px; color: var(--gray); font-weight: 600; }
.psub { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.rowx { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rowx > span, .rowx > b { font-size: 13.5px; color: var(--char); flex: none; }
.rowx .u { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: flex-end; min-width: 0; }
.rowx .u .pi.num { max-width: 150px; }
.rowx .u em { font-style: normal; font-size: 12px; color: var(--gray); white-space: nowrap; }
.rowx .u em i { font-style: normal; }
.note { margin: 0; font-size: 12px; color: var(--gray); }
.note.center { text-align: center; padding: 8px 0; }
.dayb { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.dayb + .dayb { margin-top: 2px; }
.dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dh b { font-size: 13.5px; color: var(--ink); margin-right: auto; }
.dp { font-size: 12px; color: var(--gray); display: inline-flex; align-items: center; gap: 4px; }
.same { font-size: 12px; color: var(--gray); display: inline-flex; align-items: center; gap: 4px; }
.same input { accent-color: var(--orange); width: 16px; height: 16px; }
.mgrid4 { display: grid; grid-template-columns: 62px repeat(4, 1fr); gap: 6px 6px; align-items: center; }
.mgrid4 .pi { font-size: 14px; padding: 6px 2px; }
.staff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.srow { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.srow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srow b { font-size: 13px; color: var(--ink); }
.srow small { font-size: 11.5px; color: var(--gray); }
.srow .pi.w { font-size: 13px; padding: 4px 2px; text-align: left; }
.srow select { border: 1px solid var(--warm) !important; border-radius: 6px !important; padding: 5px 6px !important; font-size: 14px !important; width: 58px; text-align: center; }
.srow.ssum { background: var(--tint); border-color: var(--tint-line); }
.srow.ssum > div { flex-direction: column; }
.srow.ssum b { color: var(--orange); font-size: 15px; }
.lsum { display: flex; justify-content: space-between; align-items: center; background: var(--soft); border-radius: var(--r); padding: 9px 12px; font-size: 13px; color: var(--char); }
.lsum b { color: var(--ink); font-size: 15px; }
.vtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.vtabs::-webkit-scrollbar { display: none; }
.vtabs button { flex: none; border: 1px solid var(--warm); background: var(--surface); border-radius: 35px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--gray); }
.vtabs button.on { background: var(--char); border-color: var(--char); color: #fff; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ptable td { padding: 8px 2px; border-bottom: 1px solid var(--line); }
.ptable td:nth-child(2) { text-align: right; color: var(--gray); font-size: 12.5px; width: 64px; }
.ptable td:nth-child(3) { text-align: right; font-weight: 600; width: 96px; }
.ptable tr.minor td { font-size: 12.5px; color: var(--gray); padding-top: 4px; padding-bottom: 4px; }
.ptable tr.minor td:first-child { padding-left: 10px; }
.ptable tr.mid td { font-weight: 700; color: var(--char); background: var(--soft); }
.ptable tr.total td { font-weight: 800; color: var(--orange); font-size: 15.5px; border-bottom: 0; border-top: 2px solid var(--orange); }
.ptable tr.neg td:nth-child(3) { color: var(--danger); }
.pbtns { display: flex; gap: 8px; }
.pbtns .btn { flex: 1; padding: 13px; font-size: 15px; }
.pbtns.right { justify-content: flex-end; }
.pbtns .btn.sm { flex: 1 1 100%; width: 100%; min-width: 0; min-height: 44px; padding: 11px 16px; font-size: 14.5px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; writing-mode: horizontal-tb; }  /* 2026-10-26: 가로로 긴 한 줄 버튼, 글자 전부 표시 */
.pbtns .btn.sm svg { width: 15px; height: 15px; }
.psave { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding: 9px 0; }
.psave > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.psave b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psave .nat { font-size: 10.5px; background: var(--soft); color: var(--char); border-radius: 4px; padding: 1px 5px; margin-right: 6px; vertical-align: 1px; }
.psave small { font-size: 11.5px; color: var(--gray); }
.psave small strong { color: var(--orange); }
.psave button { border: 1px solid var(--warm); background: var(--surface); border-radius: 35px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--char); }
.psave button.del { color: var(--gray); }
body.capturing .pkpi { position: static; }
.seg2 { display: inline-flex; border: 1px solid var(--warm); border-radius: 35px; padding: 2px; flex: none; }
.seg2 button { border: 0; background: none; border-radius: 35px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; color: var(--gray); white-space: nowrap; }
.seg2 button.on { background: var(--orange); color: #fff; }

/* ---------- 알림 지우기 ---------- */
.ibar { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 16px 0; }
.ibar button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--warm); background: var(--surface); color: var(--char); border-radius: 35px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.ibar button svg { width: 15px; height: 15px; color: var(--orange); }
.ibar button:active { border-color: var(--orange); color: var(--orange); }
.icard .meta { display: flex; align-items: center; }
.ix { margin-left: auto; border: 0; background: none; color: var(--warm); padding: 2px; border-radius: 4px; display: grid; place-items: center; }
.ix svg { width: 18px; height: 18px; }
.ix:active { color: var(--orange); background: var(--tint); }
.cq { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--ink); text-align: center; }

/* ---------- 홈 · 떠 있는 뒤로/홈 버튼 ---------- */
.home { padding: 18px 16px 24px; }
.hhello { display: flex; align-items: center; gap: 12px; margin: 4px 2px 18px; }
.hhello img { width: 48px; height: 48px; border-radius: 50%; }
.hhello b { display: block; font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -0.4px; }
.hhello small { font-size: 13px; color: var(--gray); }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) var(--leaf) var(--r); padding: 16px 14px 18px; text-align: left; display: flex; flex-direction: column; gap: 3px; min-height: 128px; color: var(--ink); transition: background .2s, border-color .2s; }
.hcard.wide { grid-column: 1 / -1; min-height: 110px; background: var(--orange); border-color: var(--orange); color: #fff; }
.hcard .hi { width: 42px; height: 42px; border-radius: var(--r) var(--r) 18px var(--r); background: var(--tint); color: var(--orange); display: grid; place-items: center; margin-bottom: 8px; }
.hcard.wide .hi { background: rgba(255,255,255,.2); color: #fff; }
.hcard .hi svg { width: 24px; height: 24px; }
.hcard b { font-size: 16px; font-weight: 700; }
.hcard small { font-size: 12.5px; color: var(--gray); line-height: 1.4; }
.hcard.wide small { color: rgba(255,255,255,.88); }
.hcard .hb { position: absolute; top: 12px; right: 12px; font-style: normal; background: var(--orange); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 35px; padding: 2px 9px; }
.hcard.wide .hb { background: #fff; color: var(--orange); }
.hcard:active { border-color: var(--orange); background: var(--tint); }
.hcard.wide:active { background: var(--orange-dk); }
.navf { position: absolute; left: 12px; bottom: calc(70px + var(--safe-b)); z-index: 15; display: flex; align-items: center; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 35px; box-shadow: 0 6px 18px rgba(0,0,0,.14); padding: 3px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.navf button { width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; color: var(--char); display: grid; place-items: center; }
.navf button svg { width: 22px; height: 22px; }
.navf button:active { background: var(--tint); color: var(--orange); }
.navf span { width: 1px; height: 20px; background: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .navf { background: rgba(34,34,34,.94); } }
.navf.chat { bottom: calc(176px + var(--safe-b)); }
.navf.moved { bottom: auto; }
.navf .grip { width: 22px; height: 40px; cursor: grab; touch-action: none; color: var(--gray-2); border-radius: 20px 0 0 20px; }
.navf .grip svg { width: 14px; height: 18px; }
.navf.dragging { opacity: .8; box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.navf.dragging .grip { cursor: grabbing; color: var(--orange); }

/* ---------- 권한 관리 (관리자) ---------- */
.psearch { padding: 12px 16px 0; }
.psearch input { width: 100%; border: 1px solid var(--warm); border-radius: 35px; padding: 9px 15px; background: var(--surface); outline: none; }
.psearch input:focus { border-color: var(--orange); }
.pnote { font-size: 12.5px; color: var(--char); background: var(--tint); border: 1px solid var(--tint-line); border-radius: var(--r) var(--leaf) var(--r) var(--r); padding: 10px 12px; }
.phead { font-size: 13px; font-weight: 700; color: var(--char); margin: 16px 2px 8px; padding-left: 8px; border-left: 3px solid var(--orange); }
.puser .title { font-weight: 700; }
.lv { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.lv-admin { background: var(--orange); color: #fff; }
.lv-leader { background: var(--teal-tint); color: var(--teal); }
.lv-part { background: var(--teal-tint); color: var(--teal); opacity: .8; }
.lv-staff { background: var(--soft); color: var(--gray); }
.pall { margin-top: 8px; display: flex; align-items: center; gap: 5px; color: var(--orange); font-weight: 600; }
.pall svg { width: 15px; height: 15px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pc { position: relative; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--warm); background: var(--surface); color: var(--gray); border-radius: 35px; padding: 5px 11px 5px 9px; font-size: 12.5px; font-weight: 600; }
.pc svg { width: 14px; height: 14px; }
.pc.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pc.ov::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); border: 2px solid var(--surface); }
.pc:disabled { opacity: .6; }
.homeout { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 22px auto 6px; }
.homeout svg { width: 16px; height: 16px; }
.pc.lock { opacity: .45; text-decoration: line-through; }
.lv-exec { background: var(--char); color: #fff; }
.lv-team { background: var(--tint); color: var(--orange-dk); }
.pc:disabled:not(.lock) { opacity: 1; cursor: default; }

/* 일정 탭 (2026-10-16) */
.shead { font-size: 14px; font-weight: 700; color: var(--char); margin: 14px 2px 8px; display: flex; align-items: center; gap: 6px; }
.shead small { font-size: 12px; color: var(--gray); font-weight: 600; }
.shead.late { color: var(--orange); }
.shead.undated { color: var(--gray); }
.shead2 { margin: 8px 2px 6px; font-weight: 700; }
.shead2.late { color: var(--orange); }
.scard .note { font-size: 14.5px; line-height: 1.45; margin-top: 4px; white-space: pre-wrap; }
.scard .meta b { color: var(--char); font-weight: 700; }
.scard { display: flex; gap: 10px; align-items: stretch; }
.scard .sbody { flex: 1; min-width: 0; }
.sbtns { display: flex; flex-direction: column; gap: 6px; justify-content: center; flex: none; }
.sb { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 64px; height: 34px; padding: 0 10px; border-radius: 35px; border: 1px solid transparent; font-size: 13px; font-weight: 700; color: #fff; }
.sb svg { width: 15px; height: 15px; }
.sb.done { background: #1F9D55; border-color: #1F9D55; }
.sb.delay { background: var(--orange); border-color: var(--orange); }
.sb.cancel { background: var(--surface); color: var(--gray); border-color: var(--warm); }
.sb:active { filter: brightness(.92); transform: scale(.97); }
@media (max-width: 360px) { .sb span { display: none; } .sb { min-width: 40px; padding: 0; width: 40px; } }
/* 일정: 물건별 묶음 카드 (2026-10-19) */
.scard.sgroup { align-items: flex-start; }
.stag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--gray); background: var(--bg, #F4F2EF); border: 1px solid var(--warm); border-radius: 20px; padding: 1px 8px; }
.scnt { display: inline-block; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 9px; padding: 0 5px; margin-left: 4px; }
.smores { margin-top: 10px; border-top: 1px dashed var(--warm); padding-top: 6px; }
.smh { font-weight: 700; margin-bottom: 2px; }
.smore { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.04); }
.smore:last-child { border-bottom: 0; }
.smore .sd { flex: none; font-size: 12px; font-weight: 700; color: var(--char); min-width: 48px; }
.smore .st { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.smore .mini { flex: none; display: flex; gap: 4px; }
.sm { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; color: #fff; padding: 0; }
.sm svg { width: 14px; height: 14px; }
.sm.done { background: #1F9D55; }
.sm.delay { background: var(--orange); }
.sm.cancel { background: var(--surface); color: var(--gray); border-color: var(--warm); }

/* 제안서 요청 탭 (2026-10-17) */
.prform { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 24px; }
.prform select, .prform textarea { border: 0; border-bottom: 1px solid var(--warm); background: transparent; border-radius: 0; padding: 10px 2px; font-size: 16px; font-family: inherit; outline: none; width: 100%; }
.prform textarea:focus, .prform select:focus { border-bottom: 2px solid var(--orange); }
.prform .field input { font-size: 15px; padding: 9px 2px; }
.prgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.prchk { cursor: pointer; }
.prchk input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
.prchk em { font-style: normal; margin-left: 6px; }
.prform .psub > b { font-size: 14px; color: var(--char); }
.sbtns a.link { text-decoration: none; }

/* 미팅 브리핑 (2026-10-19) */
.sb.brief { background: var(--brand, #FF5624); border-color: var(--brand, #FF5624); }
pre.brief { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14px; line-height: 1.55; margin: 0 0 12px; max-height: 65vh; overflow: auto; }

/* 영업뉴스 (2026-10-21) */
.news { padding-bottom: 24px; }
.nbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.nseg { margin: 12px 0 0; }
.nlang { display: flex; gap: 6px; }
.nlang button { border: 1px solid var(--warm); background: var(--surface); padding: 5px 12px; border-radius: 35px; font-size: 12.5px; font-weight: 600; color: var(--gray); }
.nlang button.on { border-color: var(--orange); color: var(--orange); }
.nlang button:disabled { opacity: .4; }
.nfb { margin: 6px 2px; }
.nbody { background: var(--surface); border-radius: 14px; padding: 14px 14px 16px; margin-top: 10px; line-height: 1.55; }
.nbody .ntitle { font-size: 16px; margin: 0 0 6px; color: var(--char); }
.nbody .nh { font-size: 14.5px; color: var(--orange); margin: 16px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.nbody .nh:first-of-type { border-top: 0; padding-top: 0; }
.nbody .ni { font-size: 14px; font-weight: 600; color: var(--char); margin: 8px 0 2px; padding-left: 12px; position: relative; }
.nbody .ni::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.nbody .ns { font-size: 13px; color: var(--gray); margin: 1px 0 1px 12px; }
.nbody p { font-size: 13.5px; margin: 4px 0; }

.ibar button.push { margin-left: auto; }
.ibar button.push.on { color: var(--orange); border-color: var(--orange); }

/* ---- 2026-10-30 사전손익 입력창 디자인 개선: 밑줄 → 채움형 칸, 큰 터치 영역, 또렷한 포커스 ---- */
.pnl .pb { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.pnl .pi { height: 40px; padding: 0 10px; background: var(--soft); border: 1px solid transparent; border-radius: 10px;
  font-size: 15px; font-weight: 600; transition: border-color .15s, background .15s, box-shadow .15s; }
.pnl .pi::placeholder { color: var(--gray-2); font-weight: 400; }
.pnl .pi:hover { border-color: var(--line); }
.pnl .pi:focus { background: var(--surface); border: 1px solid var(--orange); box-shadow: 0 0 0 3px var(--tint); }
.pnl .pi:disabled { background: transparent; border: 1px dashed var(--line); color: var(--gray); }
.pnl .pi.wide { height: 46px; font-size: 16px; padding: 0 14px; }
.pnl .pi.sm { width: 64px; height: 34px; padding: 0 6px; color: var(--ink); border-radius: 10px; display: inline-block; text-align: center; }  /* 일정 버튼용 전역 .sm(흰 글자·원형) 덮어씀 */
.pnl .pb select { height: 40px; padding: 0 30px 0 12px; background: var(--soft); border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gray) 50%), linear-gradient(135deg, var(--gray) 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.pnl .pb select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--tint); }
.pnl .srow select { height: 34px; width: 62px !important; padding: 0 18px 0 8px !important; border: 1px solid transparent !important; background-color: var(--soft); border-radius: 8px !important;
  background-position: calc(100% - 11px) 14px, calc(100% - 7px) 14px !important; }
.pnl .two2 { gap: 10px; }
.pnl .two2 label, .pnl .pb > label { display: flex; flex-direction: column; gap: 5px; }
.pnl .two2 small, .pnl .pb > label > small { font-size: 12px; color: var(--char); font-weight: 700; }
.pnl .pgrid { grid-template-columns: 48px 1fr 1fr; gap: 8px; }
.pnl .pgrid > em, .pnl .mgrid4 > em { text-align: center; padding: 0; color: var(--gray); font-size: 11.5px; }
.pnl .pgrid > span, .pnl .mgrid4 > span { color: var(--char); font-size: 12.5px; font-weight: 700; }
.pnl .mgrid4 { grid-template-columns: 58px repeat(4, 1fr); gap: 6px; }
.pnl .mgrid4 .pi { height: 38px; padding: 0 6px; font-size: 14px; text-align: center; }
.pnl .dayb { border: 0; background: var(--bg); border-radius: 12px; padding: 12px; }
.pnl .dayb .pi { background: var(--surface); }
.pnl .dayb .pi:disabled { background: transparent; }
.pnl .dh b { font-size: 14px; }
.pnl .rowx { min-height: 40px; }
.pnl .rowx > span, .pnl .rowx > b { font-weight: 600; }
.pnl .rowx .u .pi.num { max-width: 170px; }
.pnl .rowx .u em { min-width: 34px; }
.pnl .psub { border-top: 1px solid var(--line); padding-top: 12px; gap: 12px; }
.pnl .seg2 { background: var(--soft); border: 0; border-radius: 10px; padding: 3px; gap: 2px; }
.pnl .seg2 button { border: 0; border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; background: transparent; color: var(--gray); }
.pnl .seg2 button.on { background: var(--surface); color: var(--orange); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pnl .srow { background: var(--bg); border: 0; border-radius: 10px; padding: 10px 12px; }
.pnl .srow .pi.w { height: 34px; margin-top: 4px; background: var(--surface); font-size: 13.5px; }
.pnl .srow.ssum { background: var(--tint); }
.pnl .lsum { border-radius: 10px; padding: 11px 14px; }
.pnl .psec > header { padding: 13px 14px; background: linear-gradient(var(--surface), var(--surface)); }
.pnl .note { line-height: 1.5; }
@media (max-width: 380px) { .pnl .mgrid4 { grid-template-columns: 48px repeat(4, 1fr); gap: 4px; } .pnl .mgrid4 .pi { font-size: 13px; padding: 0 3px; } }
/* 첫 화면 한 화면에 맞추기 (동의 문구 하단 배치, 2026-11-02) */
.langpick { padding-top: 20px; gap: 4px; }
.langpick .lp-logo { width: 60px; height: 60px; border-radius: 16px; }
.langpick h2 { margin-top: 8px; font-size: 22px; }
.langpick > p { margin-bottom: 12px; font-size: 12.5px; }
.langpick .lp-list { gap: 8px; }
.langpick .lp-list button { padding: 11px 16px; font-size: 16px; }
.langpick .cgo { position: sticky; bottom: 0; box-shadow: 0 -8px 12px var(--surface); }
/* 언어 4분할 (좌상 베트남어 · 우상 한국어 · 좌하 중국어 · 우하 영어) + 안내 두 줄 + 동의 항목 제목/내용 줄 나눔 (2026-11-02) */
.langpick > p.lp-pick { line-height: 1.55; font-size: 13px; color: var(--char); margin-bottom: 14px; }
.langpick .lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.langpick .lp-grid button { position: relative; flex-direction: column; justify-content: center; gap: 8px; padding: 16px 8px 14px; text-align: center; font-size: 15.5px; }
.langpick .lp-grid button .lp-flag { width: 54px; height: 36px; }
.langpick .lp-grid button span { flex: none; }
.langpick .lp-grid button > svg:last-child { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; }
.consent .cbody { display: block; }
.consent .cbody dt { margin-top: 5px; white-space: normal; }
.consent .cbody dt:first-child { margin-top: 0; }
.consent .cbody dd { margin: 0; }
/* 동의 문구를 언어 선택 바로 아래로 (여백 절반), 세로가 짧은 폰도 한 화면 (2026-11-02) */
.consent { margin-top: clamp(12px, 3.5vh, 36px); padding-top: 0; }
@media (max-height: 760px) {
  .langpick { padding-top: 12px; }
  .langpick .lp-logo { width: 46px; height: 46px; border-radius: 12px; }
  .langpick h2 { margin-top: 4px; font-size: 19px; }
  .langpick > p.lp-pick { font-size: 12px; margin-bottom: 8px; }
  .langpick .lp-grid { gap: 8px; }
  .langpick .lp-grid button { padding: 10px 8px 9px; gap: 5px; font-size: 14.5px; }
  .langpick .lp-grid button .lp-flag { width: 44px; height: 29px; }
  .consent .cbody { font-size: 10px; line-height: 1.4; }
  .consent .cbody dt { margin-top: 3px; }
  .cgo { padding: 13px 16px; font-size: 16px; }
}
/* 로그인: 인증번호 받는 곳 (Zalo / 이메일, 2026-11-02) */
.login .via { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 2px 2px 4px; font-size: 14px; }
.login .via .vl { width: 100%; font-size: 12.5px; color: var(--gray); font-weight: 600; }
.login .vchk { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); cursor: pointer; }
.login .vchk input { width: 20px; height: 20px; margin: 0; accent-color: var(--orange); }

/* 2026-11-04 확인 요청 카드함 */
.acard { display: flex; flex-direction: column; gap: 10px; transition: opacity .25s, transform .25s; }
.acard.busy { opacity: .6; }
.acard.gone { opacity: 0; transform: translateX(24px); }
.acard .aq { font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; }
.aopts { display: flex; flex-direction: column; gap: 8px; }
.aopt { font: inherit; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.aopt:hover { border-color: var(--orange); }
.aopt.on { border-color: var(--orange); background: var(--tint); color: var(--orange-dk); font-weight: 700; }
.aopt.inp { border-style: dashed; }
.aopt:focus-visible, .askip:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.ainput { display: flex; gap: 8px; align-items: flex-end; }
.ainput[hidden] { display: none; }
.ainput textarea { flex: 1; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--orange); background: var(--surface); color: var(--text); resize: vertical; }
.ainput .asend { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ainput .asend svg { width: 18px; height: 18px; }
.askip { align-self: flex-start; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; }

/* 2026-11-04 Kangwoo: 대시보드 플로팅 버튼 (관리자·법인장·그룹장) */
.wallfab { position: absolute; right: 16px; bottom: calc(140px + var(--safe-b)); z-index: 6; width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface, #fff); color: var(--orange, #FF5624); border: 1.5px solid var(--orange, #FF5624); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); text-decoration: none; }
.wallfab svg { width: 26px; height: 26px; }
.wallfab:active { background: var(--orange, #FF5624); color: #fff; }
/* 2026-11-04 Kangwoo: 대시보드 바로가기 → 상단 국기 왼쪽 */
.top .wallbtn { color: var(--orange, #FF5624); text-decoration: none; }
.top .wallbtn svg { width: 21px; height: 21px; }

/* 활동보고 내 메시지 복사 버튼 (2026-11-26 Kangwoo): 말풍선 왼쪽, 한 번 눌러 복사 */
.msg.in .cp { align-self: flex-end; flex: none; min-width: 32px; min-height: 32px; margin-right: -2px; }
.msg.in .cp svg { width: 17px; height: 17px; }

/* 로그인·언어 선택 화면: 웰스토리 공식 로고만 (2026-11-27 Kangwoo) — 흰 바탕 위에 올려 어두운 화면에서도 그대로 보이게 */
.login .hero img.wlogo, .langpick img.wlogo { width: auto; height: 30px; max-width: 72%; border-radius: 12px; background: #fff; padding: 12px 18px; box-sizing: content-box; display: inline-block; }
