/* ==========================================================
   StarSeller · Design System v1
   - Pretendard + Noto Serif KR + Inter
   - 흑백 + 다홍 단일 액센트
   - 모바일 우선 (max-width: 480px 컨테이너)
   ========================================================== */

:root {
  --c-bg:            #FFFFFF;
  --c-paper:         #FAF8F4;
  --c-ink:           #141414;
  --c-text-muted:    #8A8A8A;
  --c-text-disabled: #B5B5B5;
  --c-divider:       #E6E6E6;
  --c-dahong:        #C0202B;
  --c-dahong-deep:   #9E1B1B;
  --c-success:       #34D870;
  --c-error:         #C0202B;
  --c-info:          #1B3A5B;

  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 999px;

  --gutter: 20px;
  --container: 480px;

  --font-sans:  'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --font-mono:  'Inter', 'JetBrains Mono', monospace;

  --tracking-caps:    0.18em;
  --tracking-ko-cap:  0.1em;
  --tracking-ko-body: -0.015em;

  /* 고정 탭바 높이: padding 12+14 + svg 20 + gap 4 + 9px caption ≈ 60px, border 1px → 62px + safe-area */
  --tabbar-h: 62px;
  --tabbar-clearance: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);

  /* 헤더 / 탭바 배경 (테마별 override) */
  --c-header-bg: rgba(255,255,255,.92);
  --c-tabbar-bg: rgba(255,255,255,.95);
  --c-card-bg: #FFFFFF;
  --c-app-shell: #E5E5E0; /* body 바깥 영역 */
}

/* ==========================================================
   THEME PRESETS — body class 로 override.
   light(기본) / dark / green / pink / blue.
   브랜딩 메뉴(`/seller/me/homepage/branding`) 에서 셀러가 선택.
   ========================================================== */
.theme-light { /* :root 기본값 그대로 */ }

.theme-dark {
  --c-bg:            #141414;
  --c-paper:         #1A1A1A;
  --c-ink:           #FFFFFF;
  --c-text-muted:    #B0B0B0;
  --c-text-disabled: #6E6E6E;
  --c-divider:       #2A2A2A;
  --c-header-bg:     rgba(20,20,20,.92);
  --c-tabbar-bg:     rgba(20,20,20,.95);
  --c-card-bg:       #1F1F1F;
  --c-app-shell:     #0A0A0A;
}

.theme-green {
  --c-bg:            #0E3D2C;
  --c-paper:         #155236;
  --c-ink:           #FFFFFF;
  --c-text-muted:    #C8E6D5;
  --c-text-disabled: #7BA995;
  --c-divider:       #1F6645;
  --c-header-bg:     rgba(14,61,44,.92);
  --c-tabbar-bg:     rgba(14,61,44,.95);
  --c-card-bg:       #155236;
  --c-app-shell:     #082018;
}

.theme-pink {
  --c-bg:            #FFE9EE;
  --c-paper:         #FFFFFF;
  --c-ink:           #2C0A14;
  --c-text-muted:    #8A4555;
  --c-text-disabled: #C09BA5;
  --c-divider:       #FFC5D2;
  --c-header-bg:     rgba(255,233,238,.94);
  --c-tabbar-bg:     rgba(255,233,238,.96);
  --c-card-bg:       #FFFFFF;
  --c-app-shell:     #F5C7D2;
}

.theme-blue {
  --c-bg:            #0B2545;
  --c-paper:         #112D52;
  --c-ink:           #FFFFFF;
  --c-text-muted:    #B8C5D9;
  --c-text-disabled: #6B7B95;
  --c-divider:       #1B3A5B;
  --c-header-bg:     rgba(11,37,69,.92);
  --c-tabbar-bg:     rgba(11,37,69,.95);
  --c-card-bg:       #112D52;
  --c-app-shell:     #061629;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--c-app-shell);
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.5;
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: var(--tracking-ko-body);
}
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* App container */
.app {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--c-bg);
  min-height: 100dvh;
  padding-bottom: var(--tabbar-clearance);
  position: relative;
}

/* Typography helpers */
.serif { font-family: var(--font-serif); letter-spacing: -0.025em; }
.mono  { font-family: var(--font-mono); }
.caps  { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.muted { color: var(--c-text-muted); }

/* ========== HEADER ========== */
.hd {
  position: sticky; top: 0; z-index: 50;
  height: 56px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--c-header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--c-divider);
}
.brand { display: flex; align-items: center; gap: 10px; }
.seal {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-dahong);
  display: grid; place-items: center;
  overflow: hidden;
}
.seal svg { width: 16px; height: 16px; }

/* 셀러 커스텀 로고 — 어떤 테마(dark/green/pink/blue/light)에서도 깨끗하게 보이도록
   흰 배경 + 살짝 큰 크기 + 1px 디바이더로 안전하게 마감. */
.seal--logo {
  width: 32px; height: 32px;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--c-divider) inset;
}
.seal--logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 3px;
  box-sizing: border-box;
  display: block;
}
.brand-word {
  font-family: var(--font-serif);
  font-weight: 500; font-size: 18px;
  letter-spacing: -0.02em; color: var(--c-ink);
}
.brand-word--star { color: var(--c-dahong); }
.hd-actions { display: flex; gap: 2px; margin-left: auto; }
.hd-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--c-ink); position: relative;
}
.hd-btn svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.3; fill: none; }
.hd-cta {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 999px;
  background: var(--c-dahong); color: #fff;
  font-family: var(--font-sans);
  font-weight: 600; font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.hd-cta svg { width: 13px; height: 13px; }

/* ========== TABBAR ========== */
.tb {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: var(--container);
  background: var(--c-tabbar-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--c-divider);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 60;
}
.tb-btn {
  flex: 1;
  padding: 13px 0 16px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  /* 비활성 탭도 또렷하게 — muted 회색(#8A8A8A) 대신 테마 전경색을 opacity 로 눌러
     라이트/다크/그린/핑크 어느 테마에서도 진하게 보이도록 (이전엔 흐려서 안 보임). */
  color: var(--c-ink);
  opacity: .72;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.tb-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.tb-btn.is-on { opacity: 1; font-weight: 700; }
.tb-btn.is-disabled { opacity: .34; cursor: default; }
/* 중앙 단골 탭 — <button>(form) 도 다른 탭과 동일하게 보이도록 reset */
.tb-form { flex: 1; display: flex; }
button.tb-btn { width: 100%; background: transparent; border: 0; -webkit-appearance: none; appearance: none; }
/* 한글 라벨(단골맺기/단골끊기)은 mono 대문자 트래킹이 어색 → sans 로 또렷하게 */
.tb-follow { font-family: var(--font-sans); letter-spacing: 0; text-transform: none; font-weight: 600; }
/* 하트는 항상 채움(브랜드 톤 동일) — 일반 .tb-btn svg 의 stroke/fill:none 규칙을 덮어씀.
   상태는 색으로만 구분: 미단골=ink, 단골(is-on)=다홍. */
/* 하트 — 미단골: 또렷한 아웃라인 / 단골(is-on): 다홍 채움.
   일반 .tb-btn svg(specificity 0,1,1)를 이기려면 .tb-btn .tb-heart(0,2,0) 로 올려야 함.
   stroke-width 는 96 viewBox 기준 → 24px 표시 시 7*24/96≈1.75px. */
.tb-btn .tb-heart { fill: none; stroke: currentColor; stroke-width: 7; }
.tb-btn.is-on .tb-heart { fill: currentColor; stroke: none; color: var(--c-dahong); }

/* ========== 마이페이지 내 단골 ========== */
.dangol-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px var(--gutter) 10px;
}
.dangol-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 18px; letter-spacing: -0.02em;
}
.dangol-count { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--c-dahong); }
.dangol-list { padding: 0 var(--gutter); border-bottom: 1px solid var(--c-divider); }
.dangol-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--c-divider);
}
.dangol-item:last-child { border-bottom: 0; }
.dangol-seller { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--c-ink); }
.dangol-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-paper); box-shadow: 0 0 0 1px var(--c-divider) inset;
  font-family: var(--font-serif); font-size: 18px;
}
.dangol-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dangol-name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dangol-form { flex-shrink: 0; }
.dangol-btn {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  color: var(--c-dahong); background: transparent;
  border: 1px solid var(--c-dahong); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.dangol-btn:active { background: var(--c-dahong); color: #fff; }
.dangol-empty {
  padding: 16px var(--gutter) 26px; text-align: center;
  color: var(--c-text-muted); border-bottom: 1px solid var(--c-divider);
}
.dangol-empty-ico { width: 34px; height: 34px; fill: var(--c-divider); margin-bottom: 8px; }
.dangol-empty p { font-size: 13px; line-height: 1.7; }
.dangol-empty b { color: var(--c-dahong); font-weight: 700; }

/* ========== 장바구니 ========== */
.cart-head { padding: 18px var(--gutter) 14px; border-bottom: 1px solid var(--c-divider); }
.cart-back {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--c-text-muted);
}
.cart-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 24px; letter-spacing: -0.025em;
  display: flex; align-items: baseline; gap: 8px;
}
.cart-count { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--c-dahong); }

.cart-empty { padding: 64px var(--gutter); text-align: center; color: var(--c-text-muted); }
.cart-empty-ico { width: 46px; height: 46px; stroke: var(--c-divider); stroke-width: 1.4; fill: none; margin-bottom: 14px; }
.cart-empty p { font-size: 15px; margin-bottom: 22px; }
.cart-empty-cta { max-width: 280px; margin: 0 auto; }

.cart-list { padding: 0 var(--gutter); }
.cart-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--c-divider); }
.cart-thumb {
  width: 72px; height: 72px; border-radius: var(--r-md); overflow: hidden; flex-shrink: 0;
  background: var(--c-paper); box-shadow: 0 0 0 1px var(--c-divider) inset;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-name {
  font-size: 14px; line-height: 1.45; color: var(--c-ink); font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cart-unit { font-size: 12px; color: var(--c-text-muted); }
.cart-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cart-stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--c-divider); border-radius: var(--r-md); overflow: hidden;
}
.cart-stepper input {
  width: 46px; border: 0; text-align: center; padding: 7px 0;
  font-size: 14px; background: var(--c-bg); color: var(--c-ink);
  -moz-appearance: textfield; appearance: textfield;
}
.cart-stepper input::-webkit-outer-spin-button,
.cart-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-stepper button {
  border: 0; border-left: 1px solid var(--c-divider);
  background: var(--c-paper); color: var(--c-ink);
  font-size: 12px; font-weight: 600; padding: 7px 11px; cursor: pointer;
}
.cart-qty-static { font-size: 13px; color: var(--c-text-muted); }
.cart-remove-form { margin-left: auto; }
.cart-remove { background: none; border: 0; color: var(--c-text-muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.cart-line {
  flex-shrink: 0; align-self: flex-start; white-space: nowrap;
  font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--c-ink);
}
.cart-line i, .cart-total i { font-style: normal; font-family: var(--font-sans); font-weight: 400; color: var(--c-text-muted); }
.cart-line i { font-size: 12px; margin-left: 1px; }

.cart-summary { margin: 8px var(--gutter) 0; padding: 4px 0 18px; }
.cart-sum-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; color: var(--c-text-muted); }
.cart-sum-row > span:last-child { color: var(--c-ink); font-weight: 600; }
.cart-ship-hint { font-size: 12px; color: var(--c-dahong); text-align: right; padding: 2px 0 6px; }
.cart-sum-total { border-top: 1px solid var(--c-divider); margin-top: 8px; padding-top: 14px; font-size: 15px; }
.cart-sum-total > span:first-child { color: var(--c-ink); font-weight: 700; }
.cart-total { font-family: var(--font-mono); font-size: 22px; font-weight: 800; color: var(--c-ink); }
.cart-total i { font-size: 13px; margin-left: 2px; }

.cart-cta { display: flex; flex-direction: column; gap: 10px; padding: 8px var(--gutter) 28px; }

/* ========== 주문 내역 ========== */
.ord-list { padding: 0 var(--gutter); }
.ord-row {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 0; border-bottom: 1px solid var(--c-divider); color: var(--c-ink);
}
.ord-row:last-child { border-bottom: 0; }
.ord-main { flex: 1; min-width: 0; }
.ord-no { font-family: var(--font-serif); font-size: 16px; letter-spacing: -0.01em; }
.ord-date { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.ord-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ord-amount { font-family: var(--font-mono); font-size: 15px; font-weight: 700; white-space: nowrap; }
.ord-amount i, .ord-item-amount i { font-style: normal; font-family: var(--font-sans); font-size: 12px; font-weight: 400; color: var(--c-text-muted); margin-left: 1px; }
.ord-arrow { flex-shrink: 0; color: var(--c-text-disabled); font-size: 20px; line-height: 1; }

/* 상태 태그 — 공용 (목록 + 상세) */
.ord-tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--c-text-muted); background: var(--c-paper); border: 1px solid var(--c-divider);
}
.ord-tag.is-ok  { color: var(--c-dahong); border-color: var(--c-dahong); background: transparent; }
.ord-tag.is-off { color: var(--c-text-disabled); }

/* 상세 */
.ord-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--c-text-muted); font-family: var(--font-mono); }
.ord-meta-dot { color: var(--c-divider); }
.ord-sec { padding: 22px var(--gutter); border-bottom: 1px solid var(--c-divider); }
.ord-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.ord-sec-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 17px; letter-spacing: -0.02em; }
.ord-sec-aux { font-family: var(--font-mono); font-size: 12px; color: var(--c-text-muted); }
.ord-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--c-divider); }
.ord-item:last-child { border-bottom: 0; }
.ord-item-main { flex: 1; min-width: 0; }
.ord-item-name { font-size: 14px; line-height: 1.45; color: var(--c-ink); }
.ord-item-qty { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.ord-item-amount { flex-shrink: 0; font-family: var(--font-mono); font-size: 14px; font-weight: 700; white-space: nowrap; }
.ord-def { display: grid; grid-template-columns: 84px 1fr; row-gap: 10px; column-gap: 12px; font-size: 14px; }
.ord-def dt { color: var(--c-text-muted); }
.ord-def dd { color: var(--c-ink); line-height: 1.5; }

/* ========== FORM ========== */
.form-page {
  padding: 32px var(--gutter) 40px;
}
.form-h {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--c-ink);
}
.form-h .dahong { color: var(--c-dahong); font-weight: 500; }
.form-sub {
  margin-top: 8px;
  font-size: 13px; color: var(--c-text-muted);
  letter-spacing: -0.01em;
}

.form-group { margin-top: 22px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--c-bg);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  transition: border-color .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--c-ink);
}
.form-help {
  margin-top: 6px;
  font-size: 11px; color: var(--c-text-muted);
  letter-spacing: 0;
}

/* Checkbox / agree */
.agree {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-divider);
}
.agree:last-child { border-bottom: 0; }
.agree input[type=checkbox] {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--c-dahong);
}
.agree label {
  flex: 1;
  font-size: 13px;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.agree .req {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  color: var(--c-dahong);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: 6px;
}
.agree .opt {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600;
  color: var(--c-text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: 6px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn--block { display: flex; width: 100%; }
.btn--primary {
  background: var(--c-ink);
  color: #fff;
  border: 1px solid var(--c-ink);
}
.btn--primary:hover { background: #000; }
.btn--ghost {
  background: var(--c-bg);
  color: var(--c-ink);
  border: 1px solid var(--c-ink);
}
.btn--dahong {
  background: var(--c-dahong);
  color: #fff;
  border: 1px solid var(--c-dahong);
}
.btn--dahong:hover { background: var(--c-dahong-deep); }
.btn--link {
  background: none;
  color: var(--c-ink);
  border: 0;
  border-bottom: 1px solid var(--c-ink);
  height: auto; padding: 4px 0 3px;
  border-radius: 0;
  font-size: 11px;
}

/* SNS buttons */
.sns-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  height: 48px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.sns-btn--kakao { background: #FEE500; color: #181600; }
.sns-btn--naver { background: #03C75A; color: #fff; }

/* Divider with text */
.or {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: var(--tracking-caps);
  color: var(--c-text-muted); text-transform: uppercase;
}
.or::before, .or::after {
  content: ''; flex: 1; height: 1px; background: var(--c-divider);
}

/* Alert / flash */
.alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  letter-spacing: -0.01em;
  border: 1px solid;
}
.alert--error { background: #FDF0F0; color: var(--c-dahong); border-color: #F3C9CB; }
.alert--info  { background: #F0F5FA; color: var(--c-info);   border-color: #C8D8E8; }

/* Toast 레이어 (flash → top-center popup) */
.toast-layer {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--container) - 2 * var(--gutter));
  display: flex; flex-direction: column; gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-divider);
  box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06);
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-on  { opacity: 1; transform: translateY(0); }
.toast.is-out { opacity: 0; transform: translateY(-6px); }
.toast-icon { flex: 0 0 auto; width: 18px; height: 18px; }
.toast-msg  { flex: 1; min-width: 0; line-height: 1.4; }
.toast-close {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--c-text-muted);
}
.toast-close svg { width: 14px; height: 14px; }
.toast--error { border-color: #F3C9CB; }
.toast--error .toast-icon { color: var(--c-dahong); }
.toast--info  { border-color: #C8D8E8; }
.toast--info  .toast-icon { color: var(--c-info); }

/* Form footer link */
.form-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--c-text-muted);
  letter-spacing: -0.01em;
}
.form-foot a { color: var(--c-ink); border-bottom: 1px solid var(--c-ink); padding-bottom: 1px; }

/* Profile card / mypage */
.profile-card {
  padding: 32px var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--c-divider);
}
.profile-avatar {
  width: 80px; height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--c-paper);
  border: 1px solid var(--c-divider);
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 500;
  color: var(--c-text-muted);
}
.profile-name {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.025em;
}
.profile-email {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--c-text-muted);
  letter-spacing: 0;
}

/* Menu list */
.menu {
  padding: 4px var(--gutter) 24px;
}
.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--c-divider);
  font-size: 14px; letter-spacing: -0.01em;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row .arrow { color: var(--c-text-disabled); font-family: var(--font-mono); }

/* Page title */
.page-h {
  padding: 24px var(--gutter) 20px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.025em;
  border-bottom: 1px solid var(--c-divider);
}

/* ==========================================================
   1:1 INQUIRY — list / form / detail
   ========================================================== */
.inq-page { padding: 24px var(--gutter) 40px; }

.inq-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--c-text-muted);
  text-decoration: none;
}
.inq-back svg { width: 14px; height: 14px; }
.inq-back:hover { color: var(--c-ink); }

.inq-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--c-divider);
}
.inq-detail-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--c-divider);
  margin-bottom: 20px;
}

.inq-flash {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 12.5px;
  border: 1px solid;
}
.inq-flash-ok  { color: #1f6b3a; border-color: #b6e0c3; background: #eaf6ee; }
.inq-flash-err { color: var(--c-dahong-deep); border-color: #f0c8cb; background: #fdecec; }

.inq-toolbar { margin-top: 18px; display: flex; justify-content: flex-end; }

.inq-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  background: var(--c-ink); color: #fff;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0; cursor: pointer;
}
.inq-btn-primary:hover { background: #000; }

.inq-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px;
  background: var(--c-bg); color: var(--c-ink);
  border: 1px solid var(--c-divider);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.inq-btn-ghost:hover { background: var(--c-paper); }

.inq-empty {
  margin-top: 22px;
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--c-divider);
  border-bottom: 1px solid var(--c-divider);
  background: var(--c-paper);
}

.inq-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--c-ink); }
.inq-list li { border-bottom: 1px solid var(--c-divider); }
.inq-row {
  position: relative;
  display: block;
  padding: 16px 84px 16px 4px;
  text-decoration: none;
  color: var(--c-ink);
}
.inq-row:hover { background: var(--c-paper); }
.inq-row-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--c-text-muted);
}
.inq-row-meta .sep { color: var(--c-text-disabled); }
.inq-row-meta .mono { font-family: var(--font-mono); }
.inq-cat {
  display: inline-block;
  padding: 2px 6px;
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.inq-row-title {
  margin-top: 6px;
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inq-row-st {
  position: absolute; top: 50%; right: 4px;
  transform: translateY(-50%);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid;
}
.inq-st-pending  { color: #a86b00; border-color: #f1d0a0; background: #fff6e6; }
.inq-st-answered { color: #1f6b3a; border-color: #b6e0c3; background: #eaf6ee; }
.inq-st-closed   { color: var(--c-text-muted); border-color: var(--c-divider); background: var(--c-paper); }

/* form */
.inq-page--form { padding-bottom: calc(var(--tabbar-clearance) + 80px); }
.inq-form { margin-top: 22px; }
.inq-field { margin-bottom: 18px; }
.inq-label,
.inq-field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--c-text-muted);
  text-transform: uppercase;
}
.inq-field .req { color: var(--c-dahong); margin-left: 2px; }
.inq-field .inq-opt {
  margin-left: 4px;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--c-text-disabled);
}
.inq-field input,
.inq-field select,
.inq-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-divider);
  border-radius: var(--r-md);
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.inq-field input::placeholder,
.inq-field textarea::placeholder { color: var(--c-text-disabled); }
.inq-field input.mono { font-family: var(--font-mono); }
.inq-field textarea { resize: vertical; min-height: 180px; line-height: 1.6; }
.inq-field input:focus,
.inq-field select:focus,
.inq-field textarea:focus { border-color: var(--c-ink); }

/* category chip selector */
.inq-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.inq-chip {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--c-divider);
  border-radius: var(--r-pill);
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  background: var(--c-bg);
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.inq-chip input { position: absolute; opacity: 0; pointer-events: none; }
.inq-chip:hover { border-color: var(--c-ink); }
.inq-chip.is-on {
  border-color: var(--c-dahong);
  background: var(--c-dahong);
  color: #fff;
}

/* body char counter */
.inq-counter {
  margin-top: 6px;
  display: flex; justify-content: flex-end; gap: 4px;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.inq-counter .mono { font-family: var(--font-mono); }

.inq-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 380px) {
  .inq-grid-2 { grid-template-columns: 1fr; }
}

/* actions — sticky 다홍 primary + ghost cancel */
.inq-actions {
  position: sticky;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  margin-top: 28px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--c-bg) 30%);
  z-index: 5;
}
.inq-btn-submit {
  width: 100%; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-dahong); color: #fff;
  border: 1px solid var(--c-dahong);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.inq-btn-submit:hover { background: var(--c-dahong-deep); border-color: var(--c-dahong-deep); }
.inq-btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.inq-actions .inq-btn-ghost {
  width: 100%;
  height: 52px;
  border-radius: var(--r-md);
}
.inq-actions .inq-btn-primary {
  width: 100%;
  height: 52px;
}

/* detail */
.inq-body-card,
.inq-answer-card,
.inq-pending-card {
  margin-top: 16px;
  padding: 18px 16px;
  border: 1px solid var(--c-divider);
  background: var(--c-bg);
}
.inq-answer-card { border-color: var(--c-ink); border-width: 1.5px; }
.inq-pending-card {
  background: var(--c-paper);
  text-align: center;
  font-size: 13px;
  color: var(--c-text-muted);
}
.inq-card-label {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 10px;
}
.inq-card-label-answer { color: var(--c-dahong); }
.inq-card-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-ink);
  word-break: break-word;
}
