/* =====================================================================
   노디(Nodi) 디자인 시스템 — "서로를 연결하는 노드"
   ===================================================================== */
:root {
  --brand: #5a4bff;
  --brand-600: #4637e6;
  --brand-700: #3a2cc7;
  --brand-50: #f1efff;
  --brand-100: #e4e0ff;
  --cyan: #12b5d6;
  --cyan-50: #e6f8fc;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e7ec;
  --line-2: #f0f2f6;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --success: #12b76a;
  --success-50: #e7f8ef;
  --warn: #f79009;
  --warn-50: #fef4e2;
  --danger: #f04438;
  --danger-50: #fdecea;
  --violet-50: #f3effe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 6px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 20px 60px rgba(16, 24, 40, .18);
  --panel-w: 410px;
  --header-h: 68px;
  --grad: linear-gradient(135deg, #5a4bff 0%, #12b5d6 100%);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  transition: padding-right .28s cubic-bezier(.4, 0, .2, 1);
}
img { max-width: 100%; display: block; }
svg { max-width: 100%; vertical-align: -0.18em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid rgba(90, 75, 255, .45); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pre-line { white-space: pre-line; }

/* ── 버튼 ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 12px; font-weight: 600; font-size: 14px; line-height: 1;
  background: var(--surface); color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(90, 75, 255, .28); }
.btn-primary:hover { background: var(--brand-600); }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(90, 75, 255, .3); }
.btn-grad:hover { filter: brightness(1.06); }
.btn-secondary { border-color: var(--line); background: var(--surface); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-50); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); }
.btn-outline-danger { border-color: #f6c5c0; color: var(--danger); background: #fff; }
.btn-outline-danger:hover { background: var(--danger-50); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-icon { width: 40px; padding: 0; }
.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ── 폼 ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.req::after { content: " *"; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667085' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(90, 75, 255, .12); outline: none; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-sm { height: 36px; font-size: 13.5px; border-radius: 10px; }
.help { font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: #cfd4dc; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(90, 75, 255, .45); outline-offset: 2px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: transparent; font-size: 18px; color: var(--ink-2); }
.qty button:hover { background: var(--line-2); }
.qty input { width: 46px; height: 40px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.color-input { width: 100%; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* ── 배지 / 점 / 알림 ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); line-height: 1.4; white-space: nowrap; }
.badge-green { background: var(--success-50); color: #067647; }
.badge-amber { background: var(--warn-50); color: #b54708; }
.badge-red { background: var(--danger-50); color: #b42318; }
.badge-gray { background: #eef0f4; color: #475467; }
.badge-blue { background: #e8f1ff; color: #1849a9; }
.badge-violet { background: var(--violet-50); color: #5925dc; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; flex: none; }
.dot-open { background: var(--success); box-shadow: 0 0 0 0 rgba(18, 183, 106, .5); animation: pulse 2s infinite; }
.dot-preparing { background: var(--warn); }
.dot-closed { background: #98a2b3; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(18, 183, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); } }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--success-50); color: #067647; border-color: #bfe9d2; }
.alert-error { background: var(--danger-50); color: #b42318; border-color: #f7c9c4; }
.alert-info { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.alert-warn { background: var(--warn-50); color: #b54708; border-color: #f8dcae; }
.flash-wrap { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 90; width: min(560px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.flash-wrap .alert { pointer-events: auto; box-shadow: var(--shadow); animation: slideDown .3s ease; display: flex; justify-content: space-between; gap: 12px; }
.flash-wrap .alert button { background: none; border: 0; font-size: 18px; line-height: 1; opacity: .6; padding: 0; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ── 카드 / 섹션 ─────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { font-size: 16px; }
.section { margin: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-title { font-size: 26px; font-weight: 800; margin: 28px 0 18px; }
.breadcrumb { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 0; }
.breadcrumb a:hover { color: var(--brand); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .em { font-size: 44px; margin-bottom: 10px; }
.empty p + p, .empty p + .btn { margin-top: 12px; }

/* ── 헤더 ───────────────────────────────────────────────────────── */
.topbar { background: #0f1230; color: #c9cdf2; font-size: 12.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 12px; }
.topbar a:hover { color: #fff; }
.topbar .tb-links { display: flex; gap: 16px; }
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.header-main { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 25px; letter-spacing: -.04em; flex: none; }
.logo svg { width: 34px; height: 34px; }
.logo .word { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1 1 auto; max-width: 560px; position: relative; }
.search input { width: 100%; height: 44px; padding: 0 48px 0 18px; border: 2px solid var(--brand-100); border-radius: 99px; background: #fff; font: inherit; font-size: 14.5px; }
.search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgba(90, 75, 255, .12); }
.search button { position: absolute; right: 5px; top: 5px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; }
.search button svg { width: 18px; height: 18px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.h-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); position: relative; }
.h-link:hover { background: var(--line-2); }
.h-link svg { width: 21px; height: 21px; }
.h-link .count { position: absolute; top: 2px; left: 24px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.h-link .count:empty, .count[data-zero="1"] { display: none; }
.menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 14px; font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 70; }
.menu.open .dropdown { display: block; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: none; border: 0; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--line-2); }
.dropdown hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }
.dropdown .who { padding: 10px 12px 8px; font-size: 13px; color: var(--muted); }
.cat-nav { border-top: 1px solid var(--line-2); }
.cat-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; }
.cat-nav .container::-webkit-scrollbar { display: none; }
.cat-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background .15s; }
.cat-nav a:hover { background: var(--line-2); }
.cat-nav a.is-active { background: var(--brand-50); color: var(--brand-700); }
.cat-nav .sep { width: 1px; background: var(--line); margin: 8px 6px; flex: none; }
.cat-nav .hot { color: var(--danger); }

/* ── 히어로 배너 ────────────────────────────────────────────────── */
.hero { position: relative; border-radius: 24px; overflow: hidden; background: #1c1b4b; margin-top: 22px; box-shadow: var(--shadow); isolation: isolate; }
.hero-track { display: flex; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.hero-slide { position: relative; flex: 0 0 100%; min-height: 340px; display: flex; align-items: center; color: #fff; }
.hero-slide .bg { position: absolute; inset: 0; z-index: -1; }
.hero-slide .bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide .copy { padding: 40px 56px; max-width: 640px; }
.hero-slide .eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px); font-size: 13px; font-weight: 700; }
.hero-slide h2 { font-size: 40px; font-weight: 800; margin: 14px 0 10px; line-height: 1.2; text-shadow: 0 2px 14px rgba(0, 0, 0, .2); }
.hero-slide p { font-size: 17px; opacity: .95; max-width: 460px; }
.hero-slide .btn { margin-top: 22px; background: #fff; color: var(--brand-700); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.hero-nav { position: absolute; inset: 0; pointer-events: none; }
.hero-arrow { pointer-events: auto; position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; }
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow.prev { left: 16px; } .hero-arrow.next { right: 16px; }
.hero-dots { position: absolute; left: 56px; bottom: 18px; display: flex; gap: 6px; pointer-events: auto; }
.hero-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .55); padding: 0; transition: width .25s, background .25s; }
.hero-dots button.is-active { width: 26px; background: #fff; }

/* 컨셉 스트립 */
.concept { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.concept .item { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line-2); }
.concept .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--brand-50); flex: none; }
.concept b { display: block; font-size: 15px; }
.concept span { font-size: 13px; color: var(--muted); }

/* ── 카테고리 타일 ───────────────────────────────────────────────── */
.cat-tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 14px; font-weight: 700; text-align: center; transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-tile .ic { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; }

/* ── 팝업스토어 카드 ─────────────────────────────────────────────── */
.h-scroll { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.h-scroll > * { scroll-snap-align: start; flex: none; }
.store-card { width: 290px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; display: block; }
.store-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.store-card .cover { height: 96px; background: var(--brand-50); position: relative; }
.store-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.store-card .logo-sm { position: absolute; left: 16px; bottom: -22px; width: 52px; height: 52px; border-radius: 16px; border: 3px solid #fff; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.store-card .logo-sm img { width: 100%; height: 100%; object-fit: cover; }
.store-card .body { padding: 30px 16px 16px; }
.store-card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.store-card .tag { font-size: 13px; color: var(--muted); margin: 4px 0 10px; min-height: 38px; }
.store-card .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.store-card .meta span { background: var(--line-2); border-radius: 8px; padding: 3px 8px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.store-grid .store-card { width: auto; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.status-pill.open { color: #067647; border-color: #bfe9d2; background: var(--success-50); }
.status-pill.preparing { color: #b54708; border-color: #f8dcae; background: var(--warn-50); }

/* ── 상품 카드 / 그리드 ──────────────────────────────────────────── */
.grid-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.p-card { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.p-card .thumb { position: relative; aspect-ratio: 1 / 1; background: var(--line-2); overflow: hidden; display: block; }
.p-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.p-card:hover .thumb img { transform: scale(1.05); }
.p-card .thumb .flags { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.p-card .quick-add { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; transform: translateY(6px); transition: .2s; }
.p-card:hover .quick-add { opacity: 1; transform: none; }
.p-card .quick-add:hover { background: var(--brand); color: #fff; }
.p-card .quick-add svg { width: 19px; height: 19px; }
.p-card .info { padding: 12px 14px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.p-card .store { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.p-card .store b { color: var(--ink-2); font-weight: 600; }
.p-card .name { font-size: 14.5px; font-weight: 600; line-height: 1.4; min-height: 40px; }
.p-card .summary { font-size: 12.5px; color: var(--muted); }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.price .pct { color: var(--danger); font-weight: 800; font-size: 15px; }
.price .now { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.price .was { font-size: 12.5px; color: var(--faint); text-decoration: line-through; }
.p-card.is-soldout .thumb img { filter: grayscale(.85); opacity: .6; }
.flag { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.flag-hot { background: var(--danger); color: #fff; }
.flag-soldout { background: #101828; color: #fff; }
.flag-closed { background: rgba(16, 24, 40, .78); color: #fff; }

/* 필터 바 */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-sm { padding: 5px 11px; font-size: 12.5px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: none; }
.load-more { display: flex; justify-content: center; margin-top: 26px; }

/* ── 상품 상세 ───────────────────────────────────────────────────── */
.pd { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.pd .gallery .main { aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: var(--line-2); border: 1px solid var(--line-2); }
.pd .gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.pd .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd .thumbs button { width: 68px; height: 68px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--line-2); opacity: .7; }
.pd .thumbs button.is-active { border-color: var(--brand); opacity: 1; }
.pd .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd h1 { font-size: 26px; font-weight: 800; margin: 8px 0 6px; line-height: 1.3; }
.pd .lead { color: var(--muted); }
.pd .price-box { margin: 18px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd .price-box .now { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.pd .price-box .pct { font-size: 22px; font-weight: 800; color: var(--danger); margin-right: 8px; }
.pd .price-box .was { color: var(--faint); text-decoration: line-through; margin-left: 8px; }
.pd .buy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pd .buy-actions { display: flex; gap: 10px; margin-top: 14px; }
.pd .buy-actions .btn { flex: 1; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; font-size: 15px; }
.total-line b { font-size: 24px; letter-spacing: -.02em; color: var(--brand-700); }
.seller-box { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-top: 18px; }
.seller-box .logo-md { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; flex: none; background: var(--line-2); }
.seller-box .logo-md img { width: 100%; height: 100%; object-fit: cover; }
.seller-box dl { margin: 8px 0 0; display: grid; grid-template-columns: 56px 1fr; gap: 4px 10px; font-size: 13px; }
.seller-box dt { color: var(--muted); } .seller-box dd { margin: 0; }
.notice-box { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--warn-50); color: #93370d; font-size: 13.5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 12px 18px; font-weight: 700; font-size: 14.5px; color: var(--muted); border: 0; background: none; border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a.is-active, .tabs button.is-active { color: var(--brand-700); border-bottom-color: var(--brand); }
.desc { font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
.inline-form { margin-top: 14px; padding: 18px; border: 1px dashed var(--brand-100); border-radius: 16px; background: var(--brand-50); }

/* 중앙 퀵뷰 (BabiAI 채팅에서 상품 선택 시) */
.quickview { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(16, 18, 48, .5); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s, right .28s; }
.quickview.open { opacity: 1; visibility: visible; }
body.panel-open .quickview { right: var(--panel-w); }
.quickview .qv-card { position: relative; width: min(1000px, 100%); max-height: 100%; overflow: auto; background: var(--bg); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px; transform: translateY(14px) scale(.98); transition: transform .25s; }
.quickview.open .qv-card { transform: none; }
.qv-close { position: sticky; float: right; top: 0; margin: -12px -12px 0 0; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 20px; line-height: 1; }
.qv-loading { padding: 80px 0; text-align: center; color: var(--muted); }
.qv-card .pd h1 { font-size: 23px; }

/* ── 장바구니 / 주문 ─────────────────────────────────────────────── */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 52px); }
.cart-group { margin-bottom: 16px; overflow: hidden; }
.cart-group .g-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--line-2); font-weight: 700; }
.cart-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line-2); }
.cart-row .im { width: 78px; height: 78px; border-radius: 14px; overflow: hidden; background: var(--line-2); }
.cart-row .im img { width: 100%; height: 100%; object-fit: cover; }
.cart-row.has-problem { background: #fff8f7; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-size: 18px; font-weight: 800; }
.pay-opts { display: grid; gap: 10px; }
.pay-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: .15s; }
.pay-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.pay-opt input { accent-color: var(--brand); margin-top: 4px; }
.steps { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.step-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.step-dot.on { background: var(--brand); color: #fff; }

/* ── 주문 / 상태 타임라인 / 채팅 ─────────────────────────────────── */
.order-card { margin-bottom: 14px; overflow: hidden; }
.order-card .o-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.order-card .o-body { padding: 14px 20px; }
.o-item { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.o-item .im { width: 52px; height: 52px; border-radius: 12px; background: var(--line-2); overflow: hidden; flex: none; }
.o-item .im img { width: 100%; height: 100%; object-fit: cover; }
.timeline { display: flex; align-items: center; margin: 8px 0 4px; }
.timeline .t { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); position: relative; }
.timeline .t::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.timeline .t:first-child::before { display: none; }
.timeline .t .d { width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: #fff; display: grid; place-items: center; font-size: 12px; z-index: 1; font-weight: 800; }
.timeline .t.done { color: var(--ink-2); font-weight: 600; }
.timeline .t.done .d { background: var(--brand); }
.timeline .t.done::before { background: var(--brand); }
.timeline .t.now .d { box-shadow: 0 0 0 5px rgba(90, 75, 255, .18); }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding: 4px; }
.bubble-row { display: flex; gap: 8px; align-items: flex-end; }
.bubble-row.me { flex-direction: row-reverse; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; background: var(--line-2); word-break: break-word; white-space: pre-line; }
.bubble-row.me .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.bubble-row:not(.me) .bubble { border-bottom-left-radius: 6px; }
.bubble-row.sys { justify-content: center; }
.bubble-row.sys .bubble { background: transparent; color: var(--muted); font-size: 12.5px; padding: 4px 10px; border: 1px dashed var(--line); }
.bubble-time { font-size: 11px; color: var(--faint); flex: none; }

/* ── 푸터 ───────────────────────────────────────────────────────── */
.site-footer { margin-top: 70px; background: #0f1230; color: #b4b9e6; padding: 44px 0 40px; font-size: 13.5px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.site-footer a { display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .copy { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: #7c82bd; font-size: 12.5px; }
.site-footer .logo .word { background: none; color: #fff; -webkit-text-fill-color: #fff; }

/* ── 우측 도크 + 슬라이드 패널 ───────────────────────────────────── */
.dock { position: fixed; right: 18px; bottom: 22px; z-index: 75; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; transition: right .28s cubic-bezier(.4, 0, .2, 1); }
body.panel-open .dock { right: calc(var(--panel-w) + 18px); }
.dock-btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px 0 16px; border: 0; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 10px 30px rgba(90, 75, 255, .45); transition: transform .15s; }
.dock-btn:hover { transform: translateY(-2px) scale(1.02); }
.dock-btn .ic { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.dock-btn .ic svg { width: 19px; height: 19px; }
.dock-btn .badge-n { position: absolute; top: -6px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; animation: pop .4s; }
.dock-btn.ring { animation: ring 1.2s ease-in-out 3; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-6deg) scale(1.05); } 30% { transform: rotate(6deg) scale(1.05); } 45% { transform: rotate(-4deg); } 60% { transform: rotate(4deg); } }
body.panel-open .dock-btn { display: none; }
.dock-hint { background: #fff; padding: 8px 14px; border-radius: 14px 14px 4px 14px; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; max-width: 230px; animation: slideDown .5s 1.5s both; }

.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel-w); max-width: 100vw; z-index: 85; background: #fff; box-shadow: -12px 0 48px rgba(16, 24, 40, .18); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .28s cubic-bezier(.4, 0, .2, 1); visibility: hidden; }
body.panel-open .side-panel { transform: none; visibility: visible; }
.panel-head { padding: 16px 18px; background: var(--grad); color: #fff; display: flex; align-items: center; gap: 12px; flex: none; }
.panel-head .pf { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 22px; flex: none; }
.panel-head h3 { font-size: 16px; font-weight: 800; }
.panel-head .sub { font-size: 12.5px; opacity: .9; }
.panel-head .actions { margin-left: auto; display: flex; gap: 4px; }
.panel-head button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .18); color: #fff; display: grid; place-items: center; font-size: 17px; }
.panel-head button:hover { background: rgba(255, 255, 255, .32); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; background: #f7f8fc; scroll-behavior: smooth; }
.panel-foot { padding: 12px 14px 14px; background: #fff; border-top: 1px solid var(--line); flex: none; }
.panel-backdrop { position: fixed; inset: 0; z-index: 84; background: rgba(16, 18, 48, .45); opacity: 0; visibility: hidden; transition: .25s; display: none; }

/* BabiAI 채팅 */
.msg { display: flex; gap: 8px; margin-bottom: 14px; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg .av { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 16px; flex: none; }
.msg .col { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: calc(100% - 42px); }
.msg .bubble-ai { background: #fff; border: 1px solid var(--line-2); padding: 11px 14px; border-radius: 4px 18px 18px 18px; font-size: 14px; line-height: 1.6; box-shadow: var(--shadow-sm); white-space: pre-line; word-break: break-word; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble-user { background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 18px 18px 4px 18px; max-width: 86%; font-size: 14px; word-break: break-word; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.ai-products { display: flex; flex-direction: column; gap: 8px; }
.ai-card { display: flex; gap: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-align: left; width: 100%; transition: .15s; position: relative; }
.ai-card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(90, 75, 255, .14); transform: translateY(-1px); }
.ai-card .im { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; flex: none; background: var(--line-2); position: relative; }
.ai-card .im img { width: 100%; height: 100%; object-fit: cover; }
.ai-card .im.so img { filter: grayscale(1); opacity: .6; }
.ai-card .tx { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ai-card .nm { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.ai-card .st { font-size: 12px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.ai-card .pr { margin-top: auto; font-size: 14px; font-weight: 800; display: flex; gap: 6px; align-items: baseline; }
.ai-card .pr s { font-size: 11.5px; color: var(--faint); font-weight: 400; }
.ai-card .pr .pct { color: var(--danger); font-size: 12.5px; }
.ai-card .go { position: absolute; right: 10px; bottom: 10px; font-size: 12px; color: var(--brand); font-weight: 700; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips button { border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-700); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.ai-chips button:hover { background: var(--brand); color: #fff; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; background: #f2f4f8; border-radius: 22px; padding: 6px 6px 6px 16px; border: 2px solid transparent; transition: .15s; }
.chat-input:focus-within { border-color: var(--brand); background: #fff; }
.chat-input textarea { flex: 1; border: 0; background: transparent; resize: none; font: inherit; font-size: 14.5px; max-height: 110px; min-height: 24px; padding: 8px 0; outline: none; line-height: 1.4; }
.chat-input button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.chat-input button:disabled { background: var(--faint); }
.chat-input button svg { width: 19px; height: 19px; }

/* 판매자 주문 채팅 패널 */
.ol-tabs { display: flex; gap: 6px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.ol-tabs button { flex: 1; border: 0; background: var(--line-2); border-radius: 10px; padding: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ol-tabs button.is-active { background: var(--brand); color: #fff; }
.ol-tabs .n { background: var(--danger); color: #fff; border-radius: 99px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.ol-store { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); flex: none; font-size: 13px; }
.ol-store select { height: 32px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; font: inherit; font-size: 13px; font-weight: 700; background: #fff; }
.ol-item { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; position: relative; transition: .15s; }
.ol-item:hover { border-color: var(--brand); }
.ol-item.unread { border-color: #f8b4ad; background: #fffaf9; }
.ol-item .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ol-item .who { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.ol-item .sum { font-size: 13px; margin-top: 4px; color: var(--ink-2); }
.ol-item .last { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ol-item .amt { font-weight: 800; }
.ol-new-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: pulseRed 1.5s infinite; }
@keyframes pulseRed { 70% { box-shadow: 0 0 0 8px rgba(240, 68, 56, 0); } 0% { box-shadow: 0 0 0 0 rgba(240, 68, 56, .5); } }
.ol-thread-head { padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.ol-back { border: 0; background: none; font-weight: 700; color: var(--brand); padding: 0; margin-bottom: 8px; font-size: 13px; }
.order-sum { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; }
.order-sum .li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.order-sum .tot { display: flex; justify-content: space-between; font-weight: 800; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.act-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-replies { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.quick-replies::-webkit-scrollbar { display: none; }
.quick-replies button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.quick-replies button:hover { border-color: var(--brand); color: var(--brand); }

/* ── 토스트 ─────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { pointer-events: auto; background: #101828; color: #fff; padding: 13px 20px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; max-width: 480px; animation: toastIn .3s ease; }
.toast.success { background: #067647; } .toast.error { background: #b42318; }
.toast.order { background: var(--brand-700); font-weight: 700; }
.toast button { background: rgba(255, 255, 255, .2); border: 0; color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ── 페이지네이션 / 테이블 ───────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 28px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 600; background: #fff; border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .dis { opacity: .4; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 16px; font-size: 12.5px; color: var(--muted); font-weight: 700; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafbff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .thumb-sm { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--line-2); }
.table .actions { white-space: nowrap; text-align: right; }

/* ── 인증 페이지 ─────────────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 36px 0; }
.auth-card { width: min(460px, 100%); padding: 36px; }
.auth-card.wide { width: min(680px, 100%); }
.auth-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-tabs { display: flex; background: var(--line-2); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); }
.auth-tabs a.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.demo-box { margin-top: 20px; padding: 14px 16px; background: var(--brand-50); border-radius: 14px; font-size: 13px; color: var(--ink-2); }
.demo-box code { background: #fff; padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }

/* ── 이벤트 / 매장 상세 ──────────────────────────────────────────── */
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.event-card { overflow: hidden; display: block; transition: .15s; }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.event-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.event-card .b { padding: 16px 18px 18px; }
.store-hero { position: relative; border-radius: 24px; overflow: hidden; background: var(--brand-50); margin-top: 20px; }
.store-hero .cover { height: 220px; }
.store-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.store-hero .info { display: flex; gap: 20px; padding: 0 30px 26px; background: #fff; align-items: flex-start; flex-wrap: wrap; }
.store-hero .logo-lg { width: 96px; height: 96px; border-radius: 26px; border: 5px solid #fff; background: #fff; margin-top: -48px; overflow: hidden; box-shadow: var(--shadow); flex: none; }
.store-hero .logo-lg img { width: 100%; height: 100%; object-fit: cover; }
.store-hero h1 { font-size: 26px; font-weight: 800; }
.info-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 18px; }
.info-list .it { background: var(--line-2); border-radius: 14px; padding: 12px 14px; }
.info-list .it b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.map-box { height: 260px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--line-2); }

/* ── 마이페이지 ──────────────────────────────────────────────────── */
.my-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.side-nav { padding: 10px; position: sticky; top: calc(var(--header-h) + 56px); }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.side-nav a:hover { background: var(--line-2); }
.side-nav a.is-active { background: var(--brand-50); color: var(--brand-700); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px 20px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.stat .d { font-size: 12.5px; margin-top: 4px; color: var(--muted); }
.stat .up { color: var(--success); font-weight: 700; } .stat .down { color: var(--danger); font-weight: 700; }
.stat.accent { background: var(--grad); color: #fff; border: 0; }
.stat.accent .k, .stat.accent .d { color: rgba(255, 255, 255, .85); }

/* ── 판매자 / 관리자 쉘 ──────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.shell-nav { background: #0f1230; color: #b4b9e6; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.shell-nav .logo { color: #fff; padding: 4px 10px 18px; }
.shell-nav .logo .word { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.shell-nav .tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #7c82bd; padding: 14px 12px 6px; text-transform: uppercase; }
.shell-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 600; transition: .15s; }
.shell-nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.shell-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.shell-nav a.is-active { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(90, 75, 255, .4); }
.shell-nav .n { margin-left: auto; background: var(--danger); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11.5px; font-weight: 800; min-width: 20px; text-align: center; }
.shell-nav .foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.shell-main { min-width: 0; }
.shell-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.shell-top h1 { font-size: 20px; font-weight: 800; }
.shell-body { padding: 24px 28px 80px; }
.shell-burger { display: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .input, .toolbar .select { width: auto; height: 40px; }

/* 차트 */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; }
.chart .bar { fill: var(--brand); opacity: .85; transition: opacity .15s; }
.chart .bar:hover { opacity: 1; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#chartGrad); }
.chart .pt { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.chart-tip { position: absolute; background: #101828; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; transform: translate(-50%, -120%); white-space: nowrap; z-index: 5; }
.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 160px; font-size: 13.5px; }
.legend .li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-list .li { margin-bottom: 14px; }
.bar-list .t { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; gap: 8px; }
.bar-list .tr { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-list .tr i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* 이미지 업로드 미리보기 */
.img-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.img-tile { position: relative; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--line-2); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile label { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(16, 24, 40, .75); color: #fff; border-radius: 8px; font-size: 11px; padding: 3px 6px; display: flex; gap: 4px; align-items: center; }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); background: #fff; cursor: pointer; transition: .15s; }
.drop:hover, .drop.is-drag { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.status-toggle { display: inline-flex; background: var(--line-2); padding: 4px; border-radius: 14px; gap: 4px; }
.status-toggle button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.status-toggle button.is-active[data-v="open"] { background: var(--success); color: #fff; }
.status-toggle button.is-active[data-v="preparing"] { background: var(--warn); color: #fff; }
.status-toggle button.is-active[data-v="closed"] { background: #667085; color: #fff; }
.llm-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.llm-card.is-default { border: 2px solid var(--brand); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--line-2); padding: 2px 7px; border-radius: 6px; }
.test-out { margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; background: var(--line-2); white-space: pre-wrap; word-break: break-word; }
.test-out.ok { background: var(--success-50); color: #067647; } .test-out.bad { background: var(--danger-50); color: #b42318; } .test-out.warn { background: var(--warn-50); color: #93370d; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.btn-secondary .spinner, .btn-soft .spinner { border-color: rgba(90, 75, 255, .3); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
#map, .leaflet-map { height: 300px; border-radius: 16px; border: 1px solid var(--line); }

/* ── 설치 마법사 ─────────────────────────────────────────────────── */
.install-wrap { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.req-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.req-list .ok { color: var(--success); font-weight: 800; } .req-list .no { color: var(--danger); font-weight: 800; } .req-list .warn { color: var(--warn); font-weight: 800; }
.log-list li { padding: 3px 0; font-size: 14px; }
.log-list li::before { content: "✓ "; color: var(--success); font-weight: 800; }

/* ── 반응형 ──────────────────────────────────────────────────────── */
@media (min-width: 1100px) { body.panel-open { padding-right: var(--panel-w); } }
@media (max-width: 1099px) {
  .panel-backdrop { display: block; }
  body.panel-open .panel-backdrop { opacity: 1; visibility: visible; }
  body.panel-open .quickview { right: 0; }
  body.panel-open .dock { right: 18px; }
}
@media (max-width: 1100px) {
  .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-tiles { grid-template-columns: repeat(4, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .layout-2 { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3-1 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .shell-nav { position: fixed; z-index: 100; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .25s; }
  body.nav-open .shell-nav { transform: none; box-shadow: var(--shadow-lg); }
  .shell-burger { display: inline-grid; }
  .shell-top, .shell-body { padding-left: 16px; padding-right: 16px; }
  .pd { grid-template-columns: 1fr; gap: 22px; }
  .my-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .side-nav a { white-space: nowrap; }
  .grid-2 { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .concept { grid-template-columns: 1fr; }
  .hero-slide .copy { padding: 30px 28px 56px; }
  .hero-slide h2 { font-size: 30px; }
  .hero-dots { left: 28px; }
}
@media (max-width: 720px) {
  :root { --header-h: 58px; --panel-w: 100vw; }
  body { font-size: 14.5px; }
  .container { padding: 0 14px; }
  .topbar { display: none; }
  .header-main { flex-wrap: wrap; height: auto; padding: 10px 0 8px; gap: 10px; }
  .logo { font-size: 22px; } .logo svg { width: 30px; height: 30px; }
  .search { order: 3; flex: 1 0 100%; max-width: none; }
  .h-link .lbl { display: none; }
  .menu-btn .nm { display: none; }
  .menu-btn { padding: 4px; }
  .flash-wrap { top: 70px; }
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .p-card .info { padding: 10px 11px 13px; }
  .p-card .name { font-size: 13.5px; min-height: 38px; }
  .price .now { font-size: 15.5px; }
  .p-card .quick-add { opacity: 1; transform: none; width: 34px; height: 34px; }
  .cat-tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-tile { padding: 12px 4px; font-size: 12px; } .cat-tile .ic { width: 42px; height: 42px; font-size: 21px; }
  .hero { border-radius: 18px; margin-top: 14px; }
  .hero-slide { min-height: 250px; }
  .hero-slide h2 { font-size: 25px; } .hero-slide p { font-size: 14px; }
  .hero-slide .copy { padding: 24px 22px 50px; }
  .hero-dots { left: 22px; bottom: 16px; }
  .hero-arrow { display: none; }
  .section { margin: 28px 0; }
  .section-head h2 { font-size: 19px; }
  .page-title { font-size: 22px; }
  .store-card { width: 250px; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-row .im { width: 64px; height: 64px; }
  .cart-row > :nth-child(3), .cart-row > :nth-child(4) { grid-column: 2; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 21px; }
  .event-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .pd h1 { font-size: 22px; } .pd .price-box .now { font-size: 27px; }
  .quickview { padding: 0; align-items: flex-end; }
  .quickview .qv-card { border-radius: 24px 24px 0 0; padding: 20px 16px 28px; max-height: 94%; }
  .dock { right: 14px; bottom: 16px; }
  .dock-btn { height: 54px; padding: 0 18px 0 14px; }
  .dock-hint { display: none; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .shell-body { padding-bottom: 100px; }
  .toolbar .input, .toolbar .select { width: 100%; }
  .store-hero .info { padding: 0 18px 20px; }
  .table th, .table td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .topbar, .dock, .side-panel, .site-footer { display: none !important; } }

/* 판매자 패널 뷰 전환 */
.ol-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ol-view[hidden] { display: none !important; }

/* ── BabiAI 분석 ────────────────────────────────────────────────── */
.score-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line-2) 0); }
.score-ring > div { width: 100px; height: 100px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.score-ring b { font-size: 34px; letter-spacing: -.03em; line-height: 1; }
.score-ring span { font-size: 12px; color: var(--muted); }
.sev { font-size: 9px; letter-spacing: 1px; color: var(--danger); }
.fb { display: flex; align-items: center; gap: 4px; margin-top: -2px; }
.fb button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 10px; font-size: 13px; line-height: 1.4; transition: .15s; }
.fb button:hover { border-color: var(--brand); }
.fb button.is-on { background: var(--brand-50); border-color: var(--brand); }
.fb button.is-down { background: var(--danger-50); border-color: #f6c5c0; }
.fb .thanks { font-size: 12px; color: var(--muted); margin-left: 4px; }
.fb-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fb-reasons button { border: 1px solid #f6c5c0; background: #fff; color: #b42318; border-radius: 99px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; }
.fb-reasons button:hover { background: var(--danger-50); }
.ai-actions a { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--brand-700); }
.ai-notice { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 6px; line-height: 1.5; }
@media (max-width: 720px) { .score-ring { width: 108px; height: 108px; } .score-ring > div { width: 82px; height: 82px; } .score-ring b { font-size: 28px; } }

/* ── 기간 조회 바 (판매자 주문관리/정산내역) ───────────────────────── */
.range-bar .range-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.range-bar .range-form .input { width: auto; min-width: 150px; }
.stat-row + .stat-row, .range-bar + .alert { margin-top: 14px; }
tfoot th { background: var(--bg-soft, #f7f8fc); font-weight: 800; border-top: 2px solid var(--line); padding: 12px 14px; text-align: left; }
tfoot th.num { text-align: right; }
@media (max-width: 720px) { .range-bar .range-form .input { flex: 1 1 140px; } }
