.jjj-qn-root {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #e6f7fd;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: rgba(0, 0, 0, 0.85);
}

.jjj-qn-root.hidden {
  display: none;
}

/* Header (matches platform style) */
.jjj-qn-header {
  padding-top: 28px;
  height: 208px;
  background: url(/img/header-bg.c6859eab.png);
  background-size: cover;
  position: relative;
  flex-shrink: 0;
}

.jjj-qn-header .title {
  position: absolute;
  display: flex;
  align-items: center;
  top: 23px;
  left: 20px;
  font-weight: 700;
  color: #fff;
  font-size: 24px;
}

.jjj-qn-header .title img {
  margin-right: 8px;
  width: 48px;
}

.jjj-qn-header .function-group {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 18px;
}

.jjj-qn-header .lang-btn {
  height: 32px;
  line-height: 32px;
  padding: 0 16px;
  border-radius: 16px;
  background: hsla(0, 0%, 100%, 0.25);
  margin-right: 32px;
  cursor: pointer;
}

.jjj-qn-header .button-group {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 55px;
  padding: 0 320px;
  box-sizing: border-box;
}

.jjj-qn-header .button-item {
  color: hsla(0, 0%, 100%, 0.85);
  font-size: 18px;
  cursor: pointer;
  padding-bottom: 5px;
  white-space: nowrap;
}

.jjj-qn-header .button-item.active {
  font-weight: 700;
  color: #fff;
  border-bottom: 4px solid #23c1fa;
}

/* Main content */
.jjj-qn-main {
  max-width: 1383px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

/* Health risk warning dashboard */
.jjj-risk-warning-dashboard {
  position: relative;
  margin-bottom: 24px;
}

.jjj-risk-notice {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 16px;
  background: #dff6fc;
  border: 1px solid #c9edf6;
  border-radius: 8px;
  color: #334258;
  font-size: 13px;
}

.jjj-risk-notice span {
  width: 18px;
  height: 18px;
  border: 2px solid #27bddc;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.jjj-risk-notice span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  border-left: 7px solid #27bddc;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.jjj-risk-notice p {
  margin: 0;
  line-height: 1.5;
}

.jjj-risk-alert-layout {
  display: grid;
  grid-template-columns: 230px minmax(610px, 1fr) 330px;
  gap: 12px;
  align-items: stretch;
  min-height: 650px;
}

.jjj-risk-side {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  min-width: 0;
}

.jjj-risk-panel {
  background: #fff;
  border: 1px solid #d7edf5;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(18, 93, 134, 0.14);
  overflow: hidden;
  min-width: 0;
}

.jjj-risk-panel-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #d7edf5;
  color: #23334d;
  font-size: 14px;
  font-weight: 800;
}

.jjj-risk-panel-head small {
  color: #19acc9;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.jjj-risk-panel-body {
  padding: 10px 12px;
}

.jjj-risk-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.jjj-risk-choice {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid #d4edf5;
  border-radius: 6px;
  background: #fbfeff;
  color: #435168;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
}

.jjj-risk-choice input {
  accent-color: #20bfd9;
  flex: 0 0 auto;
}

.jjj-risk-choice:has(input:checked) {
  border-color: #25c7de;
  background: #eafdff;
  color: #087a9b;
  font-weight: 800;
}

.jjj-risk-factor-title {
  margin: 10px 0 6px;
  color: #657386;
  font-size: 12px;
  font-weight: 800;
}

.jjj-risk-districts {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.jjj-risk-district {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  background: #f4fbfe;
  color: #334258;
  font-size: 13px;
  cursor: pointer;
}

.jjj-risk-district.active {
  background: linear-gradient(90deg, #18aee0, #0a87da);
  color: #fff;
  font-weight: 800;
}

.jjj-risk-badge {
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 2px 7px;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.jjj-risk-badge.low {
  background: #52c41a;
}

.jjj-risk-badge.medium {
  background: #1890ff;
}

.jjj-risk-badge.high {
  background: #faad14;
  color: #5f4d00;
}

.jjj-risk-center {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.jjj-risk-summary {
  display: grid;
  grid-template-columns: 1.1fr 0.72fr 0.9fr 0.74fr;
  gap: 10px;
}

.jjj-risk-summary-card {
  min-height: 74px;
  min-width: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 93, 134, 0.14);
  padding: 10px 12px;
  overflow: hidden;
}

.jjj-risk-summary-card.primary {
  color: #fff;
  background: linear-gradient(128deg, #258bf2, #2361e5);
  position: relative;
}

.jjj-risk-summary-card.primary::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -14px;
  width: 84px;
  height: 54px;
  border-radius: 50%;
  border: 14px solid rgba(255, 255, 255, 0.15);
}

.jjj-risk-summary-card .label {
  margin-bottom: 6px;
  color: #657386;
  font-size: 12px;
}

.jjj-risk-summary-card.primary .label,
.jjj-risk-summary-card.primary .note {
  color: rgba(255, 255, 255, 0.86);
}

.jjj-risk-summary-card .value {
  color: #1c3048;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.jjj-risk-summary-card.primary .value {
  color: #fff;
  font-size: 17px;
}

.jjj-risk-summary-card .note {
  margin-top: 5px;
  color: #657386;
  font-size: 12px;
  line-height: 1.4;
}

.jjj-risk-map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-height: 0;
}

.jjj-risk-map-card {
  display: grid;
  grid-template-rows: 34px minmax(224px, 1fr) 42px;
  min-height: 300px;
}

.jjj-risk-map-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #d7edf5;
  color: #23334d;
  font-size: 14px;
  font-weight: 900;
}

.jjj-risk-map-head > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjj-risk-tabs {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.jjj-risk-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7eef5;
  border-radius: 13px;
  padding: 0 9px;
  background: #fff;
  color: #536178;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.jjj-risk-pill.active {
  border-color: #20bdd8;
  background: #20bdd8;
  color: #fff;
}

.jjj-risk-map-wrap {
  position: relative;
  min-height: 0;
  margin: 6px 8px 5px;
  border-radius: 8px;
  background: #f7fdff;
  overflow: hidden;
}

.jjj-risk-map-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.jjj-risk-map-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(247, 253, 255, 0.9);
  color: #657386;
  font-size: 13px;
  text-align: center;
}

.jjj-risk-map-state.hidden {
  display: none;
}

.jjj-risk-map-state.error {
  color: #cf1322;
}

.jjj-risk-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 10px 8px;
}

.jjj-risk-metric {
  height: 32px;
  border-radius: 7px;
  background: #f4fbfe;
  color: #657386;
  font-size: 11px;
  text-align: center;
  padding-top: 4px;
}

.jjj-risk-metric strong {
  display: block;
  color: #1c3048;
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjj-risk-right {
  min-width: 0;
}

.jjj-risk-report {
  height: 100%;
  display: grid;
  grid-template-rows: 34px 1fr;
}

.jjj-risk-report-content {
  padding: 13px;
  color: #334258;
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
}

.jjj-risk-report-content h3 {
  margin: 0 0 8px;
  color: #1c81be;
  font-size: 15px;
  line-height: 1.35;
}

.jjj-risk-report-content p {
  margin: 0 0 10px;
}

.jjj-risk-bars {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 48px;
  margin: 8px 0 12px;
}

.jjj-risk-bars span {
  flex: 1;
  border-radius: 4px 4px 0 0;
}

.jjj-risk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.jjj-risk-actions button {
  height: 26px;
  border: 0;
  border-radius: 14px;
  padding: 0 12px;
  background: linear-gradient(90deg, #1db7d8, #168fe6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.jjj-risk-actions button.secondary {
  background: #e7f9fc;
  color: #1684a3;
}

.jjj-risk-helper {
  position: fixed;
  right: 38px;
  bottom: 42px;
  z-index: 9020;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.jjj-risk-helper-speech {
  width: 238px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #fff;
  color: #2c3b50;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 8px 24px rgba(37, 76, 115, 0.16);
  position: relative;
}

.jjj-risk-helper-speech::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  margin-top: -7px;
  border-left: 8px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.jjj-risk-helper-btn {
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 10px 22px rgba(0, 126, 197, 0.24));
}

.jjj-risk-helper-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jjj-risk-helper-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: 270px;
  display: none;
  border: 1px solid #d7edf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 76, 115, 0.18);
  padding: 14px;
}

.jjj-risk-helper.open .jjj-risk-helper-panel {
  display: block;
}

.jjj-risk-helper-panel h4 {
  margin: 0 0 8px;
  color: #1684a3;
  font-size: 15px;
}

.jjj-risk-helper-panel p {
  margin: 0 0 12px;
  color: #536178;
  font-size: 13px;
  line-height: 1.5;
}

.jjj-risk-helper-input {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: #f4fbfe;
  color: #9aa8b9;
  font-size: 12px;
}

/* Landing banner (Figure 1 style) */
.jjj-qn-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.jjj-qn-banner-card {
  background: linear-gradient(135deg, #4a9cf5 0%, #2563eb 55%, #1d4ed8 100%);
  border-radius: 12px;
  padding: 36px 40px;
  min-height: 220px;
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.jjj-qn-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}

.jjj-qn-banner-card h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: 1px;
}

.jjj-qn-banner-card p {
  font-size: 15px;
  opacity: 0.92;
  line-height: 1.8;
  margin: 0 0 24px;
  max-width: 420px;
}

.jjj-qn-banner-btn {
  display: inline-block;
  background: #ff893b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.jjj-qn-banner-icon {
  position: absolute;
  right: 24px;
  bottom: 16px;
  width: 120px;
  height: 120px;
  opacity: 0.9;
}

.jjj-qn-info-panel {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.jjj-qn-info-panel h3 {
  font-size: 20px;
  color: #1890ff;
  margin: 0 0 12px;
}

.jjj-qn-info-panel p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.65);
  margin: 0;
}

/* Form page (Figure 2 style) */
.jjj-qn-form-page {
  background: #eef6fc;
  min-height: calc(100vh - 208px);
  padding-bottom: 40px;
}

.jjj-qn-form-header {
  text-align: center;
  background: #fff;
  border: 2px solid #91d5ff;
  border-radius: 12px;
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.08);
}

.jjj-qn-form-header h1 {
  font-size: 28px;
  color: #1890ff;
  margin: 0 0 8px;
  font-weight: 700;
}

.jjj-qn-form-header p {
  color: rgba(0, 0, 0, 0.55);
  margin: 0;
  font-size: 14px;
}

.jjj-qn-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.jjj-qn-form-grid .full-width {
  grid-column: 1 / -1;
}

.jjj-qn-card {
  background: #fff;
  border: 1px solid #bae7ff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.06);
}

.jjj-qn-card h3 {
  text-align: center;
  color: #1890ff;
  font-size: 17px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6f7ff;
}

.jjj-qn-field {
  margin-bottom: 14px;
}

.jjj-qn-field label {
  display: block;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.75);
  margin-bottom: 6px;
  font-weight: 500;
}

.jjj-qn-field label .req {
  color: #ff4d4f;
  margin-left: 2px;
}

.jjj-qn-field label .req-tag {
  color: #fa8c16;
  font-size: 12px;
  margin-left: 6px;
  font-weight: 500;
}

.jjj-qn-field-hint {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  margin: -2px 0 8px;
  line-height: 1.5;
}

.jjj-qn-field input[type="text"],
.jjj-qn-field input[type="number"],
.jjj-qn-field input[type="tel"],
.jjj-qn-field input[type="date"],
.jjj-qn-field select,
.jjj-qn-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.jjj-qn-field input:focus,
.jjj-qn-field select:focus,
.jjj-qn-field textarea:focus {
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.jjj-qn-field textarea {
  min-height: 72px;
  resize: vertical;
}

.jjj-qn-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.jjj-qn-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

.jjj-qn-options input {
  accent-color: #1890ff;
}

.jjj-qn-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.jjj-qn-subsection {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #e8e8e8;
}

.jjj-qn-subsection h4 {
  font-size: 14px;
  color: #1890ff;
  margin: 0 0 10px;
}

.jjj-qn-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.jjj-qn-btn {
  padding: 12px 36px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.jjj-qn-btn-primary {
  background: linear-gradient(135deg, #23c1fa, #1890ff);
  color: #fff;
}

.jjj-qn-btn-secondary {
  background: #fff;
  color: rgba(0, 0, 0, 0.65);
  border: 1px solid #d9d9d9;
}

.jjj-qn-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.jjj-qn-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.jjj-qn-toast.success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

.jjj-qn-toast.error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
}

.jjj-qn-options.vertical {
  flex-direction: column;
  gap: 10px;
}

.jjj-qn-options.vertical label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
  font-size: 13px;
}

.jjj-qn-options.vertical input {
  margin-top: 4px;
  flex-shrink: 0;
}

.jjj-qn-applicable {
  font-size: 12px;
  color: #1890ff;
  background: #e6f7ff;
  border-left: 3px solid #1890ff;
  padding: 6px 10px;
  margin: 12px 0 8px;
  border-radius: 0 4px 4px 0;
}

.jjj-qn-applicable:first-of-type {
  margin-top: 0;
}

.jjj-qn-conditional {
  display: none;
}

.jjj-qn-conditional.visible {
  display: block;
}

@media (max-width: 1280px) {
  .jjj-risk-alert-layout {
    grid-template-columns: 220px minmax(560px, 1fr) 300px;
  }

  .jjj-risk-summary {
    grid-template-columns: 1fr 0.7fr 0.82fr 0.7fr;
  }

  .jjj-risk-summary-card .value {
    font-size: 16px;
  }
}

@media (max-width: 960px) {
  .jjj-risk-alert-layout,
  .jjj-risk-summary,
  .jjj-risk-map-grid {
    grid-template-columns: 1fr;
  }

  .jjj-risk-alert-layout {
    min-height: 0;
  }

  .jjj-risk-side,
  .jjj-risk-center {
    display: grid;
  }

  .jjj-risk-map-grid {
    grid-template-rows: none;
  }

  .jjj-risk-map-card {
    min-height: 320px;
  }

  .jjj-risk-helper {
    right: 18px;
    bottom: 24px;
  }

  .jjj-risk-helper-speech {
    display: none;
  }

  .jjj-risk-helper-btn {
    width: 58px;
    height: 58px;
  }

  .jjj-qn-banner,
  .jjj-qn-form-grid,
  .jjj-qn-row-2 {
    grid-template-columns: 1fr;
  }

  .jjj-qn-header .button-group {
    gap: 20px;
    padding: 0 16px;
  }

  .jjj-qn-header .title {
    font-size: 16px;
  }
}
