:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-pressed: #1d4ed8;
  --blue-soft: #eff6ff;
  --page: #f7f9fd;
  --surface: #fff;
  --ink: #1e293b;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #f1f3f7;
  --control: #f2f4f8;
  --warning: #9a6700;
  --success: #16866f;
  --success-soft: #ecfdf5;
  --danger: #c73545;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #eef1f6;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: inherit;
  background: transparent;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:not(:disabled):active {
  opacity: 0.76;
}
button.primary:not(:disabled):active {
  background: var(--blue-pressed);
  opacity: 1;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.review-shell {
  display: grid;
  grid-template-columns: 300px 390px;
  gap: 88px;
  align-items: start;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 28px;
}
.review-panel {
  padding-top: 12px;
}
.review-back {
  font-size: 13px;
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin: 34px 0 10px;
}
h1 {
  font-size: 34px;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}
.lead {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  margin: 0 0 24px;
}
.review-steps {
  display: grid;
  gap: 2px;
}
.review-steps button {
  justify-content: flex-start;
  gap: 16px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
}
.review-steps button span {
  color: var(--subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.review-steps button.active {
  color: var(--blue);
  font-weight: 600;
}
.review-steps button.active span {
  color: var(--blue);
}
.review-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #dce4ef;
}
.review-section h2 {
  font-size: 13px;
  margin: 0 0 12px;
}
.review-section p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.scenarios {
  display: flex;
  gap: 8px;
}
.scenarios button {
  padding: 8px 12px;
  border-radius: 8px;
  background: white;
  font-size: 12px;
}
.scenarios button.active {
  background: var(--blue);
  color: white;
}
.reset-demo {
  margin-top: 16px;
  font-size: 13px;
  color: var(--blue);
}
.review-disclaimer {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin-top: 22px;
}
.preview-area {
  width: 390px;
}
.preview-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 12px;
}
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: var(--page);
  box-shadow: 0 0 0 1px #dce4ef;
}
.platform-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  height: 40px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 600;
}
.platform-status span:last-child {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.app-navigation {
  position: relative;
  flex-shrink: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.app-navigation h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  -webkit-mask: var(--asset) center/contain no-repeat;
  mask: var(--asset) center/contain no-repeat;
}
.icon-button {
  width: 44px;
  height: 44px;
  margin-left: -12px;
}
.icon-button .icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}
.platform-capsule {
  width: 78px;
  height: 30px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
}
.platform-capsule .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
.capsule-divider {
  height: 12px;
  width: 1px;
  background: #dce4ef;
}
.app-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 16px 16px 24px;
}
.app-content::-webkit-scrollbar {
  display: none;
}
.surface {
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  margin-bottom: 12px;
}
.surface:last-child {
  margin-bottom: 0;
}
h3,
h4,
p {
  margin: 0;
}
.summary-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.total-tp {
  font:
    600 18px/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  margin-top: 4px;
}
.muted {
  color: var(--muted);
}
.subcopy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.text-action {
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  min-height: 40px;
  gap: 4px;
}
.primary {
  background: var(--blue);
  color: white;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.primary.compact {
  height: 40px;
  padding: 0 18px;
  font-weight: 500;
}
.secondary {
  height: 44px;
  padding: 0 18px;
  background: var(--control);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  margin-bottom: 4px;
}
.section-heading h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.section-heading .text-action {
  margin: -8px 0;
}
.member {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 14px 0;
  text-align: left;
}
.member + .member {
  border-top: 1px solid var(--line);
}
.member:last-child {
  padding-bottom: 4px;
}
.member-body {
  flex: 1;
  min-width: 0;
}
.member-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.member-tp {
  color: var(--muted);
  font:
    400 12px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  margin-top: 3px;
  overflow-wrap: anywhere;
  user-select: text;
}
.member > .icon {
  color: var(--subtle);
}
.page-heading {
  padding: 4px 0 16px;
}
.page-heading h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}
.page-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.selection-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  padding: 0 0 12px;
}
.choice-row {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
}
.choice-row + .choice-row {
  border-top: 1px solid var(--line);
}
.choice-row:first-child {
  padding-top: 0;
}
.choice-row:last-child {
  padding-bottom: 0;
}
.choice-row input {
  appearance: auto;
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
  flex: 0 0 20px;
  margin: 1px 0 0;
  cursor: pointer;
}
.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  padding: 4px 4px 0;
}
.inline-note .icon {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
.validation {
  font-size: 12px;
  line-height: 1.6;
  color: var(--danger);
  margin: 12px 4px 0;
}
.part-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.part-title h3 {
  font-size: 14px;
  font-weight: 600;
}
.part-title span {
  font-size: 12px;
  color: var(--muted);
}
.part-footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 12px;
}
.consequence {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.consequence > .icon {
  margin-top: 2px;
  color: var(--warning);
}
.consequence h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.consequence p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 5px;
}
.old-tp {
  color: var(--warning);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.preservation {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.app-footer {
  flex-shrink: 0;
  padding: 12px 16px 24px;
  background: white;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-info {
  min-width: 0;
  flex: 1;
}
.footer-count {
  font-size: 13px;
  line-height: 1.4;
}
.footer-count strong {
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
  margin: 0 3px;
}
.footer-detail {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 3px;
}
.footer-row > .primary {
  flex-shrink: 0;
}
.confirm-actions > .secondary {
  flex: 1;
  padding: 0;
}
.confirm-actions > .primary {
  flex: 2;
  padding: 0;
}
.app-footer.soft {
  background: var(--page);
  border-top: 0;
}
.back-orders {
  width: 100%;
  height: 44px;
  background: white;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
}
.success-heading {
  text-align: center;
  padding: 12px 0 24px;
}
.success-symbol {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px;
}
.success-symbol .icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}
.success-heading h3 {
  font-size: 20px;
  line-height: 1.3;
}
.success-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}
.result-unit h3 {
  font-size: 15px;
}
.result-unit .total-tp {
  font-size: 16px;
}
.result-unit .member:first-child {
  padding-top: 10px;
}
.result-unit .member-title {
  font-size: 13px;
}
.result-unit .member-tp {
  font-size: 11px;
}
.result-unit .action-row {
  margin-top: 12px;
}
.result-single-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 4px;
}
.result-single-actions .text-action {
  min-height: 32px;
  font-size: 12px;
}
.result-single + .result-single {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 12px;
}
.result-single:first-of-type {
  margin-top: 14px;
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 14px;
  font-size: 14px;
}
.list-toolbar span {
  font-weight: 600;
}
.list-toolbar small {
  font-size: 12px;
  color: var(--muted);
}
.collection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.collection-open {
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
}
.collection-toggle {
  flex: 0 0 32px;
  height: 32px;
  margin-right: -8px;
}
.collection-toggle .icon {
  transform: rotate(90deg);
}
.collection-toggle.expanded .icon {
  transform: rotate(-90deg);
}
.collection-list-members {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.original-tp {
  font:
    12px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  color: var(--muted);
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.toast {
  position: absolute;
  bottom: 112px;
  left: 24px;
  right: 24px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.94);
  color: white;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  z-index: 5;
  pointer-events: none;
}
@media (max-width: 800px) {
  .review-shell {
    grid-template-columns: 240px 390px;
    gap: 28px;
    padding: 0 18px;
    margin: 24px auto;
    justify-content: center;
  }
}
@media (max-width: 680px) {
  .review-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    padding: 0 12px;
    gap: 24px;
  }
  .review-panel {
    width: min(100%, 390px);
    padding: 0;
  }
  .eyebrow {
    margin-top: 20px;
  }
  h1 {
    font-size: 26px;
  }
  .lead {
    margin-bottom: 12px;
  }
  .review-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .review-steps button {
    gap: 5px;
    font-size: 12px;
  }
  .review-section.notes,
  .review-disclaimer {
    display: none;
  }
  .review-section {
    margin-top: 12px;
    padding-top: 12px;
  }
  .reset-demo {
    margin-top: 8px;
  }
  .preview-area {
    width: min(390px, 100%);
  }
  .phone {
    width: 100%;
    height: calc(100dvh - 40px);
    min-height: 680px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* 演示声明在窄屏也保留，避免将虚构数据误认为业务页面。 */
@media (max-width: 680px) {
  .review-disclaimer {
    display: block;
  }
}

/* 二选一使用单层底部操作面板，与成员列表分开，避免页内切换产生误解。 */
.choice-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.38);
}
.choice-sheet {
  width: 100%;
  padding: 24px 20px 24px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  outline: none;
}
.choice-sheet h3 {
  font-size: 18px;
  text-align: center;
  font-weight: 600;
}
.choice-sheet > p {
  margin: 8px 0 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.choice-options {
  margin-bottom: 12px;
}
.split-option {
  width: 100%;
  min-height: 84px;
  padding: 18px 0;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}
.split-option + .split-option {
  border-top: 1px solid var(--line);
}
.split-option > span:first-child {
  flex: 1;
  min-width: 0;
}
.split-option strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.split-option small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.split-option > .icon {
  color: var(--subtle);
}
.choice-cancel {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: var(--control);
  font-size: 15px;
}

/* UI Lab 评审模式直接沿用原稿，外层只增加模块导航。 */
html[data-review] .review-back {
  display: none;
}
html[data-review] .eyebrow {
  margin-top: 0;
}
html[data-review] .phone {
  height: 844px;
  min-height: 0;
}
/* 统一 UI Lab 右侧工作区底色；不改变手机内已确认的浅灰蓝页面背景。 */
html[data-review] body {
  background: var(--review-card, #fff);
}

/* iframe 外观与 PC 卡片同源；颜色限定到审阅区，不能穿透到手机里的订单控件。 */
html[data-review] .review-panel {
  color: var(--review-ink, #1e293b);
}
html[data-review] .eyebrow,
html[data-review] .lead,
html[data-review] .review-steps button,
html[data-review] .review-steps button span,
html[data-review] .review-section p,
html[data-review] .review-disclaimer,
html[data-review] .preview-label {
  color: var(--review-muted, #64748b);
}
html[data-review] .review-section {
  border-color: var(--review-border, #dce4ef);
}
html[data-review] .scenarios button {
  background: var(--review-control, #f2f4f8);
}
html[data-review] .review-steps button.active,
html[data-review] .review-steps button.active span,
html[data-review] .reset-demo {
  color: var(--review-primary, #2563eb);
}
html[data-review] .scenarios button.active {
  background: var(--review-primary, #2563eb);
  color: #fff;
}

/* 嵌入后使用工作台卡片的完整宽度，去掉独立原稿的居中大留白。 */
html[data-review] .review-shell {
  max-width: none;
  margin: 0;
  padding: 24px;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
}
html[data-review] .preview-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
html[data-review] .preview-label {
  width: 390px;
  max-width: 100%;
}
@media (max-width: 800px) {
  html[data-review] .review-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding: 16px;
  }
}
@media (max-width: 740px) {
  html[data-review] .review-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  html[data-review] .review-panel {
    width: min(100%, 390px);
  }
  html[data-review] .phone {
    width: min(100%, 390px);
  }
}

/* 手机独立嵌入 PC Card：工作台步骤与说明不再和手机共用一张巨幅卡片。 */
html[data-phone-only] body {
  background: transparent;
}
html[data-phone-only] .review-panel,
html[data-phone-only] .preview-label {
  display: none;
}
html[data-phone-only] .review-shell {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}
html[data-phone-only] .preview-area {
  width: 100%;
}
html[data-phone-only] .phone {
  width: 100%;
  height: 844px;
  min-height: 0;
  border-radius: 24px;
}
