/* ============================================================
 * 苹果智云 · Sky Prompts 页面样式
 * 配色沿用橙白主题；文字对比度按 WCAG AA（浅底 ≥4.5:1）取色
 * ============================================================ */

/* ---------- 板块标题 ---------- */
.sp-sec-head { margin-bottom: 26px; }
.sp-sec-head h2 { font-size: 28px; font-weight: 800; color: #1D2129; letter-spacing: -.01em; }
.sp-sec-head h2 .serif { color: #B33A00; font-family: var(--font-serif, inherit); }
.sp-sec-head p { margin-top: 8px; font-size: 14.5px; color: #565E66; line-height: 1.75; max-width: 720px; }

/* ---------- 生成器主区 ---------- */
.sp-gen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: start;
}
.sp-card {
  background: #FFFFFF;
  border: 1px solid #E5E9EF;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 6px 24px rgba(27, 37, 51, .05);
}
.sp-card-label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; font-weight: 700; color: #1D2129; margin-bottom: 10px;
}
.sp-card-label .sp-count { font-size: 11.5px; font-weight: 600; color: #565E66; }

/* 输入区 */
.sp-input {
  width: 100%; min-height: 116px; resize: vertical;
  font-family: inherit; font-size: 15px; line-height: 1.7; color: #1D2129;
  background: #F7F9FC; border: 1px solid #E5E9EF; border-radius: 12px;
  padding: 14px 16px; outline: none; transition: border-color .18s, background .18s;
}
.sp-input::placeholder { color: #8A929B; }
.sp-input:focus { border-color: #FF6600; background: #FFFFFF; box-shadow: 0 0 0 3px rgba(255, 102, 0, .12); }

.sp-live {
  margin-top: 10px; min-height: 22px;
  font-size: 12.5px; color: #565E66; line-height: 1.6;
}
.sp-live b { color: #B33A00; }
.sp-live .sp-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #FF6600; margin-right: 6px; vertical-align: 1px; }

/* 约束芯片 */
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sp-chip {
  font-family: inherit; font-size: 12.5px; color: #3A3F45;
  background: #F7F9FC; border: 1px solid #E5E9EF; border-radius: 999px;
  padding: 6px 13px; cursor: pointer; transition: all .16s;
}
.sp-chip:hover { border-color: #FF6600; color: #B33A00; }
.sp-chip.on { background: rgba(255, 102, 0, .09); border-color: #FF6600; color: #B33A00; font-weight: 700; }

/* 按钮 */
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sp-btn {
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  border-radius: 11px; padding: 11px 22px; border: 1px solid transparent; transition: all .18s;
}
.sp-btn-main { background: linear-gradient(120deg, #FF6600, #D64000); color: #FFFFFF; box-shadow: 0 6px 18px rgba(255, 102, 0, .3); }
.sp-btn-main:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 102, 0, .36); }
.sp-btn-line { background: #FFFFFF; border-color: #E5E9EF; color: #1D2129; }
.sp-btn-line:hover { border-color: #FF6600; color: #B33A00; }
.sp-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* 示例 */
.sp-examples { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #E5E9EF; }
.sp-examples .t { font-size: 12px; color: #565E66; margin-bottom: 9px; }
.sp-ex {
  display: block; width: 100%; text-align: left; font-family: inherit;
  font-size: 12.5px; color: #3A3F45; background: transparent; border: 0;
  border-radius: 8px; padding: 7px 10px; cursor: pointer; transition: background .15s, color .15s;
}
.sp-ex:hover { background: #F7F9FC; color: #B33A00; }
.sp-ex::before { content: "› "; color: #FF6600; font-weight: 800; }

/* ---------- 结果区 ---------- */
.sp-out-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sp-badge {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: #B33A00; background: rgba(255, 102, 0, .08);
  border: 1px solid rgba(255, 102, 0, .3); border-radius: 999px; padding: 5px 12px;
}
.sp-prompt {
  font-family: var(--font-en, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12.8px; line-height: 1.85; color: #1D2129;
  background: #F7F9FC; border: 1px solid #E5E9EF; border-radius: 12px;
  padding: 16px 18px; max-height: 520px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}
.sp-prompt::-webkit-scrollbar { width: 8px; }
.sp-prompt::-webkit-scrollbar-thumb { background: #D5DBE3; border-radius: 4px; }

.sp-empty { text-align: center; padding: 40px 16px; color: #565E66; font-size: 13.5px; line-height: 1.9; }
.sp-empty .big { font-size: 30px; margin-bottom: 10px; }

/* 识别到 / 建议补充 */
.sp-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.sp-panel { background: #FFFFFF; border: 1px solid #E5E9EF; border-radius: 13px; padding: 14px 16px; }
.sp-panel h4 { font-size: 12.5px; font-weight: 800; color: #1D2129; margin-bottom: 9px; }
.sp-panel h4 em { font-style: normal; color: #B33A00; }
.sp-kv { font-size: 12.5px; color: #3A3F45; line-height: 1.9; }
.sp-kv .k { color: #565E66; }
.sp-kv .v { color: #1D2129; font-weight: 600; }
.sp-todo { list-style: none; font-size: 12.5px; color: #3A3F45; line-height: 1.85; }
.sp-todo li { padding-left: 18px; position: relative; }
.sp-todo li::before { content: "＋"; position: absolute; left: 0; color: #B33A00; font-weight: 800; }

/* 框架速查 */
.sp-fw { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sp-fw-card { background: #FFFFFF; border: 1px solid #E5E9EF; border-radius: 16px; padding: 20px; transition: all .2s; }
.sp-fw-card:hover { border-color: rgba(255, 102, 0, .45); box-shadow: 0 10px 28px rgba(27, 37, 51, .07); transform: translateY(-2px); }
.sp-fw-card .en { font-size: 11px; letter-spacing: .16em; color: #B33A00; font-weight: 700; text-transform: uppercase; }
.sp-fw-card h3 { font-size: 16.5px; font-weight: 800; color: #1D2129; margin: 7px 0 9px; }
.sp-fw-card p { font-size: 13px; color: #3A3F45; line-height: 1.8; }
.sp-fw-card .best { margin-top: 12px; font-size: 12px; color: #565E66; border-top: 1px dashed #E5E9EF; padding-top: 10px; }
.sp-fw-card .best b { color: #B33A00; }

/* 三步说明 */
.sp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sp-step { background: #FFFFFF; border: 1px solid #E5E9EF; border-radius: 16px; padding: 20px; }
.sp-step .no {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #D64000, #B33A00); color: #FFFFFF; font-weight: 800; font-size: 14px; margin-bottom: 12px;
}
.sp-step h4 { font-size: 15px; font-weight: 800; color: #1D2129; margin-bottom: 7px; }
.sp-step p { font-size: 13px; color: #3A3F45; line-height: 1.8; }

/* ---------- AI 状态提示 ---------- */
.sp-ai-note {
  font-size: 12.5px; color: #565E66; line-height: 1.75;
  background: #F7F9FC; border: 1px dashed #E5E9EF; border-radius: 10px;
  padding: 9px 13px; margin-bottom: 12px;
}
.sp-ai-note .sp-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #FF6600; margin-right: 6px; vertical-align: 1px;
  animation: spPulse 1.1s ease-in-out infinite;
}
@keyframes spPulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
/* AI 增强标识：白字压在深橙底上（≥4.5:1），不用浅底浅字 */
.sp-badge.ai { color: #FFFFFF; background: linear-gradient(120deg, #D64000, #B33A00); border-color: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .sp-gen { grid-template-columns: 1fr; }
  .sp-panels { grid-template-columns: 1fr; }
  .sp-sec-head h2 { font-size: 24px; }
  .sp-prompt { max-height: 380px; }
}
