/* BTTOUR 최종 화면 토큰을 모바일 접근성 규격으로 구현한 PWA 스타일. */
:root {
  color-scheme: light;
  --primary: #002772;
  --primary-container: #0c3c9c;
  --primary-light: #e8edf8;
  --secondary: #725300;
  --secondary-container: #fdc74d;
  --background: #f8f9fa;
  --surface: #fff;
  --surface-low: #f4f3fb;
  --surface-high: #e8e7f0;
  --text: #212529;
  --text-sub: #5f636d;
  --outline: #c4c6d4;
  --error: #ba1a1a;
  --error-bg: #ffdad6;
  --draft: #6c757d;
  --submitted: #4c6ef5;
  --reviewing: #b36b00;
  --needs-fix: #e03131;
  --confirmed: #2f7d3d;
  --paid: #1864ab;
  --radius: 14px;
  --shadow: 0 3px 14px rgba(0, 39, 114, .08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #e8ebf1; color: var(--text); }
body { min-width: 320px; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(12, 60, 156, .36); outline-offset: 2px; }
.screen h1[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-frame {
  position: relative;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--background);
  box-shadow: 0 0 28px rgba(0, 0, 0, .08);
  overflow-x: hidden;
}
.splash { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 32px; color: var(--text-sub); text-align: center; }
.splash img { width: 210px; height: auto; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.screen { min-height: 100dvh; padding: calc(var(--safe-top) + 60px) 16px calc(var(--safe-bottom) + 80px); }
.screen.no-nav { padding-bottom: calc(var(--safe-bottom) + 18px); }
.screen.centered { display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--safe-top) + 28px); }
.topbar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 20; width: min(100%, 480px); min-height: calc(var(--safe-top) + 56px); padding: var(--safe-top) 12px 0; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--surface-high); backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 19px; line-height: 26px; text-align: center; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-logo { width: 44px; height: 28px; object-fit: contain; justify-self: start; }
.topbar-home { width: 48px; min-height: 48px; padding: 4px 2px; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; justify-self: start; }
.topbar-home .topbar-logo { justify-self: center; }
.icon-button { width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: transparent; color: var(--primary); }
.icon { width: 23px; height: 23px; display: inline-block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 20; width: min(100%, 480px); height: calc(68px + var(--safe-bottom)); padding: 4px 8px var(--safe-bottom); display: grid; grid-template-columns: repeat(4,1fr); background: rgba(255,255,255,.97); border-top: 1px solid var(--outline); backdrop-filter: blur(12px); }
.nav button { min-height: 60px; border: 0; background: transparent; color: var(--text-sub); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 700; }
.nav button.active { color: var(--primary); background: var(--primary-light); }
.nav .icon { width: 22px; height: 22px; }

.brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 30px; }
.brand img { width: 210px; height: auto; margin-bottom: 22px; }
.brand h1 { margin: 0 0 8px; font-size: 24px; color: var(--primary); }
.brand p { margin: 0; color: var(--text-sub); line-height: 1.55; }
.language-tabs { width: fit-content; max-width: 100%; display: flex; justify-content: center; align-self: center; margin: 0 auto 28px; padding: 4px; border-radius: 999px; background: var(--surface-high); }
.language-tabs button { min-height: 40px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: var(--text-sub); font-size: 12px; }
.language-tabs button[aria-pressed="true"] { color: var(--primary); background: var(--surface); box-shadow: var(--shadow); font-weight: 800; }
.language-tabs button:disabled { color: #777b83; opacity: .75; cursor: not-allowed; }

.login-screen { display: flex; flex-direction: column; padding: calc(var(--safe-top) + 56px) 16px calc(var(--safe-bottom) + 28px); }
.login-screen .desktop-site-notice { display: none; }
.login-screen .language-tabs { margin-bottom: 40px; }
.login-screen .language-tabs button { min-height: 36px; padding-inline: 16px; }
.login-screen .brand { margin-bottom: 40px; }
.login-screen .brand img { width: auto; height: 48px; margin-bottom: 24px; }
.login-screen .brand h1 { margin-bottom: 8px; color: var(--text); font-size: 20px; line-height: 28px; }
.login-screen .brand p { font-size: 15px; line-height: 22px; }
.login-screen .stack { gap: 20px; }
.login-screen .field { gap: 8px; }
.login-screen .field label { font-size: 12px; }
.login-screen .field input { min-height: 48px; }
.login-screen #login-form .button { margin-top: 12px; }
.login-screen #approval-prompt:not([hidden]) { display: grid; gap: 10px; margin-top: 16px; }
.login-footer { margin: auto 0 0; padding-top: 32px; color: var(--text-sub); font-size: 12px; line-height: 17px; text-align: center; }

.mobile-desktop-site body { min-width: 0; }
.mobile-desktop-site .app-frame { width: 100%; max-width: none; box-shadow: none; }
.mobile-desktop-site .login-screen { padding: calc(var(--safe-top) + 88px) max(48px, 10vw) calc(var(--safe-bottom) + 48px); }
.mobile-desktop-site .login-screen .desktop-site-notice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 34px; padding: 22px 24px; border-radius: 20px; color: #123d7c; background: var(--primary-light); font-size: 22px; line-height: 1.45; }
.mobile-desktop-site .login-screen .desktop-site-notice strong { font-size: 26px; }
.mobile-desktop-site .login-screen .language-tabs { margin-bottom: 52px; padding: 7px; }
.mobile-desktop-site .login-screen .language-tabs button { min-height: 58px; padding-inline: 26px; font-size: 20px; }
.mobile-desktop-site .login-screen .brand { margin-bottom: 54px; }
.mobile-desktop-site .login-screen .brand img { height: 78px; margin-bottom: 38px; }
.mobile-desktop-site .login-screen .brand h1 { margin-bottom: 12px; font-size: 32px; line-height: 44px; }
.mobile-desktop-site .login-screen .brand p { font-size: 24px; line-height: 35px; }
.mobile-desktop-site .login-screen .stack { gap: 32px; }
.mobile-desktop-site .login-screen .field { gap: 12px; }
.mobile-desktop-site .login-screen .field label { font-size: 20px; }
.mobile-desktop-site .login-screen .field input { min-height: 76px; padding: 18px 22px; border-radius: 19px; font-size: 24px; }
.mobile-desktop-site .login-screen .field small { font-size: 19px; }
.mobile-desktop-site .login-screen #login-form .button { min-height: 76px; margin-top: 20px; border-radius: 19px; font-size: 24px; }
.mobile-desktop-site .login-footer { padding-top: 48px; font-size: 19px; line-height: 27px; }
.mobile-desktop-site .screen { padding: calc(var(--safe-top) + 108px) 28px calc(var(--safe-bottom) + 150px); }
.mobile-desktop-site .screen.no-nav { padding-bottom: calc(var(--safe-bottom) + 48px); }
.mobile-desktop-site .screen.centered { padding-top: calc(var(--safe-top) + 48px); }
.mobile-desktop-site .topbar { left: 0; transform: none; width: 100%; min-height: calc(var(--safe-top) + 96px); padding: var(--safe-top) 20px 0; grid-template-columns: 76px 1fr 76px; }
.mobile-desktop-site .topbar h1 { font-size: 32px; line-height: 44px; }
.mobile-desktop-site .topbar-logo { width: 72px; height: 46px; }
.mobile-desktop-site .icon-button { width: 76px; min-height: 76px; }
.mobile-desktop-site .icon { width: 38px; height: 38px; }
.mobile-desktop-site .nav { left: 0; transform: none; width: 100%; height: calc(116px + var(--safe-bottom)); padding: 7px 20px var(--safe-bottom); }
.mobile-desktop-site .nav button { min-height: 102px; border-radius: 20px; gap: 4px; font-size: 20px; }
.mobile-desktop-site .nav .icon { width: 36px; height: 36px; }
.mobile-desktop-site .network-status { left: 0; transform: none; width: 100%; padding: 15px 28px; font-size: 21px; }
.mobile-desktop-site .toast-region { bottom: calc(var(--safe-bottom) + 136px); width: calc(100% - 56px); }
.mobile-desktop-site .toast { padding: 21px 26px; border-radius: 20px; font-size: 22px; }
.mobile-desktop-site .stack { gap: 26px; }
.mobile-desktop-site .field { gap: 12px; }
.mobile-desktop-site .field label { font-size: 21px; }
.mobile-desktop-site .field input,
.mobile-desktop-site .field select,
.mobile-desktop-site .field textarea,
.mobile-desktop-site .search-input { min-height: 76px; padding: 18px 22px; border-radius: 19px; font-size: 24px; }
.mobile-desktop-site .field textarea { min-height: 152px; }
.mobile-desktop-site .field small,
.mobile-desktop-site .helper { font-size: 20px; line-height: 1.5; }
.mobile-desktop-site .button { min-height: 76px; padding: 18px 29px; border-radius: 19px; gap: 13px; font-size: 24px; }
.mobile-desktop-site .text-button { min-height: 70px; font-size: 22px; }
.mobile-desktop-site .button-row { gap: 16px; }
.mobile-desktop-site .card { padding: 28px; border-radius: 22px; }
.mobile-desktop-site .card + .card { margin-top: 20px; }
.mobile-desktop-site .card-header { gap: 20px; }
.mobile-desktop-site .card h2,
.mobile-desktop-site .card h3 { font-size: 28px; line-height: 1.35; }
.mobile-desktop-site .eyebrow { margin-bottom: 8px; font-size: 20px; }
.mobile-desktop-site .section-title { margin: 37px 0 19px; font-size: 28px; }
.mobile-desktop-site .page-intro { margin: 7px 0 32px; }
.mobile-desktop-site .page-intro h2 { margin-bottom: 10px; font-size: 34px; }
.mobile-desktop-site .page-intro p { font-size: 24px; }
.mobile-desktop-site .meta { gap: 11px 22px; margin-top: 19px; font-size: 21px; }
.mobile-desktop-site .badge { min-height: 45px; padding: 8px 15px; font-size: 20px; }
.mobile-desktop-site .notice { padding: 21px 23px; border-radius: 19px; gap: 16px; font-size: 23px; }
.mobile-desktop-site .home-welcome { grid-template-columns: 64px minmax(0,1fr); gap: 18px; padding: 18px 21px; border-radius: 22px; }
.mobile-desktop-site .home-welcome-icon { width: 64px; height: 64px; border-radius: 20px; }
.mobile-desktop-site .home-welcome-icon .icon { width: 31px; height: 31px; }
.mobile-desktop-site .home-welcome p { font-size: 26px; }
.mobile-desktop-site .home-welcome small { font-size: 20px; }
.mobile-desktop-site .quick-grid { gap: 14px; margin-top: 14px; }
.mobile-desktop-site .quick-action { min-height: 84px; padding: 16px 19px; border-radius: 19px; gap: 13px; font-size: 23px; }
.mobile-desktop-site .quick-action-icon { width: 48px; height: 48px; }
.mobile-desktop-site .quick-action .icon { width: 27px; height: 27px; }
.mobile-desktop-site .chat-panel { margin-top: 18px; }
.mobile-desktop-site .messages { gap: 19px; }
.mobile-desktop-site .message { padding: 19px 23px; border-radius: 22px; font-size: 24px; }
.mobile-desktop-site .chat-form { grid-template-columns: 1fr 76px; gap: 13px; margin-top: 13px; }
.mobile-desktop-site .chat-form input { min-height: 76px; padding: 16px 23px; font-size: 24px; }
.mobile-desktop-site .chat-form button { width: 76px; height: 76px; }
.mobile-desktop-site .search-wrap { top: calc(var(--safe-top) + 96px); margin-bottom: 19px; padding: 13px 3px; }
.mobile-desktop-site .empty { padding: 58px 29px; border-radius: 22px; font-size: 23px; }
.mobile-desktop-site .upload-choice { min-height: 154px; padding: 19px; border-radius: 22px; font-size: 22px; }
.mobile-desktop-site .upload-drop { min-height: 211px; padding: 29px; border-radius: 26px; }
.mobile-desktop-site .upload-item { grid-template-columns: 92px minmax(0,1fr) auto; gap: 16px; padding: 19px; }
.mobile-desktop-site .upload-thumb { width: 92px; height: 92px; }
.mobile-desktop-site .receipt-image { height: 269px; }
.mobile-desktop-site .receipt-body { padding: 24px; }
.mobile-desktop-site .receipt-grid { gap: 19px; }
.mobile-desktop-site .stat-grid { gap: 11px; margin: 19px 0 29px; }
.mobile-desktop-site .stat { padding: 16px 8px; border-radius: 16px; }
.mobile-desktop-site .stat strong { font-size: 29px; }
.mobile-desktop-site .stat span { font-size: 18px; }
.mobile-desktop-site .money-row { min-height: 66px; font-size: 23px; }
.mobile-desktop-site .money-total { margin-top: 19px; padding: 24px; border-radius: 19px; }
.mobile-desktop-site .money-total strong { font-size: 35px; }
.mobile-desktop-site .timeline li { min-height: 74px; padding: 2px 0 23px 58px; font-size: 23px; }
.mobile-desktop-site .timeline li::before { left: 18px; top: 35px; }
.mobile-desktop-site .timeline-dot { width: 37px; height: 37px; font-size: 19px; }
.mobile-desktop-site .sticky-actions { bottom: calc(116px + var(--safe-bottom)); margin: 29px -28px -29px; padding: 19px 28px; }
.mobile-desktop-site .no-nav .sticky-actions { bottom: 0; padding-bottom: calc(19px + var(--safe-bottom)); }
.mobile-desktop-site .history-amounts { gap: 16px; margin-top: 22px; }
.mobile-desktop-site .history-amounts span { padding: 18px; border-radius: 18px; }
.mobile-desktop-site .history-amounts small { font-size: 19px; }
.mobile-desktop-site .history-amounts strong { font-size: 25px; }
.mobile-desktop-site .settlement-balance-card { padding: 29px; border-radius: 28px; }
.mobile-desktop-site .settlement-balance-card > small,
.mobile-desktop-site .settlement-balance-card > p,
.mobile-desktop-site .settlement-balance-card > div { font-size: 20px; }
.mobile-desktop-site .settlement-balance-card > strong { font-size: 48px; }
.mobile-desktop-site .payment-badge { min-height: 43px; padding: 8px 14px; font-size: 18px; }
.mobile-desktop-site .settlement-net { padding: 19px 21px; border-radius: 19px; }
.mobile-desktop-site .settlement-net small { font-size: 20px; }
.mobile-desktop-site .settlement-net strong { font-size: 32px; }
.mobile-desktop-site .settlement-money-grid { gap: 11px; }
.mobile-desktop-site .settlement-money-grid > span { padding: 14px 11px; border-radius: 16px; }
.mobile-desktop-site .settlement-money-grid small,
.mobile-desktop-site .settlement-dates small { font-size: 16px; }
.mobile-desktop-site .settlement-money-grid strong,
.mobile-desktop-site .settlement-dates strong { font-size: 21px; }
.mobile-desktop-site .settlement-review-note { padding: 13px 16px; border-radius: 14px; font-size: 18px; }
.mobile-desktop-site .item-summary { margin-top: 18px; font-size: 20px; }
.mobile-desktop-site .verification-row { gap: 12px; margin-top: 18px; }
.mobile-desktop-site .verification-pill { min-height: 45px; padding: 8px 14px; font-size: 20px; }
.mobile-desktop-site .cancelled-history,
.mobile-desktop-site .reference-items { margin-top: 32px; }
.mobile-desktop-site .cancelled-history > summary,
.mobile-desktop-site .reference-items > summary { min-height: 72px; padding: 18px 22px; font-size: 23px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 800; }
.field input, .field select, .field textarea, .search-input { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); color: var(--text); }
.field textarea { min-height: 96px; resize: vertical; }
.field small, .helper { color: var(--text-sub); font-size: 12px; line-height: 1.45; }
.button { min-height: 48px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; text-decoration: none; }
.button.primary { color: #fff; background: var(--primary); }
.button.secondary { color: var(--primary); background: var(--primary-light); }
.button.outline { color: var(--primary); background: var(--surface); border-color: var(--primary); }
.button.danger-outline { color: var(--error); background: var(--surface); border-color: var(--error); }
.button.full { width: 100%; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.text-button { min-height: 44px; border: 0; color: var(--primary); background: transparent; font-weight: 700; }

.card { padding: 17px; border: 1px solid rgba(196,198,212,.65); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0; }
.card + .card { margin-top: 12px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 5px; color: var(--text-sub); font-size: 12px; font-weight: 700; }
.section-title { margin: 18px 0 10px; font-size: 17px; }
.page-intro { margin: 2px 0 14px; }
.page-intro h2 { margin: 0 0 6px; font-size: 21px; color: var(--primary); }
.page-intro p { margin: 0; color: var(--text-sub); line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 12px; color: var(--text-sub); font-size: 13px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.badge { min-height: 28px; padding: 5px 9px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.draft { color: #42474e; background: #e2e5e8; }
.badge.submitted { color: #2748c7; background: #e8ecff; }
.badge.reviewing { color: #7a4900; background: #fff1d6; }
.badge.needs-fix, .badge.failed, .badge.duplicate { color: #9d1720; background: var(--error-bg); }
.badge.confirmed { color: #176329; background: #e1f4e5; }
.badge.paid { color: #0b4d8f; background: #e0efff; }
.badge.cancelled { color: #555; background: #eee; }
.badge.pending { color: #725300; background: #fff1bf; }
.badge.ready { color: #176329; background: #e1f4e5; }

.notice { padding: 13px 14px; border-radius: 12px; display: flex; gap: 10px; line-height: 1.45; font-size: 14px; }
.notice.info { color: #123d7c; background: var(--primary-light); }
.notice.warn { color: #6d4d00; background: #fff1bf; }
.notice.error { color: #8f111b; background: var(--error-bg); }
.notice.success { color: #176329; background: #e1f4e5; }
.notice + .notice { margin-top: 10px; }
.network-status { position: fixed; z-index: 100; top: var(--safe-top); left: 50%; transform: translateX(-50%); width: min(100%,480px); padding: 9px 16px; color: #fff; background: #7a5100; text-align: center; font-size: 13px; }
.toast-region { position: fixed; z-index: 110; left: 50%; bottom: calc(var(--safe-bottom) + 82px); transform: translateX(-50%); width: min(calc(100% - 32px), 440px); pointer-events: none; }
.toast { margin-top: 8px; padding: 13px 16px; border-radius: 12px; color: #fff; background: #2f3037; box-shadow: 0 8px 24px rgba(0,0,0,.22); line-height: 1.4; }

.approval-visual { width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); background: var(--primary-light); }
.approval-visual .icon { width: 44px; height: 44px; }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); opacity: .72; } }

.home-welcome { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #c9d8f2; border-radius: 14px; color: var(--primary); background: #f3f7ff; }
.home-welcome-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,var(--primary),var(--primary-container)); }
.home-welcome-icon .icon { width: 22px; height: 22px; }
.home-welcome p { margin: 0 0 2px; line-height: 1.35; }
.home-welcome strong { font-size: 16px; }
.home-welcome small { display: block; color: var(--text-sub); font-size: 12px; line-height: 1.4; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.quick-action { min-height: 58px; min-width: 0; padding: 8px 10px; border: 1px solid var(--outline); border-radius: 13px; background: var(--surface); color: var(--primary); display: flex; align-items: center; gap: 8px; font-weight: 800; box-shadow: 0 3px 10px rgba(0,39,114,.07); }
.quick-action-icon { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--primary); }
.quick-action .icon { width: 20px; height: 20px; }
.quick-action > span:last-child { min-width: 0; overflow-wrap: anywhere; text-align: left; }

.chat-panel { margin-top: 12px; }
.chat-panel .section-title { margin-top: 0; }
.messages { min-height: 220px; max-height: 55dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 12px; scroll-behavior: smooth; }
.message { max-width: 86%; padding: 12px 14px; border-radius: 14px; line-height: 1.52; white-space: pre-wrap; }
.message.assistant { align-self: stretch; width: 100%; max-width: 100%; padding: 0; color: var(--text); background: transparent; border: 0; }
.message.guide { align-self: flex-end; color: #fff; background: var(--primary-container); border-top-right-radius: 3px; }
.message.pending { color: var(--text-sub); font-style: italic; }
.message-content { display: grid; gap: 9px; white-space: normal; }
.ai-section { overflow: hidden; border: 1px solid var(--outline); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 12px rgba(0,39,114,.06); }
.ai-section-heading { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; color: var(--primary); background: var(--surface-low); font-size: .9rem; line-height: 1.3; }
.ai-section-heading span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--primary); font-size: .75rem; }
.ai-section-summary { padding: 13px 14px; border-color: #bfd1f2; background: #f3f7ff; }
.ai-section-summary .ai-section-heading { padding: 0 0 7px; background: transparent; }
.ai-summary-text { margin: 0; color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
.ai-table { display: grid; }
.ai-table-row { min-width: 0; display: grid; grid-template-columns: minmax(82px,.72fr) minmax(0,1.55fr); border-top: 1px solid var(--outline); }
.ai-table-row:first-child { border-top: 0; }
.ai-table-label, .ai-table-value { min-width: 0; padding: 10px 11px; overflow-wrap: anywhere; line-height: 1.45; }
.ai-table-label { color: var(--text-sub); background: #fafbfe; font-size: .8rem; font-weight: 700; }
.ai-table-value { color: var(--text); font-size: .88rem; }
.ai-section-notices { border-color: #ead39b; background: #fffaf0; }
.ai-section-notices .ai-section-heading { color: #7a5100; background: #fff3d6; }
.ai-section-notices .ai-section-heading span { background: #b87500; }
.ai-section-notices .ai-table-label { color: #7a5100; background: #fff8e8; }
@media (max-width: 350px) {
  .ai-table-row { grid-template-columns: 72px minmax(0,1fr); }
  .ai-table-label, .ai-table-value { padding: 9px; }
}
.chat-form { display: grid; grid-template-columns: 1fr 48px; gap: 8px; margin-top: 8px; }
.chat-form input { min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid var(--outline); border-radius: 999px; background: var(--surface); }
.chat-form button { width: 48px; height: 48px; border: 0; border-radius: 50%; color: #fff; background: var(--primary); }

.candidate { position: relative; width: 100%; text-align: left; overflow: hidden; }
.candidate::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); }
.candidate h3 { font-size: 17px; }
.candidate button { margin-top: 14px; }
.search-wrap { position: sticky; top: calc(var(--safe-top) + 56px); z-index: 5; margin: -7px -2px 12px; padding: 8px 2px; background: var(--background); }
.empty { padding: 36px 18px; border: 1px dashed var(--outline); border-radius: var(--radius); text-align: center; color: var(--text-sub); background: var(--surface); }
.empty .icon { width: 38px; height: 38px; color: var(--primary); }

.upload-drop { min-height: 132px; padding: 18px; border: 2px dashed var(--outline); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; color: var(--primary); }
.upload-drop .icon { width: 36px; height: 36px; }
.upload-choice { min-height: 96px; padding: 12px; border: 1px solid var(--outline); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--primary); background: var(--surface); text-align: center; cursor: pointer; }
.upload-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.upload-item { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-low); }
.upload-thumb { width: 58px; height: 58px; grid-row: span 2; border-radius: 8px; object-fit: cover; background: var(--surface-high); }
.upload-item p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item small { color: var(--text-sub); }
.upload-remove { grid-column: 2; justify-self: start; min-height: 44px; padding: 0; }
.upload-retry { grid-column: 3; min-height: 44px; padding: 7px 10px; }
.progress { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-high); }
.progress span { display: block; height: 100%; background: var(--primary); transition: width .25s; }

.receipt-card { padding: 0; overflow: hidden; }
.receipt-image { width: 100%; height: 168px; object-fit: cover; background: var(--surface-high); display: block; }
.receipt-image-placeholder { height: 100px; display: grid; place-items: center; color: var(--text-sub); background: var(--surface-low); }
.receipt-body { padding: 15px; }
.receipt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.receipt-grid .wide { grid-column: 1 / -1; }
.receipt-grid input, .receipt-grid select { min-width: 0; }
.receipt-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin: 12px 0 18px; }
.stat { padding: 10px 5px; border-radius: 10px; background: var(--surface); text-align: center; border: 1px solid var(--outline); }
.stat strong { display: block; font-size: 18px; color: var(--primary); }
.stat span { color: var(--text-sub); font-size: 11px; }

.money-list { display: flex; flex-direction: column; }
.money-row { min-height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--surface-high); }
.money-row:last-child { border-bottom: 0; }
.money-row span:first-child { color: var(--text-sub); }
.money-row strong { font-variant-numeric: tabular-nums; }
.money-total { margin-top: 12px; padding: 15px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--primary-light); color: var(--primary); }
.money-total strong { font-size: 22px; }

.history-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.history-amounts span { padding: 11px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-low); }
.history-amounts small { color: var(--text-sub); font-size: 12px; }
.history-amounts strong { color: var(--primary); font-size: 16px; font-variant-numeric: tabular-nums; }
.settlement-balance-card { margin-bottom: 14px; padding: 18px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #07317f, #0751b8); box-shadow: 0 12px 24px rgba(0,39,114,.18); }
.settlement-balance-card > small { display: block; color: rgba(255,255,255,.82); font-weight: 800; }
.settlement-balance-card > strong { display: block; margin-top: 4px; font-size: 30px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.settlement-balance-card > p { margin: 7px 0 13px; color: rgba(255,255,255,.82); font-size: 12px; line-height: 1.45; }
.settlement-balance-card > div { padding-top: 11px; border-top: 1px solid rgba(255,255,255,.24); display: flex; flex-wrap: wrap; gap: 7px 16px; font-size: 12px; }
.settlement-balance-card b { margin-left: 3px; font-variant-numeric: tabular-nums; }
.settlement-list { margin-top: 14px; }
.settlement-card { padding: 15px; }
.payment-badge { min-height: 27px; padding: 5px 9px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 11px; font-weight: 900; white-space: nowrap; }
.payment-badge.unpaid { color: #9d1720; background: #ffebed; }
.payment-badge.partial { color: #7a4900; background: #fff1d6; }
.payment-badge.paid { color: #176329; background: #e1f4e5; }
.payment-badge.none { color: #555; background: #eceef1; }
.payment-badge.review,
.payment-badge.unknown { color: #2748c7; background: #e8ecff; }
.settlement-net { margin-top: 13px; padding: 12px 13px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--primary-light); }
.settlement-net small { color: var(--primary); font-weight: 800; }
.settlement-net strong { color: var(--primary); font-size: 20px; font-variant-numeric: tabular-nums; }
.settlement-money-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.settlement-money-grid > span { min-width: 0; padding: 9px 7px; border-radius: 10px; display: grid; gap: 3px; background: var(--surface-low); }
.settlement-money-grid small { color: var(--text-sub); font-size: 10px; }
.settlement-money-grid strong { overflow-wrap: anywhere; font-size: 13px; font-variant-numeric: tabular-nums; }
.settlement-money-grid .balance strong { color: var(--primary); }
.settlement-dates { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--surface-high); display: flex; flex-wrap: wrap; gap: 8px 18px; }
.settlement-dates > span { display: grid; gap: 2px; }
.settlement-dates small { color: var(--text-sub); font-size: 10px; }
.settlement-dates strong { font-size: 12px; }
.settlement-review-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 9px; color: #604000; background: #fff6df; font-size: 11px; line-height: 1.45; }
.item-summary { margin: 12px 0 0; color: var(--text-sub); font-size: 12px; line-height: 1.45; }
.verification-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.verification-pill { min-height: 28px; padding: 5px 9px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; }
.verification-pill.ok { color: #176329; background: #e1f4e5; }
.verification-pill.warn { color: #7a4900; background: #fff1d6; }
.verification-pill.neutral { color: #555; background: #e9eaed; }
.verification-card .verification-row { margin-top: 0; }
.verification-card .helper { margin-bottom: 0; }
.cancelled-history,
.reference-items { margin-top: 20px; }
.cancelled-history > summary,
.reference-items > summary { min-height: 48px; padding: 11px 14px; border: 1px solid var(--outline); border-radius: 12px; color: var(--primary); background: var(--surface); font-weight: 800; cursor: pointer; }
.cancelled-history[open] > summary,
.reference-items[open] > summary { margin-bottom: 12px; }
.detail-item.reference strong { color: var(--text-sub); font-size: 13px; }

.list-button { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.list-button .card { transition: transform .15s, border-color .15s; }
.list-button:active .card { transform: scale(.985); border-color: var(--primary); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; min-height: 46px; padding: 1px 0 14px 36px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 22px; bottom: -1px; width: 1px; background: var(--outline); }
.timeline li:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 0; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--draft); font-size: 12px; font-weight: 900; }
.timeline-dot.done { background: var(--confirmed); }
.timeline p { margin: 0; }
.timeline small { color: var(--text-sub); }

.sticky-actions { position: sticky; bottom: calc(68px + var(--safe-bottom)); z-index: 9; margin: 18px -16px -18px; padding: 12px 16px; background: rgba(255,255,255,.96); border-top: 1px solid var(--outline); backdrop-filter: blur(10px); }
.no-nav .sticky-actions { bottom: 0; margin-bottom: calc(-1 * var(--safe-bottom)); padding-bottom: calc(12px + var(--safe-bottom)); }
.danger-zone { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--outline); }

/* 카카오 정산 순서를 모바일에서 직접 따라가는 단계형 작성 화면. */
.batch-screen { display: flex; flex-direction: column; gap: 10px; }
.batch-screen .batch-identity { margin-bottom: 0; }
.collection-progress {
  margin: 0 -2px;
  padding: 4px 2px 7px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(61px, 1fr);
  gap: 6px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}
.collection-progress li { min-width: 0; display: grid; justify-items: center; gap: 4px; color: var(--text-sub); font-size: 10px; white-space: nowrap; }
.collection-progress li span { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: var(--text-sub); background: var(--surface-high); font-size: 11px; font-weight: 900; }
.collection-progress li.done { color: var(--confirmed); }
.collection-progress li.done span { color: #fff; background: var(--confirmed); }
.collection-progress li.current { color: var(--primary); }
.collection-progress li.current span { color: #fff; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.collection-card { padding: 15px; }
.stage-heading { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-items: start; }
.stage-number { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--primary); font-size: 15px; font-weight: 900; }
.stage-heading h2 { margin: 0 0 4px; color: var(--primary); font-size: 20px; line-height: 1.3; }
.stage-heading p { margin: 0; color: var(--text-sub); font-size: 13px; line-height: 1.45; }
.stage-subtitle { margin: 16px 0 9px; color: var(--text); font-size: 15px; }
.upload-buttons .upload-choice { min-height: 72px; padding: 8px; }
.stage-results { display: grid; gap: 8px; }
.stage-result { min-width: 0; padding: 11px 12px; border: 1px solid var(--surface-high); border-radius: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; background: var(--surface-low); }
.stage-result > div { min-width: 0; display: grid; gap: 3px; }
.stage-result .eyebrow { overflow-wrap: anywhere; }
.stage-result strong { overflow-wrap: anywhere; }
.stage-result small { color: var(--text-sub); }
.stage-empty { padding: 13px; border-radius: 12px; color: var(--text-sub); background: var(--surface-low); font-size: 13px; text-align: center; }
.collection-card > .button.full:last-child { margin-top: 14px; }
.namsan-modes { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.namsan-modes button { min-height: 48px; padding: 9px; border: 1px solid var(--outline); border-radius: 12px; color: var(--primary); background: var(--surface); font-weight: 800; }
.namsan-modes button.selected { color: #fff; border-color: var(--primary); background: var(--primary); }
.card-inset { margin-top: 13px; padding: 13px; border-radius: 12px; display: grid; gap: 10px; background: var(--surface-low); }
.or-divider { position: relative; margin: 14px 0 0; color: var(--text-sub); font-size: 12px; text-align: center; }
.or-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--outline); }
.or-divider span { position: relative; padding: 0 9px; background: var(--surface); }
.compact-form { margin-top: 15px; gap: 12px; }
.compact-stats { margin-bottom: 12px; }
.bulk-upload { margin: 0; }
.bulk-upload > summary { min-height: 44px; padding: 10px 12px; border-radius: 12px; color: var(--primary); background: var(--primary-light); font-size: 13px; font-weight: 800; cursor: pointer; }
.bulk-upload[open] > summary { margin-bottom: 8px; }
.bulk-upload .card { box-shadow: none; }
.batch-screen > .upload-list { margin-top: 0; }
.batch-screen > #upload-selected { margin-top: 0; }

.mobile-desktop-site .collection-progress { grid-auto-columns: minmax(98px, 1fr); gap: 10px; padding-block: 10px 14px; }
.mobile-desktop-site .collection-progress li { gap: 8px; font-size: 17px; }
.mobile-desktop-site .collection-progress li span { width: 43px; height: 43px; font-size: 18px; }
.mobile-desktop-site .stage-heading { grid-template-columns: 58px minmax(0,1fr); gap: 17px; }
.mobile-desktop-site .stage-number { width: 55px; height: 55px; border-radius: 17px; font-size: 23px; }
.mobile-desktop-site .stage-heading h2 { font-size: 31px; }
.mobile-desktop-site .stage-heading p { font-size: 21px; }
.mobile-desktop-site .stage-subtitle { margin-top: 26px; font-size: 24px; }
.mobile-desktop-site .stage-result { padding: 18px 20px; border-radius: 18px; }
.mobile-desktop-site .stage-result small,
.mobile-desktop-site .stage-empty,
.mobile-desktop-site .bulk-upload > summary { font-size: 20px; }

@media (max-width: 350px) {
  .screen { padding-left: 12px; padding-right: 12px; }
  .language-tabs button { padding-inline: 9px; }
  .brand img { width: 180px; }
  .button-row, .receipt-grid { grid-template-columns: 1fr; }
  .receipt-grid .wide { grid-column: auto; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* 과거 정산 카드의 상세·정산서 동작과 Drive 보존 이미지를 분리한다. */
.history-main {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.history-main:active { transform: scale(.992); }
.history-actions {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 10px;
  margin-top: 14px;
}
.history-actions .button { min-width: 0; padding-inline: 12px; }
.archive-source {
  margin: 12px 0 0;
  color: #18733b;
  font-size: .86rem;
  font-weight: 800;
}
.stored-text-card > p:not(.eyebrow):not(.helper) {
  margin: 6px 0 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.drive-image-grid { display: grid; gap: 12px; }
.drive-image-card { padding: 12px; }
.drive-image-card p { margin: 10px 0 0; font-size: .88rem; overflow-wrap: anywhere; }
.drive-image-card .receipt-image-placeholder { min-height: 180px; border-radius: 12px; overflow: hidden; }
.drive-image-card .receipt-image-placeholder img { width: 100%; height: auto; display: block; }

