/* ==========================================================================
   德鲁克思想屋 · S9b Ask 德鲁克 浮层样式
   配色沿用站内 Stripe 风格：主紫 #533afd / 深 navy / 边框 #e5edf5
   ========================================================================== */
.dkask-ov {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 27, 49, 0.42);
  backdrop-filter: blur(2px);
  padding: 0;
}
.dkask-ov[hidden] { display: none; }

.dkask {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(6, 27, 49, 0.18);
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  animation: dkask-up 0.18s ease-out;
}
@keyframes dkask-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.dkask-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5edf5;
}
.dkask-t {
  font-family: var(--serif, Georgia, "Noto Serif SC", serif);
  font-size: 18px;
  font-weight: 600;
  color: #061b31;
  letter-spacing: 0.02em;
}
.dkask-t::before {
  content: "↗";
  color: #533afd;
  margin-right: 8px;
  font-weight: 700;
}
.dkask-x {
  border: 0;
  background: #f1f4f9;
  color: #5b6b7f;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.dkask-x:hover { background: #e5edf5; color: #061b31; }

.dkask-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dkask-hint {
  color: #5b6b7f;
  font-size: 14px;
  line-height: 1.7;
  background: #f7f9fc;
  border: 1px solid #e5edf5;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
}
.dkask-q {
  align-self: flex-end;
  background: #533afd;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  max-width: 82%;
}
.dkask-a {
  align-self: flex-start;
  background: #f7f9fc;
  border: 1px solid #e5edf5;
  color: #1d2c3a;
  font-size: 14.5px;
  line-height: 1.8;
  padding: 12px 15px;
  border-radius: 14px 14px 14px 4px;
  max-width: 92%;
  white-space: normal;
}
.dkask-a br { content: ""; }
.dkask-dot { color: #8a98a8; font-size: 13px; }
.dkask-dot::after {
  content: "···";
  display: inline-block;
  animation: dkask-blink 1.1s steps(4, end) infinite;
  letter-spacing: 1px;
}
@keyframes dkask-blink { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }
.dkask-caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: #533afd;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: dkask-blink 1s steps(2, end) infinite;
}
.dkask-err { color: #b42318; font-size: 13.5px; line-height: 1.6; }

.dkask-in {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid #e5edf5;
}
.dkask-in input {
  flex: 1;
  border: 1px solid #cfdae8;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: #061b31;
  outline: none;
}
.dkask-in input:focus { border-color: #533afd; box-shadow: 0 0 0 3px rgba(83, 58, 253, 0.12); }
.dkask-in button {
  border: 0;
  background: #533afd;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 20px;
  border-radius: 10px;
  cursor: pointer;
}
.dkask-in button:hover { background: #4326e0; }
.dkask-in button:disabled { opacity: 0.55; cursor: default; }

.dkask-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
  align-items: center;
}
.dkask-refs-k { color: #8a98a8; font-size: 12.5px; }
.dkask-ref {
  font-size: 12.5px;
  color: #533afd;
  background: #f0ecff;
  border: 1px solid #ddd3ff;
  padding: 5px 10px;
  border-radius: 20px;
  text-decoration: none;
  line-height: 1.2;
}
.dkask-ref:hover { background: #e6e0ff; }

/* 桌面端：浮层居中、圆角全开 */
@media (min-width: 640px) {
  .dkask-ov { align-items: center; padding: 24px; }
  .dkask { border-radius: 16px; max-height: 80vh; }
}

/* 卡片页「问德鲁克」按钮激活态 */
.act-ask { color: #533afd; }
.act-ask.is-off { opacity: 0.5; }
.act-ask:not(.is-off):hover { background: #f0ecff; }

/* ---------- S12 · 回答正文 Markdown 样式 ---------- */
.dkask-a .dkmd-h {
  margin: 14px 0 6px; font-size: 15px; font-weight: 600; color: #1c2333;
}
.dkask-a .dkmd-p { margin: 0 0 10px; }
.dkask-a .dkmd-ul, .dkask-a .dkmd-ol { margin: 0 0 12px; padding-left: 20px; }
.dkask-a .dkmd-ul li, .dkask-a .dkmd-ol li { margin: 0 0 6px; }
.dkask-a .dkmd-bq {
  margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid #c9befc;
  background: #f7f5ff; border-radius: 0 8px 8px 0; color: #4a4463;
}
.dkask-a .dkmd-bq p { margin: 0; }
.dkask-a .dkmd-hr { border: 0; border-top: 1px solid #e6e4ef; margin: 12px 0; }
.dkask-a code {
  font-size: 12.5px; background: #f2f1f7; border: 1px solid #e6e4ef;
  border-radius: 4px; padding: 1px 6px;
}
.dkask-a b { font-weight: 600; color: #1c2333; }
.dkask-a a { color: #533afd; }
