:root {
  --brand: #ff7a1a;
  --brand-dark: #e8650a;
  --brand-soft: #fff3ea;
  --ink: #191f28;
  --ink-2: #4e5968;
  --ink-3: #8b95a1;
  --line: #e5e8eb;
  --bg: #f2f4f6;
  --card: #ffffff;
  --ok: #12b886;
  --ok-soft: #e6fcf5;
  --danger: #f03e3e;
  --danger-soft: #fff0f0;
  --blue: #3182f6;
  --blue-soft: #e8f3ff;
  --radius: 14px;
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* 모바일 앱처럼 가운데 고정 폭 */
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.app.no-nav { padding-bottom: 32px; }
.app.has-actionbar { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 96px); }

/* 상단 바 */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); height: 56px; display: flex; align-items: center; padding: 0 16px; gap: 8px; }
.topbar .logo { font-weight: 800; font-size: 20px; color: var(--brand); letter-spacing: -0.5px; }
.topbar .logo small { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.topbar h1 { font-size: 17px; margin: 0; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { width: 36px; height: 36px; display: grid; place-items: center; margin-left: -8px; border-radius: 10px; }
.topbar .back svg { width: 22px; height: 22px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12px; color: var(--ink-2); background: var(--bg); padding: 4px 10px; border-radius: 99px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 하단 탭 */
.bottomnav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; z-index: 30; background: #fff; border-top: 1px solid var(--line); display: flex; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--ink-3); font-weight: 600; position: relative; }
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.on { color: var(--ink); }
.bottomnav a.on svg { color: var(--brand); }
.bottomnav .dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; display: grid; place-items: center; }

/* 공통 블록 */
.wrap { padding: 16px; }
.section { background: var(--card); margin-bottom: 10px; padding: 20px 16px; }
.section > h2, .sec-title { font-size: 17px; margin: 0 0 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sec-title .more { margin-left: auto; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 알림 메시지 */
.flash { margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.flash.ok { background: var(--ok-soft); color: #087f5b; }
.flash.err { background: var(--danger-soft); color: #c92a2a; }
.notice { background: var(--brand-soft); color: #a8470a; border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.notice.blue { background: var(--blue-soft); color: #1b64da; }
.notice.gray { background: var(--bg); color: var(--ink-2); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.btn:active { background: var(--brand-dark); }
.btn.block { width: 100%; }
.btn.lg { height: 54px; font-size: 16px; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.gray { background: #f2f4f6; color: var(--ink-2); }
.btn.line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.dark { background: var(--ink); }
.btn.ok { background: var(--ok); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #ffc9c9; }
.btn.blue { background: var(--blue); }
.btn[disabled] { background: #d1d6db; color: #fff; }
.btns { display: flex; gap: 8px; }
.btns > * { flex: 1; }
form.inline { display: inline; }

/* 배지 */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge.bidding { background: var(--brand-soft); color: var(--brand-dark); }
.badge.closed { background: var(--blue-soft); color: var(--blue); }
.badge.sold { background: var(--ok-soft); color: #087f5b; }
.badge.unsold, .badge.cancelled { background: #f1f3f5; color: var(--ink-3); }
.badge.urgent { background: var(--danger); color: #fff; }
.badge.mine { background: var(--ink); color: #fff; }
.badge.pending { background: #fff9db; color: #e67700; }
.badge.approved { background: var(--ok-soft); color: #087f5b; }
.badge.rejected, .badge.suspended { background: var(--danger-soft); color: var(--danger); }
.badge.seller { background: var(--blue-soft); color: var(--blue); }
.badge.dealer { background: var(--brand-soft); color: var(--brand-dark); }

/* 탭 */
.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 15; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 13px 12px 11px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a .n { color: var(--brand); margin-left: 2px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; background: #fff; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 검색/필터 */
.searchbar { background: #fff; padding: 12px 16px 0; }
.searchbar form { display: flex; gap: 8px; }
.search-input { flex: 1; height: 44px; border-radius: 12px; border: 0; background: var(--bg); padding: 0 14px 0 40px; font-size: 15px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238b95a1' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
.search-input:focus { outline: 2px solid var(--brand); }
.filter-row { display: flex; gap: 6px; padding: 10px 16px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.filter-row select { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.listhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; font-size: 13px; color: var(--ink-2); }
.listhead b { color: var(--ink); }

/* 차량 카드 */
.carlist { padding: 0 16px; }
.carcard { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px; margin-bottom: 10px; position: relative; }
.carcard .thumb { width: 120px; height: 90px; border-radius: 10px; background: #e9ecef center/cover no-repeat; flex: none; position: relative; overflow: hidden; }
.carcard .thumb .timer { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(25,31,40,.72); color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 3px 0; }
.carcard .thumb .timer.urgent { background: rgba(240,62,62,.92); }
.carcard .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.carcard .plate { font-size: 12px; color: var(--ink-3); }
.carcard .name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carcard .spec { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 4px; }
.carcard .price { font-size: 16px; font-weight: 800; color: var(--ink); }
.carcard .price.brand { color: var(--brand); }
.carcard .price { text-align: right; line-height: 1.15; white-space: nowrap; }
.carcard .price small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.carcard .fav { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; background: none; color: #d1d6db; padding: 0; display: grid; place-items: center; }
.carcard .fav.on { color: var(--brand); }
.carcard .fav svg { width: 20px; height: 20px; }
.empty { text-align: center; color: var(--ink-3); padding: 60px 16px; font-size: 14px; }
.empty svg { width: 48px; height: 48px; color: #d1d6db; margin: 0 auto 10px; display: block; }

/* 상세: 사진 */
.gallery { position: relative; background: #000; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: none; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.gallery .count { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 99px; }
.gallery .label { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 99px; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: #fff; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; opacity: .55; cursor: pointer; }
.thumbs img.on { opacity: 1; outline: 2px solid var(--brand); }

.headinfo { background: #fff; padding: 16px 16px 20px; margin-bottom: 10px; }
.headinfo .plate { font-size: 13px; color: var(--ink-3); }
.headinfo h2 { font-size: 21px; margin: 4px 0 2px; letter-spacing: -0.3px; }
.headinfo .trim { color: var(--ink-2); font-size: 14px; }
.headinfo .spec { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.countdown-box { margin-top: 16px; border-radius: 12px; background: var(--ink); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.countdown-box.urgent { background: var(--danger); }
.countdown-box.closed { background: var(--blue); }
.countdown-box.done { background: #868e96; }
.countdown-box .t { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.countdown-box .l { font-size: 12px; opacity: .8; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 12px; background: var(--bg); border-radius: 12px; padding: 12px 0; }
.stats3 > div { text-align: center; border-left: 1px solid var(--line); }
.stats3 > div:first-child { border-left: 0; }
.stats3 .k { font-size: 12px; color: var(--ink-3); }
.stats3 .v { font-size: 15px; font-weight: 700; margin-top: 2px; }

dl.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
dl.spec-grid > div { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
dl.spec-grid > div:nth-child(odd) { padding-right: 8px; }
dl.spec-grid dt { font-size: 12px; color: var(--ink-3); }
dl.spec-grid dd { margin: 0; font-size: 14.5px; font-weight: 600; }
dl.spec-grid > div.full { grid-column: 1 / -1; }
.opt-list { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-list span { background: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.desc { white-space: pre-wrap; font-size: 14.5px; color: var(--ink-2); }

.contact { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.contact .avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--brand); flex: none; }
.contact a.tel { margin-left: auto; color: var(--blue); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* 입찰 리스트 (판매처/관리자) */
.bidrow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bidrow:last-child { border-bottom: 0; }
.bidrow .rank { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--ink-2); flex: none; }
.bidrow.top .rank { background: var(--brand); color: #fff; }
.bidrow .amt { font-weight: 800; font-size: 16px; white-space: nowrap; }
.bidrow.win { background: var(--ok-soft); margin: 0 -16px; padding: 12px 16px; }

/* 하단 고정 액션바 (상세) */
.actionbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b)); width: 100%; max-width: 640px; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; z-index: 25; display: flex; gap: 8px; align-items: center; box-shadow: 0 -4px 16px rgba(0,0,0,.04); }
.actionbar .mybid { flex: 1; min-width: 0; }
.actionbar .mybid .k { font-size: 12px; color: var(--ink-3); }
.actionbar .mybid .v { font-size: 18px; font-weight: 800; }

/* 바텀시트 */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: none; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 640px; background: #fff; border-radius: 20px 20px 0 0; z-index: 51; padding: 12px 20px calc(20px + var(--safe-b)); transition: transform .25s ease; max-height: 90vh; overflow-y: auto; }
.sheet.open { transform: translate(-50%, 0); }
.sheet-bg.open { display: block; }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { margin: 0 0 4px; font-size: 19px; }
.amount-input { position: relative; margin-top: 16px; }
.amount-input input { width: 100%; height: 64px; border: 2px solid var(--line); border-radius: 14px; font-size: 26px; font-weight: 800; padding: 0 70px 0 16px; text-align: right; }
.amount-input input:focus { border-color: var(--brand); outline: none; }
.amount-input .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 700; color: var(--ink-2); }
.amount-hint { text-align: right; font-size: 13px; color: var(--ink-3); margin-top: 6px; min-height: 20px; }
.quick-add { display: flex; gap: 6px; margin-top: 10px; }
.quick-add button { flex: 1; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* 메모 */
.memo-box textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; resize: vertical; font-size: 15px; background: #fffdf5; }
.memo-box textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.memo-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.memo-photos .ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg); }
.memo-photos .ph img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.memo-photos .ph form { position: absolute; top: 4px; right: 4px; }
.memo-photos .ph button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; padding: 0; }
.memo-photos label.add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed #c5ccd3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); font-size: 12px; font-weight: 600; cursor: pointer; }
.memo-photos label.add svg { width: 26px; height: 26px; }
.save-state { font-size: 12px; color: var(--ink-3); }

/* 폼 */
.form-sec { background: #fff; padding: 20px 16px; margin-bottom: 10px; }
.form-sec h3 { margin: 0 0 16px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.form-sec h3 .req { color: var(--brand); font-size: 12px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > label .r, .field > .lbl .r { color: var(--brand); }
.input, .field input[type=text], .field input[type=password], .field input[type=tel], .field input[type=number], .field input[type=date], .field input[type=datetime-local], .field select, .field textarea {
  width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 15px; background: #fff; -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b95a1' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,122,26,.15); }
.field .help { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.with-unit { position: relative; }
.with-unit input { padding-right: 48px !important; }
.with-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { flex: 1; }
.seg input { display: none; }
.seg span { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { cursor: pointer; }
.checks input { display: none; }
.checks span { display: inline-flex; height: 36px; align-items: center; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.checks input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.quick-dl { display: flex; gap: 6px; margin-top: 8px; }
.quick-dl button { flex: 1; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }

/* 사진 업로드 */
.uploader { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.uploader .ph, .uploader label.add { aspect-ratio: 1; border-radius: 10px; overflow: hidden; position: relative; background: var(--bg); }
.uploader .ph img { width: 100%; height: 100%; object-fit: cover; }
.uploader .ph .del { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; cursor: pointer; }
.uploader .ph .del input { display: none; }
.uploader .ph.removed { opacity: .3; }
.uploader .ph .tag { position: absolute; left: 4px; bottom: 4px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.uploader label.add { border: 1.5px dashed #c5ccd3; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); font-size: 11px; font-weight: 600; cursor: pointer; gap: 2px; background: #fff; }
.uploader label.add svg { width: 24px; height: 24px; }
.uploader input[type=file] { display: none; }
.regbox { display: flex; align-items: center; gap: 12px; border: 1.5px dashed #c5ccd3; border-radius: 12px; padding: 14px; cursor: pointer; }
.regbox .pv { width: 72px; height: 54px; border-radius: 8px; background: var(--bg) center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--ink-3); }
.regbox input { display: none; }
.form-bottom { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); background: #fff; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); z-index: 10; }

/* 로그인/가입 */
.auth { min-height: 100vh; background: #fff; padding: 56px 24px 40px; max-width: 480px; margin: 0 auto; }
.auth .brand { font-size: 34px; font-weight: 900; color: var(--brand); letter-spacing: -1px; }
.auth .tagline { color: var(--ink-2); margin: 6px 0 36px; font-size: 15px; }
.auth .err { background: var(--danger-soft); color: #c92a2a; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; font-weight: 600; }
.auth .links { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.auth .links a { color: var(--brand); font-weight: 700; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.roles label { cursor: pointer; }
.roles input { display: none; }
.roles .box { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 14px; height: 100%; }
.roles .box b { display: block; font-size: 16px; }
.roles .box span { font-size: 12px; color: var(--ink-3); }
.roles input:checked + .box { border-color: var(--brand); background: var(--brand-soft); }
.roles input:checked + .box b { color: var(--brand-dark); }

/* 대시보드 */
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #fff; border-radius: 14px; padding: 14px; }
.stat .k { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.stat .v { font-size: 24px; font-weight: 800; margin-top: 2px; }
.stat.hl { background: var(--brand); color: #fff; }
.stat.hl .k { color: rgba(255,255,255,.85); }
.hero { background: linear-gradient(135deg, #ff7a1a, #ff9a4d); color: #fff; border-radius: 16px; padding: 20px; margin-bottom: 12px; }
.hero h2 { margin: 0; font-size: 20px; }
.hero p { margin: 4px 0 14px; opacity: .9; font-size: 14px; }
.hero .btn { background: #fff; color: var(--brand-dark); }

.member { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.member .avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.member .avatar.seller { background: var(--blue-soft); color: var(--blue); }
.member .avatar.dealer { background: var(--brand-soft); color: var(--brand-dark); }
.member .acts { display: flex; gap: 6px; }

table.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.kv th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 9px 0; width: 32%; vertical-align: top; }
table.kv td { padding: 9px 0; font-weight: 600; }

/* 사진 확대 */
.viewer { position: fixed; inset: 0; background: #000; z-index: 100; display: none; flex-direction: column; }
.viewer.open { display: flex; }
.viewer .vtop { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 12px 16px; }
.viewer .vtop button { background: none; border: 0; color: #fff; font-size: 28px; line-height: 1; }
.viewer .vtrack { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer .vtrack::-webkit-scrollbar { display: none; }
.viewer .vtrack img { flex: none; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }

@media (min-width: 641px) {
  body { background: #e9ecef; }
  .app { box-shadow: 0 0 0 1px var(--line); }
}
