.km-ds-wrap{
  --km-primary:#0e7eab;
  --km-primary-2:#087da9;
  --km-text:#0f172a;
  --km-muted:#475569;
  --km-border:rgba(15,23,42,.10);
  --km-shadow:0 12px 32px rgba(2,6,23,.10);
  --km-radius:18px;

  font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  color:var(--km-text);
}

.km-ds-card{
  max-width: 920px;
  margin: 18px auto;
  background:#fff;
  border:1px solid var(--km-border);
  border-radius: calc(var(--km-radius) + 4px);
  box-shadow: var(--km-shadow);
  overflow:hidden;
}

.km-ds-head{
  padding: 20px 18px 12px;
  background:
    radial-gradient(520px 240px at 18% 10%, rgba(14,126,171,.12), transparent 60%),
    radial-gradient(520px 240px at 82% 0%, rgba(8,125,169,.10), transparent 60%),
    linear-gradient(180deg,#ffffff 0%, #f6fbff 100%);
  border-bottom:1px solid rgba(15,23,42,.06);
}

.km-ds-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14,126,171,.10);
  border:1px solid rgba(14,126,171,.20);
  font-weight: 900;
  color: var(--km-primary);
  margin-bottom: 10px;
}

.km-ds-title{ margin:0 0 8px; font-size: 22px; letter-spacing:-.2px; }
.km-ds-sub{ margin:0; color:var(--km-muted); line-height:1.5; font-size:14.5px; }

.km-ds-body{ padding: 16px 18px 18px; }

.km-ds-barWrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  background: rgba(2,6,23,.02);
  margin-bottom: 12px;
}

.km-ds-bar{
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.10);
  overflow:hidden;
}
.km-ds-barFill{
  display:block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--km-primary), var(--km-primary-2));
  transition: width .25s ease;
}
.km-ds-barText{
  display:flex;
  align-items:center;
  gap: 8px;
  color:#334155;
  font-weight: 900;
  font-size: 13px;
}
.km-ds-barText b{ color:#0f172a; }

.km-ds-reading{
  border: 1px solid rgba(14,126,171,.14);
  background: linear-gradient(180deg, rgba(14,126,171,.06) 0%, rgba(255,255,255,1) 85%);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
  margin-bottom: 12px;
}

.km-ds-sceneTitle{
  font-weight: 900;
  font-size: 19px;
  margin-bottom: 6px;
  letter-spacing:-.2px;
}
.km-ds-sceneText{
  color: #334155;
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0;
}

.km-ds-choices{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.km-ds-choice{
  width:100%;
  text-align:left;
  border-radius: 16px;
  border:1px solid rgba(15,23,42,.10);
  background: #ffffff;
  padding: 12px 12px;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.km-ds-choice:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(2,6,23,.10);
  border-color: rgba(14,126,171,.25);
  background: rgba(14,126,171,.03);
}

.km-ds-choiceLabel{
  display:block;
  font-weight: 900;
  font-size: 14.5px;
  color: #0f172a;
}
.km-ds-choiceHint{
  display:block;
  margin-top:6px;
  color:#64748b;
  font-size: 13px;
  line-height: 1.45;
}

.km-ds-footer{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top:1px solid rgba(15,23,42,.06);
  flex-wrap: wrap;
}

.km-ds-progress{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  color:#334155;
  font-size: 13px;
  font-weight: 900;
  min-width: 180px;
}
.km-ds-dot{ opacity:.6; }

.km-ds-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 14px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight: 900;
  font-size: 14px;
  cursor:pointer;
  user-select:none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  white-space: nowrap;
}
.km-ds-btn:hover{ transform: translateY(-1px); }

.km-ds-btn-primary{
  background: linear-gradient(135deg, var(--km-primary) 0%, var(--km-primary-2) 100%);
  color:#fff;
  box-shadow: 0 10px 22px rgba(14,126,171,.22);
}
.km-ds-btn-primary:hover{ box-shadow: 0 14px 28px rgba(14,126,171,.30); }

.km-ds-btn-ghost{
  background:#fff;
  color:var(--km-primary);
  border-color: rgba(14,126,171,.22);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

.km-ds-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}

.km-ds-finish{
  padding: 22px 18px 24px;
  text-align:center;
}
.km-ds-finishIcon{
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(14,126,171,.10);
  border:1px solid rgba(14,126,171,.20);
  font-size: 26px;
}
.km-ds-finishTitle{ margin:0 0 8px; font-size: 20px; font-weight: 900; }
.km-ds-finishText{ margin:0 0 14px; color:var(--km-muted); line-height:1.55; }

.km-ds-badgeCard{
  max-width: 720px;
  margin: 10px auto 14px;
  display:flex;
  align-items:center;
  gap: 12px;
  text-align:left;
  padding: 12px 14px;
  border-radius: 16px;
  border:1px solid rgba(14,126,171,.18);
  background: rgba(14,126,171,.06);
}
.km-ds-badgeIcon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.75);
  border:1px solid rgba(14,126,171,.18);
  font-size: 22px;
}
.km-ds-badgeTop{ font-weight: 900; }
.km-ds-badgeSub{ color:#475569; font-weight: 800; font-size: 13px; margin-top:2px; }

.km-ds-finishActions{
  display:flex;
  gap: 10px;
  justify-content:center;
  flex-wrap: wrap;
}

.km-ds-finishFoot{
  margin-top: 12px;
  display:flex;
  justify-content:center;
}

.km-ds-readall{
  margin-top: 14px;
  text-align:left;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
  overflow:hidden;
  max-width: 920px;
  margin-left:auto;
  margin-right:auto;
}

.km-ds-readallHead{
  padding: 12px 14px;
  background: rgba(14,126,171,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.km-ds-readallBadge{
  font-weight: 900;
  color: var(--km-primary);
}
.km-ds-readallHint{
  color:#475569;
  font-weight: 800;
  font-size: 13px;
}

.km-ds-readallBody{
  padding: 14px 16px 16px;
}

.km-ds-storyText p{
  margin: 0 0 10px;
  color:#334155;
  font-size: 15px;
  line-height: 1.75;
}

.km-ds-parentBox{
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(2,6,23,.02);
}
.km-ds-parentTitle{
  font-weight: 900;
  margin-bottom: 6px;
}
.km-ds-parentList{
  margin: 0;
  padding-left: 18px;
  color:#475569;
  font-weight: 800;
  line-height: 1.6;
}

.km-ds-error{
  max-width: 920px;
  margin: 18px auto;
  padding: 14px 14px;
  border-radius: 14px;
  border:1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.06);
  color:#7f1d1d;
  font-weight: 900;
}

@media (max-width: 520px){
  .km-ds-title{ font-size: 20px; }
  .km-ds-footer{ justify-content: center; }
  .km-ds-progress{ width:100%; }
  .km-ds-btn{ width:100%; }
  .km-ds-barWrap{ flex-direction:column; align-items:stretch; }
  .km-ds-barText{ justify-content:space-between; }
}
