:root {
  /* 모아모아 로고 컬러: 그린 × 옐로우 × 블랙 */
  --ink: #232427;           /* 로고 글씨 블랙 */
  --paper: #ffffff;
  --surface: #ffffff;
  --soft: #f4f6f4;
  --line: #e5e8e5;
  --text: #232427;
  --text-mute: #6b6e72;
  --gray-deep: #4a4d52;
  --accent: #2f8c55;        /* 로고 그린 (버튼용으로 살짝 진하게) */
  --accent-deep: #23704a;
  --accent-bright: #3fa96b; /* 로고 그린 원색 */
  --accent-soft: #edf7f1;
  --accent-line: #c8e7d4;
  --yellow: #fcb929;        /* 로고 옐로우 */
  --yellow-deep: #8a5d00;
  --yellow-soft: #fff7e2;
  --yellow-line: #fbe2a2;
  --danger: #d6393e;
  --ok: #2f8c55;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-body: var(--font-display);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
}
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a { font-size: 13.5px; font-weight: 500; color: var(--text); }
.main-nav a:hover { color: var(--accent-deep); }
.main-nav .cart-link { position: relative; }
.cart-badge {
  position: absolute;
  top: -8px;
  right: -14px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
}

/* Category rail */
.category-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.category-bar .container { display: flex; gap: 20px; padding: 10px 24px; overflow-x: auto; }
.category-bar a { font-size: 12.5px; color: var(--text-mute); white-space: nowrap; }
.category-bar a.active, .category-bar a:hover { color: var(--accent-deep); font-weight: 700; }

/* Flash messages */
.flash { max-width: 1120px; margin: 16px auto 0; padding: 0 24px; }
.flash .msg {
  padding: 12px 16px;
  font-size: 13.5px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.flash .msg.ok { background: #eef5ef; color: var(--ok); border-color: #cfe4d4; }
.flash .msg.error { background: #fbeeee; color: var(--danger); border-color: #f1d2d2; }

/* Hero */
.hero {
  padding: 70px 24px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  margin: 0 0 12px;
}
.hero p { color: var(--text-mute); font-size: 14.5px; margin: 0; }

/* Section heading */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 48px 0 20px;
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.section-title a { font-size: 12.5px; color: var(--text-mute); }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}
.product-card { display: block; }
.product-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .ph { color: var(--text-mute); font-size: 12px; }
.product-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 12px 0 4px;
}
.product-card .price { font-weight: 700; font-size: 14.5px; }
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--text-mute);
  font-size: 13.5px;
}

/* Product detail */
.product-detail { display: flex; gap: 48px; padding: 48px 0; }
.product-detail .thumb { flex: 1; max-width: 460px; }
.product-detail .info { flex: 1; }
.product-detail h1 { font-family: var(--font-display); font-size: 28px; margin: 0 0 10px; }
.product-detail .price { font-size: 22px; font-weight: 700; margin: 0 0 20px; }
.product-detail .desc { color: var(--text-mute); line-height: 1.8; margin-bottom: 28px; white-space: pre-line; }
.product-detail .stock { font-size: 12.5px; color: var(--text-mute); margin-bottom: 20px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qty-row input { width: 70px; padding: 10px; border: 1px solid var(--line); text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-align: center;
}
.btn.outline { background: transparent; color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 12.5px; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Forms */
.form-box {
  max-width: 420px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 36px 36px;
}
.form-box h1 { font-family: var(--font-display); font-size: 24px; margin: 0 0 24px; text-align: center; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-mute); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.form-foot { text-align: center; font-size: 12.5px; color: var(--text-mute); margin-top: 16px; }

/* Cart & checkout */
.cart-table { width: 100%; border-collapse: collapse; margin: 30px 0; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; }
.cart-table th { color: var(--text-mute); font-weight: 600; font-size: 12px; }
.cart-table .cell-prod { display: flex; align-items: center; gap: 14px; }
.cart-table .cell-prod .thumb-sm { width: 56px; height: 72px; border: 1px solid var(--line); overflow: hidden; flex-shrink: 0; }
.cart-table .cell-prod .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.cart-table input[type=number] { width: 56px; padding: 6px; border: 1px solid var(--line); text-align: center; }
.cart-summary { display: flex; justify-content: flex-end; margin: 20px 0 40px; }
.cart-summary .box { width: 280px; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13.5px; }
.cart-summary .row.total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }

.checkout-grid { display: flex; gap: 40px; padding: 40px 0 70px; align-items: flex-start; }
.checkout-grid .col { flex: 1; }
.summary-box, .panel-box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.summary-box h3, .panel-box h3 { font-size: 14px; margin: 0 0 16px; color: var(--text-mute); }
.coin-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.coin-option input { margin: 0; }
.coin-option .sym { font-weight: 700; }
.coin-option .net { font-size: 12px; color: var(--text-mute); }

/* Order complete / payment instructions */
.pay-box {
  background: var(--surface);
  border: 1px solid var(--line);
  max-width: 560px;
  margin: 50px auto;
  padding: 36px 40px;
}
.pay-box h1 { font-family: var(--font-display); font-size: 24px; margin: 0 0 6px; }
.pay-box .order-no { color: var(--text-mute); font-size: 12.5px; margin-bottom: 28px; }
.pay-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pay-row .k { color: var(--text-mute); }
.pay-row .v { font-weight: 600; text-align: right; word-break: break-all; max-width: 320px; }
.status-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-pill.pending_payment { background: #fbf1e3; color: #a9731f; }
.status-pill.submitted { background: #eaf0fb; color: #35579c; }
.status-pill.paid { background: #eef5ef; color: var(--ok); }
.status-pill.shipped { background: #eef5ef; color: var(--ok); }
.status-pill.completed { background: #efeee9; color: var(--ink); }
.status-pill.cancelled { background: #fbeeee; color: var(--danger); }

table.orders-table { width: 100%; border-collapse: collapse; margin: 20px 0 60px; }
table.orders-table th, table.orders-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; }
table.orders-table th { color: var(--text-mute); font-weight: 600; font-size: 11.5px; }

.page-title { font-family: var(--font-display); font-size: 28px; margin: 40px 0 10px; }

footer.site-footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 60px; text-align: center; color: var(--text-mute); font-size: 12px; }

@media (max-width: 760px) {
  .product-detail, .checkout-grid { flex-direction: column; }
  .main-nav { gap: 14px; }
}

/* ---- Used market ---- */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.verified-badge::before { content: "✓"; }

.listing-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.listing-pill.selling { background: #eef5ef; color: var(--ok); }
.listing-pill.reserved { background: #fbf1e3; color: #a9731f; }
.listing-pill.sold { background: #efeee9; color: var(--text-mute); }

.product-card .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-mute); margin-top: 6px; }
.product-card.sold .product-thumb img { opacity: 0.45; }
.product-thumb { position: relative; }
.product-thumb .thumb-flag { position: absolute; top: 10px; left: 10px; }

.market-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 28px; }
.market-toolbar input[type=text] { flex: 1; min-width: 180px; padding: 11px 13px; border: 1px solid var(--line); font-family: var(--font-body); font-size: 14px; }
.market-toolbar select { padding: 11px 13px; border: 1px solid var(--line); background: #fff; font-family: var(--font-body); }
.market-toolbar label { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Item detail gallery */
.gallery .main { width: 100%; aspect-ratio: 1 / 1; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .strip { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .strip button { width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); background: var(--surface); cursor: pointer; overflow: hidden; }
.gallery .strip button.on { border-color: var(--ink); }
.gallery .strip img { width: 100%; height: 100%; object-fit: cover; }
.spec-list { margin: 0 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.spec-list .k { color: var(--text-mute); }
.spec-list .v { text-align: right; word-break: break-all; }
.seller-box { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 14px; }
.seller-box .who { flex: 1; min-width: 0; }
.seller-box .who strong { display: block; font-size: 14.5px; }
.seller-box .who span { font-size: 12px; color: var(--text-mute); }
.owner-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.owner-actions select { padding: 8px 10px; border: 1px solid var(--line); background: #fff; }

/* Shops */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 20px; }
.shop-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); padding: 18px; transition: border-color .15s; }
.shop-card:hover { border-color: var(--accent-line); }
.shop-logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--accent-deep); }
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-logo.lg { width: 88px; height: 88px; font-size: 36px; }
.shop-card .body { min-width: 0; flex: 1; }
.shop-card .name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-card .intro { font-size: 12.5px; color: var(--text-mute); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card .count { font-size: 12px; color: var(--accent-deep); margin-top: 6px; font-weight: 600; }
.guarantee-note { background: #f6f0e6; border: 1px solid #eadfcb; color: var(--accent-deep); font-size: 12.5px; padding: 10px 14px; margin-bottom: 18px; }
.shop-hero { display: flex; gap: 22px; align-items: center; padding: 40px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; flex-wrap: wrap; }
.shop-hero h1 { font-family: var(--font-display); font-size: 30px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-hero p { margin: 0; color: var(--text-mute); white-space: pre-line; line-height: 1.7; }

/* Seller form */
.form-wide { max-width: 760px; margin: 40px auto 60px; background: var(--surface); border: 1px solid var(--line); padding: 32px 36px; }
.form-wide h1 { font-family: var(--font-display); font-size: 26px; margin: 0 0 24px; }
.form-row { display: flex; gap: 16px; }
.form-row .field { flex: 1; }
.field .hint { font-size: 12px; color: var(--text-mute); margin-top: 6px; }
.image-edit { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.image-edit label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; text-transform: none; color: var(--text-mute); cursor: pointer; }
.image-edit img { width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--line); }

@media (max-width: 760px) {
  .form-row { flex-direction: column; gap: 0; }
  .form-wide { padding: 24px 20px; }
  .main-nav { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---- Chat ---- */
.room-list { background: var(--surface); border: 1px solid var(--line); margin-bottom: 40px; }
.room-row { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.room-row:last-child { border-bottom: none; }
.room-row:hover { background: #fcfbf8; }
.room-row .shop-logo { width: 44px; height: 44px; font-size: 18px; }
.room-row .body { flex: 1; min-width: 0; }
.room-row .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.room-row .item-ref { font-size: 12px; color: var(--text-mute); }
.room-row .preview { font-size: 13px; color: var(--text-mute); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.room-row .time { font-size: 11.5px; color: var(--text-mute); }
.unread { background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }

.chat-wrap { max-width: 720px; margin: 30px auto 40px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; height: min(78vh, 760px); }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.chat-head .back { margin-right: 6px; color: var(--text-mute); }
.chat-head .sub { font-size: 11.5px; color: var(--text-mute); }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; }
.chat-item img { width: 40px; height: 40px; object-fit: cover; }
.chat-item span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; background: #fbfaf7; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; color: var(--text-mute); font-size: 13px; }
.msg-row { display: flex; flex-direction: column; max-width: 78%; }
.msg-row.mine { align-self: flex-end; align-items: flex-end; }
.msg-row.theirs { align-self: flex-start; align-items: flex-start; }
.msg-row .who { font-size: 11.5px; color: var(--text-mute); margin-bottom: 3px; }
.msg-row .bubble { padding: 9px 13px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; border-radius: 14px; }
.msg-row.mine .bubble { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg-row.theirs .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-row .time { font-size: 10.5px; color: var(--text-mute); margin-top: 3px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; padding: 10px 12px; border: 1px solid var(--line); font-family: var(--font-body); font-size: 14px; }

/* ---- My page ---- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 12px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.info-table th { width: 130px; color: var(--text-mute); font-weight: 600; font-size: 12.5px; }
.info-table td { word-break: break-all; }
.mypage-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; }

@media (max-width: 760px) {
  .chat-wrap { margin: 16px 0; height: 80vh; }
  .msg-row { max-width: 90%; }
}

/* ===== Friendly theme (rounded, orange, Pretendard) ===== */
.brand { font-weight: 800; font-size: 22px; color: var(--accent-deep); }
.brand::before { content: "🛍️ "; }
.main-nav { gap: 20px; }
.main-nav a { font-size: 14px; font-weight: 600; }
.main-nav a:hover, .category-bar a:hover { color: var(--accent); }
.cart-badge { background: var(--accent); }

.category-bar .container { gap: 8px; padding: 10px 24px; }
.category-bar a { font-size: 13px; color: var(--ink); background: var(--soft); padding: 6px 14px; border-radius: 999px; font-weight: 500; }
.category-bar a:hover { background: var(--soft); color: var(--gray-deep); font-weight: 600; }

.flash .msg { border-radius: var(--radius-sm); }

.hero {
  margin: 24px 0 8px;
  padding: 48px 40px;
  text-align: left;
  border: none;
  border-radius: 20px;
  background: #fff6ee;
}
.hero h1 { font-size: 34px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: #5a5f69; font-size: 16px; }
.hero .hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.section-title { margin: 44px 0 16px; }
.section-title h2 { font-size: 21px; font-weight: 800; }
.section-title a { font-size: 13.5px; font-weight: 600; }
.section-title a:hover { color: var(--accent); }
.page-title { font-size: 24px; font-weight: 800; }

.product-grid { gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.product-thumb { aspect-ratio: 1 / 1; border: none; border-radius: var(--radius); background: var(--soft); }
.product-card:hover .product-thumb img { transform: scale(1.03); }
.product-thumb img { transition: transform .25s ease; }
.product-card h3 { font-size: 15px; font-weight: 500; margin: 12px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card .price { font-size: 16px; font-weight: 800; }
.empty-state { background: var(--soft); border-radius: var(--radius); padding: 48px 20px; font-size: 14.5px; }

.product-detail h1 { font-size: 24px; font-weight: 800; }
.product-detail .price { font-size: 26px; font-weight: 800; }
.product-detail .desc { color: var(--text); font-size: 15.5px; line-height: 1.7; }
.qty-row input { border-radius: var(--radius-sm); }

.btn { border-radius: var(--radius-sm); border-color: var(--accent); background: var(--accent); font-size: 14.5px; font-weight: 700; padding: 12px 22px; transition: background .15s, transform .05s; }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn:active { transform: scale(0.98); }
.btn.outline { background: #fff; color: var(--ink); border-color: #dcdee3; }
.btn.outline:hover { background: var(--soft); border-color: var(--accent-line); color: var(--gray-deep); }
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn.danger { background: var(--danger); border-color: var(--danger); }

.form-box, .form-wide, .summary-box, .panel-box, .pay-box, .room-list, .seller-box, .shop-card, .chat-wrap { border-radius: 16px; }
.form-box { box-shadow: 0 4px 24px rgba(0,0,0,.05); }
.form-box h1, .form-wide h1, .pay-box h1 { font-size: 22px; font-weight: 800; }
.field label { font-size: 13.5px; color: var(--ink); }
.field input, .field textarea, .field select,
.market-toolbar input[type=text], .market-toolbar select, .owner-actions select,
.chat-form textarea, .cart-table input[type=number] { border-radius: var(--radius-sm); border-color: #dcdee3; }
.field input:focus, .field textarea:focus, .field select:focus, .market-toolbar input:focus, .chat-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,140,85,.18);
}
.coin-option { border-radius: var(--radius-sm); }
.coin-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.verified-badge { background: var(--accent); }
.guarantee-note { background: var(--soft); border-color: var(--line); color: var(--gray-deep); border-radius: var(--radius-sm); }
.shop-card { gap: 14px; }
.shop-card:hover { border-color: var(--accent-line); box-shadow: 0 6px 20px rgba(35,36,39,.08); }
.shop-logo { background: var(--soft); color: var(--gray-deep); font-family: var(--font-body); font-weight: 800; border-color: var(--line); }
.shop-hero h1 { font-weight: 800; }
.gallery .main { border-radius: var(--radius); border: none; background: var(--soft); }
.gallery .strip button { border-radius: var(--radius-sm); }
.gallery .strip button.on { border-color: var(--accent); }
.image-edit img { border-radius: var(--radius-sm); }
.chat-item { border-radius: var(--radius-sm); }

.msg-row.mine .bubble { background: var(--accent); }
.msg-row .bubble { border-radius: 18px; }
.chat-log { background: #f7f8fa; }
.unread { background: var(--accent); }
.room-row .shop-logo { font-size: 18px; }

table.orders-table th, .cart-table th { font-size: 13px; }
footer.site-footer { background: var(--soft); border-top: none; color: var(--text-mute); }

/* 상품은 한 줄에 4개 (모바일은 아래에서 2개) */
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 썸네일 조회수 · 좋아요 */
.thumb-stats {
  position: absolute; right: 8px; bottom: 8px;
  display: flex; gap: 8px; padding: 4px 9px;
  background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1; pointer-events: none;
}
.thumb-stats span { display: inline-flex; align-items: center; gap: 3px; }
.thumb-stats svg { width: 12px; height: 12px; fill: currentColor; }

/* 상세페이지 좋아요 버튼 */
.detail-stats { font-size: 12.5px; color: var(--text-mute); margin-bottom: 12px; }
.like-form { margin: 0 0 18px; }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 16px; border: 1px solid #dcdee3; border-radius: 999px; background: var(--surface);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink);
  transition: border-color .15s, color .15s, background .15s;
}
.like-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.like-btn:hover { border-color: var(--danger); color: var(--danger); }
.like-btn.on { border-color: var(--danger); color: var(--danger); background: #fff0f0; }
.like-btn.on svg { fill: currentColor; }
.like-btn:disabled { opacity: .6; cursor: default; }

@media (max-width: 760px) {
  .hero { padding: 32px 22px; }
  .hero h1 { font-size: 26px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }

  .home-products .section-title { margin-top: 20px; }
}

/* ---- Floating customer-service widget ---- */
.cs-widget { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.cs-fab {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(47,140,85,.32); transition: transform .15s, background .15s;
}
.cs-fab:hover { transform: scale(1.06); background: var(--accent-deep); }
.cs-fab .ico-close { display: none; }
.cs-widget.open .cs-fab .ico-chat { display: none; }
.cs-widget.open .cs-fab .ico-close { display: block; }
.cs-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 20px; border: 2px solid #fff; }
.cs-panel {
  width: 360px; height: min(560px, calc(100vh - 140px)); background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; animation: cs-pop .18s ease-out;
}
.cs-panel[hidden] { display: none; }
@keyframes cs-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.cs-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px; background: var(--accent); color: #fff; }
.cs-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.cs-title { flex: 1; display: flex; flex-direction: column; }
.cs-title strong { font-size: 15.5px; font-weight: 800; }
.cs-title span { font-size: 12px; opacity: .9; }
.cs-close { background: none; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.cs-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f8fa; }
.cs-log .chat-empty { margin: auto; text-align: center; color: var(--text-mute); font-size: 13.5px; line-height: 1.6; padding: 0 10px; }
.cs-login p { margin: 0 0 12px; }
.cs-form { border-top: 1px solid var(--line); padding: 10px; gap: 8px; }
.cs-form[hidden] { display: none; }
.cs-form textarea { min-height: 42px; max-height: 110px; }
.cs-form .btn { padding: 10px 16px; }

@media (max-width: 760px) {
  .cs-widget { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .cs-panel { position: fixed; inset: auto 0 0 0; width: 100%; height: 82vh; border-radius: 20px 20px 0 0; }
  .cs-widget.open .cs-fab { display: none; }  /* the panel header has its own close button */
}

/* Notices (공지사항) */
.notice-list { list-style: none; margin: 16px 0 40px; padding: 0; border-top: 2px solid var(--ink); }
.notice-list li { border-bottom: 1px solid var(--line); }
.notice-list li.pinned { background: var(--soft); }
.notice-list a { display: flex; align-items: center; gap: 10px; padding: 15px 12px; }
.notice-list a:hover .notice-title { text-decoration: underline; }
.notice-title { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-date { color: var(--text-mute); font-size: 12.5px; white-space: nowrap; }
.notice-tag { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: var(--gray-deep); padding: 3px 8px; border-radius: 999px; }
.notice-list.compact { margin-bottom: 0; }
.notice-list.compact a { padding: 12px 10px; }
.notice-pager { display: flex; justify-content: center; gap: 12px; margin-bottom: 60px; font-size: 14px; }
.notice-pager strong { color: var(--accent); }
.notice-detail { max-width: 820px; margin: 40px auto 60px; }
.notice-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 24px; }
.notice-head h1 { font-family: var(--font-display); font-size: 26px; margin: 10px 0 8px; word-break: break-word; }
.notice-meta { color: var(--text-mute); font-size: 13px; }
.notice-body { line-height: 1.85; font-size: 15px; white-space: pre-line; word-break: break-word; margin-bottom: 36px; min-height: 120px; }
@media (max-width: 760px) {
  .notice-head h1 { font-size: 21px; }
  .notice-list a { padding: 13px 8px; }
}

/* ===== 모아모아 테마 (로고 그린 × 옐로우, 블랙 포인트) ===== */
.site-header { border-bottom: none; box-shadow: none; }

/* 로고 바로 아래: 블랙 카테고리 띠 */
.category-bar { background: var(--ink); border-bottom: none; }
.category-bar a { background: transparent; border: 1px solid rgba(255,255,255,.18); color: #f1f2f3; font-weight: 600; }
.category-bar a:hover { background: rgba(255,255,255,.1); border-color: var(--yellow); color: var(--yellow); }

.main-nav a { color: var(--gray-deep); }
.main-nav a:hover { color: var(--accent); }
.cart-badge { background: var(--yellow); color: var(--ink); }

.hero { background: linear-gradient(120deg, #eef8f2 0%, #f8fbf6 55%, #fff6df 100%); border: 1px solid var(--line); border-radius: 18px; }
.hero h1 { font-weight: 800; letter-spacing: -.01em; }
.hero h1 em { color: var(--accent); box-shadow: inset 0 -.32em 0 rgba(252,185,41,.45); }
.hero p { color: var(--gray-deep); }

.section-title h2 { position: relative; padding-left: 16px; font-weight: 800; }
.section-title h2::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 0 0 transparent; }
.section-title a { color: var(--gray-deep); }
.section-title a:hover { color: var(--accent); }

.product-thumb { background: var(--soft); }
.product-card .price { color: var(--ink); }
.btn.outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.outline:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-deep); }

.verified-badge { background: var(--accent); color: #fff; }
.notice-tag { background: var(--yellow); color: var(--ink); }
.notice-list { border-top-color: var(--ink); }
.notice-list li.pinned { background: var(--yellow-soft); }
.notice-pager strong { color: var(--accent); }
.guarantee-note { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-deep); }
.shop-logo { background: var(--yellow-soft); color: var(--yellow-deep); border-color: var(--yellow-line); }
.shop-card .count { color: var(--accent); }
.shop-card:hover { border-color: var(--accent-line); box-shadow: 0 6px 20px rgba(35,36,39,.08); }
.listing-pill.reserved { background: var(--yellow-soft); color: var(--yellow-deep); }
.status-pill.pending_payment { background: var(--yellow-soft); color: var(--yellow-deep); }
.coin-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.unread { background: var(--danger); }

footer.site-footer { background: var(--soft); color: var(--text-mute); border-top: 1px solid var(--line); }

/* 모바일 전용 요소는 PC에서 숨김 */
.m-cart, .tabbar, .m-menu { display: none; }

/* ===== 모바일: 큰 글씨 · 큰 버튼 · 한눈에 ===== */
@media (max-width: 760px) {
  body { font-size: 17px; line-height: 1.6; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body.no-tabbar { padding-bottom: 0; }
  .container { padding: 0 16px; }

  /* 헤더: 로고 + 장바구니만 */
  .site-header .bar { padding: 12px 0; gap: 12px; }
  .brand { font-size: 17px; letter-spacing: .14em; }
  .main-nav { display: none; }
  .m-cart {
    display: inline-flex; align-items: center; gap: 6px; position: relative;
    min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 15px; font-weight: 700; color: var(--ink); background: var(--surface);
  }
  .m-cart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .m-badge {
    position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: var(--yellow); color: var(--ink); font-style: normal;
    font-size: 13px; font-weight: 800; line-height: 22px; text-align: center;
  }

  /* 카테고리 칩 크게 */
  .category-bar .container { padding: 10px 16px; gap: 8px; }
  .category-bar a { font-size: 16px; padding: 9px 18px; font-weight: 600; }

  /* 제목 · 본문 */
  .section-title { margin: 32px 0 14px; }
  .section-title h2 { font-size: 21px; }
  .section-title a { font-size: 16px; padding: 6px 0; }
  .page-title { font-size: 24px; margin-top: 24px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 16px; }

  /* 상품 카드 */
  .product-grid { gap: 22px 12px; }
  .product-card h3 { font-size: 16px; font-weight: 600; margin-top: 10px; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
  .product-card .price { font-size: 18px; }
  .product-card .meta { font-size: 14px; }
  .thumb-stats { font-size: 13px; padding: 5px 10px; gap: 10px; }
  .thumb-stats svg { width: 14px; height: 14px; }
  .listing-pill, .verified-badge { font-size: 13px; padding: 4px 10px; }

  /* 버튼 · 입력칸 크게 (손가락으로 누르기 쉽게) */
  .btn { min-height: 50px; font-size: 17px; padding: 13px 20px; display: inline-flex; align-items: center; justify-content: center; }
  .btn.small { min-height: 42px; font-size: 15px; padding: 8px 14px; }
  .field label { font-size: 16px; }
  .field input, .field textarea, .field select,
  .market-toolbar input[type=text], .market-toolbar select { font-size: 17px; min-height: 50px; }
  .like-btn { min-height: 48px; font-size: 16px; padding: 10px 20px; }

  /* 상세 페이지 */
  .product-detail { gap: 20px; padding: 20px 0 32px; }
  .product-detail .thumb { max-width: none; }
  .product-detail h1 { font-size: 23px; }
  .product-detail .price { font-size: 27px; }
  .product-detail .desc, .detail-stats, .spec-list li { font-size: 16px; }
  .qty-row { flex-wrap: wrap; }
  .qty-row .btn { flex: 1; }

  /* 공지 */
  .notice-title { font-size: 16.5px; }
  .notice-date { font-size: 14px; }
  .notice-tag { font-size: 13px; }

  /* 하단 탭바 */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(43,40,37,.06);
  }
  body.no-tabbar .tabbar { display: none; }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 68px; padding: 6px 2px; background: none; border: none; cursor: pointer;
    font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--gray-deep);
  }
  .tabbar svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on { color: var(--accent); }
  .tabbar .on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--accent); }
  .tabbar .m-badge { top: 6px; right: calc(50% - 26px); }

  /* 전체메뉴 */
  .m-menu:not([hidden]) {
    display: block; position: fixed; inset: 0 0 calc(68px + env(safe-area-inset-bottom, 0px)) 0; z-index: 39;
    background: var(--paper); overflow-y: auto; padding: 18px 16px 24px;
  }
  body.menu-open { overflow: hidden; }
  .m-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .m-menu-head strong { font-size: 22px; }
  .m-menu-close { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-family: var(--font-body); font-size: 16px; font-weight: 700; color: var(--ink); }
  .m-menu-hello { font-size: 17px; margin: 0 0 14px; color: var(--gray-deep); }
  .m-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-menu-grid a {
    display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 18px; font-weight: 700; color: var(--ink); text-align: center;
  }
  .m-menu-grid a.hl { background: var(--accent); border-color: var(--accent); color: #fff; }

  /* 고객센터 버튼은 탭바 위로 */
  .cs-widget { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  body.no-tabbar .cs-widget { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .cs-fab { width: 56px; height: 56px; }
  .cs-panel { z-index: 60; }
  body.menu-open .cs-widget { display: none; }

  footer.site-footer { margin-top: 32px; font-size: 14px; }
}

/* ===== 모아모아 로고 ===== */
.brand { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0; line-height: 1; }
.brand-mark { height: 38px; width: auto; display: block; }
.brand-word { height: 22px; width: auto; display: block; }
.brand small { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-mute); margin-left: 2px; }

.hero { position: relative; padding-right: 230px; min-height: 220px; }
.hero-logo { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); height: 150px; width: auto; z-index: 1; }

.footer-logo { height: 54px; width: auto; display: block; margin: 0 auto 12px; }
.form-logo { display: block; height: 72px; width: auto; margin: 0 auto 18px; }
.error-logo { display: block; height: 70px; width: auto; margin: 0 auto 18px; opacity: .9; }

.cs-avatar { background: #fff; overflow: hidden; }
.cs-avatar img { width: 28px; height: auto; }

/* 사진 없는 상품: 흐린 로고 */
.product-thumb .ph {
  font-size: 0; width: 42%; aspect-ratio: 439 / 383;
  background: url("../img/brand/logo-mark.png") center / contain no-repeat; opacity: .18; filter: grayscale(.3);
}

.m-menu-logo { height: 26px; width: auto; vertical-align: -5px; margin-right: 8px; }

@media (max-width: 760px) {
  .brand-mark { height: 32px; }
  .brand-word { height: 18px; }
  .brand small { display: none; }
  .hero { padding-right: 22px; min-height: 0; }
  .hero-logo { position: static; transform: none; height: 64px; margin-bottom: 12px; display: block; }
  .footer-logo { height: 46px; }
}

/* 카테고리 바: 전체 고정 + 대분류 한 칸씩 이동 */
.category-bar .container { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.cat-ticker { flex: 1; min-width: 0; overflow: hidden; }
.cat-track { display: flex; gap: 8px; width: max-content; will-change: transform; }
.category-bar a { white-space: nowrap; flex: none; }
.category-bar a.cat-all { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 800; }

/* ===== 코인결제 10% 할인 이벤트 ===== */
.coin-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; line-height: 1.5; vertical-align: 1px; }
.coin-ribbon { position: absolute; top: 8px; left: 8px; padding: 4px 9px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.product-card .coin-line { font-size: 14px; font-weight: 700; color: var(--accent-deep); margin-top: 2px; }
.product-card .meta { font-size: 12.5px; color: var(--text-mute); display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.coin-price-box { display: flex; align-items: center; gap: 10px; margin: -10px 0 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--yellow-soft); border: 1px solid var(--yellow-line); }
.coin-price-box strong { font-size: 22px; color: var(--accent-deep); }
.coin-event { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--yellow-soft); border: 1px solid var(--yellow-line); font-size: 14.5px; }
.coin-off { color: var(--danger); font-weight: 800; }
.row.coin-row { color: var(--accent-deep); font-weight: 700; }
.row[hidden] { display: none !important; }
.coin-event-banner { display: flex; align-items: center; gap: 14px; margin: 28px 0 0; padding: 16px 20px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.coin-event-banner .tag { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.coin-event-banner .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.coin-event-banner .txt b { font-size: 18px; color: var(--yellow); }
.coin-event-banner .txt small { font-size: 13px; color: #c9cbcf; }
.coin-event-banner .go { flex: none; font-weight: 700; font-size: 14px; }
.trade-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--accent-line); font-weight: 700; font-size: 13px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { display: inline-flex !important; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14.5px !important; color: var(--ink) !important; margin: 0 !important; background: var(--surface); }
.radio-pill input { width: auto !important; min-height: 0 !important; margin: 0; }
.radio-pill:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep) !important; font-weight: 700; }

@media (max-width: 760px) {
  .coin-event-banner { margin-top: 16px; padding: 14px 16px; gap: 10px; }
  .coin-event-banner .txt b { font-size: 17px; }
  .coin-event-banner .go { display: none; }
  .home-products .section-title { margin-top: 24px; }
  .product-card .coin-line { font-size: 15px; }
  .coin-ribbon { font-size: 12.5px; }
  .radio-pill { font-size: 16px !important; padding: 12px 18px; }
}

/* ===== 모아모아 보증업체 ===== */
.g-ribbon { position: absolute; top: 8px; right: 8px; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.g-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; vertical-align: 2px; }
.guarantee-box { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.guarantee-box .g-icon { font-size: 26px; line-height: 1; }
.guarantee-box strong { color: var(--accent-deep); font-size: 15.5px; }
.guarantee-box p { margin: 3px 0 0; font-size: 14px; color: var(--ink); }

/* 운영 계정으로 접속 중 표시 (관리자에게만) */
.operator-bar { position: relative; z-index: 30; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; background: #5b21b6; color: #fff; font-size: 14px; }
.operator-bar a { text-decoration: underline; font-weight: 700; }
.operator-fields { margin: 6px 0 20px; padding: 16px; border: 2px dashed #a78bfa; border-radius: var(--radius-sm); background: #f7f3ff; }
.operator-fields .op-title { font-weight: 800; color: #5b21b6; margin-bottom: 10px; }
@media (max-width: 760px) {
  .guarantee-box p { font-size: 15.5px; }
  .g-ribbon { font-size: 12.5px; }
}

/* ===== 상점 정보 ===== */
.seller-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 32px 0 20px; }
.seller-head { flex: 1; min-width: 0; }
.seller-head h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
.seller-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.seller-badges .since { font-size: 14px; color: var(--text-mute); }
.seller-rating { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.seller-rating b { font-size: 18px; }
.seller-rating span, .seller-rating.muted { color: var(--text-mute); font-size: 14.5px; }
.stars { letter-spacing: 1px; color: #d9dbd8; font-size: 18px; line-height: 1; }
.stars .on { color: var(--yellow); }
.seller-stats { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; }
.seller-stats div { display: flex; flex-direction: column; align-items: center; padding: 16px 6px; border-right: 1px solid var(--line); }
.seller-stats div:last-child { border-right: none; }
.seller-stats b { font-size: 22px; font-weight: 800; }
.seller-stats span { font-size: 13.5px; color: var(--text-mute); margin-top: 2px; }
.review-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.review-form h3 { margin: 0 0 14px; font-size: 18px; }
.star-pick { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { font-size: 38px !important; line-height: 1; color: #d9dbd8 !important; cursor: pointer; margin: 0 !important; padding: 0 2px; }
.star-pick label:hover, .star-pick label:hover ~ label, .star-pick input:checked ~ label { color: var(--yellow) !important; }
.star-pick input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.review-hint { color: var(--text-mute); font-size: 15px; margin: 0 0 16px; }
.review-hint a { text-decoration: underline; color: var(--accent-deep); }
.review-list { list-style: none; margin: 0 0 40px; padding: 0; border-top: 1px solid var(--line); }
.review-list li { padding: 16px 4px; border-bottom: 1px solid var(--line); }
.review-list .r-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-list .r-date { color: var(--text-mute); font-size: 13px; margin-left: auto; }
.review-list .r-item { font-size: 13.5px; color: var(--text-mute); margin-top: 4px; }
.review-list .r-item a { text-decoration: underline; }
.review-list p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.6; white-space: pre-line; }
.review-list form { margin-top: 8px; }
.seller-box .btn.small { margin-left: auto; flex: none; }
@media (max-width: 760px) {
  .seller-hero { padding: 20px 0 14px; gap: 14px; }
  .seller-hero form, .seller-hero form .btn { width: 100%; }
  .seller-head h1 { font-size: 22px; }
  .seller-stats { grid-template-columns: repeat(3, 1fr); }
  .seller-stats div:nth-child(3n) { border-right: none; }
  .seller-stats div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .seller-stats b { font-size: 21px; }
  .seller-stats span { font-size: 14.5px; }
  .stars { font-size: 19px; }
  .review-list p { font-size: 16.5px; }
  .star-pick label { font-size: 44px !important; }
}

/* 채팅 읽음 표시 */
.read-state { font-weight: 700; color: var(--yellow-deep); }
.read-state.is-read { color: var(--text-mute); font-weight: 600; }
@media (max-width: 760px) { .msg-row .time { font-size: 12.5px; } }

/* 메인: 공지 없이 글이 바로 보이게 (PC·모바일 공통) */
.home { display: flex; flex-direction: column; }
.home-products { order: 1; }
.home-used { order: 2; }
.home-shops { order: 3; }
.home-hero { order: 4; margin: 44px 0 40px; }
.home-products .coin-event-banner { margin-top: 20px; }

/* NEW 배지 (올린 지 24시간 이내) */
.new-badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .04em; line-height: 1.4; pointer-events: none; }
.new-badge.inline { position: static; display: inline-block; font-size: 11.5px; vertical-align: 1px; }
@media (max-width: 760px) { .new-badge { font-size: 13px; } }

/* ===== 채팅: 안전결제 · 예약 · 사진 ===== */
.deal-bar { border-top: 1px solid var(--line); padding: 10px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.deal-status { font-size: 14px; color: var(--accent-deep); }
.deal-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.deal-actions form { margin: 0; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px; min-width: 200px; }
.reserve-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 10px; border: 1px dashed var(--accent-line); border-radius: var(--radius-sm); background: var(--surface); }
.reserve-form[hidden] { display: none; }
.reserve-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-mute); font-weight: 600; }
.reserve-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 15px; }
.photo-btn { flex: none; display: flex; align-items: center; justify-content: center; width: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 22px; cursor: pointer; }
.photo-btn:hover { border-color: var(--accent); }
.photo-btn.busy { opacity: .4; pointer-events: none; }
.msg-row .bubble.photo { padding: 4px; background: var(--surface) !important; border: 1px solid var(--line); }
.msg-row .bubble.photo img { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; }
.msg-row.system { align-self: center; align-items: center; max-width: 92%; }
.sys-bubble { background: var(--yellow-soft); border: 1px solid var(--yellow-line); color: var(--ink); padding: 9px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; text-align: center; }
.safe-explain { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 16px 20px; margin: 10px 0 20px; }
.safe-explain ol { margin: 0 0 8px; padding-left: 20px; line-height: 1.8; }
.safe-explain p { margin: 0; font-size: 13.5px; color: var(--text-mute); }
.hint-text { font-size: 13px; color: var(--text-mute); margin-top: 14px; }
.seller-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.follow-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.follow-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; }
.follow-chip .shop-logo { width: 32px; height: 32px; font-size: 14px; }
@media (max-width: 760px) {
  .deal-actions .btn { min-height: 46px; font-size: 16px; }
  .sys-bubble { font-size: 15px; }
  .inline-form input { min-width: 0; flex: 1; font-size: 16px; }
  .photo-btn { width: 52px; font-size: 24px; }
  .seller-actions { width: 100%; }
  .seller-actions form, .seller-actions .btn { flex: 1; }
  .seller-hero .seller-actions form .btn { width: 100%; }
  .msg-row .bubble.photo img { max-width: 200px; }
}

/* 공지사항 사진 */
.notice-images { display: flex; flex-direction: column; gap: 14px; margin: 0 0 24px; }
.notice-images img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.has-photo { font-size: 14px; }

/* 중고장터 페이지 번호 (크게, 누르기 쉽게) */
.market-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 28px 0 60px; }
.market-pager a, .market-pager strong { min-width: 50px; height: 50px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--line); font-size: 17px; background: var(--surface, #fff); color: inherit; text-decoration: none; }
.market-pager strong { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 안전거래 안내 (직거래 금지 · 강도 주의) */
.safety-strip { background: var(--yellow-soft); border-bottom: 1px solid var(--yellow-line); color: var(--yellow-deep); font-size: 14px; line-height: 1.45; }
.safety-strip .container { padding-top: 9px; padding-bottom: 9px; text-align: center; }
.safety-strip b { color: var(--danger); }
.safety-box { border: 2px solid var(--yellow); background: var(--yellow-soft); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.safety-box strong { display: block; font-size: 17px; margin-bottom: 6px; }
.safety-box ul { margin: 0; padding-left: 20px; }
.safety-box li + li { margin-top: 4px; }
.safety-box li.danger { color: var(--danger); }
.home-safety .safety-box { margin: 0 0 8px; }
.chat-safety { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--yellow-soft); border: 1px solid var(--yellow-line); color: var(--yellow-deep); font-size: 14px; line-height: 1.5; }
.chat-safety b { color: var(--danger); }
.footer-safety { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--text-mute); }
@media (max-width: 760px) {
  .safety-strip { font-size: 13px; }
  .safety-box { font-size: 16px; padding: 14px; }
}
.sys-bubble { white-space: pre-line; }

/* 프로필 사진 */
.shop-logo.xs { width: 30px; height: 30px; font-size: 14px; display: inline-flex; vertical-align: middle; margin-right: 6px; }
.avatar-panel { display: flex; gap: 18px; align-items: center; margin-top: 10px; }
.avatar-panel h3 { margin: 0 0 4px; }
.avatar-panel .hint { margin: 0 0 10px; color: var(--text-mute); font-size: 15px; }
.avatar-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.avatar-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.avatar-form input[type=file] { max-width: 100%; font-size: 15px; }
@media (max-width: 760px) { .avatar-panel { flex-direction: column; align-items: flex-start; } }

/* 사진 여러 장 고르기 미리보기 */
.upload-picker { margin-top: 10px; }
.upload-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.upload-thumb { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid #dfe3df; background: #f4f6f4; }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-del { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 15px; line-height: 30px; padding: 0; cursor: pointer; }
.upload-main { position: absolute; left: 4px; bottom: 4px; background: #2f8c55; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.upload-note { margin-top: 8px; font-size: 14px; color: #6b6e72; }

/* 안전결제 수수료 안내 */
.fee-note { font-size: 14px; color: var(--text-mute); margin: 6px 0 12px; }
.deal-status .fee-note { margin: 0; font-size: 13px; }
