:root {
  --ink: #0b1f2a;
  --ink-soft: #1c3a4a;
  --paper: #f3f6f4;
  --mint: #7fd1b9;
  --signal: #e23d28;
  --gold: #e8c547;
  --line: rgba(11, 31, 42, 0.12);
  --shadow: 0 24px 60px rgba(11, 31, 42, 0.18);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(127, 209, 185, 0.35), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(226, 61, 40, 0.18), transparent 50%),
    linear-gradient(165deg, #eef4f1 0%, #d9e5df 45%, #c5d4cf 100%);
  line-height: 1.5;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 31, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 42, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  z-index: 0;
}

.site-header,
.hero,
.prices-page,
.binder-page,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  z-index: 42;
}

.nav-toggle {
  display: none;
  appearance: none;
  position: relative;
  z-index: 42;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(11, 31, 42, 0.18);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
}

.nav-toggle-bars::before {
  transform: translateY(-6px);
}

.nav-toggle-bars::after {
  transform: translateY(4px);
}

.site-header.is-nav-open .nav-toggle-bars {
  background: transparent;
}

.site-header.is-nav-open .nav-toggle-bars::before {
  transform: translateY(0) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle-bars::after {
  transform: translateY(-2px) rotate(-45deg);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

nav a.active,
nav a:hover {
  color: var(--signal);
}

@media (max-width: 859px) {
  body.nav-open {
    overflow: hidden;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-header {
    z-index: 40;
  }

  .site-header nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 41;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 5rem clamp(1.25rem, 4vw, 3rem) 2rem;
    overflow-y: auto;
    background: #eef4f1;
    border: 0;
    box-shadow: none;
  }

  .site-header.is-nav-open nav {
    display: flex;
  }

  .site-header nav a,
  .site-header nav .auth-nav-btn {
    width: 100%;
    text-align: left;
  }

  .site-header nav a {
    padding: 0.9rem 0.15rem;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(11, 31, 42, 0.08);
  }

  .site-header nav .auth-nav-sep {
    display: none;
  }

  .site-header nav .auth-nav-btn {
    width: auto;
    align-self: flex-start;
    margin-top: 0.35rem;
  }

  .home-header {
    z-index: 40;
  }

  .home-header nav {
    background: #07151c;
  }

  .home-header .nav-toggle {
    border-color: rgba(238, 244, 241, 0.35);
    background: rgba(238, 244, 241, 0.1);
  }

  .home-header .nav-toggle-bars,
  .home-header .nav-toggle-bars::before,
  .home-header .nav-toggle-bars::after {
    background: #eef4f1;
  }

  .home-header nav a {
    border-bottom-color: rgba(238, 244, 241, 0.12);
  }

  .binder-header nav {
    background: #121a16;
  }

  .binder-header .nav-toggle {
    border-color: rgba(232, 238, 233, 0.35);
    background: rgba(232, 238, 233, 0.1);
  }

  .binder-header .nav-toggle-bars,
  .binder-header .nav-toggle-bars::before,
  .binder-header .nav-toggle-bars::after {
    background: #e8eee9;
  }

  .binder-header nav a {
    border-bottom-color: rgba(232, 238, 233, 0.12);
  }
}

.hero {
  min-height: calc(100vh - 5.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) 3rem;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
  color: var(--ink);
  animation: rise 0.8s ease both;
}

.hero h1,
.prices-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.03em;
  margin: 0 0 0.75rem;
  font-weight: 400;
}

.hero h1 {
  max-width: 12ch;
  animation: rise 0.9s 0.08s ease both;
}

.lede {
  font-size: 1.125rem;
  max-width: 38ch;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  animation: rise 1s 0.14s ease both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 1.05s 0.2s ease both;
}

.btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn[hidden] {
  display: none !important;
}

.btn-primary {
  background: var(--signal);
  color: #fff;
}

.btn-primary:hover {
  background: #c93220;
}

.btn-secondary {
  background: transparent;
  color: inherit;
  border-color: rgba(11, 31, 42, 0.28);
}

.btn-secondary:hover {
  border-color: rgba(11, 31, 42, 0.55);
  background: rgba(243, 246, 244, 0.65);
}

.binder-body .btn-secondary {
  border-color: rgba(232, 238, 233, 0.28);
  color: #e8eee9;
}

.binder-body .btn-secondary:hover {
  border-color: rgba(232, 238, 233, 0.55);
  background: rgba(232, 238, 233, 0.08);
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-on-dark {
  border-color: rgba(243, 246, 244, 0.85);
  color: #f3f6f4;
}

.btn-on-dark:hover {
  background: rgba(243, 246, 244, 0.1);
}

/* —— Home landing —— */
.home-body {
  background: #07151c;
  color: #eef4f1;
}

.home-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  width: 100%;
}

.home-header .logo,
.home-header nav a,
.home-header .auth-nav-btn {
  color: #eef4f1;
}

.home-header nav a:hover,
.home-header nav a.active {
  color: var(--gold);
}

.home-header .auth-nav-sep {
  background: rgba(238, 244, 241, 0.35);
}

.home-header .auth-nav-btn {
  border-color: rgba(238, 244, 241, 0.45);
}

.hero-landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(6.5rem, 12vh, 8rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-plane-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(7, 21, 28, 0.2) 0%, rgba(7, 21, 28, 0.55) 42%, rgba(7, 21, 28, 0.88) 100%),
    linear-gradient(180deg, #1a3a2e 0%, #0b1f2a 45%, #07151c 100%);
  animation: wash-shift 14s ease-in-out infinite alternate;
}

.hero-plane-stripes {
  position: absolute;
  inset: -10% -5%;
  background: repeating-linear-gradient(
    -18deg,
    transparent 0 18px,
    rgba(226, 61, 40, 0.14) 18px 22px,
    transparent 22px 48px
  );
  opacity: 0.85;
  animation: stripe-drift 22s linear infinite;
}

.hero-plane-foil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 70%, rgba(232, 197, 71, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(127, 209, 185, 0.18), transparent 55%);
  animation: foil-pulse 8s ease-in-out infinite alternate;
}

.hero-landing-copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.home-body .brand-mark {
  color: #f3f6f4;
  text-shadow: 0 2px 28px rgba(7, 21, 28, 0.45);
}

.home-body .hero-landing h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  letter-spacing: 0.03em;
  font-weight: 400;
  max-width: 14ch;
  margin: 0 0 0.85rem;
  color: #f3f6f4;
  animation: rise 0.9s 0.08s ease both;
}

.home-body .lede {
  color: rgba(238, 244, 241, 0.86);
  max-width: 36ch;
  animation: rise 1s 0.14s ease both;
}

.social-cta {
  animation: rise 1.05s 0.22s ease both;
}

.social-cta .btn:nth-child(1) {
  animation: rise 1.05s 0.22s ease both;
}

.social-cta .btn:nth-child(2) {
  animation: rise 1.1s 0.28s ease both;
}

.social-cta .btn:nth-child(3) {
  animation: rise 1.15s 0.34s ease both;
}

.home-prices-band {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(165deg, #eef4f1 0%, #d9e5df 55%, #c5d4cf 100%);
  color: var(--ink);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
}

.home-prices-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.home-prices-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.home-prices-band p {
  margin: 0;
  max-width: 40ch;
  color: var(--ink-soft);
}

.home-prices-cta {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
}

.pulse-line {
  font-weight: 600;
  color: var(--ink) !important;
}

.pulse-line strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--signal);
  margin-left: 0.25rem;
}

.home-footer {
  background: #07151c;
  color: rgba(238, 244, 241, 0.7);
}

.home-footer a {
  color: #f3f6f4;
  font-weight: 600;
  text-decoration: none;
}

.home-footer a:hover {
  color: var(--gold);
}

.prices-page {
  padding: 1rem clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0.5rem;
}

#cache-meta {
  margin: 0;
  font-weight: 600;
}

.hint {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-section {
  margin-top: 2.75rem;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.section-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.sort-field {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.sort-field-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sort-field select {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: rgba(243, 246, 244, 0.9);
  border: 1px solid rgba(11, 31, 42, 0.22);
  border-radius: 0.35rem;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.sort-field select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.set-group-row td {
  padding-top: 1.15rem;
  padding-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid rgba(11, 31, 42, 0.28);
  background: rgba(243, 246, 244, 0.55);
}

.set-group-row:first-child td {
  padding-top: 0.65rem;
}

.price-section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
  font-weight: 400;
}

.section-note {
  margin: 0;
  color: var(--ink-soft);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 18rem;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-ui {
  position: relative;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(11, 31, 42, 0.2);
  border: 1px solid rgba(11, 31, 42, 0.25);
  transition: background 0.15s ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 31, 42, 0.35);
  transition: transform 0.15s ease;
}

.toggle input:checked + .toggle-ui {
  background: var(--ink);
  border-color: var(--ink);
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(1.05rem);
}

.toggle input:focus-visible + .toggle-ui {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.toggle-label {
  line-height: 1.25;
  font-size: 0.95rem;
}

.strike {
  text-decoration: line-through;
  opacity: 0.75;
}

.promo-note {
  margin-top: 0.25rem;
}

.product-note {
  margin-top: 0.2rem;
  font-style: italic;
}

.promo-line {
  padding-left: 0.15rem;
}

.admin-form-section {
  margin-top: 1.5rem;
  max-width: 40rem;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: rgba(243, 246, 244, 0.92);
  border: 1px solid rgba(11, 31, 42, 0.22);
  border-radius: 0.35rem;
  padding: 0.65rem 0.75rem;
}

.admin-form textarea {
  resize: vertical;
  min-height: 5rem;
}

.admin-form input:focus-visible,
.admin-form select:focus-visible,
.admin-form textarea:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.field-hint {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.promos-field {
  display: grid;
  gap: 0.35rem;
}

.promos-field-label {
  font-weight: 600;
  color: var(--ink-soft);
}

.promo-picker {
  display: grid;
  gap: 0.65rem;
}

.promo-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.promo-picker-row .btn {
  padding: 0.55rem 1rem;
  white-space: nowrap;
}

.promo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.promo-list-empty {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.promo-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 400;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.promo-remove {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--signal);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.promo-remove:hover {
  color: #c93220;
}

.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.checkbox-field input {
  width: 1.1rem;
  height: 1.1rem;
}

.form-actions {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  margin-top: 0.25rem;
}

.form-actions-row {
  grid-template-columns: auto auto;
  align-items: center;
}

.form-actions-row .hint {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
  border-top: 2px solid var(--ink);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

td a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

td a:hover {
  color: var(--signal);
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.money.best {
  color: #0f7a5a;
}

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--mint);
  color: var(--ink);
}

.muted {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.error-text {
  color: var(--signal);
  font-size: 0.85rem;
}

.site-footer {
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer code {
  font-size: 0.85em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes wash-shift {
  from {
    filter: saturate(1) brightness(1);
  }
  to {
    filter: saturate(1.08) brightness(1.06);
  }
}

@keyframes stripe-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-60px);
  }
}

@keyframes foil-pulse {
  from {
    opacity: 0.75;
  }
  to {
    opacity: 1;
  }
}

/* —— Master Sets index —— */
.master-sets-page {
  max-width: 72rem;
}

.master-sets-section {
  margin-top: 2.75rem;
}

.master-sets-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin: 0 0 0.85rem;
}

.master-sets-section-lede {
  margin: -0.35rem 0 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.pokemon-search {
  position: relative;
  max-width: 28rem;
  margin: 0 0 1.35rem;
}

.pokemon-search-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.pokemon-search-field {
  position: relative;
}

.pokemon-search-input {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 0.9rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(11, 31, 42, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.pokemon-search-input:focus {
  outline: 2px solid rgba(226, 61, 40, 0.35);
  outline-offset: 1px;
  border-color: rgba(226, 61, 40, 0.45);
}

.pokemon-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: min(22rem, 55vh);
  overflow-y: auto;
  border-radius: 0.45rem;
  border: 1px solid rgba(11, 31, 42, 0.12);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 36px rgba(11, 31, 42, 0.14);
}

.pokemon-search-results[hidden] {
  display: none !important;
}

.pokemon-search-empty {
  padding: 0.75rem 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.pokemon-search-option {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pokemon-search-option:hover,
.pokemon-search-results li.is-active .pokemon-search-option {
  background: rgba(11, 31, 42, 0.06);
}

.pokemon-search-thumb {
  width: 2.25rem;
  height: 3.1rem;
  object-fit: cover;
  border-radius: 0.2rem;
  flex-shrink: 0;
  background: rgba(11, 31, 42, 0.06);
}

.pokemon-search-thumb.is-empty {
  display: block;
}

.pokemon-search-option-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pokemon-search-option-name {
  font-weight: 700;
}

.pokemon-search-option-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.master-set-portrait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1rem;
}

.master-set-portrait {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  border-radius: 0.3rem;
  transition: transform 0.15s ease;
}

.master-set-portrait:hover {
  transform: translateY(-3px);
}

.master-set-portrait-art {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 0.25rem;
  box-shadow: 0 10px 24px rgba(11, 31, 42, 0.18);
  background: rgba(11, 31, 42, 0.06);
}

.master-set-portrait-art.is-empty {
  display: block;
}

.master-set-portrait-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.master-set-portrait-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.master-set-portrait-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.master-set-portrait-meta.is-complete {
  color: #2a7a64;
  font-weight: 700;
}

.master-set-portrait-wrap {
  position: relative;
}

.master-set-fav-btn,
.binder-favorite-btn {
  appearance: none;
  border: 0;
  background: rgba(8, 14, 12, 0.72);
  color: rgba(232, 238, 233, 0.55);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.master-set-fav-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
}

.master-set-fav-btn:hover,
.binder-favorite-btn:hover {
  color: var(--gold);
  transform: scale(1.08);
}

.master-set-fav-btn.is-on,
.binder-favorite-btn.is-on {
  color: var(--gold);
}

.master-set-fav-btn:disabled,
.binder-favorite-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.binder-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.binder-favorite-btn {
  flex: 0 0 auto;
  background: rgba(232, 238, 233, 0.1);
}

.master-set-logo-complete {
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #2a7a64;
  line-height: 1.2;
}

.master-set-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
  gap: 0.85rem 0.75rem;
}

.master-set-logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.4rem 0.55rem;
  text-decoration: none;
  color: inherit;
  border-radius: 0.3rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.master-set-logo-link:hover {
  background: rgba(243, 246, 244, 0.72);
  transform: translateY(-2px);
}

.master-set-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3.25rem;
}

.master-set-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.master-set-logo-frame img.is-symbol {
  max-height: 2.4rem;
}

.master-set-logo-fallback {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.15;
  color: var(--ink-soft);
}

.master-set-logo-name {
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.binder-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.binder-set-logo {
  width: min(9rem, 28vw);
  height: auto;
  max-height: 3.5rem;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.35rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.binder-empty {
  margin: 2rem auto;
  text-align: center;
  color: rgba(232, 238, 233, 0.75);
}

/* —— Binder view —— */
.binder-body {
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(127, 209, 185, 0.12), transparent 55%),
    linear-gradient(165deg, #1a2a1f 0%, #121a16 45%, #0c1210 100%);
  color: #e8eee9;
  color-scheme: dark;
  min-height: 100vh;
}

.binder-header .logo,
.binder-header nav a,
.binder-header .auth-nav-btn {
  color: #e8eee9;
}

.binder-header nav a:hover,
.binder-header nav a.active {
  color: var(--mint);
}

.binder-header .auth-nav-sep {
  background: rgba(232, 238, 233, 0.35);
}

.binder-header .auth-nav-btn {
  border-color: rgba(232, 238, 233, 0.45);
}

.binder-page {
  padding: 0 clamp(1rem, 3vw, 2rem) clamp(8rem, 36vh, 18rem);
  max-width: 1280px;
  margin: 0 auto;
}

.binder-top {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.binder-heading {
  display: grid;
  gap: 0.35rem;
}

.binder-back {
  color: rgba(232, 238, 233, 0.7);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  width: fit-content;
}

.binder-back:hover {
  color: var(--mint);
}

.binder-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin: 0;
}

.binder-progress {
  display: grid;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
  max-width: 22rem;
}

.binder-progress[hidden] {
  display: none;
}

.binder-progress-label {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--mint);
}

.binder-progress-track {
  display: block;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(232, 238, 233, 0.14);
  overflow: hidden;
}

.binder-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.binder-blurb {
  margin: 0.35rem 0 0;
  max-width: 52rem;
  color: rgba(232, 238, 233, 0.78);
  font-size: 0.95rem;
  line-height: 1.5;
}

.binder-blurb a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.binder-blurb a:hover,
.binder-blurb a:focus-visible {
  color: var(--gold);
  text-decoration-color: var(--gold);
  outline: none;
}

.binder-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.binder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.binder-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.5rem;
  margin-left: auto;
  min-width: 0;
}

.binder-filter-search {
  flex: 0 1 13.5rem;
  min-width: 10rem;
  width: 13.5rem;
}

.binder-filter-search input,
.binder-filter-field select,
.selection-binder-label select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  height: 2.15rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 238, 233, 0.14);
  background: rgba(8, 14, 12, 0.55);
  color: #e8eee9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.binder-filter-search input {
  padding-left: 2.15rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='6.5' cy='6.5' r='4.2' fill='none' stroke='%2399a89e' stroke-width='1.5'/><path fill='none' stroke='%2399a89e' stroke-width='1.5' stroke-linecap='round' d='m9.6 9.6 3.6 3.6'/></svg>");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 0.9rem;
}

.binder-filter-field select,
.selection-binder-label select {
  width: auto;
  max-width: 14rem;
  padding-right: 2rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23c8d4cc' d='M4.2 6.2 8 10l3.8-3.8L13 7.4 8 12.4 3 7.4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.8rem;
}

.binder-filter-search input::-webkit-search-decoration,
.binder-filter-search input::-webkit-search-cancel-button,
.binder-filter-search input::-webkit-search-results-button,
.binder-filter-search input::-webkit-search-results-decoration {
  appearance: none;
}

.binder-filter-search input::placeholder {
  color: rgba(232, 238, 233, 0.42);
  font-weight: 500;
}

.binder-filter-search input:hover,
.binder-filter-field select:hover,
.selection-binder-label select:hover {
  border-color: rgba(127, 209, 185, 0.38);
  background-color: rgba(8, 14, 12, 0.72);
}

.binder-filter-search input:focus,
.binder-filter-field select:focus,
.selection-binder-label select:focus {
  outline: none;
  border-color: rgba(127, 209, 185, 0.7);
  box-shadow: 0 0 0 3px rgba(127, 209, 185, 0.18);
}

.binder-filter-field {
  flex: 0 0 auto;
}

.binder-filters .pager-btn {
  height: 2.15rem;
  border-radius: 999px;
  padding: 0 0.85rem;
}

.binder-filter-field[hidden] {
  display: none;
}

.binder-filter-count {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 238, 233, 0.72);
}

.binder-filter-count[hidden],
#binder-filter-clear[hidden] {
  display: none;
}

.binder-filter-empty {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 700;
  color: rgba(232, 238, 233, 0.78);
  pointer-events: none;
}

.binder-filter-empty[hidden] {
  display: none;
}

.binder-stage.is-filter-empty .binder-spread,
.binder-stage.is-filter-empty .binder-edge-btn {
  visibility: hidden;
}

.binder-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .binder-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .binder-filters {
    margin-left: 0;
    justify-content: flex-start;
  }

  .binder-filter-search {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
}

.binder-toggle {
  color: rgba(232, 238, 233, 0.88);
  max-width: none;
}

.binder-toggle .toggle-ui {
  background: rgba(232, 238, 233, 0.18);
  border-color: rgba(232, 238, 233, 0.28);
}

.binder-toggle input:checked + .toggle-ui {
  background: var(--mint);
  border-color: var(--mint);
}

.selection-bar,
.print-placeholders-bar {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  font-weight: 600;
  color: rgba(232, 238, 233, 0.88);
}

.selection-bar[hidden],
.print-placeholders-bar[hidden] {
  display: none;
}

.selection-action-btn,
.print-selected-btn {
  border-radius: 0.4rem;
  padding: 0.45rem 0.9rem;
}

.selection-action-btn:disabled,
.print-selected-btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.selection-bar-binders {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.selection-bar-binders[hidden] {
  display: none !important;
}

.selection-binder-label select {
  max-width: 12rem;
}

.selection-bar-msg {
  width: 100%;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #9fd6b8;
}

.selection-bar-msg.is-error {
  color: #ffb4a8;
}

.selection-bar-msg[hidden] {
  display: none;
}

.layout-switch {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.layout-btn,
.pager-btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0.4rem;
  border: 1px solid rgba(232, 238, 233, 0.22);
  background: rgba(8, 14, 12, 0.45);
  color: rgba(232, 238, 233, 0.88);
  padding: 0.45rem 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.layout-btn span {
  opacity: 0.65;
  font-weight: 500;
}

.layout-btn:hover,
.pager-btn:hover:not(:disabled) {
  border-color: rgba(127, 209, 185, 0.55);
  color: #fff;
}

.layout-btn.is-active {
  border-color: var(--mint);
  background: rgba(127, 209, 185, 0.14);
  color: #fff;
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.binder-pager {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;
}

.page-status {
  margin: 0;
  min-width: 7.5rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.binder-stage {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
  align-items: stretch;
}

.binder-edge-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(232, 238, 233, 0.35);
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
  align-self: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.binder-edge-btn:hover:not(:disabled) {
  color: rgba(232, 238, 233, 0.85);
  transform: scale(1.08);
}

.binder-edge-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.binder-spread {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  background:
    linear-gradient(180deg, rgba(36, 52, 42, 0.95), rgba(22, 32, 27, 0.98));
  border: 1px solid rgba(232, 238, 233, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: min(72vh, 820px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 50px rgba(0, 0, 0, 0.35);
}

.binder-spread.is-flipping .binder-leaf {
  animation: binder-flip 0.28s ease;
}

.binder-spine {
  width: 1.1rem;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.45),
      rgba(255, 255, 255, 0.06) 45%,
      rgba(0, 0, 0, 0.45)
    );
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.45);
}

.binder-leaf {
  padding: clamp(0.65rem, 1.6vw, 1.1rem);
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03), transparent 70%);
}

.binder-leaf.is-cover {
  background:
    linear-gradient(145deg, rgba(18, 28, 22, 0.95), rgba(12, 18, 15, 0.98));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.25);
}

.binder-grid {
  --binder-cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--binder-cols), minmax(0, 1fr));
  gap: clamp(0.35rem, 1vw, 0.65rem);
  height: 100%;
  align-content: start;
}

.binder-slot {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 0.2rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.binder-slot:hover,
button.binder-slot:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  z-index: 1;
}

.binder-slot-check {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.25rem;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(8, 14, 12, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.binder-slot-gloss {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
}

.binder-slot.is-holo .binder-slot-gloss {
  background: linear-gradient(
    110deg,
    transparent 32%,
    rgba(255, 90, 200, 0.38) 42%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(80, 210, 255, 0.38) 58%,
    transparent 68%
  );
}

.binder-slot.is-reverse-holo .binder-slot-gloss {
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(232, 197, 71, 0.32) 44%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(232, 197, 71, 0.28) 56%,
    transparent 66%
  );
}

.binder-slot-check::after {
  content: "";
  position: absolute;
  left: 0.22rem;
  top: 0.05rem;
  width: 0.35rem;
  height: 0.65rem;
  border: solid #0b1f2a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

body.select-mode .binder-slot-check,
body.print-select-mode .binder-slot-check {
  opacity: 1;
}

.binder-slot.is-selected {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.binder-slot.is-selected .binder-slot-check {
  opacity: 1;
  background: var(--mint);
  border-color: var(--mint);
}

.binder-slot.is-selected .binder-slot-check::after {
  transform: rotate(45deg) scale(1);
}

.binder-slot-tags {
  position: absolute;
  left: 0.28rem;
  bottom: 0.28rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  pointer-events: none;
}

.binder-slot-tag {
  padding: 0.18rem 0.42rem;
  border-radius: 0.28rem;
  border: 1px solid rgba(8, 14, 12, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #08140f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.55);
}

.binder-slot-owned {
  background: #9ae8d0;
}

.binder-slot-need {
  background: #f3d45a;
}

.binder-slot.is-empty {
  cursor: default;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.2));
  box-shadow: inset 0 0 0 1px rgba(232, 238, 233, 0.08);
}

.binder-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

body.card-modal-open {
  overflow: hidden;
}

.card-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: max(0.75rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.card-modal[hidden] {
  display: none;
}

.card-modal-backdrop {
  appearance: none;
  border: none;
  padding: 0;
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 8, 0.82);
  cursor: pointer;
}

.card-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(calc(100vw - 7.5rem), 32rem);
  min-width: 0;
  max-width: min(calc(100vw - 7.5rem), 34rem);
  max-height: min(92dvh, 56rem);
  min-height: 0;
  padding: 1rem 1rem 1.15rem;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(14, 22, 18, 0.96);
  border: 1px solid rgba(232, 238, 233, 0.12);
  border-radius: 0.55rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: binder-flip 0.22s ease;
}

.card-modal-panel > img {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  max-height: min(calc(92dvh - 14rem), 38rem);
  object-fit: contain;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
}

.card-modal-copy {
  flex: 0 0 auto;
  margin-top: 0.85rem;
  text-align: center;
  min-width: 0;
}

.card-modal-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin: 0 0 0.25rem;
  line-height: 1.1;
}

.card-modal-copy > p#card-modal-meta {
  margin: 0;
  white-space: pre-line;
  color: rgba(232, 238, 233, 0.78);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
}

.card-modal-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  min-height: 1.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #9fd6b8;
}

.card-modal-price.is-unavailable {
  color: rgba(232, 238, 233, 0.55);
}

.card-modal-price.is-loading {
  color: rgba(232, 238, 233, 0.7);
}

.card-modal-tcg-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.card-modal-tcg-link:hover,
.card-modal-tcg-link:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  outline: none;
}

.card-modal-tcg-link-icon {
  width: 1rem;
  height: 1rem;
  display: block;
}

.card-modal-price-dots {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
}

.card-modal-price-dots span {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: currentColor;
  animation: card-modal-dot 1s ease-in-out infinite;
}

.card-modal-price-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.card-modal-price-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes card-modal-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-0.15rem);
  }
}

.card-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.9rem;
}

.card-modal-binder-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.card-modal-binder-picker[hidden] {
  display: none !important;
}

.card-modal-binder-label {
  flex: 1 1 9rem;
  min-width: 0;
  max-width: 14rem;
}

.card-modal-binder-label select {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(232, 238, 233, 0.28);
  background: rgba(18, 26, 22, 0.9);
  color: #e8eee9;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card-modal-actions .btn {
  padding: 0.65rem 1.15rem;
}

.card-modal-action-msg {
  width: 100%;
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #9fd6b8;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-modal-action-msg.is-error {
  color: #ffb4a8;
}

@media (max-width: 860px) {
  .card-modal {
    align-items: stretch;
    gap: 0;
  }

  .card-modal-nav {
    position: absolute;
    top: max(5.25rem, 22%);
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1.6rem;
  }

  .card-modal-prev {
    left: max(0.2rem, env(safe-area-inset-left));
  }

  .card-modal-next {
    right: max(0.2rem, env(safe-area-inset-right));
  }

  .card-modal-panel {
    width: min(100%, 26rem);
    max-width: min(100%, 26rem);
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    padding: 0.7rem 0.75rem 0.85rem;
  }

  .card-modal-panel > img {
    flex: 1 1 0;
    min-height: 6.5rem;
    max-height: none;
    width: 100%;
    height: 0;
    object-fit: contain;
  }

  .card-modal-copy {
    flex: 0 0 auto;
    margin-top: 0.55rem;
  }

  .card-modal-copy h2 {
    font-size: 1.25rem;
  }

  .card-modal-copy > p#card-modal-meta {
    font-size: 0.85rem;
  }

  .card-modal-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }

  .card-modal-binder-picker {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .card-modal-binder-label {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }

  .card-modal-actions .btn {
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 860px) and (max-height: 560px) {
  .card-modal-panel {
    padding: 0.5rem 0.65rem 0.65rem;
  }

  .card-modal-panel > img {
    min-height: 4.5rem;
  }

  .card-modal-copy {
    margin-top: 0.4rem;
  }

  .card-modal-copy h2 {
    font-size: 1.1rem;
  }

  .card-modal-actions,
  .card-modal-price {
    margin-top: 0.4rem;
  }
}

.auth-nav-sep {
  width: 1px;
  height: 1rem;
  background: currentColor;
  opacity: 0.25;
  margin: 0 0.15rem;
}

.auth-nav-btn {
  appearance: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  opacity: 0.9;
}

.auth-nav-btn:hover {
  opacity: 1;
}

.auth-page .auth-form {
  max-width: 24rem;
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(11, 31, 42, 0.06);
}

.auth-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  color: var(--ink-soft);
}

.auth-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(11, 31, 42, 0.08);
}

.auth-field {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.auth-field input {
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(11, 31, 42, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

.auth-error {
  margin: 0;
  color: #c93220;
  font-weight: 700;
}

.auth-submit {
  width: 100%;
}

.card-modal-nav {
  appearance: none;
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(232, 238, 233, 0.25);
  border-radius: 999px;
  background: rgba(18, 26, 22, 0.92);
  color: #e8eee9;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 0.15rem;
}

.card-modal-nav:hover:not(:disabled),
.card-modal-nav:focus-visible {
  border-color: var(--mint);
  color: #fff;
  outline: none;
}

.card-modal-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(0.75rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal-backdrop {
  appearance: none;
  border: none;
  padding: 0;
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 8, 0.55);
  cursor: pointer;
}

.confirm-modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 24rem);
  padding: 1.2rem 1.15rem 1.15rem;
  background: rgba(14, 22, 18, 0.98);
  border: 1px solid rgba(232, 238, 233, 0.14);
  border-radius: 0.55rem;
}

.confirm-modal-panel p {
  margin: 0;
  text-align: center;
  font-weight: 600;
  line-height: 1.45;
  color: #e8eee9;
}

.confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.confirm-modal-actions .btn {
  min-width: 5.5rem;
  padding: 0.55rem 1.1rem;
}

.card-modal-close {
  appearance: none;
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(232, 238, 233, 0.25);
  border-radius: 999px;
  background: rgba(18, 26, 22, 0.95);
  color: #e8eee9;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.card-modal-close:hover,
.card-modal-close:focus-visible {
  border-color: var(--mint);
  color: #fff;
  outline: none;
}

.placeholder-print-root {
  display: none;
}

@media print {
  @page {
    margin: 0.35in;
    size: letter;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.is-printing-placeholders > *:not(.placeholder-print-root) {
    display: none !important;
  }

  body.is-printing-placeholders .placeholder-print-root {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.12in;
    align-content: flex-start;
    position: static;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #111;
  }

  .placeholder-print-card {
    width: 2.5in;
    height: 3.5in;
    margin: 0;
    padding: 0;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
    position: relative;
    background: #fff;
  }

  .placeholder-print-card img {
    display: block;
    width: 2.5in;
    height: 3.5in;
    object-fit: cover;
  }

  .placeholder-print-card figcaption {
    display: none;
  }
}

@keyframes binder-flip {
  from {
    opacity: 0.55;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .brand-mark {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .hero-landing {
    align-items: center;
    min-height: 100svh;
  }

  .master-set-portrait-grid {
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: 0.75rem;
  }

  .master-set-portrait-name {
    font-size: 1.15rem;
  }

  .binder-spread {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .binder-spread.is-single-page .binder-leaf.is-cover,
  .binder-spread.is-single-page .binder-leaf[hidden] {
    display: none;
  }

  .binder-spine {
    display: none;
  }

  .binder-leaf + .binder-leaf {
    border-top: none;
  }

  .binder-edge-btn {
    display: none;
  }

  .binder-stage {
    grid-template-columns: 1fr;
  }
}

.binders-page .binders-create,
.binders-page .binders-list-section {
  margin-top: 1.75rem;
  max-width: 48rem;
}

.binders-page .binders-create h2,
.binders-page .binders-list-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin: 0 0 0.85rem;
}

.binders-create-form {
  display: grid;
  gap: 0.85rem;
  align-items: end;
}

@media (min-width: 560px) {
  .binders-create-form {
    grid-template-columns: 1fr auto;
  }

  .binders-create-form .auth-error {
    grid-column: 1 / -1;
  }
}

.binders-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.binders-list-item {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 31, 42, 0.1);
}

.binders-list-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}

.binders-list-name {
  font-weight: 700;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.binders-list-meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.binder-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(11, 31, 42, 0.08);
  color: var(--ink-soft);
}

.binder-badge-shared {
  background: rgba(42, 122, 100, 0.16);
  color: #1f6b58;
}

.binders-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

.binders-list-actions .btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.binders-delete {
  flex-shrink: 0;
}

.binder-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.binder-share .btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}

.binder-share-msg {
  margin: 0;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mint);
}

.binder-share-msg.is-error {
  color: #ffb4a8;
}

.binders-page .binder-share-msg {
  color: #2a7a64;
}

.binder-slot-theirs {
  background: #d7c4f5;
}

.binder-slot.is-theirs {
  box-shadow: inset 0 0 0 2px rgba(140, 92, 214, 0.55);
}
