:root {
  color-scheme: light;
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #94a3b8;
  --accent-soft: #eff6ff;
  --accent: #3b82f6;
  --accent-strong: #1d4ed8;
  --success-soft: #dcfce7;
  --success: #16a34a;
  --warning-soft: #fef3c7;
  --warning: #d97706;
  --danger-soft: #fee2e2;
  --danger: #dc2626;
  --green: #3b82f6;
  --green-2: #1d4ed8;
  --green-soft: #eff6ff;
  --blue: #1d4ed8;
  --coral: #dc2626;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, .05);
  --radius: 8px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f172a;
  --surface: color-mix(in srgb, #0f172a 86%, #475569);
  --surface-2: color-mix(in srgb, #0f172a 70%, #475569);
  --ink: #f8fafc;
  --ink-2: #e2e8f0;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: color-mix(in srgb, #64748b 48%, transparent);
  --line-strong: #64748b;
  --accent-soft: color-mix(in srgb, #3b82f6 18%, transparent);
  --success-soft: color-mix(in srgb, #16a34a 18%, transparent);
  --warning-soft: color-mix(in srgb, #d97706 18%, transparent);
  --danger-soft: color-mix(in srgb, #dc2626 18%, transparent);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mobile-header-actions, .mobile-platform-panel, .mobile-bottom-nav, .mobile-filter-backdrop, .mobile-full-page { display: none; }
.stat small { display: none; }

.site-shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0 36px; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; margin-bottom: 14px; }
.brand-block { display: flex; align-items: center; gap: 13px; min-width: 0; text-decoration: none; }
.brand-logo { display: block; width: 176px; height: 54px; object-fit: contain; object-position: left center; }
.brand-logo-dark { display: none; }
html[data-theme="dark"] .brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: block; }
.domain-tag { padding-left: 13px; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.segmented, .theme-switch { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.segmented { width: 350px; }
.segmented button, .theme-switch button { min-height: 42px; border: 0; background: transparent; cursor: pointer; }
.segmented button { flex: 1; padding: 0 24px; color: var(--ink-2); font-weight: 650; }
.segmented button + button, .theme-switch button + button { border-left: 1px solid var(--line); }
.segmented button.active { color: #fff; background: var(--accent-strong); }
.theme-switch { justify-self: end; }
.theme-switch button { padding: 0 17px; color: var(--muted); font-size: 13px; }
.theme-switch button.active { color: var(--accent-strong); background: var(--accent-soft); }

.filter-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.filter-panel.compact { position: relative; z-index: 5; overflow: visible; margin-top: 0; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; padding: 14px 20px 18px; }
.search-row .field-search { display: grid; grid-template-columns: 1fr; gap: 7px; }
.search-row .field-search input { height: 54px; border-color: var(--accent); padding: 0 16px; font-size: 13px; }
.search-row > button { align-self: end; min-height: 54px; border: 1px solid var(--accent-strong); border-radius: 6px; color: #fff; background: var(--accent-strong); cursor: pointer; font-size: 15px; font-weight: 700; }
.search-row > button:hover, .buy-button:hover { background: var(--accent); }
.stats-panel { min-height: 58px; display: flex; justify-content: center; align-items: center; gap: 0; }
.stat { min-width: 176px; display: flex; justify-content: center; align-items: baseline; gap: 8px; padding: 0 24px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat span { color: var(--ink-2); font-size: 15px; }
.stat strong { color: var(--accent-strong); font-size: 17px; font-weight: 700; }
.stat:nth-child(1) strong { color: #16a34a; }
.stat:nth-child(2) strong { color: #d97706; }
.stat:nth-child(3) strong { color: #dc2626; }
.stat:nth-child(4) strong { color: #1d4ed8; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr .92fr 18px .92fr; gap: 28px; align-items: center; padding: 20px 28px; }
.field { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.field > span { color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; }
.field input, .field select, .settings-panel input, .settings-panel textarea, .drawer-grid input, .drawer-grid select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 6px; outline: 0; padding: 0 12px; color: var(--ink); background: var(--surface); }
.field input::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .settings-panel input:focus, .settings-panel textarea:focus, .drawer-grid input:focus, .drawer-grid select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.sort-picker, .shop-picker { position: relative; min-width: 0; }
.sort-trigger, .shop-trigger { width: 100%; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; outline: 0; padding: 0 12px; color: var(--ink); background: var(--surface); cursor: pointer; text-align: left; }
.sort-trigger > span:first-child, .shop-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-trigger > span:last-child, .shop-trigger > span:last-child { flex: none; color: var(--muted); font-size: 15px; transform: translateY(-2px); }
.sort-trigger:focus-visible, .sort-trigger[aria-expanded="true"], .shop-trigger:focus-visible, .shop-trigger[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.sort-menu, .shop-menu { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: 100%; min-width: 216px; display: grid; gap: 3px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 18px 42px rgba(15, 23, 42, .18); }
.shop-menu { max-height: min(360px, 55vh); overflow-y: auto; overscroll-behavior: contain; }
.sort-menu[hidden], .shop-menu[hidden] { display: none; }
.sort-menu button, .shop-menu button { min-height: 38px; border: 0; border-radius: 7px; padding: 0 11px; color: var(--ink-2); background: transparent; cursor: pointer; text-align: left; font: inherit; font-size: 12px; font-weight: 600; }
.sort-menu button:hover, .sort-menu button:focus-visible, .shop-menu button:hover, .shop-menu button:focus-visible { outline: 0; color: var(--accent-strong); background: var(--accent-soft); }
.sort-menu button[aria-selected="true"], .shop-menu button[aria-selected="true"] { color: var(--accent-strong); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.price-divider { color: var(--muted); text-align: center; }

.hot-intro { margin-top: 14px; padding: 18px 22px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.hot-intro span { color: var(--accent-strong); font-size: 10px; font-weight: 750; letter-spacing: .16em; }
.hot-intro h2 { margin: 4px 0 0; font-size: 20px; }
.hot-intro p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.results-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 4px 10px; }
.results-head h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.results-head p { margin: 0; color: var(--muted); font-size: 12px; }

.product-table { background: transparent; }
#product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.product-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.product-group.expanded { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 10%, transparent); }
.product-row { min-height: 104px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; cursor: pointer; outline: 0; }
.product-row:hover { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.product-row:focus-visible { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent); }
.product-identity { min-width: 0; display: flex; align-items: flex-start; gap: 14px; }
.product-identity > div { min-width: 0; flex: 1; }
.product-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.product-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 700; }
.product-identity p { margin: 8px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.product-icon { width: 58px; height: 58px; flex: none; display: grid; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.product-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.icon-kakao { background: #fef3c7; }
.product-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.product-tags small, .offer-row small { padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 4px; color: var(--muted); background: var(--accent-soft); font-size: 9px; font-weight: 500; }
.product-card-meta { min-width: 126px; display: grid; justify-items: end; gap: 7px; }
.price-cell strong { display: block; color: var(--danger); font-size: 17px; font-weight: 600; white-space: nowrap; }
.price-cell small { display: none; }
.stock-cell { display: flex; align-items: center; gap: 7px; }
.stock-cell strong { padding: 3px 9px; border-radius: 5px; font-size: 10px; font-weight: 600; }
.stock-cell small { color: var(--muted); font-size: 9px; }
.stock-ok strong { color: var(--success); background: var(--success-soft); }
.stock-warn strong { color: var(--warning); background: var(--warning-soft); }
.stock-empty strong { color: var(--danger); background: var(--danger-soft); }
.expand-label { color: var(--accent-strong); font-size: 10px; font-weight: 650; }

.offer-panel { margin: 0 16px 16px; overflow: hidden; border-top: 1px solid var(--line); }
.offer-head, .offer-row { display: grid; grid-template-columns: minmax(0, 1.65fr) .62fr .72fr .52fr; gap: 10px; align-items: center; }
.offer-head { min-height: 34px; color: var(--muted); font-size: 15px; }
.offer-head span:last-child { text-align: center; }
.offer-row { min-height: 46px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 11px; }
.offer-row > div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.offer-row > span { min-width: 0; }
.offer-row > strong { color: var(--danger); font-size: 14px; }
.offer-row.best-offer { background: color-mix(in srgb, var(--accent-soft) 58%, transparent); }
.shop-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.shop-link:hover { color: var(--accent-strong); }
.offer-row > div > small { flex: none; color: #16a34a; border: 0; background: var(--success-soft); font-size: 14px; }
.offer-stock { color: #d97706; font-size: 14px; }
.buy-button { justify-self: stretch; min-height: 30px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 5px; color: var(--accent-strong); background: var(--surface); text-decoration: none; font-size: 11px; font-weight: 650; }
.best-offer .buy-button { color: #fff; background: var(--accent-strong); }
.buy-button:hover { color: #fff; }

.load-more { display: block; overflow-anchor: none; margin: 22px auto 0; min-width: 112px; padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-2); background: var(--surface); cursor: pointer; }
.load-more:hover { border-color: var(--accent); color: var(--accent-strong); }
.notice, .empty-state { margin-top: 14px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; background: var(--surface); }
.notice.error { color: var(--danger); background: var(--danger-soft); }
.empty-state h3 { margin: 0; }
.empty-state p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.loading-row { height: 104px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
footer { display: flex; overflow-anchor: none; align-items: center; justify-content: center; gap: 14px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.footer-brand img { width: 20px; height: 20px; }
.footer-brand span { font-weight: 800; letter-spacing: .08em; }
footer p { margin: 0; padding-left: 14px; border-left: 1px solid var(--line); }

/* Admin */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; background: #f3f6f4; color: #12201c; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px; color: #deebe6; background: #0d231d; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand .admin-wordmark { display: block; width: 158px; height: auto; }
.admin-brand .admin-mark { display: none; width: 38px; height: 38px; }
.admin-brand .brand-mark { background: #1eae88; }
.admin-brand strong { color: #77e2c4; }.admin-brand small { display: block; margin-top: 3px; opacity: .5; font-size: 8px; letter-spacing: .15em; }
.admin-sidebar nav { display: grid; gap: 7px; margin-top: 24px; }
.admin-sidebar nav button { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border: 0; border-radius: 7px; color: #9eb4ad; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.admin-sidebar nav button.active { color: white; background: #163a30; }.admin-sidebar nav button span { color: #5dccaa; }
.sidebar-note { margin-top: auto; padding: 14px; border: 1px solid rgba(120,226,196,.16); border-radius: 8px; background: rgba(33,98,80,.22); }
.sidebar-note span { color: #7be2c4; font-size: 10px; font-weight: 700; }.sidebar-note p { margin: 6px 0 0; opacity: .6; font-size: 10px; line-height: 1.55; }
.view-site { margin-top: 12px; padding: 10px; text-align: center; text-decoration: none; color: #9eb4ad; font-size: 11px; }
.admin-main { min-width: 0; padding: 30px 36px 60px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { margin: 5px 0 0; font: 700 27px/1.1 Georgia, "Songti SC", serif; }
.admin-user { display: flex; align-items: center; gap: 8px; color: #61736d; font-size: 11px; }.admin-user i { width: 9px; height: 9px; border-radius: 50%; background: #24ad85; box-shadow: 0 0 0 4px #d9efe8; }
.admin-user button { border: 0; color: #61736d; background: transparent; cursor: pointer; font-size: 11px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.admin-stats > div { padding: 18px 20px; border: 1px solid #dce4e0; border-radius: 9px; background: white; }
.admin-stats span { color: #7b8d86; font-size: 10px; }.admin-stats strong { float: right; font: 700 22px/1 Georgia, serif; }
.table-panel, .settings-panel { border: 1px solid #dce4e0; border-radius: 10px; background: white; box-shadow: 0 12px 34px rgba(27,54,45,.05); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid #e3e9e6; }
.table-toolbar h2, .settings-panel h2 { margin: 0; font: 700 18px Georgia, "Songti SC", serif; }.table-toolbar p, .settings-panel > div p { margin: 5px 0 0; color: #7a8b85; font-size: 10px; }
.toolbar-actions { display: flex; gap: 9px; }.toolbar-actions input { width: 210px; height: 37px; padding: 0 12px; border: 1px solid #d8e1dd; border-radius: 6px; outline: 0; }.toolbar-actions button, .settings-panel > button { border: 0; border-radius: 6px; padding: 0 16px; color: white; background: #087a62; cursor: pointer; font-size: 11px; font-weight: 650; }
.table-wrap { overflow-x: auto; }table { width: 100%; border-collapse: collapse; }th { padding: 11px 14px; color: #84938e; background: #f7f9f8; text-align: left; font-size: 9px; letter-spacing: .08em; }td { padding: 13px 14px; border-top: 1px solid #edf1ef; font-size: 11px; vertical-align: middle; }td:first-child { max-width: 280px; }td strong { display: block; }td small, td a { display: block; margin-top: 4px; color: #87968f; font-size: 9px; }td a:hover { color: #087a62; }.money { color: #dd5341; font-weight: 700; }.status-dot { display: inline-flex; align-items: center; gap: 6px; }.status-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }.status-dot.online::before { background: #1fad80; }.status-dot.offline::before { background: #a2aea9; }.row-actions { display: flex; gap: 5px; }.row-actions button { padding: 5px 8px; border: 1px solid #d9e2de; border-radius: 5px; background: white; cursor: pointer; font-size: 9px; }.row-actions .danger { color: #d84e3c; }.admin-loading { padding: 50px; text-align: center; color: #7b8e87; font-size: 12px; }
.admin-message { display: flex; justify-content: space-between; margin-bottom: 12px; padding: 11px 14px; border: 1px solid #b9ded2; border-radius: 7px; color: #087a62; background: #e8f5f0; font-size: 11px; }.admin-message button { border: 0; background: none; cursor: pointer; }
.settings-panel { display: grid; gap: 20px; max-width: 760px; padding: 28px; }.settings-panel > div { padding-bottom: 18px; border-bottom: 1px solid #e3e9e6; }.settings-panel label, .drawer-grid label { display: grid; gap: 7px; }.settings-panel label > span, .drawer-grid label > span { color: #61736d; font-size: 10px; font-weight: 700; }.settings-panel textarea { height: auto; padding-top: 10px; resize: vertical; }.settings-panel label small { color: #8a9a94; font-size: 9px; }.settings-panel > button { justify-self: start; min-height: 40px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: rgba(6,20,16,.46); backdrop-filter: blur(3px); }
.product-drawer { width: min(570px, 100%); height: 100%; overflow-y: auto; padding: 28px; color: #12201c; background: #f8faf9; box-shadow: -20px 0 55px rgba(0,0,0,.2); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid #dce5e1; }.drawer-head h2 { margin: 6px 0 0; font: 700 24px Georgia, "Songti SC", serif; }.drawer-head > button { width: 34px; height: 34px; border: 1px solid #d6e0dc; border-radius: 50%; background: white; cursor: pointer; font-size: 20px; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 0; }.drawer-grid .wide { grid-column: 1 / -1; }.toggle-row { display: grid; gap: 10px; padding: 16px; border: 1px solid #dce4e0; border-radius: 8px; background: white; }.toggle-row label { display: flex; gap: 10px; align-items: center; }.toggle-row input { accent-color: #087a62; }.toggle-row span strong, .toggle-row span small { display: block; }.toggle-row span strong { font-size: 11px; }.toggle-row span small { margin-top: 2px; color: #87968f; font-size: 9px; }.drawer-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }.drawer-actions button { min-width: 94px; height: 40px; border: 1px solid #d8e1dd; border-radius: 6px; background: white; cursor: pointer; }.drawer-actions button[type="submit"] { border-color: #087a62; color: white; background: #087a62; }.form-error { color: #d84e3c; font-size: 11px; }
.admin-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; background: #eff4f2; }.admin-auth-logo { width: min(240px, 72vw); height: auto; }.admin-auth h1 { margin: 20px 0 8px; font: 700 28px Georgia, "Songti SC", serif; }.admin-auth p { max-width: 440px; color: #687b74; font-size: 12px; }.admin-auth a { margin-top: 18px; padding: 11px 18px; border-radius: 7px; color: white; background: #087a62; text-decoration: none; font-size: 12px; }.admin-auth a.back { margin-top: 10px; padding: 5px; color: #657770; background: none; }
.login-form { width: min(360px, 100%); display: grid; gap: 12px; margin-top: 16px; text-align: left; }.login-form label { display: grid; gap: 7px; color: #61736d; font-size: 10px; font-weight: 700; }.login-form input { width: 100%; height: 42px; border: 1px solid #d8e1dd; border-radius: 7px; padding: 0 12px; background: white; outline: 0; }.login-form input:focus { border-color: #087a62; box-shadow: 0 0 0 3px rgba(8,122,98,.12); }.login-form button { height: 42px; border: 0; border-radius: 7px; color: white; background: #087a62; cursor: pointer; font-weight: 700; }.login-form .form-error { margin: 0; color: #d84e3c; }

/* Admin palette and product icons */
.admin-shell { background: #f8fafc; color: #0f172a; }
.admin-sidebar { color: #e2e8f0; background: #0f172a; }
.admin-brand .brand-mark { color: #fff; background: #3b82f6; border-radius: 8px; }
.admin-brand strong { color: #eff6ff; }
.admin-sidebar nav button { color: #94a3b8; }
.admin-sidebar nav button.active { background: #1d4ed8; }
.admin-sidebar nav button span { color: #eff6ff; }
.sidebar-note { border-color: rgba(59,130,246,.3); background: rgba(59,130,246,.14); }
.sidebar-note span { color: #eff6ff; }
.view-site { color: #94a3b8; }
.admin-user, .admin-user button, .settings-panel label > span, .drawer-grid label > span { color: #64748b; }
.admin-user i, .status-dot.online::before { background: #16a34a; }
.admin-user i { box-shadow: 0 0 0 4px #dcfce7; }
.admin-stats > div, .table-panel, .settings-panel, .toggle-row { border-color: #e2e8f0; border-radius: 8px; }
.admin-stats span, .table-toolbar p, .settings-panel > div p, td small, td a, .admin-loading { color: #64748b; }
.table-toolbar, .settings-panel > div, .drawer-head { border-color: #e2e8f0; }
.toolbar-actions input, .drawer-head > button, .drawer-actions button, .login-form input { border-color: #e2e8f0; }
.toolbar-actions button, .settings-panel > button, .drawer-actions button[type="submit"], .login-form button, .admin-auth a { border-color: #3b82f6; background: #3b82f6; }
th { color: #64748b; background: #f1f5f9; }
td { border-color: #e2e8f0; }
td a:hover { color: #1d4ed8; }
.money, .row-actions .danger, .form-error, .login-form .form-error { color: #dc2626; }
.admin-message { border-color: #3b82f6; color: #1d4ed8; background: #eff6ff; }
.product-drawer { color: #0f172a; background: #f8fafc; }
.drawer-head > button { width: auto; padding: 0 10px; border-radius: 6px; font-size: 11px; }
.toggle-row input { accent-color: #3b82f6; }
.admin-auth { background: #f8fafc; }
.admin-auth .brand-mark { color: #fff; background: #3b82f6; border-radius: 8px; }
.login-form input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
.admin-product-cell { min-width: 0; display: flex; align-items: center; gap: 10px; }
.admin-product-cell > div { min-width: 0; }
.admin-product-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 7px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; }
.admin-product-icon.kakao { background: #fef3c7; }
.admin-product-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.icon-picker { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 10px; align-items: center; }
.icon-picker .admin-product-icon { width: 42px; height: 42px; }

@media (max-width: 1040px) {
  .brand-logo { width: 154px; }
  .domain-tag { display: none; }
  .segmented { width: 280px; }
  .stats-panel { display: grid; grid-template-columns: repeat(4, 1fr); }
  .stat { min-width: 0; padding: 0 12px; }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .price-divider { display: none; }
  #product-grid { grid-template-columns: 1fr; }
  .offer-panel { margin: 0 12px 12px; }
  .admin-shell { grid-template-columns: 74px 1fr; }
  .admin-sidebar { padding: 22px 10px; }
  .admin-brand .admin-wordmark { display: none; }
  .admin-brand .admin-mark { display: block; }
  .admin-brand div, .admin-sidebar nav button:not(.active)::after, .admin-sidebar nav button { font-size: 0; }
  .admin-brand { padding: 0 6px 24px; }
  .admin-sidebar nav button { justify-content: center; }
  .admin-sidebar nav button span { font-size: 16px; }
  .sidebar-note, .view-site { display: none; }
}

@media (max-width: 680px) {
  .site-shell { width: min(100% - 24px, 560px); padding: 12px 0 calc(92px + env(safe-area-inset-bottom)); }
  .topbar { grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
  .brand-logo { width: 132px; height: 42px; }
  .segmented, .theme-switch { display: none; }
  .mobile-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
  .mobile-header-actions button { min-width: 52px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; padding: 0; color: var(--ink-2); background: transparent; cursor: pointer; font-size: 14px; }
  .mobile-header-actions svg { width: 29px; height: 29px; fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .mobile-header-actions button:last-child svg path { stroke-width: 1.7; }
  #search-controls > .filter-panel { display: none; }
  .stats-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 0; margin-top: 10px; padding: 0; }
  .stat { min-width: 0; min-height: 78px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 3px 8px; align-content: center; padding: 11px 12px; border: 1px solid transparent; border-radius: 8px; box-shadow: 0 4px 14px rgba(15,23,42,.035); }
  .stat:nth-child(1) { background: #dcfce7; border-color: color-mix(in srgb, #16a34a 18%, transparent); }
  .stat:nth-child(3) { background: #fef3c7; border-color: color-mix(in srgb, #d97706 18%, transparent); }
  .stat:nth-child(2), .stat:nth-child(4) { display: none; }
  .stat span { align-self: end; color: var(--ink); font-size: 14px; font-weight: 650; }
  .stat strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 29px; line-height: 1; }
  .stat:nth-child(1) strong { color: #16a34a; }
  .stat:nth-child(3) strong { color: #d97706; }
  .stat small { display: block; align-self: start; font-size: 11px; font-weight: 600; }
  .stat:nth-child(1) small { color: #16a34a; }
  .stat:nth-child(3) small { color: #d97706; }
  .mobile-platform-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; margin-top: 12px; padding: 12px 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
  .mobile-platform-panel button { min-width: 0; display: grid; justify-items: center; gap: 5px; border: 0; padding: 0; color: var(--ink); background: transparent; cursor: pointer; font-size: 11px; white-space: nowrap; }
  .mobile-platform-icon { width: 54px; height: 54px; display: grid; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .mobile-platform-icon img, .mobile-platform-icon svg { width: 100%; height: 100%; object-fit: contain; }
  .mobile-platform-icon.icon-grok { background: #050505; }
  .mobile-platform-icon.icon-grok img { filter: invert(1); }
  .mobile-platform-icon.icon-more { color: var(--accent-strong); }
  .mobile-platform-icon.icon-more svg { fill: currentColor; }
  .mobile-platform-panel button.active { color: var(--accent-strong); }
  .mobile-platform-panel button.active .mobile-platform-icon { border-color: var(--accent-strong); }
  .results-head { padding-top: 20px; }
  .product-row { grid-template-columns: 1fr; gap: 14px; padding: 15px; }
  .product-icon { width: 48px; height: 48px; padding: 8px; }
  .product-identity strong { white-space: normal; line-height: 1.35; }
  .product-identity p { white-space: normal; }
  .product-card-meta { width: 100%; grid-template-columns: 1fr auto; justify-items: start; align-items: center; }
  .product-card-meta .stock-cell { justify-self: end; }
  .price-cell strong { font-size: 15px; }
  .expand-label { grid-column: 1 / -1; justify-self: stretch; padding-top: 8px; border-top: 1px solid var(--line); text-align: center; }
  .offer-panel { margin: 0 10px 12px; }
  .offer-head, .offer-row { grid-template-columns: minmax(0, 1.45fr) .62fr .58fr 54px; gap: 6px; }
  .offer-head { min-height: 38px; padding: 0 4px; font-size: 15px; }
  .offer-head span:not(:first-child) { text-align: center; }
  .offer-row { min-height: 68px; padding: 9px 4px; }
  .offer-row > div { flex-wrap: wrap; gap: 4px 6px; }
  .offer-row > strong, .offer-stock { text-align: center; }
  .offer-row > strong { font-size: 14px; }
  .offer-row > *::before { content: none; }
  .shop-link { max-width: 100%; }
  .buy-button { min-height: 44px; }
  footer { align-items: center; flex-direction: column; gap: 8px; margin-bottom: 10px; text-align: center; }
  footer p { padding: 0; border: 0; }
  .mobile-bottom-nav { position: fixed; z-index: 80; right: 0; bottom: 0; left: 0; min-height: 66px; display: grid; grid-template-columns: repeat(2, 1fr); padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #eff6ff; box-shadow: 0 -8px 24px rgba(15,23,42,.06); }
  .mobile-bottom-nav button { display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
  .mobile-bottom-nav svg { width: 27px; height: 27px; fill: currentColor; stroke: none; }
  .mobile-bottom-nav button.active { color: var(--accent-strong); font-weight: 700; }
  html.mobile-overlay-open, html.mobile-overlay-open body { overflow: hidden; }
  .mobile-filter-backdrop { position: fixed; z-index: 110; inset: 0; display: flex; align-items: flex-end; background: rgba(15,23,42,.48); }
  .mobile-filter-sheet { width: 100%; max-height: 88dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; border-radius: 18px 18px 0 0; background: var(--page); box-shadow: 0 -16px 40px rgba(15,23,42,.18); animation: mobile-sheet-in .22s ease-out; }
  .mobile-filter-sheet > header { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 10px; }
  .mobile-filter-sheet h2 { margin: 0; font-size: 19px; }
  .mobile-filter-sheet > header button { width: 36px; height: 36px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 29px; line-height: 1; }
  .mobile-filter-scroll { overflow-y: auto; padding: 0 18px 16px; overscroll-behavior: contain; }
  .mobile-filter-scroll fieldset { margin: 13px 0 0; padding: 0; border: 0; }
  .mobile-filter-scroll legend { margin-bottom: 9px; color: var(--ink-2); font-size: 14px; }
  .mobile-chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .mobile-chip-grid.sort-chips { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mobile-chip-grid button { min-height: 43px; border: 1px solid transparent; border-radius: 7px; padding: 5px 7px; color: var(--ink); background: var(--surface); cursor: pointer; font-size: 12px; line-height: 1.25; }
  .mobile-chip-grid button.active { border-color: var(--accent-strong); color: var(--accent-strong); }
  .mobile-price-range { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: center; }
  .mobile-price-range input { min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; color: var(--ink); background: var(--surface); }
  .mobile-filter-sheet > footer { display: grid; grid-template-columns: 94px 1fr; gap: 10px; margin: 0; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-filter-sheet > footer button { min-height: 46px; border: 0; border-radius: 7px; color: var(--accent-strong); background: var(--accent-soft); cursor: pointer; font-weight: 700; }
  .mobile-filter-sheet > footer button:last-child { color: #fff; background: var(--accent-strong); }
  .mobile-full-page { position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--ink); background: var(--page); animation: mobile-page-in .24s ease-out; }
  .mobile-page-back { width: 42px; min-height: 48px; border: 0; padding: 0; color: var(--ink); background: transparent; cursor: pointer; font-size: 38px; font-weight: 300; line-height: 1; }
  .mobile-search-header { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 12px 12px 8px; background: var(--surface); }
  .mobile-search-header label { min-width: 0; height: 46px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; background: var(--surface); }
  .mobile-search-header label svg { width: 21px; height: 21px; flex: none; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 1.8; }
  .mobile-search-header input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
  .mobile-search-header > button:last-child { border: 0; padding: 0 3px; color: var(--accent-strong); background: transparent; font-size: 14px; }
  .mobile-search-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: var(--surface); }
  .mobile-search-tabs button { min-height: 45px; border: 0; color: var(--ink-2); background: transparent; font-size: 14px; }
  .mobile-search-tabs button.active { color: var(--accent-strong); font-weight: 650; }
  .mobile-search-filter-panel { position: absolute; z-index: 5; top: 111px; right: 0; left: 0; max-height: calc(100dvh - 111px); overflow-y: auto; padding: 15px 14px 18px; border-bottom: 1px solid var(--line); background: var(--page); box-shadow: 0 100vh 0 100vh rgba(15,23,42,.44); }
  .mobile-search-filter-panel h3 { margin: 0 0 10px; font-size: 15px; }
  .mobile-search-filter-panel .mobile-price-range { margin-bottom: 10px; }
  .mobile-search-filter-panel > button { width: 100%; min-height: 43px; border: 0; border-radius: 7px; color: #fff; background: var(--accent-strong); font-weight: 700; }
  .mobile-page-results { min-height: 0; flex: 1; overflow-y: auto; padding: 0 12px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .mobile-page-results-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 3px 10px; }
  .mobile-page-results-head h2 { margin: 0; font-size: 20px; }
  .mobile-page-results-head p { margin: 0; color: var(--muted); font-size: 12px; }
  .mobile-page-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .mobile-more-header { min-height: 62px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .mobile-more-header h1 { margin: 0; text-align: center; font-size: 20px; }
  .mobile-more-header > div { display: flex; align-items: center; gap: 8px; }
  .mobile-more-header > div button { display: flex; align-items: center; gap: 3px; border: 0; padding: 0; color: var(--accent-strong); background: transparent; font-size: 12px; }
  .mobile-more-header svg { width: 25px; height: 25px; fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .mobile-platform-tabs { min-height: 51px; display: flex; align-items: stretch; gap: 22px; overflow-x: auto; flex: none; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mobile-platform-tabs::-webkit-scrollbar { display: none; }
  .mobile-platform-tabs button { position: relative; flex: none; border: 0; padding: 0; color: var(--ink-2); background: transparent; font-size: 15px; font-weight: 500; white-space: nowrap; }
  .mobile-platform-tabs button.active { color: var(--accent-strong); font-weight: 650; }
  .mobile-platform-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent-strong); }
  @keyframes mobile-sheet-in { from { transform: translateY(100%); } }
  @keyframes mobile-page-in { from { transform: translateY(100%); } }
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 12px; }
  .admin-brand { padding: 0 12px 0 0; border: 0; }
  .admin-brand .admin-mark { width: 32px; height: 32px; }
  .admin-sidebar nav { display: flex; margin: 0; }
  .admin-sidebar nav button { padding: 9px 12px; }
  .view-site { display: block; margin: 0 0 0 auto; }
  .admin-main { padding: 22px 12px 45px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .table-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions input { min-width: 0; flex: 1; }
  .admin-user { display: none; }
  .drawer-grid { grid-template-columns: 1fr; }
  .drawer-grid .wide { grid-column: auto; }
}
