@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: dark;
  --surface-strong: #0f172a;
  --surface: #161f33;
  --surface-soft: #111827;
  --surface-lighter: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --text-soft: #94a3b8;
  --accent: #6366f1;
  --border: rgba(148, 163, 184, 0.25);
}

:root[data-theme='light'] {
  color-scheme: light;
  --surface-strong: #ffffff;
  --surface: #f1f5f9;
  --surface-soft: #e2e8f0;
  --surface-lighter: rgba(15, 23, 42, 0.06);
  --text: #0f172a;
  --text-soft: #475569;
  --accent: #4f46e5;
  --border: rgba(148, 163, 184, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface-strong);
  color: var(--text);
  min-height: 100vh;
}

/* Visually hidden but accessible */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 32px);
  display: grid;
  gap: 24px;
}

.tt-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 32px);
  background: var(--surface-strong);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

:root[data-theme='light'] .tt-header {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.tt-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: -2px;
  text-decoration: none;
  color: inherit;
  transition: opacity 140ms ease, transform 140ms ease;
}
.tt-header__brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.tt-header__brand:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 4px;
  transform: translateY(-1px);
}
.tt-header__logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.tt-header__wordmark {
  display: grid;
  gap: 2px;
}

.tt-header__wordmark-text {
  font-size: clamp(0.85rem, 3vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.05;
  color: var(--text);
  display: block;
}

.tt-header__wordmark-sub {
  font-size: clamp(0.78rem, 2.6vw, 0.9rem);
  opacity: 0.95;
  letter-spacing: 0.08em; /* match main word spacing */
  text-transform: uppercase; /* ensure consistent casing */
  font-weight: 600; /* match weight */
  margin-top: -2px;
}

.tt-header__title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
}

.tt-header__subtitle {
  display: inline-block;
}
.tt-header__subtitle > span {
  display: inline-block;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.tt-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-left: auto;
}

.tt-header__progress {
  flex: 1 1 260px;
  max-width: 360px;
  display: none;
}

.tt-header--hasProgress .tt-header__progress {
  display: flex;
}

.tt-header--landing .tt-header__progress {
  display: none !important;
}

.tt-landing {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.tt-landing__title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.tt-landing__description {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* (previous landing sort UI removed) */

.tt-landing__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tt-brand-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 200px;
  transition: transform 150ms ease, border 150ms ease;
}

:root[data-theme='light'] .tt-brand-card {
  background: rgba(255, 255, 255, 0.95);
}

.tt-brand-card::before {
  content: none;
}

.tt-brand-card:hover,
.tt-brand-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
}

.tt-brand-card__preview {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-position: right center;
  background-repeat: no-repeat;
  background-size: 48% auto;
  pointer-events: none;
  z-index: 0;
}

/* badge UI removed */

.tt-brand-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  max-width: 58%;
  padding-inline: 4px;
}

.tt-brand-card__text {
  display: grid;
  gap: 6px;
  text-align: left;
}

.tt-brand-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.tt-brand-card__tagline {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.tt-brand-card__progress {
  display: flex;
  align-items: center;
  gap: 0px;
  margin-top: auto;
  width: 100%;
}

.tt-brand-card__progressBar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.tt-brand-card__progressFill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: width 200ms ease;
}

.tt-brand-card__progressLabel {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  min-width: 64px;
  text-align: right;
}

:root[data-theme='light'] .tt-brand-card__progressBar {
  background: rgba(15, 23, 42, 0.25);
}

:root[data-theme='light'] .tt-brand-card__progressFill {
  background: rgba(15, 23, 42, 0.85);
}

:root[data-theme='light'] .tt-brand-card__progressLabel {
  color: rgba(15, 23, 42, 0.72);
}

.tt-brand-summary {
  display: grid;
  gap: 8px;
}

.tt-brand-summary h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
}

.tt-brand-summary p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.tt-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.tt-controls__series {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tt-controls__series-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
}

.tt-controls__series-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Series Filter Buttons */
.tt-series-filter__button {
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--series-accent, var(--brand-accent, var(--border)));
  color: var(--series-accent, var(--brand-accent, var(--accent)));
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.tt-series-filter__button:hover {
  background: transparent;
  border-color: var(--series-accent, var(--brand-accent, var(--accent)));
  transform: none;
  box-shadow: none;
}

.tt-series-filter__button.tt-series-filter__button--active {
  background: transparent;
  border-width: 2px;
  border-color: var(--series-accent, var(--brand-accent, var(--accent)));
  color: var(--series-accent, var(--brand-accent, var(--accent)));
  font-weight: 700;
  padding: 7px 15px; /* compensate for thicker border to avoid layout shift */
  box-shadow: none;
  transform: none;
}

.tt-series-filter__button.tt-series-filter__button--active:hover {
  background: transparent;
  border-color: var(--series-accent, var(--brand-accent, var(--accent)));
  box-shadow: none;
  transform: none;
}

/* Clear active indicator without fills or gradients */
.tt-series-filter__button.tt-series-filter__button--active::before {
  content: "\2713"; /* checkmark */
  font-weight: 900;
  display: inline-block;
  margin-right: 6px;
  line-height: 1;
}

.tt-series-filter__button:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.tt-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.tt-search,
.tt-select {
  display: grid;
  gap: 6px;
  width: 100%;
}
.tt-search__label,
.tt-select__label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.tt-search input,
.tt-select select {
  font: inherit;
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
  width: 100%;
}
.tt-search input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}
.tt-search input:focus-visible,
.tt-select select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
}
.tt-select select {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%),
    linear-gradient(var(--border), var(--border));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 34px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 58%;
  background-repeat: no-repeat;
  background-color: var(--surface-soft);
  color: var(--text);
}
:root[data-theme='light'] .tt-select select {
  background-color: rgba(255, 255, 255, 0.85);
}
.tt-select select option,
.tt-select select optgroup {
  background: var(--surface);
  color: var(--text);
}
:root[data-theme='light'] .tt-select select option,
:root[data-theme='light'] .tt-select select optgroup {
  background: rgba(241, 245, 249, 0.95);
  color: var(--text);
}
:root[data-theme='light'] .tt-search input::placeholder {
  color: rgba(71, 85, 105, 0.6);
}
.tt-filterToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border 160ms ease, box-shadow 160ms ease, color 160ms ease, background 160ms ease;
  width: 100%;
  align-self: end;
}
.tt-filterToggle:hover,
.tt-filterToggle:focus-within {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.tt-filterToggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.tt-filterToggle__text {
  letter-spacing: inherit;
}

.tt-progress {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  gap: 8px;
  width: 100%;
}
.tt-progress--header {
  background: var(--surface-soft);
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}
.tt-progress__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}
.tt-progress__ratio {
  font-weight: 500;
  font-size: 0.95rem;
}
.tt-progress__percent {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.tt-progress__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: visible;
}
.tt-progress__fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(129, 140, 248, 0.9));
  transition: width 220ms ease;
}
:root[data-theme='light'] .tt-progress__track {
  background: rgba(15, 23, 42, 0.12);
}
:root[data-theme='light'] .tt-progress__fill {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(99, 102, 241, 0.75));
}

.tt-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 640px) {
  .tt-grid {
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
  }
}

.tt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: clamp(10px, 2vw, 12px);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 140ms ease, border 140ms ease;
  min-width: 0;
  cursor: pointer;
}

:root[data-theme='light'] .tt-card {
  background: rgba(255, 255, 255, 0.95);
}

.tt-card.is-owned {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: 0 16px 30px rgba(34, 197, 94, 0.1);
}

.tt-card__mediaStack {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 5 / 4;
  max-height: 180px;
}
.tt-card__mediaStack::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  /* Prefer explicit series gradient variables if provided, otherwise use accents */
  background: linear-gradient(135deg, var(--series-gradient-start, var(--accent-primary, var(--accent))), var(--series-gradient-end, var(--accent-secondary, rgba(99, 102, 241, 0.6))));
  z-index: 0;
}
/* Hide gradient background in figure area when viewing Smiski */
#app[data-brand="smiski"] .tt-card__mediaStack::before {
  background: none;
}
.tt-card__mediaStack figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100%);
  height: calc(100%);
  padding: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.tt-card__fallback {
  position: relative;
  z-index: 1;
  font-size: 2.4rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.tt-card__mediaStack img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.tt-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
  padding-inline: 12px;
}

.tt-card__title {
  margin: 0;
  font-size: 1rem;
}

.tt-card__badge {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.tt-card__meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 2px;
  padding-inline: 12px;
}
.tt-card__communityPrice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding-inline: 12px;
  padding-block: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--text-soft);
  text-decoration: none;
  text-align: left;
  transition: transform 140ms ease, background 140ms ease, border 140ms ease;
  margin-top: 4px;
  min-height: 46px;
}
:root[data-theme='light'] .tt-card__communityPrice {
  background: rgba(148, 163, 184, 0.15);
}
.tt-card__communityPrice:hover,
.tt-card__communityPrice:focus-visible {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}
.tt-card__communityPrice:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.4);
  outline-offset: 3px;
}
.tt-card__communityPriceLabel {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tt-card__communityPriceValue,
.tt-card__communityPriceAmount {
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-soft);
  text-align: right;
  align-self: center;
  padding-left: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.15);
}

.tt-card__communityPriceLabel small {
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.7;
  text-transform: none;
  letter-spacing: 0.03em;
  display: block;
  color: var(--text-soft);
}
.tt-card__communityPriceMeta {
  font-size: 0.72rem;
  color: var(--text-soft);
}
.tt-card__communityPrice--pending {
  border-style: dashed;
  border-color: rgba(99, 102, 241, 0.25);
}
.tt-card__communityPrice--pending .tt-card__communityPriceAmount {
  font-weight: 500;
  color: var(--text-soft);
}

.tt-popper {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: visible;
}
.tt-popper__piece {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translate(0, 0) scale(0.8);
  animation: tt-pop 600ms ease-out forwards;
  will-change: transform, opacity;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.25));
  font-size: 16px;
}

@keyframes tt-pop {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.8) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0px), var(--dy, -40px)) scale(1.15) rotate(var(--rot, 0deg));
  }
}

.tt-foot {
  padding: 12px clamp(16px, 4vw, 32px) 32px;
  font-size: 0.75rem;
  color: var(--text-soft);
  text-align: center;
}

.tt-foot__inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  /* match the horizontal padding used by `main` for perfect alignment */
  padding: 0 clamp(16px, 4vw, 32px);
  box-sizing: border-box;
  text-align: left;
  line-height: 1.6;
}

.tt-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding: 0 0 6px;
  justify-content: space-between;
}

.tt-card__actions > * {
  flex: 1 1 0;
}

.tt-card__actions > .tt-card__affiliateButton {
  /* don't grow — size to content so it's narrower and less likely to be hit accidentally */
  flex: 0 0 auto;
}

.tt-card__actions > .tt-toggle {
  flex: 1 1 auto;
}

.tt-card__affiliateButton {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.16);
  color: var(--text-soft);
  transition: transform 140ms ease, background 140ms ease, border 140ms ease, color 140ms ease, box-shadow 140ms ease;
  min-height: 32px;
  white-space: nowrap;
}
.tt-card__affiliateIcon svg {
  width: 16px;
  height: 16px;
}
.tt-card__affiliateIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tt-card__affiliateLabel {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  line-height: 1;
}

/* Show icon-only for affiliate (keeps label available to screen readers) */
.tt-card__affiliateLabel {
  /* visually hide but remain in the DOM for accessibility */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tt-card__affiliateButton:hover,
.tt-card__affiliateButton:focus-visible {
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--text-soft);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.08);
}
.tt-card__affiliateButton:hover .tt-card__affiliateLabel,
.tt-card__affiliateButton:focus-visible .tt-card__affiliateLabel {
  color: var(--text-soft);
}

.tt-card__affiliateButton:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.4);
  outline-offset: 3px;
}
.tt-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  /* match affiliate button base prominence */
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.16);
  font-size: 0.66rem;
  min-height: 32px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border 140ms ease, box-shadow 140ms ease;
}
.tt-toggle:hover,
.tt-toggle:focus-visible {
  transform: translateY(-1px);
  /* use same subtle hover as affiliate button */
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.08);
}
.tt-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.tt-check {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tt-check__box {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.4);
  transition: background 140ms ease, border 140ms ease;
  position: relative;
}
.tt-check__box::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 6px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 1px;
  transform: rotate(-45deg) scale(0.85);
  top: 3px;
  left: 2px;
  transition: border 140ms ease;
}
.tt-toggle input:checked + .tt-check__box {
  /* keep the check visible but less overpowering so prominence matches affiliate */
  background: rgba(99, 102, 241, 0.45);
  border-color: rgba(99, 102, 241, 0.45);
}
.tt-toggle input:checked + .tt-check__box::after {
  border-left-color: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.92);
}
.tt-toggle input:focus-visible + .tt-check__box {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}
.tt-toggle__text {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* match affiliate label sizing/vertical alignment */
  font-size: 0.62rem;
  color: var(--text-soft);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  margin-top: 0;
}
.tt-toggle--checked {
  /* make checked state subtle and match affiliate prominence */
  background: rgba(15, 23, 42, 0.16);
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: none;
}
.tt-toggle--checked .tt-toggle__text {
  color: var(--text-soft);
}
.tt-card.is-owned .tt-toggle--checked .tt-toggle__text,
.tt-card.is-owned .tt-toggle__text {
  color: #4ade80;
}

@media (max-width: 640px) {
  /* Keep affiliate (cart) and I HAVE IT side-by-side on mobile */
  .tt-card__actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 clamp(10px, 2vw, 12px) 6px;
  }
  .tt-card__actions > * {
    width: auto;
  }
  .tt-card__affiliateButton,
  .tt-toggle {
    padding: 6px 8px;
    justify-content: flex-start;
  }

  /* Ensure affiliate stays compact and toggle expands to fill remaining space */
  .tt-card__actions > .tt-card__affiliateButton {
    flex: 0 0 auto;
  }
  .tt-card__actions > .tt-toggle {
    flex: 1 1 auto;
  }
  .tt-card__communityPrice {
    padding: 6px 10px;
    min-height: 46px;
  }
  .tt-card__communityPriceLabel {
    font-size: 0.65rem;
  }
  .tt-card__communityPriceLabel small {
    font-size: 0.58rem;
  }
  .tt-card__communityPriceValue,
  .tt-card__communityPriceAmount {
    font-size: 1.05rem;
  }
  .tt-card {
    padding: 8px;
  }
  .tt-card__header {
    font-size: 0.9rem;
  }
  .tt-card__seriesName {
    font-size: 0.7rem;
  }

  /* Reorder controls on mobile: place series filter above other toggles */
  .tt-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .tt-controls .tt-select {
    order: -1;
    width: 100%;
  }
}

/* badge styles removed */
