:root {
  --blue-900: #063f75;
  --blue-800: #07599f;
  --blue-700: #0a69bd;
  --blue-100: #e9f5ff;
  --gold: #b8871f;
  --ink: #172b3d;
  --muted: #6b7c8d;
  --line: #cfe0ee;
  --paper: #ffffff;
  --shadow: 0 16px 42px rgba(8, 67, 117, 0.13);
}

* { box-sizing: border-box; }

html { background: #dceefb; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f7fbff;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button, input { font: inherit; }

button { cursor: pointer; }

.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f7fbff;
  box-shadow: 0 0 0 1px rgba(7, 72, 132, 0.08), 0 24px 80px rgba(10, 56, 100, 0.22);
}

.screen { min-height: 100vh; }
.is-hidden { display: none !important; }

.hero {
  background: #fff;
}

.hero-photo {
  height: 156px;
  padding: 18px;
  background: url("../../assets/header_bg.png") 68% center / auto 100% no-repeat;
}
.hero-photo img {
  width: 126px;
  height: auto;
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 18px rgba(7,67,118,.1);
}
.hero-copy { padding: 20px 22px 42px; background: #fff; }

.hero h1 {
  margin: 0;
  color: var(--blue-900);
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -.4px;
}

.hero p {
  margin: 13px 0 0;
  color: #365a76;
  font-size: 13px;
  line-height: 1.75;
  text-align: justify;
}

.form-card,
.transaction-shell {
  position: relative;
  z-index: 2;
  margin: -20px 16px 0;
  padding: 20px 18px 22px;
  border: 1px solid rgba(31, 114, 188, .18);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow);
}

.step-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.step-heading > span {
  width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--blue-800); color: #fff; font-weight: 900;
  box-shadow: 0 6px 16px rgba(7,89,159,.2);
}
.step-heading div { min-width: 0; flex: 1; }
.step-heading small { color: var(--gold); font-size: 11px; font-weight: 900; }
.step-heading h2 { margin: 2px 0 0; color: var(--blue-900); font-size: 19px; line-height: 1.3; }
.step-heading em { color: #8494a2; font-size: 11px; font-style: normal; }

.field { position: relative; display: block; margin-bottom: 17px; }
.field > span { display: block; margin-bottom: 8px; color: #27445f; font-size: 13px; font-weight: 800; }
.field input {
  width: 100%; height: 49px; padding: 0 13px; border: 1px solid #c7dcec; border-radius: 8px;
  outline: none; background: #fbfdff; color: var(--ink); font-size: 16px;
}
.field input:focus { border-color: var(--blue-700); box-shadow: 0 0 0 3px rgba(9,101,189,.11); }
.field input::placeholder { color: #a8b7c5; font-size: 14px; }

.suggestions {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 7px); display: none;
  overflow: hidden; border: 1px solid #b9d7ef; border-radius: 8px; background: #fff;
  box-shadow: 0 16px 34px rgba(5,70,132,.17);
}
.autocomplete-field.is-open { z-index: 30; }
.autocomplete-field.is-open .suggestions { display: block; }
.suggestion { width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf4fa; background: #fff; color: #2f4358; text-align: left; font-size: 13px; }
.suggestion:last-child { border-bottom: 0; }
.suggestion:active { background: #eef8ff; color: var(--blue-800); }
.suggestion-status { padding: 12px; color: #758596; font-size: 12px; line-height: 1.5; }

.primary-action {
  width: 100%; min-height: 50px; border: 0; border-radius: 8px;
  background: linear-gradient(135deg, #0870ca, #075292); color: #fff; font-size: 15px; font-weight: 900;
  box-shadow: 0 11px 24px rgba(0,89,165,.24);
}
.primary-action:disabled { background: #d9eaff; color: #4f80ad; box-shadow: none; cursor: default; }
.form-message { min-height: 18px; margin: 9px 0 0; color: #a24c16; font-size: 12px; line-height: 1.5; }

.compact-header {
  height: 66px; padding: env(safe-area-inset-top) 15px 0; display: grid; grid-template-columns: 64px 1fr 64px;
  align-items: center; border-bottom: 1px solid rgba(9,91,158,.1); background: rgba(255,255,255,.94);
}
.compact-header img { width: 104px; justify-self: center; }
.compact-header > span { color: var(--gold); font-size: 12px; font-weight: 900; text-align: right; }
.back-button { padding: 8px 0; border: 0; background: transparent; color: var(--blue-800); font-size: 13px; font-weight: 900; text-align: left; }

.transaction-shell { margin-top: 14px; margin-bottom: 20px; box-shadow: 0 10px 32px rgba(8,67,117,.1); }

.selection-panel {
  min-width: 0;
  margin: 20px 0 18px;
  padding: 17px 13px 7px;
  border: 1px solid #c9deed;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbfe 100%);
}
.selection-panel legend {
  margin-left: 8px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  color: var(--blue-900);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}
.selection-panel legend span {
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: #d59a22;
}
.selection-panel > .compact-question:first-of-type { padding-top: 2px; }
.selection-panel > :last-child .compact-question:last-child,
.selection-panel > .compact-question:last-child { border-bottom: 0; }

.question-block { margin: 0 0 18px; padding-top: 2px; }
.question-block h3 { margin: 0 0 10px; color: #27445f; font-size: 13px; line-height: 1.55; }
.choice-grid { display: grid; gap: 8px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vertical { grid-template-columns: 1fr; }
.choice-grid label { position: relative; display: block; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span {
  min-height: 46px; padding: 9px 10px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #cbddea; border-radius: 8px; background: #fbfdff; color: #4d6274;
  font-size: 13px; line-height: 1.45; font-weight: 700; text-align: center;
}
.vertical span { min-height: 54px; justify-content: flex-start; text-align: left; }
.choice-grid input:checked + span {
  border-color: var(--blue-700); background: var(--blue-100); color: var(--blue-900);
  box-shadow: inset 0 0 0 1px rgba(9,101,189,.15);
}
.choice-grid input:focus-visible + span { outline: 3px solid rgba(9,101,189,.18); }

.question-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.question-title-row h3 { margin: 0; }
.question-title-row small { color: #8193a5; font-size: 11px; font-weight: 800; }
.status-choice-grid { gap: 10px; }
.status-choice-grid span {
  position: relative;
  min-height: 78px;
  padding: 13px 14px 13px 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #c7d9e7;
  border-radius: 10px;
  background: #fff;
  color: #334f68;
  box-shadow: 0 4px 12px rgba(7,63,117,.04);
  text-align: left;
}
.status-choice-grid span::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 2px solid #aebfce;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}
.status-choice-grid strong { color: var(--blue-900); font-size: 14px; line-height: 1.35; }
.status-choice-grid small { color: #60778b; font-size: 12px; font-weight: 500; line-height: 1.55; }
.status-choice-grid input:checked + span {
  border-color: var(--blue-700);
  background: #eef7ff;
  color: var(--blue-900);
  box-shadow: 0 0 0 1px rgba(10,105,189,.14), 0 8px 18px rgba(7,89,159,.09);
}
.status-choice-grid input:checked + span::before {
  content: "✓";
  display: grid;
  place-items: center;
  border-color: var(--blue-700);
  background: var(--blue-700);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.status-choice-grid.has-selection label:not(.is-selected) span {
  opacity: .58;
  border-color: #dbe5ed;
  background: #f8fafc;
  box-shadow: none;
}
.status-choice-grid.has-selection label:not(.is-selected) span:hover,
.status-choice-grid.has-selection label:not(.is-selected) input:focus-visible + span {
  opacity: .82;
  border-color: #9fc8e8;
}

.compact-question {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  margin: 0;
  padding: 8px 2px;
  border-bottom: 1px solid #e3edf5;
}
.compact-question h3 { margin: 0; font-size: 13px; line-height: 1.45; }
.compact-question .choice-grid { width: 142px; gap: 0; overflow: hidden; border: 1px solid #c9dceb; border-radius: 8px; }
.compact-question .choice-grid.three-columns { width: 196px; }
.compact-question .choice-grid span {
  min-height: 36px;
  padding: 5px 7px;
  border: 0;
  border-right: 1px solid #d6e3ed;
  border-radius: 0;
  background: #f5f9fc;
  font-size: 12px;
}
.compact-question .choice-grid label:last-child span { border-right: 0; }
.compact-question .choice-grid input:checked + span {
  background: var(--blue-700);
  color: #fff;
  box-shadow: none;
}
.decision-section {
  margin: 11px 0 0;
  padding: 15px 2px 0;
  border-top: 1px solid #d8e7f2;
}
.decision-section > h2 {
  margin: 0 0 5px;
  padding-left: 9px;
  border-left: 3px solid #c69026;
  color: var(--blue-900);
  font-size: 14px;
  line-height: 1.5;
}
.decision-section .compact-question:last-child { border-bottom: 0; }
.dimension-group { margin-top: 2px; }
.overdue-details { margin-top: 3px; }
.status-question { margin-bottom: 3px; }

.branch { animation: reveal .22s ease-out; }
.result-notice {
  margin: 3px 0 18px;
  display: grid;
  gap: 7px;
  color: #33536d;
  font-size: 12px;
  line-height: 1.6;
}
.report-direction-line,
.report-wait-line {
  border: 1px solid #d3e6f5;
  border-radius: 8px;
  background: #f3f9ff;
}
.report-direction-line,
.report-wait-line { padding: 9px 11px 10px; }
.notice-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: #7b6950;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.notice-label::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: #c69026;
}
.notice-body { display: flex; align-items: center; gap: 9px; }
.notice-body strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--blue-700);
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
}
.notice-body > span { color: #294d6b; }
.notice-message { display: block; color: #4a6881; }
.overdue-notice .notice-body strong { background: #b77516; }
.generate-action { margin-top: 2px; }

.completion-screen { padding: 24px; display: flex; align-items: center; }
.completion-card { width: 100%; padding: 28px 22px; border: 1px solid #d4e4ef; border-radius: 14px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.completion-card > img { width: 126px; }
.completion-mark { width: 52px; height: 52px; margin: 26px auto 15px; display: grid; place-items: center; border-radius: 50%; background: #e7f6ee; color: #16815b; font-size: 27px; font-weight: 900; }
.completion-mark.error { background: #fff0ee; color: #a53c32; }
.completion-card h2 { margin: 0; color: var(--blue-900); font-size: 21px; }
.completion-card p { margin: 12px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.task-progress { display: grid; gap: 5px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #d8e7f1; border-radius: 10px; background: #f5faff; text-align: left; }
.task-progress strong { color: var(--blue-900); font-size: 13px; line-height: 1.55; }
.task-progress span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.secondary-action { width: 100%; min-height: 42px; margin: 0 0 12px; border: 1px solid #a9c8dc; border-radius: 9px; background: #fff; color: var(--blue-800); font-size: 13px; font-weight: 800; }
.secondary-action:disabled { opacity: .6; }
.enterprise-report-panel { margin: 18px -10px 18px; border: 1px solid #d5e3ec; border-radius: 12px; overflow: hidden; background: #fff; text-align: left; }
.enterprise-report-heading { padding: 16px 16px 14px; border-bottom: 1px solid #dbe7ef; background: #f3f8fc; }
.enterprise-report-heading span { color: #27739f; font-size: 11px; font-weight: 800; }
.enterprise-report-heading h3 { margin: 6px 0 0; color: var(--blue-900); font-size: 17px; line-height: 1.5; }
.enterprise-report-body { padding: 12px; color: #263d50; font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; background: #edf4f7; }
.full-report-toc { position: sticky; top: 55px; z-index: 8; display: flex; gap: 8px; margin: -12px -12px 14px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid #d1e1e9; background: rgba(255,255,255,.97); scrollbar-width: none; }
.full-report-toc::-webkit-scrollbar { display: none; }
.full-report-toc a { min-width: max-content; max-width: 170px; padding: 8px 11px; border: 1px solid #d5e4ec; border-radius: 9px; color: #31536a; background: #fff; font-size: 11px; font-weight: 700; line-height: 1.35; text-decoration: none; }
.full-report-toc a span { margin-right: 6px; color: #008f88; font-weight: 900; }
.full-report-chapters { display: grid; gap: 16px; }
.full-report-chapter { scroll-margin-top: 114px; overflow: hidden; border: 1px solid #d4e2ea; border-radius: 15px; background: #fff; box-shadow: 0 9px 28px rgba(8,47,82,.07); }
.full-report-chapter-head { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 10px; padding: 17px 16px; color: #fff; background: linear-gradient(135deg, #063f75 0%, #07599f 72%, #008f88 140%); }
.full-report-chapter-head > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.36); border-radius: 10px; color: #9fe4dc; font-size: 12px; font-weight: 900; }
.enterprise-report-body .full-report-chapter-head h2 { margin: 0; color: #fff; font-size: 19px; line-height: 1.45; letter-spacing: -.02em; }
.full-report-chapter-intro { padding: 14px 14px 0; }
.full-report-section-list { display: grid; gap: 11px; padding: 13px; }
.full-report-section { overflow: hidden; border: 1px solid #dce7ed; border-radius: 12px; background: #fff; }
.full-report-section > header { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: start; gap: 9px; padding: 13px 13px 11px; border-bottom: 1px solid #e0eaef; background: #f6fafc; }
.full-report-section > header span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #087e78; background: #e5f6f4; font-size: 10px; font-weight: 900; }
.full-report-section > header h3 { margin: 2px 0 0; color: #0b426d; font-size: 15px; line-height: 1.5; }
.full-report-section-content { display: grid; gap: 10px; padding: 13px; }
.full-report-section.is-tool-section { border-color: #9fd8d1; box-shadow: 0 8px 24px rgba(0,143,136,.10); }
.full-report-section.is-tool-section > header { border-bottom-color: #bee2de; background: linear-gradient(135deg, #e8f8f5 0%, #f7fcfb 100%); }
.full-report-section.is-tool-section > header h3 { color: #007f78; }
.full-report-section.is-tool-section > header span { color: #fff; background: #008f88; }
.full-report-paragraph { margin: 0; color: #38556a; font-size: 13px; line-height: 1.88; }
.full-report-paragraph strong { color: #0b426d; font-weight: 900; }
.full-report-paragraph.is-emphasized { padding: 12px 13px; border-left: 4px solid #008f88; border-radius: 0 9px 9px 0; background: #edf8f6; color: #294a60; }
.full-report-paragraph.is-tool-name { padding: 13px 14px; border: 1px solid #b6ddd9; border-left: 5px solid #008f88; border-radius: 10px; color: #063f68; background: linear-gradient(135deg, #e9f8f6 0%, #fff 100%); font-size: 14px; font-weight: 900; }
.full-report-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: full-report-item; }
.full-report-list li { position: relative; min-height: 44px; padding: 11px 12px 11px 43px; border: 1px solid #dce7ed; border-radius: 10px; color: #345269; background: #fbfdfe; font-size: 12px; line-height: 1.75; }
.full-report-list li::before { position: absolute; top: 11px; left: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #fff; background: #0a76a8; font-size: 9px; font-weight: 900; }
.full-report-list.is-ordered li::before { counter-increment: full-report-item; content: counter(full-report-item, decimal-leading-zero); }
.full-report-list.is-bulleted li::before { content: ""; width: 7px; height: 7px; top: 18px; left: 18px; border-radius: 50%; background: #008f88; }
.full-report-empty { padding: 20px; border-radius: 12px; color: #587083; background: #fff; white-space: pre-wrap; }

body.full-report-view { background: #edf4f7; }
body.full-report-view .completion-screen { display: block; padding: 0; }
body.full-report-view .completion-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #edf4f7; }
body.full-report-view .completion-card > img,
body.full-report-view .completion-mark,
body.full-report-view #completionTitle,
body.full-report-view #completionMessage,
body.full-report-view #taskProgress,
body.full-report-view #checkProgressButton,
body.full-report-view #editButton { display: none; }
body.full-report-view #briefReportButton { position: sticky; top: 0; z-index: 12; display: block; min-height: 55px; margin: 0; border: 0; border-radius: 0; color: #fff; background: #052f52; text-align: left; padding: 0 18px; }
body.full-report-view #briefReportButton::before { content: "←"; margin-right: 9px; color: #77d5ca; font-size: 18px; }
body.full-report-view .enterprise-report-panel { margin: 0; border: 0; border-radius: 0; }
body.full-report-view .enterprise-report-heading { padding: 19px 18px 20px; border: 0; color: #fff; background: linear-gradient(145deg, #052f52 0%, #07599f 72%, #087e78 130%); }
body.full-report-view .enterprise-report-heading span { color: #91ddd3; }
body.full-report-view .enterprise-report-heading h3 { margin-top: 8px; color: #fff; font-size: 20px; line-height: 1.55; }
body.full-report-view .enterprise-report-body { padding: 12px 12px 30px; }

@keyframes reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 18px; overflow: hidden; }
}

@media (max-width: 360px) {
  .compact-question { grid-template-columns: minmax(96px, 1fr) auto; gap: 8px; }
  .compact-question .choice-grid.three-columns { width: 174px; }
  .compact-question .choice-grid span { padding-inline: 4px; font-size: 11px; }
}
