/* 셀리브 공통 스타일 — 디자인 기준서: .claude/skills/sellive-design/SKILL.md
   모든 화면이 head 끝에서 tailwind.css 다음에 불러온다. 색·글꼴·간격·구성 요소는 여기에만 둔다. */

@import url("../fonts/pretendard/pretendardvariable-dynamic-subset.css");
@import url("../fonts/ibm-plex-sans-kr/700.css");

/* ── 1. 토큰 ─────────────────────────────────────────── */
:root {
    --ink: #18181B;
    --ink-2: #3F3F46;
    --muted: #71717A;
    --line: #E4E4E7;
    --line-strong: #D4D4D8;
    --paper: #FFFFFF;
    --canvas: #F4F4F5;
    --accent: #6D28D9;
    --accent-strong: #5B21B6;
    --accent-soft: #F3EEFF;
    --danger: #B91C1C;

    --st-pending: #92400E;  --st-pending-bg: #FEF3C7;
    --st-paid: #1E40AF;     --st-paid-bg: #DBEAFE;
    --st-shipped: #065F46;  --st-shipped-bg: #D1FAE5;
    --st-cancel: #991B1B;   --st-cancel-bg: #FEE2E2;

    --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    --font-head: "IBM Plex Sans KR", "Pretendard Variable", Pretendard, sans-serif;

    --r-badge: 6px;
    --r-control: 8px;
    --r-card: 12px;
    --r-modal: 16px;
    --shadow-float: 0 12px 32px rgba(24, 24, 27, 0.16), 0 2px 6px rgba(24, 24, 27, 0.08);

    /* 예전 화면 변수(theme.css 가 쓰던 이름)를 토큰에 연결 */
    --bg-primary: var(--canvas);
    --bg-secondary: var(--paper);
    --bg-tertiary: var(--canvas);
    --bg-glass: var(--paper);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-2);
    --text-muted: var(--muted);
    --border-color: var(--line);
    --input-bg: var(--paper);
    --input-border: var(--line-strong);
    --input-text: var(--ink);
    --input-placeholder: #8E8E96;
    --shadow: none;
    --accent-hover: var(--accent-strong);
    /* 화면 파일이 쓰던 이름 — 정의가 없어 흰 바탕에 흰 글자가 되던 곳(상점 수량 + 버튼 등) */
    --accent-color: var(--accent);
    --bg-card: var(--paper);
}

/* ── 2. 바탕·글꼴 ────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body, body.light-mode {
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    transition: none;
    -webkit-font-smoothing: antialiased;
}
/* 화면마다 박혀 있던 * { font-family: 'Noto Sans KR' } 보다 뒤에서 이긴다 */
* { font-family: var(--font-body); }
h1, h2, h3, .font-head { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; word-break: keep-all; }
button, .btn, label { word-break: keep-all; }
.tabular-nums, td, .price, [data-num] { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* 테마 전환 버튼 — 밝은 화면 하나로 정리해 숨긴다(JS 는 그대로) */
.theme-toggle, #themeToggle { display: none !important; }

/* ── 3. 예전 어두운 바탕용 클래스를 밝은 바탕에 맞게 ────────── */
.gradient-bg, body.light-mode .gradient-bg { background: var(--canvas); min-height: 100vh; }
.glass, body.light-mode .glass {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
header.glass, nav.glass, .sticky.glass { border-width: 0 0 1px 0; }
.bg-white\/5 { background-color: rgba(24, 24, 27, 0.035); }
.bg-white\/10 { background-color: rgba(24, 24, 27, 0.06); }
.bg-white\/20 { background-color: rgba(24, 24, 27, 0.09); }
.hover\:bg-white\/5:hover { background-color: rgba(24, 24, 27, 0.05); }
.hover\:bg-white\/10:hover { background-color: rgba(24, 24, 27, 0.08); }
.hover\:bg-white\/20:hover { background-color: rgba(24, 24, 27, 0.1); }
.border-white\/5, .border-white\/10 { border-color: var(--line); }
.border-white\/20 { border-color: var(--line-strong); }
.text-white\/60, .text-white\/70 { color: var(--muted); }
.text-white\/80 { color: var(--ink-2); }
/* 그라데이션은 쓰지 않는다 — 시작 색 하나로 */
[class*="bg-gradient-to-"] { --tw-gradient-to: var(--tw-gradient-from) !important; }
.backdrop-blur, .backdrop-blur-sm, .backdrop-blur-md, .backdrop-blur-lg, .backdrop-blur-xl { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.card-hover { transition: border-color .15s; }
.card-hover:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.animate-bounce { animation: none; }

/* ── 4. 입력칸 ───────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], input[type="url"], select, textarea,
body.light-mode textarea {
    background-color: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-control);
    font-size: 16px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], input[type="url"], select { min-height: 44px; }
input::placeholder, textarea::placeholder { color: var(--input-placeholder); opacity: 1; }
input:focus, select:focus, textarea:focus, body.light-mode textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
input[readonly] { background-color: var(--canvas); }
select option, body.light-mode select option { background: var(--paper); color: var(--ink); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* ── 5. 버튼 ─────────────────────────────────────────── */
button, .btn { font-weight: 600; }
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
/* 주요 버튼(포인트 색 바탕)은 누르기 쉬운 높이로 */
/* 옅은 보라(bg-purple-500/20 처럼 "/" 가 붙은 것)는 보조 표시라 제외 — 옆 버튼과 높이가 어긋나고 글자가 위로 붙던 문제 */
button[class*="bg-purple-5"]:not([class*="bg-purple-500/"]), button[class*="bg-purple-6"]:not([class*="bg-purple-600/"]),
a[class*="bg-purple-5"]:not([class*="bg-purple-500/"]), a[class*="bg-purple-6"]:not([class*="bg-purple-600/"]),
button[class*="bg-gradient-to-"], a[class*="bg-gradient-to-"] { min-height: 44px; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-control); background: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-control); background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); font-weight: 600; }
.btn-secondary:hover { border-color: var(--ink-2); }

/* ── 6. 표 ───────────────────────────────────────────── */
th, body.light-mode th { color: var(--ink-2); font-size: 14px; font-weight: 600; background: var(--canvas); }
th, td { border-bottom: 1px solid var(--line); }
tr:hover { background: rgba(24, 24, 27, 0.025); }

/* ── 7. 배지·알림 ────────────────────────────────────── */
.badge { border-radius: var(--r-badge); font-size: 13px; font-weight: 600; padding: 3px 8px; }
.alert-success { background: var(--st-shipped-bg); color: var(--st-shipped); }
.alert-warning { background: var(--st-pending-bg); color: var(--st-pending); }
.alert-error { background: var(--st-cancel-bg); color: var(--st-cancel); }
.alert-info { background: var(--st-paid-bg); color: var(--st-paid); }
.text-primary { color: var(--ink) !important; }
.text-secondary { color: var(--ink-2) !important; }
.text-muted { color: var(--muted) !important; }

/* ── 8. 모달 ─────────────────────────────────────────── */
.modal-overlay, body.light-mode .modal-overlay { background: rgba(24, 24, 27, 0.5); -webkit-backdrop-filter: none; backdrop-filter: none; }
.bg-black\/50, .bg-black\/60, .bg-black\/70, .bg-black\/80 { background-color: rgba(24, 24, 27, 0.5); }
[id$="Modal"] > .glass, [id$="Modal"] > div > .glass, .modal-overlay > .glass { box-shadow: var(--shadow-float); border-radius: var(--r-modal); }

/* ── 9. 셀러·관리자 메뉴 ─────────────────────────────── */
.sidebar { background: var(--paper) !important; border-right: 1px solid var(--line); }
.nav-item { color: var(--ink-2); border-radius: 0 var(--r-control) var(--r-control) 0; font-weight: 500; }
.nav-item:hover { color: var(--ink); background: var(--canvas); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); border-left: 3px solid var(--accent); font-weight: 600; }
.nav-item .nav-emoji { display: none; }

/* ── 10. 스크롤 막대 ─────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 10px; border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: #A1A1AA; }

/* ── 11. 데모 체험 띠 ────────────────────────────────── */
#sellive-demo-bar { background: var(--ink) !important; color: #fff !important; font-size: 14px !important; }

/* ── 12. 움직임 줄이기 ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── 13. 휴대폰 배치 (예전 화면 공통 보정) ──────────────── */
.main-content { min-width: 0; }
@media (max-width: 640px) {
    /* 제목 + 버튼 줄은 줄바꿈 */
    .main-content .flex.items-center.justify-between,
    .main-content .flex.justify-between.items-center,
    .main-content .flex.items-start.justify-between { flex-wrap: wrap; gap: 12px; }
    /* 반응형 지정이 없는 4·5·6칸 격자는 2·2·3칸으로 */
    .main-content .grid.grid-cols-4:not([class*="sm:grid-cols"]):not([class*="md:grid-cols"]):not([class*="lg:grid-cols"]),
    .main-content .grid.grid-cols-5:not([class*="sm:grid-cols"]):not([class*="md:grid-cols"]):not([class*="lg:grid-cols"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .main-content .grid.grid-cols-6:not([class*="sm:grid-cols"]):not([class*="md:grid-cols"]):not([class*="lg:grid-cols"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    /* 넓은 표는 표 안에서만 가로로 넘긴다 */
    .main-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main-content th, .main-content td { white-space: nowrap; }
    .main-content { padding-left: 16px !important; padding-right: 16px !important; }
}

/* 데모 체험 띠는 화면 아래에 고정 — 위쪽의 고정 메뉴·모바일 머리말을 가리지 않게 */
#sellive-demo-bar { position: fixed !important; top: auto !important; bottom: 0; left: 0; right: 0; z-index: 45 !important; padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
body.has-demo-bar { padding-bottom: 56px; }

/* 작은 버튼(목록 안) — 기준서 5절: 높이 36px, 14px */
.sl-btn-sm { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--r-control); border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; }
.sl-btn-sm:hover { border-color: var(--ink-2); }
.sl-btn-danger { color: var(--danger); }

/* 화면 바탕(짧은 화면 아래 빈 곳까지) */
html { background: var(--canvas); }
/* 구간 제목은 무채색 — 예전 화면의 색 제목(text-emerald-400 등) 정리 */
.main-content h2, .main-content h3, .main-content h4 { color: var(--ink); }
@media (max-width: 640px) {
    .main-content .flex.gap-2, .main-content .flex.gap-3, .main-content .flex.gap-4 { flex-wrap: wrap; }
    .main-content input:not([type="checkbox"]):not([type="radio"]), .main-content select { max-width: 100%; min-width: 0; }
}
@media (max-width: 640px) {
    /* 한 줄에 같은 폭으로 늘어선 버튼(flex-1)은 줄바꿈되게 — 한 줄 최대 3개 */
    .main-content .flex.gap-2 > .flex-1, .main-content .flex.gap-3 > .flex-1 { flex: 1 1 auto; min-width: calc(33% - 8px); }
    /* 검색칸은 너무 좁아지지 않게 */
    .main-content .flex > input[type="text"], .main-content .flex > input[type="search"] { flex: 1 1 180px; }
}

/* 입력칸 옆에 버튼·글자가 붙은 줄(flex)에서 입력칸이 칸 밖으로 넘치지 않게 */
.flex > input.flex-1, .flex > select.flex-1 { min-width: 0; width: auto; }

/* 왼쪽 메뉴 맨 위 표식 (예전 🎬 자리) — 소개 화면 글자 표식과 같은 점 */
.sl-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }

/* (검토 반영) 화면 전체를 덮는 창(모달)은 내용이 길면 창 안에서 스크롤 — 발송 처리 4번째 묶음 이후에 닿지 못하던 문제 */
.fixed.inset-0.z-50 { overflow-y: auto; }
/* 데모 띠(z 45)는 모달(z 50) 아래에. 왼쪽 메뉴는 띠 높이만큼 위에서 끝나게 */
body.has-demo-bar .sidebar { height: auto !important; bottom: 40px; }
/* (메뉴 스크롤 2026-11-26) 왼쪽 메뉴(관리자·셀러, 휴대폰 서랍 포함): 화면 높이에 맞추고 메뉴 안에서만 세로 스크롤.
   - 위·아래를 화면에 붙여 높이를 정함(top:0·bottom:0) — 휴대폰 주소창이 나타나고 사라져도 보이는 높이를 따라감. 최대 100dvh.
   - 첫 칸(로고+메뉴)이 스크롤되고, 맨 아래 로그아웃 칸은 겹치지 않게 흐름 안으로(예전: absolute 로 메뉴 위에 겹침).
   - 관리자 화면은 높이 제한이 없어 아래 메뉴(공급자 마켓 등)가 화면 밖으로 잘렸고, 셀러 화면은 100vh 라 주소창이 보이면 맨 아래가 가려졌다. */
.sidebar { top: 0; bottom: 0; height: auto !important; min-height: 0 !important; max-height: 100vh; max-height: 100dvh; display: flex !important; flex-direction: column; overflow: hidden; }
.sidebar > div:first-child { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sidebar > div.absolute.bottom-0 { position: static !important; flex: none; background: var(--paper); }
.sidebar nav { overflow: visible; }
body.has-demo-bar .sidebar { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); }
/* (메뉴 스크롤 후속) 같은 원인 — 'vh' 높이는 휴대폰 주소창이 보일 때 실제 보이는 높이보다 커서 창 아래가 가려질 수 있다.
   보이는 높이(dvh)를 아는 브라우저에서는 그것으로: 시트 3종, 화면 HTML 의 모달(max-h-[90vh]·max-h-[92vh]) */
@supports (height: 1dvh) {
    .max-h-\[90vh\] { max-height: 90dvh; }
    .max-h-\[92vh\] { max-height: 92dvh; }
    .sl-sheet, .pg-apply-sheet { max-height: 92dvh; }
    @media (min-width: 768px) { .pd-sheet { max-height: 92dvh; } }
}
/* 휴대폰에서 메뉴를 연 동안 뒤쪽 본문은 스크롤되지 않게 */
@media (max-width: 768px) {
    html:has(.sidebar.open), body:has(.sidebar.open) { overflow: hidden; overscroll-behavior: none; }
    .sidebar-overlay.open { touch-action: none; }
    /* 공지사항 화면 2개(admin-notices·channel-notices)는 바깥 막에 'active' 를 붙인다 — 'open' 과 같게(예전엔 막이 안 보여 바깥을 눌러도 안 닫힘) */
    .sidebar-overlay.active { display: block; position: fixed; inset: 0; background: rgba(24, 24, 27, 0.5); z-index: 99; touch-action: none; }
}
.sidebar .nav-item { padding-top: 10px; padding-bottom: 10px; }
/* 상품 관리 줄: 휴대폰에서는 버튼 묶음을 다음 줄로(정보 칸이 1~2글자 폭으로 찌그러지던 문제) */
@media (max-width: 640px) {
    .sl-prow { flex-wrap: wrap; }
    .sl-prow > .flex-1 { flex-basis: calc(100% - 80px); min-width: 0; }
    .sl-prow > div:last-child { flex-basis: 100%; justify-content: flex-start; }
}

/* (7차 [4-6]) 선택 상자가 긴 라이브 제목 때문에 화면을 넓히지 않게 */
select { max-width: 100%; text-overflow: ellipsis; }
.flex > select, .grid > select { min-width: 0; }

/* (8차 C-1) 페이빌리지 가맹점 신청 안내 창 — 휴대폰은 아래에서 올라오는 시트 */
.pg-apply-sheet { background: var(--paper); color: var(--ink); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: var(--r-modal) var(--r-modal) 0 0; box-shadow: var(--shadow-float); }
@media (min-width: 768px) { .pg-apply-sheet { padding: 32px; border-radius: var(--r-modal); } }
.pg-apply-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.3; word-break: keep-all; }
.pg-apply-must { background: var(--accent-soft); color: var(--ink); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; font-size: 16px; line-height: 1.6; }
.pg-apply-must strong { color: var(--accent); font-weight: 700; }
.pg-apply-h { font-size: 16px; font-weight: 700; margin: 24px 0 8px; }
.pg-apply-steps { list-style: decimal; padding-left: 20px; line-height: 1.6; color: var(--ink-2); }
.pg-apply-steps li + li { margin-top: 4px; }
.pg-apply-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.pg-apply-tabs button { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-2); font-weight: 600; }
.pg-apply-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pg-apply-docs { list-style: disc; padding-left: 20px; line-height: 1.7; color: var(--ink-2); }
.pg-apply-docs + .pg-apply-docs { margin-top: 0; }
.pg-apply-values { border: 1px solid var(--line); border-radius: 12px; }
.pg-apply-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label btn" "value btn"; gap: 2px 12px; align-items: center; padding: 12px 16px; }
.pg-apply-row + .pg-apply-row { border-top: 1px solid var(--line); }
.pg-apply-label { grid-area: label; font-size: 14px; color: var(--muted); }
.pg-apply-value { grid-area: value; font-size: 16px; font-weight: 600; word-break: break-all; }
.pg-apply-value.is-empty { color: var(--muted); font-weight: 400; }
.pg-apply-row .sl-btn-sm { grid-area: btn; }
.pg-apply-primary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.pg-apply-primary:hover { background: var(--accent-strong); }

/* 공통 아래 시트(휴대폰)·가운데 창(PC) 모달 — 환불 요청 등 */
.sl-sheet { background: var(--paper); color: var(--ink); width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: var(--r-modal) var(--r-modal) 0 0; box-shadow: var(--shadow-float); }
@media (min-width: 768px) { .sl-sheet { padding: 32px; border-radius: var(--r-modal); } }
.sl-sheet h3 { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.3; word-break: keep-all; }
.sl-sheet label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 16px 0 6px; }
.sl-sheet input, .sl-sheet textarea, .sl-sheet select { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); }
.sl-sheet textarea { min-height: 88px; }
.sl-steps { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 12px; }
.sl-steps li { padding: 10px 14px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.sl-steps li + li { border-top: 1px solid var(--line); }
.sl-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.sl-warn { background: #FEF3C7; color: #92400E; border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.5; margin-top: 16px; }
.sl-info { background: var(--canvas); color: var(--ink-2); border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.5; margin-top: 16px; }
.sl-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; border: 0; }
.sl-primary:hover { background: var(--accent-strong); }
.sl-primary:disabled { opacity: .5; }
.st-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-wait { color: #92400E; background: #FEF3C7; }
.st-info { color: #1E40AF; background: #DBEAFE; }
.st-ok { color: #065F46; background: #D1FAE5; }
.st-bad { color: #991B1B; background: #FEE2E2; }
.st-muted { color: var(--ink-2); background: var(--canvas); }
.fee-pay { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.fee-pay:first-child { border-top: 0; }
.fee-pay .amt { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.fee-pay .meta { font-size: 14px; color: var(--muted); }
.fee-pay .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 상품 상세페이지 — 상세 이미지는 폭에 맞춰 틈 없이 세로로 이어 붙인다 */
.pd-images img { display: block; width: 100%; height: auto; margin: 0; }
.pd-desc { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.7; color: var(--ink); padding: 16px 0; }
.pd-empty { color: var(--muted); padding: 24px 0; text-align: center; }
.pd-sheet { background: var(--paper); color: var(--ink); width: 100%; height: 100%; max-width: 640px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
@media (min-width: 768px) { .pd-sheet { height: auto; max-height: 92vh; border-radius: var(--r-modal); box-shadow: var(--shadow-float); } }
.pd-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.pd-head h3 { font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.3; word-break: keep-all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-body { padding: 0 16px 24px; }
.pd-foot { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.pd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
.pd-thumb { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.pd-thumb img { display: block; width: 100%; height: 96px; object-fit: cover; object-position: top; }
.pd-thumb .acts { display: flex; justify-content: space-between; padding: 4px; gap: 4px; }
.pd-thumb .acts button { flex: 1; min-height: 36px; min-width: 0; padding: 0 4px; font-size: 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.pd-detail-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; }

/* 상세 창 아래 담기 영역 — 창 제목과 겹치는 사진·이름·상세보기 버튼은 숨기고 가격·옵션·수량·담기만 */
#dmCard > div { padding: 0 !important; background: transparent !important; border: 0 !important; }
#dmCard .pd-detail-btn, #dmCard .product-image, #dmCard > div > .flex.gap-4 > :first-child:not(.flex-1), #dmCard p.truncate { display: none !important; }
#dmCard > div > .flex.gap-4 { margin-bottom: 4px; }
#dmCard > div > .space-y-2 { margin-top: 4px; padding-top: 8px; }
/* (보완-8) 휴대폰(640px 미만)에서는 표 대신 줄 목록 — .only-wide 는 표, .only-narrow 는 줄 목록 */
.only-wide { display: none; }
@media (min-width: 640px) { .only-wide { display: block; } .only-narrow { display: none; } }
.m-rows { list-style: none; margin: 0; padding: 0; }
.m-rows li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.m-rows li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.m-rows .m-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }
.m-rows .m-amt { flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
/* (보완-11) 가입 필수 동의 */
.agree-box { border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; background: var(--paper); }
.agree-row { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 15px; color: var(--ink); cursor: pointer; }
.agree-row input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--accent); }
.agree-row span { flex: 1; min-width: 0; }
.agree-link { flex-shrink: 0; font-size: 14px; color: var(--accent); text-decoration: underline; padding: 8px 0; }
.agree-detail { border-top: 1px solid var(--line); padding: 8px 0 4px; font-size: 14px; color: var(--ink-2); }
.agree-detail summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--ink-2); }
.agree-detail ul { list-style: disc; padding-left: 20px; margin: 4px 0 8px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* (실시간주문창 4, 2026-11-25) 공통 모달 바탕(휴대폰 아래 시트·PC 가운데)과 켜고 끄는 스위치 — 고객 공개 설정 창 */
.sl-modal { position: fixed; inset: 0; z-index: 60; background: rgba(24, 24, 27, .5); display: flex; align-items: flex-end; justify-content: center; }
.sl-modal.hidden { display: none; }
@media (min-width: 768px) { .sl-modal { align-items: center; padding: 24px; } }
.sl-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sl-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sl-switch-row p { margin: 0; }
.sl-switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line-strong); border: 0; cursor: pointer; }
.sl-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); transition: transform .15s; }
.sl-switch[aria-checked="true"] { background: var(--accent); }
/* (재점검수정 S6) 누르는 범위를 44px 이상으로 — 보이는 크기는 그대로 */
.sl-switch::before { content: ""; position: absolute; top: -6px; bottom: -6px; left: -4px; right: -4px; }
.sl-switch:disabled { opacity: .5; cursor: not-allowed; }
.sl-switch[aria-checked="true"]::after { transform: translateX(20px); }
.sl-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sl-row-gap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sl-qr { display: block; width: 200px; height: 200px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; image-rendering: pixelated; }
.sl-sheet .sl-choice { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-size: 16px; font-weight: 500; color: var(--ink); }
.sl-sheet .sl-choice input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .sl-switch::after { transition: none; } }
/* (홈가이드 B) 주문 순번 공개 동의 안내 — 주문서·셀러 공개 설정 창 */
.sl-info.sl-consent { margin: 8px 0; word-break: keep-all; }
.sl-consent p, .sl-keep { word-break: keep-all; }
