/* RepHub v7 additions — modern profile, settings tabs, listing cards, toggles.
   Layered on top of rephub.css; kept in a separate file so the base sheet stays intact. */

:root {
  --panel-solid: #10141060;
  --bd: #9ef01a;
}

/* Wider container for settings + profile pages */
.settings-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  margin: 8px 0 40px;
}
.settings-nav {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); position: sticky; top: 16px; height: max-content;
}
.settings-nav button {
  text-align: left; padding: 10px 12px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; cursor: pointer; transition: .12s;
}
.settings-nav button:hover { color: var(--text); background: #141a14; }
.settings-nav button.on {
  color: #0a0d0a; background: var(--accent);
  box-shadow: 0 8px 20px -12px var(--accent);
}
:root[data-theme="light"] .settings-nav button:hover { background: #eef2ee; }
.settings-body { min-width: 0; }
.settings-pane { display: none; }
.settings-pane.on { display: block; }

.settings-section { padding: 22px; }

/* Wider main wrap on settings + profile */
body[data-page="settings"] .form-narrow,
body[data-page="profile"] .form-narrow {
  max-width: none; margin: 20px auto;
}
body[data-page="settings"] .wrap,
body[data-page="profile"] .wrap { max-width: 1160px; }

/* Toggle row */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: #0d110d; margin: 8px 0; cursor: pointer;
  color: var(--text); font-size: 14px; font-weight: 500;
}
:root[data-theme="light"] .toggle-row { background: #fff; }
.toggle-row input[type=checkbox] {
  appearance: none; width: 40px; height: 22px; border-radius: 999px;
  background: #263026; position: relative; cursor: pointer; transition: .15s;
  border: 1px solid var(--border);
}
.toggle-row input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #cfd8cf; transition: .15s;
}
.toggle-row input[type=checkbox]:checked { background: var(--accent); }
.toggle-row input[type=checkbox]:checked::after { left: 20px; background: #0a0d0a; }

/* Profile page — banner + head */
.profile-page { margin-top: 8px; }
.profile-banner {
  height: 200px; border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg, #1a2618, #0f1810 60%, #101a12);
  background-size: cover; background-position: center;
  border: 1px solid var(--border); border-bottom: 0;
  position: relative; overflow: hidden;
}
.profile-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, #0a0d0acc);
}
.profile-head {
  display: flex; align-items: flex-start; gap: 20px; padding: 20px 28px 28px;
  border: 1px solid var(--border); border-top: 0; border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #101510, #0c100c);
  position: relative;
}
.profile-head .avatar-lg {
  width: 108px; height: 108px; border-radius: 50%;
  margin-top: -70px; border: 4px solid #0a0d0a;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-weight: 700; font-size: 40px; flex-shrink: 0;
  box-shadow: 0 20px 40px -20px #000;
}
.profile-head .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-bio { color: #c8d0c9; font-size: 14px; margin-top: 8px; max-width: 640px; }
.profile-stats {
  margin-top: 12px; display: flex; gap: 20px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
.profile-stats strong { color: var(--text); font-weight: 700; }
.social-row { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.social-row a { color: var(--accent); }
.social-row a:hover { text-decoration: underline; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* Badges */
.badge-row { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--bd, #9ef01a) 15%, transparent);
  border: 1px solid color-mix(in oklab, var(--bd, #9ef01a) 40%, transparent);
  color: var(--bd, #9ef01a);
  font-size: 11.5px; font-weight: 700;
}

/* Listing card v2 */
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; margin-top: 12px;
}
.listing-card {
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #12181299, #0c110c);
  border: 1px solid var(--border);
  transition: .18s; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px -30px #000;
}
:root[data-theme="light"] .listing-card { background: #fff; }
.listing-card:hover { transform: translateY(-2px); border-color: #2f3f33; }
.listing-image {
  aspect-ratio: 16 / 9; overflow: hidden; background: #0c100c;
  display: flex; align-items: center; justify-content: center;
  color: #2a352c;
}
.listing-image img { width: 100%; height: 100%; object-fit: cover; }
.listing-image--empty svg { width: 46px; height: 46px; opacity: .7; }
.listing-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.listing-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.listing-title { font-weight: 700; font-size: 15px; color: var(--text); line-height: 1.2; }
.listing-title:hover { color: var(--accent); }
.listing-price { font-weight: 800; color: var(--accent); font-size: 15px; }
.listing-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip {
  padding: 3px 9px; border-radius: 999px; background: #141a14;
  border: 1px solid var(--border); font-size: 11px; font-weight: 600;
  color: #cfd8cf; letter-spacing: .3px;
}
:root[data-theme="light"] .tag-chip { background: #f0f4f0; color: #2a3a30; }
.mp-status {
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .3px; border: 1px solid transparent;
}
.mp-status-active {
  color: #0a0d0a; background: var(--accent); border-color: var(--accent);
}
.mp-status-sold {
  color: #ffb3b3; background: #2a1414; border-color: #4a1c1c;
}
.listing-desc {
  color: #c8d0c9; font-size: 13px; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
:root[data-theme="light"] .listing-desc { color: #2f3a30; }
.listing-seller {
  display: flex; align-items: center; gap: 8px; padding-top: 8px;
  border-top: 1px solid var(--border-soft, var(--border));
  font-size: 12.5px; color: var(--muted);
}
.listing-seller-name { color: var(--text); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.listing-seller-name:hover { color: var(--accent); }
.listing-meta { color: var(--muted); font-size: 12px; }
.listing-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.avatar-sm { width: 26px; height: 26px; border-radius: 50%; font-size: 12px; overflow: hidden; }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

/* Publish form on marketplace uses full width */
.mp-publish { max-width: none; }

/* Responsive settings tabs */
@media (max-width: 800px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav {
    position: static; flex-direction: row; overflow-x: auto;
    padding: 6px;
  }
  .settings-nav button { white-space: nowrap; }
  .profile-head { flex-direction: column; align-items: center; text-align: center; }
  .profile-head .avatar-lg { margin-top: -60px; }
  .profile-actions { align-items: center; flex-direction: row; }
  .profile-stats { justify-content: center; }
}

/* Light theme polish */
:root[data-theme="light"] {
  --border-soft: #e2e6e2;
}
:root[data-theme="light"] body {
  background: radial-gradient(1200px 600px at 80% -10%, #d8f5aa22 0%, transparent 60%), var(--bg);
  color: var(--text);
}
:root[data-theme="light"] .btn-ghost { background: #fff; color: var(--text); }
:root[data-theme="light"] .menu-pop { background: #fff; }
:root[data-theme="light"] .listing-image { background: #f0f4f0; }
:root[data-theme="light"] .profile-banner { background: linear-gradient(135deg, #dff2b7, #ecf7d8); }
:root[data-theme="light"] .profile-head { background: #fff; }

/* ====================================================================
   v8 additions (2026-07): icon component, uploader, premium settings +
   create-listing UI. Layered on top of v7 without touching earlier rules.
   ==================================================================== */

/* Icon component */
.rh-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: -3px; }
.rh-icon .rh-icon-svg, .rh-icon svg { width: 1em; height: 1em; display: block; }
.rh-icon[data-size] { width: auto; height: auto; }
.rh-icon-svg { max-width: 100%; max-height: 100%; }

/* Danger button variant */
.btn-danger { background: #2a1414; color: #ffb3b3; border: 1px solid #4a1c1c; }
.btn-danger:hover { background: #3a1a1a; color: #ffcaca; border-color: #6a2828; }

/* ---------- Uploader ---------- */
.rh-upload {
  display: grid; grid-template-columns: 160px 1fr; gap: 18px;
  align-items: start;
}
.rh-upload--banner { grid-template-columns: 260px 1fr; }
.rh-upload-preview {
  aspect-ratio: 1 / 1; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, #12181299, #0c110c);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.rh-upload--circle .rh-upload-preview { border-radius: 999px; aspect-ratio: 1 / 1; }
.rh-upload--banner .rh-upload-preview { aspect-ratio: 3 / 1; border-radius: 14px; }
.rh-upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rh-upload-placeholder { font-size: 32px; color: var(--muted); }
.rh-upload-body { min-width: 0; }
.rh-upload-label { font-weight: 700; font-size: 14px; color: var(--text); }
.rh-upload-hint { color: var(--muted); font-size: 12px; margin: 2px 0 10px; }
.rh-upload-drop {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px dashed var(--border); background: #0d110d;
  cursor: pointer; color: var(--muted); font-size: 13px;
  transition: .15s;
}
.rh-upload-drop:hover, .rh-upload-drop:focus, .rh-upload-drop.is-drag {
  border-color: var(--accent); color: var(--text);
  background: color-mix(in oklab, var(--accent) 6%, #0d110d);
}
.rh-upload-drop strong { color: var(--text); font-weight: 700; }
.rh-upload-drop .rh-upload-browse { color: var(--accent); font-weight: 600; }
.rh-upload-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.rh-upload-bar {
  flex: 1; height: 6px; border-radius: 999px; background: #1a2118; overflow: hidden;
  border: 1px solid var(--border);
}
.rh-upload-bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .2s ease;
}
.rh-upload-pct { color: var(--muted); font-size: 12px; min-width: 34px; text-align: right; }
.rh-upload-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rh-upload-error { margin-top: 10px; }

/* ---------- New settings shell (reference design) ---------- */
.rh-settings {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px;
  margin: 8px 0 60px; align-items: start;
}
.rh-settings-side {
  position: sticky; top: 16px;
  display: flex; flex-direction: column; gap: 18px;
}
.rh-settings-side-title {
  font-size: 22px; font-weight: 800; letter-spacing: -.01em;
  margin: 4px 8px 4px;
}
.rh-settings-nav {
  display: flex; flex-direction: column; gap: 2px;
}
.rh-settings-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  border: 0; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; text-align: left; cursor: pointer;
  transition: .12s;
}
.rh-settings-nav-btn:hover { color: var(--text); background: #141a14; }
.rh-settings-nav-btn.is-on {
  color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent);
  border-left: 2px solid var(--accent); padding-left: 12px;
}
.rh-settings-nav-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.rh-settings-nav-icon svg { width: 18px; height: 18px; }

.rh-settings-help {
  padding: 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel);
}
.rh-settings-help-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.rh-settings-help-body { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; }
.rh-settings-help-btn { width: 100%; justify-content: center; gap: 8px; }
.rh-settings-help-icon svg { width: 14px; height: 14px; }

.rh-settings-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rh-settings-pane { display: none; flex-direction: column; gap: 16px; }
.rh-settings-pane.is-on { display: flex; }

.rh-pane-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 4px 4px 8px; }
.rh-pane-head h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; }
.rh-pane-head .muted { font-size: 13px; }
.rh-view-profile { display: inline-flex; gap: 6px; align-items: center; }

/* Card */
.rh-card {
  padding: 22px; border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #12181299, #0c110c);
  backdrop-filter: blur(10px);
  transition: .18s;
}
:root[data-theme="light"] .rh-card { background: #fff; }
.rh-card:hover { border-color: color-mix(in oklab, var(--accent) 20%, var(--border)); }
.rh-card-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; margin: 0 0 14px;
  color: var(--text);
}
.rh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Profile preview row inside first card */
.rh-preview-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
}
.rh-preview-avatar {
  position: relative; width: 96px; height: 96px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 34px; border: 1px solid #9ef01a33;
}
.rh-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rh-avatar-edit {
  position: absolute; right: 2px; bottom: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #0a0d0a; border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.rh-avatar-edit svg { width: 14px; height: 14px; }
.rh-preview-label { color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.rh-preview-value { font-weight: 700; font-size: 15px; margin-top: 2px; }
.rh-preview-rep { text-align: right; }
.rh-preview-verified {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  color: var(--muted); font-weight: 700; font-size: 13px;
}
.rh-preview-verified.is-verified { color: var(--accent); }

/* Fields */
.rh-field { display: block; margin-bottom: 12px; }
.rh-field label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; text-transform: none; }
.rh-input, .rh-field .rh-input {
  width: 100%; background: #0c100c; border: 1px solid var(--border);
  color: var(--text); padding: 11px 14px; border-radius: 10px;
  font: inherit; outline: 0; transition: .15s;
}
:root[data-theme="light"] .rh-input { background: #f7f9f7; }
.rh-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rh-input:disabled { opacity: .6; cursor: not-allowed; }
textarea.rh-input { min-height: 90px; resize: vertical; }
.rh-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rh-field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.rh-field-alt { margin-top: 6px; }
.rh-field-alt summary { color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0; }
.rh-field-alt summary:hover { color: var(--accent); }

/* Save bar */
.rh-save-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--panel);
  position: sticky; bottom: 12px;
}
.rh-save-hint { margin-left: auto; }

/* Toggle row (new) */
.rh-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; border-bottom: 1px solid var(--border-soft, var(--border));
  color: var(--text); font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.rh-toggle-row:last-child { border-bottom: 0; }
.rh-toggle-row input[type=checkbox] {
  appearance: none; width: 40px; height: 22px; border-radius: 999px;
  background: #263026; position: relative; cursor: pointer; transition: .15s;
  border: 1px solid var(--border);
}
.rh-toggle-row input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #cfd8cf; transition: .15s;
}
.rh-toggle-row input[type=checkbox]:checked { background: var(--accent); }
.rh-toggle-row input[type=checkbox]:checked::after { left: 20px; background: #0a0d0a; }

.rh-actions-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* Marketplace media grid — each uploader occupies its column in a compact
   single-column layout so the label + preview + drop zone don't overlap. */
.rh-mp-media { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.rh-mp-media > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rh-mp-media label { display: block; color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.rh-mp-media .rh-upload,
.rh-mp-media .rh-upload--banner,
.rh-mp-media .rh-upload--circle {
  grid-template-columns: 1fr;
  gap: 10px;
}
.rh-mp-media .rh-upload-preview { width: 100%; max-width: 100%; aspect-ratio: 3 / 1; }
.rh-mp-media .rh-upload--circle .rh-upload-preview { aspect-ratio: 1 / 1; max-width: 160px; margin: 0 auto; }
.rh-mp-media .rh-upload-body { min-width: 0; }
.rh-mp-media .rh-upload-drop { padding: 10px 12px; font-size: 12.5px; }

@media (max-width: 1100px) {
  .rh-mp-media { grid-template-columns: 1fr; }
  .rh-mp-media .rh-upload--circle .rh-upload-preview { max-width: 220px; }
}


/* ---------- Create Listing (premium) ---------- */
.mp-create {
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #12181299, #0c110c);
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}
.mp-create-banner {
  position: relative; padding: 34px 32px 30px; overflow: hidden;
  background: radial-gradient(600px 240px at 20% 30%, color-mix(in oklab, var(--accent) 25%, transparent) 0%, transparent 60%),
              radial-gradient(600px 240px at 80% 70%, color-mix(in oklab, #7ac70d 20%, transparent) 0%, transparent 60%),
              linear-gradient(180deg, #131a13, #0c110c);
  border-bottom: 1px solid var(--border);
}
.mp-create-banner-glow {
  position: absolute; inset: -1px;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent) 40%, transparent), transparent);
  height: 1px; top: 0; bottom: auto;
}
.mp-create-banner-inner { position: relative; z-index: 1; }
.mp-create-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.mp-create-banner h2 { font-size: 28px; margin: 10px 0 4px; letter-spacing: -.02em; }
.mp-create-banner p  { color: var(--muted); font-size: 14px; margin: 0; max-width: 560px; }

.mp-create-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px; padding: 26px 32px 30px;
}
.mp-create-fields { display: flex; flex-direction: column; gap: 4px; }
.mp-create-preview {
  padding: 18px; border: 1px dashed var(--border); border-radius: 16px;
  background: color-mix(in oklab, var(--accent) 3%, #0d110d);
  align-self: start; position: sticky; top: 16px;
}
:root[data-theme="light"] .mp-create-preview { background: #f9fbf6; }
.mp-preview-label {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 12px;
}
.mp-create-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.mp-create-actions .btn-primary { min-width: 160px; }
.mp-create-actions .btn { transition: .18s; }
.mp-create-actions .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .rh-settings { grid-template-columns: 1fr; }
  .rh-settings-side { position: static; }
  .rh-settings-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .rh-settings-nav-btn { white-space: nowrap; border-left: 0 !important; padding-left: 14px !important; }
  .rh-settings-nav-btn.is-on { border-bottom: 2px solid var(--accent); border-left: 0; border-radius: 10px 10px 0 0; }
  .mp-create-grid { grid-template-columns: 1fr; }
  .mp-create-preview { position: static; }
}
@media (max-width: 800px) {
  .rh-preview-row { grid-template-columns: 1fr; text-align: center; }
  .rh-preview-rep { text-align: center; }
  .rh-preview-avatar { margin: 0 auto; }
  .rh-field-row, .rh-field-row--3 { grid-template-columns: 1fr; }
  .rh-mp-media { grid-template-columns: 1fr; }
  .rh-upload, .rh-upload--banner { grid-template-columns: 1fr; }
  .rh-upload-preview { max-width: 260px; }
  .mp-create-banner { padding: 24px 20px 22px; }
  .mp-create-banner h2 { font-size: 22px; }
  .mp-create-grid { padding: 20px; gap: 20px; }
  .rh-pane-head { flex-direction: column; }
  .rh-save-bar { position: static; }
}
@media (max-width: 480px) {
  .rh-settings-side-title { font-size: 18px; }
  .rh-pane-head h1 { font-size: 22px; }
}

/* =========================================================
 * v9.1 polish — verified badge as <img>, stock icons,
 * mobile responsiveness.
 * ========================================================= */

/* Verified / owner / staff badges (rendered as <img>). Reset all legacy
   .vbadge pill chrome (padding / bg / border / shadow) so only the SVG
   artwork itself shows. */
img.vbadge {
  display: inline-block;
  vertical-align: -3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  padding: 0 !important;
  margin: 0;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit;
  filter: none;
  object-fit: contain;
}
img.vbadge-md { width: 20px; height: 20px; vertical-align: -4px; }
img.vbadge-lg { width: 22px; height: 22px; vertical-align: -5px; }

/* Marketplace Current Stock icons */
.stock-row .sr-key { display: inline-flex; align-items: center; gap: 6px; }
img.stock-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Fluid images across the site */
img, svg { max-width: 100%; height: auto; }
img.vbadge, img.stock-icon, .brand-mark, .avatar img, .vendor-avatar img { height: auto; }

/* =========================================================
 * Responsive layout — no design changes, just breakpoints.
 * ========================================================= */
@media (max-width: 960px) {
  .wrap { padding: 20px 16px; }
  .hero { grid-template-columns: 1fr !important; gap: 24px; }
  .hero-visual { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .foot-inner { grid-template-columns: 1fr !important; gap: 24px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }
  .nav-links { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-links a { white-space: nowrap; }
  .nav-right { margin-left: auto; }
  .brand-text { font-size: 16px; }

  h1 { font-size: 26px !important; line-height: 1.2; }
  h2 { font-size: 20px; }

  .mp-hero { flex-direction: column; align-items: flex-start; }
  .mp-cta { width: 100%; }
  .mp-filters { flex-wrap: wrap; gap: 8px; }
  .mp-filters > * { flex: 1 1 140px; min-width: 0; }
  .mp-filters .search-box { flex-basis: 100%; }

  .vendor-grid,
  .listing-grid,
  .grid { grid-template-columns: 1fr !important; }

  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-box { padding: 10px; }

  .profile-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .profile-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }

  .rh-settings { grid-template-columns: 1fr !important; }
  .rh-settings-side { position: static; }
  .rh-settings-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
  }
  .rh-settings-nav-btn { flex: 0 0 auto; white-space: nowrap; }
  .rh-settings-help { display: none; }

  .rh-field-row,
  .rh-field-row--3,
  .rh-mp-media,
  .mp-create-grid { grid-template-columns: 1fr !important; }

  .rh-preview-row { flex-direction: column; align-items: flex-start; gap: 12px; }

  .sellers-toolbar,
  .listing-actions { flex-wrap: wrap; gap: 8px; }

  .btn { min-height: 40px; }

  /* Any horizontally-overflowing tables become scrollable */
  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 460px) {
  .wrap { padding: 16px 12px; }
  .stats { grid-template-columns: 1fr !important; }
  .foot-cols { grid-template-columns: 1fr; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
  .listing-tags { gap: 6px; }
}

/* Prevent horizontal page overflow on any device. */
html, body { overflow-x: hidden; max-width: 100%; }
* { box-sizing: border-box; }

/* =========================================================
 * v10 — vendor card: likes, reps, rates, payment settings.
 * ========================================================= */

/* Like button (heart + count) */
.vendor-fav {
  width: auto;
  min-width: 34px;
  padding: 0 10px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.vendor-fav .fav-count { line-height: 1; }
.vendor-fav.active { color: #ff6b8a; border-color: #ff6b8a55; background: #2a1119cc; }
.vendor-fav[disabled] { opacity: .6; }

/* Reps line */
.vendor-reps {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; font-size: 14px; color: var(--text);
}
.vendor-reps strong { color: var(--accent); font-size: 16px; }

.discord-btn--muted {
  background: #141a14; color: var(--text);
  border-color: var(--border); box-shadow: none;
}
.discord-btn--muted:hover { background: #1a221a; }

.vendor-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Settings › Marketplace payment method picker */
.rh-pay-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px; margin-top: 10px;
}
.rh-pay-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #101610;
  font-size: 13px; cursor: pointer;
}
.rh-pay-opt:hover { border-color: var(--accent); }
.rh-pay-opt input { accent-color: var(--accent); }
:root[data-theme="light"] .rh-pay-opt { background: #fff; }

/* Role badges rendered side-by-side (owner, staff, verified) */
.badge-row-inline { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.badge-row-inline img.vbadge { vertical-align: middle; }

/* FAQ (home page) */
.faq-section { margin-top: 32px; }
.faq-section h2 { font-size: 22px; margin: 0 0 4px; }
.faq-section .subtitle { color: var(--muted, #8a8f98); margin-bottom: 16px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; background: rgba(255,255,255,0.02); padding: 0; overflow: hidden; }
.faq-item[open] { background: rgba(158,240,26,0.04); border-color: rgba(158,240,26,0.25); }
.faq-item summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: #9ef01a; transition: transform .15s; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 16px 14px; color: rgba(255,255,255,0.75); line-height: 1.55; }

/* Search suggestions badge alignment */
.suggest a .s-title { display: inline-flex; align-items: center; gap: 6px; }

/* ===== Role badge hover tooltip (Owner / Staff / Verified) ===== */
.role-tip { position: relative; display: inline-flex; align-items: center; outline: none; }
.role-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 4px 9px;
  border-radius: 7px;
  background: #10130f;
  border: 1px solid #9ef01a55;
  color: #eaffd6;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  line-height: 1.4;
  box-shadow: 0 6px 18px #0009;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 60;
}
.role-tip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translate(-50%, 4px);
  border: 5px solid transparent;
  border-top-color: #9ef01a55;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 60;
}
.role-tip:hover::after, .role-tip:focus-visible::after,
.role-tip:hover::before, .role-tip:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== Admin (role manager) page ===== */
.admin-grid { display: grid; gap: 14px; }
.admin-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-row input, .admin-row select {
  padding: 9px 11px; border-radius: 9px; background: #0f120e;
  border: 1px solid #ffffff1a; color: inherit; font: inherit;
}
.admin-row input { flex: 1; min-width: 190px; }
.admin-msg { margin-top: 10px; font-size: 13px; }
.admin-msg.err { color: #ff8080; }
.admin-msg.ok { color: #9ef01a; }
.role-list { margin-top: 14px; display: grid; gap: 8px; }
.role-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid #ffffff12; background: #0e110d;
}
.role-list-item .grow { flex: 1; min-width: 0; }

/* =========================================================
   Modernized Review System (rv-*)
   Uses existing tokens: --accent, --panel, --border, --text, --muted, --bg-2
   ========================================================= */

.rv-stars { color: var(--accent); letter-spacing: 1px; font-size: 14px; }
.rv-stars-off { color: #2a3428; }

/* ---- Login gate card ---- */
.rv-gate {
  margin-top: 20px;
  text-align: center;
  padding: 40px 24px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(158,240,26,0.04), rgba(158,240,26,0) 60%),
    var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rv-gate-icon {
  font-size: 32px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 12px #9ef01a40);
}
.rv-gate-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.rv-gate-sub { margin: 0 0 20px; }
.rv-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 14px;
  background: #12181280;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1px solid #2a3628;
  box-shadow: 0 0 0 0 rgba(158,240,26,0), 0 4px 20px -8px rgba(158,240,26,0.15);
  transition: background 220ms ease, color 220ms ease, transform 220ms ease,
              box-shadow 260ms ease, border-color 220ms ease;
  cursor: pointer;
}
.rv-login-btn:hover {
  background: var(--accent);
  color: #0a0d0a;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(158,240,26,0.12), 0 8px 28px -6px rgba(158,240,26,0.45);
}
.rv-login-btn:active { transform: translateY(0); }

/* ---- Form panel ---- */
.rv-form-panel {
  margin-top: 20px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(158,240,26,0.03), rgba(0,0,0,0) 40%),
    var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.rv-form-head { margin-bottom: 18px; }
.rv-form-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.rv-form-sub { margin: 0; font-size: 13px; }
.rv-form { display: flex; flex-direction: column; gap: 16px; }
.rv-field { display: flex; flex-direction: column; gap: 6px; }
.rv-label { font-size: 13px; font-weight: 600; color: var(--text); }
.rv-req { color: var(--accent); }
.rv-char { font-size: 12px; text-align: right; }

.rv-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d120d;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 96px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.rv-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(158,240,26,0.15);
}

/* ---- Interactive star input ---- */
.rv-star-input {
  display: inline-flex;
  gap: 6px;
  padding: 4px 0;
}
.rv-star-input button {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  color: #2a3428;
  transition: color 180ms ease, transform 180ms ease, filter 220ms ease;
}
.rv-star-input button:hover,
.rv-star-input button.hover {
  color: var(--accent);
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px #9ef01a55);
}
.rv-star-input button.on {
  color: var(--accent);
  filter: drop-shadow(0 0 6px #9ef01a55);
}
.rv-star-input button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.rv-star-hint {
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
  transition: color 200ms ease;
}
.rv-star-hint.is-active { color: var(--accent); font-weight: 600; }

/* ---- Submit button + spinner ---- */
.rv-submit-btn {
  align-self: flex-start;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 1px solid #2a3628;
  background: #12181280;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease,
              box-shadow 260ms ease, border-color 220ms ease;
}
.rv-submit-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #0a0d0a;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(158,240,26,0.4);
}
.rv-submit-btn:disabled { opacity: 0.7; cursor: wait; }
.rv-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--accent);
  animation: rv-spin 700ms linear infinite;
}
.rv-submit-btn.is-loading .rv-spinner { display: inline-block; }
.rv-submit-btn.is-loading .rv-submit-label { opacity: 0.75; }
.rv-submit-btn.is-loading:hover { background: #12181280; color: var(--text); }
@keyframes rv-spin { to { transform: rotate(360deg); } }

/* ---- Alerts ---- */
.rv-alert {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid transparent;
}
.rv-error {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.35);
  color: #fca5a5;
}
.rv-success {
  background: rgba(158,240,26,0.08);
  border-color: rgba(158,240,26,0.35);
  color: var(--accent);
}

/* ---- Summary panel ---- */
.rv-summary-panel { padding: 24px; border-radius: 16px; }
.rv-panel-head { margin-bottom: 18px; }
.rv-panel-title { margin: 0 0 2px; font-size: 18px; font-weight: 700; }

.rv-summary {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 28px;
  align-items: center;
}
.rv-summary-score { text-align: center; }
.rv-score-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(158,240,26,0.25);
}
.rv-score-max { font-size: 18px; color: var(--muted); font-weight: 600; }
.rv-score-stars { margin: 8px 0 6px; font-size: 18px; }
.rv-score-stars .rv-stars { font-size: 20px; letter-spacing: 2px; }
.rv-score-sub { font-size: 12px; }

.rv-summary-bars { display: flex; flex-direction: column; gap: 8px; }
.rv-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 200ms ease;
}
.rv-bar-row:hover { background: rgba(158,240,26,0.05); }
.rv-bar-label { color: var(--accent); font-size: 12px; letter-spacing: 1px; }
.rv-bar-label .rv-stars-off { color: #2a3428; }
.rv-bar-track {
  height: 8px;
  background: #1a221b;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.rv-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(158,240,26,0.35);
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.rv-bar-count { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- Filters ---- */
.rv-list-panel { padding: 20px 20px 22px; border-radius: 16px; }
.rv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.rv-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0d120d80;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.rv-chip:hover { color: var(--text); border-color: #2a3628; transform: translateY(-1px); }
.rv-chip.is-active {
  background: var(--accent);
  color: #0a0d0a;
  border-color: var(--accent);
  box-shadow: 0 4px 16px -6px rgba(158,240,26,0.5);
}

/* ---- Review card ---- */
.rv-list { display: flex; flex-direction: column; gap: 12px; }
.rv-empty { padding: 20px; text-align: center; }

.rv-card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e130e80;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 260ms ease, background 220ms ease;
}
.rv-card:hover {
  border-color: #2c3a2b;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -18px rgba(158,240,26,0.35);
}
.rv-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.rv-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #1a221b;
  color: var(--accent);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.rv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rv-card-meta { flex: 1; min-width: 0; }
.rv-card-name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--text);
  flex-wrap: wrap;
}
.rv-verified {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(158,240,26,0.12);
  color: var(--accent);
  border: 1px solid rgba(158,240,26,0.3);
}
.rv-card-sub { font-size: 12px; }
.rv-card-rating .rv-stars { font-size: 15px; letter-spacing: 1.5px; }
.rv-card-body {
  margin: 4px 0 10px;
  color: #c8d0c9;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.rv-card-foot { display: flex; justify-content: flex-end; }
.rv-helpful {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease, transform 200ms ease;
}
.rv-helpful:hover { color: var(--text); border-color: #2a3628; transform: translateY(-1px); }
.rv-helpful.is-voted {
  color: var(--accent);
  border-color: rgba(158,240,26,0.4);
  background: rgba(158,240,26,0.08);
}
.rv-helpful-count { font-variant-numeric: tabular-nums; }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .rv-summary { grid-template-columns: 1fr; gap: 18px; }
  .rv-summary-score { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
  .rv-bar-row { grid-template-columns: 70px 1fr 36px; gap: 10px; }
  .rv-star-input button { font-size: 28px; }
  .rv-score-num { font-size: 38px; }
  .rv-card-head { flex-wrap: wrap; }
  .rv-card-rating { margin-left: 52px; }
  .rv-form-panel, .rv-summary-panel, .rv-list-panel { padding: 18px; }
}

/* =====================================================================
   v11 — multiple badges, badge manager, permissions
   ===================================================================== */

/* Inline badge row next to any username: clean horizontal row, wraps. */
.badge-row-inline { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; vertical-align: middle; max-width: 100%; }
.badge-pill { line-height: 0; }
.vbadge-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.35em; height: 1.35em; border-radius: 999px;
  background: color-mix(in oklab, var(--badge-color, #9ef01a) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--badge-color, #9ef01a) 45%, transparent);
  color: var(--badge-color, #9ef01a);
}
.badge-more {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  background: color-mix(in oklab, var(--fg, #fff) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--fg, #fff) 18%, transparent);
  color: inherit; cursor: default;
}

/* Named chips (profile page) */
.badge-chip {
  background: color-mix(in oklab, var(--badge-color, var(--bd, #9ef01a)) 15%, transparent);
  border: 1px solid color-mix(in oklab, var(--badge-color, var(--bd, #9ef01a)) 40%, transparent);
  color: var(--badge-color, var(--bd, #9ef01a));
}
.badge-chip img { display: block; }

/* Admin panel */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.admin-tab {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: transparent; border: 1px solid color-mix(in oklab, currentColor 18%, transparent);
  color: inherit; cursor: pointer;
}
.admin-tab.is-active { background: color-mix(in oklab, var(--accent, #9ef01a) 18%, transparent); border-color: var(--accent, #9ef01a); color: var(--accent, #9ef01a); }
.admin-cols { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .admin-cols { grid-template-columns: 1fr; } }
.admin-msg { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.admin-msg.ok  { background: color-mix(in oklab, #9ef01a 15%, transparent); color: #9ef01a; }
.admin-msg.err { background: color-mix(in oklab, #ff6b6b 15%, transparent); color: #ff8a8a; }
.admin-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-row input:not([type=color]) { flex: 1 1 160px; }
.admin-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.admin-check input { width: auto; }

.badge-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.badge-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; opacity: .85; }
.badge-form .span2 { grid-column: 1 / -1; }
.badge-form input, .badge-form select {
  padding: 9px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  background: color-mix(in oklab, currentColor 6%, transparent);
  border: 1px solid color-mix(in oklab, currentColor 16%, transparent); color: inherit;
}
.badge-form input[type=color] { padding: 2px; height: 38px; }
.badge-preview { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in oklab, currentColor 6%, transparent); }
.badge-preview-name { font-size: 13px; font-weight: 700; }

.badge-manage-list { display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow: auto; }
.badge-manage-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  background: color-mix(in oklab, currentColor 5%, transparent); }
.badge-manage-item .grow { flex: 1; min-width: 0; }
.badge-manage-item.is-off { opacity: .45; }
.btn-danger { color: #ff8a8a; border-color: color-mix(in oklab, #ff8a8a 45%, transparent); }

.badge-toggle-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-toggle {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; color: inherit;
  background: color-mix(in oklab, currentColor 6%, transparent);
  border: 1px solid color-mix(in oklab, currentColor 16%, transparent);
}
.badge-toggle.is-on {
  background: color-mix(in oklab, var(--badge-color, #9ef01a) 20%, transparent);
  border-color: var(--badge-color, #9ef01a); color: var(--badge-color, #9ef01a);
}

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.perm-card { padding: 12px; border-radius: 12px; background: color-mix(in oklab, currentColor 5%, transparent); }
.perm-role { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.perm-chip { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: color-mix(in oklab, var(--accent, #9ef01a) 14%, transparent); color: var(--accent, #9ef01a); }

/* Verified sellers get a gradient username (permission: username.gradient). */
.name-gradient {
  background: linear-gradient(90deg, var(--accent, #9ef01a), #6ee7ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===== Username gradients (owner = fixed, verified = user-selectable) ===== */
.uname { display: inline; font-weight: 700; }
.name-grad {
  background-image: var(--name-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
}
.name-grad-lime   { --name-grad: linear-gradient(90deg,#9ef01a,#6ee7ff); }
.name-grad-aurora { --name-grad: linear-gradient(90deg,#38f9d7,#43e97b,#9ef01a); }
.name-grad-sunset { --name-grad: linear-gradient(90deg,#ff9a44,#ff5f6d,#f857a6); }
.name-grad-ocean  { --name-grad: linear-gradient(90deg,#2af598,#009efd); }
.name-grad-candy  { --name-grad: linear-gradient(90deg,#ff6ec4,#7873f5); }
.name-grad-gold   { --name-grad: linear-gradient(90deg,#f7971e,#ffd200,#f7971e); }
.name-grad-ice    { --name-grad: linear-gradient(90deg,#a1c4fd,#c2e9fb,#e0eafc); }
.name-grad-fire   { --name-grad: linear-gradient(90deg,#f83600,#fe8c00,#ffcc00); }
.name-grad-violet { --name-grad: linear-gradient(90deg,#8e2de2,#e94bf5); }
.name-grad-mint   { --name-grad: linear-gradient(90deg,#00f5a0,#00d9f5); }
.name-grad-rose   { --name-grad: linear-gradient(90deg,#ffdde1,#ee9ca7,#ff5f8f); }
/* Owner-only gradient, animated so it always stands out. */
.name-grad-owner {
  --name-grad: linear-gradient(90deg,#ffd700,#ff8a00,#ff4d4d,#ffd700);
  animation: name-grad-shift 6s linear infinite;
}
@keyframes name-grad-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Gradient picker (Settings → Appearance) */
.grad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.grad-opt {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 10px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.10);
  font-weight: 800; font-size: 15px; transition: border-color .15s, transform .1s;
}
.grad-opt:hover { transform: translateY(-1px); }
.grad-opt.on { border-color: #9ef01a; box-shadow: 0 0 0 1px #9ef01a55 inset; }
.grad-opt .grad-sample { font-size: 15px; }

/* ===== Centered info modal ("Want verified badge?") ===== */
body.rh-modal-open { overflow: hidden; }
.rh-modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  animation: rh-modal-fade .16s ease;
}
.rh-modal-backdrop[hidden] { display: none; }
@keyframes rh-modal-fade { from { opacity: 0 } to { opacity: 1 } }
.rh-modal {
  width: min(620px, 100%);
  max-height: 96vh;
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  background: #070907;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  animation: rh-modal-pop .18s cubic-bezier(.2,.8,.3,1);
}
@keyframes rh-modal-pop { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }
.rh-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: #0b0e0b;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.rh-modal-mark {
  width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 999px; object-fit: contain;
}
.rh-modal-head h2 { flex: 1; margin: 0; font-size: clamp(16px, 2.1vh, 20px); font-weight: 800; color: #fff; letter-spacing: -.01em; }
.rh-modal-x {
  background: none; border: 0; color: var(--accent, #9ef01a); cursor: pointer;
  padding: 4px; border-radius: 8px; line-height: 0;
}
.rh-modal-x svg { width: 22px; height: 22px; }
.rh-modal-x:hover { background: color-mix(in oklab, var(--accent, #9ef01a) 14%, transparent); }
.rh-modal-body {
  padding: 14px 16px 4px; overflow: auto; display: grid; gap: 4px;
  scrollbar-width: thin;
}
.rh-modal-q {
  color: var(--accent, #9ef01a); font-weight: 800; margin-top: 10px;
  font-size: clamp(13px, 1.85vh, 16px);
}
.rh-modal-q:first-child { margin-top: 0; }
.rh-modal-a {
  background: #131513;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 10px 13px;
  font-size: clamp(12.5px, 1.7vh, 15px); line-height: 1.45; color: rgba(255,255,255,.90);
  margin-bottom: 2px;
}
.rh-modal-foot { padding: 12px 16px 16px; }
.rh-modal-ok {
  width: 100%; padding: 12px 16px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent, #9ef01a); color: #0a0d0a; font-weight: 800;
  font-size: clamp(14px, 1.9vh, 16px);
}
.rh-modal-ok:hover { filter: brightness(1.08); }
.mp-hero-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.btn-verified-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 10px; cursor: pointer; font-weight: 800; font-size: 14px;
  background: rgba(158,240,26,0.12); color: #9ef01a; border: 1px solid rgba(158,240,26,0.45);
}
.btn-verified-cta:hover { background: rgba(158,240,26,0.2); }

/* ============ Username fonts (Settings → Appearance) ============ */
.name-font-poppins  { font-family: 'Poppins', sans-serif; font-weight: 700; }
.name-font-orbitron { font-family: 'Orbitron', sans-serif; font-weight: 700; letter-spacing: .02em; }
.name-font-bebas    { font-family: 'Bebas Neue', sans-serif; letter-spacing: .06em; font-size: 1.08em; }
.name-font-pacifico { font-family: 'Pacifico', cursive; }
.name-font-pixel    { font-family: 'Press Start 2P', monospace; font-size: .8em; letter-spacing: .02em; }
.name-font-serif    { font-family: 'Playfair Display', serif; font-weight: 700; }
.name-font-monoton  { font-family: 'Monoton', cursive; letter-spacing: .03em; }

.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.font-opt {
  display: flex; align-items: center; justify-content: center;
  height: 62px; padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: #f3f7f0;
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease, background .12s ease;
  overflow: hidden;
}
.font-opt:hover { transform: translateY(-1px); background: rgba(255,255,255,.06); }
.font-opt.on { border-color: #9ef01a; box-shadow: 0 0 0 1px #9ef01a55 inset; }
.font-opt .font-sample { font-size: 22px; line-height: 1; white-space: nowrap; }
.font-opt .font-name { display: none; }

/* ============ Header language switch ============ */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); }
.lang-switch button { border: 0; background: transparent; color: #9aa79a; font-size: 12px;
  font-weight: 700; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.lang-switch button:hover { color: #e9f2e6; }
.lang-switch button.on { background: #9ef01a; color: #0a0d0a; }

/* =====================================================================
   v16 — badge name tooltips (hover/focus any badge, anywhere)
   ===================================================================== */
.has-tip { position: relative; outline: none; }
.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px) scale(.96);
  transform-origin: bottom center;
  padding: 5px 9px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  color: var(--badge-color, var(--accent, #9ef01a));
  background: color-mix(in oklab, #0b0d0c 88%, transparent);
  border: 1px solid color-mix(in oklab, var(--badge-color, var(--accent, #9ef01a)) 38%, transparent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 90;
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.has-tip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, 4px) rotate(45deg);
  background: color-mix(in oklab, #0b0d0c 88%, transparent);
  border-right: 1px solid color-mix(in oklab, var(--badge-color, var(--accent, #9ef01a)) 38%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--badge-color, var(--accent, #9ef01a)) 38%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 90;
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.has-tip:hover::after, .has-tip:focus-visible::after,
.has-tip:hover::before, .has-tip:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}
.has-tip:hover::before, .has-tip:focus-visible::before { transform: translate(-50%, 0) rotate(45deg); }
.badge-pill.has-tip { cursor: help; }
.badge-more.has-tip { cursor: help; }
@media (hover: none) { .has-tip::after, .has-tip::before { display: none; } }
