.scene-topic-hero {
  --topic-image: url("scenes/scene-01.jpg");
  position: relative;
  min-height: 430px;
  color: #ffffff;
  background-color: #65101b;
  background-image: var(--topic-image);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.scene-topic-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-topic-hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 15, 16, 0.78) 0%, rgba(58, 26, 30, 0.48) 48%, rgba(23, 20, 21, 0.18) 100%);
}

.scene-topic-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: 58px 0 66px;
}

.scene-topic-hero .breadcrumb,
.scene-topic-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.76);
}

.scene-topic-hero h1 {
  max-width: 760px;
  margin: 4px 0 0;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.18;
}

.scene-topic-hero-inner > p:last-child {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.8;
}

.topic-content {
  min-height: 680px;
  padding: 0 0 84px;
  background: #f5f7f7;
}

.topic-tabs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: -30px 0 52px;
  padding: 7px;
  background: #ffffff;
  border: 1px solid #e0e5e6;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(34, 31, 31, 0.12);
}

.topic-tab {
  min-height: 52px;
  color: #5f6b70;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.topic-tab:hover {
  color: var(--green-dark);
  background: #fff5f6;
}

.topic-tab.active {
  color: #ffffff;
  background: var(--green);
}

.topic-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.market-category-tabs {
  display: inline-flex;
  gap: 4px;
  margin: -22px 0 34px;
  padding: 4px;
  background: #e9eeee;
  border: 1px solid #dce3e4;
  border-radius: 6px;
}

.market-category-tabs[hidden] {
  display: none;
}

.market-category-tab {
  min-width: 116px;
  min-height: 40px;
  padding: 0 22px;
  color: #657278;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.market-category-tab:hover {
  color: #8f2430;
}

.market-category-tab.active {
  color: #8f2430;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(41, 52, 57, 0.1);
}

.topic-section-head h2 {
  margin: 0;
  font-size: 30px;
}

.topic-section-head p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.topic-result-count {
  color: #7b878c;
  font-size: 13px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Cards mirror the three corresponding homepage modules. */
.scene-app-card,
.scene-data-card,
.scene-demand-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #dfe5e7;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(26, 46, 54, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scene-app-card:hover,
.scene-data-card:hover,
.scene-demand-card:hover {
  transform: translateY(-4px);
  border-color: #d6b1b6;
  box-shadow: 0 17px 34px rgba(55, 25, 30, 0.1);
}

.scene-app-card {
  min-height: 310px;
  padding: 22px;
}

.scene-app-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}

.scene-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: #a21f2d;
  background: #fbecee;
  border: 1px solid #f0ccd0;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 800;
}

.scene-app-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 205px;
}

.scene-app-tags span {
  padding: 4px 8px;
  color: #8f2430;
  background: #fff3f4;
  border: 1px solid #f0ccd0;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.scene-app-card h3,
.scene-data-card h3,
.scene-demand-card h3 {
  color: #172831;
  line-height: 1.52;
}

.scene-app-card h3 {
  margin: 18px 0 9px;
  font-size: 18px;
}

.scene-app-card > p {
  flex: 1;
  margin: 0;
  color: #66747b;
  font-size: 13px;
  line-height: 1.8;
}

.scene-app-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid #edf0f1;
}

.scene-app-price {
  color: #a31524;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.scene-app-price small { margin-left: 2px; color: #879196; font-size: 11px; font-weight: 500; }
.scene-app-actions { display: flex; align-items: center; gap: 7px; }
.scene-app-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.scene-app-detail { color: #8f2430; background: #fff; border: 1px solid #d9aeb4; }
.scene-app-detail:hover { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }

.scene-data-card {
  min-height: 348px;
  padding: 28px 22px 20px;
  overflow: hidden;
}

.scene-data-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #99202d, #c3202f 52%, #d6a552);
}

.scene-data-card h3 { min-height: 58px; margin: 0 0 13px; font-size: 19px; }
.scene-data-card > p { flex: 1; margin: 0 0 20px; color: #66747b; font-size: 14px; line-height: 1.8; }
.scene-data-meta { margin: 0 0 16px; padding: 12px 14px; background: #f4f6f6; border: 1px solid #e5eaeb; border-radius: 6px; }
.scene-data-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scene-data-meta > div + div { margin-top: 9px; padding-top: 9px; border-top: 1px dashed #d8dfe1; }
.scene-data-meta dt { color: #7a878d; font-size: 12px; }
.scene-data-meta dd { margin: 0; color: #263940; font-size: 12px; font-weight: 700; text-align: right; }
.scene-data-meta dd span { display: inline-flex; align-items: center; gap: 6px; color: #8f2430; }
.scene-data-meta dd span::before { content: ""; width: 6px; height: 6px; background: #c3202f; border-radius: 50%; box-shadow: 0 0 0 3px rgba(195,32,47,.1); }
.scene-data-action { width: 100%; min-height: 42px; color: #8f1d2a; background: #fff; border: 1px solid #dcaeb4; border-radius: 5px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.scene-data-action:hover { color: #fff; background: #a91927; border-color: #a91927; }

.scene-market-card {
  position: relative;
  display: flex;
  min-height: 300px;
  min-width: 0;
  flex-direction: column;
  padding: 26px 24px 22px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe5e7;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(26, 46, 54, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scene-market-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #99202d, #c3202f 58%, #d6a552);
}

.scene-market-card-resource::before {
  background: linear-gradient(90deg, #244f57, #3f777c 58%, #d6a552);
}

.scene-market-card:hover {
  transform: translateY(-4px);
  border-color: #d6b1b6;
  box-shadow: 0 17px 34px rgba(55, 25, 30, 0.1);
}

.scene-market-card h3 {
  min-height: 58px;
  margin: 0 0 14px;
  color: #172831;
  font-size: 19px;
  line-height: 1.52;
}

.scene-market-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
  margin-bottom: 15px;
}

.scene-market-tags span {
  padding: 4px 9px;
  color: #8f2430;
  background: #fff3f4;
  border: 1px solid #f0ccd0;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.2;
}

.scene-market-card-resource .scene-market-tags span {
  color: #315f65;
  background: #f0f7f7;
  border-color: #cee0e1;
}

.scene-market-card > p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0;
  overflow: hidden;
  color: #66747b;
  font-size: 14px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scene-market-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 19px;
  border-top: 1px solid #edf0f1;
}

.scene-market-price {
  color: #a31524;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.scene-market-resource-label {
  color: #65767b;
  font-size: 12px;
  font-weight: 700;
}

.scene-market-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 38px;
  padding: 0 16px;
  color: #8f1d2a;
  background: #ffffff;
  border: 1px solid #dcaeb4;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.scene-market-action:hover {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.scene-demand-card {
  min-height: 300px;
  padding: 22px;
}
.scene-demand-head { display: flex; justify-content: flex-start; min-height: 28px; }
.scene-demand-tag { padding: 5px 11px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.scene-demand-tag.type-data { color: #8f2430; background: #fff0f2; }
.scene-demand-tag.type-software { color: #2e5f9b; background: #edf5ff; }
.scene-demand-tag.type-consulting { color: #7a5719; background: #fff7e5; }
.scene-demand-tag.type-other { color: #536169; background: #f0f3f4; }
.scene-demand-card h3 { margin: 16px 0 9px; font-size: 18px; }
.scene-demand-card > p { flex: 1; margin: 0; color: #66747b; font-size: 13px; line-height: 1.8; }
.scene-demand-owner { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; color: #5f6d72; border-top: 1px solid #edf0f1; font-size: 12px; }
.scene-owner-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 auto; color: #fff; background: #98202d; border-radius: 50%; font-weight: 800; }

.topic-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e0e5e6;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(26, 50, 56, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.topic-card-app {
  border-top: 3px solid #ae2634;
}

.topic-card-product {
  border-top: 3px solid #2f6f89;
  background: linear-gradient(180deg, #f7fbfc 0%, #ffffff 34%);
}

.topic-card-demand {
  border-left: 4px solid #c58a2b;
}

.topic-card:hover {
  transform: translateY(-3px);
  border-color: #d3a8ad;
  box-shadow: 0 15px 30px rgba(55, 25, 30, 0.09);
}

.topic-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
}

.topic-card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #a21f2d;
  background: #fbecee;
  border-radius: 5px;
  font-weight: 800;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.topic-tag {
  padding: 4px 8px;
  color: #8f2430;
  background: #fff3f4;
  border: 1px solid #f0ccd0;
  border-radius: 4px;
  font-size: 11px;
}

.topic-card h3 {
  margin: 20px 0 9px;
  font-size: 19px;
  line-height: 1.45;
}

.topic-card > p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.topic-card > p strong {
  display: block;
  margin-bottom: 4px;
  color: #344b53;
  font-size: 12px;
}

.topic-card-code {
  display: block;
  margin-top: 13px;
  color: #8a969a;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.topic-card-head .topic-card-code {
  margin-top: 7px;
}

.topic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #edf0f1;
}

.topic-price {
  color: #a31524;
  font-size: 19px;
  font-weight: 800;
}

.topic-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.topic-actions {
  display: flex;
  gap: 7px;
}

.topic-action.secondary {
  color: var(--green-dark);
  background: #ffffff;
}

.topic-action:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.topic-action.secondary:hover {
  color: #ffffff;
}

.topic-product-meta {
  margin: 18px 0 0;
  padding: 12px 0;
  border-top: 1px solid #e3eaec;
  border-bottom: 1px solid #e3eaec;
}

.topic-product-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topic-product-meta > div + div { margin-top: 7px; }
.topic-product-meta dt { color: #718087; font-size: 11px; }
.topic-product-meta dd { margin: 0; color: #31474f; font-size: 12px; font-weight: 700; }

.topic-card-product .topic-card-footer {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

.topic-card-demand .topic-card-head { min-height: 32px; }
.topic-card-demand .topic-card-code { margin-top: 6px; }

.product-type,
.demand-type {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.product-type {
  color: #2e5f9b;
  background: #edf5ff;
}

.demand-type {
  color: #8f2430;
  background: #fff0f2;
}

.demand-owner {
  color: #647176;
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 38px;
}

.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  color: #59676d;
  background: #ffffff;
  border: 1px solid #dce3e5;
  border-radius: 4px;
  cursor: pointer;
}

.page-button:hover:not(:disabled),
.page-button.active {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1020px) {
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .scene-topic-hero,
  .scene-topic-hero-inner {
    min-height: 360px;
  }

  .scene-topic-hero h1 {
    font-size: 36px;
  }

  .topic-tabs {
    margin-bottom: 40px;
  }

  .topic-tab {
    min-height: 48px;
    padding: 0 8px;
    font-size: 13px;
  }

  .topic-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-category-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    margin-top: -14px;
  }

  .market-category-tabs[hidden] { display: none; }

  .market-category-tab {
    min-width: 0;
    padding: 0 12px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .scene-app-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
