/* Jarabay design system - flat colours, no gradients.
   Orange #FF6B00 is the accent; buttons and links use the darker #CC4E00 so white text passes 4.5:1. */
:root {
  --orange: #FF6B00; --ocean: #0A3D62; --ocean-700: #082F4C; --ocean-50: #E8F0F7; --ocean-100: #CFE0EE;
  --brand-50: #FFF1E6; --brand-100: #FFE0C7; --brand-200: #FFC08F;
  --brand-500: #FF6B00; --brand-600: #CC4E00; --brand-700: #A83F00; --brand-900: #0A3D62;
  --gold: #FFB020; --gold-600: #E09400; --gold-50: #FFF4E0;
  --warn: #8A5300; --warn-bg: #FFF4E0;
  --ink: #14161A; --ink-2: #374151; --muted: #6B7280; --line: #E5E7EB; --line-2: #F1F2F4; --wash: #F7F5F2;
  --ok: #0B7A47; --ok-fill: #12B76A; --ok-bg: #E3F7EC; --bad: #B42318; --bad-fill: #E5484D; --bad-bg: #FDECEC;
  --yellow: #F5A623;
  --r-card: 12px; --r-btn: 8px; --r-input: 8px; --r-badge: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,.08); --shadow-up: 0 4px 12px rgba(0,0,0,.10);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: #fff; font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.icon { flex: none; }

/* Layout */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px 24px; border-right: 1px solid var(--line); background: #fff; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-size: 16px; }
.nav-label { padding: 18px 10px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--wash); }
.nav a.active { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 3px 0 0 var(--brand-600); font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ctx { display: flex; align-items: center; gap: 8px; margin: 0; }
.ctx select { padding: 7px 30px 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; max-width: 220px; }
.ctx.business select { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.ctx-static { display: flex; align-items: baseline; gap: 10px; font-weight: 700; }
.ctx-static span { color: var(--muted); font-weight: 600; }
.who { text-align: right; line-height: 1.25; }
.who strong { display: block; font-weight: 700; }
.who span { font-size: 12.5px; color: var(--muted); }
.menu-btn { display: none; }
.content { padding: 28px 32px 56px; width: 100%; max-width: 1240px; }
.scrim { display: none; }

/* Page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--wash); }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-danger { color: var(--bad); border-color: #FCA5A5; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: var(--brand-700); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* Panels and layout helpers */
.panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.panel + .panel, .stats + .panel, .panel + .stats, .filters + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 700; }
.panel-body { padding: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.split > .panel { margin-top: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.cols-2 > .panel { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat { background: #fff; padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { margin-top: 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat .note { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.stat.accent .value { color: var(--brand-600); }
.text-muted { color: var(--muted); }
.text-bad { color: var(--bad); }
.text-ok { color: var(--ok); }
.text-orange { color: var(--brand-700); }
.right { text-align: right; }
.strong { font-weight: 700; }
.small { font-size: 13px; }
.mt { margin-top: 20px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--wash); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #F7F5F2; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 800; background: var(--wash); border-top: 1px solid var(--line); }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); }
.table tr.is-void td { color: var(--muted); text-decoration: line-through; }
.table tr.is-void td:last-child, .table tr.is-void td .badge { text-decoration: none; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border: 0; border-radius: 999px; font-size: 12px; font-family: inherit; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--muted); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 13px; }
.field .req { color: var(--brand-600); margin-left: 3px; }
.field small { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(255, 107, 0, .20); }
.is-invalid { border-color: var(--bad) !important; }
textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand-600); flex: none; }
.check span { display: block; font-weight: 700; }
.check small { display: block; color: var(--muted); font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }
.form-narrow { max-width: 720px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; font-weight: 600; }
.flash-ok { background: var(--ok-bg); border-color: #A6EBC6; color: var(--ok); }
.flash-err { background: var(--bad-bg); border-color: #FCA5A5; color: var(--bad); }
.flash-info { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.flash ul { margin: 0; padding-left: 18px; }

/* Pagination */
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.pager a, .pager span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 13px; }
.pager a:hover { background: var(--brand-50); border-color: var(--brand-200); }
.pager .current { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.pager .disabled, .pager .gap { color: #9CA3AF; }

/* Charts */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 8px; }
.chart .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.chart .bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: calc(100% - 22px); }
.chart .bar { flex: 1; min-height: 2px; background: var(--brand-500); border-radius: 3px 3px 0 0; }
.chart .bar.alt { background: var(--brand-200); }
.chart .lbl { height: 22px; padding-top: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--brand-500); }
.legend i.alt { background: var(--brand-200); }

/* Sales screen */
.pos { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); gap: 20px; align-items: start; }
.pos-cart { position: sticky; top: 82px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.result { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 92px; }
.result:hover { border-color: var(--brand-500); background: var(--brand-50); }
.result .name { font-weight: 700; line-height: 1.3; }
.result .price { font-weight: 800; color: var(--brand-700); margin-top: auto; }
.result .stock { font-size: 12.5px; color: var(--muted); }
.result.out { opacity: .6; }
.cart-empty { padding: 26px 0; text-align: center; color: var(--muted); }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 92px 28px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row .name { font-weight: 700; line-height: 1.3; }
.cart-row .meta { font-size: 12.5px; color: var(--muted); }
.cart-row.warn .meta { color: var(--bad); font-weight: 700; }
.cart-row input { padding: 7px 8px; text-align: right; }
.cart-row .remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.cart-row .remove:hover { color: var(--bad); }
.cart-row .line { text-align: right; font-weight: 700; }
.totals .line { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 22px; font-weight: 800; }
.totals .owed { color: var(--bad); font-weight: 700; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 14px; border: 1px solid #D1D5DB; border-radius: 8px; cursor: pointer; font-weight: 600; }
.seg input:checked + label { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.seg input:focus-visible + label { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.inline-add { display: none; margin-top: 8px; padding: 12px; border: 1px dashed var(--brand-200); border-radius: 8px; background: var(--brand-50); }
.inline-add.open { display: block; }
.inline-add .field { margin-bottom: 10px; }

/* Purchase rows */
.line-row { display: grid; grid-template-columns: minmax(0, 2fr) 110px 130px 32px; gap: 10px; align-items: end; margin-bottom: 10px; }
.line-row.staff { grid-template-columns: minmax(0, 2fr) 130px 32px; }
.line-row .field { margin: 0; }
.line-row .remove { height: 40px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }

/* Receipt */
.receipt-wrap { display: flex; justify-content: center; }
.receipt { width: 360px; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px; background: #fff; }
.receipt h2 { font-size: 18px; text-align: center; font-weight: 800; }
.receipt .center { text-align: center; color: var(--muted); font-size: 13px; }
.receipt hr { border: 0; border-top: 1px dashed #D1D5DB; margin: 14px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.receipt .item { padding: 6px 0; }
.receipt .item .sub { font-size: 12.5px; color: var(--muted); }
.receipt .grand { font-size: 18px; font-weight: 800; }
.receipt .void { text-align: center; padding: 8px; margin-bottom: 12px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-weight: 800; }

/* Audit */
.audit-detail summary { cursor: pointer; color: var(--brand-700); font-weight: 700; font-size: 13px; }
.audit-detail pre { margin: 8px 0 0; padding: 10px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Sign in */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { background: var(--brand-600); color: #fff; padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; overflow: hidden; }
.login-art .brand { padding: 0; color: #fff; }
.login-art .brand .mark { background: #fff; color: var(--brand-600); }
.login-art h1 { font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; max-width: 440px; }
.login-art p { margin-top: 14px; max-width: 420px; font-size: 16px; color: #FFEDD5; }
.paper { position: relative; width: min(330px, 100%); padding: 24px 24px 22px; background: #fff; color: var(--ink); border-radius: 4px 4px 0 0; transform: rotate(-2.5deg); align-self: flex-start; margin-bottom: 12px; box-shadow: 0 30px 50px rgba(124, 45, 18, .35); }
.paper::after { content: none; }
.paper .title { font-weight: 800; text-align: center; margin-bottom: 2px; }
.paper .sub { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.paper .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.paper .row.total { border-bottom: 0; font-weight: 800; font-size: 16px; padding-top: 10px; }
.paper .row.owed { color: var(--bad); font-weight: 700; border-bottom: 0; }
.login-form-side { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.login-form .lead { color: var(--muted); margin: 6px 0 24px; }
.login-form .foot { margin-top: 22px; color: var(--muted); font-size: 13px; }

/* Phone bottom bar */
.mobile-bottom-bar { display: none; }
.mobile-bottom-btn { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 4px; text-decoration: none; cursor: pointer; }
.mobile-bottom-btn.on { color: var(--brand-600); }
.mobile-bottom-btn .dot { position: absolute; top: 4px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 999px; background: var(--gold); border: 2px solid #fff; }
.desktop-only { }

/* Responsive */
@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: -280px; width: 264px; transition: left .18s ease; box-shadow: none; }
  body.nav-open .sidebar { left: 0; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(28, 25, 23, .35); z-index: 25; }
  .menu-btn { display: inline-flex; padding: 7px 9px; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px calc(72px + env(safe-area-inset-bottom, 0px)); }
  .split, .cols-2, .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-cart { position: static; }
  .who span { display: none; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 24px; }
  .login-art h1 { font-size: 28px; }
  .paper { display: none; }
  .desktop-only { display: none !important; }
  .mobile-bottom-bar { display: flex; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  .line-row, .line-row.staff { grid-template-columns: minmax(0, 1fr) 100px 32px; }
  .line-row .cost { grid-column: 1 / 3; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .ctx select { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .no-print, .scrim, .flash { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .receipt { border: 0; width: 100%; padding: 0; }
  body { font-size: 13px; }
}

/* ---- POS cart ---- */
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cart-line:last-child { border-bottom: 0; }
.cart-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-info strong { font-weight: 700; line-height: 1.25; }
.cart-info .meta { font-size: 12.5px; color: var(--muted); }
.cart-info .opts { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.cart-info select.unit { padding: 3px 22px 3px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cart-info input.note { flex: 1 1 120px; min-width: 0; padding: 3px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cart-qty button { width: 28px; height: 30px; border: 0; background: #fff; font-weight: 800; cursor: pointer; color: var(--ink); }
.cart-qty button:hover { background: var(--wash); }
.cart-qty input { width: 44px; height: 30px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-total { font-weight: 800; text-align: right; min-width: 84px; font-variant-numeric: tabular-nums; }
.cart-remove { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; }
.cart-remove:hover { color: var(--bad); }



/* ---- POS cart line (flex, responsive) ---- */
#cart { display: flex; flex-direction: column; gap: 10px; }
.cart-line {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.cart-line .head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  min-width: 0;
}
.cart-line .head .name {
  font-weight: 700; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.cart-line .head .total {
  font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cart-line .meta { font-size: 12.5px; color: var(--muted); }
.cart-line .controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  width: 100%;
}
.cart-line .controls .note {
  flex: 1 1 auto; min-width: 0;
  padding: 5px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px;
  box-sizing: border-box;
}
.cart-line .qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  flex: 0 0 auto;
}
.cart-line .qty button {
  width: 28px; height: 30px; border: 0; background: #fff;
  font-weight: 800; cursor: pointer; color: var(--ink);
  padding: 0;
}
.cart-line .qty button:hover { background: var(--wash); }
.cart-line .qty input {
  width: 40px; height: 30px; border: 0; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 0;
}
.cart-line .remove {
  flex: 0 0 auto;
  border: 0; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.cart-line .remove:hover { color: var(--bad); }

@media (max-width: 420px) {
  .cart-line .controls { flex-wrap: wrap; }
  .cart-line .controls .note { flex-basis: 100%; }
}

/* ---------- Selling units and price lists (2026-10) ---------- */
.unit-heading { font-size: 15px; font-weight: 800; margin: 22px 0 2px; }
.unit-heading + p { margin: 0 0 10px; }
.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.price-grid .field small { line-height: 1.3; }
.inline-pair { display: flex; align-items: center; gap: 8px; }
.inline-pair input { min-width: 0; flex: 1 1 80px; }
.inline-pair select { flex: 0 1 auto; max-width: 50%; }
.inline-pair span { white-space: nowrap; }
.unit-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.unit-row { border: 1px solid var(--line); border-left: 3px solid var(--brand-500); border-radius: 10px; padding: 12px 14px 4px; background: var(--wash); }
.unit-row-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 12px; align-items: end; }
.unit-row .remove { height: 40px; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.unit-row .remove:hover { color: var(--bad); }
.unit-row .u-check { margin: 0 0 8px; min-height: 1em; }

.result { display: flex; flex-direction: column; align-items: stretch; gap: 4px; cursor: pointer; }
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.unit-chip { border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.unit-chip:hover { background: var(--brand-100); border-color: var(--brand-500); }
/* The older grid rule above sets align-items:center, which centred every row of a cart line
   and let long product names spill out of the card on phones. */
#cart .cart-line { align-items: stretch; }
.cart-line .line-price { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; text-align: left; }
.cart-line .line-price select.unit { width: auto; flex: 0 0 auto; padding: 3px 24px 3px 8px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; max-width: 170px; }
.cart-line .line-price .price-input { width: 110px; flex: 0 0 auto; color: var(--ink); padding: 3px 6px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; font-variant-numeric: tabular-nums; }
.cart-line .line-price .unit-static { font-weight: 600; color: var(--ink-2); }
.cart-line .line-price .badge { font-size: 11px; }

.pack-list { display: flex; flex-direction: column; gap: 14px; }
.pack-card .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pack-card .panel-head h2 .sub { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.pack-card.has-error { border-color: var(--bad); }
.pack-skip { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pack-now { margin: 0 0 12px; }
.pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.pack-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.pack-preview { margin: 4px 0 0; font-weight: 700; color: var(--ok); min-height: 1.2em; }
.pack-preview.text-bad { color: var(--bad); }
.pack-submit { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 0; background: #fff; border-top: 1px solid var(--line); z-index: 2; }

@media (max-width: 760px) {
  .price-grid, .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .unit-row-head { grid-template-columns: minmax(0, 1fr) 32px; }
  .unit-row-head .field:nth-child(2) { grid-column: 1 / 2; }
}
.line-row.with-unit { grid-template-columns: minmax(0, 2fr) minmax(170px, 1.2fr) 130px 32px; }
.line-row.with-unit.staff { grid-template-columns: minmax(0, 2fr) minmax(170px, 1.2fr) 32px; }
@media (max-width: 760px) {
  .line-row.with-unit, .line-row.with-unit.staff { grid-template-columns: minmax(0, 1fr) 32px; }
  .line-row.with-unit .field { grid-column: 1 / 2; }
  .line-row.with-unit .remove { grid-column: 2; grid-row: 1; }
}


/* ---------- Jarabay shell ---------- */
.sidebar { background: var(--brand-900); border-right: 0; color: #CFE0EE; }
.brand { color: #fff; }
.brand .mark { background: var(--gold); color: var(--brand-900); border-radius: 9px; font-weight: 800; }
.brand .word span { color: var(--gold); }
.nav-label { color: #9DB7CC; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.nav a { color: #CFE0EE; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(255,255,255,.10); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav a .icon { opacity: .9; }
.plan-chip { margin: 6px 10px 0; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 12.5px; color: #CFE0EE; }
.plan-chip strong { color: #fff; display: block; font-size: 13px; }
.plan-chip a { color: var(--gold); font-weight: 700; text-decoration: none; }
.lock { display: inline-block; margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: var(--brand-900); }
.stat.accent .value { color: var(--brand-600); }
.trial-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 18px; border-radius: 10px; background: var(--gold-50); border: 1px solid #FFD27A; color: #8A5300; font-weight: 600; }
.trial-bar.bad { background: var(--bad-bg); border-color: #FCA5A5; color: var(--bad); }

.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--brand-900); font-size: 11.5px; font-weight: 800; text-align: center; }
.nav a .lock { margin-left: auto; }
.nav-form { margin: 0; }
.nav-form button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: #CFE0EE; font-weight: 600; cursor: pointer; text-align: left; }
.nav-form button:hover { background: rgba(255,255,255,.06); color: #fff; }
.brand .word { letter-spacing: -0.02em; }

/* ---------- Public site: landing, pricing, sign in ---------- */
body.site { background: #fff; }
.site-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.site-head { position: sticky; top: 0; z-index: 30; background: var(--brand-900); }
.site-head .site-wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.site-head .brand { padding: 0; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav > a:not(.btn) { color: #CFE0EE; text-decoration: none; font-weight: 600; }
.site-nav > a:not(.btn):hover { color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--brand-900); }
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-lg { padding: 13px 22px; font-size: 15.5px; border-radius: 10px; }
.hero { background: var(--ocean); color: #fff; padding: 70px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(255,176,32,.14); color: var(--gold); font-weight: 700; font-size: 13px; }
.hero h1 { font-size: 50px; line-height: 1.06; letter-spacing: -0.035em; margin: 18px 0 16px; font-weight: 800; }
.hero h1 span { color: var(--gold); }
.hero .lead { color: #CFE0EE; font-size: 17px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { color: #9DB7CC; margin-top: 12px; }
.hero-card { background: #fff; color: var(--ink); border-radius: 16px; padding: 18px; box-shadow: 0 30px 70px rgba(0,0,0,.35); transform: rotate(1.5deg); }
.hc-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 10px; }
.hc-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--brand-500); }
.hc-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.hc-line em { display: block; font-style: normal; color: var(--muted); font-size: 12.5px; }
.hc-total { display: flex; justify-content: space-between; padding: 12px 0 6px; font-weight: 800; font-size: 18px; }
.hc-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-order { margin-top: 12px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--gold-50); color: #8A5300; font-weight: 700; font-size: 13px; }
.site-section { padding: 64px 0; }
.site-section.alt { background: var(--wash); border-top: 1px solid var(--line); }
.section-title, .page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; text-align: center; margin-bottom: 30px; }
.lead.center { text-align: center; max-width: 720px; margin: -14px auto 30px; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.feature .icon { color: var(--brand-600); }
.feature h3 { font-size: 16px; margin: 10px 0 6px; }
.feature p { color: var(--muted); font-size: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.plan-card.featured { border: 2px solid var(--brand-600); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.plan-flag { position: absolute; top: -12px; left: 24px; background: var(--gold); color: var(--brand-900); font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan-card h3 { font-size: 20px; }
.plan-price { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 10px; }
.plan-price span { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; flex: 1; }
.plan-list li { display: flex; gap: 8px; align-items: flex-start; }
.plan-list .icon { color: var(--brand-600); margin-top: 2px; }
.site-foot { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 13px; }
.site-foot .site-wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-foot .brand { color: var(--ink); padding: 0; font-size: 16px; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth-art { background: var(--ocean); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.auth-art .brand { padding: 0; }
.auth-art h1 { font-size: 38px; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 14px; }
.auth-art p { color: #CFE0EE; max-width: 440px; }
.auth-art a { color: var(--gold); font-weight: 700; }
.auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; color: #E8F0F7; }
.auth-points li { display: flex; gap: 10px; }
.auth-points .icon { color: var(--gold); margin-top: 3px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form.wide { max-width: 560px; }
.auth-form h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.auth-form .lead { color: var(--muted); margin: 6px 0 22px; }
.auth-form .foot { margin-top: 20px; color: var(--muted); font-size: 13.5px; text-align: center; }
.form-grid.tight { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
@media (max-width: 900px) {
  .hero-grid, .feature-grid, .plan-grid, .auth { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 44px 0 56px; }
  .hero h1 { font-size: 36px; }
  .hero-card { transform: none; }
  .auth-art { padding: 28px 22px; }
  .auth-art h1 { font-size: 28px; }
  .site-nav { gap: 12px; }
  .site-nav > a:not(.btn):first-child { display: none; }
}
.section-h { font-size: 18px; font-weight: 800; margin: 28px 0 12px; }
.plan-grid.in-app .plan-card { padding: 20px; }
.plan-list li.off { color: #9CA3AF; }
.plan-list li.off .icon { color: #D1D5DB; }
.months-field { margin-bottom: 18px; }
.center { text-align: center; }
.center-box { max-width: 640px; text-align: center; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.store-link-box { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-200); margin-bottom: 20px; }
.store-link { font-size: 18px; font-weight: 800; color: var(--brand-700); word-break: break-all; }
.inline-pair.prefix span { white-space: nowrap; }
.logo-row { display: flex; gap: 14px; align-items: flex-start; }
.logo-row .grow { flex: 1; }
.logo-preview { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.logo-preview.empty { display: grid; place-items: center; background: var(--brand-900); color: var(--gold); font-weight: 800; font-size: 26px; }
.small-check { margin: 8px 0 0; }
.small-check span { font-weight: 600; font-size: 13px; }
.checklist > div { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); color: var(--muted); font-weight: 600; }
.checklist > div.done { color: var(--ok); }
input[type=file] { width: 100%; padding: 8px; border: 1px dashed #D1D5DB; border-radius: 8px; background: var(--wash); }

/* ---------- Public store link ---------- */
body.shop { background: var(--wash); }
.shop-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.shop-head { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.shop-head .shop-wrap { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 64px; }
.shop-id { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.shop-id img, .shop-mark { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.shop-mark { display: grid; place-items: center; background: var(--brand-900); color: var(--gold); font-weight: 800; font-size: 18px; }
.shop-id strong { display: block; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-id small { display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: 12px; }
.shop-actions { display: flex; gap: 8px; flex: none; }
.btn-wa { background: #1FAF54; border-color: #1FAF54; color: #fff; }
.btn-wa:hover { background: #17924A; border-color: #17924A; }
.cart-btn .nav-badge { margin-left: 2px; }
.shop-main { padding-top: 18px; padding-bottom: 40px; }
.shop-hero { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.shop-hero h1 { font-size: 24px; letter-spacing: -0.02em; }
.shop-hero p { color: var(--ink-2); margin-top: 4px; }
.shop-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.shop-search { display: flex; gap: 8px; margin-bottom: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: 13px; }
.chip.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.shop-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; transition: box-shadow .15s; }
.shop-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.shop-card.is-out { opacity: .7; }
.shop-img { position: relative; aspect-ratio: 1 / 1; background: var(--line-2); display: grid; place-items: center; color: #9CA3AF; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.out-tag { position: absolute; left: 8px; top: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.shop-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.shop-card-name { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-price { font-weight: 800; color: var(--brand-700); }
.shop-price small { color: var(--muted); font-weight: 600; }
.shop-price-alt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-weight: 600; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.pd-main { aspect-ratio: 1 / 1; border-radius: 12px; background: var(--line-2); display: grid; place-items: center; overflow: hidden; color: #9CA3AF; }
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.pd-thumbs button { width: 60px; height: 60px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: 24px; letter-spacing: -0.02em; margin: 8px 0 12px; }
.pd-prices { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.pd-prices strong { font-size: 18px; color: var(--brand-700); }
.pd-stock { font-weight: 700; margin: 10px 0 14px; }
.pd-buy { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.pd-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.pd-row .field { margin: 0; }
.pd-desc { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); }
.pd-where { margin-top: 16px; }
.shop-h1 { font-size: 24px; margin-bottom: 14px; }
.shop-split { margin-top: 0; }
.order-line { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.order-line .grow { flex: 1; min-width: 0; }
.order-thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--line-2); overflow: hidden; display: grid; place-items: center; flex: none; color: #9CA3AF; }
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-total { display: flex; justify-content: space-between; padding: 14px 16px; font-size: 17px; }
.confirm-box { max-width: 560px; margin: 20px auto; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.confirm-tick { width: 64px; height: 64px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.confirm-items { width: 100%; text-align: left; }
.shop-foot { padding: 24px 0 40px; color: var(--muted); font-size: 13px; text-align: center; }
.shop-foot a { color: var(--brand-700); text-decoration: none; }
@media (max-width: 760px) {
  .pd { grid-template-columns: minmax(0, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-actions .btn { padding: 6px 10px; }
  .shop-hero { flex-direction: column; }
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.tab span { color: var(--muted); font-weight: 600; margin-left: 4px; }
.tab.on { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.tab.on span { color: var(--gold); }
.order-steps { display: flex; flex-direction: column; gap: 14px; }
.complete-form { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-2); }
details summary { cursor: pointer; }
.split > div > .panel + .panel { margin-top: 20px; }
.photo-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.photo-thumb { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.photo-thumb img, .photo-new { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--line-2); display: grid; place-items: center; overflow: hidden; flex: none; color: #9CA3AF; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.share-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 0; }
.share-canvas-wrap { padding: 14px; background: var(--wash); display: flex; justify-content: center; }
.share-canvas-wrap canvas { width: 100%; max-width: 340px; height: auto; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.share-actions { display: flex; flex-direction: column; gap: 10px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-form select { width: auto; }
.prose h2 { font-size: 16px; font-weight: 800; margin: 18px 0 8px; color: var(--brand-700); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.list-links { display: flex; flex-direction: column; gap: 4px; }
.list-links a { padding: 6px 8px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.list-links a.on, .list-links a:hover { background: var(--brand-50); color: var(--brand-700); }
.big-number { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.ads-top { margin-top: 0; }
.inline-form input[type=number] { width: 140px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pick small { display: block; color: var(--muted); font-weight: 600; }
.pick:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.small-value { font-size: 20px; }
.plan-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; } .plan-admin .panel + .panel { margin-top: 0; }
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.funnel > div { background: #fff; padding: 14px 18px; }
.funnel .label { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.funnel strong { font-size: 22px; font-weight: 800; }
.onboarding { border-color: var(--gold); background: var(--gold-50); margin-bottom: 20px; }
.onboarding .panel-head { border-color: #FFD27A; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #FFD27A; text-decoration: none; font-weight: 700; font-size: 13.5px; }
.step .tick { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--gold); color: var(--brand-900); flex: none; }
.step.done { color: var(--muted); text-decoration: line-through; }
.step.done .tick { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 760px) { .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.btn.menu-btn { display: none; }

@media (max-width: 1000px) { .btn.menu-btn { display: inline-flex; } }
.shop-id { flex: 1; }
.shop-id > span { min-width: 0; }
.shop-id small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .shop-actions .lbl { display: none; } .shop-actions .btn { padding: 8px 10px; } }
.check span span { display: inline; font-weight: 500; }
.split-pay { gap: 8px; }
.split-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; }
.split-row label { font-weight: 600; font-size: 13.5px; }
#split-note.bad { color: var(--bad); font-weight: 700; }
#split-note.ok { color: var(--ok); font-weight: 700; }

/* ---------- Marketplace ---------- */
.market-hero { background: var(--ocean); padding: 26px 0 18px; }
.market-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 6px 6px 6px 14px; max-width: 760px; margin: 0 auto; color: var(--muted); }
.market-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 8px 0; background: transparent; color: var(--ink); }
.market-loc-bar { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: #CFE0EE; font-size: 13.5px; font-weight: 600; }
.market-loc-bar > span { display: inline-flex; align-items: center; gap: 6px; }
.link-light { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.state-pick select, .market-results-head select { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; }
.state-pick select option { color: var(--ink); }
.market-results-head select { background: #fff; color: var(--ink); border-color: var(--line); }
.market-body { padding-top: 22px; padding-bottom: 40px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 26px; }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--brand-200); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.cat-tile strong { display: block; font-size: 14px; line-height: 1.25; }
.cat-tile small { color: var(--muted); font-weight: 600; }
.cat-icon { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; }
.market-results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.market-results-head h1 { font-size: 21px; letter-spacing: -0.02em; }
.market-results-head h1 small { color: var(--muted); font-size: 14px; font-weight: 600; }
.market-grid { margin-top: 8px; }
.market-seller { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.market-loc { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.ad-tag { position: absolute; right: 8px; top: 8px; background: var(--gold); color: var(--ink); font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.market-promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 34px; padding: 18px; background: var(--wash); border: 1px solid var(--line); border-radius: 14px; }
.market-promise div { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); font-size: 13.5px; }
.market-promise .icon { color: var(--brand-600); }
.market-promise strong { color: var(--ink); }
.narrow-wrap { max-width: 560px; } .narrow-wrap.wide { max-width: 720px; }
@media (max-width: 640px) { .hide-sm { display: none; } .site-nav { gap: 12px; } .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat-tile { padding: 10px; gap: 8px; } .cat-icon { width: 36px; height: 36px; } }

/* ---------- Checkout, escrow, tracking ---------- */
.choice-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice input { margin-top: 3px; accent-color: var(--brand-600); }
.choice strong { display: block; font-size: 14px; }
.choice small { display: block; color: var(--muted); font-size: 12.5px; }
.choice:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.sum-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 16px; font-size: 14px; }
.sum-rows > div[hidden] { display: none; }
.sum-rows .order-total { border-top: 1px solid var(--line); padding-top: 12px; }
.escrow-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 14px 0; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--ink-2); font-size: 13.5px; }
.escrow-note[hidden] { display: none; }
.escrow-note .icon { color: var(--brand-600); flex: none; margin-top: 2px; }
.escrow-note strong { color: var(--ink); }
.escrow-note.small-note { font-size: 13px; margin-top: 12px; }
.pill-pay { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--gold-50); color: var(--warn); font-size: 11px; font-weight: 800; }
.track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.badge.big { font-size: 13px; padding: 6px 12px; }
.b-info { background: #DBEAFE; color: #1E40AF; }
.code-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; margin: 6px 0 14px; border: 2px dashed var(--brand-200); border-radius: 14px; background: #fff; text-align: center; }
.code-box span { font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.code-box strong { font-size: 40px; letter-spacing: .3em; color: var(--brand-700); padding-left: .3em; }
.code-box small { color: var(--ink-2); max-width: 420px; }
.confirm-actions { display: flex; flex-direction: column; gap: 12px; }
.progress-steps { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; gap: 0; overflow-x: auto; }
.progress-steps li { flex: 1; min-width: 92px; position: relative; padding-top: 22px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.progress-steps li span { position: absolute; top: 4px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 999px; background: #fff; border: 2px solid var(--line); z-index: 1; }
.progress-steps li::before { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.progress-steps li:first-child::before { display: none; }
.progress-steps li.done { color: var(--ink); }
.progress-steps li.done span { background: var(--brand-600); border-color: var(--brand-600); }
.progress-steps li.done::before { background: var(--brand-600); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row .grow { flex: 1; }
.plain-list { padding-left: 18px; margin: 8px 0 0; }
details.panel.panel-body { padding: 14px 16px; }
details.explain { margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--gold-50); border: 1px solid #FFE2A8; font-size: 13.5px; }
details.explain summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; }
details.explain ol { margin: 10px 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.price-check { margin: 4px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); }
.price-check .table td, .price-check .table th { padding: 6px 8px; font-size: 13px; }
.amt-neg { color: var(--bad); } .amt-pos { color: var(--ok); }
.input-sm { padding: 5px 8px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; width: 110px; }

/* ---------- Rider app ---------- */
.rider-app { background: var(--wash); }
.rider-head { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: var(--brand-900); }
.rider-head .brand { padding: 0; }
.rider-head .brand small { color: var(--gold); font-weight: 700; margin-left: 4px; }
.rider-head nav { display: flex; align-items: center; gap: 14px; }
.rider-head nav a, .rider-head nav .link { color: #CFE0EE; text-decoration: none; font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.rider-head nav a.on { color: #fff; border-bottom: 2px solid var(--gold); }
.rider-head form { margin: 0; }
.rider-main { max-width: 640px; margin: 0 auto; padding: 16px 14px 40px; }
.rider-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); margin-bottom: 12px; }
.rider-status strong { display: block; font-size: 16px; }
.rider-status .small { color: var(--muted); }
.rider-status.on { background: var(--brand-50); border-color: var(--brand-200); }
.rider-status.on strong::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: #22C55E; margin-right: 6px; vertical-align: middle; }
.rider-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rider-stats .value { font-size: 18px; }
.job-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; color: var(--ink); text-decoration: none; }
.job-card.link-card:hover { border-color: var(--brand-200); }
.job-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.job-top strong { display: block; }
.job-top .small { display: flex; align-items: center; gap: 4px; }
.job-fee { text-align: right; font-weight: 800; font-size: 18px; color: var(--brand-700); }
.job-fee small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 12px; font-size: 13px; color: var(--ink-2); }
.job-meta span { display: inline-flex; align-items: center; gap: 4px; }
.job-head { display: flex; justify-content: space-between; align-items: center; }
.progress-steps.compact li { min-width: 70px; }
.panel.muted { opacity: .65; }
@media (max-width: 420px) { .rider-stats .value { font-size: 15px; } .code-box strong { font-size: 34px; } }
@media (max-width: 420px) { .rider-head .brand small { display: none; } .rider-head nav { gap: 10px; } .rider-head nav a, .rider-head nav .link { font-size: 13px; } .progress-steps li { min-width: 76px; font-size: 11px; } }
.loss-hero { display: flex; gap: 16px; padding: 18px 20px; margin-bottom: 16px; border-radius: 14px; background: var(--bad-bg); border: 1px solid #FCA5A5; }
.loss-hero span { display: block; font-weight: 700; color: var(--bad); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.loss-hero strong { display: block; font-size: 30px; color: var(--bad); letter-spacing: -0.02em; }
.loss-hero small { color: var(--ink-2); font-size: 13.5px; }
.fix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.fix-grid .panel { margin-top: 0; }
.fix-card .inline-pair { flex-wrap: wrap; }
.fix-card .inline-pair input { width: 130px; }
.fix-card .inline-pair select { width: auto; }
.mt-xs { margin-top: 6px; }
.loss-alert { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--bad-bg); border: 1px solid #FCA5A5; color: var(--ink); }
.loss-alert strong { color: var(--bad); }
@media (max-width: 560px) { .fix-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Rider app (phone-first, like a delivery app) ---------- */
.r-body { background: #F1F2F4; margin: 0; }
.r-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; background: #F7F5F2; padding-bottom: 84px; position: relative; box-shadow: 0 0 0 1px var(--line); }
.r-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--brand-700); color: #fff; }
.r-top h1 { font-size: 17px; font-weight: 700; margin: 0; }
.r-back { color: #fff; text-decoration: none; font-size: 22px; line-height: 1; }
.r-main { padding: 14px; }
.r-hero { background: var(--ocean); color: #fff; padding: 18px 16px 58px; border-radius: 0 0 16px 16px; }
.r-hero-top { display: flex; justify-content: space-between; align-items: center; }
.r-me { display: flex; align-items: center; gap: 10px; }
.r-me small { display: block; color: #CFE0EE; font-size: 12px; }
.r-me strong { font-size: 17px; }
.r-avatar { width: 44px; height: 44px; border-radius: 999px; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 18px; overflow: hidden; flex: none; border: 2px solid rgba(255,255,255,.6); }
.r-avatar img { width: 100%; height: 100%; object-fit: cover; }
.r-avatar.big { width: 64px; height: 64px; font-size: 26px; border-color: var(--brand-100); }
.r-switch-form { margin: 0; }
.r-switch { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.18); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.r-switch i { width: 38px; height: 22px; border-radius: 999px; background: rgba(0,0,0,.35); position: relative; transition: background .2s; }
.r-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: left .2s; }
.r-switch.on i { background: #22C55E; }
.r-switch.on i::after { left: 19px; }
.r-balance { margin: 18px 0 -84px; background: #fff; color: var(--ink); border-radius: 18px; padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.15); }
.r-balance small { color: var(--muted); font-weight: 600; font-size: 12.5px; display: block; }
.r-balance strong { font-size: 26px; letter-spacing: -0.02em; display: block; }
.r-plan { font-size: 12px; color: var(--brand-700); font-weight: 700; }
.r-btn-light { padding: 9px 16px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); text-decoration: none; font-weight: 800; font-size: 13.5px; }
.r-hero + .r-main { padding-top: 48px; }
.r-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.r-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-stat { background: #fff; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); }
.r-stat .icon { color: var(--brand-600); margin-bottom: 4px; }
.r-stat strong { font-size: 17px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.r-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.r-card { display: block; background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.r-card-h { font-size: 15px; margin-bottom: 10px; }
.r-notice { display: flex; gap: 12px; align-items: flex-start; background: var(--brand-50); border-color: var(--brand-100); }
.r-notice .icon { color: var(--brand-600); flex: none; }
.r-notice strong { display: block; }
.r-notice span { font-size: 13px; color: var(--ink-2); }
.r-notice.bad { background: var(--bad-bg); border-color: #FCA5A5; } .r-notice.bad .icon { color: var(--bad); }
.r-warn { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--gold-50); border: 1px solid #FFE2A8; color: var(--warn); font-weight: 700; font-size: 13px; text-decoration: none; }
.r-gps { margin: -4px 0 10px; }
.r-section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; }
.r-section-h h2 { font-size: 16px; }
.r-section-h a { font-size: 13px; font-weight: 700; color: var(--brand-600); text-decoration: none; }
.r-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--line-2); color: var(--ink-2); }
.r-pill.go { background: #DBEAFE; color: #1E40AF; } .r-pill.warn { background: var(--warn-bg); color: var(--warn); } .r-pill.ok { background: var(--ok-bg); color: var(--ok); }
.r-route { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; position: relative; }
.r-route > div { display: flex; gap: 10px; align-items: flex-start; }
.r-route strong { display: block; font-size: 14px; }
.r-route small { display: block; color: var(--muted); font-size: 12.5px; }
.r-route .dot { width: 12px; height: 12px; border-radius: 999px; margin-top: 4px; flex: none; border: 3px solid; }
.r-route .dot.shop { border-color: var(--brand-600); }
.r-route .dot.buyer { border-color: var(--gold-600); background: var(--gold); }
.r-route::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: 22px; border-left: 2px dashed var(--line); }
.r-active-top, .r-offer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.r-offer-top strong { display: block; margin-top: 4px; }
.r-fee { text-align: right; font-weight: 800; font-size: 20px; color: var(--brand-700); }
.r-fee small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.r-active-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.r-offer-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.r-offer-meta span { display: inline-flex; align-items: center; gap: 4px; }
.r-offer-actions { display: flex; gap: 10px; }
.r-offer-actions form { margin: 0; } .r-offer-actions .grow { flex: 1; }
.r-btn { display: block; width: 100%; padding: 13px 16px; border-radius: 12px; border: 0; background: var(--brand-600); color: #fff; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; text-align: center; text-decoration: none; }
.r-btn:disabled { opacity: .5; cursor: not-allowed; }
.r-btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.r-offer-actions .r-btn.ghost { width: auto; padding-left: 20px; padding-right: 20px; }
.r-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 16px; background: #fff; border-radius: 16px; border: 1px dashed var(--line); color: var(--muted); }
.r-empty .icon { color: var(--brand-200); }
.r-empty strong { color: var(--ink); }
.r-empty span { font-size: 13px; }
.r-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.r-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.r-bar span { width: 100%; max-width: 28px; border-radius: 8px 8px 3px 3px; background: var(--orange); }
.r-bar small { font-size: 11px; color: var(--muted); font-weight: 700; }
.r-total { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.r-total strong { font-size: 20px; color: var(--brand-700); }
.r-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.r-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; padding: 4px 0; }
.r-nav a.on { color: var(--brand-600); }
.r-nav-ic { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; }
.r-nav a.on .r-nav-ic { background: var(--brand-50); }
.r-nav-ic b { position: absolute; top: -4px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; }
.r-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #fff; padding: 4px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 12px; }
.r-tabs a { text-align: center; padding: 9px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.r-tabs a.on { background: var(--brand-600); color: #fff; }
.r-tabs b { background: var(--gold); color: var(--ink); border-radius: 999px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.r-profile-head { display: flex; gap: 14px; align-items: center; }
.r-profile-head strong { display: block; font-size: 18px; }
.r-profile-head span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.r-profile-head .r-pill { display: inline-block; }
.r-menu { background: #fff; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 12px; overflow: hidden; }
.r-menu a { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-2); }
.r-menu a:last-child { border-bottom: 0; }
.r-menu a .icon { color: var(--brand-600); }
.r-menu a span { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.r-signout { margin: 6px 0 20px; }
.r-sub-now { background: var(--ocean); color: #fff; border: 0; }
.r-sub-now.bad { background: var(--bad); }
.r-sub-now small, .r-sub-now span { display: block; color: rgba(255,255,255,.8); font-size: 13px; }
.r-sub-now strong { display: block; font-size: 24px; margin: 2px 0; }
.r-plans { display: grid; gap: 10px; margin-bottom: 14px; }
.r-plan-card { display: block; cursor: pointer; }
.r-plan-card input { position: absolute; opacity: 0; }
.r-plan-body { display: block; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px; }
.r-plan-card input:checked + .r-plan-body { border-color: var(--brand-600); background: var(--brand-50); }
.r-plan-card input:focus-visible + .r-plan-body { outline: 3px solid var(--gold); }
.r-plan-body strong { display: block; font-size: 16px; }
.r-plan-body b { display: block; font-size: 22px; color: var(--brand-700); }
.r-plan-body b small { font-size: 13px; color: var(--muted); }
.r-plan-body > small { display: block; color: var(--ink-2); }
.r-plan-body ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.r-plan-body li { display: flex; gap: 6px; align-items: center; } .r-plan-body li .icon { color: var(--brand-600); } .r-plan-body li.off { color: var(--muted); } .r-plan-body li.off .icon { color: var(--muted); }
.r-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.r-list > div:last-child { border-bottom: 0; }
.r-list small { display: block; color: var(--muted); font-size: 12px; }
.r-step-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.r-step-h h2 { font-size: 15px; }
.r-card.muted { opacity: .7; }
.job-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.job-head strong { font-size: 20px; color: var(--brand-700); } .job-head strong small { font-size: 12px; color: var(--muted); }
.r-main .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-main .cols-2 { grid-template-columns: minmax(0, 1fr); }
.r-main .panel { border-radius: 16px; }
.event-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.event-tile { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--ev, #111); color: #fff; }
.event-tile strong { display: block; } .event-tile span { font-size: 12.5px; opacity: .85; }
.pick-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 14px; }
.pick-row:has(input:checked) { background: var(--brand-50); }
.pick-row .grow { flex: 1; min-width: 0; }
.pick-row[hidden] { display: none; }
[data-for][hidden] { display: none; }

/* ---------- Marketplace (Jumia-style) ---------- */
body.mk { background: #F1F2F4; margin: 0; }
.mk-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.mk-topbar { background: var(--brand-900); color: #CFE0EE; font-size: 12.5px; }
.mk-topbar .mk-wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.mk-topbar span { display: inline-flex; align-items: center; gap: 6px; }
.mk-topbar-links { gap: 16px !important; }
.mk-topbar a { color: var(--gold); text-decoration: none; font-weight: 700; }
.mk-head { background: #fff; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 40; }
.mk-head .mk-wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.mk-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; flex: none; }
.mk-logo .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-size: 18px; }
.mk-logo b { color: var(--brand-600); }
.mk-logo.light { color: #fff; } .mk-logo.light b { color: var(--gold); }
.mk-search { flex: 1; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 0 0 12px; color: var(--muted); background: #fff; min-width: 0; }
.mk-search:focus-within { border-color: var(--brand-600); }
.mk-search input { flex: 1; min-width: 0; border: 0 !important; outline: 0; padding: 11px 0 !important; font: inherit; font-size: 15px; background: transparent; }
.mk-search button { border: 0; background: var(--brand-600); color: #fff; font: inherit; font-weight: 800; padding: 0 22px; align-self: stretch; border-radius: 0 8px 8px 0; cursor: pointer; }
.mk-actions { display: flex; gap: 18px; flex: none; }
.mk-actions a { position: relative; display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.mk-dot { position: absolute; top: -6px; left: 12px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 10.5px; display: grid; place-items: center; }
.mk-menu { background: var(--brand-700); }
.mk-menu .mk-wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mk-menu a, .mk-allcats > button { color: #fff; text-decoration: none; font-weight: 700; font-size: 13.5px; padding: 11px 12px; white-space: nowrap; border-radius: 0; }
.mk-menu a:hover, .mk-menu a.on { background: rgba(255,255,255,.12); }
.mk-menu a.mk-ev { background: var(--ev); box-shadow: inset 0 -3px 0 var(--gold); }
.mk-allcats { position: relative; flex: none; }
.mk-allcats > button { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.18); border: 0; cursor: pointer; font-family: inherit; }
.mk-catdrop { display: none; position: fixed; z-index: 60; margin-top: 0; width: 280px; background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 6px; }
.mk-allcats.open .mk-catdrop { display: block; }
.mk-catdrop a { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; padding: 8px 10px !important; border-radius: 8px; font-weight: 600 !important; }
.mk-catdrop a:hover { background: var(--brand-50) !important; }
.mk-catdrop .icon { color: var(--brand-600); }
.mk-main { padding: 16px 0 40px; min-height: 60vh; }
.mk-hero { display: grid; grid-template-columns: 230px minmax(0, 1fr) 230px; gap: 14px; margin-bottom: 14px; }
.mk-side-cats { background: #fff; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.mk-side-cats a { display: flex; align-items: center; gap: 9px; padding: 6.5px 10px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; border-radius: 8px; }
.mk-side-cats a:hover { background: var(--brand-50); color: var(--brand-700); }
.mk-side-cats .icon { color: var(--brand-600); flex: none; }
.mk-slider { position: relative; border-radius: 12px; overflow: hidden; min-height: 300px; }
.mk-slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mk-slides::-webkit-scrollbar, .mk-scroller::-webkit-scrollbar, .mk-menu .mk-wrap::-webkit-scrollbar { display: none; }
.mk-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 34px 40px; color: #fff; text-decoration: none;
  background: var(--ev, var(--ocean)); min-height: 300px; }
.mk-slide.deals { --ev: var(--brand-600); } .mk-slide.safe { --ev: var(--brand-700); } .mk-slide.sell { --ev: var(--ink); }
.mk-slide small { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--gold); }
.mk-slide strong { font-size: 38px; line-height: 1.05; letter-spacing: -0.03em; max-width: 520px; }
.mk-slide span { font-size: 16px; max-width: 460px; opacity: .9; }
.mk-slide em { font-style: normal; align-self: flex-start; margin-top: 8px; background: var(--gold); color: var(--ink); font-weight: 800; padding: 10px 18px; border-radius: 999px; font-size: 14px; }
.mk-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.mk-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,.5); padding: 0; cursor: pointer; }
.mk-dots button.on { width: 22px; background: #fff; }
.mk-side-tiles { display: flex; flex-direction: column; gap: 10px; }
.mk-side-tiles a { flex: 1; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 14px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.mk-side-tiles .icon { color: var(--brand-600); flex: none; }
.mk-side-tiles strong { display: block; font-size: 14px; } .mk-side-tiles small { color: var(--muted); font-size: 12.5px; }
.mk-cat-chips { display: none; }
.mk-row { background: #fff; border-radius: 12px; margin-bottom: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.mk-row-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.mk-row-head h2 { font-size: 17px; letter-spacing: -0.01em; flex: 1; }
.mk-row-head a { color: var(--brand-600); font-weight: 800; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.mk-row-head.colored { background: var(--row); color: #fff; border: 0; }
.mk-row-head.colored a { color: #fff; }
.mk-countdown { font-size: 13px; font-weight: 700; white-space: nowrap; }
.mk-countdown b { font-variant-numeric: tabular-nums; background: rgba(0,0,0,.2); padding: 2px 8px; border-radius: 6px; margin-left: 4px; }
.mk-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 10px; overflow-x: auto; padding: 12px 16px 16px; scroll-snap-type: x proximity; }
.mk-scroller > * { scroll-snap-align: start; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 12px 16px 16px; }
.mk-results .mk-grid { padding: 0; }
.mk-card { display: flex; flex-direction: column; background: #fff; border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; border: 1px solid transparent; }
.mk-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); border-color: var(--line); }
.mk-card.is-out { opacity: .65; }
.mk-img { position: relative; aspect-ratio: 1 / 1; background: var(--line-2); display: grid; place-items: center; color: #9CA3AF; }
.mk-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-off { position: absolute; top: 8px; right: 8px; background: var(--brand-50); color: var(--brand-600); font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 6px; }
.mk-ad { position: absolute; left: 8px; top: 8px; background: var(--gold); color: var(--ink); font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.mk-out { position: absolute; left: 8px; bottom: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.mk-card-body { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mk-name { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.mk-price { font-weight: 800; font-size: 16px; }
.mk-was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.mk-seller { font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-loc { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-near-cta { display: flex; align-items: center; gap: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.mk-near-cta .icon { color: var(--brand-600); flex: none; } .mk-near-cta span { flex: 1; } .mk-near-cta strong { display: block; } .mk-near-cta small { color: var(--ink-2); }
.mk-crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; } .mk-crumbs a { color: var(--brand-600); text-decoration: none; }
.mk-listing { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
.mk-filters { background: #fff; border-radius: 12px; padding: 14px; position: sticky; top: 84px; }
.mk-filters h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 8px; } .mk-filters h3:first-of-type { margin-top: 0; }
.mk-filter-cats { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.mk-filter-cats a { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.mk-filter-cats a small { color: var(--muted); } .mk-filter-cats a.on { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.mk-results { background: #fff; border-radius: 12px; padding: 14px; min-width: 0; }
.mk-results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mk-results-head h1 { font-size: 20px; } .mk-results-head h1 small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.mk-results-head select { width: auto; }
.mk-filter-toggle { display: none; }
.mk-deal-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 26px 28px; border-radius: 14px; background: var(--ev); color: #fff; margin-bottom: 12px; }
.mk-deal-hero small { text-transform: uppercase; font-weight: 800; letter-spacing: .08em; color: var(--gold); font-size: 12px; }
.mk-deal-hero h1 { font-size: 32px; letter-spacing: -0.03em; } .mk-deal-hero p { opacity: .9; }
.mk-countdown.big { font-size: 16px; } .mk-countdown.big b { font-size: 20px; }
.mk-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.mk-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13.5px; border: 1px solid var(--line); }
.mk-tabs a.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.mk-tabs + .mk-grid, .mk-deal-hero ~ .mk-grid { background: #fff; border-radius: 12px; }
.mk-page-h { font-size: 22px; margin-bottom: 12px; }
.mk-cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.mk-cat-list a { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 12px; text-decoration: none; color: var(--ink); }
.mk-cat-list a > span:nth-child(2) { flex: 1; min-width: 0; } .mk-cat-list strong { display: block; } .mk-cat-list small { color: var(--muted); font-size: 12.5px; }
.mk-cat-list b { color: var(--brand-600); font-size: 13px; }
.mk-narrow { max-width: 720px; }
.mk-order { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 14px; margin-top: 10px; text-decoration: none; color: var(--ink); }
.mk-order strong { display: block; } .mk-order small { color: var(--muted); }
.mk-foot { background: var(--ink); color: #D1D5DB; padding: 34px 0 20px; }
.mk-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.mk-foot-grid p { font-size: 13.5px; margin-top: 10px; max-width: 320px; }
.mk-foot-grid strong { display: block; color: #fff; margin-bottom: 8px; }
.mk-foot-grid a:not(.mk-logo) { display: block; color: #D1D5DB; text-decoration: none; font-size: 13.5px; padding: 3px 0; }
.mk-copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding-top: 14px; font-size: 12.5px; }
.mk-bottom { display: none; }
body.mk .empty { background: #fff; border-radius: 12px; }

@media (max-width: 1100px) {
  .mk-hero { grid-template-columns: 210px minmax(0, 1fr); }
  .mk-side-tiles { display: none; }
}
@media (max-width: 860px) {
  .mk-topbar, .mk-menu, .mk-side-cats { display: none; }
  .mk-head .mk-wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .mk-logo { font-size: 20px; }
  .mk-search { order: 3; flex: 1 0 100%; }
  .mk-search button { padding: 0 14px; }
  .mk-actions { margin-left: auto; gap: 14px; }
  .mk-actions span { display: none; }
  .mk-hero { grid-template-columns: minmax(0, 1fr); margin-top: -4px; }
  .mk-slider, .mk-slide { min-height: 190px; }
  .mk-slide { padding: 22px 20px 34px; }
  .mk-slide strong { font-size: 26px; } .mk-slide span { font-size: 14px; }
  .mk-cat-chips { display: grid; grid-auto-flow: column; grid-auto-columns: 78px; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
  .mk-cat-chips a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.2; }
  .mk-cat-chips a span { width: 54px; height: 54px; border-radius: 16px; background: #fff; display: grid; place-items: center; color: var(--brand-600); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
  .mk-scroller { grid-auto-columns: 148px; padding: 10px 12px 14px; }
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 12px 14px; gap: 8px; }
  .mk-row-head { padding: 10px 12px; } .mk-row-head h2 { font-size: 15px; }
  .mk-countdown { font-size: 11.5px; }
  .mk-listing { grid-template-columns: minmax(0, 1fr); }
  .mk-filters { display: none; position: static; } .mk-filters.open { display: block; }
  .mk-filter-toggle { display: block; margin: -4px 0 10px; } .mk-filter-toggle summary { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; list-style: none; }
  .mk-listing { display: flex; flex-direction: column-reverse; }
  .mk-results { padding: 12px; }
  .mk-deal-hero { padding: 20px; } .mk-deal-hero h1 { font-size: 24px; }
  .mk-foot-grid { grid-template-columns: 1fr 1fr; }
  .mk-bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
  .mk-bottom a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; }
  .mk-bottom a.on { color: var(--brand-600); }
  .mk-bottom .mk-dot { left: calc(50% + 4px); top: -4px; }
  body.mk { padding-bottom: 66px; }
}
@media (max-width: 380px) { .mk-scroller { grid-auto-columns: 138px; } .mk-price { font-size: 15px; } }
.pd-promo { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--brand-50); margin-bottom: 10px; }
.pd-promo > span { background: var(--brand-600); color: #fff; font-weight: 800; padding: 4px 9px; border-radius: 8px; }
.pd-promo strong { display: block; } .pd-promo small { color: var(--ink-2); }
.shop-img .mk-off { top: 8px; right: 8px; }
/* ---------- Chat ---------- */
.chat-page { max-width: 720px; } .chat-page.wide { max-width: 860px; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 0 0; border-bottom: 0; }
.chat-head strong { display: block; } .chat-head small { color: var(--muted); font-size: 12.5px; }
.chat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 0 0 14px 14px; overflow: hidden; }
.chat-page > .chat:first-child, .r-main .chat, .content .chat { border-radius: 14px; }
.chat-msgs { height: min(60vh, 520px); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #F3F4F6; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.msg b { display: block; font-size: 12px; color: var(--brand-700); }
.msg.rider b { color: #1E40AF; }
.msg p { margin: 0; font-size: 14px; }
.msg small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; text-align: right; }
.msg.mine { align-self: flex-end; background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.msg.mine small { color: rgba(255,255,255,.75); }
.msg.sys { align-self: center; background: var(--gold-50); border-color: #FFE2A8; font-size: 12.5px; max-width: 90%; text-align: center; }
.msg.sys small { text-align: center; }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; border-radius: 20px; padding: 10px 14px; max-height: 140px; }
.chat-form button { width: 44px; height: 44px; flex: none; border-radius: 999px; border: 0; background: var(--brand-600); color: #fff; display: grid; place-items: center; cursor: pointer; }
.inbox-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.inbox-row .grow { flex: 1; min-width: 0; } .inbox-row strong { display: block; } .inbox-row small { color: var(--muted); font-size: 12.5px; }
.inbox-row.unread { background: var(--brand-50); } .inbox-row.unread strong { color: var(--brand-700); }
.inbox-row .r-avatar { width: 38px; height: 38px; font-size: 15px; border: 0; }
.r-main .chat-msgs { height: calc(100vh - 290px); min-height: 280px; }
@media (max-width: 560px) { .chat-msgs { height: calc(100vh - 300px); min-height: 300px; } .msg { max-width: 88%; } }
.r-chat-link { display: flex; align-items: center; gap: 12px; }
.r-chat-link .icon { color: var(--brand-600); } .r-chat-link span:nth-child(2) { flex: 1; } .r-chat-link strong { display: block; } .r-chat-link small { color: var(--muted); }
.chat-start > summary { list-style: none; display: inline-flex; } .chat-start > summary::-webkit-details-marker { display: none; }
/* ---------- Camera barcode scanner ---------- */
.scan-modal { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(10,22,34,.92); padding: 20px; }
.scan-modal.open { display: flex; }
.scan-box { position: relative; width: min(92vw, 460px); aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #000; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 22% 10%; border: 3px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: var(--bad-fill); animation: scanline 1.6s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-38px); } 50% { transform: translateY(38px); } }
@media (prefers-reduced-motion: reduce) { .scan-frame i { animation: none; } }
.scan-status { color: #fff; font-weight: 600; text-align: center; max-width: 420px; }
.scan-close { padding: 11px 30px; border-radius: 999px; border: 0; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.input-scan { display: flex; gap: 8px; }
.input-scan input { flex: 1; min-width: 0; }
.scan-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--brand-600); background: var(--brand-50); color: var(--brand-700); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
@media (max-width: 420px) { .scan-btn span { display: none; } }
/* Anything marked hidden stays hidden, whatever its display style. */
[hidden] { display: none !important; }
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 12px; }
  .stat .value { font-size: 17px; overflow-wrap: anywhere; }
  .stat .label, .stat .note { font-size: 12px; }
  .page-head h1, .x-page-head h1 { font-size: 22px; }
  .table th, .table td { padding: 9px 10px; font-size: 13.5px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- Sign-in extras ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px !important; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--ink); background: var(--line-2); }
.pw-toggle.on { color: var(--brand-600); }
.pw-toggle.on::after { content: ""; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.btn-google:hover { background: var(--wash); }
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row label { margin: 0; }
/* ---------- Buyer area ---------- */
.by-head { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.by-head small { display: block; color: var(--muted); font-size: 12px; } .by-head strong { font-size: 17px; }
.by-head .r-avatar { border-color: var(--brand-100); }
.by-out { margin-left: auto; }
.by-tabs { margin-bottom: 14px; }
.by-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.by-stats div { background: #fff; border-radius: 12px; padding: 12px; }
.by-stats strong { display: block; font-size: 18px; overflow-wrap: anywhere; } .by-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.by-h { font-size: 16px; margin: 18px 0 4px; display: flex; justify-content: space-between; align-items: baseline; }
.by-order small { display: block; }
.r-tabs.three { grid-template-columns: repeat(3, 1fr); }
.r-cash { border-color: var(--warn); }
.r-cash-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.r-cash-row small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Design system layer (flat) ---------- */
.panel { border-radius: var(--r-card); box-shadow: var(--shadow); }
.btn { border-radius: var(--r-btn); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-accent { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn-accent:hover { background: #E86100; border-color: #E86100; }
.btn-ocean { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.btn-ocean:hover { background: var(--ocean-700); }
.badge { border-radius: var(--r-badge); }
.b-info { background: var(--ocean-50); color: var(--ocean); }
.b-accent { background: var(--orange); color: var(--ink); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=url], input[type=datetime-local], select, textarea { border-radius: var(--r-input); }
.stats { gap: 16px; background: none; border: 0; border-radius: 0; overflow: visible; }
.stat { border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.nav a.active { box-shadow: inset 4px 0 0 var(--orange); }
.mk-menu, .r-top { background: var(--ocean-700); }
.elevated { box-shadow: var(--shadow-up); }
.price, .shop-price { color: var(--brand-600); }
.sponsored-tag { display: inline-block; padding: 1px 6px; border-radius: var(--r-badge); background: var(--gold-50); color: var(--warn); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.verified { display: inline-flex; align-items: center; gap: 3px; color: var(--ocean); font-weight: 700; font-size: 12px; }
.stars { color: var(--gold-600); letter-spacing: 1px; white-space: nowrap; }
.stars-off { color: #D1D5DB; }

/* ---------- Marketplace v2: segmented home (flat) ---------- */
body.mk { background: var(--wash); }
.mk-top { background: var(--ocean); position: sticky; top: 0; z-index: 40; }
.mk-top-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.mk-top .mk-logo { color: #fff; }
.mk-top .mk-search { border: 0; border-radius: var(--r-input); height: 44px; }
.mk-top .mk-search button { border-radius: 0 var(--r-input) var(--r-input) 0; }
.mk-top .mk-actions a { color: #fff; }
.mk-top .mk-actions a span { font-size: 13px; }
.mk-top .mk-dot { background: var(--orange); color: var(--ink); }
.mk-locsel { position: relative; flex: none; }
.mk-locsel summary { list-style: none; display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 6px 10px; border-radius: var(--r-btn); max-width: 170px; }
.mk-locsel summary::-webkit-details-marker { display: none; }
.mk-locsel summary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-locsel summary:hover, .mk-locsel[open] summary { background: rgba(255,255,255,.10); }
.mk-locpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 70; width: 270px; background: #fff; color: var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow-up); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mk-locpop form { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mk-menu { background: var(--ocean-700); }
.mk-menu a.mk-ev { background: transparent; box-shadow: inset 0 -3px 0 var(--orange); }
.mk-main { padding: 0 0 32px; }
.mk-main > .mk-wrap:first-child, .mk-main > .mk-wrap > .flash { margin-top: 16px; }

.mseg { background: #fff; padding: 20px 0; margin-bottom: 16px; }
.seg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.seg-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.seg-head > a { color: var(--brand-600); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.seg-pill { background: #fff; color: var(--ink) !important; padding: 6px 14px; border-radius: 999px; font-weight: 800 !important; font-size: 13px !important; text-decoration: none; }
.seg-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--wash); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.seg-amber { background: var(--gold); padding: 16px 0; }
.seg-red { background: var(--bad-fill); color: #fff; }
.seg-red .seg-head h2 { color: #fff; }
.seg-soft { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.seg-amber-50 { background: var(--gold-50); }
.seg-ocean { background: var(--ocean); color: #fff; }
.seg-ocean .seg-head h2 { color: #fff; }
.seg-green { background: var(--ok); color: #fff; }
.seg-green .seg-head h2 { color: #fff; }
.mk-countdown { color: inherit; }
.seg-red .mk-countdown b { background: rgba(0,0,0,.28); color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mk-countdown.dark b { background: var(--ink); color: #fff; }

.seg-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
.seg-amber .mk-slider { border-radius: var(--r-card); min-height: 0; }
.seg-amber .mk-slide { min-height: 220px; background: var(--ocean); padding: 0; position: relative; flex-direction: row; align-items: stretch; }
.seg-amber .mk-slide:nth-child(3n+2) { background: var(--ink); }
.seg-amber .mk-slide:nth-child(3n+3) { background: #7A2E00; }
.mk-slide.has-img { background: var(--ink); }
.mk-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.mk-slide-text { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 26px 32px 34px; max-width: 620px; }
.mk-slide-text strong { font-size: 32px; line-height: 1.08; letter-spacing: -0.02em; }
.mk-slide-text > span { font-size: 15px; opacity: .92; }
.mk-slide-text em { background: var(--brand-600); color: #fff; border-radius: var(--r-btn); align-self: flex-start; margin-top: 8px; font-style: normal; font-weight: 800; padding: 10px 18px; font-size: 14px; }
.mk-slide-text .sponsored-tag { align-self: flex-start; }
.seg-amber .mk-side-tiles a { box-shadow: none; border-radius: var(--r-card); }
.seg-amber .mk-side-tiles .icon { color: var(--brand-600); }

.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cat-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--wash); border-radius: var(--r-card); padding: 16px 8px 14px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; border: 1px solid transparent; }
.cat-grid a:hover { border-color: var(--brand-200); background: #fff; }
.cat-grid a span { width: 48px; height: 48px; display: grid; place-items: center; color: var(--ink); }

.mk-scroller.tight { padding: 0 0 4px; grid-auto-columns: 160px; }
.mk-scroller.wide { padding: 0 0 4px; grid-auto-columns: 220px; }
.mk-scroller.two-rows { padding: 0 0 4px; grid-auto-flow: column; grid-template-rows: auto auto; grid-auto-columns: 160px; }
.mk-scroller.sellers { padding: 0 0 4px; grid-auto-columns: 150px; }
.mseg .mk-grid { padding: 0; }
.mk-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mk-card { border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; }
.mk-card:hover { box-shadow: var(--shadow-up); transform: none; }
.mk-price { color: var(--brand-600); }
.mk-off { background: var(--gold); color: var(--ink); border-radius: var(--r-badge); }
.mk-ad { background: var(--gold); color: var(--ink); border-radius: var(--r-badge); }
.mk-rate { font-size: 12px; color: var(--ink-2); font-weight: 600; } .mk-rate > span:last-child { color: var(--muted); font-weight: 500; }
.mk-seller .icon { color: var(--ocean); vertical-align: -2px; }

.why-ad { position: relative; font-size: 13px; }
.why-ad summary { cursor: pointer; color: var(--ocean); font-weight: 700; list-style: none; text-decoration: underline; }
.why-ad summary::-webkit-details-marker { display: none; }
.why-ad p { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-up); padding: 12px; color: var(--ink-2); }

.ws-card { background: #fff; color: var(--ink); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.ws-card .mk-img { aspect-ratio: 4 / 3; }
.ws-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.ws-body .mk-name { color: var(--ink); text-decoration: none; min-height: 0; }
.ws-min { font-size: 12px; font-weight: 700; color: var(--ocean); background: var(--ocean-50); border-radius: var(--r-badge); padding: 2px 6px; align-self: flex-start; }
.ws-body .mk-price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.ws-body .btn { margin-top: 6px; }

.seller-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 10px 10px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.seller-link { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); min-width: 0; }
.seller-link strong { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seller-logo { width: 64px; height: 64px; border-radius: 50%; background: var(--ocean); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 24px; overflow: hidden; margin-bottom: 4px; }
.seller-logo img { width: 100%; height: 100%; object-fit: cover; }
.verified.ok { color: var(--ok); }
.seller-card form { margin: 0; }
.btn-outline { background: #fff; color: var(--brand-600); border-color: var(--brand-600); }
.btn-outline:hover { background: var(--brand-50); }
.sellers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }

.coupon { background: #fff; color: var(--ink); border-radius: var(--r-card); padding: 14px; display: flex; flex-direction: column; gap: 6px; border: 2px dashed #A6EBC6; }
.coupon-val { font-size: 24px; font-weight: 800; color: var(--brand-600); letter-spacing: -0.02em; }
.coupon a { color: var(--ocean); font-weight: 700; text-decoration: none; }
.coupon-code { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--wash); border-radius: var(--r-btn); padding: 4px 4px 4px 10px; }
.coupon-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 15px; letter-spacing: .06em; }

.trend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.trend-grid a { background: var(--wash); border-radius: 999px; padding: 9px 14px; font-size: 14px; color: var(--ink); text-decoration: none; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--line); }
.trend-grid a:hover { border-color: var(--brand-600); color: var(--brand-600); }

.mk-foot { background: var(--ocean); color: var(--ocean-100); }
.mk-foot-grid a:not(.mk-logo) { color: var(--ocean-100); }
.mk-foot-grid a:not(.mk-logo):hover { color: #fff; }
.mk-copy { font-size: 12px; color: #fff; border-top-color: rgba(255,255,255,.15); }
.mk-social { display: flex; gap: 8px; margin-top: 14px; }
.mk-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid !important; place-items: center; color: #fff !important; padding: 0 !important; }

.cart-store { margin-bottom: 16px; }
.cart-store h2 a { color: var(--ink); text-decoration: none; }
.cart-store-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.empty .icon { color: var(--muted); display: block; margin: 0 auto 10px; }

.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--brand-50); }
.notif.unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-left: 6px; vertical-align: 2px; }
.notif small { display: block; color: var(--ink-2); font-size: 13px; }
.notif-ico { width: 36px; height: 36px; border-radius: 50%; background: var(--ocean-50); color: var(--ocean); display: grid; place-items: center; flex: none; }
.notif .grow { flex: 1; min-width: 0; }

@media (max-width: 1000px) {
  .seg-hero { grid-template-columns: minmax(0, 1fr); }
  .seg-hero .mk-side-tiles { display: none; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .mk-top-row { flex-wrap: wrap; gap: 8px 10px; padding-top: 8px; padding-bottom: 10px; min-height: 56px; }
  .mk-top .mk-search { order: 5; flex: 1 0 100%; height: 48px; }
  .mk-locsel { order: 2; margin-right: auto; }
  .mk-locsel summary { max-width: 130px; padding: 4px 6px; font-size: 13px; }
  .mk-top .mk-actions { order: 3; gap: 16px; margin-left: 0; }
  .mk-top .mk-actions a span, .mk-hide-sm { display: none !important; }
  .mk-locpop { left: -60px; }
  .mseg { padding: 16px 0; margin-bottom: 12px; }
  .seg-amber { padding: 12px 0; }
  .seg-amber .mk-slide { min-height: 160px; }
  .mk-slide-text { padding: 16px 18px 28px; }
  .mk-slide-text strong { font-size: 22px; } .mk-slide-text > span { font-size: 13px; }
  .mk-slide-text em { padding: 8px 14px; font-size: 13px; }
  .seg-head h2 { font-size: 18px; }
  .cat-grid { gap: 8px; }
  .cat-grid a { font-size: 12px; padding: 10px 4px; gap: 4px; }
  .cat-grid a span { width: 40px; height: 40px; }
  .mk-scroller.tight, .mk-scroller.two-rows { grid-auto-columns: 150px; }
  .mk-scroller.wide { grid-auto-columns: 200px; }
  .mk-scroller.sellers { grid-auto-columns: 130px; }
  .trend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .trend-grid a { font-size: 13px; padding: 8px 10px; }
  .why-ad p { right: auto; left: -120px; width: 260px; }
}
.rv-score { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.rv-score > strong { font-size: 44px; line-height: 1; font-weight: 800; }
.stars.big { font-size: 22px; }
.rv-bar { display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.rv-bar b { text-align: right; }
.meter { display: block; height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.rv-item { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.rv-item:last-child { border-bottom: 0; }
.rv-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.rv-item p { margin: 4px 0 8px; color: var(--ink-2); }
.rv-reply { background: var(--wash); border-left: 3px solid var(--ocean); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13.5px; }
.rv-reply b { display: block; font-size: 12px; color: var(--ocean); }
.rv-form { display: flex; gap: 8px; margin: 0; } .rv-form input { flex: 1; }
.inline-edit { position: relative; } .inline-edit summary { list-style: none; cursor: pointer; }
.inline-edit[open] > form { position: absolute; right: 0; top: 24px; z-index: 20; width: min(560px, 90vw); text-align: left; box-shadow: var(--shadow-up); }
.coupon-row { display: flex; gap: 8px; } .coupon-row input { flex: 1; text-transform: uppercase; }
.rate-item { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.rate-item:last-of-type { border-bottom: 0; margin-bottom: 10px; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label { font-size: 30px; line-height: 1; color: #D1D5DB; cursor: pointer; padding: 0 2px; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: var(--gold-600); }
.rate-stars input:focus-visible + label { outline: 2px solid var(--brand-500); border-radius: 4px; }
.mk-main > .mseg > .mk-wrap, .mk-main > .mk-wrap { width: 100%; box-sizing: border-box; }
/* ---------- Product page ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pd-main { position: relative; background: #fff; border: 1px solid var(--line); }
.pd-slides { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slides > img, .pd-noimg { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.pd-noimg { display: grid; place-items: center; color: #9CA3AF; background: var(--line-2); }
.pd-float { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); padding: 0; }
.pd-float.on { color: var(--bad-fill); } .pd-float.on svg { fill: currentColor; }
.pd-back { position: absolute; top: 12px; left: 12px; z-index: 2; } .pd-back svg { transform: rotate(180deg); }
.pd-float-r { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 8px; } .pd-float-r form { margin: 0; }
.pd-thumbs { overflow-x: auto; scrollbar-width: none; }
.pd-thumbs button { flex: none; } .pd-thumbs button.on { border: 2px solid var(--brand-600); }
.pd-info h1 { font-size: 24px; margin: 0 0 6px; }
.pd-rate { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.pd-price strong { font-size: 30px; font-weight: 800; color: var(--brand-600); letter-spacing: -0.02em; }
.pd-price s { color: var(--muted); font-size: 16px; }
.pd-price small { color: var(--muted); font-size: 14px; }
.pd-off { background: var(--gold); color: var(--ink); font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: var(--r-badge); }
.pd-stock { display: flex; align-items: center; gap: 4px; }
.pd-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-lg { padding: 13px 18px; font-size: 15px; }
.pd-seller { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--wash); border-radius: var(--r-card); padding: 14px; margin-top: 18px; }
.pd-seller .grow { flex: 1; min-width: 160px; }
.seller-logo.sm { width: 48px; height: 48px; font-size: 18px; margin: 0; flex: none; }
.pd-seller-btns { display: flex; gap: 8px; }
.chat-start[open] { margin-top: 10px; }
.pd-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
.pd-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; margin-bottom: 16px; }
.pd-sec h3 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.pd-sec.soft { background: var(--wash); }
.pd-sec.amber { background: var(--gold-50); border-color: #FFE2A8; }
.pd-sec .mk-grid, .pd-sec .mk-scroller { padding: 0; }
.tier-table tr.best td { background: var(--gold-50); font-weight: 700; }
.pd-desc { font-size: 16px; color: var(--ink); line-height: 1.6; margin: 0; padding: 0; border: 0; }
.pd-desc.clamp { max-height: 7.6em; overflow: hidden; }
.spec-table { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--r-btn); overflow: hidden; background: #fff; }
.spec-table dt, .spec-table dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.spec-table dt { color: var(--muted); font-weight: 600; background: #FBFAF8; }
.deliv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.deliv li { display: flex; gap: 12px; align-items: flex-start; } .deliv .icon { color: var(--ocean); margin-top: 2px; }
.deliv strong { display: block; } .deliv small { color: var(--ink-2); font-size: 13.5px; }
.rv-sum { display: flex; gap: 24px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; } .rv-sum .grow { flex: 1; min-width: 200px; }
.meter.orange i { background: var(--orange); }
.rv-av { width: 30px; height: 30px; border-radius: 50%; background: var(--ocean-50); color: var(--ocean); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.pd-sec .rv-item { padding: 12px 0; }
.pd-sticky { display: none; }
@media (max-width: 760px) {
  .pd-price strong { font-size: 26px; }
  .pd-sticky { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .pd-sticky .btn { min-height: 48px; }
  body.shop { padding-bottom: 76px; }
  .pd-ctas { display: none; }
  .pd-seller-btns { width: 100%; } .pd-seller-btns .btn { flex: 1; }
  .spec-table { grid-template-columns: 120px minmax(0, 1fr); }
}
.line-chart { position: relative; }
.line-chart svg { width: 100%; height: 200px; display: block; }
.line-chart .grid { stroke: var(--line-2); stroke-width: 1; }
.line-chart .ln { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .pt { fill: #fff; stroke: var(--orange); stroke-width: 2; }
.line-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.line-labels span { flex: 1; text-align: center; white-space: nowrap; }
.line-max { position: absolute; top: 0; right: 0; }
.k-orange { color: var(--brand-600); } .k-ocean { color: var(--ocean); } .k-amber { color: var(--warn); } .k-red { color: var(--bad); }
.stats.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 20px; }
.ai-card { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.ai-card .panel-head { border-bottom-color: rgba(255,255,255,.15); }
.ai-card .panel-head h2 { display: flex; align-items: center; gap: 6px; }
.ai-card .panel-head a { color: var(--gold); font-weight: 700; text-decoration: none; }
.ai-line { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.ai-line:last-child { border-bottom: 0; }
.ai-line .icon { color: var(--gold); margin-top: 3px; }
.ai-line small { display: block; color: var(--ocean-100); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.tp-name { display: flex; align-items: center; gap: 10px; }
.tp-thumb { width: 36px; height: 36px; border-radius: 8px; background: var(--line-2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--muted); }
.tp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-link { cursor: pointer; } .row-link a { color: inherit; text-decoration: none; }
.content { background: var(--wash); }
.main { background: var(--wash); }
.nav a { opacity: .78; } .nav a.active, .nav a:hover { opacity: 1; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ins-card { padding: 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ins-card small { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); font-size: 11.5px; }
.ins-card h3 { font-size: 17px; font-weight: 800; line-height: 1.3; }
.ins-card p { color: var(--ink-2); font-size: 14px; flex: 1; margin-bottom: 6px; }
.ins-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px; }
.ins-trend { background: var(--ocean-50); color: var(--ocean); } .ins-forecast { background: var(--ok-bg); color: var(--ok); }
.ins-dead { background: var(--bad-bg); color: var(--bad); } .ins-pricing { background: var(--gold-50); color: var(--warn); }
.set-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.set-links a { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.set-links a:hover { border-color: var(--brand-200); }
.set-links .icon { color: var(--brand-600); flex: none; } .set-links strong { display: block; } .set-links small { color: var(--muted); font-size: 12.5px; }
.mb { margin-bottom: 12px; }
.topbar { height: 64px; }
.bell { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none; }
.bell:hover { background: var(--wash); }
.bell b { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 10.5px; display: grid; place-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ocean); color: #fff; display: grid; place-items: center; font-weight: 800; text-decoration: none; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.price-range > div { display: flex; gap: 6px; } .price-range input { width: 100px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; margin: 0; }
.bulk-bar select { width: auto; min-width: 180px; }
.b-proc { background: var(--brand-50); color: var(--brand-700); }
.hbar { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 10px; }
.hbar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.meter.ocean { height: 12px; border-radius: 4px; } .meter.ocean i { background: var(--ocean); border-radius: 4px; }
.pie-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pie { width: 160px; height: 160px; transform: rotate(0deg); flex: none; }
.pie-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; flex: 1; min-width: 160px; }
.pie-legend li { display: flex; align-items: center; gap: 8px; } .pie-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; } .pie-legend b { margin-left: auto; }
.plan-now { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.plan-now .panel-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; height: 100%; }
.plan-now small { color: var(--ocean-100); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: 11.5px; }
.plan-now strong { font-size: 30px; font-weight: 800; } .plan-now span { color: var(--ocean-100); margin-bottom: 8px; }
.usage { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 12px; font-size: 13.5px; }
.usage .meter, .usage small { grid-column: 1 / -1; }
.usage .meter i { background: var(--ocean); } .usage .meter.full i { background: var(--bad-fill); }
/* ---------- Rider app additions ---------- */
.r-body { background: var(--wash); }
.r-btn { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-btn); }
.r-btn.ok { background: var(--ok); }
.r-btn.small { display: inline-flex; width: auto; padding: 9px 16px; font-size: 14px; }
.r-map { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; background: var(--line-2); }
.r-map iframe { display: block; width: 100%; height: 220px; border: 0; }
.r-earn { display: flex; flex-direction: column; gap: 4px; }
.r-earn small { color: var(--muted); font-weight: 600; }
.r-earn > strong { font-size: 34px; font-weight: 800; color: var(--brand-600); letter-spacing: -0.02em; }
.r-earn > span { color: var(--ink-2); font-size: 13.5px; }
.r-earn-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 8px; font-size: 13.5px; }
.r-earn-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.r-earn-row small { display: block; color: var(--muted); font-size: 12.5px; } .r-earn-row .right { text-align: right; } .r-earn-row b { color: var(--brand-600); }
.r-doc { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; } .r-doc > span:first-child { flex: 1; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.r-filter .form-grid { grid-template-columns: 1fr 1fr; gap: 0 10px; }
.r-rating-line { margin: 0 4px 10px; }
.r-switch.on { background: var(--orange); color: var(--ink); }
/* ---------- Ads Manager ---------- */
.ads-nav { margin-bottom: 16px; }
.k-green { color: var(--ok); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.quick-actions a { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.quick-actions a:hover { border-color: var(--brand-600); } .quick-actions .icon { color: var(--brand-600); } .quick-actions strong { display: block; } .quick-actions small { color: var(--muted); }
.wiz-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; overflow-x: auto; }
.wiz-steps li { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-btn); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.wiz-steps li span { width: 24px; height: 24px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-weight: 800; flex: none; }
.wiz-steps li.on { border-color: var(--brand-600); color: var(--ink); } .wiz-steps li.on span { background: var(--brand-600); color: #fff; }
.wiz-steps li.done span { background: var(--ok); color: #fff; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 12px; }
.obj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.obj input { position: absolute; opacity: 0; }
.obj > span { display: flex; flex-direction: column; gap: 4px; height: 100%; border: 2px solid var(--line); border-radius: var(--r-card); padding: 14px; cursor: pointer; }
.obj > span .icon { color: var(--ocean); } .obj small { color: var(--muted); font-size: 12.5px; } .obj em { font-style: normal; font-weight: 700; color: var(--brand-600); font-size: 13px; margin-top: auto; }
.obj input:checked + span { border-color: var(--brand-600); background: var(--brand-50); }
.obj input:focus-visible + span { outline: 2px solid var(--brand-500); }
.ad-preview { position: relative; background: var(--ocean); color: #fff; border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; min-height: 140px; justify-content: center; }
.ad-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.ad-preview > * { position: relative; } .ad-preview strong { font-size: 22px; } .ad-preview em { font-style: normal; background: var(--brand-600); align-self: flex-start; padding: 8px 14px; border-radius: var(--r-btn); font-weight: 800; margin-top: 6px; }
.ad-preview .sponsored-tag { align-self: flex-start; }
.ad-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .ad-actions form { margin: 0; }
.sellers-grid.one { grid-template-columns: 180px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.slot { overflow: hidden; } .slot .panel-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.slot-preview { height: 110px; display: grid; place-items: center; font-weight: 800; color: var(--ink); background: var(--gold); }
.slot-preview.category_top { background: var(--ocean-50); color: var(--ocean); } .slot-preview.featured { background: var(--wash); }
.slot-preview span { background: #fff; padding: 6px 12px; border-radius: var(--r-btn); box-shadow: var(--shadow); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal b { font-size: 12px; color: var(--muted); text-align: center; }
.cal span { border-radius: var(--r-btn); padding: 8px 4px; text-align: center; font-weight: 700; font-size: 14px; border: 1px solid var(--line); }
.cal span small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.cal .open { background: var(--ok-bg); border-color: #A6EBC6; } .cal .some { background: var(--gold-50); border-color: #FFE2A8; } .cal .full { background: var(--bad-bg); border-color: #F5B5B7; } .cal .blank { border: 0; }
.legend-inline { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.legend-inline i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend-inline .open { background: var(--ok-bg); border: 1px solid #A6EBC6; } .legend-inline .some { background: var(--gold-50); border: 1px solid #FFE2A8; } .legend-inline .full { background: var(--bad-bg); border: 1px solid #F5B5B7; }
.saved-card { display: flex; align-items: center; gap: 8px; font-weight: 700; background: var(--wash); border-radius: var(--r-btn); padding: 10px 12px; }
@media (max-width: 600px) { .cal span { padding: 6px 2px; font-size: 12px; } .cal span small { display: none; } }
.slot-grid > .panel, .ins-grid > .panel { margin-top: 0; }
.cat-banner { text-decoration: none; margin-bottom: 14px; min-height: 120px; }
.page-head .inline-form { flex-wrap: wrap; }
@media (max-width: 600px) { .page-head .inline-form input[type=date] { width: 100%; flex: 1 1 140px; } .tier-table th, .tier-table td { padding: 8px; font-size: 13px; } }

/* ---------- Marketplace v3: one-line segments, carousel, category drop-down ---------- */
.seg-more { display: inline-flex; align-items: center; gap: 2px; color: var(--brand-600); font-weight: 700; font-size: 14px; text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.seg-more.open .icon { transform: rotate(90deg); }
.seg-more .icon, .seg-pill .icon { transition: transform .15s; }
.seg-pill { display: inline-flex; align-items: center; gap: 2px; }
button.seg-chip { cursor: pointer; font-family: inherit; }
.seg-head h2 .icon { flex: none; }

.row-wrap { position: relative; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
.row-scroll.wide { grid-auto-columns: 220px; }
.row-scroll.sellers { grid-auto-columns: 150px; }
.row-scroll.chips { grid-auto-columns: max-content; gap: 8px; }
.row-scroll.chips a { background: var(--wash); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.row-scroll.chips a:hover { border-color: var(--brand-600); color: var(--brand-600); }
.row-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-up); }
.row-arrow.prev { left: -14px; } .row-arrow.prev svg { transform: rotate(180deg); }
.row-arrow.next { right: -14px; }
.row-arrow[hidden] { display: none; }

.cat-head { margin-bottom: 12px; }
.cat-wrap { position: relative; }
.cat-row { grid-auto-columns: 132px; }
.cat-row a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--wash); border-radius: var(--r-card); padding: 16px 8px 14px; text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.25; border: 1px solid transparent; min-height: 118px; }
.cat-row a:hover { border-color: var(--brand-200); background: #fff; }
.cat-row a span { width: 48px; height: 48px; display: grid; place-items: center; }
.cat-drop { position: absolute; top: 0; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-up); padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px; max-height: 70vh; overflow-y: auto; }
.cat-drop[hidden] { display: none; }
.cat-drop a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-btn); color: var(--ink); text-decoration: none; }
.cat-drop a:hover { background: var(--brand-50); }
.cat-drop .icon { color: var(--brand-600); flex: none; }
.cat-drop span { flex: 1; min-width: 0; } .cat-drop strong { display: block; font-size: 14px; } .cat-drop small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-drop b { font-size: 12px; color: var(--muted); }

.row-empty { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--ink); border: 1px dashed var(--line); border-radius: var(--r-card); padding: 16px 18px; flex-wrap: wrap; }
.row-empty-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--wash); display: grid; place-items: center; color: var(--brand-600); flex: none; }
.row-empty .grow { flex: 1; min-width: 200px; } .row-empty strong { display: block; } .row-empty small { color: var(--ink-2); font-size: 13.5px; }

.carousel { position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--ocean); min-width: 0; }
.car-track { display: flex; transition: transform .5s ease; }
.car-slide { flex: 0 0 100%; min-height: 230px; position: relative; display: flex; align-items: center; color: #fff; text-decoration: none; background: var(--ocean); }
.car-slide:nth-child(3n+2) { background: var(--ink); } .car-slide:nth-child(3n+3) { background: #7A2E00; }
.car-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.car-text { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 64px 40px; max-width: 680px; }
.car-text small { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--gold); }
.car-text strong { font-size: 32px; line-height: 1.08; letter-spacing: -0.02em; }
.car-text > span { font-size: 15px; opacity: .92; }
.car-text em { font-style: normal; align-self: flex-start; margin-top: 8px; background: var(--brand-600); color: #fff; border-radius: var(--r-btn); font-weight: 800; padding: 10px 18px; font-size: 14px; }
.car-text .sponsored-tag { align-self: flex-start; color: var(--warn); }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.car-arrow.prev { left: 12px; } .car-arrow.prev svg { transform: rotate(180deg); } .car-arrow.next { right: 12px; }
.car-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.car-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,.55); padding: 0; cursor: pointer; transition: width .2s; }
.car-dots button.on { width: 24px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .car-track { transition: none; } }
@media (max-width: 860px) {
  .row-scroll { grid-auto-columns: 148px; gap: 10px; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
  .row-scroll.wide { grid-auto-columns: 200px; } .row-scroll.sellers { grid-auto-columns: 132px; }
  .row-arrow { display: none; }
  .cat-row { grid-auto-columns: 92px; }
  .cat-row a { font-size: 11.5px; padding: 10px 4px; min-height: 96px; gap: 4px; }
  .cat-row a span { width: 40px; height: 40px; }
  .cat-drop { grid-template-columns: 1fr; position: absolute; }
  .car-slide { min-height: 170px; }
  .car-text { padding: 16px 18px 32px; }
  .car-text strong { font-size: 22px; } .car-text > span { font-size: 13px; }
  .car-text em { padding: 8px 14px; font-size: 13px; }
  .car-arrow { display: none; }
  .seg-head { flex-wrap: nowrap; } .seg-head h2 { font-size: 17px; }
  .seg-head .mk-countdown { font-size: 11.5px; }
  .why-ad summary { font-size: 12px; }
}

/* ---------- Back buttons and home links on every page ---------- */
.back-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 10px 6px 6px; border-radius: var(--r-btn); white-space: nowrap; }
.back-btn .icon { transform: rotate(180deg); }
.back-btn:hover { background: var(--line-2); }
.back-btn.light { color: #fff; } .back-btn.light:hover { background: rgba(255,255,255,.12); }
.page-back { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px !important; margin-bottom: -4px; }
.page-back-home { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--brand-600); text-decoration: none; }
.jb-bar { background: var(--ocean); color: #fff; }
.jb-bar .shop-wrap { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.jb-bar-home { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 13.5px; }
.jb-bar-home .mark { width: 24px; height: 24px; border-radius: 6px; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.jb-bar-links { margin-left: auto; display: flex; gap: 16px; }
.jb-bar-links a { position: relative; display: inline-flex; align-items: center; gap: 5px; color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.jb-bar-links b { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 10.5px; display: grid; place-items: center; }
.shop-head { top: 0; }
.bare-bar { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.bare-bar > * { pointer-events: auto; background: #fff; box-shadow: var(--shadow); }
.bare-home { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--r-btn); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13.5px; }
body.site { position: relative; }
.topbar-back { margin-right: 4px; }
.r-back.back-btn { font-size: 14px; padding: 4px 8px 4px 2px; margin-left: -6px; }
.r-back.back-btn span { display: none; }
@media (max-width: 860px) {
  body.shop .mk-bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
  body.shop { padding-bottom: 70px; }
  body.shop .pd-sticky { bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.shop:has(.pd-sticky) { padding-bottom: 136px; }
  .jb-bar-links span, .jb-bar-home { display: none; }
  .jb-bar-links { gap: 18px; }
  .topbar-back span { display: none; }
  .topbar-back { padding: 6px; }
  .page-back { margin-top: 8px !important; }
}
@media (min-width: 861px) { body.shop .mk-bottom { display: none; } }
.bare-bar ~ .auth .auth-art { padding-top: 64px; }

/* ---------- Info icons ---------- */
.info { position: relative; display: inline-flex; vertical-align: middle; margin-left: 4px; }
.info-btn { width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--brand-600); background: var(--brand-50); }
.info-pop { position: absolute; top: calc(100% + 6px); left: -8px; z-index: 80; width: max-content; max-width: min(300px, 80vw); background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.45; padding: 10px 12px; border-radius: var(--r-btn); box-shadow: var(--shadow-up); text-transform: none; letter-spacing: 0; text-align: left; white-space: normal; }
.info-pop.left { left: auto; right: -8px; }
.info-pop a { color: var(--gold); }
.more { position: relative; display: inline-flex; margin: 2px 0 8px; }
.more-btn { width: auto; height: auto; border-radius: var(--r-btn); padding: 3px 8px 3px 4px; gap: 5px; display: inline-flex; align-items: center; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); }
p.more-line { margin: 0; }
.brand-logo { height: 34px; width: auto; max-width: 160px; object-fit: contain; display: block; }

/* ---------- Blog ---------- */
.blog { padding-bottom: 20px; }
.blog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.blog-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.blog-search { display: flex; gap: 6px; } .blog-search input { width: min(320px, 70vw); }
.blog-cats { margin-bottom: 16px; } .row-scroll.chips a.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.post-lead { display: grid; grid-template-columns: 1.2fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); margin-bottom: 16px; }
.post-img { display: block; background: var(--line-2); aspect-ratio: 16 / 9; overflow: hidden; }
.post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.post-body small { color: var(--brand-600); font-weight: 700; text-transform: uppercase; font-size: 11.5px; letter-spacing: .05em; }
.post-body strong { font-size: 17px; line-height: 1.3; }
.post-lead .post-body strong { font-size: 24px; } .post-lead .post-body { padding: 22px; justify-content: center; }
.post-body > span { color: var(--ink-2); font-size: 14px; }
.post-body em { font-style: normal; color: var(--muted); font-size: 12.5px; margin-top: auto; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); }
.post-card:hover, .post-lead:hover { box-shadow: var(--shadow-up); }
.blog-side ol { margin: 0; padding: 12px 18px 16px 36px; display: flex; flex-direction: column; gap: 10px; }
.blog-side a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.post { max-width: 860px; }
.post-head h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; margin: 6px 0 8px; }
.post-meta { color: var(--muted); font-size: 14px; }
.post-cover { margin: 18px 0; border-radius: var(--r-card); overflow: hidden; } .post-cover img { width: 100%; display: block; }
.post-toc { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 16px; margin-bottom: 16px; }
.post-toc summary { font-weight: 800; cursor: pointer; } .post-toc ol { margin: 8px 0 0; padding-left: 18px; } .post-toc li.l3 { margin-left: 14px; }
.post-toc a { color: var(--ink-2); text-decoration: none; }
.post-body-html { font-size: 17px; line-height: 1.75; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.prose h2 { font-size: 24px; margin: 28px 0 10px; color: var(--ink); } .prose h3 { font-size: 19px; margin: 22px 0 8px; }
.prose p { margin: 0 0 16px; } .prose img { max-width: 100%; height: auto; border-radius: var(--r-btn); }
.prose a { color: var(--brand-600); } .prose blockquote { border-left: 4px solid var(--orange); margin: 16px 0; padding: 6px 16px; background: var(--wash); }
.prose iframe, .prose video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-btn); display: block; margin: 12px 0; background: #000; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; } .prose table { width: 100%; border-collapse: collapse; margin: 12px 0; } .prose th, .prose td { border: 1px solid var(--line); padding: 8px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; } .post-tags a { color: var(--ocean); font-weight: 600; text-decoration: none; }
.post-share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 20px; } .post-share > span { font-weight: 700; }
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); } .post-lead { grid-template-columns: 1fr; }
  .post-head h1 { font-size: 26px; } .post-body-html { padding: 16px; font-size: 16px; }
}
.faq-page { max-width: 900px; }
.faq-group { margin-bottom: 20px; } .faq-group h2 { font-size: 18px; font-weight: 800; margin: 18px 0 10px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 8px; overflow: hidden; }
.faq summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary > span:first-child { flex: 1; }
.faq summary .icon { transform: rotate(90deg); transition: transform .15s; color: var(--muted); flex: none; } .faq[open] summary .icon { transform: rotate(-90deg); }
.faq-video-tag { display: inline-flex; align-items: center; gap: 3px; background: var(--brand-50); color: var(--brand-700); font-size: 11.5px; padding: 2px 8px; border-radius: var(--r-badge); flex: none; }
.faq-video-tag .icon { transform: none !important; color: inherit !important; }
.faq-answer { padding: 0 16px 16px; }
.faq-video iframe, .faq-video video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-btn); background: #000; display: block; margin-bottom: 12px; }
.editor { border: 1px solid var(--line); border-radius: var(--r-input); background: #fff; overflow: hidden; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--wash); position: sticky; top: 64px; z-index: 2; }
.ed-bar button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 5px 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.ed-bar button:hover, .ed-bar button.on { background: #fff; border-color: var(--line); }
.ed-area { padding: 14px 16px; outline: none; font-size: 16px; line-height: 1.7; }
.ed-area:empty::before { content: 'Start writing...'; color: var(--muted); }
.ed-src { width: 100%; min-height: 360px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; border: 0 !important; border-radius: 0 !important; }
/* ---------- Admin content ---------- */
.texts-table textarea { width: 100%; min-height: 38px; padding: 7px 10px; }
.texts-table td:first-child { width: 32%; }
.faq-new > summary, .faq-admin > summary { list-style: none; cursor: pointer; } .faq-new > summary::-webkit-details-marker, .faq-admin > summary::-webkit-details-marker { display: none; }
.faq-admin > summary h2 { font-size: 14.5px; }
.admin-video { max-width: 420px; }
.blog-edit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.blog-edit .panel + .panel, .blog-side-col .panel + .panel { margin-top: 16px; }
.title-input { font-size: 24px !important; font-weight: 800; border: 0 !important; padding: 4px 0 !important; box-shadow: none !important; }
.serp { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 12px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 3px; font-family: Arial, sans-serif; }
.serp-url { color: #202124; font-size: 13px; } .serp strong { color: #1a0dab; font-size: 19px; font-weight: 400; } .serp > span:last-child { color: #4d5156; font-size: 14px; }
.seo-pill { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 999px; font-weight: 800; font-size: 12.5px; }
.seo-pill.big { min-width: 48px; height: 32px; font-size: 16px; }
.seo-pill.good { background: var(--ok-bg); color: var(--ok); } .seo-pill.ok { background: var(--gold-50); color: var(--warn); } .seo-pill.bad { background: var(--bad-bg); color: var(--bad); }
.seo-checks { list-style: none; margin: 0; padding: 12px 18px 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.seo-checks li { padding-left: 18px; position: relative; } .seo-checks li::before { content: ''; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; }
.seo-checks li.good::before { background: var(--ok-fill); } .seo-checks li.ok::before { background: var(--gold); } .seo-checks li.bad::before { background: var(--bad-fill); }
.cover-prev { width: 100%; border-radius: var(--r-btn); margin-bottom: 8px; }
.cat-edit { border-bottom: 1px solid var(--line-2); padding: 8px 0; } .cat-edit summary { cursor: pointer; font-weight: 600; }
@media (max-width: 1000px) { .blog-edit { grid-template-columns: minmax(0, 1fr); } }
.set-tabs { margin-bottom: 16px; }
.span-all { grid-column: 1 / -1; }
.color-field { display: flex; gap: 8px; } .color-field input[type=color] { width: 48px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-input); background: #fff; flex: none; }
.color-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; } .color-preview span { color: #fff; padding: 8px 14px; border-radius: var(--r-btn); font-weight: 700; font-size: 13px; }
.img-setting { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; } .img-setting img { max-height: 48px; max-width: 160px; background: var(--wash); border-radius: 6px; padding: 4px; }
.gw-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.imp-bar { position: sticky; top: 0; z-index: 100; display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 12px; background: var(--ink); color: #fff; font-size: 13.5px; }
.imp-bar span { display: inline-flex; align-items: center; gap: 6px; } .imp-bar form { margin: 0; }
.imp-bar button { background: var(--gold); color: var(--ink); border: 0; border-radius: var(--r-btn); padding: 5px 12px; font: inherit; font-weight: 800; cursor: pointer; }

/* Admin monthly report */
.advice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.advice:first-of-type { border-top: 0; }
.advice .badge { flex: none; min-width: 58px; text-align: center; }
.advice p { margin: 2px 0 0; color: var(--muted); }
.check-row { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; }
.inline-form input[type=month] { width: auto; }

/* Admin plan comparison table */
.plan-matrix th, .plan-matrix td { min-width: 130px; vertical-align: middle; }
.plan-matrix td:first-child, .plan-matrix th:first-child { min-width: 200px; position: sticky; left: 0; background: var(--white, #fff); z-index: 1; }
.plan-matrix input[type=text], .plan-matrix input:not([type]), .plan-matrix input[type=number] { width: 100%; min-width: 110px; padding: 7px 9px; }
.plan-matrix input[type=checkbox], .plan-matrix input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand-600); }
.plan-matrix .center { text-align: center; }
.plan-matrix .group-row td { background: var(--wash); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.plan-delete { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 0; }
.plan-list li.off { color: var(--muted); text-decoration: line-through; opacity: .7; }

/* Admin launch switch */
.launch .panel-body { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 4px solid var(--gold); }
.launch.is-live .panel-body { border-left-color: var(--ok); }
.launch .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.launch .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Marketplace home v3 - framed segments in the admin's brand colours.
   Solid fills only (no gradients). Dark and light frames alternate.
   ========================================================================== */
/* Utility strip above the header */
.mk-util { background: var(--ocean-700); font-size: 12.5px; }
.mk-util .mk-wrap { display: flex; gap: 18px; align-items: center; min-height: 30px; overflow-x: auto; scrollbar-width: none; }
.mk-util a { color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; white-space: nowrap; }
.mk-util a:hover { color: #fff; }
.mk-util a.mk-ev { color: var(--gold); }
.mk-util-gap { flex: 1; }

/* Category bar under the header: icon + short label, divided cells */
.mk-catbar { background: var(--brand-700); position: relative; z-index: 35; }
.mk-catbar .mk-wrap { display: flex; align-items: stretch; }
.mk-catbar .mk-allcats { flex: none; position: relative; }
.mk-catbar .mk-allcats > button { height: 100%; display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.18); color: #fff; border: 0; padding: 0 16px; font: 700 14px var(--font); cursor: pointer; white-space: nowrap; }
.mk-catbar .mk-catdrop { position: absolute; top: 100%; left: 0; }
.mk-catbar-row { display: flex; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.mk-catbar-row::-webkit-scrollbar, .mk-util .mk-wrap::-webkit-scrollbar { display: none; }
.mk-catbar-row a { display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.16); }
.mk-catbar-row a:first-child { border-left: 1px solid rgba(255,255,255,.16); }
.mk-catbar-row a:hover, .mk-catbar-row a.on { background: rgba(0,0,0,.16); }
.mk-catbar-row .icon { opacity: .9; }

/* Segments */
.hs { padding: 10px 0; }
.hs.hs-top { padding: 16px 0 6px; }
.hs-frame { border-radius: 18px; padding: 20px 20px 18px; }
.hs-white .hs-frame { background: #fff; border: 1px solid var(--line); }
.hs-ink .hs-frame { background: var(--ink); }
.hs-ocean .hs-frame { background: var(--ocean); }
.hs-red .hs-frame { background: var(--bad-fill); }
.hs-brand .hs-frame { background: var(--brand-600); }
.hs-green .hs-frame { background: var(--ok); }
.hs-tint-brand .hs-frame { background: var(--brand-50); border: 1px solid var(--brand-100); }
.hs-tint-gold .hs-frame { background: var(--gold-50); border: 1px solid var(--line); }
.hs-tint-ocean .hs-frame { background: var(--ocean-50); border: 1px solid var(--ocean-100); }

.hs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hs-head h2 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.hs-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex: none; }
.hs-all { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; background: var(--brand-600); color: #fff; white-space: nowrap; }
.hs-all:hover { background: var(--brand-700); }
.hs-extra { display: flex; align-items: center; gap: 8px; }
.hs-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--wash); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font: 600 13px var(--font); color: var(--ink); cursor: pointer; }
.hs-tint-brand .hs-head h2 { color: var(--brand-700); }
.hs-tint-ocean .hs-head h2 { color: var(--ocean); }
.hs-tint-ocean .hs-ico { background: var(--ocean-100); color: var(--ocean); }
.hs-tint-ocean .hs-all { background: var(--ocean); }
.hs-tint-gold .hs-ico { background: #fff; color: var(--gold-600); }
/* Dark frames: white title, white "See all" pill */
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-head h2 { color: #fff; }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-ico { background: rgba(255,255,255,.16); color: #fff; }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-all { background: #fff; color: var(--ink); }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-all:hover { background: var(--wash); }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-head .info-btn { color: rgba(255,255,255,.8); }
.hs-red .mk-countdown { color: #fff; }
.hs-frame .mk-countdown.dark { color: var(--ink); }
.hs-frame .mk-countdown.dark b { background: var(--ink); color: #fff; }

/* Rows */
.hs-frame .row-scroll { grid-auto-columns: 188px; gap: 14px; padding: 2px 2px 4px; }
.hs-frame .row-scroll.mini { grid-auto-columns: 320px; gap: 12px; }
.hs-frame .row-scroll.coupons { grid-auto-columns: 250px; }
.hs-frame .row-scroll.sellers { grid-auto-columns: 158px; }
.hs-frame .row-scroll.mt-row { margin-top: 14px; }
.hs-frame .row-arrow { top: 38%; }

/* Product card */
.pc { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.pc:hover { box-shadow: var(--shadow-up); border-color: var(--brand-200); }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .pc { border-color: transparent; }
.pc.is-out { opacity: .7; }
.pc-img { position: relative; aspect-ratio: 1 / 1; background: var(--wash); display: grid; place-items: center; color: var(--muted); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-tags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.pc-tags b { font-size: 11.5px; font-weight: 800; padding: 3px 7px; border-radius: 6px; line-height: 1.2; }
.pc-off { background: var(--ok); color: #fff; }
.pc-new { background: var(--ocean); color: #fff; }
.pc-ad { background: var(--gold); color: var(--ink); margin-left: auto; }
.pc-rank { background: var(--ink); color: #fff; }
.pc-ws { background: var(--ocean); color: #fff; }
.pc-sold { position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 5px; }
.pc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc-name { font-size: 14px; line-height: 1.35; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.pc-price { font-size: 17px; font-weight: 800; color: var(--ink); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pc-price { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pc-was { min-height: 17px; font-size: 12.5px; color: var(--muted); line-height: 17px; }
.pc-price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.pc-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta.hot { color: var(--bad); font-weight: 700; }
.pc-stock { display: block; height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 2px; }
.pc-stock i { display: block; height: 100%; background: var(--bad-fill); border-radius: 999px; }
.pc-buy { margin-top: auto; display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 9px; background: var(--brand-600); color: #fff; font-weight: 700; font-size: 13.5px; }
.pc-meta { margin-bottom: 6px; }
.pc:hover .pc-buy { background: var(--brand-700); }
.pc.is-out .pc-buy { background: var(--line-2); color: var(--ink-2); }

/* Compact card */
.pm { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); min-height: 86px; }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .pm { border-color: transparent; }
.pm:hover { border-color: var(--brand-200); }
.pm-img { width: 86px; flex: none; background: var(--wash); display: grid; place-items: center; color: var(--muted); }
.pm-img img { width: 100%; height: 100%; object-fit: cover; }
.pm-body { padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.pm-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-price { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pm-price b { background: var(--ok); color: #fff; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; }
.pm-seller { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Category tiles */
.hs-cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 14px; }
.hs-cats a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; text-align: center; }
.hs-cat-img { width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--brand-100); transition: border-color .15s, box-shadow .15s; }
.hs-cats a:hover .hs-cat-img { border-color: var(--brand-600); box-shadow: var(--shadow); }
.hs-cat-img > span { width: 52%; max-width: 96px; aspect-ratio: 1 / 1; border-radius: 50%; display: grid; place-items: center; }
.hs-cat-name { font-size: 14px; font-weight: 600; color: var(--brand-700); line-height: 1.3; }
.tone-brand .hs-cat-img > span { background: var(--brand-100); color: var(--brand-700); }
.tone-ocean .hs-cat-img > span { background: var(--ocean-100); color: var(--ocean); }
.tone-gold .hs-cat-img > span { background: var(--gold-50); color: var(--gold-600); }
.tone-green .hs-cat-img > span { background: var(--ok-bg); color: var(--ok); }
.tone-red .hs-cat-img > span { background: var(--bad-bg); color: var(--bad); }
.tone-ink .hs-cat-img > span { background: var(--line-2); color: var(--ink); }

/* Item of the week */
.iw { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.iw-hero { display: flex; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); border: 1px solid var(--ocean-100); }
.iw-hero:hover { border-color: var(--ocean); }
.iw-img { width: 42%; flex: none; max-height: 340px; background: var(--wash); display: grid; place-items: center; color: var(--muted); aspect-ratio: 1 / 1; }
.iw-img img { width: 100%; height: 100%; object-fit: cover; }
.iw-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.iw-kicker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ocean); }
.iw-name { font-size: 22px; line-height: 1.25; font-weight: 800; }
.iw-price { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iw-price s { font-size: 15px; font-weight: 500; color: var(--muted); }
.iw-price .pc-off { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; }
.iw-seller { font-size: 13.5px; color: var(--ink-2); }
.iw-buy { margin-top: auto; height: 44px; font-size: 15px; max-width: 220px; }
.iw-more { display: flex; flex-direction: column; gap: 10px; }
.iw-more-title { font-weight: 800; font-size: 15px; color: var(--ocean); }

/* Coupons */
.cp { background: #fff; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); position: relative; }
.cp-main strong { display: block; font-size: 24px; font-weight: 800; color: var(--ok); }
.cp-main span { font-size: 13px; color: var(--ink-2); }
.cp-main a { color: var(--ink); font-weight: 700; text-decoration: none; }
.cp-code { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1.5px dashed var(--ok); border-radius: 10px; padding: 6px 6px 6px 12px; }
.cp-code code { font-weight: 800; letter-spacing: .06em; font-size: 15px; }
.cp-code button { display: inline-flex; align-items: center; gap: 4px; background: var(--ok); color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; font: 700 13px var(--font); cursor: pointer; }
.cp small { color: var(--muted); font-size: 12px; }

/* Trending searches */
.hs-trend { display: flex; flex-wrap: wrap; gap: 10px; }
.hs-trend a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; background: var(--wash); }
.hs-trend a:hover { border-color: var(--brand-600); color: var(--brand-600); }
.hs-trend b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-600); color: #fff; font-size: 12.5px; }
.hs-trend a:nth-child(n+4) b { background: var(--ocean); }

/* Empty state inside a frame */
.hs-empty { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: #fff; color: var(--ink); flex-wrap: wrap; border: 1px dashed var(--line); }
.hs-empty-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex: none; }
.hs-empty-text { flex: 1; min-width: 180px; }
.hs-empty-text strong { display: block; font-size: 15px; }
.hs-empty-text small { color: var(--ink-2); font-size: 13.5px; }
.hs-empty-btn { background: var(--brand-600); color: #fff; padding: 9px 16px; border-radius: 9px; font-weight: 700; font-size: 13.5px; text-decoration: none; }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-empty { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-empty-text small { color: rgba(255,255,255,.82); }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-empty-ico { background: rgba(255,255,255,.16); color: #fff; }
:is(.hs-ink, .hs-ocean, .hs-red, .hs-brand, .hs-green, .hs-rust) .hs-empty-btn { background: #fff; color: var(--ink); }

/* Sellers inside frames */
.hs-frame .seller-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; }

@media (max-width: 1100px) {
  .hs-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mk-util { display: none; }
  .mk-catbar { display: block !important; }
  .mk-catbar .mk-allcats { display: none; }
  .mk-catbar .mk-wrap { padding: 0; }
  .mk-catbar-row a { padding: 11px 14px; font-size: 13.5px; }
  .mk-catbar-row a:first-child { border-left: 0; }
  .hs { padding: 6px 0; }
  .hs-frame { border-radius: 14px; padding: 14px 14px 12px; }
  .hs-head { margin-bottom: 12px; gap: 8px; }
  .hs-head h2 { font-size: 18px; gap: 8px; }
  .hs-ico { width: 28px; height: 28px; border-radius: 8px; }
  .hs-all { padding: 7px 12px; font-size: 13px; }
  .hs-frame .row-scroll { grid-auto-columns: 152px; gap: 10px; margin: 0 -14px; padding: 2px 14px 4px; scroll-padding: 0 14px; }
  .hs-frame .row-scroll.mini { grid-auto-columns: 268px; }
  .hs-frame .row-scroll.coupons { grid-auto-columns: 230px; }
  .hs-frame .row-scroll.sellers { grid-auto-columns: 136px; }
  .pc-body { padding: 8px 10px 10px; }
  .pc-name { font-size: 13px; min-height: 35px; }
  .pc-price { font-size: 15.5px; }
  .pc-buy { height: 32px; font-size: 13px; }
  .hs-cats { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none; grid-auto-columns: 92px; overflow-x: auto; scrollbar-width: none; gap: 12px 10px; margin: 0 -14px; padding: 0 14px 2px; }
  .hs-cats::-webkit-scrollbar { display: none; }
  .hs-cat-name { font-size: 12.5px; }
  .hs-cat-img { border-radius: 14px; }
  .iw { grid-template-columns: minmax(0, 1fr); }
  .iw-hero { flex-direction: column; }
  .iw-img { width: 100%; aspect-ratio: 4 / 3; }
  .iw-body { padding: 16px; }
  .iw-name { font-size: 18px; }
  .iw-price { font-size: 22px; }
  .iw-buy { max-width: none; }
  .hs-trend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
  .hs-trend a { white-space: nowrap; }
}
.hs-tint-brand .hs-ico { background: #fff; }
@media (max-width: 760px) { .hs-extra { order: 3; flex-basis: 100%; } }
.r-pill.bad { background: var(--bad-bg); color: var(--bad); }
.field-error { display: block; color: var(--bad); font-size: 13px; margin-top: 4px; }

/* Verification */
.verify-status .panel-body { display: flex; gap: 14px; align-items: flex-start; }
.verify-status p { margin: 4px 0 0; }
.verify-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--wash); color: var(--muted); }
.verify-status.approved .verify-ico { background: var(--ok-bg); color: var(--ok); }
.verify-status.pending .verify-ico { background: var(--warn-bg); color: var(--warn); }
.verify-status.rejected .verify-ico { background: var(--bad-bg); color: var(--bad); }
.verify-status.rejected p { color: var(--bad); }
.verify-docs { display: grid; gap: 14px; }
.verify-doc { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.verify-doc label { font-weight: 700; font-size: 14px; }
.vdocs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vdoc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.vdoc img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wash); }
.vdoc .vdoc-pdf { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--wash); color: var(--muted); }
.vdoc span { padding: 8px 10px; font-size: 13px; font-weight: 600; }
.vdoc.missing { border-style: dashed; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad-fill); color: #fff; font-size: 11.5px; margin-left: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-row .seg-chip { text-align: left; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.contact-grid > .panel { margin-top: 0; }
.contact-ways .panel-body { display: grid; gap: 14px; }
.contact-way { display: flex; gap: 12px; align-items: flex-start; }
.contact-way > span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex: none; }
.contact-way small { display: block; color: var(--muted); font-size: 12px; }
.contact-way a { color: var(--ink); font-weight: 700; text-decoration: none; word-break: break-word; }
.contact-way p { margin: 0; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
/* Message thread */
.thread { display: grid; gap: 12px; }
.bubble { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; }
.bubble.out { background: var(--brand-50); border-color: var(--brand-100); margin-left: 40px; }
.bubble header { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.bubble header strong { color: var(--ink); }
.bubble .body { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; }
@media (max-width: 760px) { .bubble.out { margin-left: 16px; } }
.table tr.is-unread td { background: var(--brand-50); }
.attention { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.attention a { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; text-decoration: none; color: var(--ink-2); font-size: 14px; }
.attention a b { font-size: 18px; color: var(--ink); margin-right: 2px; }
.attention a .icon { color: var(--muted); }
.attention a.hot { border-color: var(--brand-200); background: var(--brand-50); }
.attention a.hot .icon { color: var(--brand-600); }
@media (max-width: 760px) { .attention { grid-template-columns: minmax(0, 1fr); } }
.panel.launch { margin-bottom: 12px; }
/* Bank account name lookup */
.acct-name { position: relative; }
.acct-name input[readonly] { background: var(--wash); font-weight: 700; color: var(--ink); }
.acct-state { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.acct-state.ok { color: var(--ok); } .acct-state.bad { position: static; transform: none; display: block; margin-top: 6px; color: var(--bad); }
.wd-preview { font-size: 14px; margin: 8px 0 0; color: var(--ink-2); } .wd-preview b { color: var(--ok); }
.report-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 8px 0 14px; } @media (max-width: 760px) { .report-reasons { grid-template-columns: minmax(0, 1fr); } }
.sanction-choices { display: grid; gap: 8px; margin-bottom: 12px; }
.sanction-choices select { width: auto; display: inline-block; padding: 4px 8px; margin-left: 4px; }
.pd-report { margin: 4px 0 0; }
.pd-report .link { color: var(--muted); }
.hs-rust .hs-frame { background: var(--brand-700); }
/* Categories on the dark panel */
.hs-cats-sec .hs-cat-img { border-color: transparent; }
.hs-cats-sec .hs-cats a:hover .hs-cat-img { border-color: var(--gold); box-shadow: none; }
.hs-cats-sec .hs-cat-name { color: #fff; }
.key-urls { display: grid; gap: 8px; margin-bottom: 14px; }
.key-urls > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: var(--wash); border-radius: 10px; }
.key-urls span { font-weight: 700; font-size: 13px; min-width: 190px; }
.key-urls code { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; }
/* Newsletter sign-up */
.nl-form { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.nl-form.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.nl-text { display: flex; flex-direction: column; gap: 2px; min-width: 220px; flex: 1; }
.nl-text strong { font-size: 17px; } .nl-text span { font-size: 13.5px; opacity: .8; }
.nl-row { display: flex; gap: 8px; flex: 1; min-width: 260px; max-width: 460px; }
.nl-row input { flex: 1; min-width: 0; }
.mk-foot .nl-form { margin-bottom: 26px; }
.set-tabs { flex-wrap: wrap; overflow: visible; }
/* "Get the app" pop-up */
.app-pop { position: fixed; inset: 0; z-index: 200; background: rgba(10, 20, 30, .55); display: grid; place-items: end center; padding: 16px; }
.app-pop[hidden] { display: none; }
.app-pop-card { position: relative; width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 26px 22px 18px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: appPopIn .25s ease-out; }
@keyframes appPopIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .app-pop-card { animation: none; } }
@media (min-width: 761px) { .app-pop { place-items: center; } }
.app-pop-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--wash); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.app-pop-icon { width: 76px; height: 76px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; margin: 0 auto 12px; background: var(--brand-50); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.app-pop-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-pop-icon .mark { width: 76px; height: 76px; font-size: 34px; border-radius: 18px; }
.app-pop-card h2 { font-size: 21px; margin: 0 0 6px; }
.app-pop-card p { color: var(--ink-2); font-size: 14.5px; margin: 0 0 18px; }
.app-pop-stores { display: grid; gap: 10px; }
.app-pop-stores.desktop { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.app-pop-stores.ios .android, .app-pop-stores.android .ios { order: 2; }
.store-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 16px; }
.store-btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.store-btn small { font-size: 10.5px; font-weight: 500; opacity: .8; }
.app-pop-stores.android .android, .app-pop-stores.ios .ios { background: var(--brand-600); }
.app-pop-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.app-pop-foot .link { background: none; border: 0; cursor: pointer; font: 600 13.5px var(--font); padding: 4px 0; }
.app-pop-foot .muted { color: var(--muted); }
.app-pop-icon .mark { display: grid; place-items: center; background: var(--gold); color: var(--ink); font-weight: 800; }
/* App store badges in footers */
.mk-foot-apps { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 20px; }
.mk-foot-apps > strong { display: block; color: #fff; margin-bottom: 12px; }
.app-badges { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.app-badge-row { display: flex; flex-direction: column; gap: 8px; }
.app-badge-name { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.app-badge-name img { border-radius: 7px; }
.app-badge-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.store-btn.sm { padding: 7px 12px; font-size: 13.5px; gap: 8px; border: 1px solid rgba(255,255,255,.28); background: #000; }
.store-btn.sm small { font-size: 9.5px; }
.site-foot .app-badges { margin: 10px 0; }
.site-foot .store-btn.sm { border-color: transparent; }

/* Add-product: the online-store fields are grouped and only shown when "Sell this online" is ticked. */
.big-check{font-weight:600}
.store-fields{border:1px solid var(--line);border-radius:10px;padding:14px 14px 2px;margin:2px 0 14px;background:rgba(0,0,0,.015)}
@media (prefers-color-scheme: dark){.store-fields{background:rgba(255,255,255,.03)}}
.store-fields[hidden]{display:none}

/* POS: big, obvious unit buttons so anyone can pick pcs / carton / bag without guessing. */
.unit-chip{display:inline-flex;align-items:center;gap:6px}
.unit-chip .u-add{font-weight:800}
.unit-chip .u-price{font-weight:700;opacity:.85}
.unit-pick-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:2px 0 4px}
.unit-pick-row .pick-label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.unit-pick{display:inline-flex;flex-wrap:wrap;gap:6px}
.unit-pick .u-btn{display:inline-flex;align-items:baseline;gap:5px;border:1.5px solid var(--line);background:#fff;color:var(--ink);border-radius:9px;padding:7px 12px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;line-height:1.1}
.unit-pick .u-btn em{font-style:normal;font-weight:600;font-size:11.5px;color:var(--muted)}
.unit-pick .u-btn:hover{border-color:var(--brand-500)}
.unit-pick .u-btn.on{background:var(--brand-600);border-color:var(--brand-600);color:#fff}
.unit-pick .u-btn.on em{color:rgba(255,255,255,.85)}
.cart-line .line-price .price-fixed{font-weight:700}
@media (prefers-color-scheme: dark){.unit-pick .u-btn{background:transparent}}

/* Add-product: worked example showing how to set a pcs price AND a carton price. */
.unit-example{border:1px solid var(--brand-200);background:var(--brand-50);border-radius:10px;padding:12px 14px;margin:8px 0 16px;font-size:13.5px;line-height:1.5}
.unit-example ul{margin:6px 0;padding-left:18px}
.unit-example li{margin:2px 0}
.unit-example code{background:rgba(0,0,0,.06);padding:1px 6px;border-radius:5px;font-weight:700}
@media (prefers-color-scheme: dark){.unit-example code{background:rgba(255,255,255,.1)}}

/* Admin feature switches */
.feat-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--line-2)}
.feat-row:first-child{border-top:0}
.feat-info{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1}
.feat-seg{flex:0 0 auto}
.feat-seg label{cursor:pointer}
.feat-seg input:checked + label.st-on{background:var(--ok);color:#fff}
.feat-seg input:checked + label.st-soon{background:var(--gold,#C8860D);color:#fff}
.feat-seg input:checked + label.st-off{background:var(--bad);color:#fff}
.nav-badge.soon{background:var(--gold-50,#fff4e0);color:var(--brand-700);font-weight:700}
/* Coming-soon standalone page */
.soon-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--wash,#f6f7f9)}
.soon-card{max-width:460px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px 28px}
.soon-card h1{font-size:22px;margin:14px 0 8px}
.soon-card p{color:var(--muted);margin:0 0 18px}
.soon-badge{display:inline-block;background:var(--brand-50);color:var(--brand-700);font-weight:800;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;padding:5px 12px;border-radius:999px}

/* ===== Receipt (clean layout, no sidebar/mobile menu) ===== */
.rc-body{background:var(--wash,#f6f7f9);min-height:100vh}
.rc-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;max-width:720px;margin:0 auto;padding:14px 16px}
.rc-actions{display:flex;gap:8px;flex-wrap:wrap}
.rc-flash{max-width:720px;margin:0 auto 8px;}
.rc-main{padding:4px 16px 48px}
.rc-admin{max-width:360px;margin:16px auto 0}

.rc-card{position:relative;border:1px solid var(--line);border-radius:14px;padding:0 24px 24px;box-shadow:var(--shadow,0 1px 3px rgba(0,0,0,.08));overflow:hidden}
.rc-card::before{content:"";position:absolute;top:0;left:0;right:0;height:6px;background:linear-gradient(90deg,var(--brand-600),var(--brand-500))}
.rc-top{text-align:center;padding:22px 0 8px}
.rc-brandmark{width:52px;height:52px;margin:0 auto 10px;border-radius:14px;background:var(--brand-600);color:#fff;display:grid;place-items:center;font-size:24px;font-weight:800;overflow:hidden}
.rc-brandmark img{width:100%;height:100%;object-fit:cover}
.rc-shop{font-size:19px;font-weight:800;margin:0;line-height:1.2}
.rc-branch{font-size:13px;color:var(--muted);margin:2px 0 8px}
.rc-contact{display:flex;flex-direction:column;gap:2px;align-items:center;font-size:12px;color:var(--ink-2,#4b5563)}
.rc-contact span{display:inline-flex;align-items:center;gap:5px}
.rc-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}
.rc-no{font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.rc-status{font-size:11px;font-weight:800;letter-spacing:.05em;padding:3px 10px;border-radius:999px}
.rc-status.st-ok{background:var(--ok-bg,#e6f6ee);color:var(--ok,#1a9e5e)}
.rc-status.st-warn{background:var(--gold-50,#fff4e0);color:var(--warn,#b8860b)}
.rc-status.st-bad{background:var(--bad-bg,#fdeaea);color:var(--bad,#d23)}
.rc-date{font-size:12px;color:var(--muted);margin:3px 0 0}
.rc-sep{border-top:1px dashed #cfd4dc;margin:14px 0}
.rc-item{padding:5px 0}
.rc-item .row{display:flex;justify-content:space-between;gap:12px}
.rc-name{font-weight:600}
.rc-amt{font-variant-numeric:tabular-nums;white-space:nowrap}
.rc-subline{font-size:12px;color:var(--muted);margin-top:1px}
.rc-line{display:flex;justify-content:space-between;gap:12px;padding:3px 0;font-size:14px}
.rc-total{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0;padding:10px 12px;border-radius:10px;background:var(--brand-50);color:var(--brand-700);font-weight:800;font-size:18px}
.rc-pay{color:var(--ink-2,#4b5563)}
.rc-bal{color:var(--bad);font-weight:700}
.rc-served{text-align:center;font-size:12.5px;color:var(--muted);margin:2px 0}
.rc-thanks{text-align:center;font-weight:600;margin:8px 0 2px}
.rc-power{text-align:center;font-size:11px;color:var(--muted);margin:10px 0 0}
@media (prefers-color-scheme: dark){.rc-card{background:#fff;color:#111}.rc-card .rc-shop,.rc-card .rc-name{color:#111}}

@media print {
  .no-print, .rc-bar, .rc-flash, .rc-admin { display:none !important; }
  .rc-body{background:#fff}
  .rc-main{padding:0}
  .rc-card{border:0;border-radius:0;box-shadow:none;padding:0 2px;max-width:none}
  .rc-card::before{display:none}
  .rc-total{background:transparent;color:#000;border:1px solid #000;border-left:0;border-right:0;border-radius:0}
  body{font-size:12.5px}
}

/* Smooth, app-like page changes instead of a white-flash full reload.
   Progressive enhancement: modern Chrome/Android cross-fade between pages;
   older browsers just navigate normally. Honours reduced-motion. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Receive-stock: optional expiry date drops to its own full-width line (desktop) so it isn't cramped. */
@media (min-width: 761px) {
  .line-row.with-unit .ln-expiry { grid-column: 1 / -1; max-width: 240px; }
}

/* Offline till: status bar + save-offline toast. */
.till-status { padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.till-status.on { background: #e6f7ed; color: #137a43; }
.till-status.off { background: #fff4e5; color: #9a5b00; }
.till-status.warn { background: #fdeceb; color: #b42318; }
.till-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: #11181c; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 9999; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.till-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* SEO & keywords: AI suggestion chips and the per-product rows */
.ai-suggest-box { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.ai-suggest-box ul { margin: 6px 0 0; padding-left: 18px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai-chip { border: 1px solid var(--brand-200); background: #fff; color: var(--brand-700); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ai-chip:hover { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.seo-prod { padding: 12px 0; border-bottom: 1px solid var(--line); }
.seo-prod:last-child { border-bottom: 0; }
.seo-prod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.seo-prod textarea { width: 100%; }

/* SEO page: the Search Console how-to list */
.help-steps { margin: 4px 0 0; padding-left: 20px; line-height: 1.7; }
.help-steps li { margin-bottom: 10px; }
.help-steps code { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 6px; padding: 2px 7px; font-size: 13px; }

/* Admin segments: product picker */
.seg-cond.hidden { display: none; }
.seg-results { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; max-height: 320px; overflow-y: auto; }
.seg-add-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.seg-add-row:last-child { border-bottom: 0; }
.seg-add-row small { color: var(--muted); display: block; }

/* Sign-up: optional shop-details toggle */
.reg-more { margin: 4px 0 12px; }
.reg-more > summary { cursor: pointer; font-weight: 600; color: var(--brand-700); padding: 8px 0; list-style: none; }
.reg-more > summary::-webkit-details-marker { display: none; }
.reg-more > summary::before { content: '+ '; font-weight: 700; }
.reg-more[open] > summary::before { content: '− '; }

/* Admin ads: inline reject reason popover */
.reject-pop { display: inline-block; position: relative; }
.reject-pop > summary { list-style: none; }
.reject-pop > summary::-webkit-details-marker { display: none; }
.reject-pop .pop-body { position: absolute; right: 0; z-index: 20; margin-top: 6px; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 8px; }

/* Sponsored strips on the buyer dashboard, checkout and footer */
.ad-strip { margin: 20px 0; }
.ad-strip-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .03em; }
.ad-strip .row-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.ad-strip .row-scroll > * { flex: 0 0 160px; }
.mk-foot .ad-strip-head { color: rgba(255,255,255,.75); }

/* "For you" endless feed */
.feed-more { display: flex; justify-content: center; padding: 24px 0; min-height: 40px; }
.feed-spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--brand-500); border-radius: 50%; animation: feed-spin .8s linear infinite; }
@keyframes feed-spin { to { transform: rotate(360deg); } }

/* ===================== Dashboard polish (seller · admin · buyer) ===================== */
/* KPI and stat grids keep an even 2-up on phones, 1-up only on the smallest screens. */
.stats, .stats.kpis { grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); }
@media (max-width: 680px) { .stats, .stats.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .stats, .stats.kpis { grid-template-columns: 1fr; } }

/* A linked stat card lifts a little so it reads as tappable. */
.stat { transition: box-shadow .15s ease; }
a.stat:hover { box-shadow: var(--shadow-up); }

/* Store-link funnel: even cards instead of hairline cells, so no stray grey gaps on phones. */
.funnel { background: transparent; gap: 12px; padding: 16px 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.funnel > div { background: var(--wash); border-radius: var(--r-card); padding: 12px 14px; }
.funnel strong { font-size: 20px; }
@media (max-width: 680px) { .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tidy rhythm and headings. */
.section-h { margin: 26px 0 12px; }
.panel-head h2 { letter-spacing: -0.01em; }

/* Keep the shop name on one line in the top bar on small screens. */
.ctx-static strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }

/* Buyer dashboard stat chips: a touch more polish and never overflow. */
.by-stats div { border: 1px solid var(--line); }
.by-stats strong { font-weight: 800; }
