[hidden] { display: none !important; }
:root {
  --bg: #060a14;
  --bg-alt: #0a1120;
  --surface: #0d1526;
  --surface-2: #121e35;
  --border: #1e2c47;
  --border-soft: #17233b;
  --text: #eaf0fb;
  --text-dim: #8b99b8;
  --accent: #a855f7;
  --accent-2: #e879f9;
  --accent-deep: #7c3aed;
  --radius: 14px;

  --huge: #8b5cf6;
  --titanic: #f59e0b;
  --gargantuan: #f43f5e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 550px at 12% -8%, rgba(168, 85, 247, 0.20) 0%, transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(124, 58, 237, 0.16) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2 { margin: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35);
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.2px; }
.brand-name em { font-style: normal; color: var(--accent-2); }

.tabs {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  width: fit-content;
}
.tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  transition: all .15s ease;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.topbar-actions { display: flex; gap: 10px; margin-left: auto; }
.calc-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: border-color .15s ease;
}
.calc-toggle:hover { border-color: var(--accent); }
.calc-count {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ---------- Page ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 20px 24px 80px; }

.view-section { display: none; opacity: 0; transition: opacity .25s ease; }
.view-section.active { display: block; opacity: 1; }

.page-heading { padding: 28px 2px 22px; }
.page-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.page-heading h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.4px; }
.page-heading p { color: var(--text-dim); margin: 8px 0 0; font-size: 14.5px; }

/* ---------- Controls ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.search-wrap {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-dim);
}
.search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.category-pills {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.pill {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all .15s ease;
}
.pill:hover { color: var(--text); }
.pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
}

.variant-select-wrap, .sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
}
.variant-select-wrap label, .sort-wrap label {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}
.variant-select-wrap select, .sort-wrap select {
  background: transparent;
  color: var(--text);
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}
.variant-select-wrap select option, .sort-wrap select option { background: var(--surface-2); }

.result-count {
  color: var(--text-dim);
  font-size: 13px;
  margin: 14px 2px 16px;
}

/* ---------- Grid / cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 14px 32px rgba(0,0,0,0.4);
}

.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 8px;
  border-radius: 999px;
  color: white;
}
.badge-huge { background: var(--huge); }
.badge-titanic { background: var(--titanic); }
.badge-gargantuan { background: var(--gargantuan); }

.card-img-wrap {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.card-img-wrap img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5));
}
.variant-golden img { filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5)) sepia(0.55) saturate(3) hue-rotate(-10deg) brightness(1.05); }
.variant-rainbow img { filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5)) saturate(2.4) hue-rotate(0deg); animation: hue 4s linear infinite; }
.variant-shiny img { filter: drop-shadow(0 0 10px rgba(255,255,255,0.5)) brightness(1.15) contrast(1.05); }
.variant-goldenShiny img { filter: drop-shadow(0 0 10px rgba(255,215,0,0.55)) sepia(0.55) saturate(3) hue-rotate(-10deg) brightness(1.2); }
.variant-rainbowShiny img { filter: drop-shadow(0 0 10px rgba(255,255,255,0.55)) saturate(2.6) brightness(1.15); animation: hue 4s linear infinite; }
@keyframes hue { from { filter: hue-rotate(0deg) saturate(2.4); } to { filter: hue-rotate(360deg) saturate(2.4); } }

.card-name { font-weight: 700; font-size: 15px; margin: 2px 0 10px; }

.card-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 6px; color: var(--text-dim); }
.card-row strong { color: var(--text); font-size: 14px; }

.demand-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  color: white;
}

.card-updated { font-size: 11px; color: var(--text-dim); margin-top: 8px; opacity: 0.75; }

.card-add {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 11.5px;
  transition: all .15s ease;
}
.card-add:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(3, 6, 13, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  position: relative;
  padding: 28px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.modal-header { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.modal-img { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.modal-img img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5)); }
.modal-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }

.variant-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.variant-table th, .variant-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.variant-table th { color: var(--text-dim); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.4px; }
.variant-table td.value-cell { font-weight: 700; }
.variant-table button {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.variant-table button:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Trade Calculator ---------- */
.trade-calc-container { max-width: 1100px; margin: 10px auto 0; }
.trade-calc-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.trade-calc-hint { color: var(--text-dim); font-size: 13.5px; margin: 0; }
.clear-btn {
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: border-color .15s ease;
}
.clear-btn:hover { border-color: var(--gargantuan); color: var(--gargantuan); }

.trade-sides {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 760px) {
  .trade-sides { grid-template-columns: 1fr; }
  .trade-vs { justify-self: center; }
}

.trade-vs {
  align-self: center;
  color: var(--text-dim);
  font-weight: 800;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 40px;
}

.trade-side {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.trade-side-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 15px;
  font-weight: 800;
  font-size: 14px;
}
.trade-side-header span:last-child { color: var(--accent-2); }
.trade-box-list {
  min-height: 160px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-summary-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.trade-summary-bar strong { color: var(--text); font-size: 15px; }

/* ---------- Calculator (shared item row styles) ---------- */
.calc-empty { color: var(--text-dim); font-size: 12.5px; padding: 14px 4px; text-align: center; }

.calc-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--bg-alt);
  font-size: 13px;
}
.calc-item-name { display: flex; flex-direction: column; }
.calc-item-name span.variant-tag { font-size: 10.5px; color: var(--text-dim); }
.calc-item-value { font-weight: 700; color: var(--accent-2); }
.calc-item-remove {
  background: transparent; border: none; color: var(--gargantuan); font-size: 16px; font-weight: 800; padding: 0 4px;
}

/* ---------- Value Updates feed ---------- */
.updates-list { display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.update-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.update-row-img { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.update-row-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.update-row-main { flex: 1; min-width: 0; }
.update-row-name { font-weight: 700; font-size: 14px; }
.update-row-name .variant-tag { color: var(--text-dim); font-weight: 600; font-size: 12px; margin-left: 6px; }
.update-row-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.update-row-value { text-align: right; }
.update-row-value strong { font-size: 15px; color: var(--accent-2); display: block; }
.update-row-value .update-time { font-size: 11px; color: var(--text-dim); }

.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 30px 20px 20px;
  border-top: 1px solid var(--border-soft);
}
.footer-logo { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 10px; }

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .topbar-actions { margin-left: 0; }
}

/* ---------- Home ---------- */
.home-view { min-height: calc(100vh - 82px); display: flex !important; align-items: center; }
.home-hero {
  width: 100%;
  min-height: 650px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 70px;
}
.home-copy { padding-left: 10px; position: relative; z-index: 2; }
.home-eyebrow {
  color: #e879f9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.home-copy h1 {
  margin-top: 10px;
  font-size: clamp(58px, 7vw, 96px);
  line-height: .88;
  letter-spacing: -4px;
  font-weight: 800;
}
.home-copy h1 span {
  color: #fff;
}
.home-copy p {
  max-width: 560px;
  color: #b7bfd2;
  font-size: 16px;
  line-height: 1.65;
  margin: 28px 0 26px;
}
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.home-actions button {
  border-radius: 12px;
  padding: 13px 20px;
  font: 800 14px inherit;
  color: white;
  cursor: pointer;
}
.home-primary {
  border: 1px solid #ec4899;
  background: linear-gradient(135deg, #db2777, #9333ea);
  box-shadow: 0 12px 30px rgba(168,85,247,.22);
}
.home-secondary {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}
.home-actions button span { margin-left: 12px; font-size: 18px; }
.home-note { margin-top: 44px; color: #8d95aa; font-size: 13px; }
.home-art { position: relative; min-height: 510px; display:flex; align-items:center; justify-content:center; }
.home-art img {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  max-height: 540px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 30px 80px rgba(168,85,247,.24);
}
.home-glow {
  position: absolute;
  width: 80%;
  height: 70%;
  background: radial-gradient(circle, rgba(168,85,247,.30), transparent 68%);
  filter: blur(18px);
}
.home-float {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  background: rgba(8,8,14,.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 35px rgba(0,0,0,.35);
}
.home-float-top { top: 7%; right: -4%; }
.home-float-bottom { bottom: 5%; left: -4%; }
.float-icon {
  width: 38px; height: 38px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 11px;
  background: linear-gradient(135deg,#ec4899,#9333ea);
  font-size: 20px; font-weight: 800;
}
.home-float strong { display:block; font-size:13px; }
.home-float small { display:block; color:#8f96a8; font-size:11px; margin-top:2px; }

.home-view ~ .view-section { /* keep normal sections unchanged */ }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 30px; }
  .home-copy { padding-left: 0; }
  .home-art { min-height: 360px; }
  .home-float-top { right: 0; }
  .home-float-bottom { left: 0; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; }
  .brand { width: 100%; }
  .tabs { order: 3; width: 100%; overflow-x: auto; justify-content: center; }
}

/* ---------- Pet card corner labels ---------- */
.card-corner-badge {
  position: absolute;
  top: 10px;
  z-index: 4;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: rgba(5, 5, 10, .78);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
}
.rap-badge { left: 10px; color: #d8b4fe; }
.exist-badge { right: 10px; color: #f5a8d8; }
.card-img-wrap { padding-top: 8px; }

/* ---------- Home landing ---------- */
.home-view { margin: -20px -24px 0; }
.home-landing {
  position: relative;
  min-height: calc(100vh - 82px);
  overflow: hidden;
  padding: 74px 24px 70px;
  border-bottom: 1px solid var(--border-soft);
}
.home-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,10,20,.72) 0%, rgba(6,10,20,.82) 44%, var(--bg) 88%),
    url('/img/home-pets.png') center 22% / cover no-repeat;
  filter: blur(1px) saturate(.8);
  transform: scale(1.04);
  opacity: .24;
}
.home-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 380px at 50% 20%, rgba(168,85,247,.18), transparent 72%),
    linear-gradient(90deg, rgba(6,10,20,.82), transparent 50%, rgba(6,10,20,.82));
}
.home-content, .home-feature-row { position: relative; z-index: 1; }
.home-content { max-width: 880px; margin: 0 auto; text-align: center; }
.home-eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.4px;
  margin-bottom: 12px;
}
.home-content h1 {
  font-size: clamp(54px, 8vw, 88px);
  line-height: .98;
  letter-spacing: -4px;
  font-weight: 800;
}
.home-content h1 span { color: #fff; }
.home-content h1 { color: var(--accent-2); }
.home-subtitle {
  max-width: 650px;
  margin: 22px auto 30px;
  color: #aeb9ce;
  font-size: 16px;
  line-height: 1.65;
}
.home-search {
  max-width: 680px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  background: rgba(13,21,38,.88);
  border: 1px solid #293858;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
  color: var(--text-dim);
}
.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 15px inherit;
}
.home-search input::placeholder { color: #72809a; }
.home-search button {
  width: 48px; height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  font-size: 24px;
  font-weight: 700;
}
.home-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 820px;
  margin: 16px auto 0;
}
.home-tool {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 13px 16px;
  background: rgba(13,21,38,.82);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.home-tool:hover { transform: translateY(-2px); border-color: rgba(168,85,247,.65); background: rgba(18,30,53,.95); }
.home-tool-primary { border-color: rgba(168,85,247,.45); }
.home-tool-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex: 0 0 38px;
  border-radius: 10px;
  background: rgba(168,85,247,.14);
  color: var(--accent-2);
  font-size: 20px;
}
.home-tool strong, .home-tool small { display: block; }
.home-tool strong { font-size: 14px; }
.home-tool small { margin-top: 3px; color: var(--text-dim); font-size: 11px; }
.home-stats {
  width: fit-content;
  min-width: 450px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(13,21,38,.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.home-stats > div { padding: 12px 24px; border-right: 1px solid var(--border); }
.home-stats > div:last-child { border-right: 0; }
.home-stats strong, .home-stats span { display: block; }
.home-stats strong { color: var(--accent-2); font-size: 22px; }
.home-stats span { color: #9aa7bf; font-size: 11px; margin-top: 2px; }
.home-feature-row {
  max-width: 900px;
  margin: 70px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.home-feature-card {
  background: rgba(13,21,38,.88);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
}
.feature-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(168,85,247,.12);
  color: var(--accent-2);
  font-size: 17px;
}
.home-feature-card h3 { margin: 15px 0 7px; font-size: 15px; }
.home-feature-card p { margin: 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.6; min-height: 40px; }
.home-feature-card button {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d9c5ff;
  font-weight: 700;
  font-size: 12px;
}
.home-feature-card button span { margin-left: 5px; }

@media (max-width: 760px) {
  .home-view { margin-left: -14px; margin-right: -14px; }
  .home-landing { padding: 54px 14px 50px; }
  .home-content h1 { letter-spacing: -2.5px; }
  .home-tools, .home-feature-row { grid-template-columns: 1fr; }
  .home-stats { min-width: 0; width: 100%; }
  .home-stats > div { padding: 11px 10px; }
}

/* ---------- Centered Home ---------- */
.home-view.active {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.home-landing {
  width: min(1320px, 100%);
  margin: 0 auto;
}
.home-content {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.home-feature-row {
  width: min(1120px, 100%);
  margin-left: auto;
  margin-right: auto;
}


/* --- Complete UI fixes --- */
.view-section { display: none !important; opacity: 0; }
.view-section.active { display: block !important; opacity: 1; }
#homeView.active { display: block !important; }
.home-view { min-height: calc(100vh - 110px); }
.home-landing { display:flex; flex-direction:column; align-items:center; text-align:center; width:100%; }
.home-content { width:min(820px,100%); margin:0 auto; display:flex; flex-direction:column; align-items:center; }
.home-search-container { position: relative; width: min(680px, 100%); margin: 0 auto; z-index: 50; }
.home-search { width:100%; position:relative; z-index:51; }
.home-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  transform: none;
  width: 100%;
  margin: 0;
  padding: 6px;
  background: rgba(11, 18, 34, .94);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid rgba(168, 85, 247, .18);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.02);
  text-align: left;
  z-index: 60;
  animation: searchSuggestionsIn .16s ease-out;
}
.home-suggestion {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  transition: background .16s ease, transform .16s ease;
}
.home-suggestion + .home-suggestion { margin-top: 2px; }
.home-suggestion:hover,
.home-suggestion:focus-visible {
  background: rgba(168, 85, 247, .09);
  transform: translateX(2px);
  outline: none;
}
.home-suggestion img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 38px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}
.home-suggestion span { flex: 1; font-weight: 700; font-size: 13px; }
.home-suggestion strong { color: var(--accent-2); font-size: 12px; font-weight: 800; }
.home-no-suggestions { padding: 13px; color: var(--text-dim); font-size: 13px; }

@keyframes searchSuggestionsIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-search:focus-within {
  border-color: rgba(168, 85, 247, .42);
  box-shadow: 0 18px 50px rgba(0,0,0,.3), 0 0 0 4px rgba(168,85,247,.06);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.home-search input { transition: color .18s ease; }
.home-search button { transition: transform .16s ease, filter .16s ease; }
.home-search button:hover { transform: translateY(-1px); filter: brightness(1.06); }

.home-feature-row { width:min(1080px,100%); margin-left:auto; margin-right:auto; }

.trade-gems { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.gem-input-group label { display:block; margin-bottom:7px; color:var(--text-dim); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; }
.gem-input-wrap { display:flex; align-items:center; gap:9px; background:var(--surface); border:1px solid var(--border); border-radius:11px; padding:10px 13px; }
.gem-input-wrap input { width:100%; background:transparent; border:0; outline:0; color:var(--text); font:600 14px inherit; }
.gem-input-wrap span { font-size:15px; }

.modal-meta-badges { display:flex; gap:7px; margin-top:8px; flex-wrap:wrap; }
.modal-meta-badges span { padding:5px 8px; border:1px solid var(--border); border-radius:7px; color:var(--text-dim); font-size:11px; font-weight:800; }
.history-panel { margin:18px 0; padding:14px; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.history-title { font-weight:800; margin-bottom:10px; }
.history-chart { min-height:150px; display:flex; flex-direction:column; justify-content:center; }
.history-chart svg { width:100%; height:190px; }
.history-range { display:flex; justify-content:space-between; color:var(--text-dim); font-size:11px; }
.history-loading,.history-empty { color:var(--text-dim); text-align:center; padding:35px 10px; }
.pet-detail-block { display:grid; grid-template-columns:130px 1fr; gap:9px 14px; padding:14px; margin-bottom:16px; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.detail-label { color:var(--text-dim); font-size:12px; font-weight:700; }
.detail-value { font-weight:800; }
.detail-value small { color:var(--text-dim); font-weight:500; }

@media (max-width:700px) {
  .trade-gems { grid-template-columns:1fr; }
  .pet-detail-block { grid-template-columns:1fr; }
}

/* --- Soft calculator totals & gem inputs --- */
.trade-side-header { transition: background .18s ease, border-color .18s ease; }
.trade-side-header > span:last-child { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.gem-input-wrap { transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.gem-input-wrap:focus-within { border-color: rgba(168,85,247,.42); background: rgba(18,30,53,.88); box-shadow: 0 0 0 4px rgba(168,85,247,.05); }
.gem-input-wrap input::placeholder { color: #66748f; }
