/* 源码样式文件：直接修改，刷新网页或重新渲染预览即可。无构建步骤。 */

:root {
  --bg: #f7f8fa;
  --surface: #fff;
  --ink: #20232b;
  --muted: #787d89;
  --line: #e7e9ee;
  --accent: #4544a3;
  --tint: #f0f0fb;
  --radius: 13px;
  font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color: var(--ink);
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,textarea,select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  background: #fcfcfd;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .02em;
}

.brand-icon,.login-logo {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  background: #292b38;
  color: #fff;
  border-radius: 12px;
  font-size: 20px;
}

.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 5px;
}

.nav-caption {
  font-size: 11px;
  color: #989ca6;
  letter-spacing: 1.1px;
  margin: 46px 12px 14px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  margin: 4px 0;
  border-radius: 8px;
  color: #707582;
  font-size: 13px;
}

nav a.active {
  background: #eeeeF8;
  color: #404093;
  font-weight: 600;
}

nav a:hover {
  background: #f1f2f5;
}

.nav-icon {
  font-size: 19px;
  width: 20px;
  line-height: 1;
}

.nav-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}

nav a.active .nav-dot {
  display: block;
}

.sidebar-note {
  margin-top: auto;
  font-size: 11px;
  color: #858a96;
  line-height: 1.9;
  padding: 16px 10px 0;
}

.mini-label {
  font-size: 11px;
  color: #4b505c;
}

.sidebar-note p {
  margin: 9px 0 18px;
}

.local-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #88a38e;
  border-radius: 50%;
  margin-right: 8px;
}

.workspace {
  margin-left: 220px;
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 66px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.slash {
  margin: 0 15px;
  color: #c7cad2;
}

.topbar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.badge,.subtle-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  background: #f2f3f5;
  color: #737885;
}

.badge.live {
  background: #fff1dc;
  color: #915b19;
}

.badge.mock {
  background: #f0f0fb;
  color: #5a58a0;
}

main {
  padding: 34px 38px 56px;
  max-width: 1660px;
  margin: auto;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #8c91a0;
  margin-bottom: 10px;
}

h1 {
  font-size: 28px;
  letter-spacing: -.6px;
  margin: 0 0 10px;
  font-weight: 650;
}

h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 620;
}

h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 20px 0 10px;
}

p {
  color: var(--muted);
  line-height: 1.85;
  margin: 8px 0;
}

.page-heading p {
  font-size: 12px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(380px,1fr) minmax(340px,1fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 2px 3px #20232b02;
}

.card-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.card-heading p {
  font-size: 11px;
  margin: 4px 0 0;
}

.card-heading .subtle-badge {
  margin-left: auto;
}

.step {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #7d81a0;
  background: #f5f5fa;
  font-size: 11px;
  font-weight: 600;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #4d5360;
  margin: 16px 0;
}

input:not([type=checkbox]):not([type=radio]),textarea,select {
  width: 100%;
  border: 1px solid #e1e4eb;
  background: #fff;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: #393e4c;
  min-height: 38px;
  outline: none;
  transition: border .12s;
}

textarea {
  resize: vertical;
  line-height: 1.85;
  min-height: 70px;
}

input::placeholder,textarea::placeholder {
  color: #a6aab5;
  font-size: 11px;
}

input:focus,textarea:focus,select:focus {
  border-color: #a1a0ce;
  box-shadow: 0 0 0 3px #f1f1fa;
}

input[type=checkbox],input[type=radio] {
  accent-color: var(--accent);
  margin: 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.two-cols label {
  margin-top: 12px;
}

.two-cols>select,.two-cols>input {
  align-self: center;
}

.chip-field {
  padding: 0;
  margin: 0;
  border: 0;
}

.chip-field legend {
  font-size: 12px;
  color: #4d5360;
  margin-bottom: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips label {
  margin: 0;
  position: relative;
  display: block;
  cursor: pointer;
}

.chips input {
  position: absolute;
  opacity: 0;
}

.chips span {
  display: block;
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 6px;
  font-size: 11px;
  color: #7f8490;
}

.chips input:checked+span {
  background: var(--tint);
  color: #5957a2;
  border-color: #d8d7ef;
}

.chips input:focus-visible+span {
  outline: 2px solid var(--accent);
}

.button {
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 11px 16px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  line-height: 1.4;
  white-space: nowrap;
}

.button.primary {
  background: #414080;
  color: white;
  box-shadow: 0 2px 3px #33336318;
}

.button.primary:hover {
  background: #333263;
}

.button.secondary {
  background: #fff;
  border-color: #e0e3e9;
  color: #646a78;
}

.button.secondary:hover {
  background: #f8f8fc;
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.text-btn {
  background: transparent;
  border: 0;
  padding: 5px 2px;
  color: #696c9c;
  font-size: 11px;
}

.text-btn:hover {
  text-decoration: underline;
}

.danger {
  color: #ac5858;
}

.callout {
  padding: 12px 15px;
  border-radius: 7px;
  background: #f6f6fb;
  color: #777a93;
  font-size: 11px;
  line-height: 1.8;
}

.callout.compact {
  padding: 10px 12px;
  margin-bottom: 15px;
}

.goal-row {
  padding: 14px;
  background: #fcfcfe;
  border: 1px solid #e9eaf1;
  border-radius: 8px;
  margin-bottom: 12px;
}

.goal-row label {
  margin: 10px 0;
}

.goal-row-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goal-row-top label {
  flex: 1;
}

.goal-row-top button {
  flex-shrink: 0;
}

.goal-row .two-cols {
  gap: 10px;
}

.add-row {
  width: 100%;
  background: #fff;
  border: 1px dashed #d4d7e3;
  color: #83879b;
  margin: 3px 0 8px;
}

.submit-card {
  padding: 18px 2px;
}

.submit-card p {
  font-size: 11px;
  margin: 0;
}

.submit-card .button-row {
  margin-top: 12px;
}

.submit-card .primary {
  min-width: 174px;
}

.status {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-top: 12px;
  overflow-wrap: anywhere;
}

.status.error {
  color: #a24545;
}

.status.success {
  color: #447557;
}

.status.info {
  color: #6366a0;
}

.output-column {
  position: sticky;
  top: 20px;
}

.result-card {
  padding: 0;
  overflow: hidden;
}

.result-top {
  padding: 24px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-top h2 {
  font-size: 17px;
}

.result-top .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}

.tabs {
  display: flex;
  gap: 23px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #9398a3;
  font-size: 11px;
  padding: 12px 0;
}

.tabs button.active {
  color: #515187;
  border-bottom-color: #6967a9;
}

.empty-state {
  min-height: 560px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 50% 40%,#f9f9ff,white 65%);
}

.paper-icon {
  width: 63px;
  height: 77px;
  border: 1px solid #dfe0ec;
  border-radius: 8px;
  box-shadow: 7px 8px 0 #f1f1f9;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  margin-bottom: 25px;
  transform: rotate(-5deg);
}

.paper-icon i {
  display: block;
  width: 100%;
  height: 3px;
  background: #dcdce9;
  border-radius: 2px;
}

.paper-icon i:last-child {
  width: 60%;
}

.empty-state h3 {
  font-size: 17px;
  color: #565b6b;
  font-weight: 500;
  margin: 8px 0;
}

.empty-state p {
  font-size: 12px;
  line-height: 2.1;
}

.empty-state small {
  font-size: 10px;
  color: #a4a8b2;
  margin-top: 35px;
}

.empty-steps {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 10px;
  margin-top: 23px;
  color: #8e92a6;
}

.empty-steps b {
  font-weight: 400;
  color: #c4c6d5;
}

#report-frame {
  width: 100%;
  height: 680px;
  border: 0;
  background: white;
  display: block;
}

.result-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #9a9faa;
}

.result-footer>div {
  display: flex;
  gap: 12px;
}

#report-warnings {
  padding: 0 20px 12px;
}

#report-warnings:empty {
  display: none;
}

.under-note {
  display: flex;
  gap: 12px;
  padding: 0 14px;
  color: #8f93a6;
  font-size: 12px;
}

.under-note>span {
  font-size: 20px;
  margin-top: 6px;
}

.under-note p {
  font-size: 11px;
  line-height: 1.9;
}

.under-note strong {
  font-weight: 500;
  color: #707588;
}

.developer-box {
  background: transparent;
  border: 1px dashed #dce0e8;
  border-radius: 8px;
  padding: 14px;
  font-size: 11px;
  color: #9296a3;
}

.developer-box summary {
  cursor: pointer;
  color: #7e8392;
}

.developer-box p {
  font-size: 11px;
}

.code,pre,code {
  font-family: "SFMono-Regular",Consolas,"Liberation Mono","Microsoft YaHei",monospace;
}

.code {
  font-size: 11px;
  line-height: 1.85;
}

.switch-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.7;
}

.trace-pane {
  padding: 20px;
  max-height: 680px;
  min-height: 560px;
  overflow: auto;
}

.trace-pane pre {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  line-height: 1.8;
}

.hint {
  font-size: 11px;
  color: #8a8f9d;
  line-height: 1.85;
}

.mode-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
  align-items: center;
}

.mode-card p {
  font-size: 11px;
}

.mode-card label {
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 22px;
}

.model-list-card {
  align-self: start;
}

.model-list-card h2 {
  margin-bottom: 16px;
}

.model-tile {
  display: block;
  text-align: left;
  border: 1px solid #e9eaf0;
  background: #fff;
  width: 100%;
  padding: 14px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.model-tile.selected {
  border-color: #b9b8db;
  background: #f8f8fd;
}

.model-tile strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.model-tile small {
  display: block;
  font-size: 10px;
  color: #8c91a0;
  overflow-wrap: anywhere;
  margin-top: 7px;
}

.checks {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.checks label {
  flex-direction: row;
  align-items: center;
  font-size: 11px;
  margin: 8px 0;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 25px 0;
}

.parameter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.prompt-grid {
  display: grid;
  grid-template-columns: minmax(400px,1.9fr) minmax(230px,1fr);
  gap: 22px;
}

.prompt-editor {
  min-height: 620px;
  background: #fcfcfe;
  line-height: 1.95;
}

.number-note {
  display: flex;
  gap: 13px;
  margin-top: 18px;
}

.number-note b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  background: #f3f3f9;
  border-radius: 6px;
  font-size: 10px;
  flex-shrink: 0;
}

.number-note p {
  font-size: 12px;
  margin: 0;
}

.system-box summary {
  font-size: 12px;
  cursor: pointer;
}

.system-box pre {
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.9;
  color: #808695;
}

.handoff-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.handoff-grid h2 {
  margin: 18px 0 12px;
}

.handoff-grid p {
  font-size: 12px;
}

.handoff-command {
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.9;
  background: #f5f6fa;
  padding: 15px;
  border-radius: 8px;
}

.pipeline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 25px 0;
}

.pipeline span {
  padding: 9px 12px;
  background: #f3f4f8;
  border-radius: 6px;
  font-size: 12px;
}

.pipeline b {
  align-self: center;
  font-weight: 400;
  color: #b0b4c1;
}

dialog {
  border: 1px solid #e0e2ea;
  border-radius: 17px;
  padding: 36px;
  width: 410px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 80px #1b224024;
}

dialog::backdrop {
  background: #25263845;
  backdrop-filter: blur(5px);
}

.login-logo {
  margin-bottom: 28px;
}

dialog h2 {
  font-size: 22px;
}

dialog p {
  font-size: 12px;
}

dialog .button {
  width: 100%;
  margin-top: 10px;
}

dialog small {
  display: block;
  font-size: 10px;
  color: #a2a6b1;
  margin-top: 22px;
}

#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #303343;
  color: white;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 12px;
  box-shadow: 0 4px 20px #0002;
  max-width: 90vw;
  z-index: 20;
}

#stale-warning {
  margin: 12px 18px 0;
}

button:focus-visible,a:focus-visible {
  outline: 2px solid #7777b6;
  outline-offset: 3px;
}

@media (min-width:1650px) {
  #report-frame {
    height: 770px;
  }

}

@media (max-width:1160px) {
  .sidebar {
    width: 185px;
    padding: 28px 16px;
  }

  .workspace {
    margin-left: 185px;
  }

  main {
    padding: 28px 24px;
  }

  .topbar {
    padding: 0 24px;
  }

  .workspace-grid {
    gap: 17px;
    grid-template-columns: minmax(310px,1fr) minmax(300px,1fr);
  }

  .card {
    padding: 20px;
  }

  .result-card {
    padding: 0;
  }

  .brand {
    font-size: 16px;
  }

  .card-heading .subtle-badge {
    display: none;
  }

  .button {
    padding: 10px 13px;
  }

  .settings-grid {
    grid-template-columns: 205px 1fr;
  }

}

@media (max-width:940px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .output-column {
    position: static;
  }

  .empty-state {
    min-height: 350px;
  }

  .mode-card {
    grid-template-columns: 1fr 1fr;
  }

  .mode-card>div {
    grid-column: 1/-1;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .handoff-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: flex-start;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .model-list-card {
    margin-bottom: 0;
  }

  #model-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .model-tile {
    width: 200px;
  }

}

@media (max-width:660px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    font-size: 16px;
  }

  .brand-icon {
    width: 33px;
    height: 33px;
    font-size: 17px;
  }

  .nav-caption,.sidebar-note {
    display: none;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
  }

  nav a {
    font-size: 11px;
    padding: 8px;
    gap: 6px;
    margin: 0;
  }

  .nav-icon {
    font-size: 15px;
    width: auto;
  }

  .nav-dot {
    display: none !important;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    height: 50px;
    padding: 0 18px;
  }

  .topbar-right {
    gap: 12px;
  }

  main {
    padding: 24px 16px;
  }

  .page-heading {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 24px;
  }

  .card {
    padding: 18px;
  }

  .result-card {
    padding: 0;
  }

  .two-cols {
    gap: 10px;
  }

  .checks {
    gap: 10px;
  }

  .mode-card {
    grid-template-columns: 1fr;
  }

  .mode-card>div {
    grid-column: auto;
  }

  .result-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .input-column,.output-column {
    min-width: 0;
  }

  .prompt-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .button-row {
    gap: 8px;
  }

}

/* v2：普通填写页与独立管理后台。不是通过隐藏同一组菜单模拟权限。
   普通页视觉对齐学生端原型 college-accompanying-report-demo-v2.html。 */
.public-page {
  --navy: #1e2640;
  --blue: #3d52a0;
  --blue-soft: #edf1fa;
  --coral: #cf5e42;
  --coral-soft: #fbf0ec;
  --mint: #2e7d6b;
  --mint-soft: #eaf5f2;
  --yellow: #d48b28;
  --yellow-soft: #fef7ec;
  --paper: #fff;
  --page: #f8f7f4;
  --line: #ebe7e1;
  --text: #2c344b;
  --muted: #868e9f;
  --shadow: 0 7px 22px rgba(30, 38, 64, .07);
}

body.public-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #eff0f6;
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.public-page .device {
  position: relative;
  padding: 0;
  margin: 0;
  width: min(100vw, 430px);
  height: min(100vh, 932px);
  max-width: none;
  overflow: hidden;
  background: var(--page);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
}

.public-page .device-status {
  height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px 8px;
  background: #fffdfb;
  color: #161923;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.public-page .signal { letter-spacing: 2px; font-size: 10px; }

.public-page .topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #fffdfb;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.public-page .brand { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 16px; font-weight: 750; letter-spacing: 0; }
.public-page .mark {
  position: relative;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 9px 9px 9px 3px;
  background: var(--coral);
  display: inline-block;
  flex: none;
}
.public-page .mark:before,
.public-page .mark:after {
  position: absolute;
  content: "";
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
}
.public-page .mark:before { top: 1px; left: 1px; }
.public-page .mark:after { right: 1px; bottom: 1px; }
.public-page .role {
  height: 21px;
  padding: 2px 8px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.public-page .chrome { display: flex; gap: 6px; align-items: center; }
.public-page .circle,
.public-page .capsule { height: 27px; border: 1px solid #dce2eb; background: #fffdfb; display: inline-block; }
.public-page .circle { width: 27px; border-radius: 50%; }
.public-page .capsule { width: 43px; border-radius: 15px; }

/* 视图容器 */
.public-page .page {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.public-page .page.active { display: flex; flex-direction: column; animation: in .28s ease both; }
@keyframes in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.public-page .mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px;
  background: #fffdfb;
  flex: none;
}
.public-page .mini-head h1 { margin: 0; color: var(--navy); font-size: 17px; font-weight: 750; letter-spacing: 0; }
.public-page .head-spacer { width: 60px; }
.public-page .back,
.public-page .example-btn {
  min-width: 60px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.public-page .example-btn { text-align: right; }
.public-page .back:first-child { text-align: left; }
.public-page .back:last-child { text-align: right; }

/* 步骤条 */
.public-page .steps {
  display: flex;
  gap: 8px;
  padding: 4px 18px 12px;
  background: #fffdfb;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.public-page .step-tab {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: #f1f3f7;
  color: #7e8799;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.public-page .step-tab.active { background: var(--navy); color: #fff; }

/* 表单区域 */
.public-page .form-surface {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 16px;
  padding: 16px 4px 24px;
}
.public-page .form-step { display: none; }
.public-page .form-step.active { display: block; }
.public-page .step-title h2 { margin: 0 0 4px; font-size: 16px; color: var(--navy); font-weight: 700; }
.public-page .step-title p { margin: 0 0 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.public-page .step-title { margin-bottom: 14px; }
.public-page .field { margin-bottom: 18px; }
.public-page .field > label,
.public-page .chip-field legend {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
}
.public-page .hint,
.public-page .field .hint { margin: 0 0 8px; font-size: 11px; color: var(--muted); line-height: 1.5; }

.public-page input:not([type=checkbox]):not([type=radio]),
.public-page select,
.public-page textarea {
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.public-page input:focus,
.public-page select:focus,
.public-page textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 82, 160, .08); }
.public-page input::placeholder,
.public-page textarea::placeholder { color: #a6adb9; font-size: 12px; }
.public-page textarea { height: 72px; min-height: 72px; resize: none; line-height: 1.5; }

.public-page .form-grid,
.public-page .two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.public-page .two-cols > label,
.public-page .goal-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.public-page .score-reference-row { margin-top: 10px; }

/* 单选/多选块：原型 option 按钮 */
.public-page .option-row { display: flex; gap: 8px; flex-wrap: wrap; }
.public-page .option-row + .option-row { margin-top: 8px; }
.public-page .option {
  position: relative;
  flex: 1;
  min-width: 60px;
  height: 36px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  background: #fff;
  color: #556075;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.public-page .option input,
.public-page .chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.public-page .option:has(input:checked),
.public-page .option.selected { border-color: var(--navy); background: var(--navy); color: #fff; }
.public-page .option:has(input:focus-visible),
.public-page .chip:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 多选兴趣：原型 future 胶囊 */
.public-page .chip-field { border: 0; padding: 0; margin: 0 0 18px; }
.public-page .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.public-page .chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid #dce1ea;
  border-radius: 14px;
  background: #fff;
  color: #636d80;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.public-page .chip:has(input:checked),
.public-page .chip.selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.public-page .choice-note { margin-top: 6px; font-size: 11px; color: var(--coral); font-weight: 600; }

/* 成绩 */
.public-page .total-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
}
.public-page .total-score b { font-size: 22px; color: var(--navy); }
.public-page .total-score small { color: #6e7da2; font-size: 11px; font-weight: 400; }
.public-page .score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.public-page .score {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  background: #fff;
}
.public-page .score span { min-width: 34px; font-weight: 600; font-size: 12px; color: var(--navy); white-space: nowrap; }
.public-page .score input.score-input {
  flex: 1;
  min-width: 0;
  padding: 4px;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}
.public-page .score input.score-input:disabled { background: transparent; }
.public-page .score small { color: var(--muted); font-size: 10px; }

.public-page .city-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.public-page .city-selects select:disabled { color: #a7afba; background: #f5f6f8; }

/* 快捷词 */
.public-page .examples { margin-top: 8px; }
.public-page .future { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.public-page .future button {
  padding: 4px 10px;
  border: 1px solid #dce1ea;
  border-radius: 14px;
  background: #fff;
  color: #636d80;
  font-size: 11px;
  cursor: pointer;
}
.public-page .future button.selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 600; }

/* 动态目标行 */
.public-page .goal-row { padding: 12px; margin-bottom: 10px; border: 1px solid #e5e0d7; border-radius: 10px; background: #fff; }
.public-page .goal-row > label { margin-top: 10px; }
.public-page .goal-row .two-cols { margin-top: 10px; }
.public-page .goal-row-top { display: flex; align-items: flex-end; gap: 8px; }
.public-page .goal-row-top label { flex: 1; }
.public-page .add-row {
  width: 100%;
  height: 38px;
  margin-top: 4px;
  border: 1px dashed #cfd5e0;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.public-page .remove-row { padding: 4px; border: 0; background: transparent; color: var(--coral); font-size: 11px; cursor: pointer; }

/* 底部操作 */
.public-page .form-actions {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex: none;
}
.public-page .action-btn {
  flex: 1;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #dce1ea;
  border-radius: 21px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.public-page .action-btn.primary { border-color: var(--coral); background: var(--coral); color: #fff; font-weight: 750; }
.public-page .action-btn:disabled { opacity: .45; cursor: not-allowed; }
.public-page .send-notice-text {
  flex: none;
  margin: 0;
  padding: 0 16px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}
.public-page .status { flex: none; margin: 0; padding: 6px 16px; font-size: 11px; color: #7b8595; text-align: center; background: #fff; }
.public-page .status:empty { display: none; }
.public-page .status.error { color: var(--coral); }
.public-page .status.success { color: var(--mint); }

/* 生成中 */
.public-page .generation {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  text-align: center;
}
.public-page .orbit {
  width: 48px;
  height: 48px;
  border: 3px solid #e0e5f2;
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.public-page .generation h1 { margin: 20px 0 6px; font-size: 18px; color: var(--navy); font-weight: 750; letter-spacing: 0; }
.public-page .generation p { margin: 0 0 24px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.public-page .generation .progress { width: 100%; height: 6px; border-radius: 3px; background: #e7eaf2; overflow: hidden; }
.public-page .generation .progress i { display: block; height: 100%; width: 18%; background: var(--coral); transition: width .2s ease; }
.public-page .generation .progress i.pending { animation: progress-wait 1.6s ease-in-out infinite; }
@keyframes progress-wait {
  from { transform: translateX(-100%); }
  to { transform: translateX(560%); }
}
.public-page .percent { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--navy); }
.public-page .generation-cancel { margin-top: 22px; width: 160px; display: flex; }

/* 报告视图：页头固定，报告正文在 iframe 内滚动，章节导航吸顶于 iframe 顶部 */
.public-page .report-page { background: #fffdf9; }
.public-page .report-page .mini-head { border-bottom: 1px solid var(--line); background: #fffdf9; }
.public-page .report-page .mini-head h1 { font-size: 16px; letter-spacing: .3px; }
.public-page .report-frame-container { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.public-page #report-frame { flex: 1; width: 100%; height: 100%; min-height: 0; border: 0; background: #fffdf9; display: block; }
.public-page .report-fallback {
  flex: 1;
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.8 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
}

.public-page #toast {
  position: absolute;
  z-index: 28;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 9px 15px;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.public-page #toast.show { opacity: 1; }

@media (max-width: 479px) {
  .public-page .device { width: 100vw; height: 100vh; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .public-page .page.active,
  .public-page .orbit,
  .public-page .generation .progress i.pending { animation: none; }
}


.form-preview-scroll .form-step {
  display: block !important;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1e5ee;
}
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:440px;max-width:100%;padding:34px}.login-card>.brand-icon{display:grid;place-items:center;margin-bottom:24px}.login-card h1{font-size:25px;margin:10px 0 8px}.login-card form{margin-top:25px}.login-card .button{width:100%;margin-top:8px}.login-card .muted{line-height:1.8}
.admin-page .brand{margin-top:5px}.admin-page .sidebar-note a{font-size:12px;color:var(--accent)}.admin-page .nav-caption{margin-top:35px}.admin-page .page-heading h1{font-size:28px}.admin-page .form-toolbar{padding:20px 22px;display:flex;align-items:center;justify-content:space-between;gap:15px}.form-toolbar .hint{margin-bottom:0}.form-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}.form-source{min-width:0;padding:24px}.form-source .card-heading{margin-bottom:16px}.quick-add{background:#f8f9fb;border:1px solid var(--line);padding:16px;border-radius:8px;margin-bottom:22px}.quick-add label{font-size:12px}.quick-add .button{font-size:12px}.form-code{width:100%;height:560px;resize:vertical;font-size:12px;line-height:1.8;background:#fcfcfe}.source-label{margin-bottom:8px}.form-source>.button-row{margin-top:12px}.form-preview-column{min-width:0}.preview-heading{display:flex;align-items:center;justify-content:space-between;margin:4px 0 8px}.preview-heading h2{margin:0;font-size:16px}.form-preview-scroll{max-height:865px;overflow:auto;border:1px solid var(--line);padding:14px;background:#f2f3f7;border-radius:10px}.form-preview-scroll .card{padding:18px;margin-bottom:12px;box-shadow:none}.form-preview-scroll h2{font-size:15px}.form-preview-scroll .card-heading{gap:10px}.form-preview-scroll .card-heading p{font-size:11px}.form-preview-scroll .card-heading .subtle-badge{display:none}.form-preview-scroll .step{width:24px;height:24px;font-size:10px}.form-preview-scroll .two-cols{gap:12px}.form-preview-scroll .chips{gap:6px}.form-preview-scroll .chips span{padding:7px 9px;font-size:11px}.code-preview{overflow:auto;max-height:420px;white-space:pre-wrap;overflow-wrap:anywhere;background:#f8f9fb;padding:14px;border-radius:7px;font:12px/1.8 monospace}.compact{padding:15px;margin-top:16px}.admin-debug{margin-top:24px}.admin-page #form-status:empty{display:none}.admin-page .status{white-space:pre-wrap}.form-preview-scroll .rows:empty{display:none}
@media(min-width:1600px){.admin-page main{max-width:1450px}}
@media(max-width:1050px){.form-editor-grid{grid-template-columns:1fr}.form-preview-scroll{max-height:700px}.form-toolbar{flex-wrap:wrap}}
