/* 2026-08-29：播放器和 DeepSeek 状态提示随问卷主题显示。 */
:root {
  --ink: #18211f;
  --muted: #64706b;
  --line: #d9e1dc;
  --paper: #f7f4ec;
  --panel: #fffdf7;
  --sage: #497568;
  --mint: #d9eee2;
  --gold: #d59f3a;
  --coral: #ce6d55;
  --blue: #415d86;
  --shadow: 0 18px 50px rgba(36, 45, 42, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(73, 117, 104, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(206, 109, 85, 0.12), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(24, 33, 31, 0.12);
}

.survey-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.project-logo {
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 1px solid rgba(24, 74, 63, 0.24);
  border-radius: 19px;
  box-shadow: 0 12px 30px rgba(25, 70, 59, 0.16);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 700;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.status-pill {
  min-width: 92px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  text-align: center;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  padding: 24px clamp(18px, 4vw, 48px) 48px;
}

.progress-panel,
.report-panel {
  position: sticky;
  top: 20px;
  align-self: start;
  min-width: 0;
  padding: 18px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  margin-bottom: 14px;
  border: 10px solid var(--mint);
  border-top-color: var(--sage);
  border-radius: 50%;
  color: var(--sage);
  font-size: 24px;
  font-weight: 800;
}

.draft-status {
  margin: 8px 0 0;
  padding: 10px 11px;
  border: 1px solid rgba(73, 117, 104, 0.22);
  border-radius: 8px;
  background: rgba(217, 238, 226, 0.52);
  color: #3f665b;
  font-size: 12px;
  line-height: 1.55;
}

.steps {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.step-link {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.step-link.active {
  border-color: var(--sage);
  background: var(--mint);
  color: var(--ink);
}

.survey {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.section-block,
.submit-band {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head span {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-weight: 800;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field[hidden] {
  display: none;
}

.field label,
.question-title {
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 6px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.question {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.question:first-child {
  border-top: 0;
}

.question-number {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 24px;
  margin: 0 0 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
}

.section-note { color: var(--muted); line-height: 1.6; }
.question-image { display: block; width: min(100%, 680px); margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; }
.image-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.image-pair img { width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.image-choice-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.image-option { min-width: 0; }
.image-option span { display: grid; align-content: start; gap: 8px; min-height: 210px; }
.image-option img { width: 100%; max-height: 150px; object-fit: cover; border-radius: 4px; }
.task-card { margin-top: 18px; padding: 18px; border: 1px solid var(--line); background: #fff; }
.task-card h3 { margin: 0 0 8px; }
.task-card fieldset { margin: 16px 0; padding: 14px; border: 1px solid var(--line); }
.task-card legend { padding: 0 6px; font-weight: 800; }
.decision { display: block; margin: 8px 0; padding: 12px; border: 1px solid var(--line); cursor: pointer; }
.decision input { width: auto; min-height: 0; margin-right: 8px; }
.decision small, .permission small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.5; }
.download-stage { margin-top: 14px; }
.fake-search-page { padding: 14px; border: 1px solid #c8d8d2; background: #f7fbf8; }
.search-box { display: grid; gap: 8px; font-weight: 800; }
.search-box input { min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font: inherit; }
.search-results { display: grid; gap: 10px; margin-top: 14px; }
.search-result-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.search-result-card input { width: auto; min-height: 0; margin-top: 4px; }
.search-result-card span { display: grid; gap: 4px; min-width: 0; }
.search-result-card code { color: var(--sage); white-space: normal; word-break: break-word; }
.official-site, .warning-panel, .flow-end { padding: 14px; border: 1px solid var(--line); background: #fff; line-height: 1.6; }
.official-site h4 { margin: 0 0 8px; font-size: 18px; }
.warning-panel { border-color: #e2bd7f; background: #fff8e6; }
.permission { display: grid; grid-template-columns: 150px 1fr auto auto auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.permission label { white-space: nowrap; }
.permission input { width: auto; min-height: 0; }
.task-text { display: grid; gap: 8px; margin-top: 14px; font-weight: 700; }
.source-text { padding: 14px; background: #f4f7fb; border-left: 4px solid var(--blue); line-height: 1.7; }

.ai-revision-task {
  --agent-ink: #173a31;
  --agent-green: #2f6a55;
  --agent-green-dark: #21513f;
  --agent-soft: #eef6f1;
  --agent-cream: #fbf8f1;
  padding: clamp(20px, 3vw, 30px);
  border-color: #d9e2dd;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(35, 58, 50, .08);
}

.ai-task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
}

.ai-task-copy { min-width: 0; }
.ai-task-copy .question-number { margin-bottom: 8px; }
.ai-task-copy h3 {
  margin-bottom: 8px;
  color: var(--agent-ink);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(23px, 2.7vw, 29px);
}
.ai-task-copy .task-prompt { margin-bottom: 0; color: #58665f; line-height: 1.65; }

.agent-status-pill {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  max-width: 190px;
  padding: 9px 13px;
  border: 1px solid #cfe1d7;
  border-radius: 999px;
  background: #f1f8f4;
  color: var(--agent-green-dark);
}

.connection-dot {
  flex: 0 0 auto;
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d1a33f;
  box-shadow: 0 0 0 4px rgba(209, 163, 63, .13);
}
.agent-status-copy { display: grid; min-width: 0; line-height: 1.25; }
.agent-status-copy b { font-size: 13px; white-space: nowrap; }
.agent-status-copy small { max-width: 150px; margin-top: 2px; overflow: hidden; color: #66766e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.agent-status-pill.is-connected .connection-dot { background: #3b946b; box-shadow: 0 0 0 4px rgba(59, 148, 107, .13); }
.agent-status-pill.is-fallback .connection-dot { background: #d1a33f; }
.agent-status-pill.is-local .connection-dot { background: #809d91; }
.agent-status-pill.is-working .connection-dot { animation: connection-pulse 1s ease-in-out infinite; }

.ai-compose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
  border: 1px solid #e0e4df;
  border-radius: 14px;
  background: #fffefb;
}

.ai-source-panel,
.ai-request-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.ai-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--agent-ink); }
.ai-panel-heading b,
.ai-panel-heading label { font-size: 16px; font-weight: 800; }
.ai-panel-heading > span {
  padding: 3px 8px;
  border: 1px solid #dde5e0;
  border-radius: 999px;
  background: #f7f8f6;
  color: #738078;
  font-size: 10px;
  font-weight: 900;
}
.ai-panel-heading > span.is-required { border-color: var(--agent-green); background: var(--agent-green); color: #fff; }

.ai-revision-task .source-text {
  min-height: 162px;
  margin: 0;
  padding: 16px;
  border: 1px solid #eadfcd;
  border-left: 0;
  border-radius: 10px;
  background: var(--agent-cream);
  color: #303a36;
  line-height: 1.75;
}
.ai-revision-task .source-text p { margin: 0; }

.ai-request-panel > textarea,
.ai-follow-up textarea {
  min-height: 100px;
  border: 1px solid #b9d0c4;
  border-radius: 10px;
  background: #fff;
  line-height: 1.6;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.ai-request-panel > textarea { min-height: 112px; }
.ai-request-panel textarea:hover { border-color: #7fa693; }
.ai-request-panel textarea:focus-visible {
  outline: 0;
  border-color: var(--agent-green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 106, 85, .13);
}
.ai-field-help { margin: -3px 0 0; color: #748079; font-size: 11px; line-height: 1.5; }

.ai-follow-up {
  border-top: 1px solid #edf0ed;
  padding-top: 7px;
}
.ai-follow-up summary { color: var(--agent-green); font-size: 12px; font-weight: 800; cursor: pointer; }
.ai-follow-up-field { display: grid; gap: 7px; padding-top: 10px; }
.ai-follow-up-field label { color: var(--agent-ink); font-size: 12px; font-weight: 800; }
.ai-follow-up-field textarea { min-height: 82px; }

.draft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 9px;
  min-width: 174px;
  min-height: 45px;
  border: 1px solid #1f4b40;
  border-radius: 8px;
  padding: 9px 18px;
  background: var(--agent-green-dark);
  box-shadow: 0 6px 14px rgba(33, 76, 66, .16);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.draft-button:hover:not(:disabled) { transform: translateY(-1px); background: #173e35; box-shadow: 0 11px 22px rgba(33, 76, 66, .25); }
.draft-button:focus-visible { outline: 3px solid rgba(215, 170, 79, .55); outline-offset: 3px; }
.draft-button:disabled { opacity: .78; cursor: wait; }
.draft-button-icon { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.button-spinner { display: none; width: 17px; aspect-ratio: 1; border: 2px solid rgba(255, 255, 255, .38); border-top-color: #fff; border-radius: 50%; animation: button-spin .7s linear infinite; }
.draft-button.is-loading .draft-button-icon { display: none; }
.draft-button.is-loading .button-spinner { display: block; }

.ai-generation-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px solid #e6dfcf;
  border-radius: 9px;
  background: #fbf8f1;
  color: #68736d;
  font-size: 11px;
  line-height: 1.55;
}
.ai-generation-status span { flex: 0 0 auto; color: #8a713a; font-weight: 900; }
.ai-generation-status p { margin: 0; }
.ai-generation-status.is-working { border-color: #c8d8d0; background: #f1f7f4; color: #4f6259; }
.ai-generation-status.is-working span { color: var(--agent-green); }
.ai-generation-status.is-success { border-color: #bcd8ca; background: #eef8f2; color: #365b49; }
.ai-generation-status.is-success span { color: #247148; }
.ai-generation-status.is-fallback { border-color: #e7d8ae; background: #fff9e9; color: #6e5b2e; }

.final-draft {
  gap: 11px;
  margin-top: 12px;
  padding: 16px 18px 18px;
  border: 1px solid #dce3df;
  border-radius: 12px;
  background: #fff;
}
.final-draft-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.final-draft-head label { display: flex; align-items: center; gap: 9px; color: var(--agent-ink); cursor: pointer; }
.final-draft-head > span { color: #6f7e79; font-size: 11px; font-weight: 600; }
.final-draft textarea { min-height: 118px; border-color: #b9d0c4; border-radius: 9px; background: #fff; line-height: 1.7; }
.final-draft textarea:focus-visible { outline: 0; border-color: var(--agent-green); box-shadow: 0 0 0 3px rgba(52, 107, 93, .14); }

@keyframes connection-pulse { 50% { opacity: .45; transform: scale(.8); } }
@keyframes button-spin { to { transform: rotate(360deg); } }

.download-scenario {
  padding: 0;
  overflow: hidden;
  background: #fbfcff;
}

.download-scenario > .question-number {
  margin: 18px 18px 0;
}

.scenario-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  padding: 14px 18px 18px;
  border-bottom: 1px solid #dfe6e2;
  background: linear-gradient(135deg, #ffffff 0%, #f5faf7 100%);
}

.scenario-brief h3 {
  font-size: 28px;
  line-height: 1.25;
}

.scenario-brief p {
  color: #52605b;
  line-height: 1.8;
  font-size: 17px;
}

.phone-search {
  align-self: center;
  padding: 14px;
  border: 1px solid #c7d2dd;
  border-radius: 22px;
  background: #101820;
  box-shadow: 0 18px 34px rgba(19, 36, 48, .18);
  color: #eef5f2;
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 26px;
  font-size: 12px;
}

.phone-top span {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 54px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #2a3844;
}

.store-search,
.store-empty {
  margin-top: 12px;
  border-radius: 14px;
  background: #f5f7f8;
  color: #18211f;
}

.store-search {
  padding: 10px 12px;
  color: #66716d;
}

.store-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #c5cfca;
  color: #7b8581;
  font-weight: 800;
}

.download-start {
  margin: 0;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid #dfe6e2;
  background: #fff;
}

.download-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 10px 0;
  padding: 14px;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.download-choice:hover,
.download-choice:has(input:checked) {
  border-color: #497568;
  background: #f2faf5;
}

.download-choice input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.download-choice span {
  display: grid;
  gap: 4px;
}

.download-choice small {
  color: #63716c;
  line-height: 1.55;
}

.baidu-sim {
  margin: 18px;
  border: 1px solid #d8dde8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(29, 43, 67, .10);
}

.browser-chrome {
  display: grid;
  grid-template-columns: repeat(3, 10px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e1e5ee;
  background: #f2f4f8;
}

.browser-chrome span {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d96055;
}

.browser-chrome span:nth-child(2) { background: #e6b94f; }
.browser-chrome span:nth-child(3) { background: #61b06f; }

.browser-chrome p {
  margin: 0 0 0 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  color: #6c7682;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.baidu-head {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 104px;
  gap: 8px;
  align-items: center;
  padding: 26px 24px 14px;
}

.baidu-logo {
  color: #234ecf;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 900;
}

.baidu-search input {
  min-height: 42px;
  border: 2px solid #4b70e2;
  border-radius: 4px 0 0 4px;
  box-shadow: none;
}

.baidu-head button {
  min-height: 42px;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: #4b70e2;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.baidu-tabs {
  display: flex;
  gap: 22px;
  padding: 0 24px 12px 134px;
  border-bottom: 1px solid #edf0f5;
  color: #66717c;
  font-size: 14px;
}

.baidu-tabs .active {
  color: #234ecf;
  font-weight: 900;
}

.serp-count {
  margin: 0 0 12px;
  color: #7a838d;
  font-size: 13px;
}

.serp-result {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  max-width: 760px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f5;
  cursor: pointer;
}

.serp-result input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.serp-index {
  grid-column: 1;
  color: #8b95a1;
  font-size: 13px;
}

.serp-body {
  grid-column: 2;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.serp-title {
  color: #1f4f9f;
  font-size: 18px;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.serp-url {
  color: #138144;
  word-break: break-word;
}

.serp-snippet {
  color: #343b43;
  line-height: 1.55;
}

.serp-meta {
  color: #7d858e;
  font-size: 13px;
}

.serp-meta b {
  color: #a35a13;
}

.serp-result.is-official .serp-meta b {
  color: #236b54;
}

.serp-result:has(input:checked) {
  margin-left: -12px;
  padding-left: 12px;
  border-radius: 8px;
  background: #eef7f1;
  outline: 2px solid #9bc9b7;
}

.official-site {
  margin: 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cad7d2;
  border-radius: 8px;
  background: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid #e1e8e5;
  color: #52615c;
}

.site-nav b {
  margin-right: auto;
  color: #173c32;
  font-size: 18px;
}

.site-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(73,117,104,.12), transparent 42%),
    linear-gradient(315deg, rgba(65,93,134,.10), transparent 34%),
    #f9fbfa;
}

.site-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #d9eee2;
  color: #315d52;
  font-weight: 900;
  font-size: 12px;
}

.site-hero h4 {
  margin: 0 0 10px;
  font-size: 34px;
}

.site-hero p {
  color: #4f5f5a;
  line-height: 1.75;
}

.site-hero button {
  width: auto;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  background: #173c32;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.app-preview {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid #cbdad4;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  color: #52615c;
}

.app-preview b {
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 22px;
  background: #315d52;
  color: #fff;
  font-size: 44px;
}

.warning-panel,
.flow-end {
  margin: 18px;
}

.permission-dialog {
  margin: 18px;
  padding: 16px;
  border: 1px solid #cfd8d4;
  border-radius: 8px;
  background: #fff;
}

.install-toast {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef7f1;
  color: #315d52;
  font-weight: 800;
}

.permission-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #e1e8e5;
}

.permission-card small {
  display: block;
  margin-top: 4px;
  color: #62706b;
  line-height: 1.5;
}

.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.permission-actions label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid #d7e0dc;
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}

.permission-actions input {
  width: auto;
  min-height: 0;
}

.scale-row,
.choice-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.choice-row {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.choice-row.choice-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.likert-row {
  grid-template-columns: repeat(5, minmax(88px, 1fr));
}

.choice-row.choice-long {
  grid-template-columns: 1fr;
}

.option {
  min-height: 44px;
}

.option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.option span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.option span b {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.choice-long .option span {
  justify-items: start;
  text-align: left;
  padding: 10px 12px;
}

.option input:checked + span {
  border-color: var(--sage);
  background: var(--mint);
  color: var(--ink);
  font-weight: 800;
}

.rubric-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.rubric-list .option span {
  justify-content: start;
  text-align: left;
}

.task-prompt {
  color: var(--muted);
  line-height: 1.7;
}

.review-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  background: #f4f7fb;
  color: var(--blue);
  line-height: 1.6;
  font-weight: 700;
}

.submit-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(73, 117, 104, 0.3);
}

#submitButton {
  min-width: 150px;
  min-height: 48px;
  border: 0;
  background: var(--sage);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

#submitButton:disabled {
  background: #a9b4af;
  cursor: progress;
}

.report-panel {
  display: grid;
  gap: 16px;
}

.score-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-left: 6px solid var(--gold);
  background: #fff;
}

.score-card strong {
  font-size: 44px;
  line-height: 1;
  font-family: Georgia, "Songti SC", serif;
}

.score-card small {
  color: var(--blue);
  font-weight: 800;
}

pre {
  min-height: 260px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #26312e;
  line-height: 1.7;
  font-family: "Menlo", "Consolas", "PingFang SC", monospace;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .progress-panel,
  .report-panel {
    position: static;
  }

  .progress-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
  }

  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .submit-band {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grid,
  .scale-row,
  .choice-row,
  .choice-row.choice-compact,
  .image-choice-row,
  .steps {
    grid-template-columns: 1fr;
  }

  .image-pair { grid-template-columns: 1fr; }
  .permission { grid-template-columns: 1fr; }
  .scenario-brief,
  .baidu-head,
  .site-hero,
  .permission-card {
    grid-template-columns: 1fr;
  }
  .phone-search {
    max-width: 280px;
    width: 100%;
    justify-self: center;
  }
  .baidu-sim,
  .official-site,
  .warning-panel,
  .flow-end,
  .permission-dialog {
    margin: 14px;
  }
  .baidu-head {
    padding: 18px 14px 10px;
  }
  .baidu-search input,
  .baidu-head button {
    border-radius: 6px;
  }
  .baidu-tabs {
    gap: 14px;
    overflow-x: auto;
    padding: 0 14px 10px;
  }
  .search-results {
    padding: 12px 14px;
  }
  .site-nav {
    flex-wrap: wrap;
  }
  .site-nav b {
    width: 100%;
  }
  .site-hero {
    padding: 20px 16px;
  }
  .permission-actions {
    justify-content: flex-start;
  }
  .ai-task-header { align-items: stretch; flex-direction: column; gap: 14px; }
  .agent-status-pill { align-self: flex-start; max-width: 100%; }
  .ai-compose-grid { grid-template-columns: 1fr; padding: 15px; }
  .ai-revision-task .source-text { min-height: auto; }
  .draft-button { width: 100%; }
  .final-draft-head { align-items: flex-start; flex-direction: column; }
  .ai-generation-status { flex-direction: column; }

  .section-block,
  .submit-band,
  .progress-panel,
  .report-panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-status-pill.is-working .connection-dot,
  .button-spinner {
    animation: none;
  }

  .draft-button,
  .ai-request-panel textarea {
    transition: none;
  }
}
.empty-hint { color: #6b6256; background: #fbf6ec; border: 1px dashed #d6c79c; border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }
.empty-hint code { background: #f0e6cf; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.fatal-error { white-space: pre-wrap; word-break: break-word; background: #fff1f0; color: #8a1f11; border: 1px solid #f5c2c0; border-radius: 8px; padding: 12px 14px; margin: 12px 24px; font-size: 12px; max-height: 240px; overflow: auto; }

/* ===== v3 新题型样式 ===== */
.open-text { width: 100%; min-height: 96px; border: 1px solid #d6c79c; border-radius: 8px; padding: 10px 12px; font: inherit; line-height: 1.6; resize: vertical; box-sizing: border-box; }
.open-text:focus { outline: none; border-color: var(--sage, #1F5B4C); box-shadow: 0 0 0 2px rgba(31,91,76,.12); }
.choice-row.multi .option { border-style: dashed; }
.sub-item { margin: 14px 0 6px; padding: 12px 14px; background: #fbf6ec; border: 1px solid #eadfc4; border-radius: 10px; }
.sub-q { font-weight: 600; margin: 0 0 8px; color: #3a352c; }
.match-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
.match-stem { flex: 1 1 200px; font-weight: 600; color: #3a352c; }
.match-row select { flex: 0 1 320px; padding: 8px 10px; border: 1px solid #d6c79c; border-radius: 8px; font: inherit; }
.match-workbench { display: grid; gap: 14px; margin: 14px 0; }
.match-token-bank { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid #d9e1dc; background: #f7fbf8; border-radius: 8px; }
.match-token { width: auto; min-height: 38px; border: 1px solid #bfd2c9; border-radius: 999px; padding: 7px 12px; background: #fff; color: var(--ink); cursor: grab; font-weight: 800; }
.match-token.is-selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(213,159,58,.18); }
.match-token.is-assigned { background: var(--mint); border-color: var(--sage); color: var(--sage); }
.match-scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.match-dropzone { display: grid; align-content: start; gap: 10px; min-height: 210px; padding: 14px; border: 1px solid #d6c79c; border-radius: 8px; background: #fff; outline: none; }
.match-dropzone.is-dragover { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(73,117,104,.14); }
.match-dropzone.is-filled { border-color: var(--sage); background: #f5faf7; }
.match-scene-head { display: flex; align-items: center; gap: 8px; color: var(--sage); }
.match-scene-head span { display: grid; place-items: center; width: 28px; aspect-ratio: 1; border-radius: 50%; background: var(--sage); color: #fff; font-weight: 900; }
.match-dropzone p { margin: 0; color: #3a352c; line-height: 1.55; }
.match-drop-target { display: grid; place-items: center; min-height: 46px; padding: 8px 10px; border: 1px dashed #bfd2c9; border-radius: 8px; background: #fff; color: var(--muted); text-align: center; font-weight: 800; }
.match-dropzone.is-filled .match-drop-target { border-style: solid; color: var(--sage); background: var(--mint); }
.match-fallback { min-height: 40px; }
.rank-workbench { margin: 12px 0; }
.rank-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.rank-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rank-index { display: grid; place-items: center; width: 28px; aspect-ratio: 1; border-radius: 50%; background: var(--mint); color: var(--sage); font-weight: 900; }
.rank-row b { line-height: 1.5; }
.rank-actions { display: inline-flex; gap: 6px; }
.rank-button { width: 34px; min-height: 34px; border: 1px solid #bfd2c9; border-radius: 6px; background: #f7fbf8; color: var(--sage); cursor: pointer; font-weight: 900; }
.rank-button:hover { border-color: var(--sage); background: var(--mint); }
.rank-confirm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.rank-confirm { min-height: 44px; padding: 9px 15px; border: 1px solid var(--sage); border-radius: 8px; background: #fff; color: var(--sage); cursor: pointer; font-weight: 800; }
.rank-confirm:hover, .rank-confirm:focus-visible, .rank-workbench.is-confirmed .rank-confirm { background: var(--mint); }
.rank-confirm-row span { color: var(--muted); font-size: 13px; }
.media-gallery { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.media-gallery figure, .card-row figure { margin: 0; max-width: 240px; }
.media-gallery img, .card-row img { width: 100%; border-radius: 8px; border: 1px solid #eadfc4; display: block; }
.media-gallery figcaption, .card-row figcaption { font-size: 13px; color: #6b6256; margin-top: 4px; }
.card-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; }
.media-block { margin: 12px 0; }
.media-block video, .media-block audio { max-width: 100%; }
.question-video { display: block; width: min(100%, 760px); aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; background: #111; }
.media-note { font-size: 13px; color: #8a6d3b; background: #fbf6ec; border: 1px dashed #d6c79c; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.media-feedback { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 760px); min-height: 36px; padding-top: 7px; }
.video-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.video-block[data-media-state="ready"] .video-status { color: var(--sage); }
.video-block[data-media-state="error"] .video-status { color: #9b3b2f; }
.video-retry { flex: 0 0 auto; min-height: 32px; border: 1px solid var(--sage); border-radius: 6px; padding: 5px 10px; background: #fff; color: var(--sage); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.scoring-note { border: 1px solid var(--line); background: #fff; padding: 10px 12px; line-height: 1.6; }
.scoring-note summary { cursor: pointer; font-weight: 800; color: var(--sage); }
.scoring-note p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.matrix-wrap { max-width: 100%; overflow-x: auto; margin: 12px 0; }
.matrix { border-collapse: collapse; width: 100%; margin: 0; font-size: 14px; }
.matrix th, .matrix td { border: 1px solid #e3d8bd; padding: 8px 10px; text-align: center; }
.matrix th.row-head { text-align: left; background: #fbf6ec; color: #3a352c; font-weight: 600; }
.matrix thead th { text-align: center; background: #fbf6ec; color: #3a352c; font-weight: 600; }
.matrix td label { display: inline-flex; align-items: center; gap: 4px; }
.matrix input[type="radio"] { width: auto; min-height: 0; inline-size: 18px; block-size: 18px; margin: 0; }
.matrix-choice-label { display: none; }

.security-stepper {
  margin: 16px 0 4px;
  border: 1px solid #cfded6;
  border-radius: 16px;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(35, 58, 49, .07);
}
.security-step-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #e1e9e4;
  background: #f3f8f5;
}
.security-step-progress strong { color: var(--sage); font-size: 14px; letter-spacing: .04em; }
.security-step-dots { display: grid; grid-template-columns: repeat(4, minmax(28px, 1fr)); gap: 7px; flex: 1; }
.security-step-dots span { height: 5px; border-radius: 999px; background: #d6e2dc; transition: background-color .18s ease; }
.security-step-dots span.is-current { background: #d39b3d; }
.security-step-dots span.is-complete { background: var(--sage); }
.security-step-card { padding: 24px 22px 20px; }
.security-step-card[hidden] { display: none; }
.security-step-kicker { margin: 0 0 6px; color: #7c897f; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.security-step-card h3 { margin: 0 0 18px; color: var(--ink); font-size: 19px; line-height: 1.55; }
.security-step-options { display: grid; gap: 9px; }
.security-step-options label { display: block; cursor: pointer; }
.security-step-options input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.security-step-options span {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #d7e2dc;
  border-radius: 10px;
  background: #fff;
  color: #30453c;
  line-height: 1.5;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.security-step-options span::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-right: 11px;
  border: 2px solid #afc3b8;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff;
}
.security-step-options input:checked + span { border-color: var(--sage); background: #edf6f1; box-shadow: 0 0 0 2px rgba(73, 117, 104, .1); }
.security-step-options input:checked + span::before { border-color: var(--sage); background: var(--sage); }
.security-step-options input:focus-visible + span { outline: 3px solid rgba(211, 155, 61, .35); outline-offset: 2px; }
.security-step-navigation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 18px 16px; }
.security-step-navigation button { min-height: 40px; padding: 7px 13px; border: 1px solid #bfd0c7; border-radius: 8px; background: #fff; color: var(--sage); font: inherit; font-weight: 800; cursor: pointer; }
.security-step-navigation button:disabled { cursor: default; opacity: .38; }
.security-step-navigation p { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 640px) {
  html,
  body { overflow-x: hidden; }
  h1 { font-size: 28px; }
  .layout { padding: 14px 12px 28px; gap: 14px; }
  .topbar { padding: 18px 14px; }
  .survey-brand { gap: 13px; }
  .project-logo { width: 58px; height: 58px; border-radius: 16px; }
  .progress-panel { grid-template-columns: 1fr; }
  .progress-ring { width: 96px; }
  .question-title { font-size: 16px; line-height: 1.65; }
  .option span b { font-size: 15px; }
  .media-gallery figure, .card-row figure { max-width: 100%; }
  .media-gallery img, .card-row img, .question-image { max-width: 100%; }
  .image-option span { min-height: auto; }
  .image-option img { max-height: none; object-fit: contain; }
  .rank-row { grid-template-columns: 30px minmax(0, 1fr); }
  .rank-actions { grid-column: 2; }
  .rank-confirm-row { align-items: stretch; flex-direction: column; }
  .rank-confirm { width: 100%; }
  .matrix-wrap { overflow: visible; }
  .matrix { display: block; width: 100%; min-width: 0; white-space: normal; }
  .matrix thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .matrix tbody { display: grid; gap: 12px; }
  .matrix tbody tr { display: grid; grid-template-columns: repeat(var(--matrix-columns), minmax(0, 1fr)); gap: 7px; padding: 12px; border: 1px solid #e3d8bd; border-radius: 10px; background: #fffdf7; }
  .matrix th.row-head { display: block; grid-column: 1 / -1; padding: 0 0 10px; border: 0; background: transparent; font-size: 15px; line-height: 1.55; }
  .matrix td { display: block; min-width: 0; padding: 0; border: 0; }
  .matrix td label { display: grid; place-items: center; gap: 7px; min-height: 70px; padding: 8px 4px; border: 1px solid #d8e2dc; border-radius: 8px; background: #f8fbf8; color: #4c5e56; cursor: pointer; text-align: center; touch-action: manipulation; }
  .matrix td label:has(input:checked) { border-color: var(--sage); background: var(--mint); color: var(--ink); box-shadow: 0 0 0 2px rgba(73, 117, 104, .12); }
  .matrix input[type="radio"] { inline-size: 22px; block-size: 22px; }
  .matrix-choice-label { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; }
  .security-step-card { padding: 20px 14px 16px; }
  .security-step-card h3 { font-size: 17px; }
  .security-step-progress { padding: 12px 14px; }
  .security-step-navigation { grid-template-columns: 1fr 1fr; padding: 10px 14px 14px; }
  .security-step-navigation p { grid-column: 1 / -1; grid-row: 1; }
  .security-step-navigation button { width: 100%; }
}
