:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --soft: #f7f8fa;
  --paper: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 23, 42, 0.08);
  --brand: #2a7f74;
  --brand-strong: #1b5e57;
  --rose: #c65d63;
  --amber: #d99c46;
  --card-radius: 8px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(42, 127, 116, 0.08) 0%, transparent 34%),
    linear-gradient(225deg, rgba(108, 92, 231, 0.055) 0%, transparent 32%),
    linear-gradient(180deg, #fbfcfd 0%, #f2f5f6 58%, #f9fafb 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overscroll-behavior-y: none;
}

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

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: max(14px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.phone-frame {
  width: min(100%, 430px);
  min-height: calc(100vh - 32px);
  padding: 18px 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 28px 80px rgba(18, 24, 38, 0.1), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(24px) saturate(1.12);
}

body:not([data-surface]) .phone-frame {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.58);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 2px 16px;
}

.topbar-title {
  min-width: 0;
}

.progress-entry-button {
  flex: 0 0 auto;
  margin-top: 8px;
  min-width: 72px;
  border-radius: 999px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 260px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  letter-spacing: 0;
}

.status-pill {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: rgba(42, 127, 116, 0.1);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.segmented {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.segmented-button {
  height: 38px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
  will-change: transform;
}

.segmented-button.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.segmented-button:active,
.segmented-button.is-pressing,
.pressable:active,
.primary-button:active,
.primary-button.is-pressing,
.secondary-button:active,
.secondary-button.is-pressing,
.icon-button:active {
  transform: scale(0.972);
}

.view {
  display: none;
  animation: viewIn 360ms var(--ease);
}

.view.is-visible {
  display: block;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dynamic-form,
.question-editor-list,
.records-list {
  display: grid;
  gap: 10px;
}

.progress-panel {
  margin-top: 12px;
}

.progress-result {
  display: grid;
  gap: 10px;
}

.progress-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.progress-step {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 11px 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--card-radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.progress-step span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(32, 36, 46, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.progress-step strong {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.progress-step.is-active {
  color: var(--brand-strong);
  border-color: rgba(42, 127, 116, 0.28);
  background: linear-gradient(180deg, rgba(42, 127, 116, 0.13), rgba(42, 127, 116, 0.07));
  box-shadow: 0 10px 24px rgba(42, 127, 116, 0.08);
}

.progress-step.is-active span {
  color: #fff;
  background: var(--brand);
}

.progress-time,
.progress-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.submit-success-panel {
  margin-top: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(42, 127, 116, 0.08)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 38px rgba(42, 127, 116, 0.09);
}

.success-info,
.submit-success-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.success-info .detail-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.submit-success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.submit-success-actions .primary-button {
  grid-column: 1 / -1;
}

.lookup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clear-draft-button {
  flex: 0 0 auto;
}

.record-filters {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.record-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(32, 36, 46, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.025);
  transition: transform 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}

.filter-chip.is-active {
  color: #fff;
  border-color: rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, #273244, var(--ink));
  box-shadow: 0 9px 18px rgba(17, 24, 39, 0.12);
}

.filter-chip:active,
.filter-chip.is-pressing {
  transform: scale(0.97);
}

.panel,
.question-card,
.record-card {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--card-radius);
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(18px);
}

.panel {
  padding: 16px;
}

.field-panel.is-invalid {
  border-color: rgba(219, 68, 83, 0.42);
  box-shadow: 0 0 0 4px rgba(219, 68, 83, 0.08), 0 10px 26px rgba(15, 23, 42, 0.05);
}

.field-panel:focus-within {
  border-color: rgba(42, 127, 116, 0.28);
  box-shadow: 0 0 0 4px rgba(42, 127, 116, 0.08), 0 14px 34px rgba(15, 23, 42, 0.06);
}

.field-panel.is-invalid:focus-within {
  border-color: rgba(219, 68, 83, 0.42);
  box-shadow: 0 0 0 4px rgba(219, 68, 83, 0.08), 0 14px 34px rgba(15, 23, 42, 0.06);
}

.field-panel.is-focus-pulse {
  animation: fieldFocusPulse 900ms var(--ease) both;
}

@keyframes fieldFocusPulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(219, 68, 83, 0.22), 0 10px 26px rgba(15, 23, 42, 0.05);
  }
  38% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 7px rgba(219, 68, 83, 0.12), 0 18px 40px rgba(15, 23, 42, 0.08);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 4px rgba(219, 68, 83, 0.08), 0 10px 26px rgba(15, 23, 42, 0.05);
  }
}

.panel.compact {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.intro {
  display: grid;
  gap: 8px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.74)),
    linear-gradient(135deg, rgba(42, 127, 116, 0.08), rgba(107, 91, 203, 0.06));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.intro p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

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

.field-error {
  margin: 0;
  color: var(--rose);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.field > span,
.field legend {
  color: #26313f;
  font-size: 14px;
  font-weight: 760;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.095);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 8px 18px rgba(15, 23, 42, 0.025);
  transition: border 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}

textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #747985 50%), linear-gradient(135deg, #747985 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(42, 127, 116, 0.48);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 127, 116, 0.1), 0 12px 24px rgba(42, 127, 116, 0.07);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: rgba(220, 38, 38, 0.58);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

input:active,
textarea:active,
select:active {
  transform: scale(0.992);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  gap: 9px;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 12px 11px 13px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #2f333b;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.025);
  transition: transform 160ms var(--ease), background 160ms var(--ease), border 160ms var(--ease), box-shadow 160ms var(--ease);
  touch-action: manipulation;
  user-select: none;
  will-change: transform;
}

.choice:active,
.choice.is-pressing {
  transform: scale(0.982);
  background: rgba(255, 255, 255, 0.96);
}

.choice input {
  appearance: none;
  width: 21px;
  height: 21px;
  min-height: 21px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(15, 23, 42, 0.24);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 10px rgba(15, 23, 42, 0.05);
  transition: border 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.choice input[type="radio"] {
  border-radius: 999px;
}

.choice input[type="checkbox"] {
  border-radius: 6px;
}

.choice input::before {
  content: "";
  transform: scale(0);
  transition: transform 160ms var(--ease);
}

.choice input[type="radio"]::before {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #fff;
}

.choice input[type="checkbox"]::before {
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
}

.choice input:checked {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 6px 14px rgba(27, 94, 87, 0.16);
}

.choice input:checked::before {
  transform: scale(1);
}

.choice input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

.choice:has(input:checked) {
  border-color: rgba(42, 127, 116, 0.42);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(42, 127, 116, 0.08), 0 10px 22px rgba(42, 127, 116, 0.07);
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.rating-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-row label {
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.025);
  transition: transform 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
  touch-action: manipulation;
  user-select: none;
  will-change: transform;
}

.rating-row label:active,
.rating-row label.is-pressing {
  transform: scale(0.968);
}

.rating-row label:has(input:checked) {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 24px rgba(27, 94, 87, 0.16);
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 780;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), opacity 180ms var(--ease), border 180ms var(--ease);
  will-change: transform;
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 28px rgba(27, 94, 87, 0.2), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.secondary-button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.primary-button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.submit-row,
.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.submit-row .primary-button {
  grid-column: 1 / -1;
}

.submit-button {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
}

.form-progress-panel {
  display: grid;
  gap: 10px;
  padding-block: 14px;
}

.form-progress-head,
.mobile-submit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.form-progress-head strong {
  color: var(--ink);
  font-size: 14px;
}

.form-progress-count,
.mobile-submit-count {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.form-progress-track,
.mobile-submit-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.form-progress-fill,
.mobile-submit-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transition: width 220ms var(--ease);
}

.form-progress-note,
.mobile-submit-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.mobile-submit-bar {
  display: none;
}

.slider-panel {
  display: grid;
  gap: 12px;
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slider-head strong {
  color: var(--ink);
  font-size: 15px;
}

.slider-head span,
.slider-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.slider-track {
  position: relative;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  touch-action: none;
}

.slider-track.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(22, 119, 255, 0.14);
  pointer-events: none;
  z-index: 1;
}

.slider-target {
  position: absolute;
  top: 4px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--brand);
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.88);
  pointer-events: none;
  z-index: 2;
}

.slider-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 3;
  width: 40px;
  min-height: 40px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.18);
  cursor: grab;
  will-change: transform;
}

.slider-panel.is-dragging .slider-handle {
  cursor: grabbing;
}

.slider-panel.is-verified .slider-track {
  border-color: rgba(5, 150, 105, 0.36);
  background: rgba(5, 150, 105, 0.08);
}

.slider-panel.is-verified .slider-handle {
  background: #059669;
  cursor: default;
}

.slider-panel.is-verified .slider-status {
  color: #047857;
}

.order-challenge {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.order-prompt,
.order-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.order-prompt {
  color: #111827;
}

.order-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.order-token {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #111827;
  background: #ffffff;
  font-size: 17px;
  font-weight: 850;
  box-shadow: none;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.order-token:active,
.order-token.is-pressing {
  transform: scale(0.972);
}

.order-token.is-selected,
.order-token:disabled {
  border-color: rgba(5, 150, 105, 0.34);
  color: #047857;
  background: rgba(5, 150, 105, 0.09);
  opacity: 1;
}

.order-token.is-wrong {
  border-color: rgba(220, 38, 38, 0.38);
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
  animation: tokenShake 220ms ease-in-out;
}

.slider-panel.is-order-verified .order-status {
  color: #047857;
}

.slider-panel.is-slider-challenge .order-challenge {
  display: none;
}

.slider-panel.is-order-challenge .slider-track {
  display: none;
}

@keyframes tokenShake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-3px);
  }
  70% {
    transform: translateX(3px);
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 2px 10px;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.locked-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.locked-item {
  padding: 13px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.question-card {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-top strong {
  font-size: 14px;
}

.question-order-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.question-order-actions .danger {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.danger {
  color: #fff;
  background: var(--rose);
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
}

.option-row button {
  min-height: 38px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.record-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.record-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.record-card h3 {
  margin: 0;
  font-size: 16px;
}

.record-card time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.answer-list {
  display: grid;
  gap: 7px;
}

.answer-row {
  display: grid;
  gap: 2px;
}

.answer-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.answer-row p {
  color: #262a31;
  line-height: 1.45;
  word-break: break-word;
}

.record-actions {
  display: grid;
  gap: 9px;
}

.status-select {
  min-height: 42px;
}

.note-input {
  min-height: 74px;
}

.image-upload {
  gap: 10px;
}

.upload-drop {
  position: relative;
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px;
  border: 1px dashed rgba(42, 127, 116, 0.34);
  border-radius: var(--card-radius);
  color: var(--brand-strong);
  background:
    linear-gradient(180deg, rgba(42, 127, 116, 0.08), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.7);
  text-align: center;
  overflow: hidden;
  transition: transform 180ms var(--ease), border 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.upload-drop strong {
  position: relative;
  font-size: 16px;
}

.upload-drop span {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.upload-drop::before {
  content: "+";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 24px rgba(27, 94, 87, 0.18);
  font-size: 24px;
  line-height: 1;
}

.upload-drop:active {
  transform: scale(0.988);
  border-color: rgba(42, 127, 116, 0.52);
  box-shadow: 0 12px 26px rgba(42, 127, 116, 0.1);
}

.upload-drop:hover,
.upload-drop.is-dragover {
  border-color: rgba(42, 127, 116, 0.62);
  background:
    linear-gradient(180deg, rgba(42, 127, 116, 0.12), rgba(255, 255, 255, 0.84)),
    rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 30px rgba(42, 127, 116, 0.12);
}

.upload-drop.is-dragover {
  transform: translateY(-1px);
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.image-preview-grid,
.stored-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.image-preview-item,
.stored-image-grid a {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--card-radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  text-decoration: none;
}

.image-preview-item {
  animation: imageItemIn 180ms var(--ease) both;
}

.image-preview-item img,
.stored-image-grid img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  object-fit: cover;
  border-radius: max(6px, calc(var(--card-radius) - 2px));
  background: #eef2f4;
}

.image-preview-item span,
.stored-image-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-remove-button {
  min-height: 30px;
  border-radius: 7px;
  color: var(--rose);
  background: rgba(198, 93, 99, 0.1);
  font-size: 12px;
  font-weight: 800;
  transition: transform 160ms var(--ease), background 160ms var(--ease);
}

.image-remove-button:active {
  transform: scale(0.97);
  background: rgba(198, 93, 99, 0.16);
}

@keyframes imageItemIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.empty {
  padding: 22px 14px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(88vw, 360px);
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  background: rgba(21, 22, 26, 0.88);
  box-shadow: 0 18px 42px rgba(21, 22, 26, 0.24);
  text-align: center;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
  backdrop-filter: blur(18px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.uiverse-loader-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.96);
  opacity: 1;
  transition: opacity 360ms var(--ease), transform 360ms var(--ease);
}

.uiverse-loader-screen[hidden] {
  display: none;
}

.uiverse-loader-screen.is-hidden {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
}

.uiverse-loader-screen p {
  margin-top: 0;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
}

.preloader {
  position: relative;
  width: min(86vw, 420px);
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  filter: none;
}

.crack {
  position: static;
  width: 100%;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf2f7 0%, #f8fafc 45%, #edf2f7 90%);
  background-size: 220% 100%;
  clip-path: none;
  animation: skeletonSweep 1200ms ease-in-out infinite;
}

.crack2 {
  width: 78%;
  animation-delay: 100ms;
}

.crack3 {
  width: 100%;
  height: 44px;
  animation-delay: 180ms;
}

.crack4 {
  width: 92%;
  height: 44px;
  animation-delay: 260ms;
}

.crack5 {
  width: 66%;
  height: 38px;
  animation-delay: 340ms;
}

@keyframes skeletonSweep {
  to {
    background-position: -220% 0;
  }
}

.admin-frame {
  width: min(100%, 520px);
}

.admin-tabs {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.admin-tab {
  min-height: 38px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition: transform 160ms var(--ease), color 160ms var(--ease), background 160ms var(--ease);
}

.admin-tab.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.admin-pane {
  display: none;
  animation: viewIn 260ms var(--ease);
}

.admin-pane.is-visible {
  display: block;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--card-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(18px);
}

.project-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.compact-project-card {
  align-items: flex-start;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--card-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, rgba(42, 127, 116, 0.07), rgba(96, 120, 216, 0.05));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(16px);
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.filter-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.submission-table {
  display: grid;
  gap: 8px;
}

.overview-form-list {
  display: grid;
  gap: 10px;
}

.overview-form-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--card-radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border 160ms var(--ease), box-shadow 160ms var(--ease);
}

.overview-form-card.is-active {
  border-color: rgba(42, 127, 116, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(42, 127, 116, 0.08)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(42, 127, 116, 0.1);
}

.overview-form-card.is-pressing,
.overview-form-card:active {
  transform: scale(0.988);
  background: rgba(255, 255, 255, 0.94);
}

.overview-form-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.overview-form-top div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.overview-form-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-form-top span,
.overview-form-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.overview-form-top b {
  min-width: 54px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand-strong);
  background: rgba(42, 127, 116, 0.1);
  font-size: 22px;
}

.form-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.public-form-list {
  display: grid;
  gap: 10px;
}

.form-select-panel {
  margin-top: 2px;
}

.submission-row {
  position: relative;
  width: 100%;
  display: grid;
  gap: 9px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--card-radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.04), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  transition: transform 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease), border 160ms var(--ease);
  touch-action: pan-y;
}

.submission-row::before,
.submission-row::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 74px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  transition: opacity 160ms var(--ease);
  pointer-events: none;
}

.submission-row::before {
  content: "已处理";
  left: 0;
  background: linear-gradient(90deg, rgba(68, 139, 86, 0.95), rgba(68, 139, 86, 0));
}

.submission-row::after {
  content: "处理中";
  right: 0;
  background: linear-gradient(270deg, rgba(217, 156, 70, 0.95), rgba(217, 156, 70, 0));
}

.submission-row.is-pressing,
.submission-row:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.96);
}

.submission-row.is-swiping-right::before,
.submission-row.is-swiping-left::after {
  opacity: 1;
}

.submission-row.is-selected {
  border-color: rgba(42, 127, 116, 0.38);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(42, 127, 116, 0.08), 0 13px 28px rgba(42, 127, 116, 0.08);
}

.submission-open {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.record-select {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.record-select input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(15, 23, 42, 0.24);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 10px rgba(15, 23, 42, 0.05);
}

.record-select input::before {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
  transition: transform 160ms var(--ease);
}

.record-select input:checked {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 6px 14px rgba(27, 94, 87, 0.16);
}

.record-select input:checked::before {
  transform: rotate(-45deg) scale(1);
}

.record-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.submission-quick-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.submission-quick-actions .filter-chip {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.submission-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.submission-main strong,
.submission-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-main span,
.submission-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.submission-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 150px;
}

.status-dot,
.mini-tag,
.detail-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(32, 36, 46, 0.08);
  color: #454a54;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-dot.new {
  color: #15584e;
  background: rgba(31, 122, 107, 0.12);
}

.status-dot.processing {
  color: #8a5a13;
  background: rgba(217, 156, 70, 0.18);
}

.status-dot.done {
  color: #315e3b;
  background: rgba(68, 139, 86, 0.16);
}

.status-dot.archived {
  color: #626773;
  background: rgba(98, 103, 115, 0.13);
}

.form-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.form-item {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.045), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.form-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-template-item {
  grid-template-columns: 1fr;
  gap: 10px;
}

.form-template-item.is-active {
  border-color: rgba(42, 127, 116, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(42, 127, 116, 0.08)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(42, 127, 116, 0.09);
}

.form-open-button {
  display: grid;
  gap: 4px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.form-open-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-row-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.danger-text {
  color: var(--rose);
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  scroll-margin-top: 72px;
}

.template-grid.is-emphasized .template-card {
  border-color: rgba(42, 127, 116, 0.34);
  box-shadow: 0 12px 30px rgba(42, 127, 116, 0.09);
}

.create-form-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px dashed rgba(42, 127, 116, 0.38);
  border-radius: var(--card-radius);
  color: var(--brand-strong);
  background:
    linear-gradient(180deg, rgba(42, 127, 116, 0.1), rgba(255, 255, 255, 0.76)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(42, 127, 116, 0.07);
  text-align: left;
  transition: transform 160ms var(--ease), border 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.create-form-card:active,
.create-form-card.is-pressing {
  transform: scale(0.988);
  background: rgba(255, 255, 255, 0.94);
}

.create-form-card strong {
  font-size: 16px;
}

.create-form-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.template-card {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.045), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  text-align: left;
  transition: transform 160ms var(--ease), border 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.template-card:active,
.template-card.is-pressing {
  transform: scale(0.988);
  background: rgba(255, 255, 255, 0.94);
}

.template-card strong {
  font-size: 15px;
}

.template-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.add-question-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--card-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.preview-panel {
  margin-bottom: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 250, 0.78)),
    rgba(255, 255, 255, 0.76);
}

#formPreview {
  display: grid;
  gap: 10px;
}

.required-toggle {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border 160ms var(--ease), box-shadow 160ms var(--ease);
}

.required-toggle:active,
.required-toggle.is-pressing {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.94);
}

.required-toggle input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--brand);
}

.required-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.required-toggle strong {
  font-size: 14px;
}

.required-toggle small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.required-toggle:has(input:checked) {
  border-color: rgba(42, 127, 116, 0.42);
  background: rgba(42, 127, 116, 0.08);
  box-shadow: inset 0 0 0 1px rgba(42, 127, 116, 0.08);
}

.question-required-toggle {
  margin-top: 2px;
}

.display-mode-panel {
  gap: 12px;
}

.section-inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mode-choice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.mode-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--card-radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  transition: transform 160ms var(--ease), border 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.mode-card.is-active {
  border-color: rgba(42, 127, 116, 0.38);
  background: rgba(42, 127, 116, 0.08);
  box-shadow: inset 0 0 0 1px rgba(42, 127, 116, 0.08);
}

.mode-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.slider-image-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.verification-settings-grid .field {
  gap: 6px;
}

.slider-image-toolbar .secondary-button {
  flex: 1 1 150px;
}

.slider-image-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 1;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.slider-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.style-preview {
  display: grid;
  gap: 12px;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(14px);
}

.detail-drawer[hidden] {
  display: none;
}

.drawer-panel {
  width: min(100%, 520px);
  max-height: min(86vh, 820px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.2), 0 1px 0 rgba(255, 255, 255, 0.94) inset;
  backdrop-filter: blur(18px);
  animation: drawerIn 280ms var(--ease);
}

.drawer-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#detailBody {
  display: grid;
  gap: 12px;
}

.detail-summary,
.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body[data-surface="solid"] .phone-frame,
body[data-surface="solid"] .panel,
body[data-surface="solid"] .project-card,
body[data-surface="solid"] .metric-card,
body[data-surface="solid"] .filter-panel,
body[data-surface="solid"] .overview-form-card,
body[data-surface="solid"] .submission-row {
  background: #ffffff;
  backdrop-filter: none;
}

body[data-surface="soft"] .phone-frame,
body[data-surface="soft"] .panel,
body[data-surface="soft"] .project-card,
body[data-surface="soft"] .metric-card,
body[data-surface="soft"] .filter-panel,
body[data-surface="soft"] .overview-form-card,
body[data-surface="soft"] .submission-row {
  background: rgba(250, 248, 242, 0.9);
  box-shadow: 0 10px 26px rgba(31, 38, 55, 0.08);
}

body[data-density="compact"] .panel,
body[data-density="compact"] .question-card,
body[data-density="compact"] .project-card,
body[data-density="compact"] .filter-panel {
  padding: 12px;
}

body[data-density="spacious"] .panel,
body[data-density="spacious"] .question-card,
body[data-density="spacious"] .project-card,
body[data-density="spacious"] .filter-panel {
  padding: 20px;
}

@media (min-width: 760px) {
  .app-shell {
    align-items: center;
    padding: 28px;
  }

  .phone-frame {
    min-height: 840px;
  }

  .admin-frame {
    width: min(100%, 860px);
  }

  .admin-pane.is-visible {
    display: block;
  }

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

  .filter-panel {
    grid-template-columns: 1.2fr 1fr 1fr 0.9fr;
    align-items: end;
  }

  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drawer-panel {
    align-self: center;
  }
}

@media (max-width: 759px) {
  .dynamic-form {
    padding-bottom: 106px;
  }

  .mobile-submit-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 18;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
  }

  .mobile-submit-meta {
    grid-column: 1;
    min-width: 0;
  }

  .mobile-submit-status {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-submit-track {
    grid-column: 1;
  }

  .mobile-submit-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 44px;
    padding-inline: 14px;
  }

  .verification-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* OnePw visual skin */
:root {
  --ink: #1f2937;
  --muted: #667085;
  --soft: #f7f8fa;
  --paper: #ffffff;
  --line: #e5e7eb;
  --brand: #1677ff;
  --brand-strong: #0958d9;
  --rose: #dc2626;
  --amber: #059669;
  --card-radius: 8px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html {
  background: var(--soft);
}

body {
  background:
    radial-gradient(circle at 18% 16%, rgba(22, 119, 255, 0.09), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #eef4fb 46%, #f8fafc 100%);
  color: var(--ink);
}

.app-shell {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 12px max(36px, env(safe-area-inset-bottom));
}

.phone-frame {
  width: min(100%, 480px);
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.admin-frame {
  width: min(100%, 980px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  align-items: center;
  min-height: 56px;
  margin: 0 -12px 18px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.topbar-title,
.topbar > div {
  display: grid;
  gap: 2px;
}

.eyebrow {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  max-width: none;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 850;
}

h2 {
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.dynamic-form,
.question-editor-list,
.records-list,
.overview-form-list {
  gap: 12px;
}

.panel,
.question-card,
.record-card,
.project-card,
.metric-card,
.filter-panel,
.overview-form-card,
.submission-row,
.drawer-panel,
.admin-tabs,
.form-select-panel,
.preview-panel,
.display-mode-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.panel,
.question-card,
.record-card,
.project-card,
.metric-card,
.filter-panel,
.overview-form-card {
  padding: 16px;
}

.intro {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.intro p,
.hint,
.section-head span,
.record-card time,
.answer-row span,
.image-preview-item span,
.stored-image-grid span {
  color: var(--muted);
}

.primary-button,
.secondary-button,
.icon-button,
.admin-tab,
.filter-chip,
.image-remove-button {
  border-radius: 8px;
  box-shadow: none;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 160ms var(--ease), box-shadow 180ms var(--ease);
}

.primary-button {
  color: #ffffff;
  background: var(--brand);
  box-shadow: none;
}

.primary-button:hover {
  background: var(--brand-strong);
}

.secondary-button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.secondary-button:hover,
.admin-tab:hover {
  border-color: rgba(22, 119, 255, 0.24);
  background: #eef5ff;
  color: var(--brand-strong);
}

#adminScreen .primary-button,
#adminScreen .secondary-button,
#adminScreen .admin-tab,
#adminScreen .filter-chip {
  min-height: 38px;
  border-radius: 8px;
  padding-inline: 14px;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

#adminScreen .primary-button:not(.small),
#adminScreen .secondary-button:not(.small) {
  min-height: 42px;
}

#adminScreen .primary-button.small,
#adminScreen .secondary-button.small {
  min-height: 34px;
  padding-inline: 12px;
}

#adminScreen .primary-button:focus-visible,
#adminScreen .secondary-button:focus-visible,
#adminScreen .admin-tab:focus-visible,
#adminScreen .filter-chip:focus-visible,
#adminScreen .mode-card:focus-visible,
#adminScreen .template-card:focus-visible,
#adminScreen .overview-form-card:focus-visible,
#adminScreen .create-form-card:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

#adminScreen .secondary-button.danger-text,
#adminScreen .danger-text,
#adminScreen .danger {
  color: var(--rose);
}

#adminScreen .secondary-button.danger-text:hover,
#adminScreen .danger-text:hover,
#adminScreen .danger:hover {
  border-color: rgba(220, 38, 38, 0.26);
  background: rgba(220, 38, 38, 0.06);
  color: var(--rose);
}

.progress-entry-button {
  min-width: 82px;
  border-radius: 8px;
}

#adminWorkspace {
  display: grid;
  gap: 14px;
}

#adminWorkspace[hidden] {
  display: none;
}

#adminScreen .admin-tabs {
  top: 57px;
  gap: 6px;
  margin-bottom: 0;
  padding: 5px;
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

#adminScreen .admin-tab {
  min-height: 36px;
  color: var(--muted);
  background: transparent;
}

#adminScreen .admin-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: none;
}

#adminScreen .admin-pane {
  min-width: 0;
}

#adminScreen .project-card,
#adminScreen .compact-project-card {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

#adminScreen .project-card h2 {
  margin-top: 2px;
}

#adminScreen .project-card .hint {
  margin-top: 5px;
}

#adminScreen .project-actions,
#adminScreen .record-toolbar,
#adminScreen .slider-image-toolbar,
#adminScreen .record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#adminScreen .project-actions .secondary-button,
#adminScreen .project-actions .primary-button,
#adminScreen .record-toolbar .secondary-button {
  flex: 0 0 auto;
}

#adminScreen .record-toolbar {
  justify-content: flex-start;
}

#adminScreen .record-toolbar span {
  margin-left: auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  padding-inline: 10px;
  font-size: 12px;
  font-weight: 800;
}

#adminScreen .section-head {
  align-items: center;
  margin-top: 18px;
}

#adminScreen .section-head:first-child {
  margin-top: 0;
}

input,
textarea,
select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  color: #0f172a;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(22, 119, 255, 0.74);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

input:active,
textarea:active,
select:active {
  transform: none;
}

#adminScreen input,
#adminScreen textarea,
#adminScreen select {
  min-height: 42px;
  font-size: 14px;
}

#adminScreen textarea {
  min-height: 88px;
  resize: vertical;
}

#adminScreen .filter-panel {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

#adminScreen .filter-panel .primary-button {
  align-self: end;
}

#adminScreen .metric-grid {
  margin-bottom: 16px;
}

#adminScreen .metric-card {
  min-height: 86px;
  gap: 8px;
  border-color: var(--line);
  background: #ffffff;
}

#adminScreen .metric-card strong {
  font-size: 30px;
  letter-spacing: 0;
}

#adminScreen .overview-form-card,
#adminScreen .submission-row,
#adminScreen .form-item,
#adminScreen .template-card,
#adminScreen .mode-card,
#adminScreen .create-form-card,
#adminScreen .question-card,
#adminScreen .add-question-panel,
#adminScreen .required-toggle {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

#adminScreen .overview-form-card:hover,
#adminScreen .template-card:hover,
#adminScreen .mode-card:hover,
#adminScreen .form-item:hover,
#adminScreen .create-form-card:hover {
  border-color: rgba(22, 119, 255, 0.24);
  background: #f8fbff;
}

#adminScreen .overview-form-card.is-active,
#adminScreen .form-template-item.is-active,
#adminScreen .mode-card.is-active,
#adminScreen .required-toggle:has(input:checked) {
  border-color: var(--brand);
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px var(--brand);
}

#adminScreen .create-form-card {
  border-style: dashed;
  border-color: rgba(22, 119, 255, 0.42);
  color: var(--brand-strong);
}

#adminScreen .mode-choice {
  gap: 10px;
}

#adminScreen .mode-card,
#adminScreen .template-card {
  min-height: 82px;
}

#adminScreen .mode-card strong,
#adminScreen .template-card strong,
#adminScreen .create-form-card strong {
  font-size: 14px;
}

#adminScreen .mode-card span,
#adminScreen .template-card span,
#adminScreen .create-form-card span {
  font-size: 12px;
}

.field > span,
.field legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.field-panel:focus-within {
  border-color: rgba(22, 119, 255, 0.32);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1), var(--shadow);
}

.choice,
.rating-row label,
.locked-item,
.image-preview-item,
.stored-image-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.choice:hover,
.rating-row label:hover {
  border-color: rgba(22, 119, 255, 0.24);
  background: #f8fbff;
}

.choice:has(input:checked),
.rating-row label:has(input:checked),
.filter-chip.is-active {
  border-color: var(--brand);
  background: #eef5ff;
  color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.choice input {
  border-color: rgba(31, 41, 55, 0.24);
  background: #ffffff;
  box-shadow: none;
}

.choice input:checked {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: none;
}

.choice input[type="checkbox"] {
  border-radius: 4px;
}

.rating-row label:has(input:checked) {
  color: var(--brand-strong);
}

.upload-drop {
  border-color: rgba(22, 119, 255, 0.34);
  background: #ffffff;
  color: var(--brand-strong);
  box-shadow: none;
}

.upload-drop::before {
  background: var(--brand);
  box-shadow: none;
}

.upload-drop:active {
  border-color: rgba(22, 119, 255, 0.52);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

#adminScreen .form-row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#adminScreen .form-row-actions .primary-button,
#adminScreen .form-row-actions .secondary-button,
#adminScreen .question-order-actions .secondary-button,
#adminScreen .option-row .secondary-button {
  width: 100%;
}

#adminScreen .form-open-button {
  border-radius: 8px;
  padding: 2px 0;
}

#adminScreen .question-card {
  gap: 14px;
}

#adminScreen .question-card .card-top {
  align-items: center;
  gap: 10px;
}

#adminScreen .question-order-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(54px, 1fr));
  gap: 6px;
  min-width: 186px;
}

#adminScreen .question-order-actions .secondary-button {
  min-height: 32px;
  padding-inline: 8px;
  font-size: 12px;
}

#adminScreen .add-question-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

#adminScreen .add-question-panel .primary-button,
#adminScreen .add-question-panel .secondary-button {
  width: 100%;
}

#adminScreen .option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

#adminScreen .option-row .secondary-button {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

#adminScreen .required-toggle {
  min-height: 62px;
  border-radius: 8px;
}

.progress-step {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.progress-step.is-active {
  border-color: rgba(22, 119, 255, 0.35);
  background: #eef5ff;
  color: var(--brand-strong);
}

.progress-step.is-active span,
.status-pill {
  background: #eef5ff;
  color: var(--brand-strong);
}

.admin-tabs {
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.admin-tab {
  min-height: 42px;
  color: var(--muted);
  font-weight: 800;
}

.admin-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: none;
}

.metric-card strong,
.admin-stats strong {
  color: #0f172a;
}

.toast {
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.92);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

@media (min-width: 760px) {
  .app-shell {
    align-items: flex-start;
    padding-top: 28px;
  }

  .phone-frame {
    min-height: auto;
  }

  .topbar {
    margin-left: 0;
    margin-right: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
  }

  #adminScreen .filter-panel {
    grid-template-columns: 1.2fr 1fr 1fr 0.9fr;
    align-items: end;
  }

  #adminScreen .mode-choice,
  #adminScreen .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #adminScreen .add-question-panel {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.1fr) auto auto;
    align-items: end;
  }

  #adminScreen .add-question-panel .primary-button,
  #adminScreen .add-question-panel .secondary-button {
    width: auto;
    min-width: 112px;
  }

  #adminScreen .form-template-item {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
  }

  #adminScreen .form-row-actions {
    width: 240px;
  }
}

.progress-panel {
  display: grid;
  gap: 14px;
  animation: viewIn 320ms var(--ease);
}

.progress-hero,
.progress-query-card,
.progress-result {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.progress-hero {
  display: grid;
  gap: 10px;
  padding: 22px 20px;
}

.progress-hero-copy {
  display: grid;
  gap: 8px;
}

.progress-hero h2 {
  font-size: 28px;
  line-height: 1.08;
}

.progress-query-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.progress-query-head,
.progress-query-actions {
  display: grid;
  gap: 6px;
}

.progress-query-head strong {
  color: #0f172a;
  font-size: 16px;
}

.progress-query-card .primary-button {
  min-height: 48px;
}

.progress-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 2px 0;
}

.progress-preview-item {
  display: grid;
  gap: 8px;
  min-height: 84px;
  align-content: center;
  justify-items: center;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.progress-preview-item small {
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.progress-preview-item strong {
  color: #0f172a;
  font-size: 15px;
}

.progress-result {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.progress-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.progress-result-title {
  display: grid;
  gap: 4px;
}

.progress-result-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.progress-result-head strong {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--brand-strong);
  padding: 0 14px;
  font-size: 13px;
}

.progress-steps {
  gap: 10px;
}

.progress-step {
  align-content: start;
  min-height: 112px;
  padding: 15px 10px;
}

.progress-step span {
  width: 28px;
  height: 28px;
}

.progress-step small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.progress-step.is-current {
  box-shadow: inset 0 0 0 1px var(--brand), 0 10px 26px rgba(22, 119, 255, 0.1);
}

.progress-step.is-pending {
  border-style: dashed;
  background: #fcfcfd;
  box-shadow: none;
}

.progress-step.is-done span {
  font-size: 13px;
}

.progress-time {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.progress-empty {
  display: grid;
  gap: 8px;
  min-height: 112px;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 22px;
  text-align: center;
}

.progress-empty-kicker {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.progress-empty strong {
  color: #111827;
  font-size: 16px;
}

.progress-empty span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .progress-preview {
    grid-template-columns: 1fr;
  }

  .progress-result-head {
    flex-direction: column;
  }

  .progress-result-head strong {
    justify-self: start;
  }
}

/* Uiverse.io by Nawsome - heavy-cheetah-95 */
.dynamic-form .choice-grid {
  gap: 8px;
}

.dynamic-form .choice {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 12px;
  padding: 10px 13px 10px 14px;
  border-color: #e5e7eb;
  background: #ffffff;
  color: #111827;
  box-shadow: none;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.dynamic-form .choice:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.dynamic-form .choice:active,
.dynamic-form .choice.is-pressing {
  transform: scale(0.992);
}

.dynamic-form .choice:has(input:checked) {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
  box-shadow: none;
}

.dynamic-form .choice-text {
  min-width: 0;
}

.dynamic-form .checkBox {
  display: block;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 0px 0px 2px #fff;
  justify-self: end;
}

.dynamic-form .checkBox div {
  width: 60px;
  height: 60px;
  background-color: #fff;
  top: -52px;
  left: -52px;
  position: absolute;
  transform: rotateZ(45deg);
  z-index: 100;
}

.dynamic-form .checkBox input:checked + div {
  left: -10px;
  top: -10px;
}

.dynamic-form .checkBox input {
  position: absolute;
  left: 50px;
  visibility: hidden;
}

.dynamic-form .transition {
  transition: 300ms ease;
}

.dynamic-form .choice:not(:has(input:checked)) .checkBox {
  box-shadow: 0px 0px 0px 2px #111827;
}

.dynamic-form .choice:not(:has(input:checked)) .checkBox div {
  background-color: #111827;
}

.dynamic-form .choice:has(input:checked) .checkBox {
  box-shadow: 0px 0px 0px 2px #fff;
}

.dynamic-form .choice:has(input:checked) .checkBox div {
  background-color: #fff;
}

.dynamic-form .choice input,
.dynamic-form .choice input::before,
.dynamic-form .choice input::after,
.dynamic-form .choice input[type="radio"]::before,
.dynamic-form .choice input[type="checkbox"]::before {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

/* Public home: clean Apple-style white canvas */
html:has(body.public-home) {
  background: #ffffff;
}

body.public-home {
  min-height: 100vh;
  background: #ffffff;
  color: #111111;
}

body.public-home .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: max(20px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) max(44px, env(safe-area-inset-bottom));
  display: block;
}

body.public-home .phone-frame {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(28px, 7vh, 72px) 0 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.public-home .topbar {
  position: static;
  min-height: 0;
  justify-content: flex-end;
  margin: 0 0 clamp(14px, 3vh, 28px);
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

body.public-home .topbar-title {
  display: none;
}

body.public-home .eyebrow {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

body.public-home h1 {
  max-width: 680px;
  color: #1d1d1f;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
}

body.public-home h2 {
  color: #1d1d1f;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.08;
  font-weight: 780;
}

body.public-home .progress-entry-button {
  min-width: auto;
  min-height: 38px;
  margin-top: 0;
  border-color: #d2d2d7;
  border-radius: 999px;
  color: #1d1d1f;
  background: #ffffff;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}

body.public-home .progress-entry-button:hover {
  border-color: #b9b9c0;
  background: #fbfbfd;
}

body.public-home .dynamic-form,
body.public-home .progress-panel {
  gap: 10px;
}

body.public-home .public-question-flow {
  display: grid;
  gap: 10px;
}

body.public-home .public-question-page {
  display: none;
  gap: 10px;
}

body.public-home .public-question-page.is-active {
  display: grid;
  animation: publicFormItemIn 420ms var(--ease) both;
}

body.public-home .public-question-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 760;
}

body.public-home .public-question-page-head strong {
  color: #1d1d1f;
  font-size: 13px;
}

body.public-home .public-question-page-actions {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 10px;
  margin-top: 2px;
}

body.public-home .public-question-page-actions .secondary-button[hidden] {
  display: none;
}

body.public-home .public-question-page-actions .secondary-button[hidden] + .primary-button {
  grid-column: 1 / -1;
}

body.public-home .panel,
body.public-home .form-select-panel,
body.public-home .progress-hero,
body.public-home .progress-query-card,
body.public-home .progress-result {
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: none;
}

body.public-home .intro {
  padding: 6px 0 clamp(18px, 3.4vw, 28px);
  border: 0;
  border-bottom: 1px solid #e8e8ed;
  border-radius: 0;
  background: transparent;
}

body.public-home .intro p,
body.public-home .hint,
body.public-home .field span,
body.public-home .form-progress-note,
body.public-home .mobile-submit-status,
body.public-home .mobile-submit-count {
  color: #6e6e73;
}

body.public-home .form-progress-count {
  color: #0071e3;
}

body.public-home .field input,
body.public-home .field textarea,
body.public-home .field select {
  min-height: 52px;
  border-color: #d2d2d7;
  border-radius: 12px;
  background-color: #fbfbfd;
}

body.public-home .field input:focus,
body.public-home .field textarea:focus,
body.public-home .field select:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

body.public-home .primary-button {
  min-height: 52px;
  border-radius: 999px;
  background: #0071e3;
  color: #ffffff;
}

body.public-home .primary-button:hover {
  background: #0077ed;
}

body.public-home .secondary-button {
  border-color: #d2d2d7;
  border-radius: 999px;
  background: #ffffff;
  color: #1d1d1f;
}

body.public-home .form-progress-panel,
body.public-home .field-panel,
body.public-home .lookup-code-panel {
  padding: clamp(18px, 3vw, 24px);
}

body.public-home .field-panel,
body.public-home .form-progress-panel,
body.public-home .lookup-code-panel,
body.public-home .slider-panel,
body.public-home .public-guide,
body.public-home .public-reinforce,
body.public-home .submit-button {
  animation: publicFormItemIn 520ms var(--ease) both;
}

body.public-home .dynamic-form > *:nth-child(1) {
  animation-delay: 20ms;
}

body.public-home .dynamic-form > *:nth-child(2) {
  animation-delay: 70ms;
}

body.public-home .dynamic-form > *:nth-child(3) {
  animation-delay: 110ms;
}

body.public-home .dynamic-form > *:nth-child(4) {
  animation-delay: 145ms;
}

body.public-home .dynamic-form > *:nth-child(n + 5) {
  animation-delay: 175ms;
}

body.public-home .field-panel {
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease);
}

body.public-home .field-panel:hover {
  transform: translateY(-1px);
  border-color: #dadae0;
  background: #ffffff;
}

body.public-home .field-panel:focus-within {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.38);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.055), 0 0 0 4px rgba(0, 113, 227, 0.08);
}

body.public-home .form-progress-panel {
  border-color: #f0f0f2;
  background: #fbfbfd;
}

body.public-home .form-progress-track,
body.public-home .mobile-submit-track {
  background: #f5f5f7;
}

body.public-home .form-progress-fill,
body.public-home .mobile-submit-fill {
  background: #0071e3;
}

body.public-home .dynamic-form .choice {
  min-height: 52px;
  border-color: #e8e8ed;
  border-radius: 14px;
  background: #fbfbfd;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

body.public-home .dynamic-form .choice:hover {
  border-color: #d2d2d7;
  background: #ffffff;
}

body.public-home .dynamic-form .choice:has(input:checked) {
  border-color: #1d1d1f;
  background: #1d1d1f;
}

body.public-home .primary-button,
body.public-home .secondary-button,
body.public-home .dynamic-form .choice,
body.public-home .public-guide-option,
body.public-home .public-reinforce-option,
body.public-home .rating-row label,
body.public-home .order-token {
  will-change: transform;
}

body.public-home .primary-button:active,
body.public-home .secondary-button:active,
body.public-home .dynamic-form .choice:active,
body.public-home .public-guide-option:active,
body.public-home .public-reinforce-option:active,
body.public-home .rating-row label:active,
body.public-home .order-token:active {
  transform: scale(0.985);
}

@keyframes publicFormItemIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

body.public-home .slider-track {
  background-color: #f5f5f7;
}

body.public-home .slider-track.has-image {
  background-image: none !important;
}

body.public-home .slider-track.has-image::after {
  display: none;
}

body.public-home .progress-preview-item,
body.public-home .progress-step.is-active,
body.public-home .progress-result-head strong {
  border-color: #d6eaff;
  background: #f5fbff;
  color: #0071e3;
}

body.public-home .progress-panel {
  gap: 12px;
}

body.public-home .progress-hero {
  padding: clamp(20px, 4vw, 30px);
  background:
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}

body.public-home .progress-query-head strong,
body.public-home .progress-preview-item strong {
  color: #1d1d1f;
}

body.public-home .progress-query-card,
body.public-home .progress-result {
  padding: clamp(18px, 3vw, 26px);
}

body.public-home .progress-query-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 251, 253, 0.98)),
    #ffffff;
}

body.public-home .progress-query-card:focus-within {
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 16px 42px rgba(0, 113, 227, 0.08);
}

body.public-home .progress-time,
body.public-home .progress-empty span {
  color: #6e6e73;
}

body.public-home .progress-preview {
  gap: 10px;
}

body.public-home .progress-preview-item {
  min-height: 88px;
  border-color: #dceafd;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body.public-home .progress-preview-item small,
body.public-home .progress-empty-kicker {
  color: #0071e3;
}

body.public-home .progress-result {
  background:
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.07), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}

body.public-home .progress-step {
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: none;
}

body.public-home .progress-step.is-current {
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.42), 0 12px 28px rgba(0, 113, 227, 0.08);
}

body.public-home .progress-step.is-pending {
  border-color: #ececf1;
  background: #fbfbfd;
}

body.public-home .progress-step span {
  background: #eef2f7;
  color: #4b5563;
}

body.public-home .progress-step strong {
  color: #1d1d1f;
}

body.public-home .progress-time {
  border-color: #e8e8ed;
  border-radius: 14px;
  background: #ffffff;
}

body.public-home .progress-empty {
  border-color: #d9e7fb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.public-home .public-guide {
  display: grid;
  gap: clamp(18px, 5vw, 28px);
  padding-top: clamp(8px, 3vh, 24px);
}

body.public-home .public-guide-head {
  display: grid;
  gap: 8px;
}

body.public-home .public-guide-head h2 {
  max-width: 560px;
  font-size: clamp(34px, 9vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

body.public-home .public-guide-hint {
  max-width: 560px;
  color: #6e6e73;
  font-size: 15px;
  line-height: 1.58;
}

body.public-home .public-guide-options {
  display: grid;
  gap: 10px;
}

body.public-home .public-guide-option {
  width: 100%;
  min-height: 76px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 16px 18px;
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  color: #1d1d1f;
  background: #fbfbfd;
  text-align: left;
  box-shadow: none;
  animation: publicFormItemIn 520ms var(--ease) both;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease);
}

body.public-home .public-guide-option:nth-child(1) {
  animation-delay: 70ms;
}

body.public-home .public-guide-option:nth-child(2) {
  animation-delay: 115ms;
}

body.public-home .public-guide-option:nth-child(3) {
  animation-delay: 155ms;
}

body.public-home .public-guide-option:nth-child(n + 4) {
  animation-delay: 190ms;
}

body.public-home .public-guide-option:hover {
  transform: translateY(-1px);
  border-color: #d2d2d7;
  background: #ffffff;
}

body.public-home .public-guide-option:focus-visible {
  outline: 0;
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

body.public-home .public-guide-option.is-loading {
  color: #6e6e73;
  background: #f5f5f7;
}

body.public-home .public-guide-option strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 820;
}

body.public-home .public-guide-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6e6e73;
  font-size: 13px;
  line-height: 1.35;
}

body.public-home .public-reinforce {
  display: grid;
  gap: 18px;
  padding-top: clamp(24px, 8vh, 72px);
}

body.public-home .public-reinforce h2 {
  max-width: 560px;
  font-size: clamp(34px, 9vw, 58px);
  line-height: 1.02;
}

body.public-home .public-reinforce-questions {
  display: grid;
  gap: 14px;
  margin-top: 2px;
}

.public-reinforce-question {
  display: grid;
  gap: 9px;
}

body.public-home .public-reinforce-question > strong {
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 820;
}

body.public-home .public-reinforce-options {
  display: grid;
  gap: 8px;
}

body.public-home .public-reinforce-option {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  background: #fbfbfd;
  color: #1d1d1f;
  text-align: left;
  font-size: 14px;
  font-weight: 760;
  animation: publicFormItemIn 520ms var(--ease) both;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

body.public-home .public-reinforce-option:hover {
  border-color: #d2d2d7;
  background: #ffffff;
}

body.public-home .public-reinforce-option.is-active {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #ffffff;
}

body.public-home .public-reinforce-question:nth-child(1) .public-reinforce-option {
  animation-delay: 90ms;
}

body.public-home .public-reinforce-question:nth-child(2) .public-reinforce-option {
  animation-delay: 130ms;
}

body.public-home .public-reinforce-question:nth-child(3) .public-reinforce-option {
  animation-delay: 170ms;
}

body.public-home .public-reinforce-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 759px) {
  body.public-home .app-shell {
    padding-inline: 18px;
  }

  body.public-home .phone-frame {
    padding-top: clamp(18px, 5vh, 44px);
  }

  body.public-home .topbar {
    align-items: center;
    gap: 18px;
  }

  body.public-home h1 {
    font-size: clamp(38px, 13vw, 56px);
  }

  body.public-home .public-reinforce-actions {
    grid-template-columns: 1fr;
  }

  body.public-home .mobile-submit-bar {
    left: 18px;
    right: 18px;
    border-color: #e8e8ed;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
