:root, [data-theme="dark"] {
  --bg: #232323;
  --bg-2: #2b2b2b;
  --sidebar: #000000;
  --nav: #000000;
  --panel: #2e2e2e;
  --panel-2: #3a3a3a;
  --border: #3d3d3d;
  --well: #171717;
  --text: #ffffff;
  --muted: #a9a9a9;
  --muted-2: #7c7c7c;
  --yellow: #FFB444;        /* brand orange (primary accent) */
  --yellow-dark: #f0a02e;
  --mint: #B2FFE2;
  --blue: #ADDAEE;
  --purple-1: #B2FFE2;      /* repurposed: feature mockups use mint→sky */
  --purple-2: #ADDAEE;
  --topbar-bg: rgba(0,0,0,.9);
  --nav-h: 66px;
  --sidebar-w: 250px;
  --sidebar-w-collapsed: 74px;
  --topbar-h: 66px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --sidebar: #ffffff;
  --nav: #ffffff;
  --panel: #f5f5f5;
  --panel-2: #ebebeb;
  --border: #e6e6e6;
  --well: #f2f2f2;
  --text: #232323;
  --muted: #5c5c5c;
  --muted-2: #8a8a8a;
  --yellow: #FFB444;
  --yellow-dark: #ef9d24;
  --mint: #B2FFE2;
  --blue: #ADDAEE;
  --purple-1: #B2FFE2;
  --purple-2: #ADDAEE;
  --topbar-bg: rgba(255,255,255,.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; background: var(--bg); }
body { overflow-x: clip; max-width: 100%; }
.main, .content, .nav { max-width: 100%; }

body {
  font-family: 'Clash Display', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* accessibility: visible keyboard focus */
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  z-index: 40;
  transition: width .2s ease, transform .25s ease;
  overflow-x: hidden;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 0 4px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--yellow);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand__text { font-weight: 800; font-size: 22px; letter-spacing: -.5px; white-space: nowrap; }
.brand__gg { color: var(--yellow); }

.sidebar__toggle {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar__toggle:hover { background: var(--panel-2); color: var(--text); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav__item:hover { background: var(--panel); color: var(--text); }
.nav__icon { font-size: 17px; width: 24px; text-align: center; flex-shrink: 0; }
.nav__label { flex: 1; }
.nav__chev { flex-shrink: 0; opacity: .7; }
.nav__sep { height: 1px; background: var(--border); margin: 10px 8px; }

/* Expandable submenu */
.nav__group { display: flex; flex-direction: column; }
.nav__expand { cursor: pointer; }
.nav__expand .nav__chev { transition: transform .2s ease; }
.nav__group.is-open .nav__expand .nav__chev { transform: rotate(180deg); }
.nav__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.nav__group.is-open .nav__sub { max-height: 520px; }
.nav__subitem {
  display: block;
  padding: 9px 12px 9px 49px;
  font-size: 13.5px;
  color: var(--muted-2);
  border-radius: 9px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav__subitem:hover { background: var(--panel); color: var(--text); }
.sidebar.is-collapsed .nav__sub { display: none; }

.nav__badge {
  background: linear-gradient(135deg, #5b6bff, #8b5cf6);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  width: 24px; text-align: center;
  flex-shrink: 0;
  letter-spacing: .5px;
}

/* Collapsed state */
.sidebar.is-collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.is-collapsed .brand__text,
.sidebar.is-collapsed .nav__label,
.sidebar.is-collapsed .nav__chev { display: none; }
.sidebar.is-collapsed .sidebar__brand { justify-content: center; }
.sidebar.is-collapsed .sidebar__toggle { display: none; }
.sidebar.is-collapsed .nav__item { justify-content: center; }

/* ===== Main ===== */
.main { margin-left: 0; min-height: 100vh; }

/* ===== Top navigation bar (V2) ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1320px; margin: 0 auto;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 clamp(10px, 2vw, 20px);
}
.nav__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav__brand .brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--yellow); display: grid; place-items: center; }
.nav__brand .brand__text { font-weight: 600; font-size: 16px; letter-spacing: -.5px; }
.nav__brand .brand__gg { color: var(--yellow); }

.nav__links { display: flex; align-items: center; gap: 2px; }
.navlink {
  position: relative; display: inline-flex; align-items: center; gap: 3px;
  padding: 7px 8px; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: 13.5px; cursor: pointer;
  white-space: nowrap; transition: color .15s, background .15s;
}
.navlink:hover { color: var(--text); background: var(--panel); }
.navlink--active { color: var(--text); }
.navlink--active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--yellow); border-radius: 2px;
}
.navlink__chev { width: 14px; height: 14px; opacity: .7; transition: transform .2s; }
.nav__group { position: relative; }
.nav__group:hover .navlink__chev { transform: rotate(180deg); }

/* mega / dropdown menu */
.mega {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; min-width: 240px; box-shadow: 0 24px 50px -18px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s, transform .16s, visibility .16s; z-index: 60;
}
.mega--wide { min-width: 460px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 72vh; overflow-y: auto; }
.mega--wide a { white-space: normal; }
.nav__group:hover .mega, .nav__group:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.mega a:hover { background: var(--panel); color: var(--text); }

.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
/* search: collapsed to an icon, expands on hover/focus (saves horizontal space) */
.nav__search {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 0; height: 38px; width: 38px; justify-content: center; overflow: hidden;
  transition: width .22s ease, padding .22s ease, border-color .15s; flex-shrink: 0;
}
.nav__search:hover, .nav__search:focus-within { width: 220px; padding: 0 14px; justify-content: flex-start; border-color: var(--yellow); }
.nav__search input { background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 14px; width: 0; padding: 0; transition: width .22s ease; }
.nav__search:hover input, .nav__search:focus-within input { width: 100%; }
.nav__search input::placeholder { color: var(--muted-2); }
.nav__search .search__icon { color: var(--muted-2); flex-shrink: 0; }
/* keep search open on the cards page (it's the main tool there) */
body[data-page="cards"] .nav__search { width: 220px; padding: 0 14px; justify-content: flex-start; }
body[data-page="cards"] .nav__search input { width: 100%; }
.langsel { max-width: 118px; }

.nav__hamb { display: none; background: none; border: none; color: var(--text); cursor: pointer; }

/* mobile menu drawer */
.navmenu { display: none; }
@media (max-width: 1260px) {
  .nav__links { display: none; }
  .nav__actions .nav__search { display: none; }
  .nav__hamb { display: grid; place-items: center; }
  .navmenu {
    display: block; position: fixed; inset: var(--nav-h) 0 0 0;
    background: var(--bg); z-index: 45; padding: 16px clamp(16px,4vw,40px);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s; overflow-y: auto;
  }
  .navmenu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .navmenu a { display: block; padding: 14px 6px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--border); color: var(--text); }
  .navmenu .navmenu__sub a { font-size: 15px; font-weight: 500; color: var(--muted); padding: 10px 6px 10px 18px; }
}

/* center page content */
.content { max-width: 1320px; margin: 0 auto; }

/* ===== Dashboard home (V2) ===== */
.dash-hero { position: relative; text-align: center; padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.dash-hero__title { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 600; line-height: 1.05; letter-spacing: -1.5px; max-width: 1000px; margin: 0 auto; }
.dash-hero__sub { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 660px; margin: 22px auto 34px; }
.dash-hero__search { display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 0 auto; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 8px 8px 8px 18px; }
.dash-hero__search svg { color: var(--muted-2); flex-shrink: 0; }
.dash-hero__search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 16px; }
.dash-hero__search input::placeholder { color: var(--muted-2); }
.dash-hero__search .btn { flex-shrink: 0; }

.dash-section { padding: clamp(24px, 4vw, 40px) 0; }
.dash-h { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 600; letter-spacing: -.5px; margin-bottom: 18px; }

.quicktiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.qtile { position: relative; overflow: hidden; border-radius: 16px; padding: 22px; min-height: 130px; display: flex; flex-direction: column; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text); font-weight: 600;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.qtile:hover { transform: translateY(-4px); border-color: var(--yellow); box-shadow: 0 18px 36px -18px rgba(0,0,0,.55); }
.qtile__badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.qtile__badge svg { color: #232323; }
.qtile__title { font-size: 1.1rem; line-height: 1.2; }
.qtile__arrow { position: absolute; right: 20px; bottom: 20px; font-size: 20px; color: var(--muted-2); transition: transform .16s, color .16s; }
.qtile:hover .qtile__arrow { transform: translateX(4px); color: var(--yellow); }
.qtile--a .qtile__badge { background: #FFB444; }
.qtile--b .qtile__badge { background: #B2FFE2; }
.qtile--c .qtile__badge { background: #ADDAEE; }
.qtile--d .qtile__badge { background: #c3aaff; }

.statband { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 26px; margin: 8px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; color: var(--yellow); }
.stat span { color: var(--muted); font-size: 13px; }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq__item { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; }
.faq__item summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--yellow); font-size: 22px; font-weight: 700; }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { color: var(--muted); font-size: 14px; line-height: 1.6; padding: 0 0 16px; margin: 0; }

.poplist { display: flex; flex-wrap: wrap; gap: 10px; }
.popchip { background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: 9px 18px; border-radius: 999px; font-weight: 500; font-size: 14px; transition: background .15s, color .15s, transform .15s; }
.popchip:hover { background: var(--yellow); color: #232323; transform: translateY(-2px); }

/* ===== Sets: bigger tiles ===== */
.setcard { padding: 22px 18px; min-height: 150px; background: linear-gradient(160deg, var(--panel), var(--bg-2)); }
.setcard__logo { height: 72px; }
.setcard__logo img { max-height: 72px; }

/* ===== Pokémon radar chart ===== */
.radar { max-width: 380px; }
.radar svg { width: 100%; height: auto; overflow: visible; }
.radar__poly { fill: rgba(255,180,68,.28); stroke: var(--yellow); stroke-width: 2; }
.radar__grid { fill: none; stroke: var(--border); stroke-width: 1; }
.radar__axis { stroke: var(--border); stroke-width: 1; }
.radar__label { fill: var(--muted); font-size: 11px; font-family: inherit; }
.radar__val { fill: var(--text); font-size: 11px; font-weight: 600; font-family: inherit; }

/* ===== Deck builder: stats (3rd column) ===== */
.db__stats { background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; position: sticky; top: calc(var(--nav-h) + 14px); align-self: start; }
.db__stats h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.dbstat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.dbstat-row__k { width: 74px; color: var(--muted); }
.dbstat-row__bar { flex: 1; height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.dbstat-row__bar i { display: block; height: 100%; border-radius: 99px; }
.dbstat-row__v { width: 26px; text-align: right; font-weight: 600; }
.dbpie { width: 130px; height: 130px; margin: 6px auto 14px; border-radius: 50%; }

@media (max-width: 760px) {
  .quicktiles { grid-template-columns: repeat(2, 1fr); }
  .statband { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 440px) { .quicktiles { grid-template-columns: 1fr; } .dash-hero__search { flex-wrap: wrap; border-radius: 18px; } .dash-hero__search .btn { width: 100%; } }

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  z-index: 30;
}
.topbar__menu {
  display: none;
  background: none; border: none; color: var(--text);
  cursor: pointer;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0 12px;
  height: 42px;
  width: 320px;
  max-width: 40vw;
}
.search__icon { color: var(--muted-2); flex-shrink: 0; }
.search input {
  background: none; border: none; outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}
.search input::placeholder { color: var(--muted-2); }
.search__filter {
  background: none; border: none; color: var(--muted);
  cursor: pointer; display: grid; place-items: center;
  flex-shrink: 0;
}
.search__filter:hover { color: var(--text); }

.topbar__actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }

.themetoggle { width: 38px; height: 38px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; font-size: 16px; display: grid; place-items: center; transition: background .15s; }
.themetoggle:hover { background: var(--panel-2); }
.langsel { background: var(--panel); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-weight: 600; font-size: 13px; padding: 8px 8px; border-radius: 999px; cursor: pointer; outline: none; max-width: 104px; }
.langsel:hover { background: var(--panel-2); }
.langswitch { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.langswitch button {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 12.5px;
  padding: 5px 11px; border-radius: 999px; transition: background .15s, color .15s;
}
.langswitch button:hover { color: var(--text); }
.langswitch button.is-active { background: var(--yellow); color: #1a1f28; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--ghost { background: var(--panel); color: var(--text); }
.btn--ghost:hover { background: var(--panel-2); }
.btn--yellow { background: var(--yellow); color: #1a1f28; }
.btn--yellow:hover { background: var(--yellow-dark); box-shadow: 0 6px 20px rgba(255,212,59,.25); }
.btn--lg { padding: 16px 34px; font-size: 16px; }

/* ===== Content ===== */
.content { padding: 0 clamp(20px, 6vw, 90px); }

.hero {
  text-align: center;
  padding: clamp(50px, 9vw, 100px) 0 clamp(60px, 8vw, 90px);
  max-width: 1000px;
  margin: 0 auto;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
}
.accent { color: var(--yellow); }
.hero__sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 720px;
  margin: 26px auto 40px;
}
.hero__note { margin-top: 18px; color: var(--muted); font-size: 14px; }
.hero__note strong { color: var(--text); }

/* ===== Feature sections ===== */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  padding: clamp(50px, 7vw, 90px) 0;
  max-width: 1200px;
  margin: 0 auto;
}
.feature--reverse .feature__text { order: 2; }
.feature--reverse .feature__media { order: 1; }

.feature__text h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.feature__text > p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 22px;
  max-width: 480px;
}
.feature__list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.feature__list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 14.5px;
}
.feature__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: inset 0 0 0 3px var(--bg);
}

/* ===== Media mockups ===== */
.feature__media { display: flex; justify-content: center; }
.mock {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 26px 60px -28px rgba(0,0,0,.7);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mock__card { position: relative; margin: 0; }
.mock__card img { width: 100%; border-radius: 9px; display: block; box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.mock__card figcaption { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }

/* Collect mock */
.mock__progress {
  background: #10141b;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mock__set {
  background: linear-gradient(135deg,#ff5f6d,#c21f3a);
  font-weight: 900; font-size: 22px;
  padding: 8px 12px; border-radius: 8px;
  color: #fff; flex-shrink: 0;
}
.mock__bar-wrap { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mock__stat { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 18px; }
.mock__stat small { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 3px; }
.mock__lvl { font-size: 11px; color: var(--yellow); font-weight: 700; }
.mock__bar { height: 7px; background: #2a3240; border-radius: 99px; overflow: hidden; }
.mock__bar i { display: block; height: 100%; background: linear-gradient(90deg,#ff5f6d,var(--yellow)); }
.mock__bar--green i { background: #4ade80; }

.mock__cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.pcard {
  border-radius: 9px;
  aspect-ratio: 5/7;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.pcard__name { font-size: 11px; font-weight: 800; color: #1a1f28; }
.pcard__var { font-size: 9px; font-weight: 700; background: rgba(0,0,0,.35); color: #fff; padding: 2px 5px; border-radius: 5px; align-self: flex-start; }
.pcard--grass { background: linear-gradient(160deg,#8fd694,#4a9d5a); }
.pcard--fire  { background: linear-gradient(160deg,#ffb56b,#e5622f); }
.pcard--water { background: linear-gradient(160deg,#7fc7f5,#3a7fc4); }
.pcard--sm { aspect-ratio: 5/7; width: 54px; }

/* Deck table mock */
.mock__table { background: #10141b; border-radius: 14px; overflow: hidden; }
.mock__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 18px;
  font-size: 14px; font-weight: 600;
  border-bottom: 1px solid #1e2530;
}
.mock__row:last-child { border-bottom: none; }
.mock__row--head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.tag--good { background: rgba(74,222,128,.15); color: #4ade80; }
.tag--bad  { background: rgba(248,113,113,.15); color: #f87171; }

/* Lists mock */
.mock__lists { background: #10141b; border-radius: 14px; padding: 6px; }
.listrow {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  transition: background .15s;
}
.listrow:hover { background: #1a212b; }
.listrow__ico { font-size: 18px; }
.listrow__cnt { margin-left: auto; color: var(--muted); font-size: 13px; background: #232b37; padding: 2px 9px; border-radius: 99px; }

/* Dex mock */
.mock__dex { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dexcell {
  background: #10141b; border-radius: 12px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
}
.dexcell img { width: 36px; height: 36px; image-rendering: pixelated; flex-shrink: 0; }
.dexcell__name { flex: 1; }
.dexcell__num { color: var(--muted-2); font-size: 11px; font-weight: 700; }
.dexcell__dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dexcell--shiny { box-shadow: inset 0 0 0 1.5px var(--yellow); }
.dexcell__dot--grass { background: #4a9d5a; }
.dexcell__dot--fire  { background: #e5622f; }
.dexcell__dot--water { background: #3a7fc4; }
.dexcell__dot--elec  { background: #f5c518; }
.dexcell__dot--psy   { background: #b15fd6; }
.dexcell__dot--norm  { background: #a8a878; }

/* Profile mock */
.mock__profile { background: #10141b; border-radius: 14px; overflow: hidden; padding-bottom: 18px; position: relative; }
.mock__banner { height: 70px; background: linear-gradient(120deg,#ff5f6d,#ffd43b); }
.mock__avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: #232b37; display: grid; place-items: center;
  font-size: 28px; margin: -30px 0 0 20px;
  border: 4px solid #10141b;
}
.mock__uname { font-weight: 800; font-size: 17px; padding: 10px 20px 0; }
.mock__trainer { font-size: 11px; color: var(--yellow); font-weight: 700; display: inline-block; margin-left: 6px; }
.mock__showcase { display: flex; gap: 10px; padding: 16px 20px 0; }

/* Price mock */
.mock__price { background: #10141b; border-radius: 14px; padding: 22px; }
.mock__pval { font-size: 30px; font-weight: 900; }
.mock__pup { font-size: 14px; color: #4ade80; font-weight: 700; }
.mock__psub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mock__chart { width: 100%; height: 90px; margin-top: 16px; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 46px 0 60px;
  text-align: center;
  max-width: 900px;
  margin: 40px auto 0;
}
.footer__copy { font-weight: 700; margin-bottom: 14px; }
.footer__disc { color: var(--muted-2); font-size: 12.5px; max-width: 620px; margin: 0 auto 8px; line-height: 1.6; }
.footer__contact { color: var(--muted); font-size: 13px; margin: 14px 0; }
.footer__contact a { color: var(--yellow); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 13px; color: var(--muted); }
.footer__links a:hover { color: var(--yellow); }
.footer__links span { color: var(--muted-2); }

/* ===== Cards browse page ===== */
.nav__item--active { background: var(--panel); color: var(--text); }
.cards-head { padding: 34px 0 6px; }
.cards-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -.5px; }
.cards-head__meta { color: var(--muted); margin-top: 6px; font-size: 14.5px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  padding: 22px 0 40px;
}
.ccard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.ccard:hover { transform: translateY(-4px); border-color: var(--yellow); box-shadow: 0 16px 32px -12px rgba(0,0,0,.6); }
.ccard__imgwrap { aspect-ratio: 5/7; border-radius: 9px; overflow: hidden; background: var(--well); display: grid; place-items: center; }
.ccard__img { width: 100%; height: 100%; object-fit: contain; }
.ccard__ph { font-size: 40px; opacity: .4; }
.ccard__body { display: flex; flex-direction: column; gap: 2px; }
.ccard__name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard__set { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard__price { color: var(--yellow); font-weight: 800; font-size: 15px; margin-top: 4px; }

/* card ownership badge */
.ccard { position: relative; padding: 0; border: 1px solid var(--border); overflow: visible; }
.ccard__open { background: none; border: none; padding: 12px; width: 100%; cursor: pointer; font-family: inherit; color: var(--text); text-align: left; display: flex; flex-direction: column; gap: 10px; }
.ccard.is-owned { border-color: #4ade80; box-shadow: 0 0 0 1px #4ade80 inset; }
.ccard__own { position: absolute; top: 8px; right: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font-weight: 800; font-size: 15px; cursor: pointer; display: grid; place-items: center; opacity: .85; transition: background .15s, color .15s, opacity .15s; }
.ccard:hover .ccard__own { opacity: 1; }
.ccard__own:hover { color: var(--text); }
.ccard__own.is-owned { background: #4ade80; color: #10241a; border-color: #4ade80; opacity: 1; }
.modal__own { margin-top: 14px; }

/* grid controls */
.cards-wrap { padding-bottom: 20px; }
.gridctl { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 0 6px; }
.gridctl__chips { display: inline-flex; gap: 6px; }
.chip { background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--yellow); color: #1a1f28; border-color: var(--yellow); }
.gridctl__sort { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.gridctl__sort select { background: var(--panel); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: 13px; padding: 7px 10px; border-radius: 9px; cursor: pointer; outline: none; }
.gridctl__count { color: var(--muted-2); font-size: 12.5px; margin-left: auto; }

/* skeleton loaders */
.skel { border-radius: 14px; padding: 12px; background: var(--panel); border: 1px solid var(--border); }
.skel__img { aspect-ratio: 5/7; border-radius: 9px; background: var(--panel-2); }
.skel__line { height: 12px; border-radius: 6px; background: var(--panel-2); margin-top: 10px; }
.skel__line--sm { width: 60%; }
.skel__img, .skel__line { position: relative; overflow: hidden; }
.skel__img::after, .skel__line::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

.cards-status { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 30px 0 60px; color: var(--muted); }
.empty { text-align: center; font-size: 16px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--yellow);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal__box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(860px, 94vw); max-height: 90vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8);
}
.modal__close {
  position: absolute; top: 14px; right: 16px;
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px;
}
.modal__close:hover { color: var(--text); background: var(--panel-2); }
.modal__grid { display: grid; grid-template-columns: 260px 1fr; gap: 26px; }
.modal__img { width: 100%; border-radius: 12px; }
.modal__info h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.5px; }
.modal__sub { color: var(--muted); margin: 4px 0 14px; font-size: 14px; }
.modal__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.mtag { background: var(--panel); border: 1px solid var(--border); padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.mtag--rare { background: rgba(255,212,59,.14); color: var(--yellow); border-color: transparent; }
.modal__stat { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.modal__stat strong { color: var(--text); margin-right: 6px; }
.modal__bigprice { font-size: 2rem; font-weight: 900; color: var(--yellow); margin: 14px 0 4px; }
.modal__bigprice small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.modal__prices { background: var(--panel); border-radius: 12px; padding: 6px 14px; margin: 10px 0 18px; }
.modal__prow { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.modal__prow:last-child { border-bottom: none; }
.modal__prow span:first-child { color: var(--muted); text-transform: capitalize; }

.modal__flavor { color: var(--muted); font-size: 12.5px; font-style: italic; margin-top: 12px; line-height: 1.5; }

/* ===== Price chart ===== */
.pchart { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.pchart__none { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pchart__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.pchart__legend { display: flex; gap: 8px; flex-wrap: wrap; }
.pleg { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--border); color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; opacity: .5; transition: opacity .15s, color .15s; }
.pleg.is-on { opacity: 1; color: var(--text); }
.pleg__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.pchart__ranges { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.prange { border: none; background: none; color: var(--muted); cursor: pointer; font-family: inherit; font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.prange:hover { color: var(--text); }
.prange.is-active { background: var(--yellow); color: #1a1f28; }

.pchart__wrap { position: relative; }
.pchart__svg { width: 100%; height: auto; display: block; }
.pgrid { stroke: var(--border); stroke-width: 1; }
.pytxt { fill: var(--muted-2); font-size: 10px; text-anchor: end; font-family: inherit; }
.pxtxt { fill: var(--muted-2); font-size: 10px; text-anchor: middle; font-family: inherit; }
.pline { stroke-linejoin: round; stroke-linecap: round; }
.phoverline { stroke: var(--muted-2); stroke-width: 1; stroke-dasharray: 3 3; }
.phdot { stroke: #10141b; stroke-width: 2; }
.pchart__tip { position: absolute; pointer-events: none; background: var(--well); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.5); z-index: 5; min-width: 130px; }
.ptip__date { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.ptip__row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ptip__row span { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.pchart__stats { display: flex; gap: 14px; align-items: stretch; margin-top: 16px; flex-wrap: wrap; }
.pstatcard { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; min-width: 150px; }
.pstatcard__k { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.pstatcard__k span { color: var(--muted-2); margin-left: 4px; }
.pstatcard__v { font-size: 20px; font-weight: 800; }
.pstatcard__v.up { color: #4ade80; }
.pstatcard__v.down { color: #f87171; }
.pstat-btn { align-self: center; margin-left: auto; }
.pchart__note { color: var(--muted-2); font-size: 11px; margin-top: 12px; font-style: italic; }

@media (max-width: 620px) {
  .modal__grid { grid-template-columns: 1fr; }
  .modal__imgcol { max-width: 220px; margin: 0 auto; }
  .pstat-btn { margin-left: 0; }
}

/* ===== Shared page bits ===== */
.link { color: #6aa8ff; }
.link:hover { text-decoration: underline; }
.backlink { display: inline-block; color: var(--muted); font-size: 14px; font-weight: 600; margin: 24px 0 4px; }
.backlink:hover { color: var(--yellow); }
.section-h { font-size: 1.4rem; font-weight: 800; margin: 30px 0 4px; }

/* ===== Standalone card page (programmatic SEO) ===== */
.breadcrumbs { color: var(--muted); font-size: 13px; padding: 20px 0 10px; }
.breadcrumbs a:hover { color: var(--yellow); }
.cardpage { display: grid; grid-template-columns: 360px 1fr; gap: 44px; align-items: start; padding: 8px 0 20px; }
.cardpage__media img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 22px 50px -22px rgba(0,0,0,.65); }
.cardpage__info h1 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); font-weight: 600; letter-spacing: -.5px; }
.cardpage__info .modal__sub { margin: 4px 0 14px; }
.cardpage__actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
.cardpage__chart, .cardpage__about { max-width: 900px; padding: 6px 0 30px; }
.cardpage__about p { color: var(--muted); line-height: 1.7; font-size: 15px; }
@media (max-width: 760px) { .cardpage { grid-template-columns: 1fr; gap: 24px; } .cardpage__media { max-width: 300px; } }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.sets-filter { margin: 18px 0 6px; }
.sets-filter input {
  width: 100%; max-width: 520px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 11px;
  padding: 12px 16px; color: var(--text); font-family: inherit; font-size: 14px; outline: none;
}
.sets-filter input::placeholder { color: var(--muted-2); }
.sets-filter input:focus { border-color: var(--yellow); }

/* ===== Sets browser ===== */
.setgroup { margin-top: 30px; }
.setgroup__title { font-size: 1.25rem; font-weight: 800; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.setgroup__title span { font-size: 13px; color: var(--muted-2); font-weight: 600; }
.sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.setcard {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.setcard:hover { transform: translateY(-4px); border-color: var(--yellow); box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); }
.setcard__logo { height: 58px; display: grid; place-items: center; width: 100%; }
.setcard__logo img { max-height: 58px; max-width: 100%; object-fit: contain; }
.setcard__ph { font-size: 34px; opacity: .45; }
.setcard__name { font-weight: 700; font-size: 14px; }
.setcard__meta { font-size: 12px; color: var(--muted); }

/* set detail header */
.sethead { display: flex; align-items: center; gap: 26px; padding: 18px 0 8px; flex-wrap: wrap; }
.sethead__logo { max-height: 90px; max-width: 260px; object-fit: contain; }
.sethead__info h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
.sethead__meta { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.setprogress { display: flex; align-items: center; gap: 12px; }
.setprogress__bar { width: 240px; max-width: 50vw; height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.setprogress__bar i { display: block; height: 100%; background: linear-gradient(90deg,#ff5f6d,var(--yellow)); }
.setprogress__label { font-size: 12px; color: var(--muted); }

/* ===== Pokédex ===== */
.gen-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gen-tab {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  padding: 9px 16px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s;
}
.gen-tab:hover { color: var(--text); }
.gen-tab.is-active { background: var(--yellow); color: #1a1f28; border-color: var(--yellow); }

.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 22px 0 40px; }
.dexcard {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; text-align: center; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.dexcard:hover { transform: translateY(-4px); border-color: var(--yellow); box-shadow: 0 14px 28px -14px rgba(0,0,0,.6); }
.dexcard__imgwrap { aspect-ratio: 1; display: grid; place-items: center; }
.dexcard__imgwrap img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.dexcard__name { font-weight: 700; font-size: 14px; }
.dexcard__num { font-size: 12px; color: var(--muted-2); font-weight: 700; }

/* ===== Pokémon detail ===== */
.pokehead { display: flex; gap: 34px; align-items: center; padding: 16px 0 6px; flex-wrap: wrap; }
.pokehead__art { width: 240px; height: 240px; flex-shrink: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(108,92,231,.35), transparent 65%); }
.pokehead__art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(0,0,0,.5)); }
.pokehead__info { flex: 1; min-width: 280px; }
.pokehead__num { color: var(--muted-2); font-weight: 800; font-size: 14px; }
.pokehead__info h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; }
.pokehead__types { display: flex; gap: 8px; margin: 10px 0; }
.ptype { padding: 5px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; text-transform: capitalize; background: #555; }
.ptype--normal{background:#a8a878}.ptype--fire{background:#f08030}.ptype--water{background:#6890f0}
.ptype--electric{background:#f8d030;color:#333}.ptype--grass{background:#78c850}.ptype--ice{background:#98d8d8;color:#333}
.ptype--fighting{background:#c03028}.ptype--poison{background:#a040a0}.ptype--ground{background:#e0c068;color:#333}
.ptype--flying{background:#a890f0}.ptype--psychic{background:#f85888}.ptype--bug{background:#a8b820}
.ptype--rock{background:#b8a038}.ptype--ghost{background:#705898}.ptype--dragon{background:#7038f8}
.ptype--dark{background:#705848}.ptype--steel{background:#b8b8d0;color:#333}.ptype--fairy{background:#ee99ac;color:#333}
.pokehead__physical { display: flex; gap: 20px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.pokehead__physical strong { color: var(--text); }
.pstats { display: grid; gap: 8px; max-width: 440px; }
.pstat { display: grid; grid-template-columns: 70px 40px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.pstat__k { color: var(--muted); }
.pstat__v { font-weight: 700; text-align: right; }
.pstat__bar { height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.pstat__bar i { display: block; height: 100%; background: linear-gradient(90deg,var(--yellow),#ff5f6d); }

/* ===== Deck builder ===== */
.db { display: grid; grid-template-columns: 1fr 340px 260px; gap: 24px; align-items: start; padding: 14px 0 40px; }
.db-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 14px; }
.db-result { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 8px; cursor: pointer; font-family: inherit; color: var(--text); transition: transform .12s, border-color .12s; }
.db-result:hover { transform: translateY(-3px); border-color: var(--yellow); }
.db-result.is-added { border-color: #4ade80; }
.db-result img { width: 100%; border-radius: 7px; display: block; }
.db-result__add { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: #1a1f28; font-weight: 900; display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.db-result:hover .db-result__add { opacity: 1; }
.db-result__name { font-size: 11px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

.db__deck { background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; position: sticky; top: 84px; }
.deck-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.deck-name { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; color: var(--text); font-family: inherit; font-weight: 700; outline: none; }
.deck-count { font-weight: 900; font-size: 18px; }
.deck-count span { color: var(--yellow); }
.deck-valid { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.vrow { font-size: 12.5px; font-weight: 600; }
.vrow--ok { color: #4ade80; }
.vrow--bad { color: #f0a020; }
.deck-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.deck-list { display: flex; flex-direction: column; gap: 4px; max-height: 460px; overflow-y: auto; }
.deck-group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); font-weight: 700; margin: 10px 0 4px; }
.deck-row { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; }
.deck-row:hover { background: var(--panel); }
.deck-row__img { width: 30px; border-radius: 4px; }
.deck-row__name { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-row__qty { display: flex; align-items: center; gap: 8px; }
.deck-row__qty button { width: 22px; height: 22px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); cursor: pointer; font-weight: 800; line-height: 1; }
.deck-row__qty button:hover { background: var(--yellow); color: #1a1f28; }
.deck-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 0; }
.test-hand { margin-top: 16px; }
.test-hand__title { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); font-weight: 700; margin-bottom: 8px; }
.test-hand__cards { display: flex; gap: 6px; flex-wrap: wrap; }
.test-hand__cards img { width: 46px; border-radius: 5px; }

/* ===== Lists ===== */
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 24px 0 40px; }
.listcard { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; font-family: inherit; color: var(--text); text-align: left; cursor: pointer; transition: transform .15s, border-color .15s; }
.listcard:hover { transform: translateY(-4px); border-color: var(--yellow); }
.listcard__ico { font-size: 30px; }
.listcard__name { font-weight: 700; font-size: 16px; }
.listcard__meta { font-size: 12.5px; color: var(--muted); }
.listcard--new { border-style: dashed; align-items: flex-start; }

/* ===== Stream tools / generic feature cards ===== */
.feature-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 24px 0 10px; }
.fcard { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.fcard__ico { font-size: 32px; margin-bottom: 10px; }
.fcard h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.fcard p { color: var(--muted); font-size: 14px; }

/* ===== Merch ===== */
.merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; padding: 24px 0 40px; }
.merch-item { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px; transition: transform .15s, border-color .15s; }
.merch-item:hover { transform: translateY(-4px); border-color: var(--yellow); }
.merch-item__img { aspect-ratio: 1; border-radius: 11px; display: grid; place-items: center; font-size: 60px; margin-bottom: 12px; }
.merch-item__name { font-weight: 700; font-size: 15px; }
.merch-item__price { color: var(--yellow); font-weight: 800; margin-top: 2px; }

/* ===== Pro / pricing ===== */
.pro-badge-lg { display: inline-block; background: linear-gradient(135deg, #5b6bff, #8b5cf6); color: #fff; font-weight: 900; letter-spacing: 1px; padding: 6px 14px; border-radius: 9px; margin-bottom: 12px; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(240px, 340px)); gap: 22px; justify-content: center; padding: 30px 0 50px; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 30px 26px; position: relative; }
.plan--featured { border-color: var(--yellow); box-shadow: 0 20px 50px -20px rgba(255,212,59,.3); }
.plan__tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--yellow); color: #1a1f28; font-size: 12px; font-weight: 800; padding: 4px 14px; border-radius: 99px; white-space: nowrap; }
.plan h3 { font-size: 22px; font-weight: 800; }
.plan__price { font-size: 42px; font-weight: 900; margin: 8px 0 18px; }
.plan__price span { font-size: 16px; color: var(--muted); font-weight: 600; }
.plan__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.plan__list li { position: relative; padding-left: 26px; font-size: 14px; color: var(--muted); }
.plan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--yellow); font-weight: 900; }
.plan .btn { width: 100%; }

@media (max-width: 1080px) { .db { grid-template-columns: 1fr 340px; } .db__stats { grid-column: 1 / -1; position: static; } }
@media (max-width: 760px) {
  .db { grid-template-columns: 1fr; }
  .db__deck { position: static; }
  .pricing { grid-template-columns: 1fr; }
}

/* ===== Scrim (mobile) ===== */
.scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 35;
  opacity: 0; visibility: hidden;
  transition: opacity .25s;
}
.scrim.is-active { opacity: 1; visibility: visible; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 34px; }
  .feature--reverse .feature__text,
  .feature--reverse .feature__media { order: unset; }
  .feature__text { text-align: center; }
  .feature__text > p { margin-left: auto; margin-right: auto; }
  .feature__list { max-width: 420px; margin-left: auto; margin-right: auto; text-align: left; }
}

@media (max-width: 720px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar.is-collapsed { width: var(--sidebar-w); }
  .sidebar.is-collapsed .brand__text,
  .sidebar.is-collapsed .nav__label,
  .sidebar.is-collapsed .nav__chev { display: block; }
  .main { margin-left: 0 !important; }
  .topbar__menu { display: grid; place-items: center; }
  .search { max-width: none; width: auto; flex: 1; }
  .btn--ghost { display: none; }
}

/* ===== Auth + cloud lists ===== */
.authchip { position: relative; }
.authchip__btn { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--text); font-family: inherit; font-weight: 600; }
.authchip__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: #1a1a1a; display: grid; place-items: center; font-weight: 800; }
.authchip__name { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.authchip__menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 6px; min-width: 160px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.5); display: none; z-index: 60; }
.authchip.is-open .authchip__menu { display: block; }
.authchip__menu a, .authchip__menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: none; color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.authchip__menu a:hover, .authchip__menu button:hover { background: var(--panel); }

.authmodal, .listpick { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; }
.authmodal.is-open, .listpick.is-open { display: flex; }
.authmodal__backdrop, .listpick__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.authmodal__box, .listpick__box { position: relative; background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px; padding: 28px; width: min(92vw, 400px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.authmodal__close, .listpick__close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.authmodal__title { margin: 0 0 18px; font-size: 1.4rem; }
.authform__row { display: block; margin-bottom: 14px; }
.authform__row span { display: block; font-size: 0.8rem; opacity: 0.7; margin-bottom: 5px; }
.authform__row input { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; box-sizing: border-box; }
.authform__row input:focus { outline: none; border-color: var(--yellow); }
.authform__err { color: #ff8f8f; font-size: 0.85rem; margin: 4px 0 12px; min-height: 1em; }
.authform__submit { width: 100%; }
.authform__switch { margin-top: 16px; font-size: 0.85rem; opacity: 0.8; text-align: center; }
.authform__switch button { background: none; border: none; color: var(--yellow); cursor: pointer; font: inherit; font-weight: 700; }

.listpick__box h3 { margin: 0 0 14px; }
.listpick__lists { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; margin-bottom: 12px; }
.listpick__item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; }
.listpick__item:hover { border-color: var(--yellow); }
.listpick__item span { opacity: 0.5; font-size: 0.85rem; }
.listpick__new { display: flex; gap: 8px; }
.listpick__new input { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; min-width: 0; }
.listpick__msg, .listpick__err { margin-top: 10px; font-size: 0.85rem; color: var(--muted); min-height: 1em; }

.lists-empty { text-align: center; padding: 48px 20px; }
.lists-empty__cta { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.lists-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.lists-detail__title { margin: 0; font-size: 1.3rem; }
.listcard[data-id] { position: relative; cursor: pointer; }
.listcard__del { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.35); border: none; border-radius: 8px; padding: 4px 8px; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 2; }
.listcard[data-id]:hover .listcard__del { opacity: 1; }
.modal__addlist { margin-top: 8px; }

/* Brand logo (icon.svg) in the navbar */
.nav__brand .brand__logo { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: block; }
