/* 智影AI 提示词助手 — 简洁中文界面，PC 优先、手机可用 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1d2530; --sub: #6b7686; --line: #e3e8ef;
  --brand: #b23b2a; --brand-soft: #faece8; --brand-dark: #8c2a1c;
  --accent: #2563eb; --bg: #f6f8fa; --card: #ffffff;
  --err: #a93226;
}
body { background: var(--bg); color: var(--ink); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.app { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; min-height: 100vh; }
.hidden { display: none !important; }

.view { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.logo { font-size: 26px; font-weight: 600; text-align: center; margin: 48px 0 8px; }
.logo-s { font-weight: 600; font-size: 16px; }
.gate-tip { color: var(--sub); text-align: center; margin-bottom: 24px; }
#view-gate .input, #view-gate .btn { display: block; width: 100%; max-width: 320px; margin: 0 auto 12px; }

.input { padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; }
.input:focus { outline: none; border-color: var(--brand); }

.btn { border: none; border-radius: 10px; padding: 13px 22px; font-size: 16px; cursor: pointer; font-family: inherit; transition: transform .06s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:disabled { background: #dfb9ae; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost.small { padding: 8px 14px; font-size: 14px; }
.btn.wide { width: 100%; margin-top: 18px; }
/* 剧本入口劈半：左 30 秒短剧 / 右系列短剧单集 */
.card.big.split { display: flex; flex-direction: row; padding: 0; gap: 0; }
.split-half { flex: 1; min-width: 0; background: none; border: none; display: flex; flex-direction: column; gap: 6px; padding: 24px 20px; text-align: left; cursor: pointer; font-family: inherit; align-items: flex-start; border-radius: 14px; transition: background .15s; }
.split-half:first-child { border-right: 1.5px dashed rgba(178, 59, 42, .35); }
.split-half:hover { background: rgba(178, 59, 42, .05); }
.split-half .card-title { font-size: 19px; font-weight: 600; color: var(--brand-dark); }
.split-badge { font-size: 11.5px; font-weight: 600; color: #fff; background: var(--brand); border-radius: 99px; padding: 2px 10px; letter-spacing: 1px; }
.split-badge.soon { background: #b9aca8; }
.split-half.disabled { opacity: .45; cursor: not-allowed; }
.split-half.disabled:hover { background: none; }
.split-half.disabled .card-title { color: #8a7a76; }
/* series.html：一屏多字段堆叠 */
.fld-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: 13px; color: var(--sub); }
.input.ta.short { min-height: 90px; }
.fld-stack .input, .fld-stack .input.ta { margin: 0; }
.btn.to-image { background: var(--brand-dark); color: #fff; margin-top: 10px; }
.btn.to-save { background: #0f766e; color: #fff; margin-top: 10px; }
.btn.next-role { background: var(--brand); color: #fff; margin-top: 14px; box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.next-role-done { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: 14px; text-align: center; }
.save-hint { color: var(--sub); font-size: 12.5px; margin-top: 8px; text-align: center; }

/* 当天作品回看（24 小时） */
.daily-entry { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 18px; padding: 14px 16px; border: 1.5px dashed var(--brand); border-radius: 12px; background: #fff; color: var(--ink); font-size: 15px; cursor: pointer; font-weight: 600; }
.daily-entry:hover { background: var(--brand-soft); }
.daily-entry .daily-c { background: var(--brand); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 9px; }
.daily-entry .daily-go { margin-left: auto; color: var(--brand); }
.daily-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; cursor: pointer; font-size: 15px; color: var(--ink); }
.daily-row:hover { border-color: var(--brand); background: #fffbfa; }
.daily-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-row .ts { color: var(--sub); font-size: 12.5px; white-space: nowrap; }
.daily-empty { color: var(--sub); text-align: center; padding: 30px 0; }
.err { color: var(--err); text-align: center; font-size: 14px; min-height: 20px; margin-top: 6px; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 20px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-family: inherit; transition: border-color .15s, transform .06s; }
.card:active { transform: scale(.98); }
.card.big { grid-column: 1 / -1; background: linear-gradient(0deg, #fff, #fff), var(--brand-soft); border-color: var(--brand); padding: 26px 20px; }
.card.big .card-title { font-size: 19px; font-weight: 600; color: var(--brand-dark); }
.card-emoji { font-size: 26px; }
.card-title { font-size: 16px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--sub); }
/* 画面用途：带效果示意的选项 */
.opt.opt-art { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; }
.opt.opt-art .purpose-art { width: 100%; max-width: 128px; height: auto; color: #9aa3b2; transition: color .15s; }
.opt.opt-art:hover .purpose-art { color: var(--brand-dark); }
.opt.opt-art.sel .purpose-art { color: var(--brand); }
.opt.opt-art .opt-label { font-weight: 500; }
/* 背景题动态选项（剧本模式） */
.dyn-loading { grid-column: 1 / -1; padding: 26px 14px; text-align: center; font-size: 14px; color: var(--sub); background: var(--brand-soft); border-radius: 10px; animation: dynPulse 1.2s ease-in-out infinite; }
@keyframes dynPulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.opt.dyn-refresh { grid-column: 1 / -1; font-size: 14px; color: var(--brand); border-style: dashed; background: transparent; padding: 11px; }
.opt.dyn-refresh:hover { border-color: var(--brand); background: var(--brand-soft); }
.card .card-example { margin-top: 6px; align-self: flex-start; font-size: 13px; font-weight: 500; color: var(--brand); cursor: pointer; border-bottom: 1px dashed var(--brand); padding-bottom: 1px; }
.card .card-example:hover { color: var(--brand-dark); border-bottom-style: solid; }
.card.disabled { opacity: .45; cursor: not-allowed; }
.card .coming { font-size: 11px; color: var(--brand); border: 1px solid var(--brand); border-radius: 99px; padding: 1px 7px; margin-left: 6px; font-weight: 400; vertical-align: 2px; }

.progress-wrap { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress-bar { height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .25s; }
.progress-text { font-size: 13px; color: var(--sub); margin-bottom: 26px; }
.quiz-q { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.quiz-tip { color: var(--sub); font-size: 14px; margin-bottom: 6px; }
.dev-tip { color: #8a94a6; font-size: 12.5px; margin-bottom: 16px; padding-left: 10px; border-left: 2.5px solid var(--brand-soft); }
.dev-tip::before { content: ""; }

/* 已选历史条：帮助学生回看自己的创作路径 */
.history { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.history:empty { display: none; }
.chip { font-size: 12.5px; color: var(--brand-dark); background: var(--brand-soft); border: none; border-radius: 99px; padding: 5px 12px; cursor: pointer; font-family: inherit; }
.chip:hover { filter: brightness(.96); }
.chip .chip-k { color: var(--sub); margin-right: 4px; }

.model-line { text-align: center; color: var(--sub); font-size: 13px; margin-top: 22px; }
.model-line span { color: var(--brand-dark); font-weight: 500; }
.tech-note { color: var(--sub); font-size: 12.5px; text-align: center; margin-top: 14px; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.opt { padding: 15px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; cursor: pointer; text-align: center; font-family: inherit; }
.opt:hover { border-color: var(--brand); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
#quiz-refresh { margin-bottom: 14px; }

/* AI 动态选项加载占位 */
.opt-loading { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 18px 16px; border: 1.5px dashed var(--brand); border-radius: 10px; color: var(--brand-dark); font-size: 14px; background: #f7fcfa; }
.mini-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; flex-shrink: 0; }

.free-wrap { margin-bottom: 14px; }
.free-wrap .input { width: 100%; }
#quiz-recommend { width: 100%; margin-bottom: 22px; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; }
.quiz-nav .btn { flex: 1; }

.review-list { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 26px; }
.review-row { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 16px; cursor: pointer; font-size: 15px; font-family: inherit; }
.review-row .k { color: var(--sub); flex-shrink: 0; margin-right: 12px; }
.review-row .v { text-align: right; font-weight: 500; }
.review-row .v small { display: block; color: var(--sub); font-weight: 400; }

.loading-dot { width: 46px; height: 46px; margin: 90px auto 24px; border-radius: 50%; border: 5px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { text-align: center; font-size: 17px; line-height: 1.9; }
.loading-sub { color: var(--sub); font-size: 14px; }

.res-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.res-card h3 { font-size: 15px; color: var(--brand-dark); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.res-card .copy-mini { font-size: 13px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 4px 8px; font-family: inherit; }
.res-card p, .res-card div { font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.dlg-row { margin-bottom: 8px; }
.dlg-name { font-weight: 600; color: var(--brand); margin-right: 8px; }
.dlg-emo { color: var(--sub); font-size: 13px; margin-left: 6px; }
.dlg-row.edited { border-left: 3px solid var(--brand); padding-left: 8px; background: var(--brand-soft); border-radius: 6px; }
.dlg-edit-row { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 8px; }
.dlg-edit-row .dlg-colon { line-height: 38px; color: var(--sub); }
.dlg-in { font-family: inherit; font-size: 15px; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: inherit; }
.dlg-in:focus { outline: none; border-color: var(--brand); }
.dlg-name-in { width: 88px; flex: 0 0 auto; text-align: center; }
.dlg-line-in { flex: 1; min-width: 0; resize: vertical; line-height: 1.6; }
.dlg-edit-tip { font-size: 12.5px; color: var(--brand-dark); margin-top: 4px; }
.prompt-box { background: #f0faf6; border: 1px dashed var(--brand); border-radius: 10px; padding: 14px; font-size: 14px; }

/* 分镜逐条：时间徽标 + 景别 + 画面 + 单条复制 */
.shot-row { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; line-height: 1.7; }
.shot-row:last-child { border-bottom: none; }
.shot-time { flex-shrink: 0; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; font-size: 12.5px; border-radius: 6px; padding: 2px 8px; margin-top: 2px; }
.shot-cam { flex-shrink: 0; color: var(--sub); font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; margin-top: 2px; }
.shot-text { flex: 1; min-width: 0; }
.shot-copy { flex-shrink: 0; margin-top: 2px; }
.echo-note { color: var(--sub); font-size: 13px; margin: 4px 0 14px; }

.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); background: #2c3a4a; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; max-width: 86%; text-align: center; z-index: 9; }
.toast.err { background: var(--err); }

@media (max-width: 560px) {
  .cards, .options { grid-template-columns: 1fr; }
  .quiz-q { font-size: 19px; }
  .card.big.split { flex-direction: column; }
  .split-half:first-child { border-right: none; border-bottom: 1.5px dashed rgba(178, 59, 42, .35); }
}

/* ---------- 智影AI 品牌露出（小而精致，不抢视觉空间） ---------- */
.brand-lockup { display: inline-flex; align-items: center; gap: 8px; }
a.brand-lockup { text-decoration: none; cursor: pointer; transition: opacity .15s; }
a.brand-lockup:hover { opacity: .75; }
.topbar .brand-lockup.clickable { cursor: pointer; transition: opacity .15s; }
.topbar .brand-lockup.clickable:hover { opacity: .75; }
.brand-img { height: 20px; width: auto; display: block; }
.brand-big { height: 42px; }   /* 访问码页两排版：42px 高 ≈ 151px 宽 */
.brand-tiny { height: 13px; vertical-align: -3px; margin-right: 5px; }
.brand-suffix { font-size: 13px; font-weight: 600; color: var(--sub); }
.brand-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.loading-logo { display: block; margin: 26px auto 0; }

@media (max-width: 560px) {
  .brand-img { height: 17px; }
  .brand-big { height: 36px; }
  .brand-suffix { font-size: 12px; }
}

/* ---------- 文生图提示词助手（image.html） ---------- */
/* 剧本拆解（角色来源） */
.src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 14px; }
.src-grid .card { min-height: 104px; }
.src-grid .card .card-emoji { font-size: 26px; }
.src-grid .card:hover { border-color: var(--brand); box-shadow: 0 3px 14px rgba(178, 59, 42, .08); }
.src-grid .card.disabled, .src-grid .card.disabled:hover { opacity: .5; cursor: not-allowed; border-color: var(--line); box-shadow: none; background: #fafafa; }
#segment-input { min-height: 90px; }
.input.ta { width: 100%; min-height: 150px; resize: vertical; line-height: 1.6; padding: 12px 14px; font-size: 14px; margin: 6px 0 10px; }
.role-card { margin-bottom: 10px; }
.role-card:hover { border-color: var(--brand); }
.role-card .card-title { font-size: 16px; }
/* 结果页「自由选择生成哪个」的候选卡：占满一行，左对齐 */
.pick-role { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; font-family: inherit; }
.pick-role:first-of-type { margin-top: 10px; }
.im-side-tip-inline { font-size: 12px; font-weight: 400; color: var(--sub); margin-left: 8px; }
@media (max-width: 640px) { .src-grid { grid-template-columns: 1fr; } }
.im { max-width: 1160px; }
.im-cls { font-size: 13px; color: var(--sub); }
.qtype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 8px; }
.qtype-grid .card { min-height: 132px; border: 1.5px solid var(--line); }
.qtype-grid .card:hover { border-color: var(--brand); box-shadow: 0 3px 14px rgba(178, 59, 42, .08); }
.qtype-grid .card .card-emoji { font-size: 30px; }
.qtype-grid .card .card-title { font-size: 18px; }
.qtype-grid .card .card-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qtype-grid .card.disabled { opacity: .5; cursor: not-allowed; }
.qtype-grid .card.disabled:hover { border-color: var(--line); box-shadow: none; }
/* 乌巢说 · 引用式短语 */
.qtype-grid .card .card-motto { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 7px; font-family: "Songti SC", "STSong", "Noto Serif SC", serif; }
.qtype-grid .card .card-motto::before { content: "❝"; font-size: 15px; line-height: 1; color: var(--brand); opacity: .55; transform: translateY(1px); }
.qtype-grid .card .card-motto em { font-style: normal; font-size: 12px; letter-spacing: 2px; color: var(--sub); }
.qtype-grid .card .card-motto b { font-weight: 600; font-size: 13.5px; letter-spacing: 1px; color: var(--brand); }
.qtype-grid .card.disabled .card-motto b { color: #a8908c; }
.card.tag { justify-self: start; align-self: start; }
.im-hello { font-size: 24px; font-weight: 600; margin-top: 30px; text-align: center; }
.im-hello-sub { color: var(--sub); text-align: center; font-size: 14px; margin-top: 6px; }
.im-layout { display: flex; gap: 22px; align-items: flex-start; }
.im-main { flex: 1; min-width: 0; }
.im-sum-toggle { display: none; width: 100%; margin-bottom: 14px; border: 1.5px dashed var(--brand); color: var(--brand-dark); background: #f7fcfa; }

.im-side { width: 260px; flex-shrink: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; position: sticky; top: 18px; max-height: calc(100vh - 40px); overflow: auto; }
.im-side-h { font-size: 14px; color: var(--brand-dark); margin-bottom: 10px; }
.im-side-tip { font-size: 12px; color: var(--sub); margin-top: 10px; line-height: 1.6; }
#im-side-list { display: flex; flex-direction: column; gap: 4px; }
.side-row { display: flex; flex-direction: column; gap: 1px; text-align: left; background: none; border: none; border-radius: 8px; padding: 7px 9px; cursor: pointer; font-family: inherit; width: 100%; }
.side-row:hover { background: var(--brand-soft); }
.side-row.cur { background: var(--brand-soft); }
.side-row .sr-k { font-size: 12px; color: var(--sub); }
.side-row .sr-v { font-size: 13px; color: var(--ink); font-weight: 500; word-break: break-all; }
.muted { color: #a3adba !important; font-weight: 400 !important; }

#im-options .opt { min-height: 48px; }
#im-skip { background: #fff; }
.result-actions { margin-top: 16px; }

/* 建议迭代工作流：输入框 + 优化按钮 + 版本徽标 */
.refine-wrap { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.refine-wrap .input { width: 100%; }
.version-badge { display: inline-block; margin-left: 10px; padding: 3px 12px; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--brand); border-radius: 99px; vertical-align: 4px; }
.res-collapse summary { cursor: pointer; list-style: none; color: var(--brand-dark); font-size: 15px; font-weight: 600; }
.res-collapse summary::before { content: "▸ "; color: var(--brand); }
.res-collapse[open] summary::before { content: "▾ "; }
.res-collapse p { margin-top: 8px; white-space: pre-wrap; }
.im-full { font-size: 15px; line-height: 1.9; }
.copy-mini { margin-top: 10px; display: inline-block; }

body.im-sum-open .im-side { display: block; }
@media (max-width: 860px) {
  .qtype-grid { grid-template-columns: 1fr; }
  .qtype-grid .card { min-height: 0; }
  .im-layout { flex-direction: column; }
  .im-side { display: none; position: static; width: 100%; max-height: none; order: 2; }
  .im-sum-toggle { display: block; }
}
