/* Elevator Draft: task layout on the 52LIFT v1.0 subpage foundation. */
html { scroll-padding-top: var(--header-offset, 100px); }
.lift-page { background: var(--surface-alt); }
.lift-page [hidden] { display: none !important; }
.draft-mobile-only { display: none; }
.lift-page :is(input, select, textarea, button, a, summary, [tabindex]) {
  scroll-margin-block: 12px 24px;
}
.lift-main { scroll-margin-top: 12px; }
/* 表单使用经典细边框焦点，替代基础组件的外扩粗轮廓。 */
.lift-page :is(.lift-input, .lift-select, .lift-textarea):focus {
  outline: none;
  outline-offset: 0;
  border-color: var(--focus);
  box-shadow: none;
}
.lift-page :is(.lift-input, .lift-select, .lift-textarea)[aria-invalid="true"]:focus {
  border-color: var(--danger);
}
/* 使用原生可定制菜单控制选项高度；不支持的浏览器保留系统选择器。 */
.lift-page .lift-select { min-height: 48px; padding: 11px 14px; cursor: pointer; }
.lift-page .lift-select:disabled { cursor: not-allowed; }
@supports (appearance: base-select) and selector(::picker(select)) {
  .lift-page .lift-select, .lift-page .lift-select::picker(select) { appearance: base-select; }
  .lift-page .lift-select { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .lift-page .lift-select::picker-icon {
    content: ''; flex: 0 0 8px; width: 8px; height: 8px; margin: 0 2px 4px 12px;
    border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg);
  }
  .lift-page .lift-select:open::picker-icon { margin-bottom: -4px; transform: rotate(225deg); }
  .lift-page .lift-select::picker(select) {
    box-sizing: border-box; max-block-size: stretch; margin-block: 4px; padding: 4px;
    overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid var(--line); border-radius: 5px;
    background: var(--surface); color: var(--ink); box-shadow: none;
    font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  }
  .lift-page .lift-select option {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px;
    border: 0; border-radius: 3px; background: var(--surface); color: var(--ink);
    font: inherit; line-height: 1.5; white-space: normal; cursor: pointer;
  }
  .lift-page .lift-select option[value=""] { color: var(--muted); }
  .lift-page .lift-select option:checked { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
  .lift-page .lift-select option:focus-visible { outline: none; background: var(--blue-soft); }
  .lift-page .lift-select option::checkmark { order: 1; margin-left: auto; color: var(--blue); }
  @media (hover: hover) and (pointer: fine) {
    .lift-page .lift-select option:hover { color: var(--blue-strong); background: var(--blue-soft); }
  }
}
.draft-header-brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.draft-header-title { font-size: 20px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.lift-footer .draft-local { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 16px; margin-inline: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.draft-local strong { color: var(--blue); font-weight: 400; }
.draft-form { display: grid; gap: 32px; min-width: 0; }
.draft-local-record input { width: 18px; height: 18px; margin: 0; }
.draft-local-record .lift-help { margin-top: 4px; }
.draft-review-step { display: grid; gap: 32px; min-width: 0; }
.draft-floor-step { margin-top: 20px; }
.draft-height-help > summary { display: none; }
.draft-text-button { min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; }
.draft-review-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.draft-review-project { margin-top: 8px !important; font-weight: 600; overflow-wrap: anywhere; }
.draft-review-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.draft-review-row > div { min-width: 0; }
.draft-review-row p { font-size: 14px; overflow-wrap: anywhere; }
.draft-review-row button { flex-shrink: 0; min-width: 44px; }
.draft-option-group { border-top: 1px solid var(--line); }
.draft-option-group + .draft-option-group { margin-top: 16px; }
.draft-option-group > summary, .draft-reference > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.draft-option-group > summary::-webkit-details-marker, .draft-reference > summary::-webkit-details-marker { display: none; }
.draft-option-group[open] > summary .draft-toggle, .draft-reference[open] > summary .draft-toggle { transform: rotate(225deg); margin-bottom: -4px; }
.draft-option-group .lift-fields { margin-top: 12px; }
.draft-option-count { font-weight: 400; }
.draft-optional-copy { min-width: 0; }
.draft-optional-copy > .lift-section-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.draft-reference > summary .lift-subtitle { margin-bottom: 0; }
.draft-reference[open] > summary { margin-bottom: 16px; }
.draft-reference-format { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.draft-step-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.draft-step-nav button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 48px; padding: 8px 2px; border: 0; border-bottom: 2px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.draft-step-nav button[aria-current="step"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.draft-step-index { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; }
.draft-step-nav [aria-current="step"] .draft-step-index { color: var(--action-fg); background: var(--action-bg); border-color: var(--action-bg); }
.draft-step-nav .is-past .draft-step-index { color: var(--blue); background: var(--blue-soft); }
.draft-step-error { padding-inline: 4px; }
.draft-mobile-actions { position: fixed; inset: auto 0 0; z-index: 12; padding: 8px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -3px 16px rgba(5,13,24,.04); }
.draft-mobile-actions > p { margin-bottom: 6px; text-align: center; }
.draft-mobile-buttons { display: flex; gap: 12px; }
#mobile-back { flex: 0 0 auto; }
#mobile-next { flex: 1; min-width: 0; }
.draft-keyboard .draft-mobile-actions { visibility: hidden; }
.draft-section-heading { display: flex; align-items: flex-start; gap: 12px; }
.draft-section-number {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px;
  min-height: 32px; margin-top: 1px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--blue-soft); color: var(--blue); font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.draft-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.draft-title-line .lift-status { font-weight: 400; }
.draft-required { color: var(--danger); margin-left: 4px; }
.draft-unit { color: var(--muted); font-weight: 400; }
.draft-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.draft-choices legend { margin-bottom: 8px; padding: 0; }
.draft-choice-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
.draft-choice-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.draft-remark { margin-top: 24px; }
.draft-remark textarea { min-height: 96px; }
.draft-optional-summary { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; }
.draft-optional-summary::-webkit-details-marker { display: none; }
.draft-toggle { flex: 0 0 8px; width: 8px; height: 8px; margin: 0 4px 4px auto; border-right: 1px solid var(--blue); border-bottom: 1px solid var(--blue); transform: rotate(45deg); }
.draft-optional[open] > summary .draft-toggle { margin-bottom: -4px; transform: rotate(225deg); }
.draft-optional-intro { margin: 8px 0 20px !important; }
.draft-export-note { margin-top: 20px; }
.draft-output a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.draft-output a:focus-visible { outline-offset: 2px; }
.draft-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.draft-actions .lift-help { flex-basis: 100%; }
#go { min-width: 172px; }
.draft-side { display: grid; gap: 24px; min-width: 0; }
.draft-side .lift-subtitle { margin-bottom: 16px; }
.draft-side .lift-summary { margin-top: 20px; }
.draft-side .lift-summary > div:first-child { grid-template-columns: 72px minmax(0, 1fr); }
.draft-summary-note { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--line); }
.draft-guide { display: grid; gap: 16px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.draft-guide li::marker { color: var(--blue); font-variant-numeric: tabular-nums; }
.draft-guide strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }
.draft-format { display: flex; gap: 12px; align-items: baseline; margin-bottom: 16px !important; }
.draft-format strong { color: var(--blue); font-size: 22px; font-weight: 600; }
.draft-format span { color: var(--muted); font-size: 12px; }
.draft-side p + p { margin-top: 12px; }
.draft-output { scroll-margin-top: 12px; overflow-wrap: anywhere; }
.draft-output h3 { font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; }
.draft-output p { margin-top: 12px; }
.draft-output ul { margin: 12px 0 0; padding-left: 20px; font-size: 13px; }
.draft-output li + li { margin-top: 8px; }
.draft-output .lift-button { margin-top: 20px; }
.draft-result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.draft-output .draft-result-actions .lift-button { margin: 0; }
.draft-output.err { background: var(--danger-soft); }
.draft-output.err h3 { color: var(--danger); }
.draft-output.pause { background: var(--warning-soft); }
.draft-output.pause h3 { color: var(--warning); }
.draft-output.ok { background: var(--success-soft); }
.draft-output.ok h3 { color: var(--success); }
.draft-file { color: var(--muted); font-size: 12px; }
.draft-output .lift-summary { margin-top: 20px; }
.draft-output .lift-summary > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 8px; border-bottom: 1px solid var(--line); }
.draft-field-error { margin: 0; }
.draft-footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.draft-footer-copy { max-width: 85ch; }
.draft-footer-copy strong { color: var(--ink); font-weight: 600; }
.draft-footer-copy p + p { margin-top: 8px; }
.draft-footer-inner > a { flex-shrink: 0; }
.draft-noscript { margin-bottom: 24px !important; }
.draft-viewer {
  width: min(1280px, calc(100vw - 48px)); height: calc(100dvh - 48px);
  max-width: calc(100vw - 48px); max-height: calc(100dvh - 48px); margin: auto; padding: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(5,13,24,.22);
}
.draft-viewer[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.draft-viewer::backdrop { background: rgba(5,13,24,.45); }
.draft-viewer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.draft-viewer-heading > div { min-width: 0; }
.draft-viewer-heading h2 { font-size: 20px; font-weight: 600; line-height: 1.5; }
.draft-viewer-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.draft-viewer-heading > button { flex-shrink: 0; }
.draft-viewer-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 24px; }
.draft-viewer .lift-button { min-height: 44px; padding: 8px 12px; }
.draft-viewer-zoom { min-width: 48px; margin-left: auto; color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.draft-viewer-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--viewer); touch-action: none; user-select: none; cursor: grab; }
.draft-viewer-stage.is-dragging { cursor: grabbing; }
.draft-viewer-stage:focus-visible { outline-offset: -3px !important; }
.draft-viewer-stage > svg { display: block; width: 100%; height: 100%; }
.draft-viewer-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.draft-viewer-footer { padding: 12px 24px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.draft-viewer-status { margin-top: 4px !important; }
@media (max-width: 991px) {
  .draft-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .draft-side > :last-child { grid-column: auto; }
}
@media (max-width: 767px) {
  html { scroll-padding-bottom: calc(var(--mobile-actions-height, 92px) + 16px); }
  .draft-mobile { padding-bottom: var(--mobile-actions-height, 92px); }
  .draft-mobile .draft-mobile-only { display: block; }
  .draft-mobile .draft-desktop-copy, .draft-mobile .draft-current-summary { display: none; }
  .lift-shell { width: calc(100% - 32px); }
  .lift-header-inner { flex-wrap: nowrap; min-height: 56px; padding-block: 0; }
  .lift-wordmark { font-size: 24px; }
  .draft-header-brand { gap: 12px; }
  .draft-header-title { font-size: 16px; }
  .lift-nav { width: auto; gap: 0; }
  .lift-nav a { font-size: 13px; }
  .lift-nav a:not([href="#guide"]) { display: none; }
  .lift-main { padding-block: 16px 20px; }
  .draft-form, .draft-review-step, .lift-stack, .lift-workspace { gap: 16px; }
  .lift-panel { padding: 16px; }
  .lift-section-title { font-size: 18px; }
  .draft-basic .draft-section-number, .draft-mobile .draft-optional .draft-section-number { display: none; }
  .draft-floor-step { margin-top: 20px; }
  .draft-mobile .draft-floor-step { margin-top: 0; }
  .lift-panel-heading { margin-bottom: 16px; }
  .lift-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .lift-field { gap: 6px; }
  .lift-input, .lift-select { min-height: 48px; }
  .lift-page .lift-select { padding-inline: 10px; }
  .draft-unit { white-space: nowrap; }
  .draft-height-help > summary { display: flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 13px; cursor: pointer; }
  .draft-height-help > summary::after { content: '+'; margin-left: 8px; }
  .draft-height-help[open] > summary::after { content: '−'; }
  .draft-height-help > p { padding-bottom: 8px; }
  .draft-option-group + .draft-option-group { margin-top: 8px; }
  .draft-mobile #review-step > section:last-child { padding: 0; border: 0; background: transparent; }
  .draft-mobile #review-step > section:last-child .draft-section-heading, .draft-mobile .draft-actions { display: none; }
  .draft-mobile .draft-export-note { margin-top: 0; padding: 10px 12px; font-size: 12px; }
  .draft-reference > summary { min-height: 44px; }
  .draft-reference > summary .lift-subtitle { font-size: 14px; }
  .draft-reference[open] > summary { margin-bottom: 12px; }
  .draft-mobile .draft-reference { padding-block: 8px; }
  .draft-mobile .lift-footer { padding-block: 16px; }
  .draft-mobile .draft-footer-inner { flex-direction: row; align-items: center; gap: 8px; }
  .draft-mobile .draft-footer-copy { font-size: 11px; }
  .draft-mobile .draft-footer-copy p + p { margin-top: 2px; }
  .draft-mobile .draft-footer-inner > a { font-size: 12px; }
  .lift-footer .draft-local { margin-top: 12px; padding-top: 10px; gap: 4px 8px; font-size: 11px; }
  .draft-output .lift-summary { gap: 4px; }
  .draft-result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .draft-viewer { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; border: 0; border-radius: 0; }
  .draft-viewer-heading { padding: 16px; }
  .draft-viewer-toolbar { padding: 8px 12px; }
  .draft-viewer-footer { padding-inline: 16px; }
  @supports (appearance: base-select) and selector(::picker(select)) {
    .lift-page .lift-select { gap: 6px; }
    .lift-page .lift-select::picker-icon { margin-left: 4px; }
    .lift-page .lift-select::picker(select) { font-size: 16px; }
    .lift-page .lift-select option { min-height: 52px; padding-block: 14px; }
  }
  .draft-side { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
  .draft-side > :last-child { grid-column: auto; }
  .draft-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .draft-actions .lift-button, .draft-output .lift-button { width: 100%; }
  .draft-actions .lift-help { text-align: center; }
  .draft-footer-inner { flex-direction: column; gap: 12px; }
}
@media (max-width: 479px) {
  .draft-section-number { flex-basis: 28px; min-height: 28px; }
  .draft-section-heading { gap: 8px; }
}
