.market-hub {
  padding: 24px;
  border: 0;
}

.market-hub-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.market-hub-header h2,
.market-hub-section h3 {
  margin: 0;
  color: #252a32;
  font-size: 18px;
  font-weight: 500;
}

.market-rules {
  padding: 0;
  border: 0;
  background: none;
  color: #65758b;
  cursor: pointer;
  font: inherit;
}

.market-hub-section + .market-hub-section {
  margin-top: 20px;
}

.market-hub-section h3 {
  margin-bottom: 12px;
}

.market-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
  gap: 20px 15px;
  max-width: 1010px;
}

.market-tile {
  display: flex;
  min-width: 0;
  min-height: 60px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: #f6f6f6;
  color: #272c35;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.market-tile:hover,
.market-tile:focus-visible {
  background: #ededed;
  color: #272c35;
}

.market-tile:focus-visible,
.market-rules:focus-visible {
  outline: 2px solid #178a50;
  outline-offset: 2px;
}

.market-tile-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 4px;
  background: #2fcf75;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.market-icon-wechat { background: #13c879; }
.market-icon-meituan { background: #ffd000; color: #171717; }
.market-icon-douyin { background: #101010; }
.market-icon-alipay, .market-icon-wecom { background: #1677ff; }

.market-tile-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.market-tile-text strong {
  font-size: 14px;
  font-weight: 700;
}

.market-tile-text > span {
  overflow: hidden;
  color: #778190;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-tile-badge {
  margin-inline-start: 6px;
  padding: 1px 3px;
  border-radius: 2px;
  background: #ec491e;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
}

.market-hub-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: 6px;
  color: #252a32;
  box-shadow: 0 14px 50px #1c293226;
}

.market-hub-dialog::backdrop { background: #11182766; }
.market-hub-dialog h2 { margin: 0 0 16px; font-size: 18px; }
.market-hub-dialog p { margin: 0 0 10px; line-height: 1.5; }
.market-hub-dialog form { display: flex; justify-content: flex-end; margin-top: 20px; }
.market-hub-dialog h3 { margin: 0; font-size: 14px; }
.market-rule-subjects { margin: 10px 0 0; padding: 0; list-style: none; }
.market-rule-subjects li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.market-rule-subjects small { display: block; margin-top: 3px; color: var(--muted); }

.market-hub-dialog .market-rule-config { display: grid; gap: 10px; margin: 0 0 16px; }
.market-rule-config .market-rule-subjects { margin: 0; }
.market-rule-config p { margin: 0; }
.market-rule-config .form-error:empty { display: none; }
.market-rule-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 560px) {
  .market-hub { padding: 14px; }
  .market-tile-grid { gap: 10px; }
}
