.ycsm-market {
  --ycsm-blue-1: #244f99;
  --ycsm-blue-2: #2c63c5;
  --ycsm-blue-3: #5b91ff;
  --ycsm-surface: #ffffff;
  --ycsm-text: #17233d;
  --ycsm-muted: #6b7485;
  --ycsm-line: #e5ebf3;
  --ycsm-red: #ef4f3f;
  --ycsm-green: #19b96d;
  --ycsm-orange: #f59e0b;
  color: var(--ycsm-text);
  font-size: 14px;
}

.ycsm-market * {
  box-sizing: border-box;
}

.ycsm-account-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  gap: 22px 28px;
  overflow: hidden;
  margin: 0 0 18px;
  padding: 30px 34px 28px;
  border-radius: 14px;
  background: linear-gradient(118deg, var(--ycsm-blue-1), var(--ycsm-blue-2) 56%, var(--ycsm-blue-3));
  color: #fff;
  box-shadow: 0 18px 45px rgba(36, 79, 153, 0.2);
}

.ycsm-account-panel::before,
.ycsm-account-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ycsm-account-panel::before {
  width: 420px;
  height: 420px;
  top: -250px;
  left: 340px;
}

.ycsm-account-panel::after {
  width: 310px;
  height: 310px;
  right: 26px;
  bottom: -154px;
  border: 32px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.ycsm-account-main,
.ycsm-advisor-card,
.ycsm-account-metrics,
.ycsm-wechat-status {
  position: relative;
  z-index: 1;
}

.ycsm-eyebrow {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  font-weight: 700;
}

.ycsm-account-main h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: 0;
}

.ycsm-account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ycsm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}

.ycsm-badge-gold {
  background: rgba(245, 158, 11, 0.22);
  color: #ffe5a3;
}

.ycsm-badge-green {
  background: rgba(25, 185, 109, 0.2);
  color: #c6ffe1;
}

.ycsm-badge-blue {
  background: rgba(255, 255, 255, 0.14);
}

.ycsm-advisor-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ycsm-advisor-card:hover,
.ycsm-advisor-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.19);
  outline: none;
}

.ycsm-advisor-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 3px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  object-fit: cover;
}

.ycsm-advisor-label,
.ycsm-advisor-card em {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.ycsm-advisor-copy {
  display: block;
  min-width: 0;
}

.ycsm-advisor-card strong {
  display: block;
  margin: 3px 0;
  color: #fff;
  font-size: 17px;
}

.ycsm-account-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ycsm-account-metric {
  min-height: 78px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
}

.ycsm-account-metric span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.76);
}

.ycsm-account-metric strong {
  color: #fff;
  font-size: 20px;
}

.ycsm-wechat-status {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.ycsm-wechat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(25, 185, 109, 0.88);
  font-weight: 800;
}

.ycsm-wechat-status strong {
  display: block;
  color: #fff;
}

.ycsm-wechat-status em {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

.ycsm-modal-open {
  overflow: hidden;
}

.ycsm-advisor-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 18, 34, 0.68);
}

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

.ycsm-advisor-dialog {
  position: relative;
  overflow: hidden;
  width: min(420px, 100%);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(10, 18, 34, 0.32);
}

.ycsm-advisor-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ycsm-advisor-close:hover,
.ycsm-advisor-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.ycsm-advisor-dialog-head {
  display: grid;
  justify-items: center;
  padding: 34px 24px 30px;
  background: linear-gradient(135deg, #5b91ff, #5b55e8);
  color: #fff;
  text-align: center;
}

.ycsm-advisor-dialog-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 14px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  object-fit: cover;
}

.ycsm-advisor-dialog-head strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.25;
}

.ycsm-advisor-dialog-head span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.88);
}

.ycsm-advisor-dialog-body {
  display: grid;
  justify-items: center;
  padding: 20px 26px 28px;
}

.ycsm-advisor-contact {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f6f8fb;
}

.ycsm-dialog-wechat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-weight: 800;
}

.ycsm-advisor-contact small {
  display: block;
  color: #738093;
  line-height: 1.4;
}

.ycsm-advisor-contact strong {
  display: block;
  color: #17233d;
  font-size: 15px;
}

.ycsm-dialog-consult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #2f6df6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ycsm-dialog-consult:hover,
.ycsm-dialog-consult:focus-visible {
  background: #1f58d9;
  color: #fff;
  outline: none;
}

.ycsm-dialog-consult.disabled {
  background: #d9e0ec;
  color: #697386;
}

.ycsm-advisor-qr-title {
  margin: 18px 0 10px;
  color: #697386;
}

.ycsm-advisor-qr,
.ycsm-advisor-qr-placeholder {
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(23, 35, 61, 0.13);
}

.ycsm-advisor-qr {
  object-fit: cover;
}

.ycsm-advisor-qr-placeholder {
  border: 1px dashed #c7d1df;
  color: #738093;
  text-align: center;
}

.ycsm-advisor-longpress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  margin-top: 10px;
  padding: 0 17px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4085ff, #6050f0);
  color: #fff;
  font-weight: 700;
}

.ycsm-catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.ycsm-catalog-stat {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 46px;
  grid-template-rows: auto auto;
  gap: 6px 10px;
  overflow: hidden;
  min-height: 92px;
  padding: 14px 14px 12px;
  border: 1px solid #d6e3ff;
  border-radius: 8px;
  background: #eef4ff;
  color: #2f6df6;
  text-align: left;
  cursor: pointer;
}

.ycsm-catalog-stat::after {
  content: "";
  position: absolute;
  top: -38px;
  right: -16px;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.ycsm-catalog-stat.active,
.ycsm-catalog-stat:focus-visible,
.ycsm-catalog-stat:hover {
  border-width: 2px;
  outline: none;
}

.ycsm-stat-icon {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #4b73ff;
  color: #fff;
  font-weight: 900;
}

.ycsm-catalog-stat small {
  align-self: end;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
}

.ycsm-catalog-stat strong {
  color: inherit;
  font-size: 28px;
  line-height: 1;
}

.ycsm-catalog-stat em {
  position: relative;
  z-index: 1;
  display: grid;
  grid-column: 3;
  grid-row: 1 / 3;
  place-items: center;
  align-self: end;
  justify-self: end;
  width: 42px;
  height: 42px;
  border: 3px solid currentColor;
  border-radius: 999px;
  font-style: normal;
  font-size: 24px;
  font-weight: 900;
}

.ycsm-stat-svip {
  border-color: #c7f0d6;
  background: #effcf4;
  color: #16a85b;
}

.ycsm-stat-svip .ycsm-stat-icon {
  background: #16b967;
}

.ycsm-stat-partner {
  border-color: #ffdca8;
  background: #fff8eb;
  color: #ea580c;
}

.ycsm-stat-partner .ycsm-stat-icon {
  background: #f97316;
}

.ycsm-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ycsm-toolbar label {
  position: relative;
  display: block;
}

.ycsm-toolbar input {
  min-height: 40px;
  width: 100%;
  padding: 0 14px 0 42px;
  border: 1px solid var(--ycsm-line);
  border-radius: 6px;
  background: #fff;
  outline: none;
}

.ycsm-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  transform: translateY(-50%);
  color: #59718d;
  font-size: 20px;
  line-height: 1;
}

.ycsm-toolbar input:focus {
  border-color: rgba(47, 109, 246, 0.5);
  background: #fff;
}

.ycsm-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ycsm-filter button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--ycsm-line);
  border-radius: 6px;
  background: #fff;
  color: var(--ycsm-muted);
  cursor: pointer;
}

.ycsm-filter button.active,
.ycsm-filter button:hover {
  border-color: rgba(47, 109, 246, 0.3);
  background: #edf4ff;
  color: #194eb8;
}

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

.ycsm-card {
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 35, 61, 0.06);
}

.ycsm-card:hover {
  border-color: rgba(47, 109, 246, 0.34);
  box-shadow: 0 14px 34px rgba(23, 35, 61, 0.11);
}

.ycsm-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #eef4ff;
}

.ycsm-cover img,
.ycsm-cover-placeholder {
  width: 100%;
  height: 100%;
}

.ycsm-cover img {
  display: block;
  object-fit: cover;
}

.ycsm-cover-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f04c37, #ffb14f);
  color: #fff;
  font-size: 52px;
  font-weight: 900;
}

.ycsm-pin {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 9px;
  border-radius: 5px;
  background: #ef4f3f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.ycsm-card-body {
  display: grid;
  gap: 7px;
  padding: 10px 12px 12px;
}

.ycsm-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 21px;
  color: #46556b;
  font-size: 12px;
}

.ycsm-platforms i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #16b967;
  color: #fff;
  font-style: normal;
  font-weight: 700;
}

.ycsm-title-line {
  display: grid;
  gap: 2px;
}

.ycsm-card h2 {
  margin: 0;
  min-height: 46px;
  color: #1d2939;
  font-size: 17px;
  line-height: 1.35;
}

.ycsm-title-line small {
  color: var(--ycsm-muted);
  font-size: 12px;
}

.ycsm-desc,
.ycsm-audience {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #46556b;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ycsm-audience {
  -webkit-line-clamp: 1;
}

.ycsm-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ycsm-highlights li {
  padding: 3px 7px;
  border-radius: 5px;
  background: #f3f5f7;
  color: #5d6778;
  font-size: 12px;
}

.ycsm-prices {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.ycsm-price-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto;
  gap: 5px;
  align-items: center;
  min-height: 31px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f7f9fc;
}

.ycsm-price-row.active {
  background: #eef5ff;
  outline: 1px solid rgba(47, 109, 246, 0.25);
}

.ycsm-price-row span {
  color: #556173;
  font-size: 13px;
}

.ycsm-price-row strong {
  color: var(--ycsm-red);
  font-size: 15px;
}

.ycsm-price-row em {
  grid-column: 1 / -1;
  color: #285dd3;
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
}

.ycsm-current {
  padding: 8px 9px;
  border-radius: 6px;
  background: #fff7ea;
  color: #9a5300;
  line-height: 1.5;
}

.ycsm-current strong {
  color: #e06b00;
  font-size: 16px;
}

.ycsm-card-price-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ycsm-card-price-line strong {
  color: #f04438;
  font-size: 17px;
  line-height: 1;
}

.ycsm-card-price-line span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.ycsm-card-cost {
  margin: 0;
  color: #155eef;
  font-size: 12px;
  font-weight: 700;
}

.ycsm-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
}

.ycsm-access-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border-radius: 6px;
  background: #eaf8f0;
  color: #14804a;
  font-size: 12px;
  font-weight: 800;
}

.ycsm-card-partner .ycsm-access-pill {
  background: #fff2e5;
  color: #c2410c;
}

.ycsm-card-meta em {
  color: #667085;
  font-style: normal;
  font-size: 12px;
}

.ycsm-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 2px;
  border: 0;
  border-radius: 7px;
  background: #12b76a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.ycsm-card-partner .ycsm-card-action {
  background: #071126;
}

.ycsm-card-action:hover,
.ycsm-card-action:focus-visible {
  filter: brightness(0.95);
  outline: none;
}

.ycsm-empty {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--ycsm-line);
  border-radius: 8px;
  background: var(--ycsm-surface);
  color: var(--ycsm-muted);
}

@media (max-width: 1180px) {
  .ycsm-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ycsm-account-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ycsm-account-panel,
  .ycsm-toolbar {
    grid-template-columns: 1fr;
  }

  .ycsm-catalog-summary {
    grid-template-columns: 1fr;
  }

  .ycsm-filter {
    justify-content: flex-start;
  }

  .ycsm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ycsm-account-panel {
    padding: 22px 18px;
  }

  .ycsm-account-main h1 {
    font-size: 30px;
  }

  .ycsm-account-metrics,
  .ycsm-grid {
    grid-template-columns: 1fr;
  }

  .ycsm-filter {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .ycsm-filter button {
    flex: 0 0 auto;
  }

  .ycsm-advisor-modal {
    padding: 14px;
  }

  .ycsm-advisor-contact {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .ycsm-dialog-consult {
    grid-column: 1 / -1;
    width: 100%;
  }
}
