
/* Two products on one page. Staff = Document Mode (white, tables, task inbox per role) with a right rail showing what the customer receives on KakaoTalk.
   Customer = Brand Mode (warm white) order tracker: the house drawing builds layer by layer, a D-day to delivery, a build log, and a two-way chat with Wavyroom. */
:root {
  --bg: #FFFFFF; --surface: #EFEFEF; --surface-2: #F6F6F6; --line: #DCDCDC; --fg: #121212; --muted: #5C5C5C;
  --accent: #D3F170; --accent-2: #C7E261; --accent-ink: #4E6312; --on-accent: #121212;
  --danger: #B3402B; --danger-bg: #FBEAE6; --warn: #8A5A00; --warn-bg: #FFF3D6; --ok: #2E6B45; --ok-bg: #E5F2E9;
  --bubble: #FFFFFF; --phone: #E3E5E8; --shadow: rgba(18,18,18,.08);
  --wall: #EDEBE6; --roof: #121212; --glass: #CFE3EA; --concrete: #B9B6AE; --leaf: #6F8F4E; --ghost: #C9C6BE; --clad: #8C8A84;
  --font: "Pretendard WR", "Pretendard", "Pretendard Variable", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --r-s: 8px; --r-m: 16px; --r-l: 24px;
  --fs-xs: 12px; --fs-s: 13px; --fs-b: 15px; --fs-m: 17px; --fs-l: 22px; --fs-xl: 30px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121212; --surface: #1F1F1F; --surface-2: #191919; --line: #333333; --fg: #F2F2F2; --muted: #A3A3A3; --accent-ink: #D3F170;
  --danger: #F08A73; --danger-bg: #3A1F19; --warn: #F2C266; --warn-bg: #3A2E14; --ok: #8FD3A6; --ok-bg: #18301F;
  --bubble: #262626; --phone: #0B0B0B; --shadow: rgba(0,0,0,.4);
  --wall: #2C2A27; --roof: #E9E7E2; --glass: #34474F; --concrete: #5A5852; --leaf: #8DB06A; --ghost: #4A4844; --clad: #9A978F; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1F1F1F; --surface-2: #191919; --line: #333333; --fg: #F2F2F2; --muted: #A3A3A3; --accent-ink: #D3F170;
  --danger: #F08A73; --danger-bg: #3A1F19; --warn: #F2C266; --warn-bg: #3A2E14; --ok: #8FD3A6; --ok-bg: #18301F;
  --bubble: #262626; --phone: #0B0B0B; --shadow: rgba(0,0,0,.4);
  --wall: #2C2A27; --roof: #E9E7E2; --glass: #34474F; --concrete: #5A5852; --leaf: #8DB06A; --ghost: #4A4844; --clad: #9A978F; color-scheme: dark; }
/* Brand Mode for the customer */
body.cust { --bg: #F7F6F3; --surface: #EDEBE6; --surface-2: #F1EFEA; --line: #D9D6CF; --muted: #4A4844; --bubble: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.cust { --bg: #151413; --surface: #22201E; --surface-2: #1B1A18; --line: #3A3733; --muted: #B7B3AB; --bubble: #262422; } }
:root[data-theme="dark"] body.cust { --bg: #151413; --surface: #22201E; --surface-2: #1B1A18; --line: #3A3733; --muted: #B7B3AB; --bubble: #262422; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: var(--fs-b); font-weight: 300; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.small, .label { font-size: var(--fs-s); font-weight: 400; }
.label { letter-spacing: 0.03em; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.b6 { font-weight: 600; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }

/* shared controls */
.btn { border: 1px solid var(--fg); background: transparent; border-radius: 999px; padding: 9px 18px; font-size: var(--fs-s); font-weight: 600; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.ghost { border-color: var(--line); font-weight: 400; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; padding: 13px 18px; font-size: var(--fs-b); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: var(--fs-s); font-weight: 400; color: var(--muted); letter-spacing: 0.03em; }
input[type=text], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--fs-b); font-weight: 400; min-width: 0; }
textarea { min-height: 80px; resize: vertical; }
input[type=file] { max-width: 100%; font-size: var(--fs-s); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: var(--fs-s); font-weight: 400; cursor: pointer; background: var(--bg); }
.chk input { margin: 0; accent-color: var(--fg); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; background: var(--surface); }
.pill.on { background: var(--accent); color: var(--on-accent); }
.pill.done { background: var(--fg); color: var(--bg); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.outline { background: transparent; border: 1px solid var(--line); font-weight: 400; }
.bar { height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--fg); border-radius: 999px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumbs img, .thumbs .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-s); background: var(--surface); display: block; max-width: 100%; }
.thumbs button { padding: 0; border: 0; background: none; }
.files { display: flex; flex-direction: column; gap: 6px; }
.files a { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-s); font-weight: 400; color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 12px; text-decoration: none; background: var(--bg); }
.empty { border: 1.5px dashed var(--line); border-radius: var(--r-m); padding: 26px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.progress { font-size: var(--fs-s); font-weight: 400; display: flex; align-items: center; gap: 8px; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: sp 0.8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: var(--fs-s); font-weight: 600; z-index: 40; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 6px 24px var(--shadow); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: grid; place-items: center; z-index: 50; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: var(--r-m); }
.banner { border-radius: var(--r-m); padding: 14px 16px; font-size: var(--fs-s); font-weight: 400; background: var(--warn-bg); color: var(--warn); }
.rowarn { background: var(--warn-bg); color: var(--warn); font-size: var(--fs-s); padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); text-align: center; }

/* ---------- STAFF ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1440px; margin: 0 auto; }
.logo { height: 16px; width: auto; display: block; }
.logo-w { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-b { display: none; } :root:not([data-theme="light"]) .logo-w { display: block; } }
:root[data-theme="dark"] .logo-b { display: none; } :root[data-theme="dark"] .logo-w { display: block; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand span { font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.roles { display: flex; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.roles button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font-size: var(--fs-s); font-weight: 400; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.roles button[aria-pressed="true"] { background: var(--fg); color: var(--bg); font-weight: 600; }
.roles .cnt { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; }
.roles .kakao-tab { display: none; }
.shell { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; padding-block: 22px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (max-width: 1100px) { .shell { grid-template-columns: minmax(0, 1fr); } .rail { display: none; } .rail.show { display: block; } .roles .kakao-tab { display: inline-flex; } }
.view { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px; min-width: 0; }
.card.fill { background: var(--surface); border-color: transparent; }
.card h2 { font-size: var(--fs-m); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.roleintro { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.roleintro h1 { font-size: var(--fs-l); }
.task { border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-left: 6px solid var(--fg); background: var(--bg); }
.task.wait { border-left-color: var(--line); }
.task.hot { border-left-color: var(--danger); }
.task-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.task-h b { font-weight: 600; font-size: var(--fs-m); }
.who { font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border-radius: var(--r-m); padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi.alert { background: var(--danger-bg); } .kpi.alert b, .kpi.alert .label { color: var(--danger); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); font-weight: 400; min-width: 720px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; background: var(--surface-2); font-size: var(--fs-xs); letter-spacing: 0.03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.aibox { background: var(--surface); border-radius: var(--r-s); padding: 12px; font-size: var(--fs-s); font-weight: 400; display: grid; gap: 4px; }
.aibox div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.aibox div span:first-child { color: var(--muted); }
.track { display: flex; gap: 4px; flex-wrap: wrap; }
.track span { font-size: var(--fs-xs); font-weight: 400; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.track span.on { background: var(--fg); color: var(--bg); font-weight: 600; }
.stepchips { display: flex; gap: 6px; flex-wrap: wrap; }
.drop { border: 1.5px dashed var(--line); border-radius: var(--r-m); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.chat .m { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: var(--fs-s); font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat .m.c { background: var(--surface); align-self: flex-start; border-top-left-radius: 4px; }
.chat .m.s { background: var(--fg); color: var(--bg); align-self: flex-end; border-top-right-radius: 4px; }
.chat .t { font-size: 11px; color: var(--muted); }
.chat .t.s { align-self: flex-end; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface); border-radius: var(--r-s); padding: 8px 10px; font-size: var(--fs-s); font-weight: 400; min-width: 0; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; }
.summary-out { white-space: pre-wrap; }

/* kakao rail */
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); align-self: start; }
.phone { background: var(--phone); border-radius: 28px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 110px); }
@media (max-width: 1100px) { .rail { position: static; } .phone { max-height: none; } }
.phone-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 6px; gap: 8px; }
.phone-h b { font-weight: 600; font-size: var(--fs-b); }
.msgs { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 2px; min-height: 200px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
.ava { width: 34px; height: 34px; border-radius: 12px; background: #121212; display: grid; place-items: center; overflow: hidden; }
.ava img { width: 26px; height: auto; }
.chan { font-size: var(--fs-s); font-weight: 600; margin-bottom: 4px; }
.bub { background: var(--bubble); border-radius: 4px 14px 14px 14px; overflow: hidden; box-shadow: 0 1px 2px var(--shadow); }
.bub .tag { background: #D3F170; color: #121212; font-size: var(--fs-xs); font-weight: 600; padding: 7px 12px; display: flex; justify-content: space-between; gap: 8px; }
.bub .tag em { font-style: normal; font-weight: 400; opacity: .7; }
.bub .bd { padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-s); font-weight: 400; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.bub .bd b { font-size: var(--fs-b); font-weight: 600; }
.bub .cta { margin: 0 12px 12px; border: 0; background: var(--surface); border-radius: var(--r-s); padding: 9px; font-size: var(--fs-s); font-weight: 600; width: calc(100% - 24px); }
.msg .when { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.note { font-size: var(--fs-xs); font-weight: 400; color: var(--muted); padding: 0 6px; }

/* ---------- CUSTOMER ---------- */
.cwrap { max-width: 760px; margin: 0 auto; padding-block: 0 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; }
.cbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px 4px; }
.cbar .ord { font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.chero { background: var(--surface); border-radius: var(--r-l); padding: 26px 24px 20px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.chero .hi { font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.chero h1 { font-size: 34px; line-height: 1.2; letter-spacing: -0.025em; }
.chero .sub { font-size: var(--fs-m); font-weight: 300; color: var(--muted); max-width: 46ch; }
.house { width: 100%; height: auto; display: block; max-width: 100%; }
.dday { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dday b { font-size: 46px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.dday span { font-size: var(--fs-b); font-weight: 400; }
.journey { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; padding-top: 30px; }
.journey .seg { height: 6px; border-radius: 999px; background: var(--line); position: relative; }
.journey .seg.done { background: var(--fg); }
.journey .seg.now { background: linear-gradient(90deg, var(--fg) 50%, var(--line) 50%); }
.journey .lab { font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 8px; text-align: center; line-height: 1.25; word-break: keep-all; }
.journey .lab.now { color: var(--fg); font-weight: 600; }
.journey .here { position: absolute; top: -28px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #121212; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 520px) { .journey .lab { display: none; } .journey .lab.now { display: block; position: absolute; left: 0; right: 0; } .chero h1 { font-size: 28px; } .dday b { font-size: 38px; } }
.ccard { background: var(--surface); border-radius: var(--r-m); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ccard h2 { font-size: var(--fs-l); }
.ccard.act { background: var(--fg); color: var(--bg); }
.ccard.act .muted { color: var(--bg); opacity: .75; }
.ccard.act .btn.primary { color: #121212; }
.ccard.act .btn.ghost { border-color: var(--bg); color: var(--bg); }
.ccard.act textarea { background: transparent; color: var(--bg); border-color: rgba(255,255,255,.3); }
.ccard.act .files a { background: transparent; color: var(--bg); border-color: rgba(255,255,255,.3); }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log li { display: grid; grid-template-columns: 70px 18px minmax(0, 1fr); gap: 12px; padding-bottom: 20px; position: relative; }
.log li::before { content: ""; position: absolute; left: 90px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.log li:last-child::before { display: none; }
.log .when { font-size: var(--fs-s); font-weight: 400; color: var(--muted); text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.log .pt { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); margin: 5px 3px 0; position: relative; z-index: 1; }
.log li:first-child .pt { background: var(--accent); box-shadow: 0 0 0 3px var(--fg); }
.log b { font-weight: 600; font-size: var(--fs-m); display: block; }
.log .where { font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.log .txt { font-size: var(--fs-b); margin-top: 6px; display: grid; gap: 4px; }
.log .txt .ok { font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.log .thumbs { margin-top: 10px; }
.cs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cs > div { background: var(--bg); border-radius: var(--r-m); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.cs b { font-size: var(--fs-m); font-weight: 600; }
.cchat { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 4px; }
.cchat .m { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: var(--fs-b); font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
.cchat .m.me { background: var(--fg); color: var(--bg); align-self: flex-end; border-bottom-right-radius: 6px; }
.cchat .m.wr { background: var(--bg); align-self: flex-start; border-bottom-left-radius: 6px; }
.cchat .t { font-size: 11px; color: var(--muted); }
.cchat .t.me { align-self: flex-end; }
.cinput { display: flex; gap: 8px; align-items: flex-end; }
.cinput textarea { min-height: 46px; height: 46px; border-radius: 22px; padding: 12px 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: var(--fs-s); font-weight: 400; }
.tabs button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 600; }
.fab { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: #121212; color: #fff; border: 0; border-radius: 999px; padding: 12px 16px; font-size: var(--fs-s); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; z-index: 20; box-shadow: 0 6px 20px var(--shadow); }
.fab i { background: #D3F170; color: #121212; border-radius: 999px; font-style: normal; font-size: 11px; padding: 0 6px; line-height: 18px; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; display: flex; justify-content: flex-end; align-items: flex-end; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.sheet .phone { width: min(400px, 100%); max-height: 80vh; }
.demo { font-size: 11px; font-weight: 400; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 4px 10px; background: transparent; }

/* house drawing */
.L { transition: opacity .4s ease; }
.ghost { opacity: .9; }
.ghost * { fill: none !important; stroke: var(--ghost) !important; stroke-dasharray: 4 5; }
.fresh { animation: rise .7s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.road { stroke-dasharray: 18 14; }
.moving .road { animation: road 0.9s linear infinite; }
@keyframes road { to { stroke-dashoffset: -32; } }
.moving .truckg { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .fresh, .moving .road, .moving .truckg, .spin { animation: none; } }
.faq{background:var(--bg);border-radius:var(--r-m);padding:12px 14px}.faq summary{cursor:pointer;font-weight:600;list-style:none;display:flex;justify-content:space-between;gap:12px}.faq summary::-webkit-details-marker{display:none}.faq summary::after{content:"+";opacity:.55;font-weight:400}.faq[open] summary::after{content:"\2212"}.faq p{margin:8px 0 0;line-height:1.6}
.fab.fb { right: auto; left: calc(16px + env(safe-area-inset-left, 0px)); background: var(--accent); color: #121212; }
.fbpanel { background: var(--bg); color: var(--fg); border-radius: var(--r-l); padding: 18px; width: min(460px, 100%); max-height: 85vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet.left { justify-content: flex-start; }
.msgtext { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-s); padding: 12px 14px; font: inherit; font-size: var(--fs-s); line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.fbitem { background: var(--surface-2); border-radius: var(--r-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.fbitem .reply { border-left: 3px solid var(--accent); padding-left: 10px; }
/* ---------- v2 운영판 추가 ---------- */
.shell1 { max-width: 1240px; margin: 0 auto; padding-block: 22px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.topbar .me { margin-left: auto; }
.linkbtn { background: none; border: 0; padding: 4px 0; font-size: var(--fs-s); font-weight: 400; color: inherit; text-decoration: underline; text-underline-offset: 3px; opacity: .8; align-self: flex-start; }
.plink { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; }
.plink:hover b { text-decoration: underline; text-underline-offset: 3px; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.dim { opacity: .55; }
.pre { white-space: pre-wrap; }
.fs-b { font-size: var(--fs-b) !important; }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.chk.wide { border-radius: var(--r-s); align-items: flex-start; align-self: stretch; }
.chk.wide input { margin-top: 3px; }
.tlist { display: flex; flex-direction: column; gap: 8px; }
.titem { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); border-left: 6px solid var(--fg); border-radius: var(--r-m); background: var(--bg); padding: 12px 14px; color: inherit; font: inherit; }
.titem.hot { border-left-color: var(--danger); } .titem.wait { border-left-color: var(--line); opacity: .8; }
.titem .r { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.titem .m { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.titem .m .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .titem { grid-template-columns: minmax(0, 1fr); } .titem .r { display: none; } }
.phead { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: center; }
.phead .ph-l { background: var(--surface); border-radius: var(--r-m); padding: 6px; }
@media (max-width: 640px) { .phead { grid-template-columns: minmax(0, 1fr); } .phead .ph-l { max-width: 260px; } }
.lk { font-family: inherit; overflow-wrap: anywhere; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .pgrid { grid-template-columns: minmax(0, 1fr); } }
.chat .m.y { background: var(--warn-bg); color: var(--warn); align-self: center; max-width: 92%; }
.eqrow { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; gap: 6px; }
@media (max-width: 640px) { .eqrow { grid-template-columns: 1fr 1fr; } }
.hbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 84px; gap: 10px; align-items: center; margin-bottom: 8px; }
.hbar b { text-align: right; }
.mline summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; cursor: pointer; list-style: none; }
.mline summary::-webkit-details-marker { display: none; }
.mline .msgtext { margin-top: 6px; }
.evlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.evlist li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
/* 고객 */
body.cust .cwrap { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.tile { background: var(--bg); border-radius: var(--r-m); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ccard.act .tile { background: transparent; }
.jstep { background: none; border: 0; padding: 0; color: inherit; font: inherit; position: relative; cursor: pointer; }
.jinfo { background: var(--bg); border-radius: var(--r-m); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cs.mini { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } .cs.mini > div { background: var(--surface); } .cs.mini b { font-size: var(--fs-b); }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.slot { background: var(--bg); color: var(--fg); border: 0; border-radius: var(--r-m); padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.slot b { font-weight: 600; } .slot span { font-size: var(--fs-s); opacity: .75; }
.slot:hover { outline: 2px solid var(--accent); }
.prep { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--bg); border-radius: var(--r-m); padding: 12px 14px; cursor: pointer; }
.prep input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fg); }
.prep span { display: flex; flex-direction: column; gap: 2px; } .prep em { font-style: normal; font-size: var(--fs-s); color: var(--muted); }
.scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.scale label { position: relative; } .scale input { position: absolute; opacity: 0; inset: 0; }
.scale span { display: grid; place-items: center; height: 40px; border-radius: var(--r-s); border: 1px solid rgba(255,255,255,.3); font-weight: 600; font-variant-numeric: tabular-nums; }
.scale input:checked + span { background: var(--accent); color: #121212; border-color: var(--accent); }
.scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 8px 14px; font-size: var(--fs-s); font-weight: 400; }
.chip:hover { border-color: var(--fg); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; height: 46px; border-radius: 22px; padding: 12px 16px; flex: 1; }
.clip { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: var(--bg); cursor: pointer; font-size: 22px; font-weight: 300; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.waitbar { display: flex; gap: 10px; align-items: center; background: var(--warn-bg); color: var(--warn); border-radius: var(--r-m); padding: 10px 14px; font-size: var(--fs-s); font-weight: 400; }
.cchat { max-height: 52vh; }
.cchat .m.sys { background: var(--warn-bg); color: var(--warn); align-self: center; font-size: var(--fs-s); }
.cchat .who { display: block; font-size: 11px; font-weight: 600; opacity: .7; margin-bottom: 2px; }
.paybar { display: flex; gap: 4px; }
.pb { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pb i { display: block; height: 8px; border-radius: 999px; background: var(--line); }
.pb.paid i { background: var(--fg); } .pb.due i { background: var(--accent); } .pb.reported i { background: repeating-linear-gradient(90deg, var(--fg) 0 6px, var(--line) 6px 10px); }
.pb b { font-size: var(--fs-s); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pb span { font-size: var(--fs-xs); color: var(--muted); }
.ccard.ask { background: var(--bg); border: 1px solid var(--line); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
.tabbar button { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 400; padding: 6px 0; position: relative; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--fg); font-weight: 600; }
.tabbar .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
body.cust .fab.fb { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.cert { background: var(--bg); border-radius: var(--r-l); padding: 10px; border: 1px solid var(--line); }
.cert-in { border: 2px solid var(--fg); border-radius: calc(var(--r-l) - 8px); padding: 24px 22px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.cert h2 { font-size: var(--fs-m); letter-spacing: .3em; font-weight: 600; }
.cert-name { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.cert dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; }
.cert dt { font-size: var(--fs-xs); color: var(--muted); } .cert dd { margin: 0; font-weight: 600; font-size: var(--fs-s); }
.cert .seal { position: absolute; right: 18px; top: 16px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #121212; display: grid; place-items: center; font-weight: 700; font-size: 22px; transform: rotate(-12deg); }

.guide { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--fs-s); font-weight: 400; }
.guide b { font-weight: 600; }
@media (max-width: 520px) { .journey { margin-bottom: 22px; } }
.pb { min-width: 64px; }
.pb b { white-space: normal; overflow: visible; }

.ccard.lock { border: 1.5px solid var(--fg); background: var(--bg); }

/* ===== 2026-12 고객 화면: 한눈에, 결제, 진행, 대화 ===== */
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .glance { grid-template-columns: 1fr; } }
.gl { text-align: left; border: 0; background: var(--surface); border-radius: var(--r-m); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; overflow: hidden; }
.gl b { font-size: var(--fs-m); font-weight: 600; overflow-wrap: anywhere; }
.gl.hot { box-shadow: inset 0 0 0 2px var(--fg); }
.gl img { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-s); margin-top: 6px; }
.gl:hover { background: var(--surface-2); }
.gbar { display: block; height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.gbar > i { display: block; height: 100%; background: var(--fg); border-radius: 999px; }
.gbar.big { height: 10px; }
.ccard .gbar { background: var(--bg); }
.askbox { background: var(--bg); border: 1.5px solid var(--fg); }
.aitag { font-size: var(--fs-xs); font-weight: 600; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
details.fold > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2::after { content: " +"; color: var(--muted); font-weight: 400; }
details.fold[open] > summary h2::after { content: " −"; }
.bank { background: var(--bg); color: var(--fg); border-radius: var(--r-m); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.bank b { font-size: var(--fs-m); font-weight: 600; overflow-wrap: anywhere; }
.ccard.act .bank .btn.ghost { border-color: var(--line); color: var(--fg); }
.paynext { display: flex; flex-direction: column; gap: 2px; }
.paynext b { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.paytot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.paytot > div { background: var(--bg); border-radius: var(--r-m); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.paytot b { font-size: var(--fs-m); font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 340px) { .paytot { grid-template-columns: 1fr; } }
.paytot b { font-size: var(--fs-b); }
.paylist { display: flex; flex-direction: column; gap: 8px; }
.prow { background: var(--bg); border-radius: var(--r-m); padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.prow .pl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prow .pr { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.prow.paid { opacity: .7; }
.prow.due { box-shadow: inset 0 0 0 2px var(--fg); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 0 0 14px; position: relative; }
.steps li::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps li.done::before { background: var(--fg); }
.steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); margin-top: 2px; }
.steps li.done .dot { background: var(--fg); border-color: var(--fg); }
.steps li.now .dot { background: var(--accent); border-color: var(--fg); }
.steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fsteps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fsteps span { font-size: var(--fs-xs); border-radius: 999px; padding: 2px 8px; background: var(--bg); color: var(--muted); }
.fsteps span.on { background: var(--fg); color: var(--bg); }
.who2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .who2 { grid-template-columns: 1fr; } }
.who2 > div { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: var(--r-m); padding: 10px 12px; min-width: 0; border: 1.5px solid transparent; }
.who2 > div.on { border-color: var(--fg); }
.who2 > div > div { display: flex; flex-direction: column; min-width: 0; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: var(--fs-s); flex: none; }
.av.ai { background: var(--accent); color: var(--on-accent); }
.av.st { background: var(--fg); color: var(--bg); }
.cchat .m.st { background: var(--bg); align-self: flex-start; border-bottom-left-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--fg); }
.mact { display: flex; gap: 14px; align-self: flex-start; padding-left: 6px; }
.mact .linkbtn { font-size: var(--fs-s); }
.typing { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: wrdot 1s infinite ease-in-out; }
.typing i:nth-child(3) { animation-delay: .15s; } .typing i:nth-child(4) { animation-delay: .3s; }
@keyframes wrdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }
.seg { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; gap: 2px; align-self: flex-start; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; font-size: var(--fs-s); font-weight: 400; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--fg); color: var(--bg); font-weight: 600; }
.tabbar .badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-style: normal; font-weight: 600; display: grid; place-items: center; }
.segrow { display: flex; flex-direction: column; gap: 6px; }
.ccard.act .label { color: var(--bg); opacity: .8; }
body.cust .fab.fb { display: none; }
/* ===== 문의함 ===== */
.inbox { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.ilist { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-height: calc(100vh - 220px); overflow-y: auto; }
.ibx { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ibx:hover { border-color: var(--fg); }
.ibx.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); background: var(--surface-2); }
.udot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: middle; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.danger-t { color: var(--danger); font-weight: 600; }
.ithread { min-width: 0; position: sticky; top: 76px; }
.ithread .chat { max-height: 46vh; overflow-y: auto; }
.ib-back { display: none; align-self: flex-start; }
@media (max-width: 860px) { .inbox { grid-template-columns: 1fr; } .inbox.has-sel .ilist { display: none; } .inbox:not(.has-sel) .ithread.empty-t { display: none; } .ib-back { display: inline; } .ithread { position: static; } .ilist { max-height: none; } }
.ccard.act .bank .label { color: var(--muted); opacity: 1; }
.ccard.act .bank .muted { color: var(--muted); opacity: 1; }
