:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #040a12;
  --surface: #0d1b2c;
  --surface-2: #11243a;
  --surface-3: #172d45;
  --line: #263c55;
  --line-bright: #385575;
  --text: #f4f8fc;
  --muted: #9aacc0;
  --muted-2: #73879d;
  --accent: #ffd84a;
  --accent-ink: #171300;
  --cyan: #68ddf7;
  --danger: #ff7a8d;
  --radius: 18px;
  --shadow: 0 18px 60px rgb(0 0 0 / 28%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 0%, rgb(34 97 137 / 23%), transparent 32rem),
    radial-gradient(circle at 92% 22%, rgb(255 216 74 / 8%), transparent 25rem),
    linear-gradient(180deg, var(--bg) 0%, #081522 55%, var(--bg-deep) 100%);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select { font: inherit; }

button,
select { cursor: pointer; }

button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(104 221 247 / 75%);
  outline-offset: 3px;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgb(70 103 136 / 42%);
  background: rgb(5 14 25 / 88%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgb(255 216 74 / 42%);
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(145deg, rgb(255 216 74 / 15%), rgb(104 221 247 / 8%));
}

.brand-mark svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand strong { display: block; font-size: 1.05rem; letter-spacing: .02em; }
.brand small { display: block; margin-top: -2px; color: var(--muted); font-size: .78rem; }
.header-meta { display: flex; align-items: center; gap: 12px; }

.database-badge {
  padding: 4px 8px;
  border: 1px solid rgb(255 216 74 / 48%);
  border-radius: 6px;
  color: var(--accent);
  background: rgb(255 216 74 / 7%);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.sample-count {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
}

.header-guide-link {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #bfd0df;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
}

.header-guide-link:hover { border-color: var(--cyan); color: white; }
.header-deck-button { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 0 8px 0 11px; border: 1px solid rgb(255 216 74 / 42%); border-radius: 9px; color: var(--accent); background: rgb(255 216 74 / 7%); font-size: .76rem; font-weight: 850; }
.header-deck-button b { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 7px; color: var(--accent-ink); background: var(--accent); font-family: ui-monospace, monospace; }

.app-primary-nav {
  display: flex;
  min-height: 48px;
  align-items: stretch;
  gap: clamp(20px, 3vw, 38px);
  padding: 0 clamp(18px, 4vw, 56px);
  overflow-x: auto;
  border-bottom: 1px solid rgb(70 103 136 / 42%);
  background: rgb(5 14 25 / 94%);
  scrollbar-width: none;
}

.app-primary-nav::-webkit-scrollbar { display: none; }

.app-primary-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: #b6c8d8;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.app-primary-nav a:hover { color: var(--text); }

.app-primary-nav a.is-current { color: var(--text); }

.app-primary-nav a.is-current::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  content: "";
}

.shell {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 48px;
}

.tool-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.eyebrow,
.section-label {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  line-height: 1.16;
  letter-spacing: -.035em;
}

.hero-copy {
  margin: 11px 0 0;
  color: #afc0d0;
  font-size: .92rem;
}

.heading-note {
  display: grid;
  justify-items: end;
  gap: 2px;
  margin-bottom: 5px;
  text-align: right;
  white-space: nowrap;
}

.heading-note strong { color: #dce8f2; font-size: .83rem; }
.heading-note span { color: var(--muted); font-size: .74rem; }

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgb(11 28 45 / 66%);
}

.catalog-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.catalog-stats > div:last-child { border-right: 0; }
.catalog-stats span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.catalog-stats strong { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; }

.search-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgb(19 41 64 / 92%), rgb(10 25 42 / 94%));
  box-shadow: var(--shadow);
}

.search-box {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid var(--line-bright);
  border-radius: 15px;
  background: #081523;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.search-box:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgb(104 221 247 / 9%); }
.search-box svg { width: 23px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 1.8; }

.search-box input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 1rem;
}

.search-box input::placeholder { color: var(--muted-2); }

.search-box kbd {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-bright);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: .72rem;
}

.filter-groups {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.filter-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 20 34 / 58%);
}

.filter-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 11px 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary > span:first-child { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.filter-group summary strong { color: #e5eef7; font-size: .9rem; }
.filter-group summary small { overflow: hidden; color: var(--muted-2); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }

.filter-group-status { display: inline-flex; align-items: center; gap: 10px; }

.filter-group-status b {
  display: grid;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
}

.filter-group-status i {
  color: var(--muted);
  font-size: 1.1rem;
  font-style: normal;
  line-height: 1;
  transition: transform .18s ease;
}

.filter-group[open] > summary { border-bottom: 1px solid var(--line); background: rgb(22 47 72 / 36%); }
.filter-group[open] .filter-group-status i { transform: rotate(180deg); }

#basicFilters > summary {
  border-left: 4px solid var(--cyan);
  background: rgb(104 221 247 / 8%);
}

#basicFilters > summary strong { color: #9cecff; }

#effectFilters > summary {
  border-left: 4px solid var(--accent);
  background: rgb(255 216 74 / 8%);
}

#effectFilters > summary strong { color: #ffe483; }

#detailFilters > summary {
  border-left: 4px solid #ad8cff;
  background: rgb(173 140 255 / 9%);
}

#detailFilters > summary strong { color: #c9b6ff; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
  gap: 12px;
  padding: 16px;
}

.effect-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.detail-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }

.filter-control { display: grid; gap: 6px; min-width: 0; }
.filter-control > span { color: var(--muted); font-size: .78rem; font-weight: 700; }

.filter-control select {
  width: 100%;
  height: 43px;
  padding: 0 33px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #091726;
  font-size: .86rem;
  text-overflow: ellipsis;
}

.filter-control.disabled { opacity: .46; }
.filter-control select:disabled { cursor: not-allowed; }

.effect-filter > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.effect-filter > span i {
  padding: 2px 6px;
  border-radius: 5px;
  font-size: .66rem;
  font-style: normal;
  font-weight: 900;
}

.ability-effect-filter > span i {
  color: #b8f0ff;
  background: rgb(104 221 247 / 15%);
}

.attack-effect-filter > span i {
  color: #ffe78f;
  background: rgb(255 216 74 / 14%);
}

.trainer-effect-filter > span i {
  color: #ffc596;
  background: rgb(255 158 98 / 14%);
}

.ability-effect-filter select { border-color: rgb(104 221 247 / 34%); }
.attack-effect-filter select { border-color: rgb(255 216 74 / 31%); }
.trainer-effect-filter select { border-color: rgb(255 158 98 / 34%); }

.effect-filter-note {
  margin: -2px 16px 16px;
  color: var(--muted-2);
  font-size: .75rem;
}

.energy-filter-block { padding: 0 17px 17px; }
.energy-filter-block > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.energy-filter-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.energy-filter-buttons button { min-width: 42px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-bright); border-radius: 10px; color: #c8d7e4; background: rgb(5 16 28 / 52%); font-size: .75rem; font-weight: 850; }
.energy-filter-buttons button.active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.energy-filter-buttons.disabled { opacity: .4; }

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}

.filter-actions > span { color: var(--muted-2); font-size: .78rem; }
.filter-actions > div { display: flex; flex: 0 0 auto; gap: 8px; }

.reset-button,
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.reset-button:hover,
.share-button:hover { color: var(--text); background: rgb(255 255 255 / 5%); }

.share-button { border-color: rgb(104 221 247 / 36%); color: #b8f0ff; background: rgb(104 221 247 / 7%); }

.reset-button {
  border-color: rgb(255 96 116 / 78%);
  background: rgb(205 44 66 / 82%);
}

.reset-button:hover { background: rgb(225 55 78 / 92%); }

.reset-button svg,
.share-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.active-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 13px 4px;
  scroll-margin-top: 82px;
}

.active-summary > div:first-child { display: flex; align-items: baseline; gap: 6px; }
.active-summary strong { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.35rem; }
.active-summary span { color: var(--muted); font-size: .86rem; }
.active-summary small { margin-left: 7px; color: var(--muted-2); font-size: .72rem; }
.active-conditions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }

.condition-pill {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bed0e2 !important;
  background: rgb(14 33 52 / 65%);
  font-size: .75rem !important;
}

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 22px; }
.results-column { min-width: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }

.card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 350px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(18 38 60 / 94%), rgb(9 24 39 / 96%));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: var(--type-color);
}

.card:hover { transform: translateY(-2px); border-color: rgb(82 119 153 / 80%); box-shadow: 0 14px 36px rgb(0 0 0 / 22%); }
.trainer-card { background: linear-gradient(145deg, rgb(21 43 62 / 96%), rgb(9 24 39 / 96%)); }
.card-top { display: flex; align-items: flex-start; gap: 12px; padding: 17px 17px 12px; }

.type-orb {
  display: grid;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--type-color), white 20%);
  border-radius: 14px;
  color: #fff;
  background: color-mix(in srgb, var(--type-color), transparent 75%);
  font-size: .72rem;
  font-weight: 900;
}

.card-identity { min-width: 0; flex: 1; }
.card-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 1px; color: var(--muted); font-size: .7rem; }
.type-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--type-color); box-shadow: 0 0 12px var(--type-color); }
.card h2 { overflow: hidden; margin: 0; font-size: 1.08rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.set-line {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp { margin-left: auto; color: #d8e6f2; font-family: ui-monospace, monospace; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.hp small { color: var(--muted); font-size: .62rem; }

.trainer-mark {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid color-mix(in srgb, var(--type-color), transparent 45%);
  border-radius: 5px;
  color: color-mix(in srgb, var(--type-color), white 25%);
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 56px;
  margin: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(5 15 26 / 52%);
}

.mini-stat { min-width: 0; padding: 8px 9px; border-right: 1px solid var(--line); }
.mini-stat:last-child { border-right: 0; }
.mini-stat small { display: block; color: var(--muted-2); font-size: .64rem; }

.mini-stat b {
  display: block;
  overflow: hidden;
  color: #e7eff7;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trainer-stats .mini-stat:first-child b { font-family: inherit; font-size: .73rem; }
.retreat-pips { display: flex; height: 19px; align-items: center; gap: 3px; }
.retreat-pips i { width: 7px; height: 7px; border-radius: 50%; background: #afbdd0; }
.retreat-pips.zero { color: var(--cyan); font-style: normal; font-weight: 900; }
.not-applicable { color: var(--muted-2); }

.card-body { padding: 13px 17px 15px; }
.move-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.move-line span { overflow: hidden; color: #c7d6e5; font-size: .81rem; text-overflow: ellipsis; white-space: nowrap; }
.move-line b { flex: 0 0 auto; color: var(--accent); font-family: ui-monospace, monospace; font-size: .88rem; }
.tag-list { display: flex; min-height: 27px; flex-wrap: wrap; gap: 6px; }

.role-tag {
  padding: 4px 8px;
  border: 1px solid rgb(88 121 153 / 52%);
  border-radius: 7px;
  color: #a9c1d7;
  background: rgb(25 50 76 / 64%);
  font-size: .68rem;
  font-weight: 700;
}

.effect-preview { min-height: 78px; margin: 0 0 11px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgb(4 13 23 / 48%); }
.effect-preview strong { display: block; overflow: hidden; margin-bottom: 4px; color: var(--cyan); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.effect-preview p { display: -webkit-box; margin: 0; overflow: hidden; color: #cfdae4; font-size: .75rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.trainer-preview { min-height: 96px; }

.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding: 0 17px 17px; }

.detail-button,
.compare-button {
  min-height: 39px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 800;
}

.detail-button { display: grid; place-items: center; border: 1px solid var(--line); color: #c6d6e5; background: transparent; text-decoration: none; }
.detail-button:hover { border-color: var(--line-bright); background: rgb(255 255 255 / 4%); }
.compare-button { min-width: 98px; border: 1px solid rgb(255 216 74 / 36%); color: var(--accent); background: rgb(255 216 74 / 7%); }
.compare-button:hover { background: rgb(255 216 74 / 13%); }
.compare-button.selected { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.deck-add-button { min-height: 41px; border: 1px solid rgb(104 221 247 / 42%); border-radius: 10px; color: var(--cyan); background: rgb(104 221 247 / 7%); font-size: .8rem; font-weight: 850; }
.deck-add-button:hover { background: rgb(104 221 247 / 13%); }
.deck-add-button.selected { border-color: var(--cyan); background: rgb(104 221 247 / 15%); }
.card-actions .deck-add-button { grid-column: 1 / -1; }

.loading-state {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgb(11 27 44 / 55%);
  text-align: center;
}

.loading-state p { margin: 0; font-size: .86rem; }
.loading-state small { color: var(--muted); }
.loading-state button { min-height: 40px; padding: 0 15px; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent-ink); background: var(--accent); font-size: .82rem; font-weight: 800; }

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line-bright);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0 5px;
}

.pagination button {
  min-width: 96px;
  min-height: 40px;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  color: #d3e0eb;
  background: var(--surface);
  font-size: .8rem;
  font-weight: 800;
}

.pagination button:hover:not(:disabled) { border-color: var(--cyan); }
.pagination button:disabled { cursor: not-allowed; opacity: .35; }
.pagination span { color: var(--muted); font-family: ui-monospace, monospace; font-size: .78rem; }
.pagination b { color: var(--accent); }

.compare-panel {
  position: sticky;
  top: 98px;
  min-height: 355px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(17 37 58 / 96%), rgb(7 20 34 / 96%));
  box-shadow: var(--shadow);
}

.compare-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 19px 15px; border-bottom: 1px solid var(--line); }
.compare-heading .section-label { margin-bottom: 2px; }
.compare-heading h2 { margin: 0; font-size: 1.12rem; }
.compare-capacity { color: var(--muted); font-family: ui-monospace, monospace; font-size: .8rem; }
.compare-capacity b { color: var(--accent); }
.compare-empty { padding: 36px 24px; text-align: center; }
.compare-empty-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 14px; place-items: center; border: 1px dashed var(--line-bright); border-radius: 17px; color: var(--cyan); font-size: 1.35rem; }
.compare-empty p { margin-bottom: 7px; color: #d4e1ec; font-size: .9rem; font-weight: 700; }
.compare-empty small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.compare-list { display: grid; gap: 8px; padding: 12px; }
.compare-list.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.compare-item {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(5 16 28 / 52%);
}

.compare-item .mini-orb { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 9px; color: white; background: color-mix(in srgb, var(--item-color), transparent 68%); font-size: .62rem; font-weight: 900; }
.compare-item strong { display: block; overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.compare-item small { display: block; overflow: hidden; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.remove-compare { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 1rem; }
.remove-compare:hover { color: var(--danger); background: rgb(255 122 141 / 9%); }
.compare-table-wrap { overflow-x: auto; padding: 0 12px 14px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .71rem; }
.compare-table th,
.compare-table td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table th { width: 34%; color: var(--muted); font-weight: 600; }
.compare-table td { color: #e2ebf4; font-weight: 700; overflow-wrap: anywhere; }

.empty-state {
  padding: 70px 20px;
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
  text-align: center;
  background: rgb(11 27 44 / 55%);
}

.empty-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--cyan); font-size: 1.2rem; font-weight: 900; }
.empty-state h2 { margin-bottom: 6px; font-size: 1.1rem; }
.empty-state p { margin-bottom: 18px; color: var(--muted); font-size: .86rem; }
.empty-state button { min-height: 40px; padding: 0 15px; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent-ink); background: var(--accent); font-size: .82rem; font-weight: 800; }

.data-note {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid rgb(104 221 247 / 20%);
  border-radius: 13px;
  background: rgb(104 221 247 / 5%);
}

.data-note > span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgb(104 221 247 / 50%); border-radius: 50%; color: var(--cyan); font-family: Georgia, serif; font-weight: 800; }
.data-note p { margin: 0; color: var(--muted); font-size: .78rem; }
.data-note strong { color: #cfe1ef; }
.mobile-tools { display: none; }
.mobile-compare,
.mobile-deck { display: none; }

dialog {
  width: min(650px, calc(100% - 28px));
  max-height: min(800px, calc(100vh - 36px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-bright);
  border-radius: 20px;
  color: var(--text);
  background: #0b1b2c;
  box-shadow: 0 30px 100px rgb(0 0 0 / 62%);
}

dialog::backdrop { background: rgb(1 5 10 / 72%); backdrop-filter: blur(5px); }

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: #0b1928;
  font-size: 1.2rem;
}

.dialog-close:hover { color: var(--text); border-color: var(--line-bright); }

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: start;
  gap: 15px;
  padding: 27px 66px 24px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--detail-color), transparent 78%), transparent);
}

.detail-hero::after { position: absolute; z-index: 0; right: -28px; bottom: -65px; width: 170px; height: 170px; border: 28px solid color-mix(in srgb, var(--detail-color), transparent 88%); border-radius: 50%; content: ""; pointer-events: none; }
.detail-hero > * { position: relative; z-index: 1; }

.detail-orb {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--detail-color), white 25%);
  border-radius: 19px;
  color: white;
  background: color-mix(in srgb, var(--detail-color), transparent 65%);
  font-size: .82rem;
  font-weight: 900;
}

.detail-kicker { color: var(--muted); font-size: .72rem; }
.detail-hero h2 { margin: 1px 0 7px; font-size: 1.55rem; line-height: 1.3; }
.detail-hp { display: grid; justify-items: end; font-family: ui-monospace, monospace; }
.detail-hp small { color: var(--muted); font-size: .62rem; }
.detail-hp strong { font-size: 1.05rem; }

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 20px 24px 5px;
}

.detail-facts > div { padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgb(5 16 28 / 48%); }
.detail-facts span { display: block; color: var(--muted); font-size: .66rem; }
.detail-facts strong { display: block; margin-top: 2px; color: #e5edf4; font-size: .78rem; overflow-wrap: anywhere; }

.detail-section { margin: 15px 24px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 9px; color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.detail-section > strong { display: block; color: var(--cyan); font-size: .93rem; }
.detail-section p { margin: 5px 0 0; color: #d9e4ee; font-size: .84rem; line-height: 1.75; }
.detail-section .effect-note { color: var(--muted); font-size: .75rem; }

.effect-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.effect-section-heading h3 { margin: 0; }
.effect-badges { display: flex; flex-wrap: wrap; gap: 5px; }

.effect-badge {
  padding: 3px 7px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  color: #cbd9e6;
  background: rgb(20 42 65 / 78%);
  font-size: .63rem;
  font-weight: 800;
  line-height: 1.35;
}

.effect-badge.ability { border-color: rgb(104 221 247 / 38%); color: #b8f0ff; }
.effect-badge.attack { border-color: rgb(255 216 74 / 34%); color: #ffe78f; }
.effect-badge.trainer { border-color: rgb(255 158 98 / 38%); color: #ffc596; }

.attack-list { display: grid; gap: 9px; }
.attack-row { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgb(5 16 28 / 46%); }
.attack-title { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.attack-title strong { font-size: .9rem; }
.attack-title > b { color: var(--accent); font-family: ui-monospace, monospace; font-size: .92rem; }
.attack-row > .effect-badges { margin-top: 8px; }
.attack-row p { margin-left: 0; }

.energy-cost { display: flex; flex-wrap: wrap; gap: 3px; }
.energy-cost i { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid color-mix(in srgb, var(--energy-color), white 24%); border-radius: 50%; color: #fff; background: color-mix(in srgb, var(--energy-color), #07111f 42%); font-size: .57rem; font-style: normal; font-weight: 900; }
.energy-cost.zero-cost { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--cyan); font-family: ui-monospace, monospace; font-size: .68rem; font-weight: 900; }
.trainer-text p { font-size: .92rem; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 20px 24px 25px; }
.detail-actions .compare-button,
.detail-actions .deck-add-button { width: 100%; min-height: 46px; }

.compare-dialog { width: min(760px, calc(100% - 24px)); }
.mobile-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.mobile-dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-close.inline { position: static; }
.compare-dialog .compare-list { padding: 14px; }
.compare-dialog .compare-table-wrap { padding: 3px 14px 22px; }
.compare-dialog .compare-table { font-size: .8rem; }
.compare-dialog .compare-table th,
.compare-dialog .compare-table td { min-width: 108px; padding: 11px 8px; }

.deck-dialog { width: min(720px, calc(100% - 24px)); }
.deck-progress { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.deck-progress > div:first-child { display: flex; align-items: baseline; gap: 5px; }
.deck-progress strong { color: var(--accent); font-family: ui-monospace, monospace; font-size: 1.8rem; }
.deck-progress span { color: var(--muted); font-size: .8rem; }
.deck-progress > b { display: block; margin-top: 7px; color: var(--muted); font-size: .75rem; }
.deck-progress > b.complete { color: #6fe0a6; }
.deck-progress-track { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.deck-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--accent)); transition: width .2s ease; }
.deck-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.deck-stats > div { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgb(5 16 28 / 48%); }
.deck-stats span { display: block; color: var(--muted); font-size: .65rem; }
.deck-stats strong { display: block; margin-top: 2px; color: #e7eff7; font-size: .8rem; overflow-wrap: anywhere; }
.deck-energy-panel { padding: 13px 20px 14px; border-bottom: 1px solid var(--line); background: rgb(7 20 34 / 54%); }
.deck-energy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deck-energy-head strong,
.deck-energy-head small { display: block; }
.deck-energy-head strong { font-size: .8rem; }
.deck-energy-head small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.deck-energy-head button { padding: 7px 9px; border: 1px solid var(--line-bright); border-radius: 8px; color: var(--cyan); background: var(--surface); font-size: .67rem; font-weight: 800; }
.deck-energy-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.deck-energy-option { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--energy-color), transparent 55%); border-radius: 999px; color: var(--muted); background: color-mix(in srgb, var(--energy-color), transparent 91%); font-size: .7rem; font-weight: 850; }
.deck-energy-option i { width: 10px; height: 10px; border-radius: 50%; background: var(--energy-color); box-shadow: 0 0 10px color-mix(in srgb, var(--energy-color), transparent 25%); }
.deck-energy-option.selected { border-color: var(--energy-color); color: #fff; background: color-mix(in srgb, var(--energy-color), #07111f 72%); }
.deck-content { display: grid; gap: 7px; max-height: 380px; padding: 14px 20px; overflow: auto; }
.deck-empty { padding: 36px 18px; text-align: center; }
.deck-empty strong { font-size: .9rem; }
.deck-empty p { max-width: 440px; margin: 7px auto 0; color: var(--muted); font-size: .78rem; }
.deck-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-left: 3px solid var(--item-color); border-radius: 10px; background: rgb(5 16 28 / 52%); }
.deck-card-open { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; min-width: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.deck-card-open .mini-orb { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: white; background: color-mix(in srgb, var(--item-color), transparent 65%); font-size: .62rem; font-weight: 900; }
.deck-card-open strong,
.deck-card-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-card-open strong { font-size: .82rem; }
.deck-card-open small { color: var(--muted); font-size: .67rem; }
.deck-quantity { display: grid; grid-template-columns: 34px 26px 34px; align-items: center; text-align: center; }
.deck-quantity button { height: 34px; border: 1px solid var(--line-bright); color: var(--text); background: var(--surface); font-weight: 900; }
.deck-quantity button:first-child { border-radius: 8px 0 0 8px; }
.deck-quantity button:last-child { border-radius: 0 8px 8px 0; }
.deck-quantity button:disabled { cursor: not-allowed; opacity: .35; }
.deck-quantity b { font-family: ui-monospace, monospace; font-size: .8rem; }
.deck-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; padding: 14px 20px 8px; border-top: 1px solid var(--line); }
.deck-actions button { min-height: 42px; padding: 0 13px; border: 1px solid var(--line-bright); border-radius: 9px; color: #dce7ef; background: var(--surface); font-size: .76rem; font-weight: 850; }
.deck-actions button:nth-child(3) { border-color: var(--cyan); color: var(--cyan); }
.deck-actions button.qr-primary { border-color: #ffd84a; color: #07111f; background: #ffd84a; }
.deck-actions button.qr-primary:disabled { cursor: not-allowed; border-color: var(--line); color: var(--muted); background: var(--surface); opacity: .62; }
.deck-actions button.danger { color: var(--danger); }
.deck-note { margin: 0; padding: 7px 20px 18px; color: var(--muted); font-size: .7rem; }

.deck-qr-dialog { width: min(520px, calc(100% - 24px)); }
.deck-qr-body { padding: 18px 22px 24px; }
.deck-qr-image-wrap { display: grid; width: min(360px, 100%); margin: 0 auto; padding: 14px; place-items: center; border: 1px solid var(--line-bright); border-radius: 18px; background: #fff; }
.deck-qr-image-wrap img { display: block; width: 100%; height: auto; image-rendering: crisp-edges; }
.deck-qr-summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 13px; color: var(--muted); font-size: .72rem; }
.deck-qr-summary span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; }
.deck-qr-steps { display: grid; gap: 8px; margin: 17px 0 0; padding-left: 24px; color: #dbe6ef; font-size: .78rem; line-height: 1.65; }
.deck-qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 17px; }
.deck-qr-actions a,
.deck-qr-actions button { display: grid; min-height: 44px; padding: 0 12px; place-items: center; border: 1px solid var(--line-bright); border-radius: 9px; color: #e9f2f8; background: var(--surface); font-size: .76rem; font-weight: 850; text-decoration: none; }
.deck-qr-actions a { border-color: #ffd84a; color: #07111f; background: #ffd84a; }
.deck-qr-warning { margin: 16px 0 0; padding: 11px 12px; border: 1px solid rgb(255 216 74 / 25%); border-radius: 10px; color: var(--muted); background: rgb(255 216 74 / 6%); font-size: .68rem; line-height: 1.6; }
.deck-qr-warning strong { color: #ffe589; }

.toast {
  position: fixed;
  z-index: 60;
  right: 22px;
  bottom: 22px;
  max-width: 340px;
  padding: 12px 15px;
  transform: translateY(20px);
  border: 1px solid var(--line-bright);
  border-radius: 11px;
  opacity: 0;
  color: #e7eff7;
  background: #13283e;
  box-shadow: var(--shadow);
  font-size: .82rem;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.visible { transform: translateY(0); opacity: 1; }

.ad-placement {
  min-height: 112px;
  margin: 22px 0;
  padding: 10px 12px 14px;
  overflow: hidden;
  border: 1px solid rgb(38 60 85 / 65%);
  border-radius: 14px;
  background: rgb(5 15 26 / 38%);
}

.ad-placement[hidden] { display: none; }
.ad-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: .62rem;
  letter-spacing: .08em;
  text-align: center;
}

.ad-placement [data-ad-container] { min-height: 72px; }

.guide-hub-preview {
  margin-top: 24px;
  padding: clamp(19px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(145deg, rgb(15 36 57 / 82%), rgb(7 21 36 / 88%));
}

.guide-hub-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.guide-hub-heading .section-label { margin-bottom: 2px; }
.guide-hub-heading h2 { margin: 0; font-size: 1.2rem; }
.guide-hub-heading > a { color: var(--cyan); font-size: .78rem; font-weight: 800; text-decoration: none; }

.guide-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.guide-hub-grid a {
  display: grid;
  min-height: 128px;
  align-content: start;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: rgb(5 16 28 / 52%);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}

.guide-hub-grid a:hover { transform: translateY(-2px); border-color: var(--cyan); }
.guide-hub-grid span { color: var(--cyan); font-size: .66rem; font-weight: 900; letter-spacing: .08em; }
.guide-hub-grid strong { font-size: .88rem; }
.guide-hub-grid small { color: var(--muted); font-size: .7rem; line-height: 1.55; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 34px;
  border-top: 1px solid rgb(38 60 85 / 55%);
  color: var(--muted-2);
  font-size: .7rem;
}

footer p { margin: 0; }
footer a { color: #9fb7cb; text-underline-offset: 2px; }

@media (max-width: 1120px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .workspace { grid-template-columns: 1fr; }
  .compare-panel { display: none; }

  .mobile-tools {
    position: fixed;
    z-index: 30;
    right: 18px;
    bottom: 18px;
    display: flex;
    gap: 8px;
  }

  .mobile-compare,
  .mobile-deck {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 48px;
    padding: 0 10px 0 14px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent-ink);
    background: var(--accent);
    box-shadow: 0 12px 38px rgb(0 0 0 / 42%);
    font-size: .86rem;
    font-weight: 900;
  }

  .mobile-deck { border-color: var(--cyan); color: #03151c; background: var(--cyan); }
  .mobile-compare b,
  .mobile-deck b { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-ink); font-family: ui-monospace, monospace; }
  .mobile-deck b { color: var(--cyan); }
  .mobile-deck small { margin-left: -5px; font-size: .62rem; }
  .toast { right: 18px; bottom: 79px; }
  footer { padding-bottom: 88px; }
  .guide-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-placement { min-height: 96px; margin-block: 18px; }
}

@media (max-width: 720px) {
  .app-header { min-height: 66px; padding-inline: 15px; }
  .brand-mark { width: 39px; height: 39px; }
  .brand strong { font-size: .96rem; }
  .brand small,
  .sample-count { display: none; }
  .header-guide-link { display: none; }
  .database-badge { display: none; }
  .app-primary-nav { min-height: 47px; gap: 24px; padding-inline: 15px; }
  .app-primary-nav a { font-size: .8rem; }
  .shell { width: min(100% - 20px, 1380px); padding-top: 16px; }
  .tool-heading { display: block; margin-bottom: 12px; }
  .tool-heading .eyebrow,
  .heading-note { display: none; }
  h1 { font-size: clamp(1.45rem, 6vw, 1.75rem); }
  .hero-copy { margin-top: 8px; font-size: .82rem; }
  .catalog-stats { display: none; }
  .catalog-stats > div:nth-child(2) { border-right: 0; }
  .catalog-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .search-panel { padding: 14px; border-radius: 18px; }
  .search-box { min-height: 52px; padding-inline: 13px; }
  .search-box input { height: 49px; font-size: .88rem; }
  .search-box kbd { display: none; }
  .filter-groups { margin-top: 17px; }
  .filter-group summary { padding-inline: 13px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px; }
  .energy-filter-block { padding-inline: 13px; }
  .energy-filter-buttons { flex-wrap: nowrap; padding-bottom: 4px; overflow-x: auto; }
  .energy-filter-buttons button { flex: 0 0 auto; }
  .filter-actions { align-items: stretch; flex-direction: column; }
  .filter-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-actions button { width: 100%; }
  .active-summary { align-items: flex-start; min-height: 58px; }
  .active-conditions { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: 340px; }
  .card:hover { transform: none; }
  .data-note { margin-top: 20px; }
  .guide-hub-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .detail-dialog { width: 100%; max-width: none; max-height: 90vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .detail-hero { grid-template-columns: 52px minmax(0, 1fr); padding: 23px 58px 20px 18px; }
  .detail-orb { width: 52px; height: 52px; border-radius: 16px; }
  .detail-hp { grid-column: 2; justify-items: start; grid-auto-flow: column; gap: 5px; }
  .detail-facts { grid-template-columns: 1fr; padding-inline: 18px; }
  .detail-section { margin-inline: 18px; }
  .detail-actions { padding-inline: 18px; }
  .deck-dialog { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .deck-qr-dialog { width: 100%; max-width: none; max-height: 94vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .deck-actions { grid-template-columns: 1fr 1fr; }
  .deck-actions .qr-primary { grid-column: 1 / -1; }
  .deck-energy-head { align-items: flex-start; }
  .deck-stats { grid-template-columns: 1fr 1fr; padding-inline: 14px; }
  .deck-stats > div:last-child { grid-column: 1 / -1; }
  .deck-content { padding-inline: 14px; }
  .deck-actions { grid-template-columns: 1fr 1fr; padding-inline: 14px; }
  .deck-actions .danger { grid-column: 1 / -1; }
  .deck-note { padding-inline: 14px; }
  .compare-list.compact { grid-template-columns: 1fr; }
  footer { display: grid; width: min(100% - 24px, 1380px); }
}

@media (max-width: 430px) {
  .filter-grid { grid-template-columns: 1fr; }
  .filter-group summary small { display: none; }
  .catalog-stats > div { padding: 11px 12px; }
  .catalog-stats span { font-size: .66rem; }
  .card-top { gap: 9px; padding-inline: 14px; }
  .type-orb { width: 40px; height: 40px; border-radius: 12px; }
  .stat-strip { margin-inline: 13px; }
  .mini-stat { padding-inline: 7px; }
  .card-body { padding-inline: 14px; }
  .card-actions { padding-inline: 14px; }
  .mobile-tools { right: 10px; bottom: 10px; }
  .mobile-compare,
  .mobile-deck { min-height: 46px; padding-left: 12px; font-size: .78rem; }
  .pagination { gap: 9px; }
  .pagination button { min-width: 82px; }
  .guide-hub-grid { grid-template-columns: 1fr; }
  .guide-hub-grid a { min-height: 108px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.analytics-consent {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(520px, calc(100% - 36px));
  gap: 16px;
  padding: 20px;
  border: 1px solid #35506a;
  border-radius: 18px;
  color: var(--text);
  background: rgb(7 20 34 / 98%);
  box-shadow: 0 20px 60px rgb(0 0 0 / 50%);
}

.analytics-consent strong { font-size: 1rem; }
.analytics-consent p { margin: 7px 0 0; color: #b8c8d6; font-size: .84rem; line-height: 1.7; }
.analytics-consent a { color: var(--cyan); }
.analytics-consent-actions { display: flex; justify-content: flex-end; gap: 9px; }
.analytics-consent button { min-height: 42px; padding: 0 15px; border: 1px solid #526a80; border-radius: 10px; color: #dce7ef; background: transparent; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.analytics-consent button.primary { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }

.privacy-setting-button {
  display: block;
  min-height: 42px;
  margin-top: 16px;
  padding: 0 15px;
  border: 1px solid #526a80;
  border-radius: 10px;
  color: #dce7ef;
  background: rgb(5 17 29 / 52%);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 560px) {
  .analytics-consent { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .analytics-consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
