* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #4f7df0 0%, #dfe7fb 60%, #eef2fb 100%);
  color: #222;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

.page-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 18px 12px 24px;
}

.hero {
  padding: 26px 0 12px;
  text-align: center;
}

.hero-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.main-card,
.detail-card,
.advisor-card,
.summary-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(48, 83, 160, 0.10);
}

.main-card {
  padding: 16px 14px 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.tabs {
  flex: 1;
  display: flex;
  border: 1px solid #d7d7d7;
  border-radius: 14px;
  background: #fff;
  padding: 4px;
  min-width: 0;
}

.tab-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: #b9b9b9;
  font-size: 15px;
  line-height: 1;
  padding: 12px 4px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn.active {
  background: #4f7df0;
  color: #fff;
}

.share-btn {
  border: 0;
  background: #4f7df0;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 13px 18px;
  border-radius: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.list-head {
  display: grid;
  grid-template-columns: 2.7fr 1fr 1fr 0.72fr 1.08fr 0.62fr;
  column-gap: 0;
  align-items: end;
  color: #4f7df0;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0 8px;
}

.list-head > div {
  white-space: nowrap;
}

.head-name {
  padding-right: 8px;
}

.head-ko,
.head-strike,
.head-tenor,
.head-coupon {
  text-align: left;
}

.head-detail {
  text-align: right;
}

.product-list {
  width: 100%;
}

.product-row {
  display: grid;
  grid-template-columns: 2.7fr 1fr 1fr 0.72fr 1.08fr 0.62fr;
  column-gap: 0;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px dashed #c8d9ff;
}

.name-cell {
  font-size: 11px;
  line-height: 1.42;
  word-break: break-word;
  white-space: normal;
  padding-right: 8px;
}

.value-cell {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
}

.detail-cell {
  text-align: right;
}

.detail-link {
  color: #5a84f4;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.disclaimer {
  color: #9a9a9a;
  font-size: 11px;
  line-height: 1.52;
  padding-top: 12px;
}

.advisor-card {
  margin-top: 16px;
  padding: 18px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.advisor-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.avatar-placeholder {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #efefef;
  color: #7c7c7c;
  font-size: 10px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

.advisor-name {
  font-size: 19px;
  color: #222;
  line-height: 1.2;
  word-break: break-word;
}

.advisor-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.qr-box {
  width: 88px;
  height: 88px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: default;
}

.qr-text {
  margin-top: 6px;
  font-size: 10px;
  color: #6b6b6b;
  text-align: center;
  line-height: 1.35;
}

/* detail page - 保留你现有可用布局 */
.detail-page {
  padding-top: 10px;
}

.detail-hero {
  text-align: left;
  padding-top: 10px;
  padding-bottom: 12px;
}

.detail-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.back-link {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}

.detail-top-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.detail-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  margin-bottom: 8px;
}

.detail-main-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
}

.detail-share-btn {
  margin-bottom: 12px;
}

.summary-card {
  padding: 16px 14px 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.summary-item {
  min-width: 0;
}

.summary-value {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  line-height: 1.2;
}

.summary-red {
  color: #ff4d4f;
}

.summary-label {
  margin-top: 5px;
  font-size: 11px;
  color: #9a9a9a;
  line-height: 1.35;
}

.quote-time {
  margin-top: 12px;
  text-align: right;
  font-size: 11px;
  color: #9a9a9a;
}

.detail-card {
  padding: 16px 14px;
  margin-top: 10px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 20px;
  color: #222;
}

.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  row-gap: 10px;
  column-gap: 10px;
}

.detail-label {
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.45;
}

.detail-value {
  color: #222;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.detail-note {
  margin-top: 16px;
  color: #9a9a9a;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 390px) {
  .page-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .main-card,
  .detail-card,
  .advisor-card,
  .summary-card {
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .main-card {
    padding: 15px 12px 13px;
  }

  .tabs {
    padding: 3px;
  }

  .tab-btn {
    font-size: 14px;
    padding: 11px 2px;
  }

  .share-btn {
    font-size: 13px;
    padding: 12px 16px;
  }

  .list-head {
    grid-template-columns: 2.95fr 0.98fr 0.98fr 0.7fr 1fr 0.64fr;
    font-size: 11px;
  }

  .product-row {
    grid-template-columns: 2.95fr 0.98fr 0.98fr 0.7fr 1fr 0.64fr;
  }

  .name-cell {
    font-size: 10.5px;
    padding-right: 6px;
  }

  .value-cell,
  .detail-link {
    font-size: 10.5px;
  }

  .advisor-name {
    font-size: 17px;
  }

  .qr-box {
    width: 82px;
    height: 82px;
  }

  .detail-main-title {
    font-size: 24px;
  }

  .detail-grid {
    grid-template-columns: 96px 1fr;
  }

  .summary-value {
    font-size: 17px;
  }
}
