/* 고객용 사이트 — 모바일 우선, 브랜드: 로고의 진보라(#3d1b9a)·보라빛 파랑(#666dff) */
:root {
  --brand: #3d1b9a; --brand-2: #666dff; --brand-50: #f3f1fd; --brand-100: #e6e1fb;
  --ink: #16151c; --ink-2: #4a4858; --muted: #686675; --line: #e7e5ef; --line-2: #f1f0f6; --bg: #fff; --bg-soft: #f8f7fc;
  --danger: #c9252b; --success: #0b7a3b; --warn: #f5a524;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(22, 21, 28, .06), 0 8px 24px rgba(22, 21, 28, .06);
  --wrap: 1200px; --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 15px; line-height: 1.6; color: var(--ink); background: var(--bg); word-break: keep-all; }
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
/* 문장 안 링크는 색만으로 구분하지 않는다 */
p a.text-brand, .help a.text-brand, .document-des a, .alert a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0 0 .75em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--brand); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-2) 55%, transparent); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); } .text-success { color: var(--success); } .text-brand { color: var(--brand); }
.hidden { display: none !important; }
/* hidden 속성은 클래스의 display 규칙(.modal·.site-popup 의 flex 등)보다 우선해야 한다 */
[hidden] { display: none !important; }

/* 상단 공지 */
.topbar { background: var(--brand); color: #fff; font-size: 13px; }
.topbar .wrap { display: flex; gap: 10px; align-items: center; min-height: 36px; }
.topbar a { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-label { flex: none; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .18); }

/* 헤더 */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo img { display: block; width: auto; height: 32px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--line-2); }
.gnb { flex: 1; }
.gnb > ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gnb > ul > li { position: relative; }
.gnb > ul > li > a { display: block; padding: 10px 14px; font-weight: 600; border-radius: 10px; }
.gnb > ul > li.on > a { color: var(--brand); }
.gnb > ul > li:hover > a, .gnb > ul > li:focus-within > a { background: var(--brand-50); color: var(--brand); }
.gnb-sub { position: absolute; left: 0; top: 100%; min-width: 180px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s; }
.gnb > ul > li:hover .gnb-sub, .gnb > ul > li:focus-within .gnb-sub { opacity: 1; visibility: visible; transform: none; }
.gnb-sub a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.gnb-sub a:hover { background: var(--brand-50); }
.mercari { display: flex; align-items: center; background: var(--line-2); border-radius: 99px; padding: 0 4px 0 14px; height: 40px; width: 220px; }
.mercari input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; outline: none; }
.mercari:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 55%, transparent); background: #fff; }
.mercari button { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 99px; cursor: pointer; color: var(--ink-2); }
.user-links { display: flex; align-items: center; gap: 12px; font-size: 14px; white-space: nowrap; }
.user-name strong { color: var(--brand); }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-btn:hover { color: var(--brand); }
.drawer-group .link-btn { display: block; width: 100%; text-align: left; padding: 10px 12px; color: var(--ink-2); }
.menu-open { display: none; }

/* 서랍 메뉴 (모바일) */
.drawer { position: fixed; inset: 0; z-index: 85; background: rgba(22, 21, 28, .45); }
.drawer-panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(86vw, 360px); background: #fff; overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.mercari-drawer { width: 100%; margin-bottom: 12px; }
.mercari-drawer input { font-size: 16px; } /* 16px 미만이면 iOS 가 누를 때 확대한다 */
.csv-pop { position: absolute; z-index: 5; margin-top: 6px; right: 16px; }
.mercari-drawer button { width: auto; padding: 0 12px; font-size: 14px; }
.drawer-group { border-bottom: 1px solid var(--line); }
.drawer-group summary { list-style: none; padding: 14px 4px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; }
.drawer-group summary::after { content: "+"; color: var(--muted); }
.drawer-group[open] summary::after { content: "−"; }
.drawer-group a { display: block; padding: 10px 12px; color: var(--ink-2); }

/* 공통 컴포넌트 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; text-align: center; white-space: nowrap; transition: .12s; }
.btn:hover { border-color: var(--brand-2); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #321580; color: #fff; }
.btn-accent { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-accent:hover { background: #5057f0; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-brand { background: var(--brand-50); color: var(--brand); }
.badge-danger { background: #fdecec; color: var(--danger); }
.badge-success { background: #e7f6ee; color: var(--success); }
.badge-warn { background: #fef4e2; color: #8a5300; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; }
.alert-brand { background: var(--brand-50); border-color: var(--brand-100); }
.alert-danger { background: #fdecec; border-color: #f9caca; color: #a3262a; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }

/* 폼 */
.field { margin-bottom: 16px; }
.field > label, .field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.req::after { content: " *"; color: var(--danger); }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--brand-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.input[readonly] { background: var(--bg-soft); }
.input.invalid { border-color: var(--danger); }
.help { margin-top: 6px; font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.row > .input { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; cursor: pointer; background: #fff; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand-2) 55%, transparent); }

/* 표 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.table thead th { background: var(--bg-soft); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .center { text-align: center; }

/* 페이지 머리·하위 페이지 */
.page-head { padding: 36px 0 20px; }
.page-head h1 { font-size: 28px; margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sub { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-bottom: 72px; align-items: start; }
.sub-nav { position: sticky; top: calc(var(--header-h) + 16px); }
.sub-nav h2 { font-size: 15px; color: var(--muted); margin: 0 0 8px 12px; }
.sub-nav a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.sub-nav a.on { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.sub-nav a:hover { background: var(--line-2); }
.sub-body { min-width: 0; }
.sub-tabs { display: none; }
.pagination { display: flex; justify-content: center; gap: 4px; margin: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; }
.pagination a:hover { background: var(--line-2); }
.pagination .on { background: var(--brand); color: #fff; font-weight: 700; }

/* 홈 */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #7b82ff33, transparent), linear-gradient(180deg, var(--brand-50), #fff); padding: 56px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.25; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 17px; color: var(--ink-2); margin-bottom: 24px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.calc { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 24px; }
.calc h2 { font-size: 18px; }
.calc-result { margin-top: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--brand-50); display: flex; justify-content: space-between; align-items: baseline; }
.calc-result strong { font-size: 26px; color: var(--brand); font-variant-numeric: tabular-nums; }
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 20px; }
.section-title h2 { font-size: 26px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { font-size: 14px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: .15s; }
.tile:hover { border-color: var(--brand-2); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.tile strong { display: block; font-size: 16px; margin-bottom: 4px; }
.tile span { font-size: 14px; color: var(--muted); }
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.home-cols > * { min-width: 0; } /* 긴 제목이 칸을 밀어 화면 폭을 넓히지 않게 */
.list-links { margin: 0; padding: 0; list-style: none; }
.list-links li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.list-links li > span { flex: none; }
.list-links a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.address-card dt { color: var(--muted); }
.address-card dd { margin: 0; font-weight: 600; }
.copy-btn { margin-left: 6px; }
.banner-slide { border-radius: var(--radius); overflow: hidden; }

/* 핫딜 상품 */
.goods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.goods { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.goods-thumb { aspect-ratio: 1; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.goods-thumb img { width: 100%; height: 100%; object-fit: cover; }
.goods-body { padding: 12px 14px 16px; }
.goods-name { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; }
.goods-price { font-weight: 800; font-size: 17px; margin-top: 6px; }
.goods-price del { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 6px; }

/* 신청서 */
.apply-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.apply-item + .apply-item { margin-top: 12px; }
.apply-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.apply-item-head .idx { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.apply-item-grid { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.photo-slot { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: var(--muted); cursor: pointer; overflow: hidden; background: var(--bg-soft); position: relative; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sticky-bar { position: sticky; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 24px; }
.sticky-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.total { font-size: 14px; color: var(--ink-2); }
.total strong { font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; margin-left: 6px; }
.fee-list { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.fee-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.fee-list li.sum { border: 0; font-weight: 800; font-size: 16px; padding-top: 12px; }

/* 마이페이지 */
.my-summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.my-summary .card { padding: 16px; }
.my-summary .label { font-size: 13px; color: var(--muted); }
.my-summary .value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.status-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.status-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.status-group h3 { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.status-group a { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.status-group a b { font-variant-numeric: tabular-nums; }
.status-group a.on { color: var(--brand); font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters .input { width: auto; min-height: 40px; font-size: 14px; }
.order-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.order-card + .order-card { margin-top: 12px; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.order-items { margin: 0; padding: 0; list-style: none; }
.order-items li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.order-items .thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--bg-soft); object-fit: cover; }
.order-items .name { font-size: 14px; font-weight: 600; }
.order-items .meta { font-size: 13px; color: var(--muted); }
.timeline { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.timeline li { position: relative; padding: 0 0 12px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-2); }

/* 게시판 */
.board-list .subject { font-weight: 600; }
.board-list .subject .count { color: var(--brand); font-size: 13px; margin-left: 4px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { padding: 16px 4px; cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: 10px; }
.faq-item summary::before { content: "Q"; color: var(--brand); font-weight: 800; }
.faq-item .answer { padding: 0 4px 18px 28px; color: var(--ink-2); }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 20px; }
.article-head h1 { font-size: 22px; }
.article-body { min-height: 160px; overflow-wrap: anywhere; }
.article-body img { border-radius: 8px; }
.comment { border-top: 1px solid var(--line-2); padding: 14px 0; }
.answer-box { margin-top: 24px; padding: 18px; border-radius: var(--radius); background: var(--brand-50); }

/* 이용안내 문서(원본 본문 클래스) */
.document .article + .article { margin-top: 40px; }
.document .document-tit { font-size: 22px; }
.document .document-sub-tit { font-size: 18px; margin-bottom: 10px; }
.document .document-des { color: var(--ink-2); }
.document .img-box { display: flex; gap: 20px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.document .img-box + .img-box { margin-top: 12px; }
.document .img-icon { flex: none; width: 72px; }
.document .text-box h4, .document .text-box h5 { font-size: 16px; margin-bottom: 4px; }
.document .bg-grey { background: var(--bg-soft); border-radius: var(--radius); padding: 18px; }
.document .hyphen { position: relative; padding-left: 12px; margin-bottom: 4px; }
.document .hyphen::before { content: "-"; position: absolute; left: 0; color: var(--muted); }
.document .table-wrap { margin: 12px 0; }
.document table.table-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.document table.table-list th, .document table.table-list td { border: 1px solid var(--line); padding: 10px; vertical-align: top; }
.document table.table-list th { background: var(--bg-soft); }
.document .main-color { color: var(--brand); }
.document .num { color: var(--brand); font-weight: 700; }
.document .tab-wrap .use-tabs { display: flex; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.document .tab-wrap .use-tabs a { display: block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; }
.document .tab-wrap .use-tabs .active a { background: var(--brand); color: #fff; border-color: var(--brand); }
.document .tab-pane { display: none; }
.document .tab-pane.active { display: block; }
.document .visible-xs { display: none; }
.document .text-center { text-align: center; } .document .text-left { text-align: left; }
.document .mt50 { margin-top: 40px; } .document .mt45 { margin-top: 32px; }

/* 푸터·토스트·팝업 */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; color: var(--ink-2); }
.footer-info { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.copyright { margin-top: 10px; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 14px 16px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 14px; animation: toast-in .2s ease-out; }
.toast-error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.site-popup { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, var(--w)); max-height: 86vh; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.site-popup-body { overflow-y: auto; padding: 16px; }
.site-popup-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--bg-soft); font-size: 13px; }
.site-popup-foot button { border: 0; background: transparent; font-weight: 700; cursor: pointer; min-height: 36px; }
.modal { position: fixed; inset: 0; z-index: 75; background: rgba(22, 21, 28, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-panel { width: min(100%, 560px); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h2 { font-size: 18px; margin: 0; }

/* 인증(로그인·가입) */
.auth { max-width: 440px; margin: 48px auto 80px; }
.auth h1 { font-size: 26px; text-align: center; margin-bottom: 24px; }
.auth-links { display: flex; justify-content: center; gap: 16px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.agree-box { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 160px; overflow-y: auto; padding: 12px; font-size: 13px; color: var(--ink-2); background: var(--bg-soft); margin: 6px 0 8px; }

/* 반응형 */
@media (max-width: 1100px) {
  .mercari:not(.mercari-drawer) { display: none; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .goods-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --header-h: 56px; }
  .gnb, .user-links a:not(.user-name):not(.btn-primary) { display: none; }
  .menu-open { display: inline-flex; margin-left: -8px; }
  .header-row { gap: 8px; }
  .logo { margin-right: auto; }
  .logo img { height: 28px; }
  .hero { padding: 32px 0; }
  .hero-grid, .home-cols { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .sub { grid-template-columns: 1fr; gap: 0; }
  .sub-nav { display: none; }
  .sub-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
  .sub-tabs::-webkit-scrollbar { display: none; }
  .sub-tabs a { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
  .sub-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
  .page-head { padding: 24px 0 12px; }
  .page-head h1 { font-size: 22px; }
  .my-summary { grid-template-columns: 1fr 1fr; }
  .status-board { grid-template-columns: 1fr 1fr; }
  .document .hidden-xs { display: none; }
  .document .visible-xs { display: block; }
  .document .img-box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  /* 터치 목표 40px 이상 */
  .btn-sm { min-height: 40px; }
  .footer-links a, .topbar a, .user-links a, .user-links .link-btn { display: inline-flex; align-items: center; min-height: 40px; }
  .table input[type=checkbox], .table-wrap input[type=checkbox] { width: 24px; height: 24px; }
  .popup-close { min-height: 40px; min-width: 40px; }
  .mobile-select-all { display: flex !important; }
  .csv-pop { position: static; margin-top: 8px; } /* 좁은 화면에서는 펼친 자리에 그대로 */
  details[open]:has(> .csv-pop) { flex-basis: 100%; min-width: 0; }
  .csv-pop .row > .input { flex: 1; min-width: 0; }
  /* 카드형 표 안의 링크·칩·로고도 손가락으로 누를 만한 높이로 */
  table.stack td a:not(.btn):not(.subject), .logo, .status-group a, .section-title a, .card-title a, .card li > a { display: inline-flex; align-items: center; min-height: 40px; }
  .status-group a { display: flex; }
  details > summary { padding: 9px 0; }
  table.stack td a.subject { display: inline-block; padding: 10px 0; }
  .card .list-links li { padding: 0; align-items: center; }
  .card .list-links a { display: block; min-height: 0; padding: 12px 0; } /* 말줄임은 block 이어야 동작 */
  .steps { grid-template-columns: 1fr; }
  .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .apply-item-grid { grid-template-columns: 1fr; }
  .photo-slot { width: 100%; height: 96px; }
  .card { padding: 16px; }
  .section { padding: 36px 0; }
  .section-title h2 { font-size: 21px; }
  .table.stack thead { display: none; }
  .table.stack tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .table.stack td::before { content: attr(data-label); color: var(--muted); text-align: left; flex: none; }
  .table.stack td.center, .table.stack td.num { text-align: right; }
  .sticky-bar .wrap { flex-direction: column; align-items: stretch; }
  .filters .input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.mobile-select-all { display: none; align-items: center; gap: 8px; min-height: 40px; margin: 0 0 6px; font-size: 14px; }
/* 결제 화면 쿠폰 목록 */
.coupon-pick { border: 0; padding: 0; margin: 0 0 16px; }
.coupon-pick legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.coupon-opt { display: flex; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 6px; }
.coupon-opt input { width: 20px; height: 20px; flex: none; }
.coupon-opt.is-disabled { color: var(--muted); cursor: not-allowed; }
.coupon-opt:has(input:checked) { border-color: var(--brand); background: #f6f4ff; }

/* ---- 모바일 원본 대조로 더한 화면(2026-10-01) ---- */
/* 하단 탭바: 좁은 화면만 */
.tabbar { display: none; }
@media (max-width: 600px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a.on { color: var(--brand); }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
/* 접히는 영역: 넓은 화면에서는 제목 없이 늘 펼침 */
details.collapsible > summary { display: none; }
@media (max-width: 600px) {
  details.collapsible { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; margin-bottom: 12px; background: #fff; }
  details.collapsible > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; font-weight: 700; cursor: pointer; }
  details.collapsible[open] > summary { border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
  details.collapsible > .my-summary, details.collapsible > .status-board { margin-bottom: 12px; }
}
.my-top { display: grid; grid-template-columns: 2fr 3fr; gap: 12px; margin-bottom: 12px; }
.my-top .my-summary { margin-bottom: 0; }
.my-id { grid-template-columns: 1.3fr 1fr; }
.wallet .my-summary { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .my-top { grid-template-columns: 1fr; } }
.quick-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.quick-status a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: 13px; color: var(--muted); }
.quick-status b { font-size: 20px; color: var(--brand); font-variant-numeric: tabular-nums; }
.view-fix { font-size: 13px; color: var(--muted); margin-left: 4px; }
/* 첫 화면 위젯 */
.home-widgets { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.home-widgets > * { min-width: 0; }
@media (max-width: 900px) { .home-widgets { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; text-align: center; }
.cal th { padding: 6px 0; color: var(--muted); font-weight: 600; }
.cal td { padding: 0; height: 36px; }
.cal td span:first-child { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; }
.cal .sun, .cal .off { color: var(--danger); }
.cal .sat { color: var(--brand); }
.cal .out, .cal .out.sun, .cal .out.sat { color: var(--muted); } /* 흐리게(opacity) 하면 명도대비 미달 */
.cal .off span:first-child { background: #fdecec; font-weight: 700; }
.cal .today span:first-child { outline: 2px solid var(--brand); outline-offset: -2px; }
.cal-holidays { list-style: none; padding: 0; margin: 8px 0 0; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: middle; }
/* 품목분류·설정·고객센터·엑셀 신청 */
.chip-static { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; background: #fff; }
.setting-links a, .setting-links .link-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.setting-links .inline-form { display: block; }
.cs-tel { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.cs-tiles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) { .cs-tiles { grid-template-columns: 1fr 1fr; } }
.steps-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.steps-list a, .help a, .card p a { text-decoration: underline; text-underline-offset: 2px; }
.fee-list li.sum { font-weight: 700; border-bottom: 0; padding-top: 12px; }
