@font-face {
  font-family: 'DM Sans';
  src: url('/dm-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --shell-canvas: #0d1113;
  --shell-topbar: #0d1113;
  --shell-sidebar: #0d1113;
  --shell-search: #2b3236;
  --shell-active-row: #2b3236;
  --shell-elevated: #181c1f;
  --shell-right-rail: #000000;
  --shell-border: #3d4142;
  --shell-text-primary: #edf1f3;
  --shell-text-navigation: #dce3e9;
  --shell-text-muted: #8ca2ac;
  --canvas: var(--shell-canvas);
  --shell: var(--shell-canvas);
  --sidebar: var(--shell-sidebar);
  --topbar: var(--shell-topbar);
  --surface: var(--shell-elevated);
  --surface-elevated: var(--shell-elevated);
  --nav-active: var(--shell-active-row);
  --panel-dark: var(--shell-right-rail);
  --border: var(--shell-border);
  --text: var(--shell-text-primary);
  --text-muted: var(--shell-text-muted);
  --brand: #d93900;
  --brand-hover: #e4430b;
  --brand-pressed: #bd3100;
  --brand-on-dark: #ff7847;
  --nav-muted: var(--shell-text-navigation);
  --wishlist: #ff3ea5;
  --red: #ef8192;
  --violet: #b48aef;
  --blue: #7fb3eb;
  --progress: #36e782;
  --amber: #dfb76e;
  --bg: var(--canvas);
  --soft: var(--surface-elevated);
  --ink: var(--text);
  --muted: var(--text-muted);
  --line: var(--border);
  --elevated: var(--surface-elevated);
  --dark-canvas: var(--canvas);
  --dark-shell: var(--shell);
  --dark-surface: var(--surface);
  --dark-elevated: var(--surface-elevated);
  --accent: var(--brand);
  color-scheme: dark;
  font-family: 'DM Sans', sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--muted);
  outline-offset: 4px;
}
button {
  color: inherit;
}
.brand {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -1.1px;
  white-space: nowrap;
}
.brand span {
  font-weight: 500;
}
.brand .brand-dot {
  color: var(--ink);
  font-weight: 900;
}
.preview {
  font-size: 11px;
  letter-spacing: 1px;
  color: #aaa;
  white-space: nowrap;
}
.icon {
  background: none;
  border: 0;
  color: white;
  font-size: 24px;
  width: 32px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 90;
}
.skip:focus {
  top: 8px;
  background: #fff;
  color: #000;
  padding: 12px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 620px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}
.eyebrow {
  font-size: 12px !important;
  font-weight: 750;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.tiny-line {
  display: inline-block;
  width: 20px;
  height: 3px;
  background: var(--muted);
  vertical-align: middle;
  margin-right: 6px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -2.2px;
  font-weight: 850;
  margin-bottom: 20px;
}
h2 {
  font-size: 29px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 0;
}
h3 {
  font-size: 19px;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 72px;
  letter-spacing: -3.8px;
  line-height: 1.01;
  margin-bottom: 25px;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  z-index: 1;
}
.hero h1 em:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 101%;
  height: 18px;
  background: var(--brand);
  z-index: -1;
}
.hero-copy > p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}
.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid var(--ink);
  border-radius: 50px;
  padding: 13px 23px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}
.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
.button.small {
  padding: 11px 23px;
}
.text-link {
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  text-underline-offset: 4px;
  background: none;
  border: 0;
  padding: 0;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.text-link:hover,
.text-link:focus-visible {
  color: inherit;
  text-decoration: underline;
}
.hero-foot {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 36px;
}
.hero-foot img {
  width: 100px;
  height: 44px;
  object-fit: contain;
}
.hero-foot span {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.hero-foot b {
  color: var(--ink);
  font-weight: 600;
}
.hero-cards {
  height: 450px;
  position: relative;
}
.hero-card {
  position: absolute;
  width: 44%;
  top: 64px;
  filter: drop-shadow(0 18px 20px #0003);
  transition: transform 0.2s;
}
.hero-card img {
  display: block;
  width: 100%;
  border-radius: 12px;
}
.hc0 {
  left: 0;
  transform: rotate(-13deg);
  top: 55px;
}
.hc1 {
  left: 28%;
  z-index: 2;
  transform: rotate(3deg);
  top: 22px;
}
.hc2 {
  right: -1%;
  transform: rotate(17deg);
  top: 90px;
}
.hero-card:hover {
  transform: translateY(-12px);
  z-index: 3;
}
.hero-caption {
  position: absolute;
  bottom: 0;
  right: 16px;
  text-align: right;
}
.hero-caption span {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.hero-caption a {
  font-size: 16px;
  font-weight: 750;
}
.section {
  padding: 48px 0;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}
.section-title .eyebrow {
  margin-bottom: 10px;
}
.set-logo {
  height: 135px;
  background: var(--soft);
  display: grid;
  place-items: center;
  padding: 25px;
}
.set-logo img {
  max-width: 100%;
  max-height: 85px;
  object-fit: contain;
}
.set-copy {
  padding: 20px;
}
.set-copy .eyebrow {
  font-size: 10px !important;
  margin-bottom: 9px;
  letter-spacing: 1px;
}
.set-copy h3 {
  min-height: 44px;
}
.set-copy p {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.lang,
.pill {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 650;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 30px 18px;
}
.card-tile {
  min-width: 0;
}
.card-art {
  display: block;
  position: relative;
  aspect-ratio: 245/342;
  border-radius: 9px;
  transition: transform 0.16s;
}
.card-art:hover {
  transform: translateY(-4px);
}
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}
.card-copy {
  padding: 12px 0 0;
}
.card-copy > a {
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  min-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-copy > span,
.card-copy > small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-copy i {
  font-style: normal;
  margin: 0 3px;
}
.quick-add {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  padding: 7px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 650;
}
.quick-add:hover {
  border-color: var(--ink);
}
.quick-add.is-owned {
  background: var(--brand);
  color: #111;
  border-color: var(--ink);
}
.owned-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--brand);
  color: #111;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  position: relative;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 9px;
  aspect-ratio: 245/342;
  width: 100%;
  font-size: 13px;
  padding: 10px;
  text-align: center;
  color: var(--muted);
}
.card-placeholder b {
  font-size: 50px;
  font-weight: 400;
}
.card-placeholder span {
  font-size: 10px;
  letter-spacing: 2px;
}
.coming {
  border-top: 1px solid var(--line);
  padding: 44px 0 54px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}
.coming h2 {
  font-size: 25px;
}
.coming-games {
  display: flex;
  gap: 42px;
  align-items: center;
}
.coming-games > div {
  width: 110px;
  text-align: center;
}
.coming-games img {
  width: 100%;
  height: 55px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
}
.coming-games span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 55px 0 34px;
  gap: 25px;
}
.page-heading h1 {
  font-size: 42px;
  margin-bottom: 12px;
}
.page-heading p:last-child {
  color: var(--muted);
  margin: 0;
}
.filter-bar {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 14px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 120px;
  padding-left: 12px;
}
.search-field span {
  font-size: 24px;
  color: var(--muted);
}
input,
select {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 12px 15px;
  font-size: 14px;
  min-width: 0;
}
input {
  border: 0;
  padding: 8px 0;
  width: 100%;
  outline-offset: 0 !important;
}
select {
  max-width: 210px;
}
.results-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0;
  color: var(--muted);
  font-size: 13px;
}
.results-line i {
  font-style: normal;
  margin: 0 8px;
}
.segmented {
  display: flex;
  padding: 4px;
  background: var(--soft);
  border-radius: 30px;
  gap: 2px;
}
.segmented button {
  border: 0;
  border-radius: 30px;
  padding: 7px 17px;
  background: none;
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}
.segmented button.selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px #0001;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 35px 0 50px;
  font-size: 13px;
  color: var(--muted);
}
.back {
  display: block;
  margin: 32px 0 26px;
  font-size: 14px;
  color: var(--muted);
}
.set-hero {
  display: grid;
  grid-template-columns: 180px 1fr 225px;
  gap: 30px;
  align-items: center;
  padding: 8px 0 35px;
}
.large-set-logo {
  background: var(--soft);
  height: 150px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 18px;
}
.large-set-logo img {
  max-width: 100%;
  max-height: 110px;
}
.set-hero h1 {
  font-size: 38px;
  margin-bottom: 12px;
}
.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.set-progress {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.set-progress > span {
  font-size: 11px;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.set-progress small {
  font-size: 10px;
}
.set-progress strong {
  display: block;
  font-size: 48px;
  letter-spacing: -2px;
  line-height: 1.3;
}
.set-progress strong small {
  font-size: 23px;
}
.set-progress p {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0 0;
}
.progress {
  height: 5px;
  background: var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.progress i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--brand);
}
.demo-note {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 32px;
}
.demo-note > span {
  font-weight: 750;
  font-size: 10px;
  letter-spacing: 1px;
  margin-right: 12px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.detail {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 90px;
  padding: 10px 55px 65px;
}
.detail-image {
  background: var(--soft);
  padding: 32px;
  border-radius: 20px;
  align-self: start;
}
.detail-image img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 8px 8px #0002);
  border-radius: 12px;
}
.detail-copy {
  padding-top: 12px;
}
.detail-copy h1 {
  font-size: 46px;
}
.detail-number {
  font-size: 18px;
  color: var(--muted);
}

dl {
  margin: 26px 0;
}
dl > div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  text-align: right;
}
.collection-action {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.collection-action h2 {
  font-size: 22px;
}
.collection-action .section-title {
  margin-bottom: 20px;
}
.ownership {
  display: flex;
  gap: 10px;
}
.ownership .button {
  flex: 1;
}
.quantity-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin: 20px 0;
}
.quantity {
  display: flex;
  align-items: center;
  gap: 24px;
}
.quantity button {
  background: var(--soft);
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
}
.collection-action .muted {
  margin: 0;
  font-size: 11px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 0 38px;
}
.stats > div {
  padding: 0 24px;
  border-right: 1px solid var(--line);
}
.stats > div:first-child {
  padding-left: 0;
}
.stats > div:last-child {
  border: 0;
}
.stats strong {
  font-size: 42px;
  letter-spacing: -2px;
  display: block;
}
.stats span {
  font-size: 13px;
  color: var(--muted);
}
.collection-sets {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.collection-set {
  display: grid;
  grid-template-columns: 95px 1fr 220px 25px;
  align-items: center;
  gap: 22px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.collection-set:last-child {
  border: 0;
}
.mini-logo img {
  width: 90px;
  height: 55px;
  object-fit: contain;
}
.collection-set h3 {
  margin-bottom: 6px;
}
.collection-set p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.completion b {
  display: block;
  font-size: 13px;
  margin-bottom: 9px;
}
.empty {
  padding: 60px 25px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  margin-bottom: 35px;
}
.empty > span {
  font-size: 40px;
  color: var(--muted);
}
.empty h2 {
  margin: 16px 0;
}
.empty p {
  color: var(--muted);
  max-width: 480px;
  margin: 15px auto 25px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  padding: 13px 24px;
  border-radius: 50px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  font-size: 14px;
  transition:
    opacity 0.15s,
    transform 0.15s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 1000px) {
  .preview {
    display: none;
  }
  .hero h1 {
    font-size: 60px;
  }
  .hero {
    min-height: 550px;
  }
  .hero-cards {
    height: 360px;
  }
  .hero-card {
    top: 35px;
  }
  .hc1 {
    top: 15px;
  }
  .hc2 {
    top: 65px;
  }
  .hero-caption {
    bottom: -10px;
  }
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .set-hero {
    grid-template-columns: 140px 1fr;
  }
  .set-progress {
    grid-column: 1/-1;
    display: none;
  }
  .detail {
    gap: 40px;
    padding: 0 0 45px;
  }
  .coming-games {
    gap: 20px;
  }
  .coming-games > div {
    width: 85px;
  }
  .page-heading h1 {
    font-size: 36px;
  }
}
@media (max-width: 650px) {
  .brand {
    font-size: 21px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 35px 0 25px;
    align-items: stretch;
  }
  .hero .eyebrow {
    font-size: 10px !important;
    letter-spacing: 1px;
  }
  .hero h1 {
    font-size: 60px;
  }
  .hero-copy > p:not(.eyebrow) {
    font-size: 15px;
  }
  .hero-foot {
    margin-top: 24px;
  }
  .hero-cards {
    width: 92%;
    max-width: 360px;
    height: 345px;
    margin: 25px auto 0;
  }
  .hero-card {
    width: 44%;
  }
  .hero-caption {
    bottom: 0;
  }
  .section {
    padding: 32px 0;
  }
  .section-title {
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
  }
  .section-title h2 {
    font-size: 23px;
  }
  .section-title .text-link {
    font-size: 12px;
  }
  .section-title .eyebrow {
    font-size: 10px !important;
    letter-spacing: 1px;
  }
  .set-logo {
    height: 100px;
    padding: 17px;
  }
  .set-logo img {
    max-height: 65px;
  }
  .set-copy {
    padding: 14px 12px;
  }
  .set-copy h3 {
    font-size: 16px;
    min-height: 36px;
  }
  .set-copy .eyebrow {
    font-size: 9px !important;
  }
  .set-copy p {
    display: block;
    font-size: 11px;
  }
  .set-copy p span {
    display: block;
    margin-top: 3px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
  }
  .card-copy > a {
    font-size: 15px;
  }
  .card-copy > span,
  .card-copy > small {
    font-size: 11px;
  }
  .quick-add {
    font-size: 12px;
    padding: 9px;
  }
  .coming {
    display: block;
    padding: 30px 0;
  }
  .coming h2 {
    font-size: 23px;
  }
  .coming-games {
    margin-top: 28px;
    justify-content: space-between;
  }
  .coming-games > div {
    width: 85px;
  }
  footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 18px;
  }
  footer p,
  footer > a:last-child {
    text-align: left;
  }
  .page-heading {
    padding: 35px 0 25px;
    display: block;
  }
  .page-heading h1 {
    font-size: 35px;
  }
  .page-heading .eyebrow {
    font-size: 10px !important;
  }
  .page-heading p {
    font-size: 14px;
  }
  .page-heading > .button {
    margin-top: 20px;
  }
  .filter-bar {
    flex-wrap: wrap;
    padding: 10px;
    gap: 8px;
  }
  .search-field {
    flex-basis: 100%;
    padding: 0 8px;
  }
  select {
    max-width: none;
    flex: 1;
    width: 35%;
    font-size: 12px;
    padding: 10px;
  }
  .filter-bar .button {
    padding: 10px 17px;
    font-size: 12px;
  }
  .results-line {
    font-size: 11px;
    gap: 10px;
  }
  .segmented button {
    font-size: 12px;
    padding: 6px 12px;
  }
  .set-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
  }
  .large-set-logo {
    height: 110px;
    width: 180px;
  }
  .large-set-logo img {
    max-height: 80px;
  }
  .set-hero h1 {
    font-size: 34px;
  }
  .metadata {
    font-size: 12px;
  }
  .demo-note {
    font-size: 11px;
  }
  .demo-note span {
    display: block;
    margin-bottom: 4px;
  }
  .back {
    font-size: 12px;
    margin: 24px 0;
  }
  .detail {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }
  .detail-image {
    width: 100%;
    max-width: 330px;
    align-self: center;
    padding: 20px;
  }
  .detail-copy h1 {
    font-size: 39px;
  }
  .detail-copy .eyebrow {
    font-size: 11px !important;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-bottom: 30px;
  }
  .stats > div,
  .stats > div:first-child {
    padding: 0 12px;
    border-left: 2px solid var(--line);
    border-right: 0;
  }
  .stats strong {
    font-size: 36px;
  }
  .stats span {
    font-size: 11px;
  }
  .collection-set {
    grid-template-columns: 70px 1fr 15px;
    gap: 12px;
    padding: 18px 12px;
  }
  .mini-logo img {
    width: 65px;
  }
  .collection-set h3 {
    font-size: 16px;
  }
  .collection-set p {
    font-size: 11px;
  }
  .completion {
    grid-column: 2;
    grid-row: 2;
  }
  .collection-set > span {
    grid-column: 3;
    grid-row: 1;
  }
  .collection-set .completion b {
    font-size: 11px;
  }
  .section-title .actions {
    gap: 8px;
  }
  .section-title .actions button {
    font-size: 10px;
  }
  .empty {
    padding: 30px 16px;
  }
  .empty p {
    font-size: 14px;
  }
  .pagination .button {
    font-size: 12px;
    padding: 9px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* PT CardBackPlaceholder motif, reused rather than inventing replacement artwork. */
.card-placeholder svg {
  width: 40%;
  height: auto;
  color: var(--muted);
}
progress.progress {
  display: block;
  width: 100%;
  border: 0;
  appearance: none;
  height: 5px;
}
progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: 20px;
}
progress::-webkit-progress-value {
  background: var(--brand);
  border-radius: 20px;
}
progress::-moz-progress-bar {
  background: var(--brand);
}
.hero-caption {
  bottom: -12px;
}
.hero-card {
  width: 41%;
}
.hc2 {
  right: 2%;
}
.set-logo .card-placeholder {
  aspect-ratio: auto;
  height: 100%;
  border: 0;
  font-size: 13px;
  background: none;
}
.set-logo .card-placeholder:empty {
  display: none;
}

.set-logo-fallback {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  text-align: center;
  color: var(--muted);
}
.mini-logo .set-logo-fallback {
  font-size: 12px;
}
.brand {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.035em;
}
.hero {
  background: var(--brand);
  color: #21101a;
  box-shadow: 0 0 0 100vmax var(--brand);
  clip-path: inset(0 -100vmax);
  border: 0;
  min-height: 600px;
}
.hero h1 {
  font-weight: 900;
  font-size: 68px;
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.hero .eyebrow,
.hero-copy > p:not(.eyebrow),
.hero-foot,
.hero-caption span {
  color: #fff;
}
.hero-copy > p:not(.eyebrow) {
  max-width: 450px;
  opacity: 0.87;
}
.hero .button.primary {
  background: white;
  color: black;
  border-color: white;
}
.hero .text-link {
  color: white;
}
.hero-caption {
  color: white;
}
.hero-foot {
  border-color: #ffffff40;
}
.collection-tools {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  background: var(--surface);
}
.price-card h2 {
  font-size: 56px;
  margin: 20px 0;
  letter-spacing: -2px;
}
.price-card h2 span {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.vip-price {
  border-top: 1px solid var(--line);
}
.price-card button {
  margin-top: 12px;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
.table-scroll {
  overflow: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.comparison {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--surface);
  font-size: 14px;
}
.comparison th,
.comparison td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.comparison thead {
  background: var(--soft);
}
.comparison tbody th {
  font-weight: 600;
}
.comparison td {
  color: var(--muted);
}
.comparison tr:last-child > * {
  border-bottom: 0;
}

.upload-panel {
  padding: 40px;
  border: 1px dashed var(--muted);
  border-radius: 16px;
  text-align: center;
  background: var(--surface);
  margin-bottom: 40px;
}
.upload-panel h2 {
  margin-bottom: 16px;
}
.upload-panel .muted {
  margin: 20px auto 0;
  max-width: 600px;
  font-size: 14px;
}
#import-file {
  display: block;
  max-width: 100%;
  margin: 18px auto;
  font-size: 14px;
}
@media (max-width: 650px) {
  .brand {
    font-size: 19px;
  }
  .hero {
    min-height: 0;
    padding-top: 42px;
  }
  .hero h1 {
    font-size: 48px;
  }
  .hero-cards {
    margin-top: 0;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .price-card {
    padding: 28px;
  }
  .price-card h2 {
    font-size: 48px;
  }
  .upload-panel {
    padding: 28px 18px;
  }

  .comparison th,
  .comparison td {
    padding: 14px;
  }
}

.upload-panel.loaded {
  padding: 18px;
}
.upload-panel.loaded h2,
.upload-panel.loaded p {
  display: none;
}
.upload-panel.loaded input {
  display: inline-block;
  margin: 0 0 0 18px;
  width: 260px;
  vertical-align: middle;
}
@media (max-width: 650px) {
  .upload-panel.loaded input {
    display: block;
    margin: 12px auto 0;
    max-width: 100%;
  }
}
#import-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
  border: 0;
  margin: 0;
}
.upload-panel:focus-within {
  outline: 2px solid var(--muted);
  outline-offset: 3px;
}

/* Six existing game marks; only Pokémon retains its original colour. */
.game-strip {
  background: var(--color-stock-strip);
  box-shadow: 0 0 0 100vmax var(--color-stock-strip);
  clip-path: inset(0 -100vmax);
}
.game-strip > div {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 20px 0;
  width: 100%;
}
.game-strip span {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 22px;
  border-left: 1px solid var(--color-stock-hairline);
}
.game-strip span:last-child {
  border-right: 1px solid var(--color-stock-hairline);
}
.game-strip img {
  display: block;
  width: 100%;
  max-width: 112px;
  height: 34px;
  object-fit: contain;
}
.game-strip .muted-game {
  filter: grayscale(1);
  opacity: 0.8;
}
.button.primary,
.quick-add.is-owned,
.owned-badge,
.segmented button.selected {
  background: var(--brand);
  border-color: var(--ink);
  color: #21101a;
}
.button:not(.secondary):not(:disabled):hover,
.quick-add:hover {
  border-color: var(--ink);
}
.button.primary:not(:disabled):hover {
  filter: brightness(0.9);
}
.hero .button.primary {
  background: #fff;
  border-color: #fff;
  color: #111;
}
#load-sentinel {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
#load-more {
  color: var(--ink);
}
#load-more[hidden] {
  display: none;
}
#loaded-count {
  margin: 24px 0 0;
}
@media (max-width: 650px) {
  .game-strip > div {
    height: 66px;
    padding: 16px 0;
  }
  .game-strip span {
    height: 34px;
    padding: 0 8px;
  }
  .game-strip img {
    height: 26px;
  }
}
@media (min-width: 651px) and (max-width: 1000px) {
  .hero h1 {
    font-size: clamp(42px, 6vw, 60px);
  }
}

.tile-variant {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
}
.tile-variant select {
  min-width: 0;
  width: 100%;
  max-width: 170px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
}
.tile-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tile-quantity button {
  padding: 6px 14px;
  background: transparent;
  color: inherit;
  border: 0;
  cursor: pointer;
}
.tile-quantity button:disabled {
  opacity: 0.35;
  cursor: default;
}
.tile-quantity output {
  font-variant-numeric: tabular-nums;
}
#set-cards-form {
  flex-wrap: wrap;
}

.goal-explainer {
  margin-block: 1.5rem;
}
.goal-explainer dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.goal-explainer dt {
  font-weight: 700;
}
.goal-explainer dd {
  margin: 0.4rem 0;
}
.variant-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0;
}
.variant-progress a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
@media (max-width: 640px) {
  .goal-explainer dl {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
.goal-explainer dl > div {
  display: block;
  padding: 0;
  border: 0;
}
.goal-explainer dd {
  text-align: left;
}
.goal-explainer {
  font-size: 0.9rem;
}
.goal-explainer h2 {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}
@media (max-width: 800px) {
  .set-progress {
    display: block;
    grid-column: 1/-1;
    border-left: 0;
    padding: 12px 0;
  }
  #set-cards-form select {
    flex: 1 1 45%;
    min-width: 0;
    max-width: none;
  }
  #set-cards-form select[name='mode'] {
    flex-basis: 100%;
  }
  #set-cards-form input {
    flex-basis: 100%;
  }
}
/* Collector controls reuse PT form geometry across set and card views. */
main select {
  appearance: none;
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 36px 9px 12px;
  line-height: 20px;
  background-image: var(--dropdown-chevron);
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  max-width: 100%;
}
.compact-set {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 170px;
  gap: 24px;
  padding: 18px 0 22px;
  min-height: 0;
}
.compact-set .large-set-logo {
  width: 100px;
  height: 90px;
  min-height: 0;
}
.compact-set h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 6px 0 12px;
}
.compact-set .metadata {
  margin: 0;
  gap: 12px;
}
.compact-set .set-progress strong {
  font-size: 32px;
}
.collector-progress {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 22px;
}
.mode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mode-row small,
.mode-help {
  font-size: 12px;
  color: var(--muted);
}
.mode-help {
  margin: 10px 0 0;
}
.progress-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 18px;
}
.progress-groups h2 {
  font-size: 14px;
  margin: 0 0 8px;
}
.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  font-size: 12px;
  padding: 8px 0;
}
.progress-row b {
  font-size: 12px;
  font-weight: 500;
}
.progress-row progress {
  grid-column: 1/-1;
  width: 100%;
  height: 4px;
  accent-color: var(--ink);
}
.checklist-title {
  margin: 16px 0 12px;
}
.set-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
#set-cards-form.set-toolbar > input {
  flex: 1 1 190px;
  width: auto;
  min-width: 0;
}
#set-cards-form.set-toolbar > select {
  flex: 0 1 auto;
  width: auto;
  min-width: 160px;
}
.tile-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 36px;
  margin: 6px 0 0;
}
.tile-quantity button {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 7px;
  font-size: 20px;
}
.tile-quantity output {
  font-size: 14px;
  font-weight: 600;
}
.tile-variant {
  display: block;
  font-size: 11px;
  min-height: 24px;
  margin-top: 6px;
  color: var(--muted);
}
.tile-variant select {
  min-height: 32px;
  line-height: 18px;
  padding: 6px 32px 6px 10px;
  font-size: 11px;
  border-radius: 8px;
  max-width: 100%;
}
.owned-badge,
.missing-badge {
  position: absolute;
  top: 6px;
  bottom: auto;
  right: auto;
  left: 6px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 16px;
}
.owned-badge {
  background: var(--accent);
  color: white;
}
.missing-badge {
  background: rgba(20, 20, 20, 0.8);
  color: #ddd;
}
.collection-set {
  padding: 12px;
  grid-template-columns: 60px minmax(0, 1fr) 140px;
  gap: 14px;
  min-height: 76px;
}
.collection-set .mini-logo {
  width: 60px;
  height: 50px;
}
.collection-set h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.collection-set p {
  font-size: 12px;
  margin: 0;
}
.collection-set .completion b {
  font-size: 13px;
}
@media (max-width: 650px) {
  .compact-set {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0;
  }
  .compact-set .large-set-logo {
    width: 64px;
    height: 64px;
  }
  .compact-set h1 {
    font-size: 23px;
  }
  .compact-set .set-progress {
    display: block;
    grid-column: 1/-1;
    padding: 8px 0;
    border: 0;
  }
  .compact-set .set-progress strong {
    font-size: 28px;
    display: inline-block;
    margin-left: 12px;
  }
  .compact-set .set-progress p {
    margin: 5px 0;
  }
  .mode-row .segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }
  .mode-row .segmented button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    white-space: normal;
  }
  .set-toolbar {
    gap: 8px;
  }
  #set-cards-form.set-toolbar > input {
    flex-basis: 100%;
  }
  #set-cards-form.set-toolbar > select {
    flex: 1 1 45%;
    min-width: 0;
  }
  .checklist-title {
    flex-wrap: wrap;
    gap: 10px;
  }
  .checklist-title .segmented {
    width: 100%;
    display: flex;
  }
  .checklist-title .segmented button {
    flex: 1;
    padding: 8px 6px;
  }
  .progress-groups {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .collection-set {
    grid-template-columns: 45px minmax(0, 1fr) 82px;
    gap: 10px;
  }
  .collection-set .mini-logo {
    width: 45px;
    height: 40px;
  }
}

.compact-set .large-set-logo strong,
.compact-set .set-logo-fallback {
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.compact-set .large-set-logo {
  padding: 6px;
  overflow: hidden;
}

/* Shared product controls and navigation rhythm. */
main input:focus-visible,
main select:focus-visible,
main textarea:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}
.filter-bar {
  overflow: visible;
}
.filter-bar input {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
}
.filter-bar .search-field {
  align-items: center;
}
.card-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.tile-quantity {
  margin-top: 10px;
  width: 100%;
}
.card-copy {
  text-align: left;
}
.collection-heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.collection-heading-actions .secondary {
  padding: 10px 18px;
}
.collection-series {
  margin-top: 24px;
}
.collection-series > h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
.collection-sets {
  margin: 0;
}

@media (max-width: 650px) {
  .collection-heading-actions {
    width: 100%;
  }
  .collection-heading-actions .button {
    font-size: 12px;
    padding: 10px 16px;
  }
}

#load-sentinel:has(button[hidden]):has(#load-status:empty) {
  display: none;
}

/* Collector work areas retain PT typography and accent at database density. */
.value-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin: 20px 0;
  overflow: hidden;
}
.value-metrics > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.value-metrics span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.value-metrics strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.6px;
  margin-top: 4px;
  white-space: nowrap;
}
.compact-set {
  padding: 24px 0;
  gap: 24px;
  grid-template-columns: 150px 1fr;
}
.compact-set .large-set-logo {
  height: 90px;
  width: 150px;
  padding: 8px;
  background: transparent;
}
.compact-set h1 {
  font-size: 36px;
  line-height: 1.1;
  margin: 8px 0 14px;
}
.collector-progress {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--surface);
}
.collector-progress > summary {
  cursor: pointer;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.collector-progress > summary span {
  font-size: 13px;
  color: var(--muted);
}
.progress-groups {
  padding-top: 16px;
}
.progress-groups h2 {
  font-size: 17px;
}
.checklist-title {
  margin: 24px 0 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.checklist-title h2 {
  font-size: 25px;
}
.segmented {
  flex-wrap: wrap;
}
.segmented button {
  padding: 8px 13px;
  font-size: 13px;
}
.set-toolbar {
  flex-wrap: wrap;
  margin-bottom: 12px;
  gap: 8px;
}
.set-toolbar input,
.set-toolbar select {
  min-width: 0;
  font-size: 13px;
  padding: 10px 12px;
}
.set-toolbar > input {
  flex: 1;
  min-width: 160px;
}
.display-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  font-size: 12px;
  color: var(--muted);
}
.display-toolbar select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  color: var(--ink);
  max-width: 210px;
}
.card-grid {
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.card-tile {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  min-width: 0;
  padding: 8px;
}
.card-art {
  border-radius: 7px;
  overflow: hidden;
}
.card-copy {
  padding: 10px 2px 5px;
  min-width: 0;
}
.card-copy > a {
  font-size: 14px;
  font-weight: 800;
}
.card-copy > span {
  font-size: 11px;
  line-height: 1.6;
}
.card-copy small {
  font-size: 12px;
}
.price-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  font-size: 13px;
  flex-wrap: wrap;
}
.price-line small {
  color: var(--muted);
  font-size: 10px;
}

.tile-bottom {
  display: flex;
  gap: 6px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.tile-quantity {
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--soft);
  border-radius: 6px;
  padding: 0;
  min-height: 32px;
}
.tile-quantity button {
  border: 0;
  background: transparent;
  min-width: 32px;
  height: 32px;
  padding: 0;
}
.tile-quantity output {
  font-size: 13px;
}
.tile-quantity button:disabled {
  opacity: 0.3;
}
.card-menu {
  position: relative;
}
.card-menu summary {
  cursor: pointer;
  list-style: none;
  font-size: 22px;
  padding: 0 8px;
}
.card-menu > div {
  position: absolute;
  right: 0;
  top: 100%;
  width: 215px;
  z-index: 10;
  background: var(--surface);
  box-shadow: 0 12px 35px #0009;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.card-menu button,
.card-menu a,
.card-menu small {
  display: block;
  text-align: left;
  width: 100%;
  font-size: 13px;
  padding: 9px;
  border: 0;
  background: none;
}
.card-menu small {
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.card-menu button:hover,
.card-menu a:hover {
  background: var(--soft);
}
.compact-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.compact-grid .card-tile {
  padding: 5px;
}
.compact-grid .card-art {
  aspect-ratio: 1.15;
}
.compact-grid .card-art img {
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 100%;
}
.compact-grid .card-copy > a {
  font-size: 13px;
}
.compact-grid .price-line {
  font-size: 12px;
}
.compact-grid .price-line small {
  font-size: 9px;
}
.detailed-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}
.detailed-grid .card-tile {
  display: grid;
  grid-template-columns: 105px minmax(150px, 1fr) minmax(370px, 1.8fr) 150px;
  gap: 16px;
  padding: 14px;
  align-items: center;
}
.detailed-grid .card-art {
  width: 105px;
  aspect-ratio: 63/88;
}
.detailed-grid .card-copy > a {
  font-size: 18px;
}
.detailed-grid .owned-badge {
  font-size: 9px;
  padding: 3px 6px;
}
.detailed-grid .price-line small {
  display: block;
  width: 100%;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
  align-items: center;
}
.row-actions a,
.row-actions button {
  font-size: 11px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 5px;
  padding: 5px 8px;
  margin: 0;
}
.variant-table {
  font-size: 12px;
  min-width: 0;
}
.variant-table > div {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) 90px 65px 65px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.variant-heading {
  color: var(--muted);
  font-size: 11px;
}
.variant-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.variant-step button {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 26px;
  height: 28px;
  padding: 0;
}
.variant-step button:disabled {
  opacity: 0.3;
}
.binder {
  margin: 20px auto 36px;
}
.binder-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px auto 20px;
  max-width: 740px;
  font-size: 13px;
}
.binder-nav button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: var(--surface);
}
.binder-nav button:disabled {
  opacity: 0.3;
}
.binder-nav label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.binder-nav select {
  width: 88px;
  min-width: 88px;
  padding: 8px;
  font-size: 13px;
}
.binder-page {
  display: grid;
  gap: 10px;
  background: var(--soft);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 740px;
  margin: auto;
  box-shadow: 0 14px 35px #0003;
}
.binder-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 460px;
}
.binder-3x3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 600px;
}
.binder-4x3,
.binder-4x4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pocket {
  position: relative;
  aspect-ratio: 63/88;
  border: 1px solid #ffffff26;
  border-radius: 5px;
  background: var(--bg);
  padding: 5px;
  box-shadow: inset 0 1px 8px #0005;
  min-width: 0;
  overflow: hidden;
}
.pocket img,
.pocket .card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 3px;
}
.pocket-unowned img {
  opacity: 0.55;
}
.pocket span {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 10px;
  padding: 1px 5px;
  background: #141414d9;
  border-radius: 3px;
  color: white;
}
.pocket-owned {
  border-color: var(--ink);
}
.empty-pocket {
  background: var(--surface);
}
.advanced-filter {
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.advanced-filter summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.advanced-filter > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
}
.advanced-filter label,
.property-fields label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.advanced-filter input,
.advanced-filter select {
  width: 100%;
  background: var(--soft);
}
.set-copy h3 {
  font-size: 17px;
}
.set-copy p {
  font-size: 11px;
  flex-wrap: wrap;
}
.set-copy .eyebrow {
  font-size: 9px;
}
.set-values {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}
.set-values b {
  display: block;
  font-size: 12px;
  color: var(--ink);
}
.collection-set {
  gap: 16px;
}
.collection-set .set-values {
  margin-left: auto;
}
.stats {
  margin: 20px 0;
}
.stats > div {
  padding: 18px;
}
.stats strong {
  font-size: 26px;
}
.card-neighbours {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 15px 0 25px;
  font-size: 13px;
}
.detail {
  gap: 44px;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
}
.detail-copy h1 {
  font-size: 38px;
}
.detail-copy .variant-table {
  margin-top: 20px;
}
.detail-copy .value-metrics {
  margin-top: 24px;
}
.price-history {
  margin: 30px 0;
}
.price-history h2 {
  font-size: 24px;
}
.price-history .section-title span {
  font-size: 12px;
  color: var(--muted);
}
.empty-chart {
  height: 200px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 24px;
}
.collectible-modal {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 760px;
  max-width: calc(100vw - 24px);
  max-height: 90vh;
  padding: 28px;
}
.collectible-modal::backdrop {
  background: #000b;
  backdrop-filter: blur(5px);
}
.collectible-modal h2 {
  font-size: 26px;
  margin: 0;
}
.collectible-modal .section-title {
  margin: 0;
}
.collectible-modal > p {
  font-size: 12px;
  color: var(--muted);
}
.collectible-modal button {
  border-radius: 5px;
}
.collectible-modal #close-modal {
  background: none;
  border: 0;
  font-size: 26px;
}
.modal-ownership {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0;
  gap: 20px;
}
.modal-ownership .tile-quantity {
  max-width: 180px;
}
.advanced-properties {
  margin-top: 24px;
}
.advanced-properties summary {
  font-weight: 700;
  font-size: 14px;
}
.advanced-properties fieldset {
  border: 0;
  padding: 16px 0 0;
}
.property-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.property-fields input,
.property-fields select,
.property-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 9px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
}
.property-fields .notes {
  grid-column: 1/-1;
}
.property-checks {
  display: flex;
  gap: 24px;
  font-size: 13px;
  padding: 16px 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.modal-footer .wishlist {
  font-size: 14px;
  margin-right: auto;
  margin-left: 0;
}
@media (max-width: 1050px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .compact-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .detailed-grid {
    grid-template-columns: 1fr;
  }
  .detailed-grid .card-tile {
    grid-template-columns: 90px 1fr 1.7fr;
  }
  .detailed-grid .card-art {
    width: 90px;
  }
  .detailed-grid .tile-tools {
    grid-column: 2/4;
    display: flex;
    gap: 24px;
  }
  .detailed-grid .tile-bottom {
    flex: 1;
  }
}
@media (max-width: 650px) {
  .compact-set {
    display: flex;
    padding: 12px 0;
    gap: 14px;
  }
  .compact-set .large-set-logo {
    width: 85px;
    min-width: 85px;
    height: 70px;
  }
  .compact-set h1 {
    font-size: 26px;
    margin: 5px 0 8px;
  }
  .compact-set .metadata {
    font-size: 10px;
    gap: 6px;
  }
  .value-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0;
  }
  .value-metrics > div {
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }
  .value-metrics strong {
    font-size: 21px;
  }
  .value-metrics span {
    font-size: 11px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .compact-grid .card-copy > a {
    font-size: 11px;
  }
  .compact-grid .card-copy > span {
    font-size: 9px;
  }
  .compact-grid .price-line small {
    display: none;
  }
  .compact-grid .card-menu summary {
    padding: 0 3px;
  }
  .compact-grid .tile-quantity button {
    min-width: 22px;
  }
  .compact-grid .tile-quantity output {
    font-size: 11px;
  }
  .compact-grid .owned-badge {
    font-size: 8px;
    padding: 2px 4px;
  }
  .set-toolbar > input,
  .set-toolbar > select {
    flex: 1 1 42%;
    width: 42%;
  }
  .advanced-filter > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
  .display-toolbar {
    flex-wrap: wrap;
  }
  .display-toolbar > span:last-child {
    font-size: 10px;
  }
  .binder-page {
    gap: 5px;
    padding: 8px;
  }
  .pocket {
    padding: 2px;
  }
  .pocket span {
    font-size: 7px;
    bottom: 2px;
    left: 2px;
    padding: 0 3px;
  }
  .binder-nav {
    gap: 8px;
    font-size: 11px;
  }
  .binder-nav button,
  .binder-nav select {
    font-size: 11px;
    padding: 7px;
  }
  .detailed-grid {
    grid-template-columns: 1fr;
  }
  .detailed-grid .card-tile {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .detailed-grid .card-art {
    width: 72px;
  }
  .detailed-grid .card-copy > a {
    font-size: 17px;
  }
  .detailed-grid .variant-table {
    grid-column: 1/-1;
  }
  .detailed-grid .tile-tools {
    grid-column: 1/-1;
  }
  .variant-table > div {
    grid-template-columns: minmax(75px, 1fr) 82px 57px 57px;
    gap: 5px;
    font-size: 11px;
  }
  .variant-step button {
    width: 24px;
  }
  .row-actions {
    margin-top: 8px;
    gap: 4px;
  }
  .row-actions a,
  .row-actions button {
    font-size: 10px;
    padding: 4px;
  }
  .collection-set {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }
  .collection-set .completion {
    grid-column: 2;
  }
  .collection-set .set-values {
    grid-column: 2;
    margin: 0;
  }
  .detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-image {
    max-width: 240px;
    margin: auto;
  }
  .detail-copy h1 {
    font-size: 30px;
  }
  .detail-copy dl {
    margin: 20px 0;
  }
  .card-neighbours {
    font-size: 11px;
  }
  .collectible-modal {
    padding: 18px;
  }
  .property-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collectible-modal h2 {
    font-size: 22px;
  }
  .property-checks {
    gap: 12px;
  }
  .progress-groups {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .checklist-title .segmented {
    width: 100%;
  }
  .segmented button {
    padding: 7px 9px;
    font-size: 11px;
  }
  .empty-chart {
    height: 160px;
  }
}
.set-hero.compact-set {
  min-height: 0;
  margin: 0;
  padding: 18px 0;
}
.set-hero.compact-set .large-set-logo img {
  max-height: 90px;
  max-width: 150px;
  object-fit: contain;
}

.recent-activity {
  margin: 24px 0;
}
.recent-activity h2 {
  font-size: 18px;
  margin: 0;
}
.recent-activity p {
  color: var(--muted);
  margin-bottom: 0;
}
.set-hero.compact-set {
  padding: 8px 0;
  gap: 20px;
}
.compact-set h1 {
  font-size: 32px;
  margin: 4px 0 8px;
}
.compact-set .eyebrow {
  margin: 0;
}
.value-metrics {
  margin: 12px 0;
}
.value-metrics > div {
  padding: 10px 14px;
}
.collector-progress {
  margin: 12px 0;
  padding: 9px 14px;
}
.checklist-title {
  margin: 16px 0 10px;
}
@media (max-width: 650px) {
  .compact-set h1 {
    font-size: 25px;
  }
  .value-metrics > div {
    padding: 10px;
  }
  .set-hero.compact-set {
    gap: 12px;
  }
}
/* Override the toolbar's horizontal flex basis inside vertical field labels. */
.set-toolbar .advanced-filter input,
.set-toolbar .advanced-filter select {
  flex: none;
  height: 40px;
  min-height: 40px;
  max-width: none;
  width: 100%;
}
.advanced-filter > div {
  align-items: end;
}
.advanced-filter .button {
  height: 40px;
  align-self: end;
  padding: 8px 16px;
}
.property-checks input {
  width: auto;
}

/* Set workspace refinement: identity, summary and controls form one compact lead-in. */
.compact-set {
  padding: 16px 0;
  gap: 20px;
  grid-template-columns: 112px minmax(0, 1fr);
}
.compact-set .large-set-logo {
  width: 112px;
  height: 72px;
  padding: 0;
}
.compact-set .set-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 24px;
}
.compact-set .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}
.compact-set h1 {
  font-size: 32px;
  margin: 0;
}
.compact-set .metadata {
  gap: 14px;
  font-size: 13px;
}
.compact-set + .value-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: transparent;
  margin: 0 0 16px;
  align-items: stretch;
}
.compact-set + .value-metrics > div {
  padding: 10px 16px;
}
.compact-set + .value-metrics strong {
  font-size: 20px;
}
.progress-modal .close-progress {
  background: transparent;
  border: 0;
  font-size: 26px;
}
.progress-modal .progress-groups {
  padding-top: 0;
}
.set-controls {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.set-controls .segmented {
  padding: 0;
  background: transparent;
  border: 0;
  gap: 3px;
}
.set-controls .segmented button {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
}
.view-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.view-choice select {
  width: auto;
  min-width: 126px;
  height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}
#set-cards-form.set-toolbar {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 8px;
}
#set-cards-form.set-toolbar > input,
#set-cards-form.set-toolbar > select {
  height: 38px;
  flex: 1 1 140px;
}
#set-cards-form.set-toolbar > input {
  flex: 2 1 180px;
}
#set-cards-form.set-toolbar > button {
  height: 38px;
  padding: 8px 16px;
}
#set-cards-form .advanced-filter {
  border: 0;
  margin: 0;
  padding-top: 2px;
}
#set-cards-form .advanced-filter > summary {
  font-size: 13px;
  color: var(--muted);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 40px;
  padding-top: 12px;
}
.detail-image {
  padding: 0;
  background: transparent;
  border: 0;
}
.detail-copy h1 {
  font-size: 34px;
  margin: 4px 0;
}
.detail-number {
  margin: 4px 0 12px;
}
.detail-copy dl {
  margin: 12px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.detail-copy dl > div {
  padding: 6px 0;
}
.detail-copy .collection-action {
  padding: 16px;
  margin: 16px 0;
  border-radius: 10px;
  background: var(--surface);
}
.collection-action .section-title {
  margin: 0 0 12px;
  align-items: center;
  gap: 12px;
}
.collection-action h2 {
  font-size: 20px;
}
.manage-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
  border: 0;
  padding: 0;
  background: transparent;
}
.manage-link:hover {
  color: var(--text);
}
.collection-action .modal-ownership {
  padding: 0 0 12px;
  margin: 0;
}
.collection-action .variant-table {
  margin: 0;
}
.collection-action .variant-table > div {
  padding: 12px 14px;
}
.detail-copy > .value-metrics {
  background: transparent;
  border: 0;
  margin: 0;
}
.detail-copy > .value-metrics > div {
  padding: 8px 16px 8px 0;
}
.price-history {
  padding: 16px 0;
  background: transparent;
  border: 0;
  margin-top: 24px;
}
.price-history .empty-chart {
  height: 140px;
}
.card-neighbours {
  margin: 12px 0;
}
@media (max-width: 700px) {
  .compact-set {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
  }
  .compact-set .large-set-logo {
    width: 76px;
    height: 60px;
  }
  .compact-set .set-identity {
    display: block;
  }
  .compact-set h1 {
    font-size: 25px;
    margin: 4px 0 6px;
  }
  .compact-set .eyebrow {
    font-size: 12px;
  }
  .compact-set .metadata {
    gap: 4px 10px;
    font-size: 12px;
  }
  .compact-set + .value-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
  }
  .compact-set + .value-metrics > div {
    padding: 8px;
    border: 0;
  }
  .compact-set + .value-metrics strong {
    font-size: 18px;
  }
  .toolbar-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  .set-controls .segmented {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .set-controls .segmented button {
    padding: 7px 6px;
    font-size: 12px;
  }
  .view-choice {
    margin-left: auto;
  }
  #set-cards-form.set-toolbar > input {
    flex-basis: 100%;
  }
  #set-cards-form.set-toolbar > select {
    flex-basis: 40%;
  }
  .detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-image {
    max-width: 200px;
    margin: auto;
  }
  .detail-copy h1 {
    font-size: 28px;
  }
  .detail-copy dl {
    gap: 6px 12px;
  }
  .detail-copy .collection-action {
    padding: 12px;
  }
  .collection-action h2 {
    font-size: 18px;
  }
  .collection-action .variant-table {
    font-size: 12px;
  }
  .collection-action .variant-table > div {
    grid-template-columns: minmax(70px, 1fr) 86px 48px 48px;
    gap: 5px;
  }
  .collection-action .variant-step {
    gap: 4px;
  }
  .card-neighbours {
    font-size: 12px;
  }
}
.set-hero.compact-set {
  display: grid;
  align-items: center;
}
.set-hero.compact-set .large-set-logo img {
  max-width: 100%;
  max-height: 72px;
}
.set-hero.compact-set:has(.set-logo-fallback) {
  grid-template-columns: minmax(0, 1fr);
}
.compact-set .large-set-logo:has(.set-logo-fallback) {
  display: none;
}

/* Verified exact-ID set assets are the primary collection identity. */
.set-hero.compact-set {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  padding: 14px 0;
}
.compact-set .large-set-logo {
  width: 190px;
  height: 108px;
}
.set-hero.compact-set .large-set-logo img {
  width: 100%;
  max-width: 190px;
  max-height: 108px;
  object-fit: contain;
}
.set-symbol {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  margin-right: 8px;
}
.set-symbol img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.set-identity .eyebrow,
.set-copy .eyebrow {
  display: flex;
  align-items: center;
}
.set-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.collection-set .mini-logo {
  width: 126px;
  height: 76px;
  display: grid;
  place-items: center;
}
.collection-set .mini-logo img {
  width: 126px;
  max-height: 76px;
  object-fit: contain;
}
.collection-set {
  grid-template-columns: 126px minmax(0, 1fr) auto auto;
}
.detail-set-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.detail-set-identity .mini-logo img {
  width: 130px;
  height: 62px;
  object-fit: contain;
}
@media (max-width: 700px) {
  .set-hero.compact-set {
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 14px;
  }
  .compact-set .large-set-logo {
    width: 122px;
    height: 90px;
  }
  .set-hero.compact-set .large-set-logo img {
    max-height: 90px;
  }
  .compact-set .set-identity h1 {
    font-size: 23px;
  }
  .collection-set {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .collection-set .mini-logo {
    width: 96px;
    height: 64px;
  }
  .collection-set .mini-logo img {
    width: 96px;
    max-height: 64px;
  }
}

/* One Lucide Heart across all Wishlist surfaces. */
.wishlist,
.card-title .wishlist,
.row-actions .wishlist,
.card-menu .wishlist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  min-height: 32px;
  width: auto;
  height: auto;
  padding: 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--wishlist);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: color 120ms ease;
}
.wishlist svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
}
.wishlist[aria-pressed='true'] {
  color: var(--wishlist);
}
.wishlist[aria-pressed='true'] svg {
  fill: currentColor;
}
.wishlist:hover,
.wishlist:focus-visible {
  color: var(--wishlist);
  background: transparent;
}
.wishlist:focus-visible {
  outline: 2px solid var(--wishlist);
  outline-offset: 2px;
}
.wishlist[aria-disabled='true'] {
  cursor: progress;
}
.wishlist-review-note {
  color: var(--muted);
  font-size: 12px;
  margin: 32px 0 16px;
}
@media (prefers-reduced-motion: reduce) {
  .wishlist {
    transition: none;
  }
}

.price-line > .wishlist {
  margin-left: auto;
}
.value-metrics strong > [data-wishlist-count] {
  font: inherit;
  color: inherit;
}

/* Shared collection workspace: one toolbar and explicit, canonical-card quantities. */
.catalogue-controls {
  margin: 18px 0 20px;
}
.catalogue-toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding-left: 14px;
  gap: 10px;
}
.search-field > svg {
  color: var(--muted);
  flex: none;
}
.search-field input {
  background: transparent;
  border: 0;
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 8px 0;
  color: var(--ink);
  font-size: 14px;
}

.toolbar-trigger {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.toolbar-trigger:hover,
.toolbar-trigger[aria-expanded='true'] {
  border-color: var(--ink);
}
.toolbar-trigger small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.filter-count {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  min-width: 21px;
  height: 21px;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.active-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.active-filter-chips button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.active-filter-chips button span {
  color: var(--muted);
  font-size: 17px;
}
.toolbar-dialog {
  position: fixed;
  margin: 0;
  width: 260px;
  max-width: calc(100vw - 24px);
  max-height: min(620px, calc(100dvh - 24px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 16px 64px #0006;
  overflow-y: auto;
}
.toolbar-dialog::backdrop {
  background: #0003;
}
.toolbar-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}
.toolbar-dialog-head h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 900;
}
.toolbar-dialog-head button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 24px;
  border-radius: 6px;
}
.control-options {
  padding: 0 8px 10px;
}
.control-options p {
  margin: 8px 10px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--muted);
}
.control-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  text-align: left;
}
.control-options button[aria-pressed='true'] {
  background: var(--soft);
  font-weight: 800;
}
.control-options button[aria-pressed='true'] span:last-child {
  color: var(--ink);
}
.control-options button:hover:not(:disabled) {
  background: var(--soft);
}
.control-options button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.filter-panel {
  width: 360px;
}
.filter-body {
  padding: 0 18px 18px;
}
.filter-body fieldset {
  border: 0;
  padding: 0;
  margin: 10px 0 20px;
  min-width: 0;
}
.filter-body fieldset:last-child {
  margin-bottom: 0;
}
.filter-body legend {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--muted);
}
.filter-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.filter-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.filter-choice:has(:checked) {
  border-color: var(--ink);
}
.filter-choice input {
  margin: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}
.filter-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  margin: 12px 0 0;
}
.filter-field select {
  min-width: 0;
  width: 100%;
  height: 42px;
  font-size: 13px;
}
.filter-footer {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  bottom: 0;
}
.filter-footer > button {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 800;
  background: var(--soft);
}
.filter-footer > .primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--ink);
}
.detailed-grid {
  gap: 10px;
}
.detailed-grid .card-tile {
  grid-template-columns: 86px minmax(180px, 1fr) minmax(420px, 1.6fr);
  gap: 20px;
  padding: 14px 18px 14px 14px;
  align-items: center;
}
.detailed-grid .card-art {
  width: 86px;
  grid-column: auto;
  grid-row: auto;
}
.detailed-grid .card-copy {
  min-width: 0;
}
.detailed-grid .card-copy > a {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
}
.detailed-grid .card-copy > span {
  font-size: 12px;
  margin-top: 5px;
}
.detailed-grid .card-copy > small {
  color: var(--muted);
  font-size: 11px;
}
.detailed-grid .row-actions {
  margin-top: 8px;
  gap: 8px;
}
.detailed-grid .row-actions a {
  font-size: 12px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.detailed-grid .row-actions .wishlist {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
}
.detailed-grid .variant-table {
  grid-column: auto;
  width: 100%;
}
.variant-table > div {
  grid-template-columns: minmax(115px, 1fr) 120px 65px 65px;
  gap: 10px;
  min-width: 0;
}
.variant-table .variant-heading {
  padding: 0 10px 7px;
  border: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}
.variant-table .variant-row {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  margin-top: 5px;
  min-height: 46px;
}
.variant-row strong {
  font-size: 12px;
  line-height: 1.2;
}
.variant-row strong small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 3px;
}

.variant-step {
  display: grid;
  grid-template-columns: 34px minmax(25px, 1fr) 34px;
  gap: 3px;
}
.variant-step button {
  width: 34px;
  height: 34px;
  font-weight: 900;
  font-size: 19px;
  border-radius: 5px;
}
.variant-step output {
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.variant-table .generic-copies {
  background: transparent;
  border-style: dashed;
}
.generic-copies strong {
  color: var(--muted);
}
@media (max-width: 1000px) {
  .detailed-grid .card-tile {
    grid-template-columns: 76px minmax(140px, 1fr) minmax(360px, 1.6fr);
    gap: 14px;
  }
  .detailed-grid .card-art {
    width: 76px;
  }
  .variant-table > div {
    grid-template-columns: minmax(95px, 1fr) 110px 54px 54px;
    gap: 5px;
  }
  .toolbar-trigger small {
    display: none;
  }
}
@media (max-width: 700px) {
  .catalogue-controls {
    margin: 16px 0;
  }
  .catalogue-toolbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }
  #catalogue-search,
  .search-field {
    grid-column: 1/-1;
  }
  .toolbar-trigger {
    min-height: 42px;
    padding: 0 10px;
  }
  .toolbar-trigger small {
    display: none;
  }
  .toolbar-dialog {
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(85dvh, 700px);
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .toolbar-dialog::backdrop {
    background: #0008;
  }
  .toolbar-dialog-head {
    padding: 12px 18px 8px;
  }
  .control-options button {
    min-height: 46px;
  }
  .filter-choice {
    min-height: 44px;
  }
  .filter-footer {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .filter-footer > .primary {
    flex: 1;
  }
  .detailed-grid .card-tile {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 12px;
  }
  .detailed-grid .card-art {
    width: 64px;
    grid-row: 1;
  }
  .detailed-grid .card-copy > a {
    font-size: 17px;
  }
  .detailed-grid .variant-table {
    grid-column: 1/-1;
  }
  .variant-table > div {
    grid-template-columns: minmax(100px, 1fr) 120px;
    gap: 8px;
  }
  .variant-table > div > span:nth-child(n + 3) {
    display: none;
  }
  .variant-step {
    grid-template-columns: 38px minmax(24px, 1fr) 38px;
  }
  .variant-step button {
    width: 38px;
    height: 38px;
  }
  .variant-table .variant-row {
    min-height: 50px;
  }
  .detailed-grid .row-actions {
    margin-top: 6px;
  }
}

.detailed-mobile-price {
  display: none;
}
@media (max-width: 700px) {
  .detailed-mobile-price {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 11px;
    margin-top: 7px;
  }
  .variant-step {
    grid-template-columns: 42px minmax(25px, 1fr) 42px;
  }
  .variant-step button {
    width: 42px;
    height: 42px;
  }
}

/* Guided collection import: one decision and one primary action at a time. */
.import-flow {
  max-width: 960px;
  margin: 0 auto 3rem;
  scroll-margin-top: 100px;
}
#import-upload[hidden] {
  display: none;
}
.import-flow h2 {
  margin: 0.5rem 0 1rem;
}
.import-flow p {
  line-height: 1.65;
}
.import-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
  margin: 1rem 0;
  border-block: 1px solid var(--line);
}
.import-metrics strong {
  display: block;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.import-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.import-flow > details {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0;
  margin-top: 1rem;
}
.import-flow summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
}
.import-flow summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.import-detail-scroll {
  max-height: 28rem;
  overflow: auto;
  padding-right: 0.5rem;
  overflow-wrap: anywhere;
}
.import-detail-scroll dl {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 0.5rem 1rem;
}
.import-detail-scroll dd {
  margin: 0;
  min-width: 0;
}
.import-flow-actions {
  position: static;
  background: var(--surface);
  padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.import-flow-actions p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.import-flow-actions > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.import-flow-actions .button {
  min-height: 48px;
  text-align: center;
  white-space: normal;
}
.import-flow-actions .button:not(.secondary) {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
}
.import-flow .button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (max-width: 650px) {
  .import-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .import-metrics strong {
    font-size: 1.75rem;
  }
  .import-flow-actions > div {
    flex-direction: column-reverse;
    gap: 0.65rem;
  }
  .import-flow-actions .button {
    width: 100%;
    box-sizing: border-box;
  }
  .import-flow-actions p {
    font-size: 0.8rem;
  }
  .import-detail-scroll dl {
    display: block;
  }
  .import-detail-scroll dd {
    margin: 0.3rem 0 1rem;
  }
}

main > *,
.detail > *,
.toolbar > *,
.home section > * {
  min-width: 0;
}
.card-grid:not(.detailed-grid):not(.compact-grid) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}
.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr));
}
.import-flow {
  max-width: none;
}
.upload-panel p,
.import-flow > p,
.page-heading p,
.detail-copy > p {
  max-width: 65ch;
}
.upload-panel p {
  margin-inline: auto;
}
.binder-nav {
  flex-wrap: wrap;
}
/* Physical binder pages and focused forms retain their purposeful inner measures. */
@container (min-width: 1400px) {
  .detailed-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .detailed-grid .card-tile {
    grid-template-columns: 76px minmax(140px, 1fr) minmax(360px, 1.6fr);
  }
}
@media (max-width: 650px) {
  .card-grid:not(.detailed-grid):not(.compact-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* A concise static Home, using the existing type, palette and accent. */
.home h1,
.home h2,
.home p {
  margin-top: 0;
}
.home p {
  color: var(--muted);
  max-width: 58ch;
}
.home h2 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.home h1 {
  font-size: clamp(36px, 3.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.home-intro > p:not(.eyebrow) {
  font-size: 18px;
}
.home .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
@media (max-width: 650px) {
  .home-intro > p:not(.eyebrow) {
    font-size: 16px;
  }
}
@media (max-width: 420px) {
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .filter-bar select {
    flex: 1 1 130px;
    width: auto;
  }
  .filter-bar select[name='language'] {
    flex-basis: 100%;
  }
}
.account-heading {
  padding: 28px 0 24px;
}
.account-heading h1 {
  font-size: clamp(28px, 2.4vw, 38px);
  margin: 0 0 10px;
  line-height: 1.15;
  letter-spacing: -1px;
}
.account-heading p {
  margin: 0;
  color: var(--muted);
}
.account-heading .eyebrow {
  margin-bottom: 10px;
}
.account-summary {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr 1fr;
  border-block: 1px solid var(--line);
  margin-bottom: 28px;
}
.account-summary > div {
  min-width: 0;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.account-summary > div:first-child {
  padding-left: 0;
}
.account-summary > div:last-child {
  border-right: 0;
}
.account-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.account-summary strong {
  font-size: 17px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.account-section {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.account-section h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.account-section .eyebrow {
  margin-bottom: 12px;
}
.account-section p {
  max-width: 65ch;
  color: var(--muted);
  font-size: 14px;
}
.account-section dl {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}
.account-section dl > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
}
.account-section dt {
  font-size: 13px;
  color: var(--muted);
}
.account-section dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.account-profile-form {
  max-width: none;
}
.account-profile-form .account-section {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px;
}
.account-profile-form .account-section h2,
.account-profile-form .account-section p {
  margin: 0;
}
.account-profile-form fieldset.account-section {
  margin: 0;
  border-radius: 12px;
}
.account-profile-form legend {
  font-size: 22px;
  font-weight: 700;
  padding: 0 8px;
}
.account-profile-form input:not([type='checkbox']),
.account-profile-form textarea,
.account-profile-form select {
  width: 100%;
  max-width: 42rem;
}
.account-profile-form input:not([type='checkbox']) {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg);
}
.account-profile-form input[readonly] {
  color: var(--muted);
  background: var(--soft);
}
.signin-panel {
  padding-block: 48px;
  max-width: 560px;
}
.signin-panel h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}
.signin-panel p {
  color: var(--muted);
}
@media (max-width: 900px) {
  .account-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-summary > div {
    padding: 16px 0;
    border: 0;
  }
  .account-summary > div:nth-child(even) {
    padding-left: 20px;
  }
}
@media (max-width: 650px) {
  .account-summary,
  .profile-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-summary > div,
  .account-summary > div:nth-child(even) {
    padding: 12px 0;
  }
  .account-section,
  .account-profile-form .account-section {
    padding: 18px;
  }
  .account-section dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  .account-heading {
    padding-block: 24px;
  }
  .account-heading h1 {
    margin-bottom: 10px;
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 3px;
}
.button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}
.button.primary {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
  box-shadow: none;
}
.button:hover {
  filter: none;
  border-color: var(--muted);
  box-shadow: 0 3px 10px #0003;
  transform: none;
}
.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.button.danger,
.button.destructive {
  border-color: var(--red);
  background: var(--surface);
  color: var(--red);
}
.button.success {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
progress {
  accent-color: var(--ink);
  overflow: hidden;
  border-radius: 8px;
}
progress::-webkit-progress-bar {
  background: #303533;
  border-radius: 8px;
}
progress::-webkit-progress-value {
  background: var(--progress);
  border-radius: 8px;
}
progress::-moz-progress-bar {
  background: var(--progress);
}
progress[data-complete='true']::-webkit-progress-value {
  background: var(--progress);
}
progress[data-complete='true']::-moz-progress-bar {
  background: var(--progress);
}
.home-intro .eyebrow {
  color: var(--red);
  letter-spacing: 2px;
}
.home h1 {
  letter-spacing: -1.5px;
}
.set-copy {
  min-width: 0;
}
.set-values {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.set-meta-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
  grid-column: 2;
  grid-row: 1 / 3;
}
.compact-set .set-identity {
  align-items: center;
}
.compact-set .eyebrow {
  grid-column: 1;
}
.compact-set h1 {
  grid-column: 1;
}
.compact-set .progress-trigger {
  width: auto;
  height: auto;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
}
.compact-set + .value-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.value-metrics > div {
  --metric: var(--ink);
  border-top: 0;
  background: var(--surface);
}
.value-metrics [data-metric*='variant'] {
  --metric: var(--ink);
}
.value-metrics [data-metric='wishlist'] {
  --metric: var(--ink);
}
.value-metrics [data-metric*='duplicate'] {
  --metric: var(--ink);
}
.value-metrics [data-metric='value'] {
  --metric: var(--ink);
}
.value-metrics strong {
  color: var(--metric);
}
.toolbar-trigger {
  background: var(--surface);
  gap: 8px;
}
.toolbar-trigger .control-value {
  font-size: inherit;
  line-height: inherit;
  font-weight: 500;
  color: var(--ink);
}

.toolbar-trigger[aria-expanded='true'],
.control-options button[aria-pressed='true'] {
  background: var(--nav-active);
  border-color: var(--ink);
}
.card-tile {
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.card-tile:hover,
.card-tile:focus-within {
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
  box-shadow: 0 4px 16px #0002;
}
.card-tile:has(.owned-badge),
.card-tile:has(.variant-owned) {
  border-top-color: var(--line);
}
.tile-tools {
  border-top: 1px solid var(--line);
}
.owned-badge {
  background: var(--surface);
  color: var(--progress);
  border: 1px solid var(--progress);
}
.account-section,
.upload-panel,
.price-card {
  background: var(--surface);
}
@media (max-width: 1100px) {
  .set-meta-actions .metadata {
    flex-wrap: wrap;
    justify-content: end;
    max-width: 220px;
  }
}
@media (max-width: 800px) {
  .set-meta-actions {
    grid-column: 1;
    grid-row: auto;
    justify-items: start;
  }
  .set-meta-actions .metadata {
    justify-content: start;
    max-width: none;
  }
  .compact-set .set-identity {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .compact-set + .value-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar-trigger {
    padding-inline: var(--dropdown-inset);
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .catalogue-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  #catalogue-search,
  .search-field {
    min-width: 0;
  }
  .toolbar-trigger {
    gap: 8px;
  }
  .toolbar-trigger .control-chevron {
    display: block;
  }
}
@media (max-width: 420px) {
  .toolbar-trigger > svg:first-child {
    display: none;
  }
  .toolbar-trigger {
    padding-inline: var(--dropdown-inset);
  }
  .toolbar-trigger .control-value {
    white-space: normal;
  }
}

.set-results {
  margin: 14px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.set-series {
  padding: 20px 0 8px;
}
.set-series + .set-series {
  padding-top: 28px;
}
.set-series > h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 14px;
  padding-left: 0;
  border-left: 0;
}
@container (max-width: 420px) {
  .set-series > h2 {
    font-size: 20px;
    margin-bottom: 12px;
  }
}

/* Orange actions, pink Wishlist and green progress; structural UI is neutral. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: var(--muted);
}
.button:hover {
  border-color: var(--ink);
}
.home-intro .eyebrow {
  color: var(--ink);
}
.set-hero.compact-set,
.set-hero.compact-set:has(.set-logo-fallback) {
  grid-template-columns: minmax(0, 1fr);
}
.card-tile {
  border-color: var(--line);
}
.button[data-delete]:hover,
.button[data-bulk='delete']:hover,
#delete-confirm:hover,
.button.danger:hover,
.button.destructive:hover {
  border-color: var(--red);
}

/* Search owns one visual surface; focus belongs to that surface, not its input. */
.search-field {
  padding-right: 14px;
}
.search-field:focus-within {
  border-color: var(--ink);
}
.search-field input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}
.home-editorial {
  max-width: 1360px;
  margin-inline: auto;
}
.home-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6%;
  padding-block: 72px 88px;
}
.home-editorial h1 {
  max-width: 12ch;
  font-size: clamp(38px, 4.2vw, 74px);
}
.home-editorial .home-intro > p:not(.eyebrow) {
  max-width: 48ch;
  line-height: 1.75;
}
.home-art {
  margin: 0;
  min-width: 0;
}
.home-card-fan {
  height: clamp(290px, 31vw, 470px);
  position: relative;
  isolation: isolate;
}
.home-card-fan::before {
  content: '';
  position: absolute;
  inset: 10% 0;
  background: radial-gradient(
    ellipse,
    color-mix(in srgb, var(--brand) 16%, transparent),
    transparent 67%
  );
  z-index: -1;
}
.home-card-fan img {
  position: absolute;
  width: 43%;
  max-width: 265px;
  height: auto;
  border-radius: 4%;
  box-shadow: 0 18px 28px #0005;
}
.home-card-fan img:nth-child(1) {
  left: 5%;
  top: 15%;
  transform: rotate(-13deg);
}
.home-card-fan img:nth-child(2) {
  right: 3%;
  top: 9%;
  transform: rotate(12deg);
}
.home-card-fan img:nth-child(3) {
  left: 30%;
  top: 0;
  transform: rotate(-2deg);
}
.home-art figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.home-art figcaption a {
  color: var(--ink);
}
.home-editorial h2 {
  font-size: clamp(27px, 3vw, 46px);
  line-height: 1.15;
  letter-spacing: -1px;
}
.compact-set .progress-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 750;
  box-shadow: none;
}
.compact-set .progress-trigger:hover {
  color: var(--ink);
}
.detail {
  grid-template-columns: minmax(220px, 340px) minmax(0, 760px);
  gap: clamp(24px, 4vw, 72px);
  justify-content: center;
  align-items: start;
}
.detail-image img {
  max-height: 490px;
  width: 100%;
  object-fit: contain;
}
.detail-copy {
  min-width: 0;
  padding: 0;
}
.detail-set-identity {
  font-size: 13px;
  color: var(--ink);
  display: inline-block;
  margin-bottom: 12px;
}
.detail-copy h1 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.15;
}
.detail-copy dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-block: 12px;
}
.detail-copy > .wishlist {
  margin: 2px 0 8px;
}
.detail-copy .collection-action {
  margin: 12px 0 20px;
  padding: 20px;
}
.detail-copy > .value-metrics {
  margin: 0;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.detail-copy > .value-metrics > div {
  padding: 16px 20px;
}
@media (max-width: 900px) {
  .home-lead {
    gap: 24px;
    padding-block: 48px;
  }
  .home-editorial h1 {
    font-size: 42px;
  }
}
@media (max-width: 650px) {
  .home-lead {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-lead {
    padding-block: 30px;
    gap: 36px;
  }
  .home-editorial h1 {
    font-size: clamp(36px, 10vw, 48px);
    letter-spacing: -1.5px;
  }
  .home-card-fan {
    height: 330px;
    max-width: 400px;
    margin-inline: auto;
  }
  .home-card-fan img {
    max-width: 210px;
  }
  .detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .detail-image {
    max-width: 250px;
    margin-inline: auto;
  }
  .detail-copy .collection-action {
    padding: 14px;
  }
  .detail-copy > .value-metrics > div {
    padding: 14px;
  }
}
@media (max-width: 360px) {
  .home-card-fan {
    height: 285px;
  }
}

.detail-copy dl > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* The same search primitive serves both set and card browsers. */
#catalogue-search {
  display: flex;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.search-field {
  margin: 0;
}
.search-field input {
  margin: 0;
  flex: 1;
  max-width: none;
}
.catalogue-controls {
  position: sticky;
  top: var(--product-header-height);
  z-index: 18;
  background: var(--bg);
  padding-block: 8px;
}

.row-actions .wishlist,
.row-actions .details-link {
  min-height: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.row-actions .details-link {
  padding: 0 12px;
}
.collection-action .variant-row {
  padding: 12px 14px;
}
.rarity-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rarity-mark {
  font-size: 10px;
  letter-spacing: -1px;
  white-space: nowrap;
}
.rarity-gold {
  color: var(--amber);
}
.rarity-silver {
  color: var(--muted);
}
.collection-grouping .collection-sets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.collection-grouping .collection-set {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.collection-grouping .completion {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.collection-grouping .completion b {
  min-width: 40px;
}
.collection-grouping .progress {
  flex: 1;
  width: 100%;
  height: 7px;
}
.collection-grouping .set-values {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.collection-series {
  margin-block: 28px;
}
.route-skeleton {
  border-radius: 12px;
  background: var(--soft);
}
.skeleton-metrics {
  height: 130px;
  margin-block: 24px;
}
.skeleton-toolbar {
  height: 54px;
  margin-block: 24px;
}
.skeleton-content {
  min-height: 440px;
}

@media (max-width: 768px) {
  .collection-grouping .collection-sets {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 500px) {
  .collection-grouping .collection-set {
    padding: 16px;
    gap: 12px;
    grid-template-columns: 60px minmax(0, 1fr);
  }
}

.collection-grouping .collection-sets {
  border: 0;
  background: transparent;
  border-radius: 0;
}
.collection-grouping .mini-logo,
.collection-grouping .mini-logo img {
  width: 100%;
  max-width: 80px;
  height: 64px;
  object-fit: contain;
}
.collection-grouping .mini-logo .set-placeholder {
  width: min(100%, 64px);
  height: min(100%, 64px);
}
.collection-grouping .set-values {
  margin: 0;
}

.custom-set-action {
  width: 100%;
  min-height: 96px;
  color: var(--muted);
  text-align: left;
  font: inherit;
  cursor: not-allowed;
  opacity: 0.72;
}
.custom-set-action .mini-logo {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 30px;
}
.custom-set-action h3 {
  color: inherit;
}
.custom-set-action:is(:hover, :focus-visible),
.custom-set-card-action:is(:hover, :focus-visible) {
  opacity: 1;
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}
.custom-set-card-action {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}
.custom-set-card-action span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.card-menu .custom-set-card-action {
  color: var(--muted);
}
.custom-set-detail-action {
  padding-top: 10px;
}
.custom-set-detail-action .custom-set-card-action {
  padding: 6px 0;
  border: 0;
  background: none;
  text-align: left;
}
.collection-grouping .completion b {
  margin: 0;
}

@media (max-width: 700px) {
  .collection-action .variant-table > div {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 8px;
  }
}

/* One chevron asset and geometry for shared triggers and native select pickers. */
:root {
  --dropdown-chevron: url('/brand-assets/select-chevron.svg');
  --dropdown-gap: 8px;
  --dropdown-inset: 12px;
}
.toolbar-trigger {
  justify-content: flex-start;
  gap: var(--dropdown-gap);
  padding-inline: var(--dropdown-inset);
  line-height: 20px;
}
.toolbar-trigger > span:not(.control-chevron),
.toolbar-trigger .control-value {
  line-height: inherit;
  white-space: nowrap;
}
.control-chevron {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0 0 0 auto;
  background: var(--muted);
  mask: var(--dropdown-chevron) center / 16px 16px no-repeat;
  transition: transform 140ms ease;
}
.toolbar-trigger[aria-expanded='true'] .control-chevron {
  transform: rotate(180deg);
}
#main select {
  appearance: none;
  background-image: var(--dropdown-chevron);
  background-size: 16px 16px;
  background-position: right var(--dropdown-inset) center;
  background-repeat: no-repeat;
  padding-right: calc(var(--dropdown-inset) + 16px + var(--dropdown-gap));
}
/* Keep native selection/keyboard behavior; supported browsers expose its icon for shared styling. */
@supports (appearance: base-select) {
  #main select,
  #main select::picker(select) {
    appearance: base-select;
  }
  :where(#main) select {
    display: inline-flex;
  }
  #main select {
    align-items: center;
    justify-content: flex-start;
    gap: var(--dropdown-gap);
    background-image: none;
    padding-inline: var(--dropdown-inset);
  }
  #main select::picker-icon {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: var(--muted);
    mask: var(--dropdown-chevron) center / 16px 16px no-repeat;
    transition: transform 140ms ease;
    color: var(--muted);
    margin-inline-start: 0;
    align-self: center;
  }
  #main select:open::picker-icon {
    transform: rotate(180deg);
  }
  #main select::picker(select) {
    background: var(--elevated);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    max-height: min(400px, 60vh);
    overflow: auto;
  }
  #main select option {
    padding: 8px 10px;
    border-radius: 4px;
  }
  #main select option:hover,
  #main select option:focus {
    background: var(--soft);
  }
}
@media (max-width: 420px) {
  .catalogue-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .toolbar-trigger {
    padding-inline: var(--dropdown-inset);
  }
  .toolbar-trigger .control-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (prefers-reduced-motion: reduce) {
  .control-chevron {
    transition: none;
  }
  @supports (appearance: base-select) {
    #main select::picker-icon {
      transition: none;
    }
  }
}

.toolbar-actions {
  display: flex;
  align-items: stretch;
  gap: var(--dropdown-gap);
  min-width: 0;
}
.toolbar-actions .toolbar-trigger {
  flex: 0 0 auto;
}
.toolbar-actions [data-open-controls='view'] {
  flex: 0 1 auto;
  min-width: 0;
}
@media (max-width: 700px) {
  .toolbar-actions {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Rarity is a bare symbol (or plain-text fallback), never a badge. */
.rarity-mark {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
.detail-number .rarity-mark,
.detail-number .rarity-label {
  margin-left: 8px;
}
/* Translate independently of the fan's static rotation. */
.home-card-fan img {
  animation: hero-drift 7.8s ease-in-out infinite;
  --hero-drift: -5px;
}
.home-card-fan img:nth-child(2) {
  animation-duration: 9.3s;
  animation-delay: -3.1s;
  --hero-drift: -7px;
}
.home-card-fan img:nth-child(3) {
  animation-duration: 8.6s;
  animation-delay: -5.2s;
  --hero-drift: -4px;
}
@keyframes hero-drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 var(--hero-drift);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-card-fan img {
    animation: none;
    translate: none;
  }
}

/* Local pricing coverage uses the existing value surfaces. */
.set-values b small,
.value-metrics strong small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted, #8a94a6);
  line-height: 1.5;
}

@media (max-width: 1000px) {
  .variant-table > div {
    grid-template-columns: minmax(70px, 1fr) 110px 58px;
  }
  .variant-table > div > span:nth-child(3) {
    display: block;
    text-align: right;
  }
}

/* Set rows: one shared, workspace-responsive presentation at every screen size. */
.set-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.set-tile {
  display: grid;
  grid-template-columns: 108px minmax(180px, 1fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.set-tile:hover,
.set-tile:focus-visible {
  border-color: var(--ink);
  background: var(--elevated);
  transform: none;
}
.set-tile .set-logo {
  width: 108px;
  height: 86px;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
}
.set-tile .set-logo img {
  width: 100%;
  height: 100%;
  max-height: 86px;
  object-fit: contain;
}
.set-tile .set-copy {
  padding: 0;
}
.set-tile h3 {
  margin: 6px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  min-height: 0;
}
.set-tile .eyebrow {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}
.set-tile .set-copy > p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  font-size: 12px;
}
.set-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 0.7fr);
  align-items: center;
  gap: 24px;
}
.set-stats .set-tile-progress {
  min-width: 0;
}
.set-stats .set-tile-progress b {
  font-size: 13px;
  font-weight: 600;
}
.set-stats progress {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  height: 5px;
  margin: 10px 0 0;
}
.set-stats progress::-webkit-progress-value {
  background: var(--progress);
}
.set-stats progress::-moz-progress-bar {
  background: var(--progress);
}
.set-stats .set-values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 20px;
  border-top: 0;
  border-left: 1px solid var(--line);
  font-size: 10px;
}
.set-stats .set-values b {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}
.set-placeholder {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: auto;
  color: var(--muted);
  opacity: 0.65;
}
.set-placeholder svg {
  width: 56px;
  height: 56px;
}
@container (max-width: 900px) {
  .set-tile {
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 18px;
    gap: 16px 22px;
  }
  .set-tile .set-logo {
    width: 86px;
    height: 72px;
  }
  .set-stats {
    grid-column: 2;
    grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1fr);
    gap: 20px;
  }
}
@container (max-width: 600px) {
  .set-tile {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 16px;
    gap: 16px;
  }
  .set-tile .set-logo {
    width: 64px;
    height: 64px;
  }
  .set-tile h3 {
    font-size: 18px;
  }
  .set-stats {
    grid-column: 1 / -1;
    grid-template-columns: minmax(80px, 0.7fr) minmax(140px, 1fr);
    gap: 12px;
  }
  .set-stats .set-values {
    padding-left: 12px;
    gap: 8px;
  }
}

/* Home chapters use one editorial grid and spacing rhythm. The hero is unchanged. */
.home-chapters {
  --chapter-space: clamp(52px, 7cqi, 110px);
}
.home-chapter,
.home-portability {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6cqi, 96px);
  padding-block: var(--chapter-space);
  border-top: 1px solid var(--line);
}
.chapter-copy {
  max-width: 47ch;
}
.home-chapters h2 {
  font-size: clamp(32px, 4.5cqi, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 18px 0 26px;
}
.home-chapters p:not(.eyebrow) {
  font-size: clamp(16px, 1.6cqi, 18px);
  line-height: 1.8;
  color: var(--muted);
}
.home-chapters .eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.home-chapters .text-link {
  display: inline-block;
  margin-top: 14px;
}
.home-chapters figure {
  margin: 0;
  min-width: 0;
}
.home-chapters figcaption {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.art-pair {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 8px 48px;
}
.art-pair img {
  width: 48%;
  max-width: 255px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 16px 36px #0005;
}
.art-pair img:first-child {
  transform: rotate(-8deg) translateY(-10px);
}
.art-pair img:last-child {
  transform: rotate(8deg) translateY(22px);
  margin-left: -8%;
}
.discovery-art figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.discovery-art figcaption span {
  letter-spacing: 0;
}
.collection-art-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-block: 30px;
}
.collection-art-row img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.collection-art-gap {
  display: grid;
  place-items: center;
  aspect-ratio: 245 / 342;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 28px;
  color: var(--muted);
}
.collection-art figcaption {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  text-transform: uppercase;
}
.home-portability {
  align-items: start;
}
.portability-path {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  font-size: clamp(13px, 1.7cqi, 20px);
}
.portability-path span:nth-child(even) {
  color: var(--muted);
}
.portability-copy .actions {
  flex-wrap: wrap;
}
.portability-copy .text-link {
  margin-top: 0;
}
.market-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0.8fr;
  align-items: end;
  gap: 24px;
  padding: 30px 12px;
}
.market-art img {
  width: 100%;
  height: auto;
  transform: rotate(-7deg);
  border-radius: 8px;
}
.market-art figcaption {
  font-size: clamp(18px, 2.5cqi, 32px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  padding-bottom: 12px;
}
.home-closing {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-block: var(--chapter-space);
}
.home-closing h2 {
  font-size: clamp(40px, 6cqi, 80px);
}
@container (max-width: 700px) {
  .home-chapter,
  .home-portability {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .home-chapters h2 {
    font-size: clamp(32px, 7cqi, 46px);
  }
  .home-collection-story .chapter-copy {
    grid-row: 1;
  }
  .home-chapters figure {
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
  }
  .art-pair {
    padding-block: 20px 40px;
  }
  .home-portability h2 {
    margin-bottom: 0;
  }
}

/* Shared completion, inspection and import primitives. No historical values are simulated. */
.card-tile:hover,
.set-tile:hover {
  border-color: #525456;
}
.card-copy > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rarity-mark {
  vertical-align: middle;
}
.set-placeholder {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(145deg, #303436, #1b1e20);
  color: #9ba4a6;
}
.set-placeholder svg {
  width: 56px;
  height: 56px;
}
.collection-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 24px 0 32px;
}
.collection-primary > div {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
}
.collection-primary dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.collection-primary dd {
  margin: 0;
  text-align: left;
  font-size: clamp(28px, 3.2cqi, 44px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.collection-wishlist-metric dt {
  color: var(--wishlist);
}
.value-coverage {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 5px;
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 800px;
  line-height: 1.6;
}
.collection-metrics-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  margin: 0 0 28px;
}
.collection-metrics-bar > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  border: 0;
  gap: 5px;
}
.collection-metrics-bar dd {
  margin: 0;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.collection-metrics-bar dt {
  color: var(--muted);
  font-size: 11px;
}
.purchase-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}
.purchase-actions small {
  color: var(--muted);
  font-size: 11px;
}
@media (min-width: 1100px) {
  .detail-image[data-inspection-art] {
    position: sticky;
    top: 100px;
    align-self: start;
  }
}
[data-inspection-art] {
  position: relative;
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 180ms ease-out;
}
[data-inspection-art]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  opacity: var(--sheen, 0);
  background: radial-gradient(
    ellipse at var(--shine-x, 50%) var(--shine-y, 50%),
    #ffffff2e,
    transparent 62%
  );
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  [data-inspection-art] {
    transform: none;
    transition: none;
  }
  [data-inspection-art]::after {
    display: none;
  }
}
.home-latest {
  margin: 30px 0 80px;
}
.home-latest .section-title {
  align-items: end;
}
.home-latest h2 {
  font-size: clamp(24px, 3cqi, 36px);
}
.home-latest-sets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.home-latest-sets a {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--ink);
}
.home-latest-sets h3 {
  font-size: 17px;
  margin: 18px 0 8px;
}
.home-latest-sets p,
.home-latest-sets a > span:last-child {
  font-size: 12px;
  color: var(--muted);
}
.import-steps {
  scroll-margin-top: calc(var(--product-header-height) + 16px);
  display: flex;
  list-style: none;
  padding: 0;
  margin: 28px 0 32px;
  gap: 0;
  padding-block: 18px;
  border-block: 1px solid var(--line);
}
.import-steps li {
  position: relative;
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}
.import-steps li:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  margin: 0 14px;
  background: #393c3d;
}
.import-steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #45494b;
  flex-shrink: 0;
  font-size: 12px;
}
.import-steps li.current {
  color: var(--ink);
  background: none;
  border: 0;
}
.import-steps li.current b {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.import-steps li.completed b {
  color: var(--progress);
  border-color: var(--progress);
}
.import-steps li.completed::after {
  background: var(--progress);
}
.import-steps .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.import-steps li.current:last-child b {
  background: var(--progress);
  border-color: var(--progress);
  color: #17191a;
}
@container (max-width: 650px) {
  .collection-metrics-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-latest-sets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .import-steps li {
    flex-direction: column;
    gap: 7px;
    font-size: 10px;
  }
  .import-steps li:not(:last-child)::after {
    position: absolute;
    width: calc(100% - 38px);
    left: calc(50% + 19px);
    top: 15px;
    margin: 0;
  }
}
@container (max-width: 600px) {
  .collection-primary {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .collection-primary dt {
    margin-bottom: 6px;
  }
  .collection-primary dd {
    font-size: 32px;
  }
  .collection-metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
}

.home-set-logo {
  height: 80px;
  width: 120px;
  object-fit: contain;
  object-position: left center;
}

/* Shared primary interaction states, including filter-dialog actions. */
.button.primary:hover:not(:disabled),
.filter-footer > .primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}
.button.primary:active:not(:disabled),
.filter-footer > .primary:active:not(:disabled) {
  background: var(--brand-pressed);
  border-color: var(--brand-pressed);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: var(--brand-on-dark);
}
.wishlist:focus-visible {
  outline-color: var(--wishlist);
}

/* Empty personal values keep their grid slot without exposing a placeholder. */
.metric-empty {
  visibility: hidden;
}
.purchase-actions .button {
  gap: 10px;
  padding: 10px 16px;
}
.purchase-actions .ebay-logo {
  width: 40px;
  height: 16px;
  object-fit: contain;
}

/* Supplied marks retain transparency and fit without stretching or cropping. */
.supplied-set-logo {
  display: block;
  width: 108px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 12px;
}

/* Public set values use comparable observed daily snapshots; empty history is explicit. */
.set-tile {
  grid-template-columns: 108px minmax(180px, 1fr) minmax(100px, 180px) minmax(270px, 0.65fr);
}
.set-trend {
  color: var(--text-muted);
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}
.set-sparkline {
  display: block;
  width: 100%;
  max-width: 160px;
  height: 44px;
  color: var(--trend-blue);
}
.trend-empty {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}
.set-metric-trend {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 5px;
  color: var(--text-muted);
}
.supplied-set-logo {
  object-fit: contain;
}
.supplied-set-logo .set-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.supplied-set-logo .set-placeholder svg {
  width: 48px;
  height: 48px;
}
/* Selection lives in the existing variant rows, alongside their copy controls. */
.variant-selection {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.variant-selection[aria-pressed='true'] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 1100px) {
  .set-tile {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .set-tile .set-trend {
    grid-column: 2;
  }
  .set-tile .set-stats {
    grid-column: 2;
    width: 100%;
  }
}
@media (max-width: 600px) {
  .set-tile {
    min-height: 220px;
    align-items: start;
  }
  .set-tile .set-stats {
    grid-column: 1 / -1;
  }
  .set-tile .set-trend {
    min-height: 32px;
  }
  .set-values {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* Optional history leaves no empty column. Fallback is a mark inside the shared slot. */
.set-tile:not(:has(.set-trend)) {
  grid-template-columns: 108px minmax(180px, 1fr) minmax(220px, 0.8fr);
}
.supplied-set-logo.set-identity-fallback {
  display: flex;
  align-items: center;
  width: 108px;
  height: 60px;
  max-width: 108px;
  max-height: 60px;
}
.supplied-set-logo.set-identity-fallback .set-placeholder {
  display: grid;
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  flex: 0 0 28px;
  background: transparent;
}
.supplied-set-logo.set-identity-fallback .set-placeholder svg {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
}
@media (max-width: 1100px) {
  .set-tile:not(:has(.set-trend)) {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .set-tile:not(:has(.set-trend)) {
    min-height: 170px;
  }
}

.detail-copy > .value-metrics:has(> div:only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.detail-copy > .value-metrics > div:only-child {
  border-right: 0;
}

.compact-set .set-identity {
  padding-top: 0;
}
.value-metrics .set-sparkline {
  display: block;
  width: 120px;
  height: 40px;
}

:root {
  --trend-blue: #4d7cff;
}
.collection-primary .collection-wishlist-metric :is(dt, dd) {
  color: inherit;
}
.collection-empty {
  padding: clamp(40px, 7vw, 88px) 24px;
  text-align: center;
}
.collection-empty h2 {
  font-size: 28px;
  margin: 0 0 12px;
}
.collection-empty p {
  color: var(--text-muted);
  margin-bottom: 24px;
}
.collection-first-run {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  margin: 24px 0 36px;
}
.collection-first-run p {
  max-width: 460px;
  margin: 0 auto 24px;
}
.collection-first-run-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.collection-first-run-scan {
  display: inline-block;
  margin-top: 20px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 600px) {
  .collection-first-run-actions {
    flex-direction: column;
  }
  .collection-first-run-actions .button {
    width: 100%;
  }
}
.price-chart .chart-line {
  stroke: var(--trend-blue);
}
.price-chart circle {
  fill: var(--trend-blue);
  stroke: var(--trend-blue);
}
.price-chart circle:is(:hover, :focus) {
  fill: var(--trend-blue);
  stroke: var(--trend-blue);
}

.chart-treatment-select {
  width: auto;
  min-height: 32px;
  padding: 4px 28px 4px 10px;
  font-size: 12px;
}

.import-methods {
  border: 0;
  padding: 0;
  margin: 28px 0;
  display: grid;
  gap: 12px;
}
.import-methods legend {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.import-methods label {
  display: flex;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.import-methods label:has(input:checked) {
  border-color: var(--orange, #f97316);
  background: rgba(249, 115, 22, 0.04);
}
.import-methods label span span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.import-methods input {
  accent-color: var(--orange, #f97316);
  flex-shrink: 0;
}
.import-detail-scroll table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}
.import-detail-scroll th,
.import-detail-scroll td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.import-flow-actions {
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 480px) {
  .import-methods label {
    padding: 16px;
  }
  .import-flow-actions > .button {
    width: 100%;
  }
}
.import-methods input[type='radio'] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 3px 0 0;
  flex: 0 0 18px;
}
.import-methods label > span {
  min-width: 0;
}
.import-methods {
  min-width: 0;
}
.import-flow-actions {
  display: flex;
  align-items: center;
}
.import-detail-scroll table {
  min-width: 620px;
  overflow-wrap: normal;
}
.import-methods label:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Shared linear feed for Home and personal/public Activity. */
.activity-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.activity-filters a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 9px 13px;
  border-radius: 7px;
}
.activity-filters a[aria-current] {
  color: var(--text);
  background: #ffffff0c;
}
.activity-feed {
  display: block;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.activity-feed li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.activity-feed img,
.activity-feed .activity-placeholder {
  width: 42px;
  height: 58px;
  object-fit: contain;
  flex: none;
}
.activity-placeholder {
  display: grid;
  place-items: center;
  color: var(--set-accent, var(--text-muted));
  background: #ffffff05;
  border-radius: 6px;
  font-size: 23px;
}
.activity-feed li div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.activity-feed strong {
  font-size: 14px;
  font-weight: 600;
}
.activity-feed span {
  font-size: 13px;
}
.activity-feed small {
  color: var(--text-muted);
  font-size: 12px;
}
.activity-empty {
  padding: 40px 0;
  color: var(--text-muted);
}

@media (max-width: 420px) {
  .activity-filters a {
    padding: 8px 10px;
  }
}

/* Plan capacity states preserve the controls and their layout. */
button[data-entitlement-disabled],
a[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}
[data-limit-state],
[data-history-upgrade] {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.transfer-availability-tip {
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.graded-panel {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #ddd);
}
.graded-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.graded-row > span {
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}
.graded-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.graded-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.graded-form input,
.graded-form select,
.graded-form textarea {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
}

/* Neutral availability state on the dedicated Import page. */
.import-unavailable-panel { max-width: 42rem; padding: 24px; border: 1px solid var(--border); border-radius: 12px; }
.import-unavailable-panel p { margin: 0 0 20px; line-height: 1.6; }

/* Compact current values; raw price history remains separate and unchanged. */
.card-market-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.card-market-values > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.card-market-values span {
  font-size: 12px;
  color: var(--muted);
}
.card-market-values strong {
  font-size: 16px;
  line-height: 1.4;
}

.card-market-values.raw-only {
  grid-template-columns: minmax(0, 1fr);
}

/* Foreground inspection stays separate from the static card layout. */
.detail > .detail-image { position: relative; }
@media (min-width: 1100px) {
  .detail > .detail-image { position: sticky; top: 100px; }
}
.detail-copy .price-history {
  margin-top: 8px;
  padding-top: 8px;
}
.detail-copy .purchase-actions {
  margin: 12px 0;
}
.detail-copy .variant-step {
  grid-template-columns: 44px minmax(25px, 1fr) 44px;
}
.detail-copy .variant-step button {
  width: 44px;
  height: 44px;
}
.detail-copy .custom-set-card-action {
  min-height: 44px;
}
@media (max-width: 700px) {
  #main .detail {
    gap: 12px;
    padding: 0 0 24px;
  }
  .detail > .detail-image {
    width: 168px;
    max-width: 48vw;
  }
  .detail-image .card-foreground > img {
    height: 234px;
    max-height: 30svh;
    border-radius: 8px;
  }
  .detail-copy h1 {
    font-size: 26px;
    margin: 0 0 4px;
  }
  .detail-set-identity {
    margin-bottom: 0;
    font-size: 12px;
  }
  .detail-copy .detail-meta {
    margin: 6px 0;
    gap: 6px 10px;
    font-size: 12px;
  }
  .detail-meta .wishlist {
    min-height: 44px;
  }
  .card-market-values {
    margin: 8px 0;
    gap: 8px;
  }
  .card-market-values > div {
    padding: 9px 12px;
    gap: 2px;
  }
  .detail .detail-copy .collection-action {
    padding: 14px;
    margin: 8px 0;
  }
  .detail .collection-action .section-title {
    margin-bottom: 10px;
  }
  .collection-action h2 {
    font-size: 16px;
  }
  .detail-copy .price-history h2 {
    font-size: 18px;
  }
}


/* Single-card simplified rows apply consistently at every width. */
.detail .collection-action .variant-heading,
.detail .collection-action .variant-table > .variant-row > .variant-trend { display: none; }
.detail .collection-action .variant-table > .variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}
.detail .collection-action .variant-row > strong {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.detail .collection-action .variant-row > .variant-price {
  display: block;
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
}
.detail .collection-action .variant-row > .variant-step {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: 44px minmax(24px, max-content) 44px;
  gap: 4px;
  align-items: center;
  justify-self: end;
}
.detail .collection-action .variant-step button {
  width: 44px;
  height: 44px;
}
.detail .collection-action .variant-step output {
  text-align: center;
  line-height: 44px;
}
.detail .collection-action .variant-price::before { content: none; }
