:root {
  --bg: #0F140F;
  --panel: #18211A;
  --panel-2: #1F2B22;
  --ink: #E6EFE4;
  --muted: #9DB3A3;
  --line: #2B3A2F;
  --brand: #43C463;
  --brand-dark: #63D67E;
  --on-brand: #0B130C;
  --accent: #F2647A;
  --accent-dark: #F2647A;
  --diamond: #56C5E6;
  --gem: #7FC04A;
  --sun: #F2C14E;
  --warn: #E8B23C;
  --danger: #F0746E;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.5), 0 22px 50px rgba(0, 0, 0, 0.55);
  --e-1: 0 1px 2px rgba(0, 0, 0, 0.32), 0 4px 14px rgba(0, 0, 0, 0.28);
  --e-2: var(--shadow);
  --e-3: var(--shadow-lg);
  --radius: 16px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 40px;
  --s-8: 48px;
  --seed: #141414;
  --facet-grad: conic-gradient(from 210deg at 30% 25%, color-mix(in srgb, var(--brand) 60%, transparent), color-mix(in srgb, var(--accent) 55%, transparent) 140deg, color-mix(in srgb, var(--sun) 40%, transparent) 250deg, color-mix(in srgb, var(--brand) 60%, transparent) 360deg);
  --display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --surface-3: #26342A;
  --text: var(--ink);
  --text-2: color-mix(in srgb, var(--ink) 76%, var(--muted));
  --text-muted: var(--muted);
  --fs-display: clamp(32px, 4.5vw, 44px);
  --fs-h1: 30px;
  --fs-h2: 23px;
  --fs-h3: 18px;
  --fs-lg: 17px;
  --fs-base: 16px;
  --fs-sm: 14px;
  --fs-cap: 12.5px;
  --lh-tight: 1.18;
  --lh: 1.55;
  --measure: 72ch;
}

:root[data-theme="light"] {
  --bg: #F1F8EF;
  --panel: #FFFFFF;
  --panel-2: #EAF4E8;
  --ink: #16231A;
  --muted: #5C7060;
  --line: #D6E4D6;
  --brand: #2E9E4F;
  --brand-dark: #268A44;
  --on-brand: #FFFFFF;
  --accent: #E14E68;
  --accent-dark: #C73D55;
  --diamond: #2E86DE;
  --gem: #16A085;
  --sun: #E0890C;
  --warn: #B9770E;
  --danger: #C0392B;
  --shadow: 0 1px 2px rgba(31, 60, 38, 0.06), 0 10px 30px rgba(31, 60, 38, 0.10);
  --shadow-lg: 0 6px 14px rgba(31, 60, 38, 0.10), 0 22px 50px rgba(31, 60, 38, 0.14);
  --e-1: 0 1px 2px rgba(31, 60, 38, 0.05), 0 4px 14px rgba(31, 60, 38, 0.08);
  --e-2: var(--shadow);
  --e-3: var(--shadow-lg);
  --surface-3: #E1EFDF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--fs-base);
  background: var(--bg);
  color: var(--ink);
  line-height: var(--lh);
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, .brand-name, .logo { font-family: var(--display); }
h1, h2, h3 { line-height: var(--lh-tight); }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: #fff;
  padding: 3px;
  object-fit: contain;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 38%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand-name { font-weight: 700; font-size: 21px; letter-spacing: -0.2px; }

.nav-search { display: flex; flex: 1; min-width: 220px; max-width: 560px; position: relative; }

.ac-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px;
  list-style: none; padding: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; max-height: 340px; overflow-y: auto;
}
.ac-dropdown li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ac-dropdown li:last-child { border-bottom: none; }
.ac-dropdown li:hover, .ac-dropdown li.active { background: var(--panel-2); }
.ac-dropdown .ac-name { font-weight: 700; color: var(--ink); }
.ac-dropdown .ac-type { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; font-weight: 800; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; }
.nav-search input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 12px 0 0 12px;
  font-size: 15px;
  font-family: var(--body);
  background: var(--panel-2);
  color: var(--ink);
  outline: none;
}
.nav-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.nav-search button {
  padding: 0 18px;
  border: none;
  border-radius: 0 12px 12px 0;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-family: var(--body);
  cursor: pointer;
}
.nav-search button:hover { filter: brightness(1.06); }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 700; padding: 7px 12px; border-radius: 10px; }
.nav-links a:hover { color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 12%, transparent); text-decoration: none; }
.nav-links a.active { color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 16%, transparent); box-shadow: inset 0 -2px 0 var(--brand); }
.alert-badge { display: inline-block; min-width: 17px; height: 17px; margin-left: 5px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 17px; text-align: center; vertical-align: middle; }
.alert-badge[hidden] { display: none; }
.head-actions { display: inline-flex; gap: 8px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; max-width: 1080px; margin: 0 auto; text-align: left; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); }
.footer-tag { color: var(--muted); font-size: 13px; font-weight: 600; margin: 12px 0 0; max-width: 360px; }
.footer-col h4 { font-family: var(--display); font-size: 13px; margin: 4px 0 12px; color: var(--ink); text-transform: uppercase; letter-spacing: .6px; }
.footer-col a:not(.btn-pill) { display: block; color: var(--muted); font-weight: 700; padding: 4px 0; }
.footer-col a:not(.btn-pill):hover { color: var(--brand); }
.footer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; border: 1px solid transparent; color: #fff; transition: filter .15s ease, transform .15s ease; }
.btn-pill:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }
.btn-pill svg { width: 16px; height: 16px; }
.btn-pill.discord { background: #5865F2; }
.btn-pill.donate { background: var(--accent); }
.btn-pill.disabled { opacity: .5; pointer-events: none; }
.footer-base { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; max-width: 1080px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-base a { color: var(--brand); font-weight: 800; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }
.editor-head { max-width: 720px; margin: 0 auto 4px; }
.editor { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.editor .submit-box { max-width: none !important; margin: 0 !important; width: 100%; }
.editor .submit-box > h2:first-child, .editor .submit-box > label:first-child { margin-top: 0; }
.editor .submit-box h2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.listing-img { width: 100%; height: 120px; object-fit: contain; border-radius: 10px; background: color-mix(in srgb, var(--brand) 6%, transparent); margin-bottom: 8px; }
.card .ask { margin: 6px 0; font-size: 15px; }
.listing { display: flex; gap: 14px; align-items: flex-start; text-align: left; }
.listing .listing-img { width: 80px; height: 80px; flex: none; margin: 0; }
.listing .listing-img.empty { display: block; }
.listing-body { flex: 1; min-width: 0; }
.listing-body .title { margin-bottom: 6px; }
.listing-meta { flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.listing-row { display: block; }
.listing-row-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.listing-row-info { flex: 1; min-width: 0; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.listing-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.listing-edit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle svg { width: 18px; height: 18px; }

main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 56px 20px 38px;
  margin: 8px 0 8px;
  border-radius: 28px;
  background:
    radial-gradient(900px 280px at 15% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(700px 260px at 90% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 55%),
    linear-gradient(180deg, var(--panel), var(--bg));
  border: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% -30% -10%; z-index: 0;
  background: var(--facet-grad);
  opacity: 0.22;
  clip-path: polygon(0 0, 38% 0, 22% 46%, 54% 30%, 40% 72%, 78% 52%, 64% 100%, 0 100%, 100% 100%, 100% 0, 72% 18%, 86% 60%);
  animation: facetDrift 18s ease-in-out infinite;
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle 4px at 14% 30%, var(--seed) 60%, transparent 62%),
    radial-gradient(circle 3px at 84% 24%, var(--seed) 60%, transparent 62%),
    radial-gradient(circle 3px at 76% 76%, var(--seed) 60%, transparent 62%),
    radial-gradient(circle 4px at 24% 78%, var(--seed) 60%, transparent 62%),
    radial-gradient(circle 3px at 50% 14%, var(--seed) 60%, transparent 62%);
  opacity: 0.16;
}
@keyframes facetDrift { 0%, 100% { transform: translate3d(0,0,0) scale(1.02) rotate(0deg); } 50% { transform: translate3d(0,-10px,0) scale(1.06) rotate(2deg); } }

.hero > h1, .hero > p, .hero > .hero-search, .hero > .stat-strip { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); margin: 0 0 10px; letter-spacing: -0.5px; line-height: 1.1; }
.hero p { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 620px; position: relative; }
.hero-search { display: flex; max-width: 600px; margin: 24px auto 0; box-shadow: var(--shadow-lg); border-radius: 14px; position: relative; }
.hero-search input { flex: 1; padding: 16px 20px; border: 1px solid var(--line); border-right: none; border-radius: 14px 0 0 14px; font-size: 17px; font-family: var(--body); background: var(--panel); color: var(--ink); outline: none; }
.hero-search button { padding: 0 28px; border: none; border-radius: 0 14px 14px 0; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: var(--on-brand); font-weight: 700; font-family: var(--body); font-size: 16px; cursor: pointer; }
.hero-search button:hover { filter: brightness(1.06); }

.stat-strip { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 26px 0 4px; position: relative; }
.stat-pill { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 9px 20px; box-shadow: var(--shadow); }
.stat-pill b { color: var(--brand-dark); font-size: 18px; font-family: var(--display); }
.stat-pill span { color: var(--muted); font-size: 13px; margin-left: 6px; }

.section { margin-top: 38px; }
.section h2 { font-size: 22px; margin: 0 0 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head h2::before { content: ""; display: inline-block; width: 5px; height: 17px; border-radius: 3px; background: var(--brand); margin-right: 10px; vertical-align: -2px; }
.section-head a { font-size: 14px; font-weight: 700; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--e-1);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  overflow: hidden;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--accent)); opacity: 0; transition: opacity 0.14s ease; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
a.card:hover::before { opacity: 1; }
.card .title { font-weight: 800; font-size: 15px; color: var(--ink); margin-bottom: 10px; line-height: 1.25; }
.card .row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.card .row + .row { margin-top: 5px; }

.price { font-weight: 800; font-family: var(--display); }
.price.diamonds { color: var(--diamond); }
.price.gems { color: var(--gem); }
.cur-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; font-weight: 800; padding: 2px 8px 2px 6px; border-radius: 7px; }
.cur-tag.diamonds { background: color-mix(in srgb, var(--diamond) 16%, transparent); color: var(--diamond); }
.cur-tag.gems { background: color-mix(in srgb, var(--gem) 16%, transparent); color: var(--gem); }
.cur-ico { width: 12px; height: 12px; }

.swatch { display: inline-block; width: 15px; height: 15px; border-radius: 5px; border: 1px solid rgba(0,0,0,.18); vertical-align: middle; margin-right: 5px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
th { background: var(--panel-2); color: var(--muted); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s ease; }
tbody tr:hover { background: var(--panel-2); }
td.num, th.num { text-align: right; }

.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-head h1 { font-size: 30px; margin: 0; letter-spacing: -0.4px; }
.crumbs { color: var(--muted); font-size: 14px; margin-bottom: 16px; font-weight: 600; }

.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; box-shadow: var(--shadow); min-width: 130px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.metric .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.metric .v { font-size: 24px; font-weight: 700; margin-top: 2px; font-family: var(--display); }

.chart-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: color-mix(in srgb, var(--brand) 14%, transparent); }
.chart-dot { fill: var(--brand-dark); }

.btn { display: inline-block; padding: 11px 20px; border-radius: 12px; border: none; background: var(--brand); color: var(--on-brand); font-weight: 700; font-family: var(--body); font-size: 15px; cursor: pointer; transition: filter 0.12s ease, transform 0.12s ease; }
.btn:hover { filter: brightness(1.06); text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--brand-dark); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--ink); font-family: var(--body); font-weight: 700; font-size: 13px; cursor: pointer; }
.filters select:focus { outline: none; border-color: var(--brand); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.tab.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.muted { color: var(--muted); }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); font-weight: 600; }
.spinner { text-align: center; padding: 60px; color: var(--muted); font-weight: 700; }
.spinner::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.submit-box { max-width: 540px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.submit-box h2 { margin-top: 0; }
.submit-box label { display: block; font-weight: 700; margin-bottom: 6px; }
.submit-box .field { display: flex; gap: 10px; margin-top: 6px; }
.submit-box input { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-family: var(--body); background: var(--panel-2); color: var(--ink); outline: none; }
.submit-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.submit-box select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-family: var(--body); font-weight: 700; background: var(--panel-2); color: var(--ink); outline: none; cursor: pointer; }
.submit-box select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.note.ok { background: color-mix(in srgb, var(--gem) 16%, transparent); color: var(--gem); }
.note.err { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

.verified { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 16%, transparent); padding: 3px 9px; border-radius: 999px; vertical-align: middle; margin-left: 8px; }
.verified::before { content: "\2714"; font-size: 10px; }

.btn-discord { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; background: #5865F2; color: #fff; font-weight: 700; font-size: 15px; border: none; cursor: pointer; box-shadow: 0 6px 16px rgba(88,101,242,.35); transition: transform .12s ease, filter .12s ease; }
.btn-discord:hover { filter: brightness(1.07); transform: translateY(-1px); text-decoration: none; }

.claim { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.claim .claim-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.claim .claim-name { font-weight: 800; font-size: 16px; }
.status { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 10px; border-radius: 999px; }
.status.pending { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.status.verified { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-dark); }
.status.rejected { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.instruction { margin-top: 12px; padding: 14px 16px; background: var(--panel-2); border: 1px dashed var(--brand); border-radius: 12px; font-size: 14px; }
.instruction b { color: var(--brand-dark); font-size: 17px; font-family: var(--display); }

.wiki-price { margin: 4px 0 14px; font-size: 15px; color: var(--muted); }
.wiki-price b { color: var(--accent-dark); font-family: var(--display); }
.wiki-price a { font-weight: 700; margin-left: 8px; }
.hero-img { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 0 18px; }
.hero-img img { width: 200px; height: 200px; object-fit: contain; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; }
.hero-img #hero-color { font-size: 13px; font-weight: 700; min-height: 16px; }
.wiki-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.wiki-img { margin: 0; width: 92px; text-align: center; position: relative; cursor: pointer; outline: none; }
.wiki-img img { width: 92px; height: 92px; object-fit: contain; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; transition: border-color .12s ease, transform .12s ease; }
.wiki-img:hover img { border-color: var(--brand); transform: translateY(-2px); }
.wiki-img:focus-visible img { border-color: var(--brand); }
.wiki-img.active img { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent); }
.wiki-img figcaption { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }

.storefront { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin: 0 0 18px; }
.storefront .blurb { margin: 0 0 10px; font-size: 16px; color: var(--ink); }
.storefront .contact { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.chip b { color: var(--brand-dark); }
.chip.link { color: var(--brand-dark); font-weight: 700; }
.chip.link:hover { text-decoration: none; border-color: var(--brand); }
.color-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.color-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink); cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.color-chip .swatch { margin: 0; }
.color-chip:hover { border-color: var(--brand); }
.color-chip.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-dark); font-weight: 700; }
.featured { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.featured-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }

.submit-box textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-family: var(--body); background: var(--panel-2); color: var(--ink); outline: none; resize: vertical; }
.submit-box textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.submit-box input[type=color] { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; cursor: pointer; background: var(--panel-2); }
.submit-box .sf-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 12px; }
.submit-box .sf-row .sf-col { flex: 1 1 170px; min-width: 0; }
.submit-box .sf-row .sf-col input, .submit-box .sf-row .sf-col select { width: 100%; }
.submit-box .sf-row .sf-color { flex: 0 0 auto; width: 64px; }
.submit-box .sf-row .sf-color input[type=color] { width: 64px; }
.submit-box .sf-row > .btn { flex: 0 0 auto; height: 46px; align-self: flex-end; }
.listing-edit .sf-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 0; }
.listing-edit .sf-row .sf-col { flex: 1 1 170px; min-width: 0; }
.listing-edit label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.listing-edit input, .listing-edit select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; font-family: var(--body); background: var(--panel-2); color: var(--ink); outline: none; }
.listing-edit select { font-weight: 700; cursor: pointer; }
.listing-edit .sf-row > .btn { flex: 0 0 auto; height: 44px; align-self: flex-end; }
.listing-edit input:focus, .listing-edit select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; max-height: 220px; overflow: auto; padding: 4px; }
.pick { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--ink); }

.footer { border-top: 1px solid var(--line); padding: 38px 28px 28px; margin-top: 44px; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.footer p { color: var(--muted); font-size: 13px; max-width: 640px; margin: 0 auto; font-weight: 600; }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { box-shadow: var(--e-1); }

.dt-wrap { width: 100%; overflow: auto; max-height: min(72vh, 680px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--e-1); -webkit-overflow-scrolling: touch; }
.dt { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: none; border-radius: 0; box-shadow: none; }
.dt th, .dt td { text-align: left; padding: 11px 16px; font-size: var(--fs-sm); border-bottom: 1px solid var(--line); }
.dt thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text-2); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.dt th.num, .dt td.num { text-align: right; }
.dt th.sortable { cursor: pointer; user-select: none; }
.dt th.sortable:hover { color: var(--text); }
.dt tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.dt tbody tr:hover { background: var(--surface-2); }
.dt tbody tr:last-child td { border-bottom: none; }
.dt .empty-cell { text-align: center; padding: 32px; color: var(--muted); font-weight: 600; }
.sort-caret { display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: .25; }
.dt th.sortable:not([aria-sort]) .sort-caret { border-bottom: 5px solid currentColor; }
.dt th[aria-sort] .sort-caret { opacity: .95; }
.dt th[aria-sort="ascending"] .sort-caret { border-bottom: 5px solid currentColor; }
.dt th[aria-sort="descending"] .sort-caret { border-top: 5px solid currentColor; }

.value-cell { display: flex; flex-direction: column; gap: 3px; }
.value-head { font-weight: 800; font-family: var(--display); color: var(--accent-dark); }
.value-sub { font-size: 12px; }
.value-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.freshness { font-size: 11px; color: var(--muted); font-weight: 600; }
.chip.conf-exact, .chip.conf-high, .chip.conf-med { padding: 2px 8px; font-size: 11px; font-weight: 700; border-color: transparent; }
.chip.conf-exact { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-dark); }
.chip.conf-high { background: color-mix(in srgb, var(--diamond) 15%, transparent); color: var(--diamond); }
.chip.conf-med { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

.trust-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 16px; }

.entry-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.entry-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--e-1); color: var(--ink); transition: transform .14s ease, border-color .14s ease; }
.entry-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); transform: translateY(-2px); text-decoration: none; }
.entry-card .t { font-weight: 800; font-family: var(--display); font-size: 16px; }
.entry-card .d { color: var(--muted); font-size: 13px; }

.sk-wrap { padding: 8px 0; }
.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; display: block; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 9%, transparent), transparent); animation: sk 1.3s infinite; }
@keyframes sk { 100% { transform: translateX(100%); } }
.sk-line { height: 22px; margin-bottom: 18px; }
.sk-hero { height: 200px; width: 200px; border-radius: 16px; margin: 0 auto 18px; }
.sk-block { height: 240px; border-radius: 16px; }
.sk-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.sk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.sk-bar { height: 14px; margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }

.kebab { position: relative; display: inline-block; }
.kebab-btn { background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 4px 10px; color: var(--muted); font-weight: 800; cursor: pointer; letter-spacing: 1px; }
.kebab-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.kebab-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 140px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; display: none; }
.kebab.open .kebab-menu { display: block; }
.kebab-menu button { display: block; width: 100%; text-align: left; background: transparent; border: none; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; font-family: var(--body); }
.kebab-menu button:hover { background: var(--surface-2); }
.kebab-menu button.danger { color: var(--danger); }

@keyframes reveal { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.reveal-in > * { animation: reveal 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reveal-in > *:nth-child(1) { animation-delay: 0s; }
.reveal-in > *:nth-child(2) { animation-delay: 0.05s; }
.reveal-in > *:nth-child(3) { animation-delay: 0.1s; }
.reveal-in > *:nth-child(4) { animation-delay: 0.16s; }
.reveal-in > *:nth-child(5) { animation-delay: 0.22s; }
.reveal-in > *:nth-child(n+6) { animation-delay: 0.28s; }

@media (max-width: 960px) {
  main { padding: 22px 18px 56px; }
  .section { margin-top: 30px; }
}

@media (max-width: 640px) {
  .topbar { gap: 12px; padding: 10px 16px; }
  .nav-search { order: 3; max-width: none; flex-basis: 100%; }
  .nav-links { gap: 4px; flex-wrap: wrap; }
  .nav-links a { padding: 6px 10px; font-size: 14px; }
  main { padding: 18px 14px 48px; }
  .hero { padding: 38px 16px 26px; border-radius: 22px; }
  .detail-head h1 { font-size: 24px; }
  .stat-row { gap: 10px; }
  .metric { flex: 1 1 130px; padding: 12px 16px; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 18px; }
  .hero-search { flex-wrap: wrap; box-shadow: none; }
  .hero-search input { border-radius: 14px; border-right: 1px solid var(--line); }
  .hero-search button { width: 100%; margin-top: 8px; border-radius: 14px; padding: 14px; }
  .have-form input, .have-form select, .have-form button { flex: 1 1 100%; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-in > *, .hero::before { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

.img-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.cta-have { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--e-1); }
.cta-have::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 180px; background: var(--facet-grad); opacity: 0.12; clip-path: polygon(40% 0, 100% 0, 100% 100%, 64% 100%, 82% 50%); pointer-events: none; }
.cta-have h2 { margin: 0 0 6px; font-size: 19px; position: relative; }
.cta-have p { margin: 0 0 14px; position: relative; }
.cta-have .have-form, .cta-have #have-msg { position: relative; }
.have-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.have-form input, .have-form select { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-family: var(--body); background: var(--panel-2); color: var(--ink); outline: none; }
.have-form input { flex: 1 1 220px; min-width: 0; }
.have-form input:focus, .have-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
#have-msg:not(:empty) { display: block; margin-top: 10px; }
.img-badge { position: absolute; top: 4px; left: 4px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.storefront-banner { width: 100%; max-height: 160px; object-fit: cover; border-radius: 12px; margin: 0 0 14px; display: block; }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-left: 8px; }
.presence .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.presence.online { color: var(--gem); }
.presence.online .dot { background: var(--gem); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gem) 22%, transparent); }
.presence.offline { color: var(--muted); }
.presence.offline .dot { background: var(--muted); }
