:root {
  --brand: #d97706;
  --action: #a94f00;
  --action-pressed: #854000;
  --selection: #fce7d0;
  --canvas: #fbf7f2;
  --surface: #fffbf5;
  --text: #2b2118;
  --muted: #6b5e52;
  --border: #e6d8ca;
  --focus: #005fcc;
  --success: #18794e;
  --success-surface: #e8f4ed;
  --error: #b42318;
  --error-surface: #fdecec;
  --draft: #a96c2a;
  --draft-surface: #fbe5cd;
  --review: #a65300;
  --review-surface: #fff0d5;
  --finalized: #245b9c;
  --finalized-surface: #e8eef9;
  --shadow: 0 12px 28px rgba(86, 48, 17, 0.07);
  --radius-control: 8px;
  --radius-card: 12px;
  --nav-height: calc(76px + env(safe-area-inset-bottom, 0px));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", Arial, sans-serif;
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

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

button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

button, a { min-height: 48px; }

button { cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; min-height: 100dvh; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px max(24px, env(safe-area-inset-right, 0px)) calc(var(--nav-height) + 24px) max(24px, env(safe-area-inset-left, 0px));
  max-width: 1120px;
  margin: 0 auto;
}

.screen.narrow { max-width: 560px; }

.screen.centered {
  display: grid;
  place-items: center;
}

.content-stack { display: grid; gap: 24px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.account-topbar {
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand-lockup { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--action);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.brand-name { font-size: 18px; letter-spacing: -0.01em; }

.eyebrow, .section-kicker {
  margin: 0;
  color: var(--action);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-kicker { color: var(--muted); }

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

h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.18; letter-spacing: -0.025em; }
h2 { margin-bottom: 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.02em; }
h3 { margin-bottom: 6px; font-size: 20px; line-height: 1.35; }
.lead, .support-copy { color: var(--muted); }
.lead { max-width: 540px; font-size: 18px; }
.support-copy { margin-bottom: 0; }

.ui-icon {
  display: block;
  width: clamp(16px, min(2.35vw, 2.45vh), 20px);
  height: clamp(16px, min(2.35vw, 2.45vh), 20px);
  flex: 0 0 auto;
  overflow: visible;
}
.heading-with-icon {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: clamp(8px, min(1.4vw, 1.4vh), 12px);
}
.heading-with-icon > span { min-width: 0; overflow-wrap: anywhere; }
h1.heading-with-icon > .ui-icon { width: clamp(20px, min(3vw, 3vh), 28px); height: clamp(20px, min(3vw, 3vh), 28px); margin-top: .12em; }
h2.heading-with-icon > .ui-icon { width: clamp(18px, min(2.5vw, 2.5vh), 23px); height: clamp(18px, min(2.5vw, 2.5vh), 23px); margin-top: .08em; }
h3.heading-with-icon > .ui-icon { width: clamp(17px, min(2.1vw, 2.1vh), 20px); height: clamp(17px, min(2.1vw, 2.1vh), 20px); margin-top: .16em; }
.button-with-icon { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; justify-content: center; gap: clamp(7px, 1.4vw, 10px); }
.button-with-icon > span { min-width: 0; overflow-wrap: anywhere; }
.button-with-icon > .ui-icon { width: clamp(16px, min(2.3vw, 2.3vh), 19px); height: clamp(16px, min(2.3vw, 2.3vh), 19px); }
.icon-label { display: inline-flex; min-width: 0; align-items: center; gap: 8px; }
.icon-label > .ui-icon { width: clamp(15px, min(1.9vw, 2vh), 17px); height: clamp(15px, min(1.9vw, 2vh), 17px); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.button, .text-button, .back-button, .nav-item, .filter-button, .tab-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-control);
  font-weight: 700;
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.button:active { transform: translateY(1px); }
.button.primary { background: var(--action); color: #fff; }
.button.primary:hover { background: var(--action-pressed); }
.button.secondary { border: 1px solid var(--brand); color: var(--action); background: var(--surface); }
.button.secondary:hover { background: var(--selection); }
.button.ghost { color: var(--action); padding-inline: 0; }
.button.full { width: 100%; }
.button-with-icon.full { justify-content: center; }

.text-button, .back-button { color: var(--action); font-weight: 700; padding: 8px 0; }
.text-button:hover, .back-button:hover { text-decoration: underline; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card.pad { padding: 20px; }

.welcome-wrap { width: min(100%, 560px); }
.welcome-wrap .brand-lockup { margin-bottom: 68px; }
.welcome-copy { margin-bottom: 28px; }
.welcome-copy h1 { font-size: clamp(34px, 8vw, 52px); max-width: 490px; }
.welcome-features { display: grid; gap: 12px; margin: 28px 0 42px; }
.feature-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 14px; }
.step-number { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--selection); color: var(--action); font-weight: 700; font-size: 13px; }
.feature-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--selection); color: var(--action); }
.feature-icon .ui-icon { width: clamp(19px, min(2.8vw, 2.8vh), 23px); height: clamp(19px, min(2.8vw, 2.8vh), 23px); }
.feature-row strong { display: block; margin-bottom: 2px; font-size: 16px; }
.feature-row span:last-child { color: var(--muted); font-size: 14px; }
.preview-panel { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--border); }
.preview-panel p { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-actions .button { min-height: 44px; font-size: 14px; }

.auth-card { width: min(100%, 500px); }
.auth-card .back-button { margin-bottom: 26px; }
.form-stack { display: grid; gap: 16px; }
.form-stack + .form-stack { margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field label, .radio-label { font-size: 14px; font-weight: 700; }
.field input, .field textarea, .field select, .search-input {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  padding: 14px 12px;
}
.field select.select-control {
  min-height: 60px;
  padding-inline-end: 40px;
  font-size: max(16px, 1em);
  touch-action: manipulation;
  appearance: auto;
  -webkit-appearance: menulist;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.95; }
.field input[type="number"] { appearance: textfield; }
.field input[type="number"]::-webkit-inner-spin-button, .field input[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
.helper { margin: 0; color: var(--muted); font-size: 14px; }
.error-text { margin: 0; color: var(--error); font-size: 14px; font-weight: 600; }
.radio-group { display: grid; gap: 8px; }
.radio-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.radio-option { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); }
.radio-option input { width: 18px; height: 18px; accent-color: var(--action); }
.date-display { display: flex; align-items: center; min-height: 60px; padding: 14px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); color: var(--muted); }
.seller-display { color: var(--text); font-weight: 600; }

.sauda-type-grid { display: grid; gap: 16px; }
.sauda-type-option { display: flex; width: 100%; min-height: 200px; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; color: var(--text); text-align: left; }
.sauda-type-option:hover { border-color: var(--brand); background: var(--selection); }
.type-symbol { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 2px; border-radius: 12px; background: var(--selection); color: var(--action); }
.sauda-type-option > .type-symbol { color: var(--action); }
.type-symbol .ui-icon { width: clamp(20px, min(3vw, 3vh), 25px); height: clamp(20px, min(3vw, 3vh), 25px); }
.sauda-type-option strong { font-size: 21px; }
.sauda-type-option > span:not(.section-kicker) { color: var(--muted); }
.sauda-type-option .type-cta { margin-top: auto; color: var(--action); font-weight: 700; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-header .support-copy { margin-bottom: 0; }
.page-header .button { flex: 0 0 auto; }

.search-wrap { margin-bottom: 24px; }
.search-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.search-label.icon-label, .filter-label.icon-label { display: inline-flex; }
.filter-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-button { min-height: 40px; padding: 8px 16px; border-radius: 8px; color: var(--muted); }
.filter-button.active { background: var(--selection); color: var(--action); font-weight: 700; }

.sauda-list { display: grid; gap: 12px; }
.sauda-card { padding: 18px; }
.sauda-card-button { width: 100%; border: 0; padding: 0; text-align: left; background: transparent; color: inherit; }
.sauda-kind { display: block; margin-bottom: 4px; color: var(--action); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sauda-kind.icon-label { display: inline-flex; }
.sauda-kind .ui-icon { width: clamp(13px, min(1.8vw, 1.9vh), 15px); height: clamp(13px, min(1.8vw, 1.9vh), 15px); }
.sauda-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sauda-card-top > div { min-width: 0; }
.sauda-card-top h3, .sauda-card-top .sauda-meta { overflow-wrap: anywhere; }
.sauda-card h3 { margin-bottom: 2px; }
.sauda-meta { margin: 0; color: var(--muted); font-size: 14px; }
.sauda-rate { margin: 14px 0 0; color: var(--text); font-weight: 700; }

.status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status-badge .ui-icon { width: clamp(13px, min(1.8vw, 1.9vh), 15px); height: clamp(13px, min(1.8vw, 1.9vh), 15px); margin-right: 7px; }
.status-draft { background: var(--draft-surface); color: var(--draft); }
.status-review { background: var(--review-surface); color: var(--review); }
.status-finalized { background: var(--finalized-surface); color: var(--finalized); }
.status-paid { background: var(--success-surface); color: var(--success); }

.empty-state { padding: 24px 20px; text-align: left; }
.empty-state p { color: var(--muted); }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 30px; }
.summary-card { padding: 16px; }
.summary-card .summary-value { display: block; margin-top: 4px; font-size: 30px; font-weight: 700; line-height: 1; }
.summary-card .summary-label { color: var(--muted); font-size: 14px; }
.profile-summary { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 20px; }
.profile-summary h2 { margin: 0 0 4px; font-size: clamp(20px, 3vw, 26px); }
.profile-avatar, .user-row-avatar { display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--selection); color: var(--action); font-weight: 700; letter-spacing: .02em; }
.profile-avatar { width: 60px; height: 60px; font-size: 20px; }
.role-label { color: var(--muted); font-size: 14px; }
.user-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 16px 18px; }
.summary-icon { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--selection); color: var(--action); }
.summary-icon .ui-icon { width: clamp(19px, min(2.8vw, 2.8vh), 23px); height: clamp(19px, min(2.8vw, 2.8vh), 23px); }
.user-summary .summary-label { display: block; color: var(--muted); font-size: 13px; }
.user-summary .summary-value { display: block; margin-top: 1px; font-size: 22px; line-height: 1.1; }
.user-summary-total { margin-left: auto; color: var(--muted); font-size: 14px; }
.user-create-panel { margin-bottom: 24px; overflow: hidden; }
.user-create-panel > summary { display: flex; min-height: 58px; align-items: center; padding: 14px 18px; color: var(--action); font-weight: 700; cursor: pointer; list-style: none; }
.user-create-panel > summary::-webkit-details-marker { display: none; }
.user-create-panel[open] > summary { border-bottom: 1px solid var(--border); }
.user-create-panel > summary .ui-icon { transition: transform 180ms ease; }
.user-create-panel[open] > summary .ui-icon { transform: rotate(45deg); }
.user-create-form { display: grid; gap: 16px; padding: 18px; }
.users-section { margin-top: 26px; }
.users-section-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.users-section-heading h2 { margin: 0; font-size: clamp(20px, 2.6vw, 26px); }
.users-section-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.user-list { display: grid; gap: 10px; }
.user-row { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px; }
.user-row-avatar { width: 42px; height: 42px; font-size: 14px; }
.user-row-main { display: grid; min-width: 0; gap: 2px; }
.user-row-main strong, .user-row-main > span { min-width: 0; overflow-wrap: anywhere; }
.user-row-main > span { color: var(--muted); font-size: 13px; }
.user-status { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; }
.user-status .ui-icon { width: clamp(13px, min(1.8vw, 1.9vh), 15px); height: clamp(13px, min(1.8vw, 1.9vh), 15px); }
.user-status.active { color: var(--success); }
.user-status.inactive { color: var(--muted); }
.user-toggle { min-height: 40px; padding: 0 12px; font-size: 13px; }
.work-queue { display: grid; gap: 12px; }
.queue-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; }
.queue-card p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.queue-card .text-button { white-space: nowrap; }

.review-card { display: grid; gap: 18px; }
.review-card .card { padding: 18px; }
.review-card .text-button { text-align: left; }
.review-card .button-row { margin-top: 18px; }

.subnav { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.tab-button { flex: 1; min-height: 52px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; }
.tab-button.active { border-bottom-color: var(--brand); color: var(--action); background: var(--selection); }

.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--action); font-weight: 700; }
.back-link::before { display: none; }

.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.detail-block { padding: 20px 18px; }
.terms-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 0 18px; }
.term-row { display: contents; }
.term-label, .term-value { padding: 9px 0; border-bottom: 1px solid rgba(230,216,202,.65); }
.term-label { color: var(--muted); }
.term-value { font-weight: 700; overflow-wrap: anywhere; }
.notice { padding: 18px; border-radius: var(--radius-card); border: 1px solid var(--border); }
.notice.review { background: #fff7ed; border-color: #f3c996; }
.notice.success { background: var(--success-surface); border-color: #b6d9bd; }
.notice h3 { color: var(--success); }
.notice.review h3 { color: var(--review); }
.notice p:last-child { margin-bottom: 0; color: var(--muted); }

.sticky-actions { position: static; margin: 24px 0 0; padding: 0; background: none; }
.sticky-actions .button-row { justify-content: flex-end; }

.app-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 10; display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -8px 24px rgba(86,48,17,.04); }
.app-bottom-nav-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 1120px); }
.app-bottom-nav-inner.admin-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav-item { display: flex; min-width: 0; min-height: 76px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.nav-item .ui-icon { width: clamp(18px, min(2.7vw, 2.7vh), 22px); height: clamp(18px, min(2.7vw, 2.7vh), 22px); }
.nav-item.active { color: var(--action); background: var(--selection); }
.nav-label { display: block; max-width: 100%; overflow-wrap: anywhere; text-align: center; }

.upload-card { padding: 18px; }
.upload-card label { display: grid; gap: 10px; }
.upload-button { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 14px; border: 1px solid var(--brand); border-radius: var(--radius-control); color: var(--action); font-weight: 700; cursor: pointer; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-button small { color: var(--muted); font-weight: 400; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(43,33,24,.36); }
.modal { width: min(100%, 460px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 24px; border-radius: var(--radius-card); background: var(--surface); box-shadow: 0 24px 60px rgba(43,33,24,.22); }
.modal p { color: var(--muted); }
.modal .button-row { justify-content: flex-end; }

.toast-region { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); left: max(12px, env(safe-area-inset-left)); z-index: 30; display: grid; gap: 8px; width: auto; max-width: 360px; margin-inline-start: auto; }
.toast { padding: 14px 16px; border: 1px solid #b6d9bd; border-radius: var(--radius-control); background: var(--success-surface); color: var(--success); box-shadow: var(--shadow); font-weight: 700; animation: toast-arrive 200ms ease-out both; }
.toast.error { border-color: #efb7b1; background: var(--error-surface); color: var(--error); }
.toast.neutral { border-color: var(--border); background: var(--surface); color: var(--text); }

.success-page { display: flex; min-height: min(66vh, 620px); flex-direction: column; align-items: flex-start; justify-content: center; padding: 28px 0; }
.success-mark { display: grid; place-items: center; width: clamp(56px, min(10vw, 9vh), 72px); height: clamp(56px, min(10vw, 9vh), 72px); margin-bottom: 22px; border-radius: 50%; background: var(--success-surface); color: var(--success); animation: success-mark-arrive 260ms cubic-bezier(.2,.7,.25,1) both; }
.success-mark .ui-icon { width: clamp(26px, min(4vw, 4vh), 34px); height: clamp(26px, min(4vw, 4vh), 34px); stroke-width: 2; }
.success-page h1 { margin-bottom: 10px; }
.success-page .lead { margin-bottom: 22px; }
.success-reference { display: grid; width: min(100%, 440px); grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 16px 18px; }
.success-reference .summary-label { color: var(--muted); font-size: 13px; }
.success-reference > strong { grid-column: 1; font-size: 20px; letter-spacing: .02em; }
.success-status { display: inline-flex; grid-column: 2; grid-row: 1 / 3; align-items: center; gap: 6px; color: var(--review); font-size: 13px; font-weight: 700; }
.success-status .ui-icon { width: clamp(14px, min(1.9vw, 2vh), 16px); height: clamp(14px, min(1.9vw, 2vh), 16px); }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.developer-note { color: var(--muted); font-size: 13px; }
.muted-divider { height: 1px; background: var(--border); margin: 20px 0; }

@keyframes soft-page-arrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.screen.is-entering .account-topbar,
.screen.is-entering .back-link,
.screen.is-entering .page-header,
.screen.is-entering .detail-header,
.screen.is-entering .profile-summary,
.screen.is-entering .user-summary {
  animation: soft-page-arrive 260ms cubic-bezier(.2,.7,.25,1) both;
}
.screen.is-entering .welcome-copy,
.screen.is-entering .auth-card,
.screen.is-entering .detail-block,
.screen.is-entering .user-create-panel,
.screen.is-entering .notice {
  animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 45ms both;
}
.screen.is-entering .feature-row,
.screen.is-entering .sauda-card,
.screen.is-entering .summary-card,
.screen.is-entering .queue-card,
.screen.is-entering .user-row {
  animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) both;
}
.screen.is-entering .feature-row:nth-child(2),
.screen.is-entering .sauda-card:nth-child(2),
.screen.is-entering .summary-card:nth-child(2),
.screen.is-entering .queue-card:nth-child(2),
.screen.is-entering .user-row:nth-child(2) { animation-delay: 55ms; }
.screen.is-entering .feature-row:nth-child(3),
.screen.is-entering .sauda-card:nth-child(3),
.screen.is-entering .summary-card:nth-child(3),
.screen.is-entering .queue-card:nth-child(3),
.screen.is-entering .user-row:nth-child(3) { animation-delay: 95ms; }
.screen.is-entering .feature-row:nth-child(4),
.screen.is-entering .sauda-card:nth-child(4),
.screen.is-entering .summary-card:nth-child(4),
.screen.is-entering .user-row:nth-child(4) { animation-delay: 135ms; }
.screen.is-entering .sauda-card:nth-child(5),
.screen.is-entering .user-row:nth-child(5) { animation-delay: 175ms; }
.screen.is-entering .sauda-card:nth-child(6),
.screen.is-entering .user-row:nth-child(6) { animation-delay: 215ms; }
.screen.is-entering .sauda-type-option:nth-child(1) { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 50ms both; }
.screen.is-entering .sauda-type-option:nth-child(2) { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 105ms both; }
.screen.is-entering .content-stack > .card:nth-child(1) { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 45ms both; }
.screen.is-entering .content-stack > .card:nth-child(2) { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 100ms both; }
.screen.is-entering .review-card > .card:nth-of-type(1) { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 45ms both; }
.screen.is-entering .review-card > .card:nth-of-type(2) { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) 100ms both; }
.screen.is-entering .success-page { animation: soft-page-arrive 300ms cubic-bezier(.2,.7,.25,1) both; }
@keyframes toast-arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes success-mark-arrive { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

@media (min-width: 700px) {
  .screen { padding: 40px 40px calc(var(--nav-height) + 32px); }
  .screen.narrow { padding-top: 56px; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 24px; align-items: start; }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .form-grid .full-span { grid-column: 1 / -1; }
  .welcome-wrap { width: min(100%, 680px); }
  .welcome-wrap .brand-lockup { margin-bottom: 90px; }
  .welcome-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-row { display: block; min-height: 150px; }
  .feature-row .step-number { margin-bottom: 12px; }
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-bottom-nav-inner { padding: 0 24px; }
  .sauda-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .screen { padding-left: 64px; padding-right: 64px; }
  .welcome-wrap { width: 760px; }
  .welcome-copy h1 { font-size: 54px; }
  .sauda-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-queue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .queue-card { display: block; min-height: 170px; }
  .queue-card .text-button { display: inline-flex; margin-top: 26px; }
}

@media (max-width: 520px) {
  .page-header { display: block; }
  .page-header .button { width: 100%; margin-top: 16px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card .summary-value { font-size: 26px; }
  .queue-card { align-items: flex-start; flex-direction: column; }
  .queue-card .text-button { padding-left: 0; }
  .terms-grid { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .term-label, .term-value { font-size: 14px; }
  .sticky-actions .button-row { flex-direction: column-reverse; }
  .sticky-actions .button { width: 100%; }
}

@media (max-width: 560px) {
  .user-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .user-row-avatar { width: 38px; height: 38px; grid-row: span 2; }
  .user-row-main { grid-column: 2; }
  .user-status { grid-column: 3; grid-row: 1; }
  .user-toggle { grid-column: 2 / 4; justify-self: start; }
  .profile-summary { padding: 16px; }
}

@media (max-width: 360px) {
  .screen { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  .card.pad { padding: 16px; }
  .sauda-card { padding: 14px; }
  .detail-block { padding: 16px 14px; }
}

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