/* ================================================================
   마켓통 디자인 시스템 — 딥그린 · 크림 · 앰버 (팜플렛 브랜드 톤)
   ================================================================ */
:root {
  --green-950: #0f1e16;
  --green-900: #14261c;
  --green-800: #1b3325;
  --green-700: #24422f;
  --green-600: #2f5540;
  --green-100: #e3ece5;
  --cream: #f7f3e8;
  --cream-card: #fdfbf4;
  --amber: #f0a638;
  --amber-dark: #d98f1f;
  --amber-soft: #fdf3df;
  --red: #d94f45;
  --red-soft: #fdeceb;
  --blue: #3b5ba5;
  --blue-soft: #e9eef8;
  --ink: #212b25;
  --ink-soft: #46534b;
  --muted: #7d897f;
  --line: #e6e1d2;
  --shadow-sm: 0 1px 3px rgba(20, 38, 28, 0.07);
  --shadow-md: 0 6px 20px rgba(20, 38, 28, 0.09);
  --shadow-lg: 0 14px 40px rgba(20, 38, 28, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; letter-spacing: inherit; }
input, select { font-family: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- 상단 유틸바 ---------------- */
.topbar {
  background: var(--green-950);
  color: rgba(247, 243, 232, 0.65);
  font-size: 12.5px;
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  height: 34px;
}
.topbar a:hover { color: var(--amber); }
.topbar .links { display: flex; gap: 18px; }
.topbar .notice { display: flex; gap: 8px; align-items: center; }
.topbar .notice .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }

/* ---------------- 헤더 ---------------- */
.header {
  background: var(--green-900);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 14px rgba(15, 30, 22, 0.35);
}
.header-main {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 0;
}
.logo { display: flex; align-items: baseline; gap: 9px; flex-shrink: 0; }
.logo .name { font-size: 27px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.logo .name em { font-style: normal; color: var(--amber); }
.logo .tag {
  font-size: 10.5px; font-weight: 700; color: var(--amber);
  border: 1px solid rgba(240, 166, 56, 0.55);
  padding: 2px 8px; border-radius: 20px; letter-spacing: 0.08em;
}
.search {
  flex: 1; display: flex; align-items: center;
  background: #fff; border-radius: 999px; overflow: hidden;
  border: 2.5px solid var(--amber);
  max-width: 560px;
}
.search input {
  flex: 1; border: none; outline: none; padding: 11px 20px;
  font-size: 14.5px; color: var(--ink);
}
.search button {
  background: var(--amber); color: var(--green-900);
  padding: 0 22px; align-self: stretch; font-size: 17px;
  transition: background 0.15s;
}
.search button:hover { background: var(--amber-dark); }
.header-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.header-actions a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: rgba(247, 243, 232, 0.85); font-size: 11.5px;
  padding: 6px 12px; border-radius: 10px; transition: background 0.15s;
  position: relative;
}
.header-actions a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.header-actions .ico { font-size: 21px; line-height: 1; }
.cart-count {
  position: absolute; top: 0; right: 6px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.cart-count:empty { display: none; }

/* 카테고리 내비 */
.catnav { border-top: 1px solid rgba(255, 255, 255, 0.09); }
.catnav .wrap { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.catnav .wrap::-webkit-scrollbar { display: none; }
.catnav a {
  color: rgba(247, 243, 232, 0.82); font-size: 14px; font-weight: 600;
  padding: 12px 14px; white-space: nowrap; border-bottom: 2.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.catnav a:hover, .catnav a.active { color: var(--amber); border-bottom-color: var(--amber); }
.catnav a.partner-link {
  margin-left: auto; color: var(--amber); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}

/* ---------------- 히어로 ---------------- */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 78%, #33604a 100%);
  color: #fff; overflow: hidden; position: relative;
}
.hero::after {
  content: ""; position: absolute; right: -140px; top: -140px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 166, 56, 0.22), transparent 65%);
}
.hero .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 52px; padding-bottom: 52px; gap: 40px; position: relative;
}
.hero-eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.22em;
  color: var(--amber); margin-bottom: 14px;
}
.hero h1 { font-size: 40px; line-height: 1.28; font-weight: 800; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p { margin-top: 16px; font-size: 15.5px; color: rgba(247, 243, 232, 0.78); max-width: 460px; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 700; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--green-900); box-shadow: 0 6px 18px rgba(240, 166, 56, 0.35); }
.btn-amber:hover { background: #f6b44e; }
.btn-ghost { border: 1.5px solid rgba(247, 243, 232, 0.4); color: #f7f3e8; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-green { background: var(--green-800); color: #fff; }
.btn-green:hover { background: var(--green-700); }

.hero-card {
  background: rgba(253, 251, 244, 0.06);
  border: 1px solid rgba(247, 243, 232, 0.14);
  backdrop-filter: blur(6px);
  border-radius: 20px; padding: 26px 28px; min-width: 330px;
}
.hero-card h3 { font-size: 14px; color: var(--amber); font-weight: 700; margin-bottom: 16px; letter-spacing: 0.03em; }
.split-bar { display: flex; height: 42px; border-radius: 10px; overflow: hidden; font-size: 12.5px; font-weight: 700; }
.split-bar > div { display: flex; align-items: center; justify-content: center; color: #fff; }
.split-hq { background: var(--blue); }
.split-rep { background: #3e7d59; }
.split-ref { background: var(--amber); color: var(--green-900) !important; }
.split-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: rgba(247, 243, 232, 0.7); }
.hero-card .note { margin-top: 14px; font-size: 12px; color: rgba(247, 243, 232, 0.55); }

/* ---------------- 섹션 공통 ---------------- */
.section { padding: 46px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.section-head h2 .accent { color: var(--red); }
.section-head .more { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.section-head .more:hover { color: var(--green-700); }
.section-sub { font-size: 14px; color: var(--muted); margin-top: -14px; margin-bottom: 20px; }

/* 타임특가 타이머 */
.deal-timer {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red-soft); color: var(--red);
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
}
.deal-timer .time { font-variant-numeric: tabular-nums; font-size: 14px; }

/* ---------------- 상품 카드 ---------------- */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.pcard {
  background: var(--cream-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex; flex-direction: column;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pthumb {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 64px; position: relative; overflow: hidden;
}
.pthumb img, .pd-thumb img, .ci-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pd-thumb, .ci-thumb { overflow: hidden; position: relative; }
.pthumb .type-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10.5px; font-weight: 800; padding: 4px 9px; border-radius: 6px;
  letter-spacing: 0.02em;
}
.type-direct { background: var(--green-800); color: var(--amber); }
.type-sourcing { background: var(--blue); color: #fff; }
.pthumb .off-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--red); color: #fff;
  font-size: 11.5px; font-weight: 800; padding: 4px 8px; border-radius: 6px;
}
.pbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pname { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; min-height: 39px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.porigin { font-size: 11.5px; color: var(--muted); }
.pprice { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.pprice .now { font-size: 18px; font-weight: 800; color: var(--ink); }
.pprice .now small { font-size: 13px; font-weight: 600; }
.pprice .was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.pmeta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pmeta .star { color: var(--amber-dark); }
.pcashback {
  margin-top: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--green-700);
  background: var(--green-100); padding: 5px 9px; border-radius: 6px; align-self: flex-start;
}
.pship { font-size: 11.5px; color: var(--blue); font-weight: 600; }

/* ---------------- 참여 배너 3종 ---------------- */
.role-banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.role-card {
  border-radius: var(--radius); padding: 26px;
  background: var(--cream-card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}
.role-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.role-card .chip {
  position: absolute; top: 18px; right: 18px;
  font-size: 10.5px; font-weight: 800; color: #fff; background: var(--red);
  padding: 4px 10px; border-radius: 999px;
}
.role-card .avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green-800); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; margin-bottom: 14px;
}
.role-card h3 { font-size: 18px; font-weight: 800; line-height: 1.35; }
.role-card p { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; min-height: 60px; }
.role-card .earn { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; font-size: 12.5px; color: var(--muted); }
.role-card .earn strong { display: block; font-size: 19px; color: var(--red); font-weight: 800; margin-top: 2px; }

/* ---------------- 푸터 ---------------- */
.footer { background: var(--green-950); color: rgba(247, 243, 232, 0.6); margin-top: 70px; }
.footer .wrap { padding: 44px 24px 50px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .flogo { font-size: 21px; font-weight: 800; color: #fff; }
.footer .flogo em { font-style: normal; color: var(--amber); }
.footer .fdesc { font-size: 13px; margin-top: 10px; max-width: 380px; }
.footer .fcols { display: flex; gap: 56px; }
.footer .fcol h4 { color: #f7f3e8; font-size: 13.5px; margin-bottom: 12px; }
.footer .fcol a { display: block; font-size: 12.5px; margin-bottom: 8px; }
.footer .fcol a:hover { color: var(--amber); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 34px; padding-top: 22px; font-size: 12px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------------- 상품 상세 ---------------- */
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 40px 0; }
.pd-thumb {
  aspect-ratio: 1; border-radius: 20px; display: flex;
  align-items: center; justify-content: center; font-size: 150px;
  box-shadow: var(--shadow-md); position: relative;
}
.pd-thumb .type-badge { position: absolute; top: 18px; left: 18px; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; font-weight: 800; }
.pd-info h1 { font-size: 25px; font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; }
.pd-origin { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.pd-rating { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); }
.pd-rating .stars { color: var(--amber-dark); letter-spacing: 2px; }
.pd-price-box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin: 18px 0; }
.pd-price-box .was { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.pd-price-box .row { display: flex; align-items: baseline; gap: 10px; }
.pd-price-box .off { font-size: 24px; font-weight: 800; color: var(--red); }
.pd-price-box .now { font-size: 30px; font-weight: 800; }
.pd-price-box .now small { font-size: 18px; }
.pd-ship { font-size: 13px; color: var(--blue); font-weight: 700; margin-top: 8px; }
.pd-margin {
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin: 20px 0;
}
.pd-margin h4 { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pd-margin h4 .ico { color: var(--amber-dark); }
.pd-margin .split-bar { margin-top: 14px; height: 36px; font-size: 11.5px; }
.pd-margin .split-legend { color: var(--muted); }
.pd-margin .cashline { margin-top: 12px; font-size: 13px; color: var(--green-700); font-weight: 700; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.qty-ctrl { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty-ctrl button { width: 38px; height: 40px; font-size: 17px; color: var(--ink-soft); transition: background 0.12s; }
.qty-ctrl button:hover { background: var(--cream); }
.qty-ctrl input { width: 48px; text-align: center; border: none; outline: none; font-size: 15px; font-weight: 700; }
.qty-total { margin-left: auto; font-size: 14px; color: var(--muted); }
.qty-total strong { font-size: 21px; color: var(--ink); margin-left: 6px; }
.pd-actions { display: flex; gap: 12px; }
.pd-actions .btn { flex: 1; padding: 16px; font-size: 16px; border-radius: 12px; }
.share-box {
  margin-top: 18px; display: flex; align-items: center; gap: 10px;
  background: var(--amber-soft); border: 1px dashed var(--amber);
  border-radius: 10px; padding: 12px 16px; font-size: 13px; color: var(--ink-soft);
}
.share-box button { margin-left: auto; font-weight: 700; color: var(--amber-dark); flex-shrink: 0; }
.pd-tabs { display: flex; border-bottom: 2px solid var(--green-900); margin-top: 30px; }
.pd-tabs button { padding: 13px 26px; font-size: 14.5px; font-weight: 700; color: var(--muted); }
.pd-tabs button.active { background: var(--green-900); color: #fff; border-radius: 10px 10px 0 0; }
.pd-panel { background: var(--cream-card); border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 30px; }
.pd-panel h3 { font-size: 16px; margin-bottom: 12px; }
.pd-panel p, .pd-panel li { font-size: 14px; color: var(--ink-soft); }
.pd-panel ul { padding-left: 18px; margin-top: 8px; }
.pd-panel li { margin-bottom: 6px; }
.review { border-bottom: 1px solid var(--line); padding: 16px 0; }
.review:last-child { border-bottom: none; }
.review .rhead { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.review .stars { color: var(--amber-dark); }
.review p { margin-top: 6px; font-size: 13.5px; color: var(--ink); }

/* ---------------- 장바구니 ---------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; padding: 36px 0; align-items: start; }
.page-title { font-size: 26px; font-weight: 800; padding: 36px 0 0; letter-spacing: -0.02em; }
.page-title small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 10px; }
.cart-list { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cart-item { display: flex; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.ci-thumb { width: 84px; height: 84px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 40px; flex-shrink: 0; }
.ci-info { flex: 1; }
.ci-info .name { font-size: 14.5px; font-weight: 600; }
.ci-info .origin { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ci-info .cash { font-size: 11.5px; color: var(--green-700); font-weight: 700; margin-top: 5px; }
.ci-price { text-align: right; min-width: 110px; }
.ci-price .now { font-size: 17px; font-weight: 800; }
.ci-remove { color: var(--muted); font-size: 18px; padding: 6px; }
.ci-remove:hover { color: var(--red); }
.cart-empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.cart-empty .big { font-size: 54px; margin-bottom: 14px; }
.summary { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 140px; }
.summary h3 { font-size: 16px; font-weight: 800; margin-bottom: 18px; }
.summary .srow { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); margin-bottom: 11px; }
.summary .srow.total { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; font-weight: 800; color: var(--ink); font-size: 15px; }
.summary .srow.total .val { font-size: 22px; color: var(--red); }
.summary .point-note { background: var(--green-100); color: var(--green-700); font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 10px 12px; margin: 14px 0; }
.summary .btn { width: 100%; padding: 15px; font-size: 15.5px; border-radius: 12px; }

/* ---------------- 파트너 페이지 ---------------- */
.partner-hero { background: linear-gradient(150deg, var(--green-950), var(--green-800) 70%, var(--green-700)); color: #fff; text-align: center; padding: 70px 0 60px; position: relative; overflow: hidden; }
.partner-hero::before {
  content: ""; position: absolute; left: 50%; top: -220px; transform: translateX(-50%);
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,166,56,0.16), transparent 62%);
}
.partner-hero .eyebrow { font-size: 12.5px; letter-spacing: 0.24em; color: var(--amber); font-weight: 700; }
.partner-hero h1 { font-size: 40px; font-weight: 800; line-height: 1.32; margin-top: 16px; letter-spacing: -0.03em; position: relative; }
.partner-hero h1 em { font-style: normal; color: var(--amber); }
.partner-hero p { margin-top: 16px; color: rgba(247,243,232,0.75); font-size: 15.5px; position: relative; }
.partner-hero .hero-cta { justify-content: center; }

.calc-card {
  background: var(--cream-card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-md); padding: 34px; margin-top: -8px;
}
.calc-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: start; }
.calc-form label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 18px 0 8px; }
.calc-form label:first-child { margin-top: 0; }
.calc-form input[type="number"], .calc-form select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; outline: none;
}
.calc-form input:focus, .calc-form select:focus { border-color: var(--amber); }
.seg { display: flex; background: var(--cream); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 10px; border-radius: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.seg button.active { background: var(--green-800); color: var(--amber); box-shadow: var(--shadow-sm); }
.calc-result .split-bar { height: 48px; font-size: 13px; border-radius: 12px; }
.calc-rows { margin-top: 18px; }
.calc-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.calc-row .who { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink-soft); }
.calc-row .swatch { width: 11px; height: 11px; border-radius: 3px; }
.calc-row .amt { font-weight: 800; font-size: 16px; }
.calc-row.hl { background: var(--amber-soft); border-radius: 10px; padding: 13px 12px; border-bottom: none; margin-top: 6px; }
.calc-row.hl .amt { color: var(--red); font-size: 19px; }
.calc-note { font-size: 12px; color: var(--muted); margin-top: 14px; }

.grade-table { width: 100%; border-collapse: collapse; background: var(--cream-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.grade-table th { background: var(--green-900); color: #f7f3e8; font-size: 13.5px; padding: 14px; font-weight: 700; }
.grade-table td { padding: 15px 14px; text-align: center; font-size: 14px; border-bottom: 1px solid var(--line); }
.grade-table tr:last-child td { border-bottom: none; }
.grade-table .gname { font-weight: 800; }
.grade-table .rate { color: var(--red); font-weight: 800; }
.grade-badge { display: inline-flex; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.g-new { background: #eceff1; color: #5c6b73; }
.g-normal { background: var(--blue-soft); color: var(--blue); }
.g-good { background: var(--amber-soft); color: var(--amber-dark); }
.g-master { background: var(--green-800); color: var(--amber); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; position: relative; }
.step .num { font-size: 13px; font-weight: 800; color: var(--amber-dark); letter-spacing: 0.1em; }
.step h4 { font-size: 15.5px; margin-top: 8px; font-weight: 800; }
.step p { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 18px 6px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .fa { padding: 0 6px 18px; font-size: 14px; color: var(--ink-soft); }

/* ---------------- 대시보드 ---------------- */
.dash-head { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; padding: 38px 0; }
.dash-head .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dash-avatar { width: 62px; height: 62px; border-radius: 50%; background: var(--amber); color: var(--green-900); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.dash-who h2 { font-size: 21px; font-weight: 800; }
.dash-who p { font-size: 13px; color: rgba(247,243,232,0.7); margin-top: 3px; }
.dash-grade { margin-left: auto; text-align: right; }
.dash-grade .lbl { font-size: 12px; color: rgba(247,243,232,0.65); }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -26px; position: relative; }
.stat-card { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-md); }
.stat-card .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card .val { font-size: 23px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.stat-card .val small { font-size: 14px; font-weight: 600; }
.stat-card .sub { font-size: 11.5px; margin-top: 4px; font-weight: 600; }
.stat-card .up { color: var(--red); }
.stat-card .flat { color: var(--muted); }
.dash-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; margin-top: 26px; align-items: start; }
.panel { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.panel h3 .hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--green-600), var(--green-800)); position: relative; }
.bar-col.cur .bar { background: linear-gradient(180deg, var(--amber), var(--amber-dark)); }
.bar-col .amt { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.bar-col .mon { font-size: 11.5px; color: var(--muted); }
.progress-wrap { margin-top: 4px; }
.progress-wrap .pw-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; }
.progress { height: 12px; background: var(--cream); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--amber), var(--amber-dark)); border-radius: 999px; }
.reflink { display: flex; gap: 8px; margin-top: 12px; }
.reflink input { flex: 1; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 9px; font-size: 12.5px; color: var(--ink-soft); background: #fff; outline: none; }
.reflink button { background: var(--green-800); color: var(--amber); font-weight: 700; font-size: 13px; padding: 0 18px; border-radius: 9px; }
.settle-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.settle-table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.settle-table td { padding: 12px 6px; border-bottom: 1px solid var(--line); }
.settle-table tr:last-child td { border-bottom: none; }
.settle-table .amt { text-align: right; font-weight: 700; }
.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill-done { background: var(--green-100); color: var(--green-700); }
.pill-wait { background: var(--amber-soft); color: var(--amber-dark); }
.pill-carry { background: #eceff1; color: #5c6b73; }

/* ---------------- 라이브 커머스 ---------------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 4px 11px; border-radius: 999px; letter-spacing: 0.06em;
}
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.badge-soon { background: var(--blue); }
.badge-vod { background: #5c6b73; }

.live-hero-card {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
  background: var(--green-950); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg); color: #fff;
}
.live-hero-card .lv { position: relative; background: #000; min-height: 320px; }
.live-hero-card video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.live-hero-card .lv .ov { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.live-hero-card .lv .viewers { background: rgba(0,0,0,0.55); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.live-hero-card .info { padding: 30px; display: flex; flex-direction: column; }
.live-hero-card .info h3 { font-size: 22px; font-weight: 800; line-height: 1.35; margin-top: 12px; }
.live-hero-card .info .host { font-size: 13px; color: rgba(247,243,232,0.65); margin-top: 8px; }
.live-hero-card .prods { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.live-hero-card .prods span {
  background: rgba(253,251,244,0.1); border: 1px solid rgba(247,243,232,0.2);
  font-size: 12px; padding: 5px 11px; border-radius: 999px; color: rgba(247,243,232,0.85);
}
.live-hero-card .info .btn { margin-top: auto; align-self: flex-start; }

.live-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.live-card {
  background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.16s, box-shadow 0.16s; display: block;
}
.live-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.live-card .thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(140deg, var(--green-800), var(--green-600)); display: flex; align-items: center; justify-content: center; font-size: 44px; overflow: hidden; }
.live-card .thumb video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.live-card .thumb .ov { position: absolute; top: 10px; left: 10px; z-index: 2; }
.live-card .body { padding: 16px 18px; }
.live-card .body h4 { font-size: 15px; font-weight: 800; line-height: 1.4; }
.live-card .body .host { font-size: 12px; color: var(--muted); margin-top: 5px; }
.live-card .body .when { font-size: 12.5px; color: var(--blue); font-weight: 700; margin-top: 8px; }

/* 라이브 룸 */
.lr-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; padding: 30px 0; align-items: start; }
.lr-video { position: relative; background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow-md); }
.lr-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lr-video .ov { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 2; }
.lr-video .viewers { background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.lr-video .standby {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: rgba(247,243,232,0.8); gap: 10px; background: linear-gradient(150deg, var(--green-950), var(--green-800)); font-size: 15px; font-weight: 700;
}
.lr-video .standby .big { font-size: 46px; }
.lr-title { margin-top: 18px; }
.lr-title h1 { font-size: 21px; font-weight: 800; line-height: 1.35; }
.lr-title .host { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lr-prods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.lr-prod { background: var(--cream-card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.lr-prod .th { width: 52px; height: 52px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; overflow: hidden; position: relative; }
.lr-prod .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lr-prod .nm { font-size: 12px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lr-prod .pr { font-size: 14px; font-weight: 800; margin-top: 3px; }
.lr-prod button { background: var(--amber); color: var(--green-950); font-size: 11.5px; font-weight: 800; padding: 7px 10px; border-radius: 8px; flex-shrink: 0; }

.chat-panel { background: var(--cream-card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; height: 640px; box-shadow: var(--shadow-sm); position: sticky; top: 130px; }
.chat-panel .chead { padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.chat-panel .chead .hint { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 9px; }
.chat-msg { font-size: 13px; line-height: 1.45; word-break: break-all; }
.chat-msg b { color: var(--green-700); margin-right: 6px; }
.chat-msg.sys { color: var(--muted); font-size: 12px; text-align: center; }
.chat-msg.sale {
  background: var(--amber-soft); border: 1px dashed var(--amber);
  color: var(--amber-dark); font-weight: 700; font-size: 12.5px;
  padding: 8px 11px; border-radius: 9px;
}
.chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-input input[name="nick"] { width: 84px; }
.chat-input input { border: 1.5px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 13px; outline: none; background: #fff; min-width: 0; }
.chat-input input:focus { border-color: var(--amber); }
.chat-input input[name="msg"] { flex: 1; }
.chat-input button { background: var(--green-800); color: var(--amber); font-weight: 800; font-size: 13px; padding: 0 16px; border-radius: 9px; flex-shrink: 0; }

@media (max-width: 900px) {
  .live-hero-card, .lr-layout { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .lr-prods { grid-template-columns: 1fr 1fr; }
  .chat-panel { height: 420px; position: static; }
}

/* ---------------- 토스트 ---------------- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--green-900); color: #f7f3e8; padding: 13px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 반응형 ---------------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .role-banners { grid-template-columns: 1fr; }
  .pd-layout, .cart-layout, .calc-grid, .dash-cols { grid-template-columns: 1fr; }
  .header-main { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; max-width: none; flex: 1 1 100%; }
  .hero h1 { font-size: 30px; }
  .partner-hero h1 { font-size: 30px; }
  .summary { position: static; }
  .topbar .links { display: none; }
  .topbar .wrap { justify-content: center; }
  .cart-item { flex-wrap: wrap; }
  .ci-price { min-width: 0; margin-left: auto; }
  .pd-thumb { font-size: 100px; }
  .dash-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
