body.is-app {
  position: relative;
  background: #fff;
  padding-bottom: 0;
}

.app-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.app-hero-bg::before,
.app-hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
}

.app-hero-bg::before {
  top: 0;
  height: 42%;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.55) 38%, transparent 100%);
}

.app-hero-bg::after {
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, #fff);
}

.app-page-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 72%;
  filter: brightness(0.94) saturate(1.08) contrast(1.04);
}

body.is-app .site-header {
  position: relative;
  z-index: 1;
  background: transparent;
  border-bottom: 0;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  min-height: 96px;
  padding: 16px 28px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.app-brand-flag {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.app-brand-flag img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.app-brand-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.app-brand-text strong {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #111;
}

.app-brand-by {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  line-height: 1;
}

.app-brand-logo {
  display: block;
  width: 54px;
  height: 12px;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
}

.app-brand-logo img {
  display: block;
  width: 56px;
  height: 43px;
  max-width: none;
  margin-top: -5px;
  opacity: 0.7;
}

body.is-app .cta-mobile,
body.is-app .wa {
  display: none;
}

.app-contact {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

.app-contact:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.app-shell {
  position: relative;
  z-index: 1;
  padding-bottom: 96px;
}

.app-banner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  width: calc(100% - 32px);
  min-height: 200px;
  padding: 32px 32px 132px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 80% 120% at 92% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(180deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
  overflow: hidden;
}

.app-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.app-banner-kicker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.app-banner-kicker svg {
  flex-shrink: 0;
}

.app-banner h1 {
  position: relative;
  z-index: 1;
  max-width: 16em;
  margin: 0 auto;
  color: #fff;
  text-align: center;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-wrap: balance;
}

.app-layout {
  display: grid;
  gap: 20px;
  max-width: 1280px;
  width: calc(100% - 32px);
  margin: -112px auto 0;
  padding-inline: 1%;
  position: relative;
  z-index: 2;
}

.main-card {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 24px 16px 20px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 0 4px;
}

.flow-steps button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #6b7280;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.flow-steps button em {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: #fff;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.flow-steps button.is-done em {
  background: #03051a;
  border-color: #03051a;
  color: #fff;
}

.flow-steps button.is-current em {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.flow-steps button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.flow-steps button:focus-visible em {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.flow-meta {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
}

#pay-fields {
  display: grid;
  gap: 20px;
}

.pay-done {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.form-inner {
  margin-top: 12px;
  padding: 24px 16px 16px;
  border: 1.5px dashed #d1d5db;
  border-radius: 24px;
}

.form-inner h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.panel-lead {
  font-size: 16px;
  line-height: 1.45;
  color: #374151;
  margin-bottom: 8px;
  max-width: 36em;
}

.form-alert {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 15px;
  font-weight: 500;
}

.app-form {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.group {
  display: grid;
  gap: 16px;
  border: 0;
  padding: 0;
  min-width: 0;
}

.group > legend {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4b5563;
  padding: 0;
  margin-bottom: 4px;
}

.app-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.app-field > span,
.app-field > label,
.sex-legend {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  float: none;
}

.field-hint,
.opt {
  font-size: 14px;
  font-weight: 400;
  color: #4b5563;
  line-height: 1.4;
}

.opt {
  font-weight: 400;
  color: #6b7280;
}

.field-error {
  font-size: 14px;
  font-weight: 500;
  color: #b91c1c;
}

.app-field input,
.app-field select,
.app-field textarea {
  width: 100%;
  height: 52px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 16px;
  color-scheme: light;
}

.app-field textarea {
  height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.app-field input:focus,
.app-field select:focus,
.app-field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 72, 255, 0.18);
}

.app-field.is-invalid input,
.app-field.is-invalid select,
.app-field.is-invalid textarea,
.app-field.is-invalid .dob select {
  border-color: #dc2626;
}

.name-grid {
  display: grid;
  gap: 16px;
}

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

.form-rule {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 4px 0;
}

.phone-grid {
  display: grid;
  gap: 12px;
}

.save-note {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

.app-actions.is-full {
  justify-content: stretch;
}

.app-actions.is-full .btn {
  width: 100%;
  min-width: 0;
}

.scan {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1.5px dashed rgba(0, 72, 255, 0.45);
  background: rgba(0, 72, 255, 0.05);
  border-radius: 16px;
  color: var(--ink);
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
}

.scan small {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.scan strong {
  display: block;
  font-weight: 600;
}

.scan em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 14px;
  font-weight: 400;
  color: #4b5563;
}

.scan:hover,
.scan.is-over {
  background: rgba(0, 72, 255, 0.1);
}

.scan svg {
  color: var(--accent);
  flex-shrink: 0;
}

.scan.is-busy {
  opacity: 0.7;
  pointer-events: none;
}

.scan-status {
  font-size: 15px;
  color: #4b5563;
}

.scan-status.is-ok {
  color: #15803d;
  font-weight: 500;
}

.scan-status.is-err {
  color: #b91c1c;
  font-weight: 500;
}

.passport-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 16px;
  font-weight: 500;
}

.or-fill {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 4px 0;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.or-fill::before,
.or-fill::after {
  content: "";
  height: 1px;
  background: #e2e8f0;
}

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

.sex-grid.is-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-note {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.4;
}

.sex {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  border: 1.5px solid #d1d5db;
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

.sex input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.sex:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0, 72, 255, 0.05);
  box-shadow: 0 0 0 1px var(--accent);
}

.counter {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 8px;
  max-width: 240px;
}

.counter button {
  width: 52px;
  height: 52px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.counter button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.counter input {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.app-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.app-actions .btn {
  min-width: 160px;
  height: 52px;
  font-size: 16px;
}

.btn-back {
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  border: 1.5px solid #d1d5db;
}

.traveler-card {
  border: 1.5px solid #d6e4ff;
  border-radius: 20px;
  background: #f3f7ff;
}

#extra-travelers .traveler-card:nth-child(6n + 1) {
  background: #fff4ee;
  border-color: #ffdccb;
}

#extra-travelers .traveler-card:nth-child(6n + 2) {
  background: #eefaf3;
  border-color: #cfead9;
}

#extra-travelers .traveler-card:nth-child(6n + 3) {
  background: #f6f1ff;
  border-color: #e0d4ff;
}

#extra-travelers .traveler-card:nth-child(6n + 4) {
  background: #fffceb;
  border-color: #f3e7b8;
}

#extra-travelers .traveler-card:nth-child(6n + 5) {
  background: #fff0f5;
  border-color: #f8d0de;
}

#extra-travelers .traveler-card:nth-child(6n + 6) {
  background: #eefafb;
  border-color: #c5e8ec;
}

.traveler-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 12px 16px;
}

.traveler-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #16a34a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.traveler-head strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.traveler-you {
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
}

.traveler-toggle,
.traveler-remove {
  appearance: none;
  background: none;
  border: 0;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
}

.traveler-toggle {
  margin-left: auto;
  color: #6b7280;
}

.traveler-remove {
  color: #dc2626;
}

.traveler-remove:hover {
  background: rgba(220, 38, 38, 0.08);
}

.traveler-body {
  display: none;
  grid-gap: 18px;
  padding: 4px 16px 20px;
}

.traveler-card.is-open .traveler-body {
  display: grid;
}

#extra-travelers {
  display: grid;
  gap: 14px;
}

.add-traveler {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: #e8eaee;
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.add-traveler:hover {
  background: #dde0e6;
}

.app-actions.is-split {
  justify-content: stretch;
}

.app-actions.is-split .btn-back {
  min-width: 0;
}

.app-actions.is-split .btn:last-child {
  flex: 1;
}

.recap-list {
  margin-top: 20px;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 8px 4px;
}

.recap-list .recap-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 12px 14px;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
}

.recap-list .recap-row:last-child {
  border-bottom: 0;
}

.recap-list dt {
  font-size: 14px;
  color: #4b5563;
}

.recap-list dd {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

.recap-edit {
  grid-column: 1 / -1;
  justify-self: start;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
}

.choice input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.choice strong {
  display: block;
  margin-bottom: 2px;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0, 72, 255, 0.04);
}

.choice.is-legal {
  background: #fafafa;
}

.choice a {
  color: var(--accent);
}

.price-box {
  border-top: 1.5px solid #e5e7eb;
  padding-top: 8px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  padding: 8px 0;
}

.price-line.is-total {
  border-top: 1.5px solid #e5e7eb;
  margin-top: 8px;
  padding-top: 14px;
  font-weight: 600;
  font-size: 18px;
}

.app-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.recap-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 24px 22px;
}

.recap-card h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1.5px dotted #d1d5db;
}

.recap-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  align-items: start;
}

.recap-card .recap-row dt {
  font-size: 14px;
  color: #4b5563;
}

.recap-card .recap-row dd {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.side-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1.5px solid #e5e7eb;
  font-size: 15px;
}

.side-price strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.trust-card,
.help-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 500;
}

.trust-card svg {
  flex-shrink: 0;
}

.help-card {
  display: block;
  color: #374151;
  font-weight: 400;
}

.help-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.done {
  text-align: left;
  padding: 48px 0 80px;
}

.done h1 {
  margin-bottom: 16px;
}

.done-list {
  padding-left: 1.2em;
  font-size: 18px;
  line-height: 1.6;
  max-width: 28em;
}

.done .btn {
  margin-top: 28px;
  height: 52px;
  min-width: 200px;
  font-size: 16px;
}

.panel[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 719px) {
  .app-brand {
    gap: 10px;
  }

  .app-brand-flag {
    width: 46px;
    height: 46px;
  }

  .app-brand-text strong {
    font-size: 20px;
  }

  .app-brand-logo {
    width: 45px;
    height: 10px;
  }

  .app-brand-logo img {
    width: 47px;
    height: 36px;
    margin-top: -4px;
  }

  .app-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin: 8px -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  }

  .app-actions .btn {
    flex: 1;
    min-width: 0;
  }
}

@media (min-width: 720px) {
  .app-banner,
  .app-layout {
    width: calc(100% - 48px);
  }

  .app-banner {
    padding: 40px 56px 148px;
  }

  .app-banner h1 {
    font-size: 32px;
  }

  .main-card {
    padding: 32px 28px 28px;
  }

  .form-inner {
    padding: 32px 28px 24px;
  }

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

  .phone-grid {
    grid-template-columns: 1.15fr 1fr;
  }
}

@media (min-width: 960px) {
  .app-banner,
  .app-layout {
    width: calc(100% - 64px);
  }

  .app-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
    gap: 22px;
  }

  .app-side {
    position: sticky;
    top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .app-contact,
  .scan,
  .counter button,
  .flow-steps button em {
    transition: none;
  }
}
