:root {
  --web-bg: #07111f;
  --web-page-bg-image: url("assets/backgrounds/magic-theme-background.jpg"), url("assets/backgrounds/cardtrade-global-background.jpg");
  --web-page-bg-overlay: linear-gradient(90deg, rgba(3, 7, 14, 0.92) 0%, rgba(3, 7, 14, 0.48) 22%, rgba(3, 7, 14, 0.36) 50%, rgba(3, 7, 14, 0.58) 78%, rgba(3, 7, 14, 0.92) 100%), linear-gradient(180deg, rgba(3, 7, 14, 0.62) 0%, rgba(3, 7, 14, 0.72) 100%);
  --web-panel: rgba(255, 255, 255, 0.84);
  --web-panel-strong: rgba(255, 255, 255, 0.9);
  --web-ink: #101a2c;
  --web-muted: #5f6f86;
  --web-line: #d3deef;
  --web-green: #1f8fff;
  --web-green-dark: #166ac4;
  --web-gold: #2e8de0;
  --web-blue: #1f73cc;
  --web-coral: #d05a46;
  --web-ok: #2b8f6a;
  --web-lilac: #5d6fd8;
  --web-rose: #c85f8a;
  --web-teal-soft: #edf4ff;
  --web-sky-soft: #eaf2ff;
  --web-sun-soft: #e8f3ff;
  --web-rose-soft: #f8edf3;
  --web-lilac-soft: #edf0ff;
  --web-surface: rgba(255, 255, 255, 0.8);
  --web-surface-strong: rgba(255, 255, 255, 0.88);
  --web-shadow: 0 18px 42px rgba(2, 8, 20, 0.24);
  --web-shadow-soft: 0 10px 28px rgba(2, 8, 20, 0.16);
  --web-logo-filter: none;
  --web-logo-border: rgba(31, 115, 204, 0.28);
  --web-logo-shadow: 0 10px 24px rgba(15, 61, 124, 0.24);
  --web-radius: 8px;
  --web-content-max: 1800px;
  --web-page-pad: clamp(14px, 2.1vw, 32px);
  --web-section-gap: clamp(14px, 1.35vw, 22px);
  --web-card-min: 280px;
  --web-card-media-height: clamp(210px, 14vw, 238px);
  --web-body-font: "Inter", Aptos, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --web-heading-font: "Inter", "Aptos Display", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
}

:root[data-theme-schema="pokemon"] {
  --web-page-bg-image: url("assets/backgrounds/pokemon-theme-background.jpg"), url("assets/backgrounds/cardtrade-global-background.jpg");
  --web-page-bg-overlay: linear-gradient(90deg, rgba(4, 12, 32, 0.9) 0%, rgba(6, 14, 40, 0.58) 22%, rgba(8, 16, 44, 0.46) 50%, rgba(8, 16, 44, 0.62) 78%, rgba(4, 12, 32, 0.9) 100%), linear-gradient(180deg, rgba(4, 10, 30, 0.66) 0%, rgba(5, 14, 38, 0.76) 100%);
  --web-panel: rgba(255, 246, 187, 0.9);
  --web-panel-strong: rgba(255, 237, 148, 0.92);
  --web-line: #e0be50;
  --web-green: #244793;
  --web-green-dark: #1b356e;
  --web-gold: #f4c61b;
  --web-blue: #3058b0;
  --web-surface: rgba(255, 247, 196, 0.88);
  --web-surface-strong: rgba(255, 236, 145, 0.92);
  --web-logo-border: rgba(244, 198, 27, 0.68);
  --web-logo-shadow: 0 10px 24px rgba(244, 198, 27, 0.3);
}











* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--web-bg) var(--web-page-bg-image) center center / cover fixed no-repeat;
}


body.ct-web-app {
  margin: 0;
  min-height: 100vh;
  display: block;
  color: var(--web-ink);
  background-color: var(--web-bg);
  background-image: var(--web-page-bg-overlay), var(--web-page-bg-image);
  background-position: center center, center center, center center;
  background-size: cover, cover, cover;
  background-attachment: fixed, fixed, fixed;
  background-repeat: no-repeat;
  font-family: var(--web-body-font);
}


button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 64px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--web-page-pad);
  background: rgba(8, 20, 38, 0.93);
  color: #f7f5ef;
  border-bottom: 1px solid rgba(118, 176, 255, 0.22);
  box-shadow: 0 14px 32px rgba(4, 13, 31, 0.32);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.04rem;
}

.app-brand span {
  font-family: var(--web-heading-font);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
}

.app-brand img {
  width: 38px;
  height: 38px;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-logo-border);
  object-fit: cover;
  box-shadow: var(--web-logo-shadow);
  filter: var(--web-logo-filter);
  transition: filter 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.app-nav {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  -ms-overflow-style: none;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  flex: 0 0 auto;
}

.nav-item,
.mode-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: var(--web-radius);
  border: 1px solid transparent;
  padding: 8px 10px;
  color: #e9efe9;
  background: transparent;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover,
.mode-link:hover,
.nav-item.is-active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.is-active {
  color: #0b1c35;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.nav-item:hover,
.mode-link:hover {
  transform: translateY(-1px);
}

.sidebar-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mode-link {
  justify-content: center;
  background: #ffffff;
  color: #12325b;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.mode-link.is-subtle {
  background: rgba(255, 255, 255, 0.08);
  color: #e9efe9;
}

.app-frame {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-topbar {
  position: sticky;
  top: 64px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--web-page-pad);
  background: rgba(247, 250, 248, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 28px rgba(2, 8, 20, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.global-search {
  width: min(620px, 48vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.global-search input,
.filter-bar input,
.filter-bar select,
.detail-search-panel input,
.detail-search-panel select,
.tool-panel input,
.tool-panel select,
.tool-panel textarea,
.auth-form input,
.auth-form select,
.message-composer textarea,
.modal-panel textarea,
.modal-panel input,
.modal-panel select {
  width: 100%;
  min-height: 42px;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-line);
  background: #fbfdfc;
  color: var(--web-ink);
  padding: 10px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--web-green);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.13);
}

.topbar-cluster,
.button-row,
.panel-heading,
.modal-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-cluster {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.icon-button,
.icon-only,
.segment,
.danger-button {
  min-height: 42px;
  border-radius: var(--web-radius);
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
  line-height: 1.1;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-button {
  color: #ffffff;
  background: var(--web-green);
  box-shadow: 0 10px 22px rgba(15, 107, 92, 0.22);
}

.primary-button:hover {
  background: var(--web-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 107, 92, 0.26);
}

.secondary-button,
.icon-button,
.segment {
  color: var(--web-ink);
  background: #ffffff;
  border-color: var(--web-line);
  box-shadow: 0 6px 16px rgba(17, 25, 34, 0.035);
}

.secondary-button:hover,
.icon-button:hover,
.segment:hover {
  border-color: rgba(15, 107, 92, 0.32);
  background: #f6faf8;
  transform: translateY(-1px);
}

.danger-button {
  color: #ffffff;
  background: var(--web-coral);
}

.icon-only {
  min-width: 42px;
  padding: 8px;
  background: #ffffff;
  border-color: var(--web-line);
  font-size: 1.4rem;
}

.sync-state {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-line);
  color: var(--web-muted);
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(17, 25, 34, 0.035);
}

.sync-state.is-busy {
  color: var(--web-blue);
}

.sync-state.is-error {
  color: var(--web-coral);
}

.app-content {
  width: min(var(--web-content-max), 100%);
  margin: 0 auto;
  padding: clamp(16px, 1.6vw, 26px) var(--web-page-pad) clamp(28px, 3vw, 48px);
}

.workspace-panel {
  display: none;
}

.workspace-panel.is-active {
  display: block;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--web-green);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.compact-title,
.order-title,
.thread-title {
  font-family: var(--web-heading-font);
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 2.15vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.18rem, 1.35vw, 1.48rem);
  line-height: 1.12;
  margin-bottom: 0;
}

.metric-strip,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px;
}

.metric,
.stat-tile {
  min-height: 58px;
  width: 100%;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-line);
  background: var(--web-surface-strong);
  padding: 10px 12px;
  box-shadow: var(--web-shadow-soft);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

button.stat-tile {
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.stat-button {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stat-button:hover,
.stat-button:focus-visible {
  border-color: rgba(31, 74, 65, 0.32);
  box-shadow: 0 10px 22px rgba(24, 32, 43, 0.08);
  transform: translateY(-1px);
}

.metric:nth-child(1) {
  background: rgba(255, 255, 255, 0.86);
}

.metric:nth-child(2) {
  background: rgba(255, 255, 255, 0.84);
}

.metric:nth-child(3) {
  background: rgba(255, 255, 255, 0.82);
}

.metric strong,
.stat-tile strong {
  display: block;
  font-size: 1.18rem;
}

.metric span,
.stat-tile span {
  color: var(--web-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.marketplace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(min(100%, 250px), 0.65fr);
  gap: var(--web-section-gap);
  align-items: center;
  padding: clamp(18px, 1.65vw, 28px);
  margin-bottom: var(--web-section-gap);
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: var(--web-surface-strong);
  box-shadow: var(--web-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero-copy {
  max-width: 760px;
}

.hero-subline {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--web-muted);
  font-size: clamp(0.96rem, 0.85vw, 1.04rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(14px, 1.2vw, 20px);
}

.tcg-world-strip {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--web-radius);
  border: 1px solid rgba(17, 25, 34, 0.08);
  background: linear-gradient(180deg, rgba(248, 251, 249, 0.98), rgba(241, 246, 243, 0.96));
  box-shadow: var(--web-shadow-soft);
}

.tcg-world-label {
  display: grid;
  gap: 2px;
}

.tcg-world-label span {
  font-weight: 850;
  color: var(--web-ink);
}

.tcg-world-label small {
  color: var(--web-muted);
  font-size: 0.8rem;
}

.tcg-world-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tcg-world-chip {
  flex: 0 0 auto;
}

.hero-metrics {
  align-self: stretch;
  align-content: center;
}

.marketplace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--web-section-gap);
  margin-bottom: 12px;
}

.marketplace-toolbar > div:first-child {
  flex: 0 0 auto;
}

.category-slider {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.category-slide-button {
  width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-line);
  color: var(--web-ink);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(17, 25, 34, 0.035);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.category-slide-button:hover {
  border-color: rgba(15, 107, 92, 0.32);
  background: #f6faf8;
  transform: translateY(-1px);
}

.category-slide-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.category-slide-button:focus-visible {
  outline: 2px solid rgba(15, 107, 92, 0.28);
  outline-offset: 1px;
}

.category-slide-button:disabled:hover {
  background: #ffffff;
  border-color: var(--web-line);
  box-shadow: 0 6px 16px rgba(17, 25, 34, 0.035);
}

.category-rail {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  min-width: 118px;
  min-height: 48px;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 0;
  padding: 8px 10px;
  scroll-snap-align: start;
  border-radius: 12px;
  border: 1px solid var(--web-line);
  color: var(--web-ink);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  font-size: 0.84rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(17, 25, 34, 0.05);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-chip-logo {
  width: auto;
  display: flex;
  justify-content: center;
}

.tcg-logo {
  min-width: 104px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  gap: 1px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid #dce5e1;
  color: #243731;
  background: #f4f7f5;
  box-shadow: none;
  font-family: var(--web-body-font);
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
}

.tcg-logo.has-image {
  background: #ffffff;
  border-color: rgba(24, 32, 43, 0.1);
  color: var(--web-ink);
}

.tcg-logo-img {
  max-width: 100%;
  max-height: 28px;
  object-fit: contain;
}

.tcg-logo-text {
  display: grid;
  place-items: center;
  gap: 1px;
}

.category-chip .tcg-logo {
  width: 100%;
  min-width: 0;
}

.game-pill {
  padding: 0;
  border: 0;
  background: transparent;
}

.game-pill .tcg-logo {
  min-width: auto;
  min-height: 28px;
  padding: 5px 8px;
  box-shadow: none;
}

.game-pill .tcg-logo.has-image {
  min-width: 110px;
}

.game-pill .tcg-logo-img {
  max-height: 24px;
}

.tcg-logo-main,
.tcg-logo-sub {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcg-logo-main {
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.02;
}

.tcg-logo-sub {
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  opacity: 0.86;
  text-transform: uppercase;
}

.game-pill .tcg-logo-main {
  font-size: 0.74rem;
}

.game-pill .tcg-logo-sub {
  font-size: 0.5rem;
}

.tcg-logo-all,
.tcg-logo-other {
  color: #17332e;
  background: #f4f7f5;
  border-color: #d8e2dc;
}

.tcg-logo-pokemon,
.tcg-logo-one-piece,
.tcg-logo-dragonball {
  color: #3f3829;
  background: #f7f1df;
  border-color: #ded4b7;
}

.tcg-logo-yu-gi-oh,
.tcg-logo-magic-the-gathering,
.tcg-logo-gundam,
.tcg-logo-vanguard,
.tcg-logo-lorcana {
  color: #22333f;
  background: #eef5f8;
  border-color: #d7e3e9;
}

.tcg-logo-flesh-and-blood,
.tcg-logo-riftbound,
.tcg-logo-digimon,
.tcg-logo-topps,
.tcg-logo-sports {
  color: #1c3731;
  background: #eef6f3;
  border-color: #d4e5df;
}

.category-chip:hover,
.category-chip.is-active {
  color: var(--web-ink);
  border-color: rgba(14, 102, 85, 0.34);
  background: #eef6f3;
}

.category-chip[data-category] {
  background: #ffffff;
}

.category-chip[data-category]:hover,
.category-chip[data-category].is-active {
  color: var(--web-ink);
  border-color: rgba(14, 102, 85, 0.34);
  background: #eef6f2;
}

.category-chip[data-category].is-active {
  box-shadow: inset 0 -2px 0 var(--web-green), 0 8px 18px rgba(17, 25, 34, 0.08);
  transform: translateY(-1px);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
  align-items: end;
  padding: clamp(12px, 1vw, 16px);
  margin-bottom: var(--web-section-gap);
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: var(--web-surface-strong);
  box-shadow: var(--web-shadow-soft);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.detail-search-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
  align-items: end;
  padding: clamp(12px, 1vw, 16px);
  margin-bottom: var(--web-section-gap);
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: var(--web-surface-strong);
  box-shadow: var(--web-shadow-soft);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--web-ink);
  font-weight: 750;
}

label span {
  color: var(--web-muted);
  font-size: 0.84rem;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--web-card-min)), 1fr));
  grid-auto-rows: 1fr;
  gap: var(--web-section-gap);
  align-items: stretch;
}

.favorites-metrics {
  margin-bottom: 16px;
}

.favorites-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.38fr);
  gap: 16px;
  align-items: start;
}

.favorites-main,
.favorites-sidecar {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.search-result-layout {
  display: grid;
  gap: 18px;
}

.search-results-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(24, 32, 43, 0.08);
  border-radius: var(--web-radius);
  background: var(--web-surface);
  box-shadow: var(--web-shadow-soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.card-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--web-card-min)), 1fr));
  grid-auto-rows: 1fr;
  gap: var(--web-section-gap);
  align-items: stretch;
}

.listing-card,
.card-result,
.order-card,
.thread-item,
.compact-item,
.empty-state,
.message-bubble {
  border-radius: var(--web-radius);
  border: 1px solid rgba(17, 25, 34, 0.08);
  background: var(--web-panel-strong);
  box-shadow: var(--web-shadow-soft);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.listing-card,
.card-result,
.listing-view-card {
  --game-accent: var(--web-green);
  --game-accent-dark: var(--web-green-dark);
  --game-soft: #f4f6f5;
}

.listing-card[data-game="pokemon"],
.card-result[data-game="pokemon"],
.listing-view-card[data-game="pokemon"],
.listing-card[data-game="one-piece"],
.card-result[data-game="one-piece"],
.listing-view-card[data-game="one-piece"],
.listing-card[data-game="dragonball"],
.card-result[data-game="dragonball"],
.listing-view-card[data-game="dragonball"] {
  --game-accent: var(--web-gold);
  --game-accent-dark: #6f612d;
  --game-soft: #f7f1df;
}

.listing-card[data-game="yu-gi-oh"],
.card-result[data-game="yu-gi-oh"],
.listing-view-card[data-game="yu-gi-oh"],
.listing-card[data-game="magic-the-gathering"],
.card-result[data-game="magic-the-gathering"],
.listing-view-card[data-game="magic-the-gathering"],
.listing-card[data-game="gundam"],
.card-result[data-game="gundam"],
.listing-view-card[data-game="gundam"],
.listing-card[data-game="vanguard"],
.card-result[data-game="vanguard"],
.listing-view-card[data-game="vanguard"],
.listing-card[data-game="lorcana"],
.card-result[data-game="lorcana"],
.listing-view-card[data-game="lorcana"] {
  --game-accent: var(--web-blue);
  --game-accent-dark: #294557;
  --game-soft: #eef5f8;
}

.listing-card[data-game="flesh-and-blood"],
.card-result[data-game="flesh-and-blood"],
.listing-view-card[data-game="flesh-and-blood"],
.listing-card[data-game="riftbound"],
.card-result[data-game="riftbound"],
.listing-view-card[data-game="riftbound"],
.listing-card[data-game="digimon"],
.card-result[data-game="digimon"],
.listing-view-card[data-game="digimon"],
.listing-card[data-game="topps"],
.card-result[data-game="topps"],
.listing-view-card[data-game="topps"],
.listing-card[data-game="sports"],
.card-result[data-game="sports"],
.listing-view-card[data-game="sports"] {
  --game-accent: var(--web-green);
  --game-accent-dark: var(--web-green-dark);
  --game-soft: #eef6f3;
}

.listing-card {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 107, 92, 0.26);
  box-shadow: 0 20px 42px rgba(17, 25, 34, 0.12);
}

.card-result {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.card-result.is-selected {
  border-color: var(--web-green);
  box-shadow: inset 0 0 0 2px rgba(14, 102, 85, 0.22), 0 10px 26px rgba(24, 32, 43, 0.07);
}

.listing-image-frame,
.card-result-image-frame {
  position: relative;
  min-height: var(--web-card-media-height);
  display: grid;
  place-items: center;
  background: var(--game-soft);
  border-bottom: 1px solid rgba(17, 25, 34, 0.075);
}

.listing-media {
  width: 100%;
  height: var(--web-card-media-height);
  background: var(--game-soft);
  object-fit: contain;
  padding: 16px;
  filter: drop-shadow(0 10px 12px rgba(17, 25, 34, 0.12));
}

.card-result-media {
  width: 100%;
  height: var(--web-card-media-height);
  background: var(--game-soft);
  object-fit: contain;
  padding: 16px;
  filter: drop-shadow(0 10px 12px rgba(17, 25, 34, 0.12));
}

.listing-placeholder {
  width: 100%;
  height: var(--web-card-media-height);
  display: grid;
  place-items: center;
  color: var(--web-muted);
  background: var(--game-soft);
  font-weight: 800;
}

.card-result-placeholder {
  width: 100%;
  height: var(--web-card-media-height);
  display: grid;
  place-items: center;
  color: var(--web-muted);
  background: var(--game-soft);
  font-weight: 800;
}

.listing-badge-row {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.listing-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px;
}

.card-result-body {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.listing-title {
  margin: 0;
  min-height: calc(1.18em * 2);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.listing-price-wrap {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.listing-price-wrap span {
  color: var(--web-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.listing-description {
  margin: 0;
  min-height: calc(1.4em * 2);
  color: var(--web-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-description.is-empty {
  visibility: hidden;
}

.listing-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.listing-fact {
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  border: 1px solid rgba(17, 25, 34, 0.065);
  background: #fbfcfb;
}

.listing-fact dt {
  margin: 0 0 3px;
  color: var(--web-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.listing-fact dd {
  margin: 0;
  color: var(--web-ink);
  font-size: 0.88rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.listing-seller-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.seller-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 999px;
  color: var(--web-green-dark);
  background: #e8f2ee;
  border: 1px solid #d4e5df;
  font-weight: 900;
}

.listing-seller-row strong,
.listing-seller-row small {
  display: block;
}

.listing-seller-row small {
  margin-top: 2px;
  color: var(--web-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.listing-meta,
.order-meta,
.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--web-muted);
  font-size: 0.82rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #21302d;
  background: #eef3f0;
  border: 1px solid #d9e5de;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill.gold {
  color: #3f3829;
  background: #f7f1df;
  border-color: #ded4b7;
}

.pill.gold.game-pill {
  padding: 0;
  border: 0;
  background: transparent;
}

.pill.blue {
  color: #294557;
  background: #eef5f8;
  border-color: #d7e3e9;
}

.pill.coral {
  color: #713732;
  background: #f7eceb;
  border-color: #e5c8c4;
}

.listing-price {
  color: var(--web-green-dark);
  font-size: 1.22rem;
  font-weight: 900;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: auto;
}

.card-actions.two-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-actions.one-action {
  grid-template-columns: 1fr;
}

.listing-card[data-listing-id],
.card-result[data-card-id],
.compact-item[data-listing-id] {
  cursor: pointer;
}

.compact-item[data-seller-id],
.compact-item[data-saved-search-id] {
  cursor: pointer;
}

.card-actions .secondary-button,
.card-actions .primary-button {
  min-height: 38px;
  padding: 8px;
  font-size: 0.84rem;
}

.split-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.swap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.38fr);
  gap: 16px;
  align-items: start;
}

.swap-main,
.swap-sidecar {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.compact-heading {
  min-height: 42px;
}

.tool-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: var(--web-surface-strong);
  box-shadow: var(--web-shadow-soft);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-cols {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr) minmax(180px, 0.8fr);
}

.deckbuilder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.deckbuilder-main,
.deckbuilder-sidecar {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.deck-meta-panel {
  background: #ffffff;
}

.deck-library-panel {
  background: #ffffff;
}

.deck-library-list {
  display: grid;
  gap: 10px;
}

.deck-library-item {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  color: inherit;
  background: #ffffff;
  box-shadow: var(--web-shadow-soft);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.deck-library-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 107, 92, 0.22);
  box-shadow: 0 14px 28px rgba(17, 25, 34, 0.09);
}

.deck-library-item.is-active {
  border-color: rgba(49, 138, 96, 0.36);
  background: #f3fbf6;
}

.deck-library-icon {
  min-height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--web-green);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.deck-library-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.deck-library-copy strong {
  color: var(--web-ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.deck-library-copy small {
  color: var(--web-muted);
  font-weight: 700;
  line-height: 1.35;
}

.deck-library-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--web-green-dark);
  background: rgba(49, 138, 96, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.deck-metrics .stat-tile strong {
  color: var(--web-green);
}

.deck-card-list {
  display: grid;
  gap: 10px;
}

.deck-card-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: #ffffff;
  box-shadow: var(--web-shadow-soft);
}

.deck-card-row.is-owned {
  border-color: rgba(49, 138, 96, 0.34);
  background: #f3fbf6;
}

.deck-card-row.is-missing {
  border-color: rgba(201, 91, 65, 0.22);
}

.deck-card-click {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.deck-card-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.deck-card-copy strong {
  color: var(--web-ink);
  font-size: 0.98rem;
  line-height: 1.18;
}

.deck-card-copy small {
  color: var(--web-muted);
  font-weight: 700;
  line-height: 1.35;
}

.deck-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--web-green-dark);
  background: rgba(49, 138, 96, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.deck-card-row.is-missing .deck-state-pill {
  color: #a23b2b;
  background: rgba(201, 91, 65, 0.12);
}

.deck-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.deck-row-actions .secondary-button {
  min-height: 34px;
  padding: 7px 10px;
}

.deck-row-quantity {
  min-width: 26px;
  color: var(--web-ink);
  text-align: center;
  font-weight: 900;
}

.deck-search-card,
.missing-card-item {
  background: #ffffff;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.check-row span {
  color: var(--web-ink);
}

.compact-list,
.order-list,
.thread-list {
  display: grid;
  gap: 10px;
}

.wide-list {
  gap: 12px;
}

.compact-item,
.order-card,
.thread-item {
  padding: 12px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.compact-item:hover,
.order-card:hover,
.thread-item:hover {
  border-color: rgba(15, 107, 92, 0.2);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(17, 25, 34, 0.085);
}

.compact-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.my-listing-card {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

.my-listing-media {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.my-listing-thumb {
  width: 100%;
  height: 100%;
  min-height: 188px;
}

.my-listing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.my-listing-copy {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.my-listing-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.my-listing-heading {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.my-listing-price {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.my-listing-price strong {
  font-size: 1.18rem;
  line-height: 1;
}

.my-listing-price span {
  color: var(--web-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.my-listing-footer {
  display: grid;
  gap: 10px;
}

.my-listing-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.my-listing-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(17, 25, 34, 0.08);
  background: #f7faf8;
}

.my-listing-metric strong {
  font-size: 1rem;
  font-weight: 900;
}

.my-listing-metric span {
  color: var(--web-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.my-listing-metric-icon {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--web-green);
  box-shadow: 0 0 0 3px rgba(14, 102, 85, 0.12);
}

.my-listing-metric-icon.is-favorites {
  background: var(--web-gold);
  box-shadow: 0 0 0 3px rgba(184, 146, 46, 0.12);
}

.my-listing-metric-icon.is-date {
  background: var(--web-blue);
  box-shadow: 0 0 0 3px rgba(58, 121, 164, 0.12);
}

.my-listing-metric-icon.is-market {
  background: #8668c5;
  box-shadow: 0 0 0 3px rgba(134, 104, 197, 0.14);
}

.my-listing-metric-icon.is-trend {
  background: #d08b2f;
  box-shadow: 0 0 0 3px rgba(208, 139, 47, 0.14);
}

.my-listing-note {
  margin: 0;
  color: var(--web-muted);
  line-height: 1.45;
}

.my-listing-actions {
  border-top: 1px dashed rgba(17, 25, 34, 0.12);
  padding-top: 10px;
}

.my-listing-actions .secondary-button,
.my-listing-actions .danger-button {
  min-height: 36px;
}

@media (max-width: 920px) {
  .my-listing-card {
    grid-template-columns: 1fr;
  }

  .my-listing-thumb {
    min-height: 170px;
  }

  .my-listing-head {
    grid-template-columns: 1fr;
  }

  .my-listing-price {
    justify-items: start;
    text-align: left;
  }

  .my-listing-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .my-listing-stats {
    grid-template-columns: 1fr;
  }
}

.sell-price-suggestion {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--web-radius);
  border: 1px dashed rgba(15, 107, 92, 0.28);
  background: rgba(15, 107, 92, 0.07);
  color: var(--web-ink);
}

.sell-price-suggestion span {
  color: var(--web-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.sell-price-suggestion .secondary-button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.compact-thumb {
  width: 58px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  background: #edf2ef;
  box-shadow: inset 0 0 0 1px rgba(17, 25, 34, 0.05);
}

.compact-badge {
  width: 58px;
  min-height: 72px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--web-green);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.favorite-item-copy {
  min-width: 0;
}

.favorite-avatar {
  width: 58px;
  height: 58px;
  min-height: 58px;
  border-radius: 999px;
  object-fit: cover;
}

.favorite-search-badge {
  background: var(--web-blue);
}

.compact-title,
.order-title,
.thread-title {
  margin: 0 0 4px;
  font-weight: 800;
  line-height: 1.18;
}

.compact-note {
  margin: 8px 0 0;
  color: var(--web-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.swap-card .listing-price {
  font-size: 1rem;
}

.swap-card .swap-card-submeta {
  min-height: calc(1.35em * 2);
  align-content: flex-start;
}

.listing-view-modal {
  width: min(1340px, 100%);
  overflow-x: hidden;
}

.listing-view-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.listing-view-media-frame {
  min-height: clamp(430px, 62vh, 660px);
  display: grid;
  place-items: center;
  border-radius: var(--web-radius);
  border: 1px solid rgba(17, 25, 34, 0.08);
  background: var(--game-soft, #f4f6f5);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.listing-view-media,
.listing-view-placeholder {
  width: 100%;
  height: 100%;
  min-height: clamp(430px, 62vh, 660px);
}

.listing-view-media {
  object-fit: contain;
  padding: 16px;
  filter: drop-shadow(0 14px 20px rgba(17, 25, 34, 0.16));
}

.listing-view-placeholder {
  display: grid;
  place-items: center;
  color: var(--web-muted);
  font-weight: 900;
}

.listing-view-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.listing-view-body .listing-facts {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.listing-view-title {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.15;
}

.listing-view-description {
  margin: 0;
  color: var(--web-muted);
  line-height: 1.45;
}

.listing-view-card .card-actions {
  margin-top: auto;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
}

.listing-view-card .card-actions .secondary-button,
.listing-view-card .card-actions .primary-button {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-view-card .listing-seller-row > span:last-child {
  min-width: 0;
}

.listing-view-card .listing-seller-row small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.listing-view-body .listing-fact dd {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
  line-height: 1.2;
}

.listing-view-body .listing-fact dd.fact-value-date {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.listing-view-body .listing-fact dd.fact-value-card-number {
  white-space: normal;
  overflow-wrap: anywhere;
}

.swap-search-item,
.trade-room-card {
  align-items: start;
}

.trade-room-card > div:last-child,
.trade-room-card-body {
  min-width: 0;
  width: 100%;
}

.trade-room-detail-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 25, 34, 0.1);
}

.trade-room-detail-heading,
.trade-room-offer-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trade-room-detail-heading {
  justify-content: space-between;
}

.trade-room-detail-heading span,
.trade-room-offer-copy span,
.trade-room-mini-card span,
.trade-room-empty-line {
  display: block;
  color: var(--web-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.trade-room-card-groups,
.trade-room-partner-section {
  display: grid;
  gap: 10px;
}

.trade-room-card-group h4,
.trade-room-partner-section h4 {
  margin: 0 0 8px;
  font-size: 0.86rem;
}

.trade-room-card-group-value {
  display: block;
  margin-top: 3px;
  color: var(--web-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.trade-room-selected-grid,
.trade-room-partner-list {
  display: grid;
  gap: 8px;
}

.trade-room-mini-card,
.trade-room-offer-item {
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: rgba(255, 255, 255, 0.7);
  padding: 8px;
}

.trade-room-mini-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.trade-room-mini-card img,
.trade-room-offer-item img,
.trade-room-mini-placeholder {
  width: 42px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef2f0;
}

.trade-room-mini-placeholder {
  display: grid;
  place-items: center;
  color: var(--web-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.trade-room-mini-card strong,
.trade-room-offer-copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-room-offer-copy {
  min-width: 0;
  flex: 1;
}

.trade-room-offer-item .primary-button {
  flex: 0 0 auto;
}

.compact-actions,
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-line);
  background: #ffffff;
}

.segment {
  min-height: 36px;
  border-color: transparent;
}

.segment.is-active {
  color: #ffffff;
  background: var(--web-green);
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  min-height: 620px;
}

.thread-list,
.chat-panel {
  min-height: 620px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  border: 1px solid rgba(17, 25, 34, 0.08);
  border-radius: var(--web-radius);
  background: var(--web-surface-strong);
  box-shadow: var(--web-shadow-soft);
  padding: 10px;
}

.thread-item {
  width: 100%;
  text-align: left;
  color: var(--web-ink);
}

.thread-item.is-active {
  border-color: var(--web-green);
  box-shadow: inset 3px 0 0 var(--web-green);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-header {
  padding: 10px 12px;
  border-radius: var(--web-radius);
  color: var(--web-muted);
  background: #ffffff;
  border: 1px solid rgba(17, 25, 34, 0.08);
  font-weight: 800;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding: 6px;
}

.message-bubble {
  width: min(74%, 620px);
  padding: 10px 12px;
  box-shadow: none;
}

.message-bubble.is-own {
  align-self: flex-end;
  color: #ffffff;
  background: var(--web-green);
  border-color: var(--web-green);
}

.message-bubble p {
  margin: 0;
  line-height: 1.42;
}

.message-bubble small {
  display: block;
  margin-top: 6px;
  color: inherit;
  opacity: 0.72;
}

.message-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.profile-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 4px;
}

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--web-radius);
  color: #ffffff;
  background: var(--web-green);
  font-size: 1.2rem;
  font-weight: 900;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-state {
  padding: 18px;
  color: var(--web-muted);
  box-shadow: none;
}

.empty-state strong {
  display: block;
  color: var(--web-ink);
  margin-bottom: 6px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-line);
  background: var(--web-surface-strong);
  box-shadow: var(--web-shadow);
  font-weight: 750;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toast.is-error {
  border-color: #e4b4ac;
  color: var(--web-coral);
}

.toast.is-success {
  border-color: #b7d8c5;
  color: var(--web-ok);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 22, 28, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-backdrop.is-hidden {
  display: none;
}

.modal-panel {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--web-radius);
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(9, 17, 24, 0.3);
}

.modal-heading {
  justify-content: space-between;
}

.auth-tabs {
  width: 100%;
}

.auth-tabs .segment {
  flex: 1;
}

.auth-form {
  display: none;
  gap: 12px;
}

.auth-form.is-active {
  display: grid;
}

.button-row.compact {
  flex-wrap: wrap;
}

.modal-actions {
  justify-content: flex-end;
}


















@media (max-width: 1080px) {
  :root {
    --web-content-max: 100%;
    --web-card-min: 260px;
    --web-section-gap: 14px;
  }

  body.ct-web-app {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    padding: 14px;
    flex-wrap: wrap;
  }

  .app-topbar {
    top: 0;
  }

  .app-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .sidebar-actions {
    margin-left: 0;
  }

  .app-topbar,
  .workspace-header,
  .split-workspace,
  .deckbuilder-layout,
  .favorites-layout,
  .swap-layout,
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .app-topbar,
  .workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .global-search {
    width: 100%;
  }

  .detail-search-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-hero {
    grid-template-columns: 1fr;
  }

  .marketplace-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .listing-view-card {
    grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  }

  .category-slider {
    width: 100%;
  }

  .category-rail {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --web-page-pad: 14px;
    --web-card-min: 100%;
    --web-card-media-height: 220px;
  }

  .app-content,
  .app-topbar {
    padding: 14px;
  }

  .app-topbar {
    gap: 12px;
  }

  .global-search {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .global-search .primary-button,
  .global-search .secondary-button,
  .global-search .icon-button,
  .global-search .icon-only {
    width: 100%;
  }

  .filter-bar,
  .detail-search-panel,
  .form-grid.two-cols,
  .form-grid.three-cols,
  .metric-strip,
  .stat-grid,

  .my-listings-filter {
    margin-bottom: 12px;
  }
  .message-composer {
    grid-template-columns: 1fr;
  }

  .app-sidebar,
  .topbar-cluster,
  .hero-actions,
  .sidebar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-brand,
  .app-nav,
  .sidebar-actions,
  .topbar-cluster,
  .sync-state {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .app-nav {
    justify-content: flex-start;
  }

  .topbar-cluster {
    gap: 10px;
  }

  .mode-link {
    width: 100%;
  }

  .marketplace-hero {
    padding: 18px;
    gap: 14px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-subline {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .hero-actions > * {
    width: 100%;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .metric,
  .stat-tile {
    min-width: 0;
  }

  .listing-grid,
  .card-result-grid {
    grid-template-columns: 1fr;
  }

  .listing-grid {
    grid-auto-rows: 1fr;
  }

  .listing-card {
    height: 100%;
  }

  .listing-image-frame,
  .card-result-image-frame,
  .listing-media,
  .listing-placeholder,
  .card-result-media,
  .card-result-placeholder {
    min-height: 220px;
    height: 220px;
  }

  .listing-card-top {
    grid-template-columns: 1fr;
  }

  .listing-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-price-wrap {
    justify-items: start;
    text-align: left;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .listing-view-card {
    grid-template-columns: 1fr;
  }

  .listing-view-media-frame,
  .listing-view-media,
  .listing-view-placeholder {
    min-height: clamp(330px, 62vh, 500px);
  }

  .deck-card-click {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .deck-library-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .deck-library-status {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .deck-state-pill {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .message-bubble {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hero-metrics,
  .listing-facts {
    grid-template-columns: 1fr;
  }

  .category-slider {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .category-chip,
  .tcg-logo {
    min-width: 96px;
  }
}

@media (max-width: 980px) {
  .listing-view-card {
    grid-template-columns: 1fr;
  }

  .listing-view-card .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-view-body .listing-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .listing-view-card .card-actions {
    grid-template-columns: 1fr;
  }
}

h1,
h2,
h3,
h4,
.compact-title,
.order-title,
.thread-title,
.listing-title,
.listing-view-title {
  color: #ffffff;
}