/* 第 7 轮：信息架构样稿层。所有新增控件沿用既有语义变量。 */
.prototype-bar { gap: 10px; }
.prototype-pages { flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.prototype-pages::-webkit-scrollbar { display: none; }
.prototype-variants { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.prototype-variants button { height: 28px; padding: 0 10px; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.prototype-variants button[aria-pressed='true'] { background: var(--md-seg-on); color: var(--ink); box-shadow: var(--shadow-1); }
.r7-project-mode { flex: none; }
.r7-project-mode button { min-width: 48px; }
.r7-avatar-menu { position: absolute; z-index: 120; top: calc(100% + 10px); right: 0; width: 330px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow-3); backdrop-filter: blur(24px); }
.r7-profile-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 6px 4px 14px; }
.r7-profile-head strong, .r7-profile-head span, .r7-profile-balance small { display: block; }
.r7-profile-head strong { font-size: 15px; }
.r7-profile-head span, .r7-profile-balance small { color: var(--muted); font-size: 12px; }
.r7-profile-balance { text-align: right; }
.r7-profile-balance b { display: block; font-size: 22px; line-height: 24px; font-variant-numeric: tabular-nums; }
.r7-recharge { height: 32px; padding: 0 12px; font-size: 12px; }
.r7-menu-links { display: grid; gap: 2px; }
.r7-menu-links button { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 9px; background: transparent; text-align: left; font-size: 13px; }
.r7-menu-links button:hover { background: var(--fill-hover); }
.r7-menu-links svg { width: 17px; height: 17px; color: var(--muted); }
.r7-menu-hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.r7-menu-divider { height: 1px; margin: 10px 0; background: var(--line); }
.r7-home { padding-top: 42px; }
.r7-home .home-content { max-width: 1120px; }
.r7-hero-kicker, .r7-eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.r7-hero-kicker { margin-bottom: 10px; }
.r7-home .home-hero h1 { margin-bottom: 22px; }
.r7-home-tabs { width: max-content; margin: 0 auto; }
.r7-home-tabs button { min-width: 92px; }
.r7-home .home-card-wrap { margin-top: 30px; }
.r7-home .quick-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r7-home .home-composer-zone { margin-top: 24px; }
.r7-oneclick-panel { max-width: 860px; margin: 30px auto 0; padding: 20px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-2); }
.r7-dropzone { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.r7-drop-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-3); color: var(--ink); }
.r7-drop-icon svg { width: 20px; height: 20px; }
.r7-dropzone div { flex: 1; min-width: 0; }
.r7-dropzone strong, .r7-dropzone span { display: block; }
.r7-dropzone strong { font-size: 15px; }
.r7-dropzone span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.r7-spec-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.r7-spec-btn { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12px; }
.r7-spec-btn span { color: var(--muted); }
.r7-spec-btn b { font-weight: 600; }
.r7-budget-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.r7-budget-row label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.r7-budget-row input { width: 76px; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--field-bg); color: var(--ink); text-align: right; }
.r7-oneclick-submit { display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; margin-top: 18px; border-radius: 12px; background: var(--cl-spend); color: var(--cl-on-spend); font-weight: 650; }
.r7-oneclick-submit:hover { background: var(--cl-spend-hover); }
.r7-flow-note { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.r7-oneclick-card { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 148px; width: min(760px, 100%); margin: 30px auto 0; padding: 28px 30px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(120deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow-2); text-align: left; }
.r7-oneclick-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.r7-oneclick-card > div { position: relative; z-index: 1; }
.r7-oneclick-card strong, .r7-oneclick-card p { display: block; }
.r7-oneclick-card strong { margin-top: 4px; font-size: 28px; letter-spacing: -.02em; }
.r7-oneclick-card p { margin-top: 8px; color: var(--muted); }
.r7-card-kicker { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.r7-oneclick-card > svg { position: relative; z-index: 1; color: var(--ink); }
.r7-card-glow { position: absolute; right: 12%; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-soft) 80%, transparent), transparent 68%); filter: blur(2px); }
.r7-recent { margin-top: 32px; }
.r7-page { height: 100%; overflow: auto; padding: 34px 42px 64px; }
.r7-library-page { max-width: 1320px; margin: 0 auto; }
.r7-page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.r7-page-head h1 { margin-top: 4px; font-size: 30px; line-height: 38px; letter-spacing: -.02em; }
.r7-page-actions { display: flex; align-items: center; gap: 10px; }
.r7-search { display: flex; align-items: center; gap: 8px; width: 230px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field-bg); }
.r7-search svg { width: 17px; height: 17px; color: var(--muted); }
.r7-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.r7-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.r7-project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; box-shadow: var(--shadow-1); }
.r7-project-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.r7-project-cover { aspect-ratio: 1.75 / 1; background: var(--surface-2); }
.r7-project-cover svg, .r7-resource-cover svg { width: 100%; height: 100%; }
.r7-cover-empty { display: grid; place-items: center; align-content: center; height: 100%; gap: 8px; color: var(--muted); }
.r7-cover-empty svg { width: 28px; height: 28px; }
.r7-cover-empty small { font-size: 12px; }
.r7-project-copy { padding: 14px 15px 16px; }
.r7-project-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.r7-project-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r7-project-copy > span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.r7-mode-chip { flex: none; padding: 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11px; }
.r7-library-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.r7-library-tree { display: grid; gap: 4px; padding-right: 16px; border-right: 1px solid var(--line); }
.r7-library-tree strong { margin-bottom: 8px; font-size: 13px; }
.r7-library-tree button { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 0 10px; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
.r7-library-tree button:hover, .r7-library-tree button.is-active { background: var(--surface-2); color: var(--ink); }
.r7-library-tree button span { font-variant-numeric: tabular-nums; font-size: 12px; }
.r7-resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.r7-resource-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.r7-resource-cover { aspect-ratio: 1.35 / 1; background: var(--surface-2); }
.r7-resource-card strong, .r7-resource-card > span { display: block; padding-inline: 13px; }
.r7-resource-card strong { margin-top: 12px; font-size: 14px; }
.r7-resource-card > span { margin: 4px 0 14px; color: var(--muted); font-size: 12px; }
.r7-settings-layout { display: grid; grid-template-columns: 200px minmax(0, 880px); gap: 48px; align-items: start; }
.r7-settings-nav { display: grid; gap: 4px; }
.r7-settings-nav button { min-height: 38px; padding: 0 12px; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; }
.r7-settings-nav button:hover, .r7-settings-nav button.is-active { background: var(--surface-2); color: var(--ink); }
.r7-settings-content { display: grid; gap: 12px; }
.r7-setting-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.r7-setting-card h2 { font-size: 16px; }
.r7-setting-card p { max-width: 620px; margin-top: 6px; color: var(--muted); white-space: pre-line; font-size: 13px; }
.r7-settings-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }
.r7-credit-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; max-width: 880px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.r7-credit-hero span, .r7-credit-hero small { color: var(--muted); font-size: 12px; }
.r7-credit-hero strong { display: inline-block; margin: 6px 8px 0 0; font-size: 46px; line-height: 48px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.r7-credit-note { color: var(--muted); font-size: 12px; line-height: 20px; text-align: right; }
.r7-recharge-card, .r7-ledger { max-width: 880px; margin-top: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.r7-recharge-card h2, .r7-ledger h2 { font-size: 16px; }
.r7-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.r7-amount { display: grid; gap: 4px; min-height: 72px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: left; }
.r7-amount:hover, .r7-amount.is-selected { border-color: var(--line-strong); background: var(--surface-3); }
.r7-amount strong { font-size: 17px; }
.r7-amount span { color: var(--muted); font-size: 12px; }
.r7-recharge-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--muted); font-size: 13px; }
.r7-recharge-row b { color: var(--ink); }
.r7-ledger-head { display: flex; align-items: center; justify-content: space-between; }
.r7-ledger-head .seg button { min-width: 64px; }
.r7-ledger-row { display: grid; grid-template-columns: 1fr auto 120px; gap: 14px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 13px; }
.r7-ledger-row:last-child { border-bottom: 0; }
.r7-ledger-row b { font-variant-numeric: tabular-nums; }
.r7-ledger-row small { color: var(--muted); text-align: right; }
.r7-dialog-backdrop { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 28px; background: color-mix(in srgb, var(--ink) 34%, transparent); backdrop-filter: blur(12px); }
.r7-flow-dialog { width: min(880px, 100%); max-height: min(760px, calc(100dvh - 56px)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-3); transform-origin: top center; animation: r7-dialog-in .24s var(--ease) both; }
@keyframes r7-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.r7-flow-head { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.r7-flow-head h2 { margin-top: 4px; font-size: 22px; }
.r7-flow-progress { display: flex; align-items: stretch; gap: 8px; padding: 18px 24px 10px; border-bottom: 1px solid var(--line); }
.r7-flow-progress-item { position: relative; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: 18px 16px; column-gap: 8px; flex: 1; min-width: 0; padding: 0; background: transparent; text-align: left; }
.r7-flow-progress-item > span { grid-row: 1 / span 2; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 12px; }
.r7-flow-progress-item strong { overflow: hidden; font-size: 13px; line-height: 18px; }
.r7-flow-progress-item small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 16px; white-space: nowrap; }
.r7-flow-progress-item.is-current > span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.r7-flow-progress-item.is-done > span { border-color: var(--ink); color: var(--ink); }
.r7-flow-progress i { flex: 0 0 34px; height: 1px; margin-top: 14px; background: var(--line-strong); }
.r7-flow-body { min-height: 360px; padding: 24px; transition: min-height .24s var(--ease); }
.r7-flow-step { animation: r7-flow-step-in .24s var(--ease) both; }
@keyframes r7-flow-step-in { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.r7-flow-lead { margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.r7-flow-source-grid, .r7-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.r7-flow-source, .r7-mode-card { display: grid; align-content: start; gap: 8px; min-height: 180px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); text-align: left; }
.r7-flow-source:hover, .r7-mode-card:hover, .r7-flow-source.is-selected, .r7-mode-card.is-selected { border-color: var(--line-strong); background: var(--surface-3); }
.r7-flow-number { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.r7-flow-source strong, .r7-mode-card strong { font-size: 16px; }
.r7-flow-source span:last-child, .r7-mode-card p { color: var(--muted); font-size: 12px; line-height: 19px; }
.r7-flow-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.r7-field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.r7-field.wide { grid-column: 1 / -1; }
.r7-field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field-bg); color: var(--ink); outline: 0; }
.r7-suffix { display: flex; align-items: center; height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field-bg); overflow: hidden; }
.r7-suffix input { height: 40px; border: 0; background: transparent; }
.r7-suffix b { padding-right: 11px; color: var(--muted); font-size: 12px; font-weight: 500; }
.r7-style-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.r7-style-head .r7-flow-lead { margin-bottom: 0; }
.r7-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.r7-style-card { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: 22px 20px; gap: 3px 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: left; }
.r7-style-card:hover, .r7-style-card.is-selected { border-color: var(--line-strong); background: var(--surface-3); }
.r7-style-card > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 18px; }
.r7-style-card strong { font-size: 13px; }
.r7-style-card small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.r7-mode-grid { grid-template-columns: repeat(2, 1fr); }
.r7-mode-card { min-height: 190px; }
.r7-mode-icon { color: var(--muted); }
.r7-mode-icon svg { width: 22px; height: 22px; }
.r7-budget-switch { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink); font-size: 12px; }
.r7-budget-switch input { display: none; }
.r7-budget-switch span { width: 32px; height: 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.r7-budget-switch input:checked + span { background: var(--ink); box-shadow: inset 0 0 0 4px var(--surface); }
.r7-budget-switch em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; }
.r7-mode-foot { margin-top: auto; color: var(--muted); font-size: 11px; }
.r7-flow-foot { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 14px 24px; border-top: 1px solid var(--line); }
.r7-flow-foot > div { display: flex; gap: 8px; }

@media (max-width: 1100px) {
  .prototype-noop, .prototype-variants { display: none; }
  .r7-home .home-content { max-width: 900px; }
  .r7-home .quick-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r7-page { padding-inline: 28px; }
  .r7-settings-layout { gap: 28px; }
}
@media (max-width: 700px) {
  .prototype-pages button { padding-inline: 9px; }
  .topbar { padding-inline: 16px; }
  .credit-pill, .topbar .new-page-button { display: none; }
  .r7-avatar-menu { position: fixed; top: 68px; right: 12px; width: min(330px, calc(100vw - 24px)); }
  .r7-home { padding: 28px 16px 48px; }
  .r7-home .quick-cards, .r7-spec-row, .r7-flow-source-grid, .r7-flow-form, .r7-style-grid, .r7-mode-grid { grid-template-columns: 1fr; }
  .r7-oneclick-panel, .r7-oneclick-card { margin-top: 22px; }
  .r7-dropzone { align-items: flex-start; flex-wrap: wrap; }
  .r7-dropzone div { flex-basis: calc(100% - 52px); }
  .r7-budget-row, .r7-page-head, .r7-credit-hero { align-items: flex-start; flex-direction: column; }
  .r7-page { padding: 24px 16px 48px; }
  .r7-page-head { gap: 16px; }
  .r7-page-actions { width: 100%; }
  .r7-search { flex: 1; width: auto; }
  .r7-library-layout, .r7-settings-layout { grid-template-columns: 1fr; gap: 18px; }
  .r7-library-tree { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: repeat(2, 1fr); }
  .r7-library-tree strong { grid-column: 1 / -1; }
  .r7-amounts { grid-template-columns: repeat(2, 1fr); }
  .r7-ledger-row { grid-template-columns: 1fr auto; }
  .r7-ledger-row small { grid-column: 1 / -1; text-align: left; margin-top: -10px; margin-bottom: 6px; }
  .r7-dialog-backdrop { padding: 12px; }
  .r7-flow-dialog { max-height: calc(100dvh - 24px); }
  .r7-flow-progress { overflow-x: auto; }
  .r7-flow-progress-item { min-width: 118px; }
  .r7-flow-body { min-height: 420px; padding: 18px; overflow: auto; }
  .r7-flow-foot { padding-inline: 18px; }
}

/* 收尾：甲方案三项共用一个底槽，滑块不再溢出。 */
.r7-home-tabs.seg { display: inline-flex; width: auto; min-width: 0; }
.r7-home-tabs > button { flex: 0 0 92px; }
.r7-home-tabs .home-tab-glider { display: block; z-index: 0; width: calc(33.333% - 2px); transition: transform var(--dur-micro) var(--ease); }
.r7-home-tabs.is-drama .home-tab-glider { transform: translateX(100%); }
.r7-home-tabs.is-oneclick .home-tab-glider { transform: translateX(200%); }
.r7-home-tabs.r7-home-tabs-yi .home-tab-glider { width: calc(50% - 2px); }
.r7-home-tabs.r7-home-tabs-yi.is-drama .home-tab-glider { transform: translateX(100%); }
.r7-settings-page > .r7-page-head, .r7-credits-page > .r7-page-head { display: none; }

/* 第 7 轮补充：剧本来源工作台 */
.r7-script-entry-actions { display: flex; justify-content: center; gap: 8px; margin: -8px 0 20px; }
.r7-script-entry-actions .btn { height: 34px; }
.r7-script-page { min-width: 0; }
.r7-script-stage-nav { min-width: 72px; }
.r7-script-stage-nav .stage-nav-item.is-current { background: var(--surface-3); color: var(--ink); }
.r7-script-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.r7-script-workspace { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 20px 24px 0; overflow: hidden; }
.r7-script-source-tabs { display: flex; gap: 22px; flex: none; height: 42px; border-bottom: 1px solid var(--line); }
.r7-script-source-tabs button { position: relative; height: 42px; padding: 0 2px; background: transparent; color: var(--muted); font-size: 15px; }
.r7-script-source-tabs button.is-active { color: var(--ink); font-weight: 650; }
.r7-script-source-tabs button.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.r7-script-import-head { display: flex; align-items: center; gap: 14px; flex: none; min-height: 52px; }
.r7-script-input-tabs { width: max-content; }
.r7-script-input-tabs button { min-width: 76px; }
.r7-script-loaded, .r7-script-upload-line { color: var(--muted); font-size: 13px; }
.r7-script-loaded button, .r7-script-upload-line button { padding: 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.r7-script-import-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 16px; min-height: 0; flex: 1; overflow: hidden; }
.r7-script-source-card, .r7-script-result-card { min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.r7-script-source-card { display: flex; flex-direction: column; padding: 16px; }
.r7-script-paste { flex: 1; min-height: 220px; width: 100%; resize: none; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); line-height: 24px; outline: none; overflow: auto; }
.r7-script-paste:focus { border-color: var(--focus); }
.r7-script-upload-line { display: flex; align-items: center; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.r7-script-parse-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.script-primary { min-width: 92px; }
.r7-script-result-card { padding: 18px; overflow: auto; }
.r7-result-head, .r7-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r7-result-head strong { font-size: 16px; }
.r7-result-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.r7-result-group h3 { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.r7-result-group p { margin: 6px 0; font-size: 13px; }
.r7-result-meta { float: right; color: var(--muted); font-size: 12px; }
.r7-doubt { display: flex; gap: 10px; align-items: start; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warning) 10%, transparent); }
.r7-doubt > span { color: var(--warning); font-size: 12px; font-weight: 650; }
.r7-doubt p { color: var(--muted); font-size: 12px; }
.r7-result-empty { display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.r7-result-empty svg { width: 28px; height: 28px; }
.r7-result-empty strong { color: var(--ink); }
.r7-script-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; min-height: 68px; margin-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.r7-script-actionbar .btn.primary { border-color: var(--cl-spend); background: var(--cl-spend); color: var(--cl-on-spend); }
.r7-script-actionbar .btn.primary:hover { background: var(--cl-spend-hover); }
.r7-novel-steps { display: flex; align-items: center; gap: 22px; flex: none; min-height: 48px; color: var(--muted); font-size: 12px; }
.r7-novel-steps span { position: relative; white-space: nowrap; }
.r7-novel-steps span.is-active { color: var(--ink); font-weight: 650; }
.r7-novel-steps span.is-done { color: var(--ink); }
.r7-novel-steps span + span::before { content: ''; position: absolute; left: -14px; top: 50%; width: 8px; height: 1px; background: var(--line-strong); }
.r7-script-novel-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 12px; min-height: 0; flex: 1; overflow: hidden; transition: grid-template-columns .24s var(--ease); }
.r7-script-novel-layout.left-collapsed { grid-template-columns: 0 minmax(0, 1fr) 260px; gap: 0 12px; }
.r7-script-novel-layout.right-collapsed { grid-template-columns: 240px minmax(0, 1fr) 0; gap: 0 12px; }
.r7-script-novel-layout.left-collapsed.right-collapsed { grid-template-columns: 0 minmax(0, 1fr) 0; gap: 0; }
.r7-script-pane { min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.r7-novel-outline, .r7-novel-analysis { padding: 14px; }
.r7-novel-reading { padding: 14px; }
.r7-script-novel-layout.left-collapsed .r7-novel-outline, .r7-script-novel-layout.right-collapsed .r7-novel-analysis { opacity: 0; pointer-events: none; overflow: hidden; border-width: 0; padding: 0; }
.r7-pane-head { min-height: 28px; margin-bottom: 12px; }
.r7-pane-head strong { font-size: 13px; }
.r7-pane-head .seg { margin: 0 auto; }
.r7-novel-reading-tabs button { min-width: 84px; }
.r7-novel-outline .r7-search { width: 100%; height: 34px; margin-bottom: 12px; }
.r7-search-clear { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.r7-outline-list { display: grid; gap: 4px; }
.r7-outline-list button { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: 20px 18px; column-gap: 8px; padding: 9px 8px; border-radius: 8px; background: transparent; text-align: left; }
.r7-outline-list button.is-selected { background: var(--surface-3); }
.r7-outline-list button > span { grid-row: 1 / span 2; color: var(--muted); font-size: 11px; }
.r7-outline-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.r7-outline-list small { color: var(--muted); font-size: 11px; }
.r7-novel-text-card { padding: 16px; }
.r7-novel-text-card h2 { margin-bottom: 16px; font-size: 17px; }
.r7-novel-text-card p { margin: 0 0 16px; color: var(--ink); font-size: 14px; line-height: 26px; }
.r7-analysis-item { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.r7-analysis-item span:first-child { color: var(--muted); font-size: 12px; }
.r7-analysis-item b { font-size: 13px; font-weight: 550; }
.r7-script-guide { position: absolute; z-index: 20; left: 50%; bottom: 80px; transform: translateX(-50%); }
.r7-script-master { z-index: 30; }

.r7-stepper { display: flex; align-items: center; gap: 10px; min-height: 56px; color: var(--muted); }
.r7-stepper > span { display: grid; grid-template-columns: 26px auto; align-items: center; gap: 7px; white-space: nowrap; }
.r7-stepper > span > b { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 12px; font-weight: 550; }
.r7-stepper > span > strong { font-size: 12px; font-weight: 500; }
.r7-stepper > span.is-active { color: var(--ink); }
.r7-stepper > span.is-active > b { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.r7-stepper > span.is-active > strong { font-weight: 650; }
.r7-stepper > span.is-done { color: var(--ink); }
.r7-stepper > span.is-done > b { border-color: var(--ink); color: var(--ink); }
.r7-stepper > i { flex: 0 0 26px; height: 1px; background: var(--line-strong); }

@media (max-width: 900px) {
  .r7-script-import-grid { grid-template-columns: 1fr; overflow: auto; }
  .r7-script-result-card { min-height: 220px; }
  .r7-script-novel-layout { grid-template-columns: 200px minmax(0, 1fr) 220px; }
  .r7-script-novel-layout.left-collapsed { grid-template-columns: 0 minmax(0, 1fr) 220px; }
  .r7-script-novel-layout.right-collapsed { grid-template-columns: 200px minmax(0, 1fr) 0; }
}
@media (max-width: 700px) {
  .r7-script-workspace { padding: 12px 12px 0; }
  .r7-script-source-tabs { gap: 16px; }
  .r7-novel-steps { gap: 10px; overflow-x: auto; }
  .r7-script-novel-layout { grid-template-columns: 1fr; overflow: auto; }
  .r7-script-novel-layout.left-collapsed, .r7-script-novel-layout.right-collapsed, .r7-script-novel-layout.left-collapsed.right-collapsed { grid-template-columns: 1fr; gap: 8px; }
  .r7-script-pane { min-height: 220px; }
  .r7-script-novel-layout.left-collapsed .r7-novel-outline, .r7-script-novel-layout.right-collapsed .r7-novel-analysis { display: none; }
}

/* 第 7 轮复核修正 */
.r7-home .home-composer-wrap,
.r7-home .r7-oneclick-card,
.r7-home .r7-oneclick-panel { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; }
.r7-home .title-keyword { color: var(--ink); }
.r7-home-tabs { display: inline-flex; width: auto; min-width: 0; }
.r7-home-tabs .home-tab-glider { display: none; }
.r7-home-tabs button[aria-pressed='true'] { background: var(--md-seg-on); color: var(--ink); box-shadow: var(--shadow-1); }
.r7-home-tabs button[aria-pressed='false'] { background: transparent; color: var(--muted); }
.r7-home .home-composer-zone { display: flex; flex-direction: column; align-items: center; }
.r7-home .r7-oneclick-card { order: 2; margin-top: 14px; }
.r7-home .home-composer-wrap { order: 1; }
.r7-home .skill-suggestions { order: 3; width: 100%; }
.r7-oneclick-card { min-height: 132px; padding: 24px 30px; }
.r7-oneclick-panel { margin-top: 24px; }
.r7-page-head .r7-eyebrow, .r7-settings-page .r7-eyebrow, .r7-credits-page .r7-eyebrow, .r7-flow-head .r7-eyebrow, .r7-hero-kicker { display: none; }
.r7-page .btn.primary, .r7-flow-foot .btn.primary { border-color: var(--cl-spend); background: var(--cl-spend); color: var(--cl-on-spend); box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.r7-page .btn.primary:hover, .r7-flow-foot .btn.primary:hover { border-color: var(--cl-spend-hover); background: var(--cl-spend-hover); color: var(--cl-on-spend); }
.r7-avatar-menu { position: fixed; top: calc(var(--prototype-h) + var(--topbar-h) + 10px); right: 16px; z-index: 9999; }
.topbar, .topbar-actions { overflow: visible; }
.r7-avatar-menu .r7-recharge { border-color: var(--line); background: var(--surface-3); color: var(--ink); box-shadow: none; }
.r7-avatar-menu .r7-recharge:hover { border-color: var(--line-strong); background: var(--fill-hover); }
.r7-settings-layout { grid-template-columns: 200px minmax(0, 880px); }
.r7-settings-nav { min-width: 0; }
.r7-profile-empty { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 40px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.r7-profile-empty > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.r7-profile-empty > span svg { width: 22px; height: 22px; }
.r7-profile-empty strong { font-size: 15px; }
.r7-profile-empty p { color: var(--muted); font-size: 12px; }
.r7-credits-layout > section { min-width: 0; }
.r7-amounts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.r7-amount strong, .r7-recharge-row b { font-variant-numeric: tabular-nums; }
.r7-flow-body { min-height: 0; overflow: hidden; }
.r7-flow-form .r7-field.wide { grid-column: 1 / span 2; }
.r7-flow-form .r7-field:nth-child(2) { grid-column: 1; }
.r7-flow-form .r7-field:nth-child(3) { grid-column: 2; }
.r7-flow-form .r7-field:nth-child(4) { grid-column: 3; }
.r7-suffix b { flex: none; white-space: nowrap; }
.r7-ratio-seg { display: flex; width: 100%; height: 42px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field-bg); }
.r7-ratio-seg button { flex: 1; min-width: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; }
.r7-ratio-seg button[aria-pressed='true'] { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-1); }

@media (max-width: 1100px) {
  .prototype-noop { display: none; }
  .prototype-variants { display: flex; flex: none; }
  .prototype-pages button { padding-inline: 8px; }
  .motion-toggle > span:last-child { display: none; }
  .r7-page { padding-inline: 24px; }
  .r7-settings-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .r7-amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .r7-flow-dialog { width: min(880px, calc(100vw - 40px)); }
}
@media (max-width: 700px) {
  .r7-avatar-menu { top: 68px; right: 12px; }
  .r7-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r7-flow-form .r7-field.wide, .r7-flow-form .r7-field:nth-child(2), .r7-flow-form .r7-field:nth-child(3), .r7-flow-form .r7-field:nth-child(4) { grid-column: auto; }
}
