.risk-card-body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(17, 61, 113, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #eef6fd 0%, #dcecf8 52%, #eef6fd 100%);
  background-size: 44px 44px, auto;
  color: #12263f;
}

.risk-card-header {
  width: 100%;
  margin-inline: 0;
  padding: 0 max(28px, calc((100vw - 1860px) / 2 + 20px));
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(98, 136, 170, 0.16);
  box-shadow: 0 12px 34px rgba(41, 82, 122, 0.08);
}

.risk-card-shell {
  width: min(1860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.risk-card-layout {
  display: grid;
  grid-template-columns: 540px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.risk-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.94));
  border: 1px solid rgba(106, 143, 178, 0.18);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(54, 91, 125, 0.12);
}

.risk-panel-form {
  padding: 24px 22px 28px;
}

.risk-panel-preview {
  padding: 24px;
  position: sticky;
  top: 18px;
}

.risk-panel-head,
.section-title-row,
.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.risk-panel-head h1,
.preview-head h2,
.section-title-row h2 {
  margin: 0;
  color: #113d71;
  font-size: 28px;
  font-weight: 900;
}

.risk-panel-head p,
.preview-head p,
.section-title-row p {
  margin: 8px 0 0;
  color: #6f8195;
  font-size: 14px;
  line-height: 1.6;
}

.risk-form-intro {
  color: #d60000 !important;
  font-weight: 900;
}

.risk-panel-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  white-space: nowrap;
}

.risk-entitlement-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 61, 113, 0.1);
  border-left: 5px solid #e4002b;
  border-radius: 16px;
  background: linear-gradient(90deg, #ffffff 0%, #f5faff 100%);
  color: #284b6f;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.risk-entitlement-buy {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: #e4002b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(228, 0, 43, 0.18);
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 108px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-btn {
  border: 0;
  background: linear-gradient(135deg, #0e7fce, #1d9fe4);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 117, 189, 0.2);
}

.ghost-btn {
  border: 1px solid #cddbeb;
  background: #fff;
  color: #2e4f73;
}

.risk-quick-row,
.risk-form-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.risk-quick-row {
  grid-template-columns: 1.2fr 1fr;
}

.risk-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  color: #284b6f;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d6e2ef;
  border-radius: 16px;
  background: #fbfdff;
  color: #12263f;
  font: inherit;
  resize: vertical;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: #3e97d8;
  box-shadow: 0 0 0 4px rgba(62, 151, 216, 0.12);
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.sign-picker {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e1eaf2;
  background: linear-gradient(180deg, rgba(240, 247, 253, 0.58), rgba(255, 255, 255, 0));
  border-radius: 20px;
}

.sign-keyword-hint {
  color: #6f8195;
  font-size: 12px;
  font-weight: 700;
  max-width: 340px;
  line-height: 1.6;
  text-align: right;
}

.sign-category-group {
  margin-top: 0;
  padding: 14px;
  border: 1px solid #d7e4ef;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 253, 0.92));
  box-shadow: 0 14px 34px rgba(17, 61, 113, 0.08);
}

.sign-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sign-category-title {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-left: 4px solid #e4002b;
  color: #113d71;
  background: #f4f9fe;
  font-size: 13px;
  font-weight: 900;
}

.sign-category-meta {
  color: #6f8195;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sign-candidate-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.sign-candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.sign-candidate-grid--stacked {
  grid-template-columns: 1fr;
}

.sign-category-empty {
  min-height: 128px;
  display: grid;
  place-items: center;
  border: 1px dashed #c7d8ea;
  border-radius: 16px;
  color: #7b8da1;
  font-size: 13px;
  font-weight: 700;
  background: rgba(246, 250, 254, 0.9);
}

.sign-candidate {
  appearance: none;
  border: 1px solid #d7e4ef;
  border-radius: 18px;
  background: #fff;
  padding: 9px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sign-candidate.active {
  border-color: #117ccc;
  box-shadow: 0 0 0 4px rgba(17, 124, 204, 0.12);
}

.sign-candidate img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.sign-candidate-title {
  margin-top: 8px;
  color: #264567;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.sign-candidate-category {
  margin-top: 4px;
  color: #6f8195;
  font-size: 11px;
}

.risk-card-preview {
  padding: 16px;
  background: linear-gradient(180deg, #d7e5f2, #cfe0ee);
  border-radius: 18px;
  overflow: auto;
  min-height: 760px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.risk-card-canvas {
  width: 1460px;
  max-width: none;
  padding: 28px 22px 26px;
  background: #d7e5f2;
  transform-origin: top center;
  will-change: transform;
}

.risk-card-disclaimer {
  width: 1340px;
  margin: 14px auto 0;
  padding: 10px 14px;
  border-left: 5px solid #e4002b;
  background: rgba(255, 255, 255, 0.82);
  color: #5f7084;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.risk-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(7, 27, 50, 0.42);
  backdrop-filter: blur(5px);
}

.risk-loading-overlay[hidden] {
  display: none;
}

.risk-loading-card {
  width: min(420px, calc(100% - 40px));
  padding: 26px 28px;
  border-radius: 22px;
  background: #fff;
  border-top: 6px solid #e4002b;
  box-shadow: 0 24px 70px rgba(7, 27, 50, 0.28);
  text-align: center;
}

.risk-loading-card strong {
  display: block;
  color: #113d71;
  font-size: 22px;
  font-weight: 900;
}

.risk-loading-card span {
  display: block;
  margin-top: 10px;
  color: #607286;
  font-size: 15px;
  line-height: 1.7;
}

.risk-card-title-box {
  width: 100%;
  margin: 0 auto 22px;
  background: #eef3f8;
  padding: 24px 40px 28px;
}

.risk-card-title {
  text-align: center;
  color: #c90000;
  font-size: 52px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 1px;
  word-break: break-word;
}

.risk-card-table {
  width: 1340px;
  margin: 0 auto;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 2px solid #111;
}

.risk-card-table th,
.risk-card-table td {
  border: 1px solid #111;
  padding: 14px 18px;
  color: #111;
  font-size: 15px;
  line-height: 1.5;
  vertical-align: middle;
  word-break: break-word;
}

.label-yellow,
.label-red,
.label-blue {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.label-yellow {
  background: #fff200;
}

.label-red {
  background: #ff1212;
  color: #fff;
}

.label-blue {
  background: #5d97ce;
  color: #fff;
}

.value-center {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}

.value-text {
  font-size: 16px;
  font-weight: 800;
}

.value-list {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.value-list ol {
  margin: 0;
  padding-left: 28px;
}

.value-list li + li {
  margin-top: 8px;
}

.sign-area {
  text-align: center;
  height: 210px;
  vertical-align: top;
}

.sign-area-title {
  width: 100%;
  margin: 0 auto 16px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #111;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
}

.sign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  justify-content: center;
  align-items: start;
  gap: 14px 18px;
  padding: 4px 12px 0;
}

.sign-grid-item {
  width: 100%;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sign-grid-item img {
  max-width: 86px;
  max-height: 86px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.multi-line {
  white-space: pre-line;
}

.value-top {
  vertical-align: top !important;
  padding-top: 18px !important;
}

.preview-head p {
  max-width: 560px;
}

@media (max-width: 1400px) {
  .risk-card-layout {
    grid-template-columns: 1fr;
  }

  .risk-panel-preview {
    position: static;
  }
}

@media (max-width: 960px) {
  .risk-card-shell {
    width: min(100% - 16px, 100%);
    padding: 10px 0 22px;
  }

  .risk-panel-form,
  .risk-panel-preview {
    padding: 16px;
  }

  .risk-panel-head,
  .section-title-row,
  .preview-head {
    flex-direction: column;
  }

  .risk-panel-actions {
    width: 100%;
  }

  .risk-entitlement-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .risk-quick-row,
  .risk-form-grid,
  .sign-candidate-grid,
  .sign-candidate-list {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .risk-card-title {
    font-size: 32px;
  }

  .risk-card-table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
  }

  .risk-card-preview {
    min-height: auto;
    overflow: auto;
    display: block;
  }

  .risk-card-canvas {
    width: 100%;
    transform: none !important;
  }

  .risk-card-disclaimer {
    width: 100%;
  }

  .risk-card-table th,
  .risk-card-table td {
    min-width: 180px;
    padding: 12px;
  }

  .label-yellow,
  .label-red,
  .label-blue {
    font-size: 22px;
    padding: 14px;
  }

  .value-center {
    font-size: 24px;
  }

  .value-text,
  .value-list {
    font-size: 18px;
  }

  .sign-grid-item {
    width: 96px;
  }

  .sign-grid-item img {
    width: 74px;
    height: 74px;
  }
}
