/* 模型卡片「导入 PPT」弹窗与封面悬停进入提示 */
.science-home.home-v2 .model-save-card .card-visual {
  position: relative;
}

.science-home.home-v2 .model-save-card .model-card-link .card-visual::after {
  content: "进入模型 ↗";
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 38, 58, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.science-home.home-v2 .model-save-card .model-card:not(.locked) .model-card-link:is(:hover, :focus-visible) .card-visual::after {
  opacity: 1;
  transform: translateY(0);
}

/* 导入 PPT 弹窗 */
.ppt-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(92vh, 800px);
  margin: auto;
  padding: 0;
  border: 1px solid #d7e5ec;
  border-radius: 20px;
  background: #fff;
  color: #10263a;
  box-shadow: 0 28px 70px -18px rgba(16, 38, 58, 0.34);
  overflow: hidden;
}

.ppt-dialog[open] {
  display: flex;
  flex-direction: column;
}

.ppt-dialog::backdrop {
  background: rgba(16, 38, 58, 0.48);
  backdrop-filter: blur(3px);
}

.ppt-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f2f6f9;
  color: #526b7c;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ppt-dialog-close:hover {
  background: #e4edf2;
  color: #10263a;
}

.ppt-dialog-head {
  padding: 15px 54px 12px 22px;
  border-bottom: 1px solid #e7eff4;
  background: linear-gradient(180deg, #f7fbfd 0%, #fff 100%);
}

.ppt-dialog-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e4f6f2;
  color: #0f7f6d;
  font-size: 12px;
  font-weight: 700;
}

.ppt-dialog-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #10263a;
}

.ppt-dialog-sub {
  margin: 3px 0 0;
  color: #536c7d;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ppt-dialog-body {
  padding: 13px 22px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ppt-step {
  padding: 11px 14px;
  border: 1px solid #e4edf2;
  border-radius: 13px;
  background: #fafcfd;
}

.ppt-step-play {
  background: #f2faf8;
  border-color: #cbe9e2;
}

.ppt-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: #10263a;
}

.ppt-step-play .ppt-step-title {
  margin-bottom: 4px;
}

.ppt-step-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: #13806f;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.ppt-preview-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 205px;
  margin-bottom: 10px;
  border: 1px solid #dce7ee;
  border-radius: 10px;
  background: #eef4f7;
  overflow: hidden;
}

.ppt-preview-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.ppt-preview-box img[hidden] {
  display: none;
}

.ppt-preview-loading {
  color: #5b7183;
  font-size: 13.5px;
  font-weight: 600;
}

.ppt-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ppt-btn-primary,
.ppt-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font: 700 14px/1.2 inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.ppt-btn-primary {
  flex: 1 1 210px;
  border: 1px solid #13806f;
  background: #13806f;
  color: #fff;
}

.ppt-btn-primary:hover:not(:disabled) {
  background: #0e6c5e;
  border-color: #0e6c5e;
}

.ppt-btn-primary.is-done {
  background: #16995b;
  border-color: #16995b;
}

.ppt-btn-secondary {
  flex: 0 1 auto;
  border: 1px solid #c9dae3;
  background: #fff;
  color: #214258;
}

.ppt-btn-secondary:hover:not(:disabled) {
  background: #eef5f8;
  border-color: #9cb8c7;
}

.ppt-btn-primary:disabled,
.ppt-btn-secondary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ppt-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.ppt-url-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cddce5;
  border-radius: 10px;
  background: #fff;
  color: #214258;
  font: 500 13.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ppt-url-row input:focus {
  outline: 2px solid #13806f;
  outline-offset: 1px;
}

.ppt-url-row .ppt-btn-primary {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ppt-step-tip {
  margin: 0;
  color: #3b5568;
  font-size: 13.5px;
  line-height: 1.65;
}

.ppt-step-tip small {
  color: #5d7485;
  font-size: 12.5px;
}

.ppt-dialog kbd {
  display: inline-block;
  margin: 0 2px;
  padding: 1px 6px;
  border: 1px solid #c5d6e0;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: #10263a;
  font: 700 12px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  vertical-align: 1px;
}

.ppt-faq {
  padding: 10px 14px;
  border: 1px dashed #cddce5;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  color: #466073;
}

.ppt-faq summary {
  font-weight: 700;
  color: #2a4c63;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ppt-faq summary::-webkit-details-marker {
  display: none;
}

.ppt-faq summary::after {
  content: "展开 ▾";
  font-size: 12px;
  font-weight: 600;
  color: #13806f;
}

.ppt-faq[open] summary::after {
  content: "收起 ▴";
}

.ppt-faq ul {
  margin: 10px 0 2px;
  padding-left: 18px;
  line-height: 1.7;
}

.ppt-faq li + li {
  margin-top: 4px;
}

.ppt-faq a {
  color: #0f7f6d;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .ppt-dialog-head {
    padding: 16px 48px 12px 16px;
  }
  .ppt-dialog-body {
    padding: 12px 16px 16px;
  }
  .ppt-url-row {
    flex-direction: column;
  }
  .ppt-btn-row {
    flex-direction: column;
  }
}
