:root {
  --yjs-navy: #071426;
  --yjs-charcoal: #111820;
  --yjs-paper: #F5F2E9;
  --yjs-paper-2: #ebe6d8;
  --yjs-red: #D9282F;
  --yjs-red-dark: #b51f25;
  --yjs-steel: #2C658D;
  --yjs-olive: #66704D;
  --yjs-gold: #C99A3D;
  --yjs-ink: #1b232c;
  --yjs-muted: #5c6570;
  --yjs-line: rgba(7, 20, 38, 0.12);
  --yjs-white: #fff;
  --yjs-radius: 10px;
  --yjs-shadow: 0 10px 30px rgba(7, 20, 38, 0.08);
  --yjs-header: 4.5rem;
  --yjs-font: "Source Sans 3", "Segoe UI", sans-serif;
  --yjs-display: "Oswald", "Arial Narrow", sans-serif;
  --yjs-max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--yjs-paper);
  color: var(--yjs-ink);
  font-family: var(--yjs-font);
  font-size: 16px;
  line-height: 1.5;
}
body {
  background-image:
    radial-gradient(rgba(17, 24, 32, 0.03) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yjs-steel); text-decoration: none; }
a:hover { color: var(--yjs-navy); }
button, input, select, textarea { font-family: inherit; }
:focus-visible {
  outline: 3px solid var(--yjs-gold);
  outline-offset: 2px;
}

.wrapper, .yjs-wrap {
  width: min(var(--yjs-max), calc(100% - 2rem));
  margin: 0 auto;
}

/* Hide generic Osclass chrome we replace */
#header .ads_header,
#header .nav,
#header .search,
#header #logo #description,
#footer .resp-toggle,
.latest_ads .actions,
#sidebar .widget-box.location { display: none !important; }

body.home #sidebar { display: none; }
body.home #main, body.home .wrapper #main { width: 100%; float: none; }

/* Announcement */
.yjs-announce {
  background: var(--yjs-navy);
  color: #f4efe3;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.yjs-announce .yjs-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.35rem 0;
}
.yjs-announce strong { color: var(--yjs-gold); font-weight: 600; }
.yjs-announce-meta { color: #c9d3de; white-space: nowrap; }

/* Sticky header */
.yjs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--yjs-paper);
  border-bottom: 1px solid var(--yjs-line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.yjs-header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 0.7rem 0;
}
.yjs-wordmark, a.yjs-wordmark {
  color: var(--yjs-navy);
  text-decoration: none;
  line-height: 0.9;
}
.yjs-mark {
  font-family: var(--yjs-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  letter-spacing: 0.01em;
  text-transform: none;
}
.yjs-mark span { color: var(--yjs-red); }

.yjs-search {
  display: flex;
  background: #fff;
  border: 1px solid #cfc8b8;
  border-radius: 8px;
  overflow: hidden;
  min-height: 2.7rem;
}
.yjs-search input {
  flex: 1;
  border: 0;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  background: transparent;
}
.yjs-search button {
  background: var(--yjs-red);
  color: #fff;
  border: 0;
  padding: 0 1.05rem;
  cursor: pointer;
  font-weight: 700;
}
.yjs-search button:hover { background: var(--yjs-red-dark); }

.yjs-utils {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--yjs-navy);
}
.yjs-utils a { color: var(--yjs-navy); display: inline-flex; align-items: center; gap: 0.28rem; }
.yjs-iconbtn {
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border-radius: 999px;
}
.yjs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yjs-red);
  color: #fff !important;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.62rem 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.yjs-cta:hover { background: var(--yjs-red-dark); color: #fff !important; }
.yjs-cta-outline {
  background: transparent;
  color: var(--yjs-red) !important;
  border: 2px solid var(--yjs-red);
}
.yjs-cta-outline:hover { background: var(--yjs-red); color: #fff !important; }

.yjs-cats {
  background: var(--yjs-navy);
  color: #fff;
}
.yjs-cats .yjs-wrap {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.yjs-cats a {
  color: #e8eef5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.72rem 0.7rem;
  white-space: nowrap;
}
.yjs-cats a:hover, .yjs-cats a.is-active { color: var(--yjs-gold); }

/* Hero */
.yjs-hero {
  padding: 1.6rem 0 1.1rem;
}
.yjs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.4rem;
  align-items: start;
}
.yjs-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yjs-gold);
  font-weight: 700;
  margin: 0 0 0.55rem;
}
.yjs-hero h1 {
  font-family: var(--yjs-display);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 0.95;
  color: var(--yjs-navy);
  margin: 0 0 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.yjs-hero p.lead {
  max-width: 38rem;
  color: var(--yjs-muted);
  margin: 0 0 1rem;
}
.yjs-hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; }

.yjs-searchbox {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: var(--yjs-radius);
  box-shadow: var(--yjs-shadow);
  overflow: hidden;
}
.yjs-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.yjs-tabs button {
  border: 0;
  background: #ece7db;
  color: var(--yjs-navy);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.7rem 0.4rem;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.yjs-tabs button[data-intent="buy"].is-active { background: var(--yjs-navy); color: #fff; }
.yjs-tabs button[data-intent="sell"].is-active { background: var(--yjs-red); color: #fff; }
.yjs-tabs button[data-intent="trade"].is-active { background: var(--yjs-olive); color: #fff; }
.yjs-tabs button[data-intent="wanted"].is-active { background: var(--yjs-gold); color: var(--yjs-navy); }
.yjs-searchbox-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
  gap: 0.55rem;
  padding: 0.85rem;
}
.yjs-searchbox-body input,
.yjs-searchbox-body select {
  width: 100%;
  border: 1px solid #d7d0c2;
  border-radius: 8px;
  padding: 0.62rem 0.7rem;
  background: #fff;
}
.yjs-searchbox-body .yjs-cta { min-height: 2.6rem; }

.yjs-dossier {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  background: var(--yjs-charcoal);
  border: 1px solid #243040;
}
.yjs-dossier img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}
.yjs-dossier-label {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  color: #f4efe3;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(7,20,38,0.72);
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(201,154,61,0.45);
}

.yjs-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  padding: 0.9rem 0 0.2rem;
}
.yjs-trust article {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--yjs-navy);
}
.yjs-trust svg { flex: 0 0 22px; margin-top: 0.15rem; }
.yjs-paypal-note {
  font-size: 0.84rem;
  color: var(--yjs-muted);
  background: #ece8dc;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin: 0.85rem 0 0;
}

.yjs-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  padding: 1.3rem 0 0.4rem;
}
.yjs-action {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: 12px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--yjs-shadow);
}
.yjs-action h2 {
  font-family: var(--yjs-display);
  margin: 0.35rem 0 0.35rem;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}
.yjs-action p { margin: 0 0 0.85rem; color: var(--yjs-muted); font-size: 0.92rem; min-height: 2.8rem; }
.yjs-badge-dot {
  width: 2.2rem; height: 2.2rem; border-radius: 999px; display: grid; place-items: center; color: #fff;
}
.yjs-action.shop .yjs-badge-dot { background: var(--yjs-steel); }
.yjs-action.sell .yjs-badge-dot { background: var(--yjs-red); }
.yjs-action.trade .yjs-badge-dot { background: var(--yjs-olive); }
.yjs-action.wanted .yjs-badge-dot { background: var(--yjs-gold); color: var(--yjs-navy); }

.yjs-section { padding: 1.6rem 0 0.6rem; }
.yjs-section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.9rem;
}
.yjs-section h2 {
  font-family: var(--yjs-display);
  font-size: 1.7rem;
  margin: 0;
  color: var(--yjs-navy);
  letter-spacing: 0.03em;
}
.yjs-filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.yjs-filters a, .yjs-filters button {
  border: 1px solid #d4cdbd;
  background: #fff;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--yjs-navy);
  cursor: pointer;
}
.yjs-filters .is-active { background: var(--yjs-navy); color: #fff; border-color: var(--yjs-navy); }

.yjs-cards, .listing-grid, #listing-card-list.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.yjs-card, .listing-card {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.yjs-card-media, .listing-card .listing-thumb {
  aspect-ratio: 1 / 1.02;
  background: #d9d3c4;
  display: block;
}
.yjs-card-media img, .listing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yjs-chip {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  background: var(--yjs-navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 4px;
}
.yjs-fav {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 2rem; height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  cursor: pointer;
}
.yjs-warn {
  background: var(--yjs-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.32rem 0.4rem;
}
.yjs-card-body { padding: 0.75rem 0.8rem 0.9rem; display: flex; flex-direction: column; gap: 0.28rem; flex: 1; }
.yjs-card-body h3, .listing-card .title {
  font-size: 0.98rem;
  margin: 0;
  color: var(--yjs-navy);
  font-weight: 700;
}
.yjs-price { font-weight: 800; color: var(--yjs-navy); font-size: 1.05rem; }
.yjs-meta, .listing-attributes { color: var(--yjs-muted); font-size: 0.8rem; }
.yjs-seller { display: flex; justify-content: space-between; gap: 0.4rem; font-size: 0.78rem; color: var(--yjs-muted); }
.yjs-paypal {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yjs-steel);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.yjs-wanted-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.yjs-wanted-card {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: 12px;
  padding: 0.8rem;
}
.yjs-wanted-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; background: #d9d3c4; margin-bottom: 0.6rem; }

.yjs-legal {
  font-size: 0.8rem;
  color: var(--yjs-muted);
  padding: 1.4rem 0 5.5rem;
  border-top: 1px solid var(--yjs-line);
  margin-top: 1.6rem;
}

.yjs-site-footer {
  background: var(--yjs-navy);
  color: #d7dee8;
  padding: 2rem 0 5.5rem;
}
.yjs-site-footer a { color: #f4efe3; }
.yjs-foot-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 1.2rem;
}
.yjs-site-footer h3 {
  font-family: var(--yjs-display);
  color: #fff;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}
.yjs-site-footer ul { list-style: none; padding: 0; margin: 0; }
.yjs-site-footer li { margin: 0.28rem 0; }

.yjs-mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--yjs-navy);
  color: #fff;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.35rem 0.2rem calc(0.35rem + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(0,0,0,0.18);
}
.yjs-mobile-nav a {
  color: #d7dee8;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
}
.yjs-mobile-nav a.is-active, .yjs-mobile-nav a:hover { color: #fff; }
.yjs-mobile-nav .sell {
  width: 2.6rem; height: 2.6rem; margin: -1.05rem auto 0;
  background: var(--yjs-red);
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

.yjs-hamburger, .yjs-msearch { display: none; background: none; border: 0; cursor: pointer; }

/* Command Center */
.yjs-cc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.2rem 0 4rem;
}
.yjs-cc-nav {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: 12px;
  padding: 0.7rem;
  height: fit-content;
  position: sticky;
  top: 5.2rem;
}
.yjs-cc-nav a {
  display: block;
  padding: 0.48rem 0.6rem;
  border-radius: 8px;
  color: var(--yjs-navy);
  font-weight: 650;
  font-size: 0.92rem;
}
.yjs-cc-nav a.is-active, .yjs-cc-nav a:hover { background: #efe9db; }
.yjs-statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}
.yjs-stat {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: 12px;
  padding: 0.85rem;
}
.yjs-stat b { display: block; font-size: 1.35rem; color: var(--yjs-navy); }
.yjs-panel {
  background: #fff;
  border: 1px solid var(--yjs-line);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.85rem;
}
.yjs-table { width: 100%; border-collapse: collapse; }
.yjs-table th, .yjs-table td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--yjs-line); font-size: 0.9rem; }
.yjs-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.yjs-badge.ok { background: #e5efe4; color: #315534; }
.yjs-badge.warn { background: #f7e3c6; color: #7a4e12; }
.yjs-badge.bad { background: #f8d4d4; color: #8a1d22; }
.yjs-progress { height: 8px; background: #e6e0d2; border-radius: 99px; overflow: hidden; }
.yjs-progress > span { display: block; height: 100%; background: var(--yjs-olive); }

.yjs-drawer {
  position: fixed;
  inset: 0;
  background: rgba(7,20,38,0.46);
  z-index: 60;
  display: none;
}
.yjs-drawer.is-open { display: block; }
.yjs-drawer-panel {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: min(22rem, 92vw);
  background: var(--yjs-paper);
  padding: 1rem;
  overflow: auto;
}
.yjs-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--yjs-paper);
  border-radius: 16px 16px 0 0;
  padding: 1rem 1rem 5rem;
  max-height: 85vh;
  overflow: auto;
}

@media (min-width: 761px) {
  #filter-sheet.yjs-drawer {
    position: static;
    inset: auto;
    background: none;
    display: block;
    z-index: auto;
  }
  #filter-sheet .yjs-sheet {
    position: static;
    max-height: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  [data-open="filter-sheet"],
  [data-close="filter-sheet"] { display: none; }
}

body.home #content, body.home .content { background: transparent; }
#content, .content { padding-bottom: 1rem; }

@media (max-width: 1100px) {
  .yjs-hero-grid, .yjs-actions, .yjs-cards, .yjs-wanted-row, .listing-grid, #listing-card-list.listing-grid, .yjs-trust, .yjs-statgrid, .yjs-foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .yjs-searchbox-body { grid-template-columns: 1fr 1fr; }
  .yjs-utils .yjs-hide-sm { display: none; }
}

@media (min-width: 761px) {
  #filter-sheet.yjs-drawer {
    display: block;
    position: static;
    background: transparent;
    z-index: auto;
  }
  #filter-sheet .yjs-sheet {
    position: static;
    padding: 0;
    background: transparent;
    max-height: none;
    overflow: visible;
    border-radius: 0;
  }
  #filter-sheet [data-close],
  button[data-open="filter-sheet"] { display: none; }
}

@media (max-width: 760px) {
  body { padding-bottom: 4.6rem; }
  .yjs-header { position: sticky; top: 0; }
  .yjs-header-row { grid-template-columns: auto 1fr auto; }
  .yjs-header-search-desktop, .yjs-cats, .yjs-utils span.label, .yjs-announce-meta { display: none; }
  .yjs-hamburger, .yjs-msearch { display: grid; }
  .yjs-hero-grid, .yjs-actions, .yjs-cards, .yjs-wanted-row, .yjs-trust, .yjs-statgrid, .yjs-foot-grid, .yjs-cc {
    grid-template-columns: 1fr;
  }
  .yjs-cards, .yjs-wanted-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 0.4rem;
  }
  .yjs-card, .yjs-wanted-card, .listing-card {
    min-width: 78%;
    scroll-snap-align: start;
  }
  .yjs-searchbox-body { grid-template-columns: 1fr; }
  .yjs-hero-actions .yjs-cta { width: 100%; }
  .yjs-mobile-nav { display: grid; }
  .yjs-site-footer, .yjs-legal { padding-bottom: 5.8rem; }
  .yjs-cc-nav { position: static; }
}
